NetworkGeekStuff.com running load-balanced on two Raspberry PIs!
And yes, complete tutorial for web/MySQL event driven synchronization for Master-Master replication without conflicts coming soon! I will also include a guide how to turn your home Mikrotik router on load-balancer to drive incoming Internet users to both Raspberries PIs.
So how does it works, well on first look quite simply, you get internet users on the Internet accessing the networkgeekstuff.com via their browsers. The traffic is captured and based on their source IP, it is decided to which internal Raspberry PI server it will be forwarded. The most quickest algorithm if you have only two servers is to get modulo 2 (what is rest after division) and based on this send it to the right server. So in our case all ODD IPs are served by one Raspberry and all the EVEN IPs are served by the other Raspberry. Whole load-balancing is being done on the Mikrotik router.
In conclusion, I must say I researched how to do all this for quite a long time and it took some time to differentiate good and bad information on the web to get it to the current state. Therefore I will take a bit more time to clean the mess in my work directories now and then write a nice tutorial on networkgeekstuff.com on how to recreate all this.
EDIT: I have written a tutorial for both the Mikrotik router doing load-balancing of traffic and for Master-Master synchronization of Apache/MySQL with complete examples.Please have a look and to see all the details that make the current networkgeekstuff.com setup.
2 comments ...
Comments are closed.