Improve frontend 2: Deduplicate /status requests - #4026
Open
joaoantoniocardoso wants to merge 1 commit into
Open
Improve frontend 2: Deduplicate /status requests#4026joaoantoniocardoso wants to merge 1 commit into
joaoantoniocardoso wants to merge 1 commit into
Conversation
joaoantoniocardoso
requested review from
Williangalvani,
joaomariolago,
nicoschmdt and
patrickelectric
July 24, 2026 23:41
This comment was marked as resolved.
This comment was marked as resolved.
joaoantoniocardoso
force-pushed
the
fix_frontend_deterioration_over_time_2
branch
from
July 24, 2026 23:57
26627fa to
7f04760
Compare
Every back_axios call used to hit /status first, which piled up under normal polling. Cache a recent online result for 3s (same as BackendStatusChecker) and share one in-progress check so we only actually request when the cache is stale.
joaoantoniocardoso
force-pushed
the
fix_frontend_deterioration_over_time_2
branch
from
July 28, 2026 01:34
7f04760 to
25ced82
Compare
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.
When checking the Network tab in Chrome devtools, there was a pile of
/statusrequests being fired. Digging in, every axios call was first checking whether the backend was online with an extra request. Example:This patch works around that with a short time-based cache (3 seconds, same as
BackendStatusChecker) so we only actually hit/statuswhen the cache is stale, and only one of those checks runs at a time while others wait on it or reuse the last "online" result.Example after:

When the backend gets online, we now have a few requests that will fail while the 3-second cache is valid:
But once it gets back online, it returns to normality:

This happens equally in both 1.4 and 1.5, and the impact on performance is probably minimal in most cases. It reduces the overall latency and reduces simultaneous connections, which is helpful when we expect low-grade connections as well.