DNS vs. IP address tactics in the cloud
When using the cloud, I do not have the option of a static LAN ip address to connect components. If /etc/hosts is used to do switching, I have no idea when mysql server would refresh the mapping and reverse mapping is generally messed up when multi-homed.
An alternative tactic would be a VPN/ipsec that could present static LAN ip addresses and then that subsystem could be the control point when actual LAN ip addresses change. The VPC part of AWS does this, but I'm working on another cloud.
Do you have any recommendations for a known good VPN setup for mysql that would stay up, reconnect as needed, etc.?
((Thank you for open sourcing your scripting for mysql replication, cluster, etc.))
-
Hi Paul,
Have you tried openVPN.net? It's open source and should work for you needs.
Another option perhaps could be to use a DNS server (internal or external) and have you cloud instances update the dns record after booting up. Then have your instances do a ns lookup against the DNS server first, i.e., before using the hosts file (have 'dns' before 'files' in /etc/nsswitch.conf).
If your cloud provider has meta data services like AWS then you could try to setup something like described in this blog post: http://www.ducea.com/2009/06/01/howto-update-dns-hostnames-automatically-for-your-amazon-ec2-instances/
Best Regards,
-alex
Please sign in to leave a comment.
Comments
1 comment