Re: DNS vs IP
We are doing the same thing as you on EC2, but we are using Dynamic DNS DDNS with a script that updates dns memcached.xxx.com with the new ip when the server boots. checkout http://www.dnsmadeeasy.com/ look at their DDNS and scripts. everything you want is there, cheap, simple, it works. On Oct 6, 6:41 pm, Edward M. Goldberg edwardmgoldb...@gmail.com wrote: I have used Memcached in EC2 now for many deployments and I am seeing issues with DNS names used for Memcache access: 10.1.2.3:11211 vs. memcache.0.my-name.net:11211 I have set the TTL very low to provide for fail over from one server to the next, when new instances are launched. Does anyone have ideas on how I can get the same Fail Over I enjoy from DNS? What do you see as the impact of DNS look ups on Memcache service? I see /etc/hosts as one solution that keeps the code the same. But updates are hard to distribute... What are your thoughts, solutions? Edward M. Goldberghttp://myCloudWatcher.com/
Re: DNS vs IP
Yes, I use DNS Made Easy for this use: 1) Create an A Record for each Memcached server with the SAME name memcached.domain.com 2) Create an A Record for each Memcached server with a UNIQUE name memcache.00.domain.com Then do: $ dig +short memcache.domain.com # This returns -- 10.0.0.1 10.0.0.2 10.0.0.3 ... This gets the list of Memcache servers by IP, You can also use the unique names for DNS Access. Or just use the Ip values as you like. As I add more server to Scale-Up the DIG command just returns more addresses. So the idea scales. The A records as DNSMadeEasy can be updated with DDNS API calls. I like the performance, but have had issues with DNS performance. I just wanted feedback as to other system level users do this scale- up operation in production. Pushing new code works for some users. But lacks a dynamic update for OPs needs. Edward M. Goldberg http://myCloudWatcher.com/
Re: DNS vs IP
DRBD really doesnt make sense for memcached, since memcached doesnt hit the disk. What you really need is a way to keep the memcached memory arena (mostly) in sync between the pair. There is an open source patch, but it's old and has problems. There is also a commercial solution that does it. There's an open source one that works just fine, and is supported in a main library: http://blogs.sun.com/trond/date/20090625 -Dormando
Re: DNS vs IP
If code push is your issue, make code push easier... In that I mean you don't have to push full code for twiddling something like the list of memcached's. Split the list of servers off into a seperate source file that's included, then give ops the ability to push those subsets of files quickly and easily. Don't have your app code pushes overwrite them either. -Dormando On Wed, 7 Oct 2009, Edward M. Goldberg wrote: Yes, I use DNS Made Easy for this use: 1) Create an A Record for each Memcached server with the SAME name memcached.domain.com 2) Create an A Record for each Memcached server with a UNIQUE name memcache.00.domain.com Then do: $ dig +short memcache.domain.com # This returns -- 10.0.0.1 10.0.0.2 10.0.0.3 ... This gets the list of Memcache servers by IP, You can also use the unique names for DNS Access. Or just use the Ip values as you like. As I add more server to Scale-Up the DIG command just returns more addresses. So the idea scales. The A records as DNSMadeEasy can be updated with DDNS API calls. I like the performance, but have had issues with DNS performance. I just wanted feedback as to other system level users do this scale- up operation in production. Pushing new code works for some users. But lacks a dynamic update for OPs needs. Edward M. Goldberg http://myCloudWatcher.com/