Skip to content

cdn_bench: graceful shutdown, auto-terminate, and live metrics output (#576)#576

Open
SamirFarhat17 wants to merge 2 commits intofacebookresearch:v2-betafrom
SamirFarhat17:export-D100630922-to-v2-beta
Open

cdn_bench: graceful shutdown, auto-terminate, and live metrics output (#576)#576
SamirFarhat17 wants to merge 2 commits intofacebookresearch:v2-betafrom
SamirFarhat17:export-D100630922-to-v2-beta

Conversation

@SamirFarhat17
Copy link
Copy Markdown

@SamirFarhat17 SamirFarhat17 commented Apr 13, 2026

Summary:

Follow-up improvements to cdn_bench run.sh for operational ergonomics.

  • Graceful proxy shutdown — sends SIGINT instead of SIGTERM so proxygen flushes its metrics summary before exit, with a 2s grace period before SIGKILL
  • Auto-terminate for server and proxy roles when -d (duration) is passed, so long-running roles exit automatically after the client finishes (server: +20s grace, proxy: +10s grace)
  • Client-side proxy reachability check — verifies all proxy targets respond (HTTP/1.1 and h2) before sending traffic, aborts with diagnostic info if unreachable
  • Proxy stderr tee — proxy_server stderr is now tee'd to both terminal and file so metrics are visible during the run
  • Changed metrics_interval from 0 to 5 for periodic metrics output during the run
  • Minor quoting fix for IPv6 host:port variable expansion

Differential Revision: D100630922

…#575)

Summary:
Pull Request resolved: facebookresearch#575

Added health checks to cdn_bench/run.sh so it fails fast with a clear message instead of silently misbehaving:

- verify_content_server() probes each content_server with curl after startup to confirm it's actually serving, not just listening
- Backend Reachability Check runs before starting proxies — if any backend is unreachable it prints the exact curl command to debug and aborts
- Fixed IPv6 host:port parsing (was using ${entry%:*} which strips everything after the first colon, now extracts port first then strips it)

Differential Revision: D100220256
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 13, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 13, 2026

@SamirFarhat17 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D100630922.

@meta-codesync meta-codesync bot changed the title cdn_bench: graceful shutdown, auto-terminate, and live metrics output cdn_bench: graceful shutdown, auto-terminate, and live metrics output (#576) Apr 13, 2026
SamirFarhat17 added a commit to SamirFarhat17/DCPerf that referenced this pull request Apr 13, 2026
…facebookresearch#576)

Summary:

Follow-up improvements to cdn_bench run.sh for operational ergonomics.

- Graceful proxy shutdown — sends SIGINT instead of SIGTERM so proxygen flushes its metrics summary before exit, with a 2s grace period before SIGKILL
- Auto-terminate for server and proxy roles when -d (duration) is passed, so long-running roles exit automatically after the client finishes (server: +20s grace, proxy: +10s grace)
- Client-side proxy reachability check — verifies all proxy targets respond (HTTP/1.1 and h2) before sending traffic, aborts with diagnostic info if unreachable
- Proxy stderr tee — proxy_server stderr is now tee'd to both terminal and file so metrics are visible during the run
- Changed metrics_interval from 0 to 5 for periodic metrics output during the run
- Minor quoting fix for IPv6 host:port variable expansion

Differential Revision: D100630922
@SamirFarhat17 SamirFarhat17 force-pushed the export-D100630922-to-v2-beta branch from b8afe07 to 4bf4ed6 Compare April 13, 2026 18:27
…facebookresearch#576)

Summary:
Pull Request resolved: facebookresearch#576

Follow-up improvements to cdn_bench run.sh for operational ergonomics.

- Graceful proxy shutdown — sends SIGINT instead of SIGTERM so proxygen flushes its metrics summary before exit, with a 2s grace period before SIGKILL
- Auto-terminate for server and proxy roles when -d (duration) is passed, so long-running roles exit automatically after the client finishes (server: +20s grace, proxy: +10s grace)
- Client-side proxy reachability check — verifies all proxy targets respond (HTTP/1.1 and h2) before sending traffic, aborts with diagnostic info if unreachable
- Proxy stderr tee — proxy_server stderr is now tee'd to both terminal and file so metrics are visible during the run
- Changed metrics_interval from 0 to 5 for periodic metrics output during the run
- Minor quoting fix for IPv6 host:port variable expansion

Differential Revision: D100630922
@SamirFarhat17 SamirFarhat17 force-pushed the export-D100630922-to-v2-beta branch from 4bf4ed6 to 4e468a5 Compare April 13, 2026 18:31
SamirFarhat17 added a commit to SamirFarhat17/DCPerf that referenced this pull request Apr 13, 2026
…facebookresearch#576)

Summary:

Follow-up improvements to cdn_bench run.sh for operational ergonomics.

- Graceful proxy shutdown — sends SIGINT instead of SIGTERM so proxygen flushes its metrics summary before exit, with a 2s grace period before SIGKILL
- Auto-terminate for server and proxy roles when -d (duration) is passed, so long-running roles exit automatically after the client finishes (server: +20s grace, proxy: +10s grace)
- Client-side proxy reachability check — verifies all proxy targets respond (HTTP/1.1 and h2) before sending traffic, aborts with diagnostic info if unreachable
- Proxy stderr tee — proxy_server stderr is now tee'd to both terminal and file so metrics are visible during the run
- Changed metrics_interval from 0 to 5 for periodic metrics output during the run
- Minor quoting fix for IPv6 host:port variable expansion

Differential Revision: D100630922
meta-codesync bot pushed a commit that referenced this pull request Apr 13, 2026
…#576)

Summary:
Pull Request resolved: #576

Follow-up improvements to cdn_bench run.sh for operational ergonomics.

- Graceful proxy shutdown — sends SIGINT instead of SIGTERM so proxygen flushes its metrics summary before exit, with a 2s grace period before SIGKILL
- Auto-terminate for server and proxy roles when -d (duration) is passed, so long-running roles exit automatically after the client finishes (server: +20s grace, proxy: +10s grace)
- Client-side proxy reachability check — verifies all proxy targets respond (HTTP/1.1 and h2) before sending traffic, aborts with diagnostic info if unreachable
- Proxy stderr tee — proxy_server stderr is now tee'd to both terminal and file so metrics are visible during the run
- Changed metrics_interval from 0 to 5 for periodic metrics output during the run
- Minor quoting fix for IPv6 host:port variable expansion

Reviewed By: juwinviray

Differential Revision: D100630922

fbshipit-source-id: 5aa462fa702630ab46a7865859152d3465e94d08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant