Friday, October 28, 2011

Domains and Server......


Q. How many domains can one server support? What is the maximum space that one website can occupy? What is a dedicated server?
A. Let's start with your first two questions. How many domains can one server support, and what is the maximum space that one site can occupy?
There's no fixed limit to either of these, apart from hard drive space to store the content and network and CPU speed to cope with all the traffic. There's no reason in principle why you can't host 1,000,000 sites on a server, although in practice you wouldn't have that many.
Folks can and do host thousands of low-traffic sites on one server. More popular sites, and sites that generate content on the fly by accessing databases and so on, will need a larger share of CPU. Sites carrying video and other large files will need a larger share of the network connection.
So how many sites will fit on one server? To answer the question we need to know how big each site's files are, how much network traffic each site consumes, and how much CPU each site requires. We also need to know how large the server's hard drive is, how fast its CPU is, and how fast its network connection is.
So let's assume that the web server features a 110GB hard drive, a single 2GHZ CPU, and a 1 megabit-per-second (T1) connection to the Internet.
Let's also assume that each site has 100MB of files, does not feature video or music, and features only static HTML pages and files.
The operating system will take up about 10GB of that 110GB hard drive. That leaves 100GB for web site files, so we have room for approximately 1,000 sites at 100MB each.
The sites feature static HTML pages and images, so we should be OK in the CPU and network department. But if sites are popular they can still use a lot of network bandwidth. So let's assume that each site receives 1,000 visits a month, and that each visit involves 1MB of data transfer. 1,000 x 1MB = 1GB of data transfer per month per site. We'll also assume that each visit to the site accesses the web server 20 times— once for each page and each image on each page, as well as CSS files, JavaScript files, Flash files and other files that make up our pages.
Our web server has one megabit of bandwidth, which works out to approximately 100K (100,000) bytes of data transfer per second (there are eight bits to a byte, and we must also assume a reasonable amount of overhead). 100K per second works out to roughly 260GB per month. Dividing 260GB by 1GB, we find we can only accommodate 260 sites.
In reality, things are worse than that— what matters most is that every site be responsive and usable even at peak times. Assuming that the peak traffic for a given site is twice as high and that each site peaks around the same time of day, we need twice as much bandwidth, so we can only accommodate 130 sites.
What about the CPU? With 130 sites making 1,000 visits apiece with 20 accesses per visit, the math works out to approximately one access per second (two accesses at peak times). Two accesses per second won't cause much trouble at all for our CPU. So our 130 sites still fit. But if these sites were different— if each accessinvolved complex database queries— then more CPU horsepower would be required per site. In some cases, it's best to have a single server per site.

Dedicated Servers

This brings us to your third question. A dedicated server is a server that hosts just one site, or in some cases just the sites of a single customer. When you sign up for a dedicated server with a web hosting company, you are paying for a server that hosts only your sites. This has two big advantages: reliability and security. You don't have to worry about sharing limited hard drive space and CPU resources with other people. And you don't have to worry about security bugs and design flaws that might allow other ISP customers to access your code and data— that is, as long as you keep your own dedicated server up to date with appropriate security patches and don't introduce security holes of your own.
Although a dedicated server provided by a web hosting company is an excellent option, it's important to remember that you are still sharing one important resource: the network connection. If other customers are big bandwidth hogs and the host doesn't keep on top fo this and add more connections or limit their traffic, then your web site can still suffer on a dedicated server.

Multiple Servers Per Site

The most popular sites, such as Google, YouTube and Yahoo, require many servers to implement just one site from the user's point of view.

No comments:

Post a Comment