Need help?

Our experts will login to your server within 30 minutes to fix urgent issues.

Customer support or server support, make your own solution using our support configuration wizard.

Quality of Service in Web Servers

Quality of Service (QoS), a networking term that specifies an assured throughput level by providing different service levels for various types of traffic over a network. Though QoS is implemented on extremely high bandwidth required applications like IP phones and Video Streaming, the same can be efficiently implemented in web servers for improving the overall performance.

QoS make use of the Type of Service (TOS) bits in the IPv4 header. The TOS bits provide an 8-bit field of the only 4 were defined for QoS. The 4 bit TOS can be specified for the following service types: minimize delay, maximize throughput, maximize reliability, and minimize monetary cost respectively. So based on the requirement we can prioritize the traffic .

The major limitation of Web servers is that beyond a certain threshold or say, above a certain number of simultaneous requests, the web server will not be able to process the http request in a hierarchal manner or will reject requests. Apache, which is one of the most widely used web server handles the incoming requests on a First In First Out(FIFO) basis regardless of the size and type of the request and hence the overall efficiency eventually degrades on load .

We have been using lot of methods to reduce the load in the web servers like web contend caching, mirroring, maintaining cluster of servers etc. All these methods are either not that effective or complex and expensive to implement and maintain.

Here we will discuss one method to prioritize the http requests using QoS and Multi Protocol Label Switching (MPLS). In this, a short fixed-length label is generated first using the incoming IP packet and this will act as a shorthand representation of an IP packet’s header. Further routing decisions on Label Switched routers are made based on the MPLS label and not with the actual IP address. This new technology allows the network routers to operate extremely at higher speeds since it has to check only this label instead of examining the complete IP packet in detail. This helps user to develop more complex services, discriminating the incoming packet on a QoS basis. Once the packet reaches its destination, the MPLS label will be removed and the packet will be treated as a standard

The basic design of an MPLS load balancing architecture for server clusters is also discussed here

Linux can be used as a platform for the MPLS based Web switching architecture implementation since it is a POSIX compliant, UNIX clone operating system.

Using User Mode Linux (UML) is a simple and secure way to run and test multiple Linux kernels on a single PC. We use it to run multiple identical Linux Web servers using a single PC-based computer by mirroring the web content.

One usually uses Simple Network Management Protocol (SNMP) for gathering information like CPU usage, bandwidth usage and the number of active connections We can use these parameters to decide the best server in the cluster for the incoming requests. The incoming traffic may be predictable or not. In the first case, we can use static algorithms to find the server having lesser load. This is a very rare possibility since in almost all the cases the traffic towards the web server will be unpredictable and we can use adaptive algorithms to route the traffic to the server having optimal server.

The Web switches act as a front-end dispatcher between the Internet connection and the box. All the client requests will use the dispatcher IP as a destination address, to make the requests. The switch then forwards the requests to different Web servers based on various load balancing algorithms implemented in the switch. The decision can be based on the content of the request. Using source IP address alone to create affinities between client and server will not work well since some companies use proxy servers that change the source IP of the request. Therefore, all the re-quests from behind the proxy will have the same IP thus the whole network behind the proxy will be treated as a single computer.

We used the host for the UML Web servers as a dispatcher also running MPLS. A script or C program can be used to decide the optimal server based on a round-robin algorithm or a load balancing function.


The traffic in the web servers are getting increased along with the number of connections and number of services offered. In this scenario, the concept of QOS will have an important role in accelerating the response time of web servers, even though the software implementation of QOS in Linux is a real tedious task over the hardware QOS routers from Cisco and other major vendors.

Articles by Jayesh Lal About the author:
Jayesh Lal works in and specializes in System administration for Datacenters.

Bobcares is a server management company that helps businesses deliver uninterrupted and secure online services. Our engineers manage close to 51,500 servers that include virtualized servers, cloud infrastructure, physical server clusters, and more.