Redis setup for scaling AH to multiple hosts

瀏覽次數:23 次
跳到第一則未讀訊息

Peter Kingsbury

未讀,
2015年9月30日 晚上8:10:462015/9/30
收件者:actionHero.js
Hi all,

What is the best practise for configuring Redis for use across 2+ hosts, each with an AH instance?

My options, as I see them, are:
1) Connect each AH instance to the same Redis instance (e.g. server1+ah1+redis1, and server2+ah2+redis1) (see Cluster Topology from AH docs).
2) Connect each AH instance to its own Redis instance, and connect each Redis instance as a replication master or slave (see Replication, available since Redis 2.8) with slave write-enabled.
3) Connect each AH instance to its own Redis instance as #2, but using the newer Redis 3.0 clustering capabilities (see Redis Cluster Tutorial).
4) Another method? Sentinel? Haven't explored this yet.

I've had some early success with #2, I'll be building out an application based on this configuration. Nodes join/leave as anticipated, chatroom is under investigation next.

I was wondering what the best practise was for multi-host AH, what experiences folks might have had, and what pitfalls they might have encountered.

Thanks,
- Peter

Evan Tahler

未讀,
2015年9月30日 晚上8:14:062015/9/30
收件者:actionHero.js
I've run a ~20 node cluster, each with 4x actionhero servers (cluster) all connecting to 1 redis server with no throughput problems.    For resilient setups, I usually have 3 redis servers, running in master-slave-slave, each also running a sentinel process.    

Unless you have a dataset that requires more RAM than can fit on 1 host, I suggest you do not use cluster, as it ads latency to each get/set.
回覆所有人
回覆作者
轉寄
0 則新訊息