Skip to content

Commit

Permalink
Adjust the max streams and circuit breakers. (istio#4631)
Browse files Browse the repository at this point in the history
* Adjust the max streams and circuit breakers.

istio#4593

* Add the golden files

* Fix syntax

* Mixer filter in the wrong place
  • Loading branch information
costinm authored Mar 29, 2018
1 parent bfd7a4a commit 86cec26
Show file tree
Hide file tree
Showing 10 changed files with 128 additions and 6 deletions.
9 changes: 8 additions & 1 deletion pilot/docker/envoy_mixer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@
{
"url": "tcp://127.0.0.1:9091"
}
]
],
"circuit_breakers": {
"default": {
"max_connections": 100000,
"max_pending_requests": 100000,
"max_requests": 100000
}
}
}
]
}
Expand Down
9 changes: 8 additions & 1 deletion pilot/docker/envoy_mixer_auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@
{
"url": "tcp://127.0.0.1:9091"
}
]
],
"circuit_breakers": {
"default": {
"max_connections": 100000,
"max_pending_requests": 100000,
"max_requests": 100000
}
}
}
]
}
Expand Down
9 changes: 8 additions & 1 deletion pilot/docker/envoy_pilot.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@
{
"url": "tcp://127.0.0.1:8080"
}
]
],
"circuit_breakers": {
"default": {
"max_connections": 100000,
"max_pending_requests": 100000,
"max_requests": 100000
}
}
}
]
}
Expand Down
18 changes: 16 additions & 2 deletions pilot/docker/envoy_pilot_auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,14 @@
{
"url": "tcp://127.0.0.1:8080"
}
]
],
"circuit_breakers": {
"default": {
"max_connections": 100000,
"max_pending_requests": 100000,
"max_requests": 100000
}
}
},
{
"name": "in.15010",
Expand All @@ -129,7 +136,14 @@
{
"url": "tcp://127.0.0.1:15010"
}
]
],
"circuit_breakers": {
"default": {
"max_connections": 100000,
"max_pending_requests": 100000,
"max_requests": 100000
}
}
}
]
}
Expand Down
12 changes: 12 additions & 0 deletions pilot/pkg/bootstrap/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,18 @@ func (s *Server) initGrpcServer() {

grpcOptions = append(grpcOptions, grpc.UnaryInterceptor(middleware.ChainUnaryServer(interceptors...)))

// Temp setting, default should be enough for most supported environments. Can be used for testing
// envoy with lower values.
var maxStreams int
maxStreamsEnv := os.Getenv("ISTIO_GPRC_MAXSTREAMS")
if len(maxStreamsEnv) > 0 {
maxStreams, _ = strconv.Atoi(maxStreamsEnv)
}
if maxStreams == 0 {
maxStreams = 100000
}
grpcOptions = append(grpcOptions, grpc.MaxConcurrentStreams(uint32(maxStreams)))

// get the grpc server wired up
grpc.EnableTracing = true

Expand Down
15 changes: 15 additions & 0 deletions pkg/bootstrap/testdata/all_golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,21 @@
"socket_address": {"address": "mypilot", "port_value": 15010}
}
],
"circuit_breakers": {
"thresholds": [
{
"priority": "default",
"max_connections": "100000",
"max_pending_requests": "100000",
"max_requests": "100000"
},
{
"priority": "high",
"max_connections": "100000",
"max_pending_requests": "100000",
"max_requests": "100000"
}]
},
"http2_protocol_options": { }
}

Expand Down
15 changes: 15 additions & 0 deletions pkg/bootstrap/testdata/auth_golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,21 @@
"socket_address": {"address": "istio-pilot", "port_value": 15010}
}
],
"circuit_breakers": {
"thresholds": [
{
"priority": "default",
"max_connections": "100000",
"max_pending_requests": "100000",
"max_requests": "100000"
},
{
"priority": "high",
"max_connections": "100000",
"max_pending_requests": "100000",
"max_requests": "100000"
}]
},
"http2_protocol_options": { }
}

Expand Down
15 changes: 15 additions & 0 deletions pkg/bootstrap/testdata/default_golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,21 @@
"socket_address": {"address": "istio-pilot", "port_value": 15010}
}
],
"circuit_breakers": {
"thresholds": [
{
"priority": "default",
"max_connections": "100000",
"max_pending_requests": "100000",
"max_requests": "100000"
},
{
"priority": "high",
"max_connections": "100000",
"max_pending_requests": "100000",
"max_requests": "100000"
}]
},
"http2_protocol_options": { }
}

Expand Down
15 changes: 15 additions & 0 deletions tools/deb/envoy_bootstrap_tmpl.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,21 @@
"socket_address": {{ .pilot_grpc_address }}
}
],
"circuit_breakers": {
"thresholds": [
{
"priority": "default",
"max_connections": "100000",
"max_pending_requests": "100000",
"max_requests": "100000"
},
{
"priority": "high",
"max_connections": "100000",
"max_pending_requests": "100000",
"max_requests": "100000"
}]
},
"http2_protocol_options": { }
}

Expand Down
17 changes: 16 additions & 1 deletion tools/deb/envoy_bootstrap_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,21 @@
"socket_address": {{ .pilot_grpc_address }}
}
],
"circuit_breakers": {
"thresholds": [
{
"priority": "default",
"max_connections": "100000",
"max_pending_requests": "100000",
"max_requests": "100000"
},
{
"priority": "high",
"max_connections": "100000",
"max_pending_requests": "100000",
"max_requests": "100000"
}]
},
"http2_protocol_options": { }
}

Expand Down Expand Up @@ -133,4 +148,4 @@
}
]
{{ end }}
}
}

0 comments on commit 86cec26

Please sign in to comment.