Facebook 和无状态服务器
我正在制作一个 Facebook 应用程序,我想要一个无状态服务器。Facebook 连接请求来自服务器端。因此,当 Facebook 给我一个必须在服务器上维护的会话时,这样我的服务器就不会是无状态的。
当我进行负载平衡时,我不能有一个简单的负载平衡器,而是需要知道哪些用户位于哪个服务器上,这是我不想要的。
有什么想法吗?
I am making a Facebook application, I want to have a stateless server.The Facebook connect requests are from the server side. So when Facebook gives me a session which has to be maintained at the server this way my server won't be stateless.
When I'll load balance I can't have a simple load balancer instead it would need to know which users are on which server, something I don't want.
Any Ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以根据您的应用程序使用情况采用以下任何方法:
You can go with any of the following approaches depending upon your application usage:
假设您可以在网页之间传递令牌,一种选择是使用该令牌将状态存储在数据库中。这将使事情独立于网络服务器本身。
Assuming you can pass a token between web pages, one option is to store the state in a database using that token. That'll keep things independent of the webserver itself.