How to set up redundancy with ec2
I am trying to make my a failsafe cluster on ec2. I have two instances running a single cluster with a bucket replica of 1, so my data is duplicated once.
At present I'm pointing my code to one of the two servers' public IP addresses. Can some kind soul guide me how to set it up so that if the ec2 instance I'm pointing my code at fails, my code keeps working.
An Amazon Elastic IP might help here, but it seems I still need a separate process to monitor the couchbase server is up, and if it's not, to automatically change the Elastic IP to the next server that is working. Is there a known best practice for doing this?