Skip to content

Commit 0083f9a

Browse files
authored
fix(backend): add max sockets limitation (#367)
1 parent 8104372 commit 0083f9a

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

libs/backend-api7/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export class BackendAPI7 implements ADCSDK.Backend {
3232
const keepAlive: httpAgentOptions = {
3333
keepAlive: true,
3434
keepAliveMsecs: 60000,
35+
maxSockets: 256, // per host
3536
};
3637
const config: CreateAxiosDefaults = {
3738
baseURL: `${opts.server}`,

libs/backend-apisix-standalone/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export class BackendAPISIXStandalone implements ADCSDK.Backend {
4444
const keepAlive: httpAgentOptions = {
4545
keepAlive: true,
4646
keepAliveMsecs: 60000,
47+
maxSockets: 10, // per host
4748
};
4849
const config: CreateAxiosDefaults = {
4950
headers: { 'Content-Type': 'application/json' },

libs/backend-apisix/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export class BackendAPISIX implements ADCSDK.Backend {
2626
const keepAlive: httpAgentOptions = {
2727
keepAlive: true,
2828
keepAliveMsecs: 60000,
29+
maxSockets: 256, // per host
2930
};
3031
const config: CreateAxiosDefaults = {
3132
baseURL: `${opts.server}`,

0 commit comments

Comments
 (0)