TL; DR--應該在應用的服務器上(即與nginx和php一起)還是在其自己單獨的ec2實例(如elasticache或定製的ec2實例)上存在用於會話存儲的簡單緩存羣集(使用memcache或redis)?我的緩存守護進程應該在哪裏生存?
我正在使用Amazon OpsWorks來設置我的Web應用程序的基礎結構。我傾向於通過安裝在應用層本身上的memcache實例來實現會話緩存,而不是將其作爲自己的ec2實例。例如:
[ Load Balancer ]
/ | \
[ App Layer 1 ] – [ App Layer 2 ] – [ App Layer 3 ] * /w memcache or redis
與
[ Load Balancer ]
/ | \
[ App Layer 1 ] [ App Layer 2 ] [ App Layer 3 ]
\ | /
[ Cache Server(s) ] * ElastiCache or custom ec2 /w memcache or redis
哪些優點和缺點嗎?對我來說,後面的解決方案看起來沒有必要,但我可以看到具有非常大的會話緩存的高流量網站可能需要這樣做。
是否有我可能不想在我的nginx/php應用服務器堆棧旁邊運行redis或elasticache的原因?它是否會使自動縮放或監視性能更難以做到?
用於ASCII圖表技巧的+1! –