July 2, 2021
Envoy Session Persistence
什么是会话保持 我们可以从这篇文章了解到 从上面的文章中截取一些要点:
The difference between persistence and affinity
Affinity: this is when we use an information from a layer below the application layer to maintain a client request to a single server
Persistence: this is when we use Application layer information to stick a client to a single server
sticky session: a sticky session is a session maintained by persistence
也就是说 affinity 是一种利用应用层以下的将请求映射到一个 server 的方式。而 persistence 是利用应用层的信息让来自一个 client 的请求都"粘"在一个 server 上。Affinity 不保证会话一定能保持,而 persistence 可以。
Read more