Redis (1.11) Redis cluster to build a distributed cluster

The concept and understanding: Redis (1.7) Redis high availability architecture (theory section)

[0] test environment

Structure is as follows:

  

(Tested here is not so much a machine, build a test on three machines)

redis1 is a redis cluster node A, above redis running two instances, 70017004

Node B is a redis redis2 cluster, running above two redis example, 70027005

C is a redis redis3 node cluster, the above two running redis example, 70037006

- Test cluster includes A / B / C A1 / B1 / C1 6 nodes

  A, B, C corresponding to the primary node Redis instance: 700170027003

  A1, A2, A3 master node from the library, the corresponding Redis instance: 700470057006

- cross-built from the master node, a correspondence relationship

  【A > B】  【B>C】  【C>A1】

    A:192.168.135.173

    B:192.168.135.174

    C:192.168.135.175

- IP and port distribution:

cluster1:

  Main: 192.168.135.173 7001 /data/redis/redis-cluster/nodes-7001/redis.conf

  Preparation: 192.168.135.174 7005 /data/redis/redis-cluster/nodes-7005/redis.conf

cluster2:

  Main: 192.168.135.174 7002 /data/redis/redis-cluster/nodes-7002/redis.conf

  Preparation: 192.168.135.175 7006 /data/redis/redis-cluster/nodes-7006/redis.conf

cluster3:

  Main: 192.168.135.175 7003 /data/redis/redis-cluster/nodes-7003/redis.conf

  Preparation: 192.168.135.175 7004 /data/redis/redis-cluster/nodes-7004/redis.conf

- external connection policy

  Outer end may use F5, keepalived + haproyx result, achieve load balancing 2 (3 write master reads three prepared)

 

Guess you like

Origin www.cnblogs.com/gered/p/11771601.html