Skip to content

Commit 0a26494

Browse files
committed
Merge pull request #197 from cydjudge/master
changing port 11212 to 11211
2 parents dfb26c4 + 7a33a86 commit 0a26494

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,23 @@ can work with it. You can either use:
4747

4848
1. **String**, this only works if you have are running a single server instance
4949
of Memcached. It's as easy a suppling a string in the following format:
50-
`hostname:port`. For example `192.168.0.102:11212` This would tell the client
51-
to connect to host `192.168.0.102` on port number `11212`.
50+
`hostname:port`. For example `192.168.0.102:11211` This would tell the client
51+
to connect to host `192.168.0.102` on port number `11211`.
5252

5353
2. **Array**, if you are running a single server you would only have to supply
5454
one item in the array. The array format is particularly useful if you are
5555
running a cluster of Memcached servers. This will allow you to spread the keys
5656
and load between the different servers. Giving you higher availability
5757
when one of your Memcached servers goes down.
5858

59-
3. **Object**, when running a cluster of Memcached servers, some servers may allocate different amounts of memory, e.g. 128, 512, and 128mb. While by default all servers are equally important and dispatch consistently the keys between the servers (33/33/33%), it is possible to send more keys in servers having more memory. To do so, define an object whose `key` represents the server location and whose value represents a server weight, the default weight for a server being 1; so, for instance `{ '192.168.0.102:11212': 1, '192.168.0.103:11212': 2, '192.168.0.104:11212': 1 }` distributes 50% of the keys on server 103, but only 25% on 104 and 25% on 102.
59+
3. **Object**, when running a cluster of Memcached servers, some servers may allocate different amounts of memory, e.g. 128, 512, and 128mb. While by default all servers are equally important and dispatch consistently the keys between the servers (33/33/33%), it is possible to send more keys in servers having more memory. To do so, define an object whose `key` represents the server location and whose value represents a server weight, the default weight for a server being 1; so, for instance `{ '192.168.0.102:11211': 1, '192.168.0.103:11211': 2, '192.168.0.104:11211': 1 }` distributes 50% of the keys on server 103, but only 25% on 104 and 25% on 102.
6060

6161
To implement one of the above formats, your constructor would look like this:
6262

6363
```js
64-
var memcached = new Memcached({ '192.168.0.102:11212': 1, '192.168.0.103:11212': 2, '192.168.0.104:11212': 1 });
65-
var memcached = new Memcached([ '192.168.0.102:11212', '192.168.0.103:11212', '192.168.0.104:11212' ]);
66-
var memcached = new Memcached('192.168.0.102:11212');
64+
var memcached = new Memcached({ '192.168.0.102:11211': 1, '192.168.0.103:11211': 2, '192.168.0.104:11211': 1 });
65+
var memcached = new Memcached([ '192.168.0.102:11211', '192.168.0.103:11211', '192.168.0.104:11211' ]);
66+
var memcached = new Memcached('192.168.0.102:11211');
6767
```
6868

6969
### Options
@@ -91,7 +91,7 @@ Memcached server uses the same properties:
9191
Example usage:
9292

9393
```js
94-
var memcached = new Memcached('localhost:11212', {retries:10,retry:10000,remove:true,failOverServers:['192.168.0.103:11212']});
94+
var memcached = new Memcached('localhost:11211', {retries:10,retry:10000,remove:true,failOverServers:['192.168.0.103:11211']});
9595
```
9696

9797
If you wish to configure the options globally:
@@ -294,7 +294,7 @@ confirm the server_locations specification.
294294
* `callback`: *Function*, The callback function that receives the net.Stre
295295

296296
``` js
297-
memcached.connect( '192.168.0.103:11212', function( err, conn ){
297+
memcached.connect( '192.168.0.103:11211', function( err, conn ){
298298
if( err ) throw new Error( err );
299299
console.log( conn.server );
300300
});
@@ -439,7 +439,7 @@ issues occur.
439439
Example implementations:
440440

441441
```js
442-
var memcached = new Memcached([ '192.168.0.102:11212', '192.168.0.103:11212' ]);
442+
var memcached = new Memcached([ '192.168.0.102:11211', '192.168.0.103:11211' ]);
443443
memcached.on('failure', function( details ){ sys.error( "Server " + details.server + "went down due to: " + details.messages.join( '' ) ) });
444444
memcached.on('reconnecting', function( details ){ sys.debug( "Total downtime caused by server " + details.server + " :" + details.totalDownTime + "ms")});
445445
```

0 commit comments

Comments
 (0)