mike131 Posted November 18, 2014 Share Posted November 18, 2014 Hi, I currently have 2 servers behind a load balancer. Each of these servers are running processwire, but there is an issue with files management (site/assets/files) Each one would have a separate set of files depending on which server you "hit" when you make changes/upload. Does anyone know of a good way to handle this without losing files? Thank you! Link to comment Share on other sites More sharing options...
gurkendoktor Posted November 18, 2014 Share Posted November 18, 2014 You can make a master / slave configuration with continuous syncing from one to another. For this to work you would have to make sure that admin traffic is only routed to one ("master") server. You could use rsync (which could be triggered by a module after onPageSave), the more "true" way as far as I understood is block level syncing. I don't know anything about this however. Alternatively, you could for example mount one server's /assets/ folder into the other one. This makes sure you always read / write to the same dir. In this case, you should make sure in your application logic that the same information cannot be stored at the same time from different servers. You could also combine these two options. 1 Link to comment Share on other sites More sharing options...
pwFoo Posted November 19, 2014 Share Posted November 19, 2014 You should take a look at DRBD. Link to comment Share on other sites More sharing options...
Valery Posted November 24, 2014 Share Posted November 24, 2014 Hello, You might want to look at HAProxy. Here's a nice article on using it. https://www.digitalocean.com/community/tutorials/how-to-use-haproxy-to-set-up-mysql-load-balancing--3 And this is an article on how to set up master-master Mysql replication. https://www.digitalocean.com/community/tutorials/how-to-set-up-mysql-master-master-replication Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now