Skip to content

Commit 585c815

Browse files
Improve README docs on new HA and load balancing features. Fixes #112
1 parent 6f52bfc commit 585c815

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,23 +97,24 @@ Example configuration:
9797
</backend_options>
9898
</cache>
9999

100-
### HAProxy
100+
### Load Balancer or Service Discovery
101101

102-
It is also possible to achieve high availability by using HAProxy with checks configured to only route connections to the
103-
master. You can also optionally achieve load balancing in this scenario with a separate HAProxy config which allows connections to
104-
all healthy nodes, or by using technologies like Docker Swarm Mode's "Virtual IP" or any other DNS-based service discovery
105-
that uses round-robin DNS. The `load_from_slave` option has been added for this purpose and this option does *not*
102+
It is also possible to achieve high availability by using other methods where you can specify separate connection addresses for the
103+
master and slave(s). The `load_from_slave` option has been added for this purpose and this option does *not*
106104
connect to a Sentinel server as the example above, although you probably would benefit from still having a Sentinel setup purely for
107105
the easier replication and failover.
108106

107+
Examples would be to use a TCP load balancer (e.g. HAProxy) with separate ports for master and slaves, or a DNS-based system that
108+
uses service discovery health checks to expose master and slaves via different DNS names.
109+
109110
Example configuration:
110111

111112
<!-- This is a child node of config/global -->
112113
<cache>
113114
<backend>Cm_Cache_Backend_Redis</backend>
114115
<backend_options>
115-
<server>tcp://redis-master-haproxy:6379</server>
116-
<load_from_slave>tcp://redis-slaves-haproxy:6379</load_from_slave>
116+
<server>tcp://redis-master:6379</server>
117+
<load_from_slave>tcp://redis-slaves:6379</load_from_slave>
117118
<timeout>0.5</timeout>
118119
</backend_options>
119120
</cache>
@@ -153,6 +154,7 @@ Example configuration:
153154

154155
## Release Notes
155156

157+
- March 2017: Added support for Redis Sentinel and loading from slaves. Thanks @Xon for the help!
156158
- Sometime in 2013: Ceased updating these release notes...
157159
- November 19, 2012: Added read_timeout option. (Feature only supported in standalone mode, will be supported by phpredis when pull request #260 is merged)
158160
- October 29, 2012: Added support for persistent connections. (Thanks samm-git!)

0 commit comments

Comments
 (0)