I have two dedicated servers. Currently one is configured with PGsql (8.4) and nginx (php-fpm+SSL verisign) on a centOS 6.4. I just got the second one.
To explain context, on one hand, I have a website for customers (they upload lists, browse history of sending). On the other hand, I have a API which insert in DB and get back an ID to customer (process after insert is not important here).
I would like to support the outage of a server (mostly hardware/filesystem).
I don't know if :
- I should make a two node virtual machine server (and setup my centos on it). Some virtualization software support moving machine to a different node
- I should find high availability middleware for nginx,pgsql...
In case of n°2, I found that:
- postgres support HA with some restrictions (no master/master, except if we use an extra software like pgpool). On some website, they say that we can make a master/master on PG9.1.
- nginx support HA but from my understanding, I need 3 nodes at least (a load balancer + 2 working nodes)
Do someone here already setup a fault tolerance nginx/php-fpm/postgres? Is it possible with only 2 nodes? If it's possible, I suppose that I need to configure 2 "A" entries in my DNS settings to allow customers browsers/apps connecting to whichever running server.
I hope my message is clear enough.