Skip to content

Commit 825bda1

Browse files
Maarten Duijnstanley-cheung
authored andcommitted
Add a max grpc timeout to the echo example.
When a beginner continues with the example code to set up a streaming service, streams will be interrupted for no apparant reason after ~14 seconds. This makes sure streams will stay open.
1 parent 9d2b7fe commit 825bda1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

net/grpc/gateway/examples/echo/envoy.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ static_resources:
2121
domains: ["*"]
2222
routes:
2323
- match: { prefix: "/" }
24-
route: { cluster: echo_service }
24+
route:
25+
cluster: echo_service
26+
max_grpc_timeout: 0s
2527
cors:
2628
allow_origin:
2729
- "*"

net/grpc/gateway/examples/echo/tutorial.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ this:
6767
domains: ["*"]
6868
routes:
6969
- match: { prefix: "/" }
70-
route: { cluster: echo_service }
70+
route:
71+
cluster: echo_service
72+
max_grpc_timeout: 0s
7173
http_filters:
7274
- name: envoy.grpc_web
7375
- name: envoy.router

0 commit comments

Comments
 (0)