简体   繁体   English

FOSUserBundle在Elastic Beanstalk中不起作用

[英]FOSUserBundle not working in Elastic Beanstalk

I have a website that has a lot of traffic and the nature of the website means that it can have a lot of requests in a specific time period. 我有一个流量很大的网站,该网站的性质意味着在特定时间段内可能会有很多请求。

I use amazon beanstalk to manage the load balancer and instances. 我使用亚马逊beantalk来管理负载均衡器和实例。

I can have up to 20 instances running and because FOSUserBundle uses Sessions to hold the data I am loosing users logins etc. 我最多可以运行20个实例,并且因为FOSUserBundle使用会话来保存数据,所以我失去了用户登录名等。

I know EB has stickiness but due to the nature of the site it gets overwhelmed and sometimes doesnt forward the correct user to the correct instance so I am loosing users again. 我知道EB具有粘性,但是由于网站的性质,它变得不知所措,有时无法将正确的用户转发给正确的实例,因此我再次失去了用户。 Amazon are no help at all. 亚马逊根本没有帮助。

Is there a way to override this to use secure cookies (i know cookies arent secure but I could create my own crypt/decrypt method) 有没有一种方法可以覆盖它以使用安全cookie(我知道cookie没有安全性,但是我可以创建自己的crypt / decrypt方法)

Any suggestions would be helpful :) 任何的意见都将会有帮助 :)

I found away to essentially negate the sessions stored on one server. 我发现实际上可以否定存储在一台服务器上的会话。 I remember doing this with a custom php system (using this php net session I built a few years ago but did not think it would work with symfony. Since posting this questions I found PdoSessionStorage basically storing your sessions on a Database instead of files on the server or instances. 我记得用一个自定义的php系统(使用几年前建立的这个php net会话进行此操作,但认为它不能与symfony一起使用。由于发布了这个问题,我发现PdoSessionStorage基本上将您的会话存储在数据库中而不是文件中)服务器或实例。

Please choose your syfmony version as namespaces sometimes change version to version 请选择您的syfmony版本,因为命名空间有时会将版本更改为version

Link to PdoSessionStorage on Symfony 链接到Symfony上的PdoSessionStorage

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM