Deployment strategy for maintaining integrity of replication groups

Data replication groups may be used to store data in a distributed computing environment. The data replication groups may include a set of nodes executing a consensus protocol to maintain data durably. The nodes may be executed by one or more host computer systems. In order to avoid failure of the data replication groups as safe deployment strategy is provided. The one or more host computer systems may be assigned to deployment groups where the number of hosts assigned to the deployment groups host less than a quorum of the nodes of a particular data replication group.

BACKGROUND

Organizations invest in technologies that provide customers with access to computing resources. Such services provide access to computing and/or storage resources (e.g., storage devices providing either a block-level device interface, or a web service interface) to customers or subscribers. Within multi-tier ecommerce systems, combinations of different types of resources may be allocated to customers and/or their applications, such as whole physical or virtual machines, CPUs, memory, network bandwidth, or I/O capacity. Block-level storage devices implemented at storage service may be made accessible, for example, from one or more physical or virtual machines implemented by another service.

Computer systems that provide services to customers may employ various techniques to protect the computer systems from a number of service requests that could potentially overload the computer systems. Furthermore, these computer systems may also employ various techniques to preserve customer data and customer experience during periods when the computer systems are overloaded or even experiencing failures. In general, a computer system is considered to be in an “overloaded” state if it is not able to provide the expected quality of service for at least some portion of customer requests it receives. Common solutions applied by overloaded computer systems include denying service to customers. In addition to this “overloaded” scenario, computer systems may also experience failure, including critical failure, power failure, or network failure.

To protect data, for example customer data, operational data, data being stored in data volumes, and metadata associated with such data, against failures, data is often replicated across different computer systems. However, creating consistent replicas of customer data across a plurality of computer systems requires additional resources and requires consensus on customer data across the plurality of computer systems. Additionally, there is increased cost and time required to provision computer systems to maintain replicas of customer data. While such systems may maintain the integrity of customer data and mitigate the risk of loss, there may be a reduction in customer experience and delay in customers obtaining their data.

DETAILED DESCRIPTION

In various examples described below, a data replication group fleet comprises a large number of physical host computer systems hosting an even larger number of data replication groups. For example, the data replication group fleet may consist of 1,000 physical hosts supporting 1,000,000 data replication groups, where each physical host executes a number of nodes of a number of data replication group. A data replication group may consist of a number of nodes executed by one or more host computer systems, where the nodes implement a consensus protocol, such as Paxos, to enable consistent data replication between the nodes. In general, the nodes may store replicas of a resource and/or a certain amount of data. In distributed computing systems, data replication reduces the risk of failure and mitigates possible data loss in the case of system failure. To increase efficiency and utilization of the hosts, the hosts may execute multiple nodes from multiple data replication groups, although it may not host more than one node from a single data replication group (e.g., a particular host may execute a node from replication groups A, B, and C, but may not execute two nodes for replication groups A, B, or C). For example, a single host may execute 2 to 3 nodes from 1,000 data replication groups. This may maximize the utilization of the hosts and reduce idle time. The consensus protocol may enable fault tolerance of up to n divided by 2 node failures, where n is the total number of nodes in the data replication group.

However, when maintaining a large data replication fleet that may support large numbers (e.g., millions) of data replication groups, where data replication groups may also share physical hosts, it may be difficult to deterministically select a set of physical hosts that may not endanger a majority of any data replication group. Deployment of software and/or software updates is one example of such scenario. Deployment examples include bug fix, software version upgrade, or host security patches. A deployment to all hosts in the data replication group fleet may be needed to upgrade software or other executable code maintained by the physical hosts. In most of the cases, this may require a restart which may introduce a short (or even long) down time on the hosts' receiving the deployment. This may endanger a majority of the nodes of the data replication groups executed by the host computer systems and endanger the resiliency and durability of the data replication groups. One example of a safe deployment strategy is to deploy to one host at a time, which may ensure that at any time, less than a majority of the nodes of the data replication groups executed by the host fail during or as a result of the deployment. However, this serial deployment process results in a very slow deployment cycle that can span weeks or even months. Therefore, a strategy is needed to balance between the deployment speed and safety.

In one such deployment strategy described herein the data replication group fleet may be subdivided into a static number of ‘M’ deployment groups, where M is greater than or equal to 3 and less than or equal to ‘N,’ where N is the total number of nodes in a data replication group. For example, when M equals 4, the data replication group fleet may be split into 4 distinct deployment groups. In this manner, deployments may be sent to all of the hosts in the a single deployment group at once and the amount of time required to deploy to all the hosts may be reduced. When provisioning new hosts for the data replication group fleet, the host may be evenly distributed and/or assigned into the various deployment groups. This ensures that none of the deployment groups contain a majority of the nodes of any one data replication group. Therefore, if a deployment to a particular deployment group causes the entire set of hosts in the deployment group to fail for some interval of time, the data replication groups will not lose a majority of their nodes. As a result of these deployment groups, a deployment service or other entity may safely deploy software and/or software updates concurrently to all hosts in a particular deployment group of the M deployment groups.

Additionally, this deployment strategy may require that the number of hosts in each M deployment group remains balanced or within a certain threshold to avoid affecting a majority of the nodes of a data replication group. Therefore, redistribution of hosts between the M deployment groups may be required. For example, if the difference between the highest capacity deployment group and the lowest capacity deployment group exceeds some threshold, then a number of hosts (e.g., the difference divided by 2) may be moved from the highest capacity deployment group to the lowest capacity deployment group. This difference between the groups may be checked at various times, for example, when a host is added or removed from a deployment group. For example, a replication group service responsible for maintaining the data replication groups may track the number of hosts in each deployment group and use this information to maintain a balance between the deployment groups.

FIG. 1illustrates an environment100in which a computing resource service provider may operate a replication group service102configured to manage one or more data replication groups112. The nodes104of the replication group112may store copies or replicas of data so as to provide redundancy in the event of the loss of some number of nodes104. The Replication group service102may be configured as a clustered storage system for storing customer data, metadata about customer data, or other data across a plurality of physical hosts. Such a clustered storage configuration may reduce the risk of failure and increase availability of the data replication groups112or particular nodes of the data replication groups112during network connection events and/or network connection issues. For example, the number of nodes104of the data replication group112may be selected such that the probability of a majority of the nodes104of the data replication112failing is below some threshold.

The data replication service102may maintain a plurality of data replication groups112; in turn, each data replication group112may consist of a plurality of nodes104. The data replication groups112may include replicated state machines or other storage systems configured to store data in a distributed computing environment. In various embodiments, each node104is a process, executed by a host computer system or other computer system, described in greater detail below, which participates in one or more data replication groups112. For example, for a particular data replication group112implementing the Paxos consensus protocol, each node104of the data replication group112may implement one or more roles of the Paxos consensus protocol such as the role of acceptor, proposer, and/or learner. In this manner, the nodes104of the data replication group may be responsible for the durability of customer data or other data maintained by the data replication group112.

The Paxos consensus protocol may include a family of different protocols configured to solve consensus issues in a network of unreliable processors (e.g., computer systems and networks that are subject to possible failures). The Paxos consensus protocol ensures agreement on one result and/or one operation among a group of participants, for example, the nodes104of the data replication group112. The Paxos consensus protocol may be used by replication service102and the data replication groups112to implement state machine replication and/or data replication in a distributed computing environment, such as a computing resource service provider environment100illustrated inFIG. 1. The Paxos consensus protocol may define the set of actions which may be performed by the nodes104of the data replication groups112according to one or more predefined roles included in the Paxos consensus protocol: client, acceptor, proposer, learner, and leader. In some embodiments, a single node104of a particular data replication group112may implement one or more roles at any given time. For example, a particular node104may be a leader, acceptor, and learner in accordance with the Paxos consensus protocol.

A client, which may include a computer system under the control of a customer of the computing resource service provider and/or application or other executable code executed by one or more other computer systems or services of the computing resource service provider, may issue requests to the data replication group112and/or replication service102and wait for a response. For example, the client may include a customer transmitting a storage request to an interface108of the replication service102. The interface108may include a web-services front end or other computer system interface configured to receive an application program interface (API) request and process the API request and/or direct the API request to an appropriate computer system or service for processing. In another example, the client may include another service of the computing resource service provider issuing a request to store state information of the other service on behalf of a customer. The interface108may also accept requests for other components of the data replication service102such as the management system106or a deployment system110. For example, the interface108may receive a request and/or command to update software executed by the nodes104or host computer server executing the nodes104and direct the request to the deployment system described in greater detail below.

Returning to the example above, in accordance with the Paxos protocol, acceptors implemented by one or more nodes104of a data replication group112may be collected or assembled into groups, collectively referred to as quorums. In various embodiments, a quorum includes a majority of the nodes104of the data replication group112. In various embodiments of the Paxos protocol, any message sent to an acceptor must be sent to the quorum of acceptors and any message received from an acceptor is ignored unless a copy is received from each acceptor in the quorum. A proposer, when implemented by a node104of the data replication group112, may transmit proposals to acceptors, a proposal may include a message attempting to reach an agreement on a value and/or action by the acceptors. A learner, when implemented by a node104of the data replication group112, may perform some action once an agreement is reached (e.g., transmit a response to the client). In general, any protocol that satisfies the consensus requirements of the replication service102and data replication groups112may be implemented in accordance with the embodiments described herein. Furthermore, in some embodiments, additional constraints may be placed on the consensus protocol implemented by the replication service102and data replication groups112as required. For example, the replication service102and data replication groups112may require the implemented consensus protocol to allow for the addition of a new member and/or node104to the data replication group112at some point in time after the initialization of the data replication group112.

Additionally, the number of nodes104in the data replication group112may vary depending on the latency and durability requirements of the customer, other services of the computer system, or replication service102. For example, the number of nodes104in the data replication112may be reduced if a particular service and/or customer requires reduced latency and response time. In contrast, if a customer and/or service requires higher fault tolerance and data durability, the number of nodes104in the data replication group112may be increased. A management system106of the data replication service102may be responsible for determining the number of nodes104in a particular data replication group. The management system106may be a process or other application executed by a host computer system.

Furthermore, the management system106may be responsible for creation, termination, and assignment of the data replication groups. For example, the management system106may determine that a new data replication group is to be created and may communicate with one or more other services (not shown inFIG. 1for simplicity) of the computing resource service provider in order to create the new data replication group112. The process of creating new data replication groups112is described in greater detail below. The management system106may also be responsible for assigning and/or associating a particular data replication group112to a customer or deployment group. For example, the management system106may map a particular data replication group112or address of the particular data replication group to a customer such that the particular data replication group112may receive traffic from or on behalf of the customer. In another example, the management system106may determine a number of host computer systems included in one or more deployment groups to execute nodes104of the data replication group.

The deployment system110may be a process or other application executed by a host computer system. Furthermore, the deployment system110may be responsible for maintaining a plurality of deployment groups and distributing deployments114to one or more host computer systems executing one or more nodes104of the data replication group112. The nodes104of the data replication group112may be distributed across a plurality of host computer systems such that no one host computer system executes a quorum of the nodes104of a particular data replication group. Deployments114may include any software deployment or other distribution of executable code configured to install and/or update software of a host computer system or other computer systems capable of executing the source code associated with the software. Software deployment may include all of the activities that make a software system available for use. The general deployment process may consist of several interrelated activities with possible transitions between them. These activities can occur at the software developer side, client side, or both. Various different deployments and deployment activates may be utilized in accordance with the present disclosure.

The deployment system110may manage various deployment activities such as preparing a deployment for release to the host computer systems, installing and activating the executable content included in the deployment, version tracking, updating, uninstalling, and various other activities suitable for deploying software to hosts. The deployment system110may also determine a number of deployment groups, tag host computer systems as being members of a particular deployment group, and rebalancing the deployment groups during commissioning and decommissioning of hosts. For example, a particular host may fail and therefore must be decommissioned or otherwise removed from the set of host used to execute nodes104of the data replication groups112. The decommissioning process may include determining a number of hosts in two or more deployment groups and moving one or more hosts between deployment groups to maintain that no hosts in any one deployment group executes a quorum of nodes114in a particular data replication group112.

In another example, the total number of host computer systems in the data replication group fleet may be 10,000 with each data replication group112consisting of seven nodes104, as illustrated byFIG. 1. The deployment system110or other component of the replication group service102, such as the management system106, may determine a number of deployment groups based at least in part on one or more safety constraints (e.g., that no hosts in a deployment group contains a quorum of the nodes104for any particular data replication group112). As described above, the number of deployment groups M may be determine, where M is greater than or equal to 3 and less than or equal to ‘N,’ where N is the total number of nodes in a data replication group (e.g., seven). If we select M=3, for example, then with 10,000 host computer systems there will be approximately 3,300 hosts in each deployment group. By evenly distributing the nodes104between host computer systems (e.g., by using a round robin selection strategy), the data replication group112will utilize a maximum number of 3 hosts from each deployment group (e.g., 3 hosts from group 1, 2 hosts from group 2, and 2 hosts from group 3 for a total of 7 nodes104executed by 3 host computer systems). In this example, the deployment114may be concurrently transmitted to all hosts computer systems in a particular deployment group at a given point in time with a maximum impact on 3 of the 7 nodes104of any particular data replication group.

In various embodiments, the host computer systems may be initialized and configured to execute a certain number of nodes104of one or more data replication groups112. These host computer systems may be available and idle until the replication group service102determines to utilize the resources of the host computer system. For example, when the data replication group service102receives a request for a data replication group, the data replication group service102or component thereof, such as the management system106, may select host computer systems to implement nodes104of the data replication group112based at least in part on an evenness criteria described in greater detail below. This ensures, in some embodiments, that as data replication groups112are created, later deployments114to the host providing the nodes104of the data replication groups112do not affect more than a quorum of the nodes104of the data replication groups212. In addition, when providing a deployment114to a deployment group, the deployment group may be selected based at least in part on a score associated with the deployment group described in greater detail below. For example, a deployment group with a lower score may indicate that the deployment group is healthy or the deployment114will effect a smaller number of active host computer systems.

FIG. 2illustrates an environment200in which a computing resource service provider may operate a replication group service202configured to manage one or more data replication groups212in one or more deployment groups210,214, and216. The data replication group212may be provisioned such that it may implement a consensus protocol and begin to receive traffic. Software deployments to the data replication groups, nodes204, or host computer systems implementing the data replication groups may increase latency or violate the terms of a service-level agreement (SLA). An SLA may be part of a service contract or other agreement between a computing resource service provider and a customer where a particular service is formally defined. Particular aspects of the service (e.g., scope, quality, responsibilities, latency, availability) may be agreed on between the computing resource service provider and the customer. The deployment groups210,214, and216of replication groups service202may enable the computer resource service provider to achieve a predefined level of performance as indicated in a particular SLA. For example, by ensuring availability of the data replication groups212and node204during deployment of software and/or software updates. The deployment groups210,214, and216may enable the replication groups service202to more efficiently, safely, and quickly deploy software to host computer systems executing one or more nodes of the data replication groups.

Host computer systems of the data replication group fleet may be provisioned such that nodes of the data replication groups212may be loaded into memory of the host computer systems and beginning performing operations of the data replication group212. For example, a new host computer system may be provisioned to support 10 nodes204, initially the new host may be supporting (e.g., executing) zero nodes. The new host computer system may be added to the deployment group210or tagged as a member of the deployment group210. The management system206may then determine to add a node204to a particular data replication group, for example, during creation of the data replication group212or to replace a failing node204of the data replication group212. The management system206may then select the new host computer system to execute the node204, this may cause an image of a node204to be provided to the new host computer system and instantiated by the new host computer system. Once the node204has been instantiated by the new host computer system, the node204may begin to perform operations of the data replication group212, such as executing a consensus protocol.

As described above, the replication group service202may include an interface205and management system206. Furthermore, although all of the data replication groups212illustrated inFIG. 2are members of the deployment groups210,214, and216, other configurations of data replication groups212and deployment groups210,214, and216are within the scope of the present disclosure. For example, the replication group service202may maintain one or more data replication groups212outside of or aside from the deployment groups210,214, and216. In another example, the replication group service may maintain a plurality of deployment groups210,214, and216.

The replication group service202may further include deployment group data208. Deployment group data208may consist of data corresponding to the data replication groups212, nodes204of the data replication groups212, number of deployment groups, nodes204in each deployment group, data replication groups supported by each deployment group, and any such other data as required by the management system206and/or replication group service202. Various nodes204in the various deployment groups210,212, and214may be members of the same data replication group, indicated by lines connecting the nodes204of the different deployment groups210,212, and214inFIG. 2. For example, each deployment group210,212, and214may include one node204of a data replication group consisting of three nodes204. Furthermore, the deployment groups210,212, and214may include a plurality of host computer systems, each host computer system may implement a single node204of a particular data replication group. For example, deployment group212may include 3 distinct host computer systems each executing one node204of a particular data replication group. The deployment group data208may be maintained in a database of other data stores such that the data is accessible and/or queryable by other components of the replication group service202, customer, or other services such as a deployment service. In one example, replication data group data208may maintain data to aid deployment of software updates to host computer systems executing nodes of the data replication groups212.

The data in the deployment group data208may be updated at various intervals of time. For example, the management system206may query the host computer systems, nodes204, and/or data replication groups212in order to obtain information useable to update the deployment group data208. The deployment group data208may also include information corresponding to the number of data replication groups212, nodes of the data replication group, and/or host computer systems in the deployment groups210,214, and216as well as a maximum number of each to be included in the deployment groups210,214, and216. Furthermore, the deployment group data208may include a maximum number of host computer systems to be included in the deployment groups210,214, and216, a minimum number of host computer systems to be included in the deployment groups210,214, and216, a score calculated based at least in part on a balance of nodes204between the deployment groups210,214, and216and a threshold value corresponding to the maximum allowable difference between the deployment group with the most number of host computer systems and the deployment group with the least number of host computer systems. In addition, the threshold value may correspond to the difference between the score calculated for each deployment group210,214, and216.

The replication group service202or component thereof may utilize this information to determine a rate at which new host computer systems are to be added to the deployment groups210,214, and216. The process for adding new host computer systems to the deployment groups210,214, and216may include identifying a set of physical hosts suitable for hosting a new data replication group212, initializing nodes204on the set of physical hosts to be included in the new data replication group212, initializing a consensus protocol among the nodes, validating the health of the data replication group212, and updating the replication data store208to indicate that the new data replication group212is ready to receive traffic and is a member of a particular deployment group. Validating the health of a node204and/or data replication group212may include a determination that the consensus protocol is executing correctly on the node and/or data replication group212. The consensus protocol may include a heartbeat or other messages exchanged between nodes of the data replication group212that indicate that a particular node is operating as expected. A data replication group212may be considered healthy if a quorum of the nodes of the data replication group212are operating as expected (e.g., have successfully validated the health of the node).

The deployment groups210,214, and216may include a number of host computer systems. This number of host computer systems may be initialized prior to the replication group service202assigning the host computer systems to the deployment groups210,214, and216. A request for allocating storage for a new resource, customer, or other service may then be received by the replication group service202at the interface205. The management system206or other component of the replication group service202may then select one or more host computer systems from the deployment groups210,214, and216to execute a number of nodes of the data replication group212. As described above, the host computer systems may be selected such that no select host computer systems and/or deployment group implements a quorum of the nodes of the replication group212. In addition, the host computer systems may be selected such that the number of hosts in each deployment group210,214, and216is within a ceiling. The ceiling may be calculated based at least in part on the total number of nodes in the deployment groups210,214, and216divided by the total number of deployment groups.

FIG. 3illustrates a replication group service302of a computing resource service provider environment300in accordance with at least one embodiment. The replication group service302, which may be implemented by physical hardware, is used by a computing resource service provider304to provide durable storage resources for customers and/or other services of the computing resource service provider304. The replication group service302may include a group of computing systems, such as the server computers342described in detail below, configured to manage and provide data replication groups for use by customers or other services of the computing resource service provider304. The physical hardware may include a server computer342. The server computer342may be any device or equipment configured to execute instructions for performing data computation, manipulation, or storage tasks, such as a computer or a host computer system. A server computer342may be equipped with any needed processing capability including one or more processors, such as a central processing unit (CPU), a graphics processing unit (GPU) or a digital signal processor (DSP), memory, including static and dynamic memory, buses and input and output ports that are compliant with any handshaking, communications, or data transfer protocol. The physical hardware may also include storage devices, such as storage disks and tapes, networking equipment, and the like.

A virtualization layer344may include a bare metal hypervisor or a hosted hypervisor. The virtualization layer344executing on the service computer342enables the physical hardware to be used to provide computational resources upon which one or more data replication groups and/or component thereof such as a node304, master node, or new node as described above may operate. For example, the virtualization layer344enables a particular node of a data replication group to access physical hardware on the server computer342through virtual device drivers or other executable code on the node304. The virtualization layer344may include a hypervisor or virtualization software and/or hardware. The virtualization layer344may also include an instance of an operating system dedicated to administering the data replication group or component thereof running on the server computer342. Each virtualization layer344may include its own networking software stack, responsible for communication with other virtualization layers344and, at least in some embodiments, also responsible for implementing network connectivity between the data replication group or components thereof running on the server computer342and other data replication group running on other server computers342.

Furthermore, the server computer342may host multiple virtualization layers344of the same or different types on the same server computer342as well as data replication groups of the same or different types. For example, a server computer system342may host a first node of a first data replication group and may host a second node that is a member of a second data replication group. In addition the server computer342may be a member of a deployment group such as a first deployment group310or a second deployment group312. Although only two deployment groups are illustrated inFIG. 3any number of deployment groups may be utilized in connection with the present disclosure.

The virtualization layer344may be any device, software, or firmware used for providing a virtual computing platform and/or virtualized computing resources for the data replication group and/or component thereof. The virtual computing platform may include various virtual computer components, such as one or more virtual CPUs, virtual memory, and the like. The data replication group may be provided to the customers or other service of the service provider304and the customers may store data or other information on the data replication group or component therefor. Further, the computing resource service provider304may use one or more of its own data replication group for supporting execution of its applications and providing storage for such applications.

Commands and other information may be included in an application program interface (API) call from the replication group service302or a deployment service308, described in greater detail below, to the virtualization layer344. The replication group service302enables the customers and other services of the computing resource service provider304to manage and operate the data replication group. For example, the client may transmit a request to the replication group service302to obtain log information corresponding to a particular data replication group. The request may be an API call including information corresponding to the client, the deployment service308, or the particular data replication group. The replication group service302may determine the corresponding virtualization layer344for the data replication group included in the request and transmit a command to the virtualization layer344to obtain operation logs stored locally by the data replication group.

A deployment service308may be implemented by the computing resource service provider304. The deployment service308may include a group of computing systems, such as the server computers342described in detail below, configured to manage deployment of software and/or software updates to the server computers342. The deployment service308may manage software deployments and updates for any executable code maintained by the server computers342such as operating systems, a hypervisor or other virtualization layer344, nodes304, data replication group, or any other application or software executable by the server computer system342. The replication group service302and the deployment service308may exchange deployment information. For example, the deployment service308may indicate to the replication group service302that a deployment is to be completed. In another example, the replication group service302may provide the deployment service308with information corresponding to the deployment groups such as which server computers342are in which group. The deployment service308may then use this information to execute a first and a second deployment as illustrated inFIG. 3.

The separate deployments may ensure that a quorum of the nodes304of the data replication groups are not executing a deployment at the same time. In addition, when adding new server computers342to the deployment groups, the replication group service302may add server computers according to a round robin algorithm. The round robin algorithm may assign each new server computers342to a deployment group in equal portions and in circular order, handling all deployment groups without priority. Round robin algorithms may include various scheduling algorithms configured to ensure near equal distribution. For example, with3deployment groups, new server computers342may be added to the first deployment group, then the second deployment group, then the third, and then back to the first deployment group in circular order thereby maintaining a balanced number of servers in each deployment group. Various rebalancing operations may be required as described in greater detail below.

FIG. 4is a block diagram illustrating an example of a process400for provisioning a number of deployment groups for a set of host computer systems of a data replication group fleet in accordance with at least one embodiment. The process400may be performed by any suitable system such as a management system of a replication group service as described above in connection withFIGS. 1-3. The process400includes a number of deployment groups402. The number of deployment groups may be determined such that the number of hosts in the deployment groups do not host a quorum of the nodes of the data replication groups. As described above, the number of deployment groups may be selected from a number greater or equal to M and less than N, where M is a number less than the quorum of nodes and N is the total number of nodes of the data replication group. This may ensure that any deployment to any deployment group does not affect a quorum of the nodes of the data replication groups thereby maintaining availability of the data replication groups.

The system performing the process400may then distribute host computer systems of the data replication group fleet between the deployment groups404. This may include provisioning new host computer systems or distributing previously provisioned host computer systems. Various strategies or evenness criteria may be utilized to ensure that the host computer systems are evenly distributed between the deployment groups. For example, a round robin algorithm may be used. In another example, the total number of host computer systems may be divided by number of deployment groups and that number of host computer systems may be distributed to each deployment group. The evenness criteria may include a set of rules, requirement, heuristics, operations, or other suitable mechanism for ensuring that the host computer systems are assigned to deployment groups in such a manner that no one deployment group contains a quorum of the nodes for any one data replication group. The system performing the process400may then provide deployment group information406to one or more other services, such as a deployment service or storage service.

For example, the deployment information may be stored by a storage service for use by the replication group service. In another example, the deployment information may be provided to a deployment service as described above. In variations of the process400, the deployment information may include a maximum number of host computer systems in the deployment groups, a minimum number of host computer systems in the deployment groups, a threshold within which the deployment groups may be considered balanced, and any other information suitable for ensuring that a deployment does not affect a quorum of the nodes of a data replication group. This information may be calculated by the data replication group service.

FIG. 5is a block diagram illustrating an example of a process500for deploying software to a deployment groups including a set of host computer systems of a data replication group fleet in accordance with at least one embodiment. The process500may be performed by any suitable system such as a deployment service as described above in connection withFIG. 3. The process500includes receiving a request to execute a software deployment to a data replication group fleet502. The software deployment may include executable code configured to update and/or install an application on a host computer system of the data replication group fleet. As described above, the deployment may be triggered by a software developer, computing resource service provider, customer, or other entity associated with the data replication group fleet. The deployment service or other system executing the process500may select the first/next deployment group504. The deployment groups may be any deployment group described above. Selecting one deployment group at a time to receive the deployment may ensure that a quorum of the nodes of the data replication groups implemented by the host computer systems are not executing the deployment at the same time. In addition, the deployment groups may be selected based at least in part on a variety of factors including as score as described below or any other selection mechanism suitable for determining host computer systems for deployments.

The deployment service may then provide the deployment to the selected deployment group506. Providing the deployment may include transmitting a software package or image for installation and/or execution by the host computer systems included in the selected deployment group. The deployment service may then determine if the deployment was completed successfully508. This may include receiving notifications from the host computer systems, executing tests of the host computer systems, waiting some interval of time, or any other operation that may indicate that the deployment completed successfully. If the deployment did not complete successfully, the deployment service may perform remedial operations510. These may include reverting to a previous version of an application or terminating and re-provisioning host computer systems. Any remedial operation for deployment of software or other executable code may be used in accordance with the present disclosure. In parallel or after completion of the remedial operations the deployment service may select the next deployment group and continue with the deployment. Alternatively, the deployment service may wait until completion of the remedial operation and a determination of whether the deployment was the cause of the error and therefore should be modified before providing the deployment to additional hosts.

If the deployment completed successfully, then the deployment service may determine if additional deployment groups remain512. If additional deployment groups remain, the deployment service may select the next deployment group504and continue the process500as described above. If no additional deployment groups remain, the deployment service may indicate that the deployment is complete514. This may include transmitting a notification to an entity responsible for providing the request to execute the software deployment. In another example, this may include transmitting a notification to a replication group service as described above.

FIG. 6is a block diagram illustrating an example of a process600for provisioning a set of host computer systems of a data replication group fleet in accordance with at least one embodiment. The process600may be performed by any suitable system such as a management system of a replication group service as described above in connections withFIGS. 1-3. The process600includes receiving a request to add a new host computer system to the data replication group fleet602. The request may be received as a result of replacing a decommissioned host computer system or may be a result of a management system of the data replication group service determining that addition computing resources (e.g., host computer systems) are required to provide data replication groups to customer or other services of a computing resource service provider. The request may be received at an interface as described above. Additionally, the request may indicate a number of new host computer systems to add to the data replication group fleet.

The management system may then determine a deployment group with the highest priority604. This information may be included in a database such as the deployment group information as described above. The deployment groups may initially have the same number of host computer systems but over time as host computer systems fail or new host computer systems are added the number of host computer systems in each deployment group may not be the same. A priority may be determined based at least in part on a variety of factors including a number of hosts in the deployment group, a maximum or minimum number of to be included in each deployment group, a latency of the host computer systems in the deployment groups, a type of host computer systems included in the deployment group, a failure rate of the host computer systems included in the deployment group, and/or any other additional information suitable for determining a deployment group to assign a host computer system to such that a deployment to the host computer systems in the deployment group does not affect more than a quorum of the nodes of a data replication group. In another example, the priority of the deployment groups may be determined by a round robin algorithm or other algorithm for determining priority.

In addition, if two or more deployment groups have the same priority, the management system may select a deployment group at random or based at least in part on a round robin algorithm. The management system may then add the new host computer system to the determined deployment group606. This may include updating the deployment group data as described above. The management system may then update the deployment group information608. For example, the management system may record in a data store information associated with the host computer system and the determined deployment group. In addition, this may include providing a tag or other information to the host computer system indicating to the host a particular deployment group the host computer system has been assigned to. This information may also be provided to a deployment service as described above.

FIG. 7is a block diagram illustrating an example of a process700for rebalancing a set of host computer systems between deployment groups in accordance with at least one embodiment. The process700may be performed by any suitable system such as a management system of a replication group service as described above in connection withFIGS. 1-3. The process700includes receiving a request to decommission a host computer system of a data replication group fleet702. The request may be transmitted as a result of the host computer system failing or as a result of a reduction in an amount of computing resources required to support the data replication groups. The management system may then decommission the host computer system704. For example, the management system may terminate the nodes executing on the host computer system.

The management system may then determine a score associated with one or more deployment groups706. For example, the score assigned to a particular deployment group may by the number of hosts in the deployment group. This may include querying a data base or other data store, such as the deployment information as described above. The management system may obtain a number of deployment groups and a number of host computer systems assigned to each group. In additional a variety of different mechanisms for determining a score associated with the deployment group may be used in accordance with the present disclosure. For example, the score may be based at least in part on a number of health host computer systems in the deployment group and a number of unhealthy (e.g., failed, failing, or possibility failing) host computer systems in the deployment group. In another example, the location of the host computer system (e.g., geographical location) may be a factor in determining a score associated with a deployment group. A priority may be determined based at least in part on the score. For example, a simple priority heuristic may be used to determine a higher priority for deployment groups with a higher score based at least in part on a variety of factors described above. An example of a simple priority heuristic may include a rule that the deployment group with the fewest host computer systems has the highest priority or a rule that the deployment group with the most idle host computer systems has the highest priority.

The management system may then determine a difference (e.g., delta) between the deployment group with the highest score and the deployment group with the lowest score708. The delta may be calculated by subtracting the scored determined based at least in part on the deployment information. The management system may then determine if the difference (delta) is above a threshold710. The threshold may be calculated such that if the difference is below the threshold it is ensured that no deployment group or host computer system thereof contains a quorum of the nodes of a data replication group as described above. If the difference is below the threshold710, the management system may update the deployment group information712. For example, the management system may record in a data store information associated with the host computer system and the determined deployment group. In addition, this may include providing a tag or other information to the host computer system indicating to the host a particular deployment group the host computer system has been assigned to. This information may also be provided to a deployment service as described above.

If the difference is above the threshold710, then the management system may redistribute host computer systems714from the deployment group with the greatest number of host computer systems to the deployment group with the fewest number of host computer systems. For example, the management system may determine some number of hosts to assign to another deployment group. The number of host may be determined by dividing the difference (delta) by two. Other means of determining the number of host computer systems to redistribute may be used in accordance with the present disclosure, for example, any means that prevents a deployment group from containing a quorum of the nodes of a data replication group may be utilized. For example, if redistributing the host computer systems causes too many nodes in a replication group to be from the same deployment group, those nodes may be identified and moved to another deployment group, for example, so that two nodes are from deployment group 1, two nodes are from deployment group 2, and 3 nodes are from deployment group 3. Other balancing may occur, for example if there is a potential for a single host computer system to host more than one node from any one data replication group. The management system may then update the deployment group information as described above. In variation to the process700, the process may be executed as a result of adding a new host computer system to the data replication group.

The illustrative environment includes at least one application server808and a data store810. It should be understood that there can be several application servers, layers or other elements, processes or components, which may be chained or otherwise configured, which can interact to perform tasks such as obtaining data from an appropriate data store. Servers, as used herein, may be implemented in various ways, such as hardware devices or virtual computer systems. In some contexts, servers may refer to a programming module being executed on a computer system. As used herein, unless otherwise stated or clear from context, the term “data store” refers to any device or combination of devices capable of storing, accessing and retrieving data, which may include any combination and number of data servers, databases, data storage devices and data storage media, in any standard, distributed, virtual or clustered environment. The application server can include any appropriate hardware, software and firmware for integrating with the data store as needed to execute aspects of one or more applications for the client device, handling some or all of the data access and business logic for an application. The application server may provide access control services in cooperation with the data store and is able to generate content including, but not limited to, text, graphics, audio, video and/or other content usable to be provided to the user, which may be served to the user by the web server in the form of HyperText Markup Language (“HTML”), Extensible Markup Language (“XML”), JavaScript, Cascading Style Sheets (“CSS”), JavaScript Object Notation (JSON), and/or another appropriate client-side structured language. Content transferred to a client device may be processed by the client device to provide the content in one or more forms including, but not limited to, forms that are perceptible to the user audibly, visually and/or through other senses. The handling of all requests and responses, as well as the delivery of content between the client device802and the application server808, can be handled by the web server using PHP: Hypertext Preprocessor (“PHP”), Python, Ruby, Perl, Java, HTML, XML, JSON, and/or another appropriate server-side structured language in this example. Further, operations described herein as being performed by a single device may, unless otherwise clear from context, be performed collectively by multiple devices, which may form a distributed and/or virtual system.

The data store810can include several separate data tables, databases, data documents, dynamic data storage schemes and/or other data storage mechanisms and media for storing data relating to a particular aspect of the present disclosure. For example, the data store illustrated may include mechanisms for storing production data812and user information816, which can be used to serve content for the production side. The data store also is shown to include a mechanism for storing log data814, which can be used for reporting, analysis or other such purposes. It should be understood that there can be many other aspects that may need to be stored in the data store, such as page image information and access rights information, which can be stored in any of the above listed mechanisms as appropriate or in additional mechanisms in the data store810. The data store810is operable, through logic associated therewith, to receive instructions from the application server808and obtain, update or otherwise process data in response thereto. The application server808may provide static, dynamic, or a combination of static and dynamic data in response to the received instructions. Dynamic data, such as data used in web logs (blogs), shopping applications, news services and other such applications may be generated by server-side structured languages as described herein or may be provided by a content management system (“CMS”) operating on, or under the control of, the application server. In one example, a user, through a device operated by the user, might submit a search request for a certain type of item. In this case, the data store might access the user information to verify the identity of the user and can access the catalog detail information to obtain information about items of that type. The information then can be returned to the user, such as in a results listing on a web page that the user is able to view via a browser on the user device802. Information for a particular item of interest can be viewed in a dedicated page or window of the browser. It should be noted, however, that embodiments of the present disclosure are not necessarily limited to the context of web pages, but may be more generally applicable to processing requests in general, where the requests are not necessarily requests for content.

Each server typically will include an operating system that provides executable program instructions for the general administration and operation of that server and typically will include a computer-readable storage medium (e.g., a hard disk, random access memory, read only memory, etc.) storing instructions that, when executed (i.e., as a result of being executed) by a processor of the server, allow the server to perform its intended functions.

Operations of processes described herein can be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. Processes described herein (or variations and/or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions and may be implemented as code (e.g., executable instructions, one or more computer programs or one or more applications) executing collectively on one or more processors, by hardware or combinations thereof. The code may be stored on a computer-readable storage medium, for example, in the form of a computer program comprising a plurality of instructions executable by one or more processors. The computer-readable storage medium may be non-transitory. In some embodiments, the code is stored on set of one or more non-transitory computer-readable storage media having stored thereon executable instructions that, when executed (i.e., as a result of being executed) by one or more processors of a computer system, cause the computer system to perform operations described herein. The set of non-transitory computer-readable storage media may comprise multiple non-transitory computer-readable storage media and one or more of individual non-transitory storage media of the multiple non-transitory computer-readable storage media may lack all of the code while the multiple non-transitory computer-readable storage media collectively store all of the code.

Accordingly, in some examples, computer systems are configured to implement one or more services that singly or collectively perform operations of processes described herein. Such computer systems may, for instance, be configured with applicable hardware and/or software that enable the performance of the operations. Further, computer systems that implement various embodiments of the present disclosure may, in some examples, be single devices and, in other examples, be distributed computer systems comprising multiple devices that operate differently such that the distributed computer system performs the operations described herein and such that a single device may not perform all operations.