Skip to content

Commit

Permalink
feat: handle keep-alive timeout
Browse files Browse the repository at this point in the history
Add the possibility to configure the keep-alive timeout at API level.

https://gravitee.atlassian.net/browse/APIM-3966
(cherry picked from commit 9894ebb)
  • Loading branch information
phiz71 committed Mar 28, 2024
1 parent 7836e50 commit 8bc0563
Show file tree
Hide file tree
Showing 80 changed files with 211 additions and 70 deletions.
1 change: 1 addition & 0 deletions docker/quick-setup/https-gateway/.resources/Echo.json
Expand Up @@ -123,6 +123,7 @@
"http": {
"connectTimeout": 5000,
"idleTimeout": 60000,
"keepAliveTimeout": 30000,
"keepAlive": true,
"readTimeout": 10000,
"pipelining": false,
Expand Down
1 change: 1 addition & 0 deletions docker/quick-setup/keycloak/secured-api.json
Expand Up @@ -94,6 +94,7 @@
"http": {
"connectTimeout": 5000,
"idleTimeout": 60000,
"keepAliveTimeout": 30000,
"keepAlive": true,
"readTimeout": 10000,
"pipelining": false,
Expand Down
Expand Up @@ -44,6 +44,8 @@ public HttpClientOptions deserialize(JsonParser jp, DeserializationContext ctxt)

httpClientOptions.setIdleTimeout(node.path("idleTimeout").asLong(HttpClientOptions.DEFAULT_IDLE_TIMEOUT));

httpClientOptions.setKeepAliveTimeout(node.path("keepAliveTimeout").asLong(HttpClientOptions.DEFAULT_KEEP_ALIVE_TIMEOUT));

httpClientOptions.setKeepAlive(node.path("keepAlive").asBoolean(HttpClientOptions.DEFAULT_KEEP_ALIVE));

httpClientOptions.setPipelining(node.path("pipelining").asBoolean(HttpClientOptions.DEFAULT_PIPELINING));
Expand Down
Expand Up @@ -37,6 +37,7 @@ public void serialize(HttpClientOptions httpClientOptions, JsonGenerator jgen, S
jgen.writeStartObject();
jgen.writeNumberField("connectTimeout", httpClientOptions.getConnectTimeout());
jgen.writeNumberField("idleTimeout", httpClientOptions.getIdleTimeout());
jgen.writeNumberField("keepAliveTimeout", httpClientOptions.getKeepAliveTimeout());
jgen.writeBooleanField("keepAlive", httpClientOptions.isKeepAlive());
jgen.writeNumberField("readTimeout", httpClientOptions.getReadTimeout());
jgen.writeBooleanField("pipelining", httpClientOptions.isPipelining());
Expand Down
Expand Up @@ -25,6 +25,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -28,6 +28,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -31,6 +31,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -25,6 +25,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -21,6 +21,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand All @@ -35,6 +36,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -28,6 +28,7 @@
"http" : {
"connectTimeout" : 4000,
"idleTimeout" : 50000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 9000,
"pipelining" : false,
Expand All @@ -42,6 +43,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -10,6 +10,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand All @@ -28,6 +29,7 @@
"http" : {
"connectTimeout" : 4000,
"idleTimeout" : 50000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 9000,
"pipelining" : false,
Expand Down
Expand Up @@ -31,6 +31,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -25,6 +25,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -25,6 +25,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -25,6 +25,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -29,6 +29,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -28,6 +28,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -29,6 +29,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -29,7 +29,8 @@
},
"http": {
"connectTimeout": 5000,
"idleTimeout": 60000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive": true,
"readTimeout": 10000,
"pipelining": false,
Expand Down
Expand Up @@ -34,6 +34,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -26,6 +26,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -31,6 +31,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -32,6 +32,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -28,6 +28,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -29,6 +29,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -19,7 +19,8 @@
"backup" : false,
"type" : "http",
"http": {
"idleTimeout": 5000,
"idleTimeout" : 5000,
"keepAliveTimeout" : 3000,
"connectTimeout": 5000,
"keepAlive": true,
"followRedirects": true
Expand All @@ -39,6 +40,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -19,7 +19,8 @@
"backup" : false,
"type" : "http",
"http": {
"idleTimeout": 5000,
"idleTimeout" : 5000,
"keepAliveTimeout" : 3000,
"connectTimeout": 5000,
"keepAlive": true,
"followRedirects": true
Expand All @@ -40,6 +41,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -9,7 +9,8 @@
"name": "default",
"target": "http://localhost:8083/myapi",
"http": {
"idleTimeout": 5000,
"idleTimeout" : 5000,
"keepAliveTimeout" : 3000,
"connectTimeout": 5000,
"keepAlive": true,
"followRedirects": true
Expand Down
Expand Up @@ -9,7 +9,8 @@
"name": "default",
"target": "http://localhost:8083/myapi",
"http": {
"idleTimeout": 5000,
"idleTimeout" : 5000,
"keepAliveTimeout" : 3000,
"connectTimeout": 5000,
"keepAlive": true,
"followRedirects": true
Expand Down
Expand Up @@ -25,6 +25,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -19,7 +19,8 @@
"backup" : false,
"type" : "http",
"http" : {
"idleTimeout": 5000,
"idleTimeout" : 5000,
"keepAliveTimeout" : 3000,
"connectTimeout": 5000,
"keepAlive": true
}
Expand All @@ -30,6 +31,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -9,7 +9,8 @@
"name": "default",
"target": "http://localhost:8083/myapi",
"http": {
"idleTimeout": 5000,
"idleTimeout" : 5000,
"keepAliveTimeout" : 3000,
"connectTimeout": 5000,
"keepAlive": true
}
Expand Down
Expand Up @@ -9,7 +9,8 @@
"name": "default",
"target": "http://localhost:8083/myapi",
"http": {
"idleTimeout": 5000,
"idleTimeout" : 5000,
"keepAliveTimeout" : 3000,
"connectTimeout": 5000,
"keepAlive": true,
"followRedirects": true
Expand Down
Expand Up @@ -33,7 +33,8 @@
},
"http": {
"connectTimeout": 5000,
"idleTimeout": 60000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive": true,
"readTimeout": 10000,
"pipelining": false,
Expand Down
Expand Up @@ -19,7 +19,8 @@
"backup" : false,
"type" : "http",
"http": {
"idleTimeout": 5000,
"idleTimeout" : 5000,
"keepAliveTimeout" : 3000,
"connectTimeout": 5000,
"keepAlive": true,
"followRedirects": true
Expand All @@ -39,6 +40,7 @@
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
Expand Down
Expand Up @@ -9,7 +9,8 @@
"name": "default",
"target": "http://localhost:8083/myapi",
"http": {
"idleTimeout": 5000,
"idleTimeout" : 5000,
"keepAliveTimeout" : 3000,
"connectTimeout": 5000,
"keepAlive": true,
"followRedirects": true
Expand Down
Expand Up @@ -9,7 +9,8 @@
"name": "default",
"target": "http://localhost:8083/myapi",
"http": {
"idleTimeout": 5000,
"idleTimeout" : 5000,
"keepAliveTimeout" : 3000,
"connectTimeout": 5000,
"keepAlive": true,
"followRedirects": true
Expand Down
Expand Up @@ -29,7 +29,8 @@
},
"http": {
"connectTimeout": 5000,
"idleTimeout": 60000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive": true,
"readTimeout": 10000,
"pipelining": false,
Expand Down
Expand Up @@ -29,7 +29,8 @@
},
"http": {
"connectTimeout": 5000,
"idleTimeout": 60000,
"idleTimeout" : 60000,
"keepAliveTimeout" : 30000,
"keepAlive": true,
"readTimeout": 10000,
"pipelining": false,
Expand Down

0 comments on commit 8bc0563

Please sign in to comment.