Oh, and Route53 doesn't do anything automatically, but there is an API to manage the DNS. It's up to you to run a task on instance boot/terminate, or a cron job if you want to do this trick (for now, seems like a solid future feature of Route53). Though, I hear geographical aware Route53 is already in the works (to route EC2 traffic to the closest region).
will On Wed, Apr 27, 2011 at 9:33 AM, William Oberman <ober...@civicscience.com>wrote: > I don't think of it as migrating an instance, it's more of a destroy/start > with EC2. But, I still think it would be very useful to spin up a set of > instances with known hostnames (cassandra1, 2, 3... N) and be able to > quickly SSH to them by doing "ssh > ec2u...@cassandra1.random.ec2.mydomain.com". > > Also, it makes finding seeds a lot easier, as you don't have to manage IPs > in the config file, just names (cassandra-seed1.random.ec2.mydomain.com). > > I should have mentioned it, but people that are already doing this trick > (I'm not... yet) are actually doing: hostname.region.ec2.mydomain.com (as > it's useful to know the region). I don't anything cares about AZ, but you > could embed that too if it matters. > > will > > > On Wed, Apr 27, 2011 at 9:26 AM, Sasha Dolgy <sdo...@gmail.com> wrote: > >> if you migrate the instance, does Route53 automatically re-map all the >> information to the new ec2 instance? another issue is that cassandra >> only maintains the IP of the other nodes, and not the hostname >> (assumed based on output of the nodetool ring) ... >> >> which means, if you migrate the instance and Route53 does do some >> auto-magic .. the private ip for the instance will have changed and >> you will need to migrate that node back into the ring, while moving >> the old referenced IP out ... we've had quite a lot of pain with this >> in the past. rule of thumb, if you want to upgrade / migrate an >> instance, you need to remove it from the ring, do your work, bootstrap >> it back to the ring .. i think this could be avoided if cassandra >> maintained hostname references and not just IP references for nodes. >> >> -sasha >> >> On Wed, Apr 27, 2011 at 2:56 PM, William Oberman >> <ober...@civicscience.com> wrote: >> > While I haven't configured it for multi-region yet, Sasha is exactly >> right >> > now how amzon's DNS works (returning private vs. public IP depending on >> if >> > the machine is local to the region or not). For extra fun, now that >> Route53 >> > exists you can (somewhat trivially) map and dynamically maintain all EC2 >> > instances to stable DNS names (but make sure to use CNAMEs to get the >> DNS >> > magic!). E.g. >> > cassandra1.somethinghardtoguess.ec2.yourdomain.com -> >> > weird.ec2.public.dns.name >> > >> > I'd drop in the somethinghardtoguess myself given Route53 can expose >> your >> > internal network topology if someone can guess the DNS name. >> > >> > will >> > > > > -- > Will Oberman > Civic Science, Inc. > 3030 Penn Avenue., First Floor > Pittsburgh, PA 15201 > (M) 412-480-7835 > (E) ober...@civicscience.com > -- Will Oberman Civic Science, Inc. 3030 Penn Avenue., First Floor Pittsburgh, PA 15201 (M) 412-480-7835 (E) ober...@civicscience.com