Proactive and reactive approaches for dynamic workloads
Many systems are designed to handle workloads with characteristics that are assumed to be static. Today's distributed systems, however, need to support a wide range of applications that incur dynamic workloads. As a result, the ability of a distributed system to adapt its operation to changing workloads is becoming an increasingly important property. There are two main types of approaches for supporting adaptivity: reactive approaches, which enable reconfiguration in response to a particular workload change, and proactive approaches, which continuously reconfigure the system in order to meet the demands of expected workload variations. The type of approach a system can use depends highly on the available knowledge on the targeted workload. On the one end of the spectrum there are workloads whose changes can be accurately predicted, for example in the case of well- known periodic effects related to the access patterns of a particular service. Proactive approaches are a good candidate for such workloads since they can exploit prior knowledge of the workload's characteristics and drive the system to configurations that better suit the target workload. On the other end, there are workload changes that are very difficult to predict, e.g. attacks issued against the system in order to degrade some aspect of its operation. For unexpected workload changes, reactive approaches can be used to reconfigure the system when such changes are detected. The focus of this dissertation is on designing and implementing distributed systems that support adaptivity. We present two main approaches, one proactive and one reactive, for dealing with two different kinds of dynamic workloads. The first describes proactive cache placement strategies for a cooperative cache built from individual client caches in an online social network or web service. We evaluate these strategies through simulations and compared with other common placement strategies under different workload scenarios. The second approach proposes a new asynchronous consensus protocol that we call \emph{Turtle Consensus}. Turtle Consensus works by reactively reconfiguring the consensus strategy as well as the set of nodes upon which the strategy is executed in order to deal with denial-of-service attacks. We use the resulting protocol to implement a state machine replication protocol which is evaluated against various adversarial scenarios. The results suggest that Turtle Consensus can achieve great performance under benign scenarios and comparable performance while under attack. This thesis presents actionable results from two ends of a spectrum of approaches to on-the-fly adaptation in distributed systems. While it is not the first to show examples of adaptive systems or argue its importance, our contributions significantly advance the state-of-the-art by pushing on boundaries at the ends of the spectrum of reactive and proactive approaches.