Repository navigation
FE-1928: Pool atlas requests to handle network pressure better - #10020
alex-e-leon wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
PR SummaryMedium Risk Overview On 429 responses the transport now parses Session recovery is reworked: Tile cache / prefetch changes: auxiliary detail is retained with tiles (labels count toward budget), prefetches run at the viewport’s detail mode, and Reviewed by Cursor Bugbot for commit 9aafd93. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b1b1569. Configure here.
b1b1569 to
9aafd93
Compare

🌟 Purpose
The current implementation of atlas fetches/prefetches all tiles naively, and doesn't handle network issues or network pressure well. If the server is overloaded, or the user is rate-limited the errors get forwarded to the client and a 429 message is shown. This PR introduces a network pool that slows down the network requests, especially pre-fetching if network errors are triggered.
In addition this PR also improves auth token refresh handling. In the original implementation if an auth token expires during network transit, only the first tile fetch reply renews the token and retries and any other tile fetches fail. We fix this by having all in flight tile fetches re-use and retry their requests with a new token during token renewal.
🚫 Blocked by
There is a seperate ticket to update the rate limits on atlas to better match a tiling workload:
https://linear.app/hash/issue/SRE-1170/adjust-atlas-rate-limits-for-tiling-workloads
I'd like for this to be finished first so that I can properly test the new logic against the updated rate limits.