Skip to content

Commit 84479c1

Browse files
djwhittclaude
andcommitted
perf(observer): increase socket and request timeouts to 10 seconds
- Keep gateway assessment concurrency at 10 (reverting previous change) - Increase socket timeout from 5s to 10s for better stability - Increase all request timeouts from 5s to 10s to match socket timeout - Maintain serialized ownership checks for better load distribution This gives slow gateways more time to respond while keeping high concurrency for better throughput across the network. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent bdce9a8 commit 84479c1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const PORT = +env.varOrDefault('PORT', '5050');
103103

104104
export const GATEWAY_ASSESSMENT_CONCURRENCY = +env.varOrDefault(
105105
'GATEWAY_ASSESSMENT_CONCURRENCY',
106-
'5',
106+
'10',
107107
);
108108

109109
export const NAME_ASSESSMENT_CONCURRENCY = +env.varOrDefault(

src/observer.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const client = got.extend({
8080
lookup: 5000,
8181
connect: 5000,
8282
secureConnect: 2000,
83-
socket: 5000,
83+
socket: 10000,
8484
},
8585
});
8686

@@ -475,7 +475,7 @@ export class Observer {
475475

476476
try {
477477
const response = await this.gotClient.get(url, {
478-
timeout: { request: 5000 },
478+
timeout: { request: 10000 },
479479
responseType: 'json',
480480
});
481481

@@ -543,7 +543,7 @@ export class Observer {
543543

544544
try {
545545
const response = await this.gotClient.get(url, {
546-
timeout: { request: 5000 },
546+
timeout: { request: 10000 },
547547
responseType: 'json',
548548
});
549549

@@ -609,7 +609,7 @@ export class Observer {
609609

610610
try {
611611
const response = await this.gotClient.get(url, {
612-
timeout: { request: 5000 },
612+
timeout: { request: 10000 },
613613
responseType: 'json',
614614
});
615615

@@ -1073,7 +1073,7 @@ export class Observer {
10731073
// Fetch chunk data and proof from gateway
10741074

10751075
const response = await this.gotClient.get(url, {
1076-
timeout: { request: 5000 },
1076+
timeout: { request: 10000 },
10771077
responseType: 'json',
10781078
});
10791079

@@ -1137,7 +1137,7 @@ export class Observer {
11371137
});
11381138

11391139
const referenceResponse = await this.gotClient.get(referenceUrl, {
1140-
timeout: { request: 5000 },
1140+
timeout: { request: 10000 },
11411141
responseType: 'json',
11421142
});
11431143

0 commit comments

Comments
 (0)