Skip to content

Commit ffd2946

Browse files
authored
perf: tune healthcheck intervals for squid and api-proxy containers (#1803)
* Initial plan * perf: tune healthcheck intervals for squid and api-proxy containers Agent-Logs-Url: https://github.com/github/gh-aw-firewall/sessions/28aaf10b-db35-49dc-90de-65079b972a43 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 07f9438 commit ffd2946

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

docs/api-proxy-sidecar.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,10 @@ The sidecar container:
284284
### Health check
285285

286286
Docker healthcheck on the `/health` endpoint (port 10000):
287-
- **Interval**: 5s
288-
- **Timeout**: 3s
287+
- **Interval**: 1s
288+
- **Timeout**: 1s
289289
- **Retries**: 5
290-
- **Start period**: 5s
290+
- **Start period**: 2s
291291

292292
## Troubleshooting
293293

src/docker-manager.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -475,10 +475,10 @@ export function generateDockerCompose(
475475
volumes: squidVolumes,
476476
healthcheck: {
477477
test: ['CMD', 'nc', '-z', 'localhost', '3128'],
478-
interval: '5s',
479-
timeout: '3s',
478+
interval: '1s',
479+
timeout: '1s',
480480
retries: 5,
481-
start_period: '10s',
481+
start_period: '2s',
482482
},
483483
ports: [`${SQUID_PORT}:${SQUID_PORT}`],
484484
// Security hardening: Drop unnecessary capabilities
@@ -1512,10 +1512,10 @@ export function generateDockerCompose(
15121512
},
15131513
healthcheck: {
15141514
test: ['CMD', 'curl', '-f', `http://localhost:${API_PROXY_HEALTH_PORT}/health`],
1515-
interval: '5s',
1516-
timeout: '3s',
1515+
interval: '1s',
1516+
timeout: '1s',
15171517
retries: 5,
1518-
start_period: '5s',
1518+
start_period: '2s',
15191519
},
15201520
// Security hardening: Drop all capabilities
15211521
cap_drop: ['ALL'],

src/types.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,10 +1303,10 @@ export interface DockerService {
13031303
* ```typescript
13041304
* {
13051305
* test: ['CMD', 'squidclient', '-h', 'localhost', '-p', '3128', 'http://localhost/'],
1306-
* interval: '5s',
1307-
* timeout: '3s',
1308-
* retries: 3,
1309-
* start_period: '10s'
1306+
* interval: '1s',
1307+
* timeout: '1s',
1308+
* retries: 5,
1309+
* start_period: '2s'
13101310
* }
13111311
* ```
13121312
*/

0 commit comments

Comments
 (0)