# Providing Predictable Quality of Service in a Cloud-Based Web System
## 3 Web Cloud Earliest Deadline First Method and Web Switch  
Servicing HTTP requests on a high level of quality in cloud-based web systems is crucial for many website owners. Requirements regarding the quality of web services can be different depending on the expectations of the users of the website. Presented in this article, the WCEDF method allows HTTP requests to be distributed in this way to keep the service time within the expected time limits.  
The web cloud system using the WCEDF method is devoted to work in a single region of the cloud and is composed of the following elements (Figure 1b):  
* WCEDF web switch distributing HTTP requests among availability zones in the region;
* FNRD web switches distributing HTTP requests among web servers in availability zones;
* Frontend WWW servers and backend database servers, together servicing HTTP requests.  
The most important element in the system is the WCEDF web switch receiving HTTP requests from clients (web browsers) and distributing them among availability zones in one region of the cloud system. The WCEDF web switch uses techniques of artificial intelligence to adapt to the changing environment and to learn the behavior of availability zones. Inside the zones, the intelligent FNRD web switches distribute HTTP requests among web servers.  
As was mentioned before, previous research showed that FNRD web switches working in different layers cooperate with each other achieving very good results. In the WCEDF method, it is also desired to get the effect of cooperation of web switches and to additionally achieve a new goal in decision-making. In the proposed method, the WCEDF switch working on the region should cooperate with FNRD switches working on a zone layer.  
The main aim of the proposed WCEDF switch is to make the cloud system service the request in a time that is no longer than the one adopted for a specific website. The adopted time boundaries to service the request have to be reasonable and possible to achieve even for time-consuming requests requiring more resources. It is also assumed that the system will not reject HTTP requests to guarantee the service time when the load of the web system is too high. In this case, the WCEDF web switch will do its best to make the time as short as possible.  
It should be noticed that the design of the WCEDF switch does not include all features of productive web switches used in practical applications. It lacks solutions associated with security, resistance to cyber-attacks, and a failover system used when the web server or the web switch fails.  
The proposed WCEDF web switch is composed of two main sections (Figure 2). The first one, Scheduling Section, queues the incoming requests letting the time-consuming request to be serviced first. The second, Switching Section, distributes requests in a way that keeps selected availability zones idle, ready to service time-consuming requests faster. Both sections act independently, trying to achieve a similar goal, which is servicing the request in a time shorter than the adopted value \(t_{max}\). This value determines the level of quality of service which should be achieved for a specific web system.