
In computer networking, the term quality of services (QoS) describes resource management rather than the quality of a service. Quality of services implements control mechanism to provide different priority to different users, applications, and data connections. It is used to guarantee a certain level of performance to data resources. The term quality of service is often used in the field of wide area network protocols (e.g. ATM) and telephony (e.g. VoIP) but rarely in conjunction with web applications.
mod_qos is a quality of service module for the Apache web server implementing control mechanisms that can provide different priority to different requests.
But why do you need quality of service for a web application? Well, web servers require threads and processes to serve HTTP requests. Each TCP connection to the web server occupies one of these threads respectively processes. Sometimes a server gets too busy to serve every request due the lack of free processes or threads. Another parameter requiring control by mod_qos is the available bandwith: all clients communicates to the server over a network link with a limited bandwidth. Overfilling the link, results in network congestion and poor performance.
Example situations where web applications require QoS:
- More resources are consumed if request processing takes a long time by an application, e.g. when request processing includes time consuming database queries.
- Oversubscription of link capabilities due too many concurrent clients uploading or downloading data.
- Penetration of the web server by attackers (distributed denial of service attack - DDoS).