Post by windows95 » Fri Jan 12, 2018 6:56 am

I have an opencart 2.2.0.0 site on a Windows Server 2008 R2 machine. I also have MySQL Server on that same box with the database for the opencart website. This setup works perfect. Speed is good. Eveything is good. Flawless

As i get ready to take to production mode, I now want to have the MySQL Server and database on another machine for redundant purposes. (in case the server with the website crashes, i have my backup server [which i backup the website onto on a daily basis] ready and pointed to the server with the MySQL database on it to jump in at a moments notice)

Windows Firewall is turned off on all appliances.

The issue im having is that website as a whole is just slower to load down the line when the database is on the remote server.

So to generalize:

main webserver and mysql operating out of the same physical box = good!
main webserver on one physical box, mysql on another physical box= slow
backup webserver virtual machine (vmware) windows server 2016) on one virtual machine and using the msql on the main webserver physical box = slow
backup webserver virtual machine (vmware) windows server 2016) on one virtual machine, mysql on another physical box= slow
backup webserver and mysql operating out of the same vmware windows 2016 virtual machine server = good!


as long as the MySQL is on the same server as the one the website is hosted on, no problems. Otherwise, the site is slow. Works fine, but its slow.

any suggestions?

Newbie

Posts

Joined
Wed Aug 16, 2017 6:22 am

Post by straightlight » Fri Jan 12, 2018 7:16 am

The issue im having is that website as a whole is just slower to load down the line when the database is on the remote server.
A database should not be on a remote server but rather from the local server to optimize server queries.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by windows95 » Thu Jan 18, 2018 1:46 am

bummer. i appreciate the response though

Newbie

Posts

Joined
Wed Aug 16, 2017 6:22 am

Post by MrPhil » Thu Jan 18, 2018 3:34 am

Just what is the point of having your DB on a different machine? You now have two points of failure. You should look instead into some sort of DB mirroring onto a different box, or some sort of constant incremental backup. With a mirrored DB, you could have a hot spare ready to drop in within seconds (assuming it's in the same data center and DNS doesn't need updating to a new IP address). Take another look at what you're trying to accomplish, and whether there's a better way.

Keep in mind that a mirrored DB (or anything kept in synch with the primary) will be in just as bad of shape as the primary if there is a hack or code problem, or even possibly if there is only a HW problem. You still need to take regular off-line backups of your DB.

User avatar
Active Member

Posts

Joined
Wed May 10, 2017 11:52 pm
Who is online

Users browsing this forum: Semrush [Bot] and 203 guests