문제

I'm going to run PHP sessions off an Elasticache Cluster.

The site is dating so its not mission critical.

I'm a touch concerned about nodes dying and being replaced, maintenance windows and availability zone outages which all result in sessions ending, people being logged out and at worst the site not working at all.

I've read about having a second cache cluster in another availability zone. What are peoples thoughts on writing to 2 elasticache clusters at once and how could the site be setup to automatic failover?

Are there any tricks here that can be used to improve session availability?

** Extra Question: how would the performance of DynamoDB compare for session handling?

도움이 되었습니까?

해결책

I've used both DynamoDB and Elasticache for session storage purposes, depending on the needs of the service. Typically, I have used Elasticache for non-critical session storage or cases where I have set an application to have a very short session expiry such that the number of users that could be impacted by an outage might be relatively small.

For more critical storage (e-commerce sessions for example) or sessions that might be set for longer lifetimes to aid in user convenience, I have opted for Dynamo. Obviously, Dynamo is typically slower than Elasticache, but still very suitable for session storage, especially at high volumes where you can guarantee your read/write throughput (as opposed to traditional database-backed sessions).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top