Hi everybody,
How do you handle replacing/adding/removing memcached nodes in your production applications?
I will have a number of applications that are cloned and customized due to each customers need running on one and same webserver, so i'll guess that there will be a day when some of the nodes will be changed.
Here's how memcached is populated by normal:
$m = new Memcached();
$servers = array(
array('mem1.domain.com', 11211, 33),
array('mem2.domain.com', 11211, 67)
);
$m->addServers($servers);
My initial idea, is to make the $servers array to be populated from the database, also cached, but file-based, done once a day or something, with the option to force an update on next run of the function that holds the $addservers call. However, I am guessing that this might add some additional overhead since disks are quite slow storage...
What do you think?