Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zetta Version (1.6.0) - Upgraded spdy - Working with Node v18 #379

Merged
merged 28 commits into from
Aug 15, 2024

Conversation

AdamMagaluk
Copy link
Collaborator

@AdamMagaluk AdamMagaluk commented Dec 18, 2022

About 5 years in the making :)

Use zetta@1.6.0 with the latest versions of Node.js

PR that extends: #373. I lost access to the zetta repository after leaving Google. I still have access to the npm account so i went ahead and published zetta@1.6.0 with these changes.

I was able to finally get Zetta building and passing the latest versions of Node.js. It still uses spdy module using http2 framing. I recently tested it, though with much less rigor than we used to, with node v18.

One outstanding issue is that HTTP2/SPDY pings no longer work and we relied on these at the application level to check if the peer is still alive. Currently the peers disconnect and reconnect after 30s. I plan to do a similar PR fix with the later versions of spdy as spdy-http2/node-spdy#353.

I'm maintaining this as I wanted a good working example of the zetta APIs and not exactly for production usage at this point.


Well it's been about two years in making but this PR allows Zetta to run on the latest version of Node.js with the spdy and ws module updated to their newest versions. Sorry for all the delay, folks.

This release adds support for the versions below and drops supports for node <= v4. v0.10, v0.12, etc.. Sorry for anyone who uses it but those versions are long retired. Fixes #336, #333 and will make progress with #337. Once merged we can move much fast to modernize the codebase.

Peering will work between old versions of zetta and this version and vise-versa.

Major Changes to Spdy

There were also changes in ws that broke getting the request url from the ws object. Instead we need to pass the original request to the PeerSocket.

AdamMagaluk and others added 28 commits November 29, 2017 21:31
…ient.

Fix issue with stream deduping when finding intenral remote port in the spdy internals.
Updates to the WS cause it to return a 400 instead of a 404 when
the base path does not match.
…ribe's cb

to fire a second time. Wrap cb in a once pattern.

PeerSocket guard against this.ws not being initialized when closing the connection
Our tests are scheduling async operations and calling done. We
need to clean this up but with the old version of mocha it was
exiting the test suite after all tests were done. This enforces
the old behavior.
This ensures zetta hubs running pre spdy-upgrade will be compatible
at a network level. To support `h2` we need to negotiate transport
and ALPN cannot help us.
@google-cla
Copy link

google-cla bot commented Dec 18, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@AdamMagaluk AdamMagaluk merged commit f34dca1 into zettajs:master Aug 15, 2024
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.

spdy issue
1 participant