Fix stale nginx domain, add upstream health checks, rate limiting, and WebSocket timeouts#117
Draft
Fix stale nginx domain, add upstream health checks, rate limiting, and WebSocket timeouts#117
Conversation
…d WebSocket timeouts Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix stale nginx domain and add health checks and rate limiting
Fix stale nginx domain, add upstream health checks, rate limiting, and WebSocket timeouts
Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The testnet nginx config referenced the stale
testnetrpc.numbersprotocol.iodomain (vs.testnetrpc.num.networkused everywhere else), lacked upstream failure handling, had no rate limiting or request body caps, and WebSocket connections would silently drop after 60s with no client IP visibility. No mainnet config existed at all.Testnet config (
rpc/testnet/etc/nginx/sites-available/default)testnetrpc.numbersprotocol.io→testnetrpc.num.network(server_name, SSL cert paths, HTTP redirect block)max_fails=3 fail_timeout=30sper server; addkeepalive 16limit_req_zone(30r/s, 10m) at top level; addlimit_req burst=50 nodelayinlocation /location /: Addclient_max_body_size 1m,proxy_connect_timeout 10s,proxy_read_timeout 60s,proxy_send_timeout 60slocation /ws: Addproxy_read_timeout 3600s,proxy_send_timeout 3600s,proxy_buffering off,X-Real-IP,X-Forwarded-ForMainnet config (
rpc/mainnet/etc/nginx/sites-available/default) — new fileMirrors the testnet config structure for
mainnetrpc.num.networkwith all the same protections. Uses<internal-ip-val-m1..5>and<mainnet-chain-id>placeholders to be substituted at deploy time.Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.