allow control of EC2 elastic IPs

Bug #437877 reported by Arjen Lentz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-mmm
New
Undecided
Unassigned

Bug Description

MMM1 docu notes that EC2 does not support virtual IPs; this is outdated info (at least since March 2008).
See http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1346 for info and full docu.

In a nutshell: at EC2 the concept is called Elastic IPs, and there are commands to control them, once allocated.
All MMM2 needs to do it use those commands rather than its default arp response magic.
This can be used for the writer as well as the reader roles.

Revision history for this message
Arjen Lentz (arjen-lentz) wrote :

Addendum... since there's already a hook for DNS control, perhaps a generic interface to allow multiple methods would be the way to go.

For the EC2 elastic IPs, apparently
 - it's classified as "out-of-datacentre" traffic and thus charged.
 - it's slightly slower, leading me to believe they might proxy it rather than assigning the IP to an instance.

Another method is to not use DNS but /etc/hosts and update it at high frequency.
With a generic interface we can add a few methods to choose from as appropriate.

Revision history for this message
Toby Thain (qu1j0t3) wrote :

I glanced at the source and would probably do it like this:
- add a configuration option to "override" the operating system ($OSNAME) value as interface type, to e.g. 'ec2'
- along with the existing 'linux' and 'solaris' commands, add the magic for 'ec2'
If this approach is OK I can make these changes.

Revision history for this message
Arjen Lentz (arjen-lentz) wrote : Re: [Bug 437877] Re: allow control of EC2 elastic IPs

Hi Toby

On 06/10/2009, at 11:40 PM, Toby Thain wrote:
> I glanced at the source and would probably do it like this:
> - add a configuration option to "override" the operating system
> ($OSNAME) value as interface type, to e.g. 'ec2'
> - along with the existing 'linux' and 'solaris' commands, add the
> magic for 'ec2'
> If this approach is OK I can make these changes.

Hmm no, because cloud/hosting vendors can run different OS/distros.
They're different and separate things.
An extra config option is ok, default it to VirtualIP or whatever nice
magic name.
Then other options for EC2ElasticIP, etchosts, ... or! (story first)

As discussed earlier, we can't actually use the EC2 elastic IP thing
as apparently it's DNS based in the end (making it slow), and it
causes traffic to be regarded as out-of-datacenter which makes it be
charged-for.

Another way is to modify the /etc/hosts file on application servers...
how this is done will depend per setup.

So essentially the switch mechanism just needs to be able to start an
arbitrary script with relevant parameters, and get feedback on success
(if it has no other way of checking). Some methods could be build-in,
but otherwise just creating a hook to start arbitrary script rather
than do the gratuitous arp response would do the trick, I reckon.

Cheers,
Arjen.
--
Arjen Lentz, Exec.Director @ Open Query (http://openquery.com)
Exceptional Services for MySQL at a fixed budget.

Follow our blog at http://openquery.com/blog/
OurDelta: enhanced builds for MySQL @ http://ourdelta.org

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.