Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Local VS Remote MySQL Installation
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Local VS Remote MySQL Installation

NanoG6NanoG6 Member
edited January 2012 in Help

Hi Guys,

Could someone explain the advantages and disadvantages of installing a MySQL database on a local machine compared to a remote machine?

I have two VPS, one is KVM128 as a web server (will host 2-3 wordpress blogs using Lighttpd & PHP-FPM) and another is OVZ128 which is idle VPS I'm planning to install mysql server. Which scenario will give me best performance, local mysql on web server, or external mysql on OVZ128?

If I host both web and mysql server on the same machine with 128 RAM of course they are then competing for the same resources. But if I host on separate server I'm afraid there will be network latency, even just 10ms or more on local BVM subnet (for hostname lookup, etc) :D

Any help would be greatly appreciated! Thanks

Comments

  • KuJoeKuJoe Member, Host Rep
    edited January 2012

    If the connection between both servers is excellent (i.e. same data center) then go remote for better performance. Unless you have an extremely busy website with constant MySQL access then whatever performance increase you'll gain will be negated but the possible network hiccups and 2 possible points of failure.

    Thanked by 1Go59954
  • @KuJoe said: If the connection between both servers is excellent (i.e. same data center) then go remote for better performance.

    Agree

    Well, if security is a big concern, remote isn't the best way to go if you don't have MySQL+ssl.

    And yes, the problems are about latency mainly. I found Las Vegas to be my best location for a shared MySQL with servers around USA :P

  • Within the same datacenter (even different providers in the same DC), it's fine. I did it for a while with BuyVM. However, like @KuJoe said, you're introducing a second point of failure for your setup - you have to worry about both your web server and your MySQL VPSes going down. This might not be too much of a concern though if you're using WordPress, since I presume you'll be caching everything. So, the only problem you should have if your MySQL server goes down is you won't be able to receive comments or post new entries.

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    That's why you buy access to Shared SQL. :3

    Francisco

  • It's still a second point of failure :P

  • NanoG6NanoG6 Member
    edited January 2012

    Ya I guess I'm gonna make that mysql on a separate machine. I don't want to burden my tiny server because it seems like RAM & CPU bottleneck will just giving me more latency than network.

    @Francisco
    Is it normal if first ping packet always often more than 200~400ms?
    I tried it on local ip.

    PING 172.16.197.xx (172.16.197.xx) 56(84) bytes of data.
    64 bytes from 172.16.197.xx: icmp_req=1 ttl=63 time=221 ms
    64 bytes from 172.16.197.xx: icmp_req=2 ttl=63 time=0.739 ms
    64 bytes from 172.16.197.xx: icmp_req=3 ttl=63 time=14.8 ms
    PING 172.16.197.xx (172.16.197.xx) 56(84) bytes of data.
    64 bytes from 172.16.197.xx: icmp_req=1 ttl=63 time=453 ms
    64 bytes from 172.16.197.xx: icmp_req=2 ttl=63 time=0.789 ms
    64 bytes from 172.16.197.xx: icmp_req=3 ttl=63 time=1.01 ms
  • FranciscoFrancisco Top Host, Host Rep, Veteran

    that's what we've always seen on OpenVZ.

    It's just an accounting error by ping as far as i know.

    I've seen the same at home as well but maybe shaw is just being retarded?

  • Oh I thought that was caused by your firewall..

Sign In or Register to comment.