Call server functions with the manifest hash #19
Replies: 1 comment 1 reply
-
|
This is great proposal. I've noticed this issue with qwik.dev site where I have it open in one tab for couple of days and then when I go to that tab after some time and want to use search, it simply doesn't work, probably because it was skewed. Then, I have to manually refresh page for it to work. However, I don't know how Qwik can work on this, but step 3
instead of refusing, should be able to find server instance and use it so that users don't notice anything. This is largely dependent on the infrastructure and developers should make sure they have multiple server instances running and they should probably have load balancer that would decide where to redirect incoming request. Have you considered doing something like this, or at least providing a way for users to use version hash so they can build their infrastructure around it? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is it about?
Prevent version skew in deployments
What's the motivation for this proposal?
Problems you are trying to solve:
Goals you are trying to achieve:
Any other context or information you want to share:
I believe Vercel or Next can do skew control based on headers.
Proposed Solution / Feature
What do you propose?
Every call to the server should include a token that encodes the client version/deployment. It should default to the manifest hash.
This can then be used on the server side to decline calls from different tokens.
This doubles as a mechanism to always route clients to the same deployment.
Note, 4. should happen as little as possible. Devs should ensure that clients can keep talking to compatible servers while notifying them they should reload, or silently reloading when the time is right.
Passing your own token also allows overriding the mechanism, so that a single server can handle multiple versions. This obviously means that the dev is responsible for version mismatches in action handling.
Links / References
https://vercel.com/blog/version-skew-protection
Beta Was this translation helpful? Give feedback.
All reactions