Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(router): add optional query string affinity support
To be enabled with extreme prejudice. Twelve-factor processes should be stateless and share-nothing. Sticky sessions should not be used to cache user data in memory. Use a backing store to persist session state. Valid uses, however, do exist and are widespread: eg. see primus/primus#147 > HTTP implementations are expected to engage in connection management, > which includes maintaining the state of current connections, > establishing a new connection or reusing an existing connection, > processing messages received on a connection, detecting connection > failures, and closing each connection. > <cite>[RFC 7230]</cite> Many real time systems rely on detection of connection failures at the application level. Without session affinity, detection of connection failures stops at the load balancer and causes undesirable side-effects for many implementations. For instance, the Google BrowserChannel implementation that may have led @zag2art to deis#2060 relies on detection of connection failures, as does socket.io Care should be taken when using this setting in conjunction with a 3rd party Layer-7 load balancer. At this time, Amazon's ELB and Rackspace's Cloud Load Balancer, for instance, only support cookie-based affinity which must be manually enabled. Many OSI Layer-4 load balancers, such as the Azure Load Balancer and GCE Network Load Balancing, currently perform [RFC 2474] 5-tuple "microflow" hashing by default. [RFC 2474]: https://tools.ietf.org/html/rfc2474 [RFC 7230]: https://tools.ietf.org/html/rfc7230
- Loading branch information