如何同步使用亚马逊网络服务(AWS)的会议? [英] How to synchronize sessions using Amazon Web Services (AWS)?
问题描述
我们正在使用亚马逊网络服务(AWS),我们有多个Web服务器和负载平衡器。与该web服务器的问题是,在$ _SESSION是唯一的每个之一。我保持约在$ _SESSION用户的一些信息。
We're using Amazon Web Services (AWS) and we have multiple web servers and a load balancer. The problem with the web servers is, that the $_SESSION is unique for each one. I'm keeping some information about the user in the $_SESSION.
什么是正确的方式来同步这些信息?有没有什么办法可以团结的地方,在那里这些会议都被保留,或者我应该使用MySQL来存储这些数据(我真的不喜欢最后一个选项)?
What is the proper way to synchronize this information? Is there any way to unite the place, where those sessions are being kept, or should I use MySQL to store this data (I don't really like the last option)?
推荐答案
我想你要找的是粘性会话。如果我是对的,亚马逊为您提供了两种不同的选择。
I think what you are looking for is 'Sticky Sessions'. If I'm right about that, Amazon gives you two different options.
负载均衡(持续时间为基础的,我推荐这一个)<一href="http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_StickySessions.html#US_EnableStickySessionsLBCookies" rel="nofollow">http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_StickySessions.html#US_EnableStickySessionsLBCookies
Load Balancer(duration-based, I recommend this one) http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_StickySessions.html#US_EnableStickySessionsLBCookies
和基于应用程序会话粘性 <一href="http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_StickySessions.html#US_EnableStickySessionsAppCookies" rel="nofollow">http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_StickySessions.html#US_EnableStickySessionsAppCookies
And application based session stickiness http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_StickySessions.html#US_EnableStickySessionsAppCookies
这篇关于如何同步使用亚马逊网络服务(AWS)的会议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!