WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@christianalfoni
Copy link
Contributor

@christianalfoni christianalfoni commented Dec 11, 2025

So initially the SDK connection stability was implemented to deal with browser issues. Things like unfocusing the tab and detecting disconnect immediately when you refocus after hibernation etc. This was done with an empty ping/pong message and detecting lack of pong detection.

Now the users or on the edge there are other challenges. Things like hibernated processes like Vercel Fluid Compute and CloudFlare Workflows. In this case it is important that heartbeats has payload and they need to be more aggressive.

Instead of having two mechanisms for "keep alive" (one at SDK interface level and one internal heartbeat for the websocket) we now only rely on the explicit keepActiveWhileConnected logic. This sends an actual payload every 10 seconds to Pitcher. Previously this was by default false, but is now default true.

Additionally I noticed the SDK subscribes to data like git status and metrics from Pitcher. Data that we are not exposing in any way and just adds unnecessary processing on Pitcher.

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@christianalfoni
Copy link
Contributor Author

We are going to test using keepActiveWhileConnected first to validate the core issue. To not break we need to add a payload based ping pong in pitcher itself.

But maybe keepActiveWhileConnected could be used by default on the server. We'll have to evaluate.

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.

3 participants