We have two sets or pools of memcached, and would like to use mcrouter for scaling our memcached deployments as well as provide us with HA protection. Memcached hosts in each pool should have the same data.
I have setup 2 mcrouters to perform routes as well as HA protection just for testing purposes. The mcrouter config file on each mcrouter server looks like this:
{
"pools": {
"memcache-event": {
"servers": [
"10.1.9.100:11211",
"10.1.9.101:11211"
]
},
"memcache-notification": {
"servers": [
"10.1.9.200:11211",
"10.1.9.201:11211"
]
},
"route": {
"type": "OperationSelectorRoute",
"operation_policies": {
//***routes for hosts in the event pool***
"add": "AllSyncRoute|Pool|memcached-event",
"delete": "AllSyncRoute|Pool|memcached-event",
"get": "LatestRoute|Pool|memcached-event",
"set": "AllSyncRoute|Pool|memcached-event"
//***routes for hosts in the notification pool***
"add": "AllSyncRoute|Pool|memcached-notification",
"delete": "AllSyncRoute|Pool|memcached-notification",
"get": "LatestRoute|Pool|memcached-notification",
"set": "AllSyncRoute|Pool|memcached-notification"
}
}
The mcouters are both up and running, and can telnet to a memcached host from an mcrouter server with a command like this for example:
telnet 10.1.9.100 11211
However, i would like to know 2 things:
With my config above, how can i access a memcached server using the mcrouter routes? I am basically trying to see an example of how routes in mcrouter are used to access memcached.
How can i check that my mcrouters are working as a cluster? How can i check that they are communicating?