Commit 92a5549
Alexander Wenzowski
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 #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/rfc72301 parent 1a16562 commit 92a5549
2 files changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
| 146 | + | |
| 147 | + | |
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
| |||
0 commit comments