I have a dream. Or at least, an idea
I am trying to set up some kind of HA (High Availability) system on a LWMP (Linux + Webserver + MySQL + PHP) stack running on top of N Raspberry Pi (RPi from now on). I say "some kind of HA" because I plan to do this vía DNS + multiple A registers, a simple way to do this without the need for additional services checking availability . The way I see this working is:
- N dns A/CNAME records pointing to N different geographically located RPis.
- The browser's dns request will return one of these RPi ip addresses.
- If the web service is working on that ip, all is happiness and ends here.
- In other case, there will be a lapse time until a timeout is reached (about 1 minute?) and the browser tries to reach the next chosen ip.
This is on the dns + web side. On the MySQL side, the hardest thing to do seems to be the database replication setup, which I guess the best option in this case is master-master or multiple master replication  (although I am not sure how this will work on more than 2 hosts). I am also open to suggestions about using other database servers for this purpose.
I am aware of the following:
- This is not real HA, but it is always better than downtime.
- Maybe this won't work on all browsers (I expect it to work in modern ones).
- This can surely break user web sessions / SSL (I don't need them).
Thoughts on this? Does it make sense? If so, someone with the same needs willing to try?
 http://serverfault.com/questions/60553/ ... ecommended
 http://serverfault.com/questions/189290 ... my-website
 http://brendanschwartz.com/post/1270290 ... eplication