I have M web app servers (with the same app on them, shared-nothing), behind a load balancer. The app running requires heavy caching, so I would like to have N cache servers behind (using Memcached).
I would like to use consistent hashing, so I could easily add/remove cache servers. As far as I know, consistent hashing is implemented at the Memcache client level (eg. when calling addServer/removeServer, in case Memcached is set in consistent hashing mode, keys are balanced between the remaining instances). However, in this case I have M clients (the webservers that access the cache instances)
How would I be able to handle the independent scaling between the web servers and cache servers without using an additional system as proxy (between the web servers and the cache servers), that would be able to locate the cache server given the initial key? How would any of my web servers (configured the same) know how to access the right cache server given the key?
What would be the best practice for this?