Methods, systems, and apparatus, including computer programs encoded on computer storage media, for allocating a number of first containers to implement one primary segment instance each and a number of second containers to implement one mirror segment instance each. In one example system, the second containers are configured to have less computing resources than the first containers. The containers are distributed among a number of physical computers. The system receives an indication of a failure of a physical computer hosting a particular first container implementing a first primary segment instance. In response to receiving the indication, the system promotes a second mirror segment instance that is a mirror of the first primary segment instance to be a new primary segment instance. The system allocates additional resources to the particular second container implementing the promoted mirror segment instance.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A system comprising: one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform operations comprising: allocating a plurality of first containers to implement one primary segment instance each and assigning the primary segment instances to handle queries for respective partitions of a database; allocating a plurality of second containers to implement one mirror segment instance each, including configuring each second container of the plurality of second containers to have less computing resources than each first container of the plurality of first containers, wherein each second container implements a respective mirror segment instance configured to maintain a respective mirror segment for a respective primary segment used by one of the plurality of first containers; distributing the plurality of first containers and the plurality of second containers among a plurality of physical computers; receiving an indication of a failure of a physical computer hosting a first container implementing a first primary segment instance; in response to receiving the indication, performing a recovery process to instantiate a replacement for the first primary segment instance, comprising: promoting a second container implementing a second mirror segment instance to be a primary segment instance using a mirror segment corresponding to a primary segment of the first primary segment instances implemented by the plurality of first containers, wherein the second mirror segment instance is implemented by the second container of the plurality of second containers, wherein after being promoted to be the primary segment instance, the second container is configured to process query requests using the mirror segment, and allocating additional resources to the second container in response to the second container being promoted to be the primary segment instance.
2. The system of claim 1 , wherein the operations further comprise: allocating a new second container to implement a mirror segment instance of the second mirror segment instance of the promoted second container.
3. The system of claim 1 , wherein allocating additional resources to the second container comprises: determining one or more primary levels of computing resources allocated to each of the plurality of first containers; and modifying allocations of one or more computing resources of the second container to have at least the one or more primary levels of computing resources such that in response to the second container being promoted to be the primary segment instance, the second container has at least the allocated levels of computing resources allocated to each first container implementing a corresponding primary segment.
4. The system of claim 1 , wherein each first container of the plurality of first containers implements at most one primary segment instance.
5. The system of claim 1 , wherein each second container of the plurality of second containers implements at most one mirror segment instance.
6. The system of claim 1 , wherein performing the recovery process comprises instantiating the second mirror segment instance to be a primary segment instance without rebalancing the allocation of other primary segment instances to the plurality of physical computers.
7. The system of claim 1 , wherein the promoting and the allocating comprise promoting the second container and allocating the additional resources to the second container without relaunching the second container.
8. The system of claim 1 , wherein allocating additional resources to the second container comprises allocating one or more of additional processing power, memory size, or network bandwidth.
9. The system of claim 1 , wherein distributing the plurality of first containers and the plurality of second containers among a plurality of physical computers comprises allocating one or more first containers and one or more second containers on the same physical computer.
10. A method comprising: allocating a plurality of first containers to implement one primary segment instance each and assigning the primary segment instances to handle queries for respective partitions of a database; allocating a plurality of second containers to implement one mirror segment instance each, including configuring each second container of the plurality of second containers to have less computing resources than each first container of the plurality of first containers, wherein each second container implements a respective mirror segment instance configured to maintain a respective mirror segment for a respective primary segment used by one of the plurality of first containers; distributing the plurality of first containers and the plurality of second containers among a plurality of physical computers; receiving an indication of a failure of a physical computer hosting a first container implementing a first primary segment instance; in response to receiving the indication, performing a recovery process to instantiate a replacement for the first primary segment instance, comprising: promoting a second container implementing a second mirror segment instance to be a primary segment instance using a mirror segment corresponding to a primary segment of the first primary segment instances implemented by the plurality of first containers, wherein the second mirror segment instance is implemented by the second container of the plurality of second containers, wherein after being promoted to be the primary segment instance, the second container is configured to process query requests using the mirror segment, and allocating additional resources to the second container in response to the second container being promoted to be the primary segment instance.
11. The method of claim 10 , further comprising: allocating a new second container to implement a mirror segment instance of the second mirror segment instance of the promoted second container.
12. The method of claim 10 , wherein allocating additional resources to the second container comprises: determining one or more primary levels of computing resources allocated to each of the plurality of first containers; and modifying allocations of one or more computing resources of the second container to have at least the one or more primary levels of computing resources such that in response to the second container being promoted to be the primary segment instance, the second container has at least the allocated levels of computing resources allocated to each first container implementing a corresponding primary segment.
13. The method of claim 10 , wherein each first container of the plurality of first containers implements at most one primary segment instance.
14. The method of claim 10 , wherein each second container of the plurality of second containers implements at most one mirror segment instance.
15. The method of claim 10 , wherein performing the recovery process comprises instantiating the second mirror segment instance to be a primary segment instance without rebalancing the allocation of other primary segment instances to the plurality of physical computers.
16. The method of claim 10 , wherein the promoting and the allocating comprise promoting the second container and allocating the additional resources to the second container without relaunching the second container.
17. The method of claim 10 , wherein allocating additional resources to the second container comprises allocating one or more of additional processing power, memory size, or network bandwidth.
18. The method of claim 10 , wherein distributing the plurality of first containers and the plurality of second containers among a plurality of physical computers comprises allocating one or more first containers and one or more second containers on the same physical computer.
19. One or more non-transitory computer storage media storing instructions that are operable, when executed by one or more computers, to cause the one or more computers to perform operations comprising: allocating a plurality of first containers to implement one primary segment instance each and assigning the primary segment instances to handle queries for respective partitions of a database; allocating a plurality of second containers to implement one mirror segment instance each, including configuring each second container of the plurality of second containers to have less computing resources than each first container of the plurality of first containers, wherein each second container implements a respective mirror segment instance configured to maintain a respective mirror segment for a respective primary segment used by one of the plurality of first containers; distributing the plurality of first containers and the plurality of second containers among a plurality of physical computers; receiving an indication of a failure of a physical computer hosting a first container implementing a first primary segment instance; in response to receiving the indication, performing a recovery process to instantiate a replacement for the first primary segment instance, comprising: promoting a second container implementing a second mirror segment instance to be a primary segment instance using a mirror segment corresponding to a primary segment of the first primary segment instances implemented by the plurality of first containers, wherein the second mirror segment instance is implemented by the second container of the plurality of second containers, wherein after being promoted to be the primary segment instance, the second container is configured to process query requests using the mirror segment, and allocating additional resources to the second container in response to the second container being promoted to be the primary segment instance.
20. The one or more non-transitory computer storage media of claim 19 , wherein the operations further comprise: allocating a new second container to implement a mirror segment instance of the second mirror segment instance of the promoted second container.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
July 3, 2018
January 26, 2021
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.