More Traffic Than One Server Can Handle?

Engage-Engine

New member
Suppose someone had a high traffic domain, hosted on the best high end dedicated server their host offers.

Suppose they get more traffic than this one server can handle.

Then what? How do you serve one domain from more than one server?

Sadly, I don't have this problem. :) Yet!
 
Well, you may try to use mirroring. Have second hosting which will have mirror of your entire website and add second A and NS records to DNS tab of your domain name. So part of traffic will go to original website and second park will go to mirrored website.
 
You have two options. The first is like Kip mentioned; you can mirror the site and use round robin dns through your registrar. The next level involves using load balancing with dns to even out the load between mirrored servers. The next step would be to spread servers out around the world and target the user based on geographic area like google, yahoo, youtube, etc.
 
Ah, ok, thank you.

Mirroring software creates duplicate copies of my files on multiple servers.

The domain registrar divides the traffic up amongst the servers.

The multiple servers could be in one location, or many locations.

Yes? Do I get it?

So, I could have my site served by three different hosts at once, yes? This is how sites like Google provide such reliable service?

Thanks again.
 
Essentially, yes. Except that obviously Google is on a much larger scale and has their own data centers around the world instead of just servers. :)
 
You get all the info correctly. Based on Geo positions you may divide traffic for your website and it`s mirror. I.e. if you need your local US customers have good connection to your website you place one site at local hosting service and second you may place somewhere in Europe to allow Europe clients also have a good connectivity to your website. Good services always generates good sales and so on)
 
Thanks guys, I appreciate your explanations. Very to the point and easy to understand. When I have so much traffic that I need my own data centers around the world, I'll be back to hire you all. :)

PS: In the meantime, hang on to your day job.
 
We do a lot of clustered machine type setups - just like the load balancing. You can also load balance among multiple data centers (just like the CDN setups).

The big item in all of this however will be database and syncing that information between machines. Since this is raw data that is constantly changing, it's not likely that you can use a generic system like "rsync" to copy the database on a regular basis.

In that situation, I'd suggest doing something like Amazon S3 in which you have your database stored on Amazon's network and then using multiple machines at various locations all linking back to the single database source at Amazon (or Google's) networks.

Not cheap to do, but you get what you paid for ;)
 
It can keep FILES updated, but when it comes to the database, you're talking a live environment that's always changing. Take a forum for example. If someone logs in on Server A, and posts something, but Server B has a different user posting at the same time, there's no way to copy from one database to the other without losing someones information.

Same goes with products online. If they purchase a product on Server A, and it's not updated on Server B, then you're out of sync in a big way!

Some places have remote machines that you can browse the various products etc on the remote machines, but then once you go into the CART CHECKOUT mode, you're sent to a single machine. This works pretty good. Then you just need to update the catalog any time you are out of product. Works good if you have multiple items of the same product, but if you're dealing with limited quantity, if two people buy it but you only have ONE, you're going to have a pissed off customer.

So RSYNC is great for files, but on a database level, it's not really designed for something like that.
 
Thanks for the ongoing education!

Hmm... I don't use mySQL, or any other database software. My sites are dynamic however, and the data is kept in text files.

So I guess the question would be, how up to date can RSYNC keep two servers? Every minute? Every five minutes? Other?

Thanks again.
 
Keeping data in a flat text file will still produce the same issues that you'd run into with a live MySQL Database. Keeping constantly changing data up to date will be a challenge.

How often can you sync the data, depends on how often you have things changing. Something to remember that many people forget is that when you're reading a file to send elsewhere, you want to lock that file so that nothing gets written during mid transfer that could corrupt your file on the other end.

Personally, running a 3 server clustered setup or using the Amazon or Google storage would be the route I'd go for the database (or in this case a flat file) storage system. Works out pretty cheap when done this way.
 
I am not sure how complex your data is that you are storing in text files, but if your application is doing any searching or looking up of data , I would strongly suggest switching to some DB engine.
In most of the instances I've seen DB engines will easy outperform any txt file lookups. Plus on top of the performance you get advanced query features of most today's DB engines
 
Top