Skip to content

Commit 77b5c3a

Browse files
committed
Edited README.markdown via GitHub
1 parent e7c2775 commit 77b5c3a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.markdown

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Distributed Memcached Caching
7474
Here is a simple example demonstrating a distributed memcached caching mechanism built atop this module. Suppose we do have three different memcacached nodes and we use simple modulo to hash our keys.
7575

7676

77-
server {
77+
http {
7878
upstream moon {
7979
server 10.62.136.54:11211;
8080
}
@@ -88,7 +88,9 @@ Here is a simple example demonstrating a distributed memcached caching mechanism
8888
}
8989

9090
upstream_list universe moon earth sun;
91-
91+
}
92+
93+
server {
9294
memc_connect_timeout 100ms;
9395
memc_send_timeout 100ms;
9496
memc_read_timeout 100ms;
@@ -131,11 +133,12 @@ To maximize speed, we often enable TCP connection pool for our memcached upstrea
131133

132134
upstream moon {
133135
server 10.62.136.54:11211;
136+
server unix:/tmp/memcached.sock;
134137
keepalive 512 single;
135138
}
136139

137140

138-
where we define a connection pool which holds up to 512 keep-alive connections for our `moon` upstream.
141+
where we define a connection pool which holds up to 512 keep-alive connections for our `moon` upstreams.
139142

140143
Directives
141144
==========

0 commit comments

Comments
 (0)