equivalent to CDN but for dynamical content?

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?


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.