# Dynamic Cost-Aware Routing of Web Requests
## 8 Results
### Impact of the Offered Load and the Price Scenario  
Table 1 shows the electricity price rates for each of the four servers used in our tests under each of the two scenarios. The rates are given in cents per kWh. The selected values correspond to typical average electricity rates that are currently in use in different states in the U.S [43]. In price scenario-I, servers \(s1\) and \(s2\) are located in regions with the lowest electricity prices. As server \(s2\) lack any configured delay, it is commonly the optimal server, at least under low load, with the selected values. In contrast, in price scenario-II, servers \(s3\) and \(s4\) have lower prices than the first two servers. Server \(s4\) is configured with lower delay than \(s3\) and hence it is the optimal server for most requests generated in this scenario. Measurements for the total average electricity cost and the average delay are plotted in Figures 8 and 9 for \(k=0.9\) (i.e., revenue losses due to high response times are given higher importance than raw energy costs). Figure 8a,b shows that the proposed approach performed similar to the MC method and outperformed \(RR\) in both price scenarios with \(\alpha=0.1\). Figure 8c,d shows that CA-S has out performed both \(RR\) and MC in price scenario-I and performed similarly to MC and better than \(RR\) in price scenario-II for \(\alpha=0.9\). From Figure 9a-d, it is clear that CA-S has outperformed both \(RR\) and MC with lower average delays for both values of \(\alpha\) in price scenario-I and performed similar to MC or better than \(RR\) in price scenario-II. In price scenario-I, as the fastest server also has the lower price, the average delay was optimal. In price scenario-II, server \(s4\) has the lowest price with a configured delay of 5.0 ms \(\pm\) 2.0 ms. The proposed method selects \(s4\) most of the time when attempting to optimize the combined cost, producing an increase on the average delay. We have verified the number of requests serviced by each server in both cases using traffic server logs. Figure 10 depicts the combined cost incurred by the different algorithms used in this study under price scenario-I. The proposed CA-S method performed better than RR for both values of \(\alpha\) and both values of \(k\), except for high values of \(\lambda\) (see Figure 10a). In this price scenario, the CA-S method performed generally better than MC for \(\lambda\) values up to approximately 200 req/s. When \(\alpha=0.9\) and \(k=0.9\), the CA-S method produced better costs than MC. When giving higher importance to the current cost (i.e., \(\alpha=0.9\)), the most recent variations of both energy and delay costs are better tracked and the rewards and penalties update the action probabilities faster. Thus, higher values of \(\alpha\) makes the selection better adaptive, which yields lower costs. These results are consistent with our observations obtained in simulation for low to medium traffic rates. We also observed that a high value of \(k\) in price scenario-I produced lower costs. Figure 9: Average delay with CA-S tested in CloudLab. Figure 11 describes the combined cost incurred by using all of the three algorithms under price scenario-II. The CA-S method performed better than RR for both values of \(\alpha\) and for both values of \(k\). Again, CA-S performed better than MC for \(\lambda\) values up to 200, but, after that point, performance decreases as shown in Figure 11. As indicated by Figure 11,d, CA-S performed about the same as the MC method. The high value of \(k\) helps the LA to optimize energy costs with more importance than delay. Server \(s4\) was therefore selected more frequently. As \(s4\) has an artificial delay associated with it, the combined cost increased and hence performance decreased. As shown in Figure 11, it shows superior performance than MC. A small value of \(k\) (0.2) reduces the importance given to energy cost increasing the selection probability of \(s2\) and \(s4\). In addition, a high value of \(\alpha\) helps to update the selection probabilities.