Skip to content

Commit 844dd00

Browse files
authored
Merge pull request #39 from kfswain/gateway-testing
Adding circuit breaker and timeout layers to avoid Gateway 5xx errors.
2 parents c3661e8 + 0224490 commit 844dd00

File tree

5 files changed

+40
-3
lines changed

5 files changed

+40
-3
lines changed

pkg/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## Quickstart
22

3+
### Requirements
4+
The current manifests rely on Envoy Gateway [v1.2.1](https://gateway.envoyproxy.io/docs/install/install-yaml/#install-with-yaml) or higher.
5+
36
### Steps
47

58
1. **Deploy Sample vLLM Application**

pkg/manifests/ext_proc.yaml

+11-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,17 @@ spec:
6161
request:
6262
body: Buffered
6363
response:
64-
messageTimeout: 5s
64+
# The timeouts are likely not needed here. We can experiment with removing/tuning them slowly.
65+
# The connection limits are more important and will cause the opaque: ext_proc_gRPC_error_14 error in Envoy GW if not configured correctly.
66+
messageTimeout: 1000s
67+
backendSettings:
68+
circuitBreaker:
69+
maxConnections: 40000
70+
maxPendingRequests: 40000
71+
maxParallelRequests: 40000
72+
timeout:
73+
tcp:
74+
connectTimeout: 24h
6575
targetRef:
6676
group: gateway.networking.k8s.io
6777
kind: HTTPRoute

pkg/manifests/gateway.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,7 @@ spec:
4444
- backendRefs:
4545
- group: gateway.envoyproxy.io
4646
kind: Backend
47-
name: backend-dummy
47+
name: backend-dummy
48+
timeouts:
49+
request: "24h"
50+
backendRequest: "24h"

pkg/manifests/patch_policy.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,14 @@ spec:
2626
original_dst_lb_config:
2727
use_http_header: true
2828
http_header_name: "target-pod"
29-
connect_timeout: 6s
29+
connect_timeout: 1000s
3030
lb_policy: CLUSTER_PROVIDED
3131
dns_lookup_family: V4_ONLY
32+
circuit_breakers:
33+
thresholds:
34+
- max_connections: 40000
35+
max_pending_requests: 40000
36+
max_requests: 40000
3237

3338
- type: "type.googleapis.com/envoy.config.route.v3.RouteConfiguration"
3439
name: default/<GATEWAY-NAME>/llm-gw

pkg/manifests/traffic_policy.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: gateway.envoyproxy.io/v1alpha1
2+
kind: BackendTrafficPolicy
3+
metadata:
4+
name: high-connection-route-policy
5+
spec:
6+
targetRefs:
7+
- group: gateway.networking.k8s.io
8+
kind: HTTPRoute
9+
name: llm-route
10+
circuitBreaker:
11+
maxConnections: 40000
12+
maxPendingRequests: 40000
13+
maxParallelRequests: 40000
14+
timeout:
15+
tcp:
16+
connectTimeout: 24h

0 commit comments

Comments
 (0)