Skip to content

Improve Subway resilience: re-add LuckyFriday, tune timeouts for endpoint rotation#655

Merged
rockbmb merged 6 commits into
masterfrom
fix-acala-subway-resilience
Jul 14, 2026
Merged

Improve Subway resilience: re-add LuckyFriday, tune timeouts for endpoint rotation#655
rockbmb merged 6 commits into
masterfrom
fix-acala-subway-resilience

Conversation

@rockbmb

@rockbmb rockbmb commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

All 4 Acala Foundation endpoints (acala-rpc-{0,1,3}.aca-api.network, acala-rpc.aca-api.network) resolve to the same 3 IPs in AWS eu-west-1. Subway has zero failover diversity: when the cluster stalls, all "different" endpoints fail together. This has caused 9 out of 10 recent update-known-good runs to fail on Acala chain_getBlockHash timeouts.

The previous timeout configuration made it worse: with client=90s and server=120s, Subway could only attempt ~1.3 endpoints before the server ceiling killed the request, making the 4-endpoint list meaningless.

Changes

  1. Re-add wss://rpc-acala.luckyfriday.io. Independent infrastructure (Cloudflare), provides actual failover when the Acala Foundation cluster is unresponsive. Was removed in Fix Acala endpoints: add numbered Acala Foundation RPCs, remove dead Dwellir and OnFinality #654 because it was 678k blocks behind head; it has since fully re-synced.

  2. Lower client request_timeout_seconds from 90 to 60. Still generous for state queries (Subway's default was 30s before Install Subway from acala/subway:v0.1.1 Docker image; set 90s per-upstream timeout #622), but allows more rotation attempts within the server ceiling.

  3. Raise server request_timeout_seconds from 120 to 240. Allows 3+ full upstream attempts (3 x 65s = 195s < 240s) before the hard ceiling, giving Subway a real chance to find a responsive endpoint.

Timeout math

Before After
Client (per-upstream) 90s (+5s buffer = 95s) 60s (+5s = 65s)
Server (hard ceiling) 120s 240s
Max endpoint attempts ~1.3 ~3.7

…oint rotation

All 4 Acala Foundation endpoints (aca-api.network) resolve to the same
3 IPs, giving Subway zero failover diversity. With client timeout at
90s and server ceiling at 120s, Subway could only attempt ~1.3 endpoints
before the server killed the request — making the 4-endpoint list
useless.

Changes:
- Re-add wss://rpc-acala.luckyfriday.io (independent Cloudflare infra)
- Lower client request_timeout_seconds 90→60 (still generous for state
  queries, but allows more rotation attempts)
- Raise server request_timeout_seconds 120→240 (allows ≥3 full upstream
  attempts before the hard ceiling)
@github-actions

Copy link
Copy Markdown
Contributor

No issues found

@rockbmb rockbmb self-assigned this Jul 14, 2026
@rockbmb rockbmb added the endpoints Related to management of networks' RPC endpoints. Adding/changing/disabling. label Jul 14, 2026
@rockbmb rockbmb added this to the Refactors & redesigns milestone Jul 14, 2026
@rockbmb rockbmb added the infrastructure Work on CI (Subway, CI workflows, GitHub Actions) label Jul 14, 2026
Comment thread .github/workflows/debug-acala.yml Fixed
@rockbmb rockbmb force-pushed the fix-acala-subway-resilience branch from aa523c1 to ac204bf Compare July 14, 2026 13:44
Comment thread .github/workflows/debug-acala.yml Fixed
rockbmb added 2 commits July 14, 2026 15:01
Without this, @polkadot/rpc-provider's WsProvider gives up after 90s
while subway is still rotating through endpoints (up to 240s). The
client disconnects before subway has a chance to find a responsive
upstream.
@rockbmb rockbmb merged commit 0c1c639 into master Jul 14, 2026
13 checks passed
@rockbmb rockbmb deleted the fix-acala-subway-resilience branch July 14, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

endpoints Related to management of networks' RPC endpoints. Adding/changing/disabling. infrastructure Work on CI (Subway, CI workflows, GitHub Actions)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants