Who is Who
Using Redis to store Laravel sessions is a good idea. But be sure to allocate an instance large enough, especially if you use it also for caching pourposes.
AWS Elasticache graphs are not eloquent enough about you effective memory usage. Querying the instance with redis-cli
seems to be more effective.
# redis-cli -h myinstance.euc1.cache.amazonaws.com INFO
[snip]
# Memory
used_memory:5138487144
used_memory_human:4.79G
used_memory_rss:6086615040
used_memory_rss_human:5.67G
used_memory_peak:5143767664
used_memory_peak_human:4.79G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:5140907060
maxmemory_human:4.79G
maxmemory_policy:volatile-lru
mem_fragmentation_ratio:1.18
mem_allocator:jemalloc-4.0.3
[snip]
Of course, used_memory_human
have to be smaller than maxmemory_human
. If those have the same value, you may have some issue and your Laravel sessions begin to expiry well before the expected interval, kicking your users out from the application.