Closed mancdaz closed 10 years ago
Are you advocating not having it in the LB at all, or just changing it's config to a active/backup/backup model?
in our spec the first memcahced server is the primary and all others are backups, so as long as the primary never goes down you'd only every be communicating with the one memcached server. Presently this has been implemented in our HAProxy play as well as the the F5 config generator script.
This is the HAproxy configuration "https://github.com/rcbops/ansible-lxc-rpc/blob/master/rpc_deployment/vars/config_vars/haproxy_config.yml#L150-L156" which was replicated in the f5 config generator script.
@claco @cloudnull why not use all available memcache servers the way it was meant to be
In open to suggestions. What did you have in mind?
That seems sensible to me. Make it go. :)
Normally memcached will place items using consistent hashing. This means that puts and gets of an item will always hit the same memcached server, so after the first put of the item it will always be found.
If hitting the load balancer, there is no control over where the item ends up. Subsequent gets may hit the memcached server that did not get the item in the first place, so the item is added to that servers cache. This is inefficient in terms of access times, but also in terms of memory usage since each node will effectively be acting independently rather than as a member of a cluster.