Page 1 of 1

Long Page Load Using Remote Database

Posted: Mon Jan 11, 2021 10:53 am
by ajhalls
A customer asked if I would host their database on one of my servers in the data center, I figured to give it a try. Here is what I did:

In Mysql:

Code: Select all

create database someuser_od;
create user 'someuser'@'%' identified by 'SomeSuperSecurePassword';
grant all on someuser_od\%.* to 'someuser'@'%';   # allows it to create backup databases
Bash:

Code: Select all

mysql someuser_od <backup.sql 

mysqld.cnf file:

Code: Select all

sql_mode                = NO_AUTO_CREATE_USER
The calendar takes about 6 seconds to load on his computer. He has a 50-70ms ping time from Ohio to the server in Utah. On my computer (also in Utah) I can navigate pretty well, but I have 1-4 millisecond ping times.

I noticed that there are 24 queries that are run when navigating from page to page, which could account for up to almost 2 seconds of lag at 70ms each, but what about the rest? Is the ping time the only issue here, or is there more for me to look at?

I wouldn't mind trying the middle tier, but is it possible to host multiple offices using a single server on middle tier? It wouldn't be economical if each had to have it's own Windows license and deal with the overhead of multiple OS installations.

Re: Long Page Load Using Remote Database

Posted: Mon Jan 11, 2021 12:50 pm
by jordansparks
You aren't worried about exposing a MySQL database port to the world? That's too scary for me. That's why we have not optimized for that scenario.