Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Can I put a slave MySQL to another continent, communicating the Master over public IP ? If yes, is that a good practice ?

In any case, how can I have the same web app (CMS) on 5 continents at the same speed ?

share|improve this question
    
I guess with a good syncing tool, comwired.com would work? I can select the country and IP for my A record. –  Devrim Sep 15 '09 at 14:10

3 Answers 3

up vote 1 down vote accepted

technically speaking - mysql can replicate over public internet and it's quite robust [ even when connection goes up & down ]. but it's always better to use some vpn/ssh tunnel or at least mysql's built-in ssl encryption.

i do not know how dynamic your website is, but you can as well cache whole output of the application server generating pages on proxies located on different continents.

share|improve this answer

Depends on your application. You can get great performance boosts for an application simply by using a content delivery network for the static content, without touching the dynamic content (which is usually just text anyway, and therefore does not represent a large volume of data being tossed down the HTTP connection).

The database performance will be the same no matter where you stick it, the issue with comes with the geographic dispersion of your clients, so get something like YSlow from Yahoo and checkout what takes up 80% of your pages, and then see if that is static and can be placed on a CDN, from my experience, most of the time the bulk of your traffic is from static content (.jpegs, static pages, etc).

Also, make sure your web server has content compression turned on...

And pQd is right, if you do end up using replication over the internet, do use IPSEC or something similar.

share|improve this answer
    
thx colton, we do use CDN, this question is more about mirroring a highly dynamic site. –  Devrim Sep 15 '09 at 14:09

Replication is fine for reading, but you'll still need to always write to the master.

Writing your application correctly to deal with writing to the master and reading from the slave is potentially problematic, as it cannot assume that writes to the database are immediately visible - you will need to hide this from the user (by the time the user has time to click another page, in all likelihood, they will be).

Also, you will still have the overhead of connecting to the master on pages where you want to write to the database.

Depending on exactly what your application is, this could be a problem. Or it might not be. Be sure that whatever you do is thoroughly tested in a non-production environment. Be sure to run your application's automated system tests with a replication-enabled test environment.

As far as having a VPN is concerned, this is a no-brainer, as you will probably need it for other purposes anyway. If you have infrastructure on 5 contintents, having a VPN is not a major issue (presumably you have one already).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.