Archive for the ‘Dedicated Servers’ Category

Dual CPUs and Multithreading

Friday, September 22nd, 2006

For years, hosting firms have offered dual CPU capacity in some of their higher-end offerings with the promise of better performance. Many end-users note that dual CPU systems trump single computer processors that can only handle one instruction from one application at any given point in time.

Each instruction sent to a processor is called a thread. Though a computer appears to multitask or run more then one program at a time, it is really not. A single CPU divides its time and power evenly between all the programs by switching back and forth creates a sense of multitasking.

In contrast, dual CPU systems can work on two independent threads concurrently. Each processor however is still limited to working on one thread. In effect, the dual CPU allows two applications to independently work at once. This is advantageous to a server, since it allows applications to continue working even if one fails.

Multi-CPU systems are designed to utilize different applications concurrently. Applications however must be specifically designed to accommodate multithreading. Thankfully, many applications can juggle multiple chores at once within a multithread environment.

Server applications handle concurrent clients. Interactive applications often deal with user input while processing background computations. And computationally intensive applications harness the power of multiple processors. The use of multiple threads for control allows for more effective implementation when dealing with these concurrent activities. Coordinating the execution of such threads involves synchronizing access to shared data structures, ensuring that programs are well behaved and deterministic regardless of the relative speeds of execution of their component threads.

Multithreaded programs, like single-threaded programs, must deal with exceptions and interaction with the outside world. Though there may be many concurrent activities in such a program, the program as a whole should cleanly respond to such outside input. There are a number of ways in which threads have been implemented, involving user-level libraries, the OS kernel, and various combinations. Most Linux implementations currently treat each thread as a separate process created using the clone system call (though each shares its address space with its cohorts). Some newer implementations of multithreaded software on Linux use different approaches, but the ultimate result is that applications like database servers can operate and dedicate specific resources to a single CPU, while other ongoing operations use the alternate CPU.

The assignment of specific database applications to a specific CPU is important more in terms of redundancy in most instances than speed. As many analysts indicate, any given program will not run faster with a dual processor, except to the extent that it does not have to handle other tasks. While many multithreaded applications are optimized to actually increase the speed of program performance, the greater advantage they provide is operational security.

If an application on one CPU causes a spike in server load, it will not incapacitate all server activity. In turn, if one CPU unit actually fails, the second CPU can take over other mission-critical activities until the alternate CPU is replaced. This, in certain situations, can assist with achieving greater uptime and responsiveness of server applications running within a Web hosting environment.

Hardware Balancing Lightens Server Load

Friday, September 22nd, 2006

Load balancing is the even distribution of computer processing and communication activities so that a server is not overwhelmed. Load balancing is especially important for networks where it is difficult to predict the number of requests that will be issued to a server.

Busy Web sites typically employ two or more Web servers in a load-balancing scheme. If one server starts to get swamped, requests are forwarded to another server with more capacity. Load balancing is therefore a service that is employed on more sophisticated site deployments.

Most service providers that offer managed hosting will provide load balancing services to their clients if they experience constantly heavy traffic on their Web sites. Multiplexing traffic amongst several servers permits better site availability. Load balancing therefore distributes traffic efficiently among network servers so that no individual server is overburdened.

In the early days of the technology, many load balancing solutions where implemented through customized domain name server configurations. This approach called “DNS round robin,” rotated incoming requests from Web browsers to multiple Web servers. The result was that all requests to the particular Web site were evenly distributed among all of the machines in the cluster.

The advantage of this system was that it was inexpensive, as a system administrator only needed to make a few changes in order to implement it. Its major disadvantages however was that DNS round robin did not support server affinity or high availability.

Server affinity is a load-balancing system’s ability to manage a user’s requests, either to a specific server or any server, depending on whether session information is maintained on the server or at an underlying, database level. Without server affinity, DNS round robin could not by itself exercise control over incoming traffic without the aid of cookies, hidden fields or URL rewriting.

Due to its very nature of not being able to exercise this type of control, DNS round robin could not natively handle browser caching, since incoming requests were randomized. DNS round robin also had tremendous difficulties dealing with high availability, since the DNS system requires a large amount of time of propagate information and cache it throughout the network. As a result, DNS round robin is a more antiquated approach toward managing server load. Load balancing, however, is much more sophisticated today, because it is mainly implemented through appliances such as smart switches.

Hardware load balancers solve many of the problems faced by the round robin software solution through virtual server addressing. A load balancer shows a single, virtual server address to the outside world, which maps to the addresses of each server within the cluster. When a request comes to the load balancer, it rewrites the request’s header to point to other machines in the cluster. If a machine is removed from the cluster, the request does not run the risk of hitting a dead server, since all of the machines in the cluster appear to have the same IP address. This address remains the same even if a node in the cluster is down. Moreover, cached DNS entries around the Internet are not a problem. When a response is returned, the client sees it coming from the hardware load balancer machine. In other words, the client is dealing with a single machine, the hardware load balancer.

Because one machine is dealing with the management of an entire cluster, server affinity and high availability is actually integrated into the hardware load balancer solution. Indeed, with the hardware solution, a service provider can offer fail-over services, cluster management, traffic routing and geographic load balancing across multiple sites and points of presence.

Hardware also is a much faster traffic routing solution because it is solid-state device that more efficiently processes requests than software on a server deployment can.

How a Web Server Works

Friday, September 22nd, 2006

You have probably come to this site to find a company that provides Web servers or Web hosting services. But do you actually know how these hosting machines work? It’s a good idea to know a little bit about the product or service you are searching for before you begin your quest.

First, it’s important to note that this is a two-sided story. Web servers are responsible for storing and exchanging information with other machines. Because of this, at least two participants are required for each exchange of information: a client, which requests the information, and a server, which stores it. Each side also requires a piece of software to negotiate the exchange of data; in the case of the client, a browser like Netscape or Internet Explorer is used.

On the server side, however, things are not as simple. There is a myriad of software options available, but they all have a similar task: to negotiate data transfers between clients and servers via HyperText Transfer Protocol, the communications protocol of the Web. What type of server software you are able to run depends on the Operating System chosen for the server. For example, Microsoft Internet Information Server is a popular choice for Windows NT, while many Unix fans choose Apache Web server.

A simple exchange between the client machine and Web server goes like this:

1. The client’s browser dissects the URL in to a number of separate parts, including address, path name and protocol.

2. A Domain Name Server (DNS) translates the domain name the user has entered in to its IP address, a numeric combination that represents the site’s true address on the Internet (a domain name is merely a “front” to make site addresses easier to remember).

3. The browser now determines which protocol (the language client machines use to communicate with servers) should be used. Examples of protocols include FTP, or File Transfer Protocol, and HTTP, HyperText Transfer Protocol.

4. The server sends a GET request to the Web server to retrieve the address it has been given. For example, when a user types http://www.example.com/1.jpg, the browser sends a GET 1.jpg command to example.com and waits for a response. The server now responds to the browser’s requests. It verifies that the given address exists, finds the necessary files, runs the appropriate scripts, exchanges cookies if necessary, and returns the results back to the browser. If it cannot locate the file, the server sends an error message to the client.

5. The browser translates the data it has been given in to HTML and displays the results to the user.

This process is repeated until the client browser leaves the site.

Aside from its functions listed above, the Web server also has an additional number of responsibilities. Whereas a Web browser simply translates and displays data it is fed, a Web server is responsible for distinguishing between various error and data types. A Web server must, for example, designate the proper code for any sort of internal error and send that back to the browser immediately after it occurs. It also has to distinguish between various elements on a Web page (such as .GIFs, JPEGS and audio files) so that the browser knows which files are saved in which format. Depending on the site’s function, a Web server may also have numerous additional tasks to handle, including logging statistics, handling security and encryption, serving images for other sites (for banners, pictures, etc), generating dynamic content, or managing e-commerce functions.

Now that you’ve had a behind-the-scenes tour of a Web server, you can appreciate all the work that goes in to delivering a single page of content to your computer screen. Use this knowledge to your advantage, and keep it in mind when shopping around for your next host.

About Managed Hosting

Friday, September 22nd, 2006

Operating a Web presence can become very involved once a company’s hosting requirements progress beyond simply needing a dedicated server. Managed services are therefore geared toward organizations that don’t have the time or capital to invest in server administration.

Managed services normally provide equipment procurement, provisioning and installation, and network monitoring and management backed by Service Level Agreement. Managed services also provide end-to-end network management and maintenance support for locations around the world.

Think of a managed server as a glorified dedicated server armed with extended features and support. A managed server will come equipped with the features one would expect from a dedicated provider, including choice of OS, routing equipment, network connectivity and complete administrative control. However, instead of leaving most of the administrative tasks to the customer, a managed provider will typically handle that as well. Many companies will often assign you a dedicated service representative who will cater only to you and a handful of other accounts.

This support also comes in the form of proprietary control panel technology that enables the inexperienced administrator to easily set up and maintain sites on a server. This is achieved through an intuitive and user friendly point and click method rather than by typing complicated commands at a prompt line.

Many hosting companies offer a supplementary suite of features and services that related to managed hosting, including application and database management, high-availability services and load balancing.

Most reputable Web hosting firms will offer managed Web hosting services, and will back up their services with performance guarantees and Service Level Agreements.

Unmanaged services, on the other hand, give the customer complete remote server administration capability and freedom. The downside to this is that unmanaged servers require a large amount of time and technical expertise, as the customer is ultimately responsible for the instillation and management of the server - not the Web host. For this reason, unmanaged servers are only recommended for individuals and companies with extensive server administration resources or expertise, as well as a significant amount of time available to take care of the server.

If you’re unsure about which service to choose, give serious consideration to choosing a managed server. While taking the managed route is more expensive, it is also much more reassuring for the inexperienced administrator. Remember, you can always downgrade your account to an unmanaged service later, once you’ve acquired some expertise in server administration - though once you opt for the personal attention you will receive through a managed host, you might think twice when the time comes to change.