Skip to content

Conversation

@SukkaW
Copy link

@SukkaW SukkaW commented Oct 25, 2025

The PR changes two things:

  • /ping now also supports HEAD request, and it will respond with HTTP 204 with an empty response body
  • The front-end now uses HEAD requests. And instead of using json() (which has JSON parse overhead) new implementation uses arrayBuffer()
    • Technically, we don't have to consume the body, but on some browsers (namely Safari), this would cause memory leaks (just like on Node.js). But since we return an empty response from the server, this should not cause any performance overhead anyway.
    • Also, with the PR, it now calculates the RTT before consuming the body.

@SukkaW SukkaW force-pushed the reduce-ping-overhead branch from 0d1c223 to 3452527 Compare October 25, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant