IP Library Granted Patent US 9,846,624
Granted Patent B2
US 9,846,624 · App. 14/497,917 · Granted Dec 19, 2017

Fast single-master failover

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,846,624
App. No.
14/497,917
Granted
Dec 19, 2017
Kind
B2
Abstract

Techniques for switching mastership from one service in a first data center to a second (redundant) service in a second data center are provided. A service coordinator in the first data center is notified about the master switch. The service coordinator notifies each instance of the first service that the first service is not a master. Each instance responds with an acknowledgement. After it is confirmed that all instances of the first service have responded with an acknowledgement, a client coordinator in the first and/or second data center is updated to indicate that the second service is the master so that clients may send requests to the second service. Also, a service coordinator in the second data center is notified that the second service is the master. The service coordinator notifies each instance of the second service that the second service is the master. Each instance responds with an acknowledgement.

Claims (76)

1. A method comprising:

determining to switch mastership between a first service in a first data center and a second service in a second data center that is different than the first data center, wherein the first service and the second service are configured to provide the same service;

in response to determining to switch mastership between the first service and the second service:

sending, to each instance in a first set of instances of the first service, a mastership change notification, wherein the first set of instances of the first service comprises multiple instances of the first service;

waiting until each instance in the first set of instances of the first service has acknowledged that the first service is no longer a master service;

in response to determining that each instance of the first set of instances of the first service has acknowledged that the first service is no longer the master service, causing a second set of instances of the second service to be notified that the second service is the master service;

wherein the method is performed by one or more computing devices.

2. The method of claim 1 , wherein when it is determined to switch mastership between the first service and the second service, the first service is designated as a master and the second service is designated as a slave.

3. The method of claim 1 , wherein:

each instance in the first set of instances is hosted on a different node of a plurality of nodes in the first data center.

4. The method of claim 1 , further comprising, prior to determining that each instance of the first set of instances of the first service has acknowledged that the first service is no longer the master service, updating first mastership data to indicate that the first service is no longer the master service.

5. The method of claim 4 , wherein updating the first mastership data causes a service coordinator to notify each instance of the first set of instances that the first service is no longer a master service.

6. The method of claim 5 , wherein waiting comprises checking the service coordinator one or more times to determine whether each instance of the first set of instances of the first service has acknowledged that the first service is no longer the master service.

7. The method of claim 5 , wherein the service coordinator is in the first data center.

8. The method of claim 1 , wherein causing the second set of instances of the second service to be notified comprises updating first mastership data to indicate that the second service is the master service.

9. The method of claim 8 , wherein updating the first mastership data causes a service coordinator to notify each instance of the second set of instances that the second service is the master service.

10. The method of claim 9 , wherein the service coordinator is in the second data center.

11. The method of claim 1 , further comprising, prior to causing the second set of instances of the second service to be notified that the second service is the master service:

causing a set of one or more clients in the first data center to be notified that the second service is the master service.

12. The method of claim 11 , wherein causing the set of one or more clients to be notified comprises updating mastership data to indicate that the second service is the master service.

13. The method of claim 12 , wherein updating the mastership data causes a client coordinator in the first data center to notify each client in the set of one or more clients that the second service is the master service.

14. The method of claim 12 , wherein:

the mastership data is first mastership data and is stored in the first data center;

the set of one or more clients are is a first set of one or more clients;

the method further comprising:

prior to causing the second set of instances to be notified, storing second mastership data that indicates that the first service is a master service, wherein the second mastership data is used to notify a second set of one or more clients, in the second data center, that the first service is the master service;

after determining to switch mastership between the first service and the second service, causing the second mastership data to be updated to indicate that the second service is the master service.

15. The method of claim 1 , wherein waiting and causing are performed in response to executing a script on a first computing device that is communicatively coupled to a second computing device in the first data center or the second data center.

16. The method of claim 15 , wherein executing the script causes: (1) a service coordinator associated with the first data center to indicate that the first service is no longer the master service; (2) a first client coordinator in the first data center to indicate that the second service is the master service; and (3) a second client coordinator in the second data center to indicate that the second service is the master service.

17. The method of claim 1 , wherein determining to switch mastership between the first service and the second service comprises determining to switch mastership between the first service and the second service based on executing a script.

18. The method of claim 1 , wherein the first service is active when the mastership change notification is sent to each instance in the first set of instances.

19. The method of claim 1 , further comprising receiving user input, wherein determining to switch the mastership between the first service and the second service is performed in response to receiving the user input.

20. The method of claim 1 , wherein at least one instance in the first set of instances is processing a client request for the first service when the at least one instance receives the mastership change notification.

21. A method comprising:

storing first data that indicates that a first service in a first data center is a master service;

while storing the first data, storing second data that indicates that a second service, in a second data center that is different than the first data center, is a slave service;

wherein the first service and the second service are configured to provide the same service;

determining, by a service coordinator executing in the second data center, to switch mastership between the first service and the second service;

in response to determining to switch mastership between the first service and the second service and while storing the first data:

storing third data that indicates that the second service in the second data center is the master service,

sending, by the service coordinator, to each instance of one or more instances of the second service, a mastership change notification,

after sending the mastership change notification, waiting, by the service coordinator, until at least one instance of the second service has acknowledged that the second service is the master service, and

causing one or more clients in the first data center or the second data center to be notified that the second service is the master service;

wherein the method is performed by one or more computing devices.

22. One or more non-transitory storage media storing instructions which, when executed by one or more computing devices, cause:

determining to switch mastership between a first service in a first data center and a second service in a second data center that is different than the first data center, wherein the first service and the second service are configured to provide the same service;

in response to determining to switch mastership between the first service and the second service:

sending, to each instance in a first set of instances of the first service, a mastership change notification;

waiting until each instance in the first set of instances of the first service has acknowledged that the first service is no longer the master service;

in response to determining that each instance of the first set of instances of the first service has acknowledged that the first service is no longer the master service, causing a second set of instances of the second service to be notified that the second service is the master service.

23. The one or more non-transitory storage media of claim 22 , wherein the instructions, when executed by the one or more computing devices, further cause, prior to determining that each instance of the first set of instances of the first service has acknowledged that the first service is no longer the master service, updating first mastership data to indicate that the first service is no longer the master service.

24. The one or more non-transitory storage media of claim 23 , wherein updating the first mastership data causes a service coordinator to notify each instance of the first set of instances that the first service is no longer the master service.

25. The one or more non-transitory storage media of claim 24 , wherein waiting comprises checking the service coordinator one or more times to determine whether each instance of the first set of instances of the first service has acknowledged that the first service is no longer the master service.

26. The one or more non-transitory storage media of claim 22 , wherein causing the second set of instances of the second service to be notified comprises updating first mastership data to indicate that the second service is the master service.

27. The one or more non-transitory storage media of claim 26 , wherein updating the first mastership data causes a service coordinator to notify each instance of the second set of instances that the second service is the master service.

28. The one or more non-transitory storage media of claim 22 , wherein the instructions, when executed by the one or more computing devices, further cause, prior to causing the second set of instances of the second service to be notified that the second service is the master service:

causing a set of one or more clients in the first data center to be notified that the second service is the master service.

29. The one or more non-transitory storage media of claim 28 , wherein causing the set of one or more clients to be notified comprises updating mastership data to indicate that the second service is the master service.

30. The one or more non-transitory storage media of claim 29 , wherein updating the mastership data causes a client coordinator in the first data center to notify each client in the set of one or more clients that the second service is the master service.

31. The one or more non-transitory storage media of claim 29 , wherein:

the mastership data is first mastership data and is stored in the first data center;

the set of one or more clients are is a first set of one or more clients;

the instructions, when executed by the one or more computing devices, further cause:

prior to causing the second set of instances to be notified, storing second mastership data that indicates that the first service is the master service, wherein the second mastership data is used to notify a second set of one or more clients, in the second data center, that the first service is the master service;

after determining to switch mastership between the first service and the second service, causing the second mastership data to be updated to indicate that the second service is the master service.

32. The one or more non-transitory storage media of claim 22 , wherein waiting and causing are performed in response to executing a script on a first computing device that is communicatively coupled to a second computing device in the first data center or the second data center.

33. One or more non-transitory storage media storing instructions which, when executed by one or more computing devices, cause:

storing first data that indicates that a first service in a first data center is a master service;

while storing the first data, storing second data that indicates that a second service, in a second data center that is different than the first data center, is a slave service;

wherein the first service and the second service are configured to provide the same service;

determining, by a service coordinator executing in the second data center, to switch mastership between the first service and the second service;

in response to determining to switch mastership between the first service and the second service and while storing the first data:

storing third data that indicates that the second service in the second data center is the master service,

sending, by the service coordinator, to each instance of one or more instances of the second service, a mastership change notification,

after sending the mastership change notification, waiting, by the service coordinator, until at least one instance of the second service has acknowledged that the second service is the master service, and

causing one or more clients in the first data center or the second data center to be notified that the second service is the master service.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 1, 2017
From: LINKEDIN CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 044746/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 26, 2014
From: YOUNG, DOUGLAS A.; XU, ANG
To: LINKEDIN CORPORATION
Reel/Frame 033833/0054 →