0

Please forgive me if I'm using incorrect terminology. I tried searching for my question, but I'm not quite sure how to word it in terms simple enough for a search. I found this post and this post which are relevant, but they don't answer my exact questions.

For websites that require a large number of servers to run it, how is the application code itself stored and managed (leaving out the database for now)? For simplicity, lets say serverfault.com has 10 servers powering it. Do all 10 of these servers have the exact same code on them, or would certain portions of the code be split up across different servers? If they all do have the exact same code, what tools administrators use to make sure that the servers contain the exact same code? I can imagine if one server happens to contain different code then bad things can happen.

Now for the database...If you have a huge amount of data in a SQL based storage system, how is that managed? Are tables themselves split across multiple servers or would it generally be something like table users gets this server, table posts gets this server, etc...? How does a giant as big as Facebook or Twitter deal with this?

I set up my first server running apache on Ubuntu on an AWS micro instance. Are there any free tools I can check out to try to do this? I found load balancers on AWS, but the descriptions are more about getting them to run, not how the data itself is stored and/or retrieved.

Thank you

1 Answer 1

3

This is something called Load Balancing. A load balancer redirects requests to multiple server, which have exactly the same code loaded on them.

As for the database, this is usually done with database replication to multiple servers, and splitting the data onto multiple databases. (e.g. user A's "Facebook things" are stored on DB Server A, user B gets it's data stored on Server B, and so on)

If you want to know more, here's a collection of things for Facebook and their architecture: https://stackoverflow.com/questions/3533948/facebook-architecture

So for your scenario:

  • Load the same code onto multiple servers
  • Setup a load balancer
0

Not the answer you're looking for? Browse other questions tagged .