memcached - Memcache automatic horizontal scaling -
we have scenario 2 web servers , 2 memcache servers. memcache server nodes configured within configuration files on each web server.
in order automatically horizontally scale web servers need able automatically horizotally scale memcache servers. not able due memcache nodes being defined in web configuration files.
what best way automatically horizontally scale memcache servers least impact on system.
you can try mcrouter.
what mcrouter?
it memcached protocol router used @ facebook handle traffic of cache servers across dozens of clusters distributed in facebook data centres around world.
how scaling happens?
to adding new server in cluster, adding ip entry in route config file. 'mcrouter' automatically detects , add cluster consistent hashing.
the config file looks below, 2 servers entries.
{ "pools": { "a": { "servers": [ "server1_ip:11211", "server2_ip:11211" ] } }, "route": { "type": "operationselectorroute", "operation_policies": { "add": "allsyncroute|pool|a", "delete": "allsyncroute|pool|a", "get": "randomroute|pool|a", "set": "allsyncroute|pool|a" } } } hope helps!
Comments
Post a Comment