Avoiding Bad Query Mixes to Minimize Unsuccessful Client Requests Under Heavy Loads
In three-tiered web applications, some form of admission control is required to ensure that throughput and response times are not significantly harmed during periods of heavy load. We propose Q-Cop, a prototype system for improving admission control decisions that computes measures of load on the system based on the actual mix of queries being executed. This measure of load is used to estimate execution times for incoming queries, which allows Q-Cop to make control decisions with the goal of minimizing the number of requests that are not serviced before the client, or their browser, times out. Using TPC-W queries, we show that the response times of different types of queries can vary significantly, in excess of 50% in our experiments, depending not just on the number of queries being processed but on the mix of other queries that are running simultaneously. The variation implies that admission control can benefit from taking into account not just the number of queries being processed, but also the mix of queries. We develop a model of expected query execution times that accounts for the mix of queries being executed and integrate that model into a three-tiered system to make admission control decisions. This approach makes more informed decisions about which queries to reject, and our results show that it significantly reduces the number of unsuccessful client requests. Our results show that this approach makes more informed decisions about which queries to reject and as a result significantly reduces the number of unsuccessful client requests. For comparison, we develop several other models which represent related work in the field, including an MPL-based approach and an approach that considers the type of query but not the mix of queries. We show that Q-Cop does not need to re-compute any modelling information in order to perform well, a strong advantage over most other approaches. Across the range of workloads examined, an average of 47% fewer requests are denied than the next best approach.