<div dir="ltr">You could have 3 servers with Galera replication ( it needs 3 servers ). Each server can have your app running (web/app server) and a haproxy which will balance the requests to your mysql cluster. There is not singole point of failure, although network issues could affect the mysql replication. You could move one node to another datacenter and having a service like Zerigo DNS to balance the requests to the available servers and depending where the request is coming (DNS geolocation).</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On 16 April 2013 11:50, Andrew Stewart <span dir="ltr"><<a href="mailto:boss@airbladesoftware.com" target="_blank">boss@airbladesoftware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Good afternoon El Rug,<br>
<br>
What's the best way to increase from one server to two?<br>
<br>
Currently I have everything for my webapp – code, database, background jobs, etc – on one server.  Performance is fine but it's a single point of failure (see this morning's email thread).  Off the top of my head I'm thinking:<br>

<br>
- Use a different host in a different city from my current server.<br>
- Install same operating system as current server and set up identically via Chef/whatever.<br>
- Deploy all code changes to both servers with Capistrano but have second server serving Rails maintenance page (just in case anybody finds it).<br>
- Ideally set up live (mysql) replication...somehow.<br>
- If/when first server croaks, manually fail over to second server via changing DNS.<br>
<br>
I'm sure it's more complicated than that, particularly the switching from one server to the other (and back).  Does anybody have any tips?<br>
<br>
Thanks again,<br>
<br>
Andy Stewart<br>
_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Riccardo Tacconi<br>Ruby on Rails and PHP development - System Administration<br><a href="http://www.virtuelogic.net/" target="_blank">VIRTUELOGIC LIMITED</a><br>
<br><a href="http://github.com/rtacconi" target="_blank">http://github.com/rtacconi</a><br><a href="http://riccardotacconi.blogspot.com" target="_blank">http://riccardotacconi.blogspot.com</a><br><a href="http://twitter.com/rtacconi" target="_blank">http://twitter.com/rtacconi</a>
</div>