# Providing Predictable Quality of Service in a Cloud-Based Web System
## 4 Experiments and Discussion
### Testbed  
The experiments were conducted in a simulation environment for web switches working in two-layer web cloud architecture. The simulation program was written in the OMNeT++ programming tool, which provides appropriate libraries and environment for conducting networking systems simulations [47]. The program was divided into the following logical modules: HTTP request generator, WCEDF web switch, FNRD web switch, web servers, and database servers. The scheme of the simulation program is presented in Figure 4.  
Figure 4: Simulation model. The request generator in the simulation program was responsible for generating HTTP requests. It contains submodules simulating the behavior of web clients, which are web browsers controlled by human users. To get the web page, the simulated web client first downloads the HTML document and then opens up to six TCP (Transmission Control Protocol) connections in order to retrieve other elements such as pictures, js, or css files. The number of web pages downloaded by clients was modeled according to inverse Gaussian distribution (\(\mu\) = 3.86, \(\lambda\) = 9.46), whose parameters were designated on the basis of the research on real users' behavior [48]. The period of time between downloading subsequent pages was modeled according to the Pareto distribution (\(\alpha\) = 1.4, k = 1). After finishing downloading the web page, the client's process was deleted and a new one was invoked. Clients were simulating downloading web pages. Parameters of the web pages (size of downloaded objects and their types and number on the page) were the same as those in the very popular site [[https://www.sonymusic.com](https://www.sonymusic.com)]([https://www.sonymusic.com](https://www.sonymusic.com)) (accessed on 23 March 2021) [49] running on WordPress. The WCEDF web switch module was distributing HTTP requests among zones in the simulator. There are four request distribution strategies implemented in the module. The first three strategies are used and popular in AWS [10] web switches, while the last two can be classified as intelligent:  
* Round Robin (RR)--assigns HTTP requests to subsequent zones;
* Least Load (LL)--assigns incoming HTTP requests to the zone with the lowest number of serviced HTTP requests;
* Path-based routing (P)--requested resources are assigned to designated zone/web server. In the experiments, a modification of the algorithm was used. It adapted to changing load and behaved like the LARD algorithm [50]. According to this, when the server is overloaded, the service of a given type of requests is moved to the least-loaded server;
* Web Cloud Earliest Deadline First (WCEDF)--strategy presented in this article,
* Fuzzy-Neural Request Distribution (FNRD)--the FNRD strategy is in some way similar to the WCEDF strategy. It also uses neuro-fuzzy models to estimate service time. However, the FNRD strategy does not queue the requests, and the distribution algorithm chooses a web server offering the shortest service time. The FNRD web switch module was responsible for distributing requests inside zones among web servers. The switch used the following strategies: Round Robin, Least Load, Path-based routing, and Fuzzy-Neural Request Distribution (FNRD). The WCEDF and FNRD web switches were modeled in the simulation as a single queue. The distribution decision service times were measured on a real server with an Intel Xeon E5-2640 v3 processor and were as follows: LL 0.0103 \(\upmu\)s, RR 0.00625 \(\upmu\)s, P 0.0101 \(\upmu\)s, FNRD 0.2061 \(\upmu\)s, and WCEDF 0.2085 \(\upmu\)s.  
The web servers in the simulation program were composed of elements causing the most significant delays in servicing requests, namely processor and SSD drive. Both of the resources were modeled as a single queue. Also, the main memory was modeled. It acted as cache memory for the file system and used the least-recently-used policy.