We had a webserver on Ubuntu14.04 server that was implemeted by LAMP (Linux, Apache, MySQL, PHP) and phpMyAdmin to manage database.
Now we will buy one more server for backup our webserver. However, I don't know the solution for this work. I heard about some solution like loadbalancing, cron, mysqldumb, Master Slave Replication... but I don't know which solution suitable with us and how to implement it.
I need a solution for this problem when the web server 1 is disrupted, our system will redirect to web server 2 (server backup) and work well without missing data.
Any ideas??
Master/slave :
Master/slave if your stuff (CMS, etc...) can consider read-only mode of slave to be used. It's better if your stuff handle master/slave replication in configuration (= is not trying to send UPDATE or DELETE to a slave server which will give errors) Slave server can also be use as a SELECT server to help DB handling more request.. You don't need anything else but MySQL and 2 servers to do that. You'll find many help on internet about how to install master/slave .
Master/master :
Problem with master/slave replication is that slave server will be accessible in read-only mode only. Most tools (CMS or whatever) require writing DB even when consulting for whatever reason (Session handling etc..) Master/master replication is probably the best choice , but you'll need a third party : have a look at MMM and its installation guide .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.