1

so i know for serving static elements (css, js, images, videos etc) you should use CDN since they are spread out throughout the world.

but how could i spread out by apache servers? is there an equivalent to CDN but for dynamical pages? or is it the traditional LAMP way.

if so, i guess my best option is to find an international hosting provider that hosts in different countries, so the content will be served from the country located nearest the client machine. any suggestions of such hosting providers?

or is it best practice to contact different hosting providers in different countries that do not relate to each other. what is the right way to go?

ajsie
  • 1,215
  • 4
  • 20
  • 28

1 Answers1

2

It depends on what you want to achieve. The challenge with having geographically disperse servers that generate dynamic content is the database retrieval/synchronisation.

If you had a central database server hosted in, say, America, and then you threw web servers into Australia, England, Russia and Korea, that would quite defeat the purpose of having a disperse network becuase they're all relying on back-haul to your databsase server.

You have to put your database AND your web servers together (so, 5 locations = 10 servers). But then of course you face the issue that with 5 different database servers in 5 different countries, you need to have read/write access to the database from all locations and synchronise them with as little latency as possible. This can be done, but you have to make sure that you design your database perfectly and usually needs to be built into the design of your systems from day one.

Whichever host you go with, you're going to face these difficulties. Some hosts may have a prioritied link between their own datacentres in different countries, some may not, you will need to ask them when you're doing your research.

Mark Henderson
  • 68,316
  • 31
  • 175
  • 255
  • but this is what large websites do right? to replicate data and have them in different locations? but if someone then in england access the machine in england, and another in korea, how do they update each others and the other servers database? i guess this is what i have to bear in mind. what is topic like this called? any books for it explaining in detail different strategies? pros and cons with each of them and real life examples? – ajsie Apr 05 '10 at 22:55
  • Hi Ajse, you're correct, they replicate their data to the other sites. How do to this depends greatly on which database back end you've chosen. Doing it in Microsoft SQL is totally different to doing it in MySQL. There is generally a small amount of latency between the two sites, so something thats posted in Korea might not appear in England for 30 seconds or so. – Mark Henderson Apr 05 '10 at 23:08
  • thanks for answering that quick:) is there more information about this somewhere so i could dig deeper into it and know how to deploy? its mysql server im using. – ajsie Apr 05 '10 at 23:11
  • @ajsie, you might want to check out the following ServerFault questions: http://serverfault.com/questions/51576/mysql-replication-of-only-one-database and http://serverfault.com/questions/30605/how-fast-is-mysql-replication and http://serverfault.com/questions/75417/mysql-master-slave-setup-with-synchronous-replication - for more, check here: http://www.google.com.au/search?hl=en&safe=off&client=firefox-a&hs=Mgb&rls=org.mozilla:en-GB:official&q=site:serverfault.com+mysql+replication&start=0&sa=N – Mark Henderson Apr 05 '10 at 23:31