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

Would you explain me how is possible to set up a configuration like this (example) (LAMP):

  1. 1 Main server (in europe for example) with database, static files, php, etc.
  2. Other servers in others continents (reducing network time)

    • site.fr, site.de, site.co.uk etc would be pointed to the ip of the Europe server
    • site.jp etc would be pointed to the Asian server

Considering the code and the database are the same for all servers which is the best way to have this without having to manually dump every day the database of the "satellite" server?

(And there is an hosting company where you can choose the localization of servers?)

Thanks a lot for every suggestions

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Hmmm. You can do that in many ways, the top one I think right now are caching and replication.

  • Caching would allow your localized servers to cache content and serve it faster for the near clients. You main server would still get the bulk of the dynamic stuff but with a good caching you can offload most of the static content to the satellite servers.
  • Replication is the technique to keep data automatically synchronized between servers. It works better between servers on the same lan segmento or close enough to have a good speed, but you can check and see if it works for you. You can use rsync or drbd to sync php or static data between the servers and use the MySQL replication features to keep the DB synchronized.

Particularly I would go for a strong caching/static replication, or maybe caching + DB replication having the satellite servers be read only and make all update to data to be performed on the main server. Little complex, but very scalable. There are other techniques like caching result pages (result from dynamic pages) that also can be used to improve the infrastructure.

EDIT: Good article about memcached and mysql.

share|improve this answer
    
Caching would allow your localized servers to cache content and serve it faster for the near clients. How my localized server can cache content if all the datas are on the main server? Please be specific (and consider I am not talking on how to speed up the dynamic page load time, I need synch between satellite servers) –  dynamic Mar 9 '11 at 14:07
    
I was talking about the non-dynamic part of the site, but you can cache the result of dynamic pages for some minutes on the satellite servers. Like for 5 to 10 minutes, but to do that you need a way to cache it correctly (I think memcached has something like it) and a way to deal with validation of the data. –  coredump Mar 9 '11 at 14:19
    
I have already a chacing system on my main server that's not worries me and isn't really a topic of this questions –  dynamic Mar 9 '11 at 14:22
    
Not really. You want a solution to make satellite sites serve stuff from the main server faster. If you cache the content (including the dynamic generated one) on the satellite servers you will be effectively serving data from the main server, faster. You can use sync and make various distributed servers that mirror your first, and that has good and bad sides, as well as the caching solution. I am just showing you my ideas. –  coredump Mar 9 '11 at 14:27
    
You want a solution to make satellite sites serve stuff from the main server **faster** Actually I am asking something that is behind this.. How to sync those satellite servers with my main.. the cache part comes after this. –  dynamic Mar 9 '11 at 14:31

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.