You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When some kind of async database replica is in place, having the same client connecting to the same backend is the best solution to avoid incongruences in responses (mainly caused by sync gaps)
Sticky sessions are a common technique, but as always i want to give them to uWSGI users with little effort from a code-changing point of view.
My idea is setting a cookie in the fastrouter with the address of the backend (encrypted).
The encrypted blob should contain the ip address of the client, the backend node (obviously), a random IV and should support different kind of keys (from preshared keys to the same certificate used by the secured subscription system)
If the fastrouter find the cookie already set in the request it will simply decrypt it and use the supplied address.
Obviously an api function could be added (like uwsgi.sticky()) to generate the encrypted blob from the app only for the requests requiring it.
The text was updated successfully, but these errors were encountered:
When some kind of async database replica is in place, having the same client connecting to the same backend is the best solution to avoid incongruences in responses (mainly caused by sync gaps)
Sticky sessions are a common technique, but as always i want to give them to uWSGI users with little effort from a code-changing point of view.
My idea is setting a cookie in the fastrouter with the address of the backend (encrypted).
The encrypted blob should contain the ip address of the client, the backend node (obviously), a random IV and should support different kind of keys (from preshared keys to the same certificate used by the secured subscription system)
If the fastrouter find the cookie already set in the request it will simply decrypt it and use the supplied address.
Obviously an api function could be added (like uwsgi.sticky()) to generate the encrypted blob from the app only for the requests requiring it.
The text was updated successfully, but these errors were encountered: