OVH Community, your new community space.

Dedicated MySQL Server

21-06-2009, 00:45
It wont bottleneck much though? It shouldnt anyway, not on a 100mbit connection - but only testing will tell.

And port 22 would be open anyway, if its Linux, i personally dont change ssh to another port - i just order extra IPs for websites and on those IPs block port 22 so at least the real IP of that server (and port 22) is less public.

20-06-2009, 23:26
Quote Originally Posted by Ashley
What happens when you execute an update query though?
You set the privileges for any user on the MySQL slave to SELECT and other read only functions only. If you need to update the table, you would have to connect to the master instead.

A fair amount of applications that utilise MySQL as the datastore will support this (take PowerDNS for example). Other than balancing the load a bit (it's still possible to use SELECT on the Master if need be), you can also use it to increase security a bit (say, someone was able to obtain the MySQL user account for PowerDNS, but as it only has SELECT privileges, can't modify anything).

If the application doesn't allow it, you could always add a MySQLProxy. Anything that uses a SELECT statement you could load balance. Anything that uses another statement that requires write privileges, you send to the master.

Oh, PS: If you'll go through an SSH tunnel, other than adding an extra bottleneck, you'd have to keep port 22 open - that's a bigger target than the MySQL port out in the wild wild web. At least make it listen on another port, or require port knocking...

20-06-2009, 20:38
You could *possibly* get some performance gain if you have this external MySQL server set up, and also set up a local one with 'federated tables' - so popular queries will get cached locally and any unique queries will be queried against your external database.

A federated table is just a table that doesn't actually exists but points to a table on another MySQL server somewhere.

20-06-2009, 20:36
What happens when you execute an update query though?

20-06-2009, 19:22
Thanks for the replies I was gona just connect to the mysql server through a SSH tunnel so that should be nice and secure.

And what you said about having a slave for read-only is a great idea!

20-06-2009, 18:08
Just make sure you close the port to public access - only permit authorised IP addresses

Latency within OVH's network is certainly minimal (although some VPS users might say otherwise... )

Alternatively, if latency does become a concern, keep the remote (dedicated) MySQL server as a master and setup a local MySQL server as a slave for only the database(s) your local server will need to access (Read Only, of course). Helps with load balancing too, so that the master won't be completely bogged down.

20-06-2009, 15:52
It should work fine, and lots of people probably already do it. Try it, you never know until you do

20-06-2009, 04:27
This reminds me the time I had shared hosting in usa and mysql running on my laptop at home. Page load time was increased by around 0.5 seconds .. it was a forum. I think dedicated mysql server can work fine in the OVH network. Use persistent connections.. this will help

20-06-2009, 03:54
Has anyone had any experience with setting up a dedicated mysql server in OVH and then using that from another web server also with OVH?

What i'm particularily interested in would be latency times, obviously when mysql is on the same server as the webserver interactions are pretty fast - does it get unbearable when things are seperated? Idealy you would have a dedicated line between the servers but OVH dont offer this...

I did just try a ping command between two of my servers (one in RBX1 and another in RBX2 (i think)) and im getting between 0.2 and 0.6 milliseconds which sounds unreal!

So yeh - anyone with experience doing this?