Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am planning to deploy my web app to EC2. I have several webserver instances. I have 1 primary database instance. I have 1 failover database instance. I need a strategy to redirect the webservers to the failover database instance IP when the primary database instance fails.

I was hoping I could use an Elastic IP in my connection strings. But, the webservers are not able to access/ping the Elastic IP. I have several brute force ideas to solve the problem. However, I am trying to find the most elegant solution possible.

I am using all .Net and SQL Server. My connection strings are encrypted in my web.config.

Does anybody have a strategy for failing over a database instance in EC2 using some form of automation or DNS configuration?

Please let me know.

share|improve this question

1 Answer 1

Your webservers probably can't access the Elastic IPs because of firewall rules associated with your security groups. You should be sending traffic over the internal IP addresses, anyway, or you'll be charged extra for data transfer.

Instead of Elastic IPs (which take a few minutes to transfer anyway), you could use a service like DNS Made Easy's dynamic IP addresses, set with very low TTLs, where the database hostname is changed from HostA's internal IP to HostB's internal IP on failover.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.