a year ago
Sticky sessions ensure that a user's requests are consistently routed to the same server in horizontal scaling. This maintains stateful interactions, such as user authentication, across multiple requests. Without sticky sessions, users might be directed to different servers that lack their session data, causing inconsistencies and a poor user experience.
Railway does not support sticky sessions, as noted in their horizontal scaling documentation: https://docs.railway.app/guides/optimize-performance#load-balancing-between-replicas.
I suggest adding this feature. While session storage in Redis is an option, it requires understanding how to implement it in your app and how your framework handles sessions. For instance, in my experience developing Meteor apps, managing sessions with Redis within this framework can be complex. Given that Meteor operates on Nodejs and is single-core, scaling applications requires replication. Consequently, using sticky sessions could greatly enhance the scalability of any Nodejs application at scale.
I don't need sticky sessions right now, but I'd like to request them in Railway to simplify horizontal scaling for any app. Other users might already be interested. If it's easy to implement with the new proxy, it could save time and benefit projects that need it at scale.