Avoid any master; was: failover of the master server #14

Closed
opened 2014-06-04 14:18:39 +00:00 by thorsten · 1 comment
thorsten commented 2014-06-04 14:18:39 +00:00 (Migrated from devops.tsommer.org)

TODOs

  • Implement the simulated C#-Solution
  • Test the implementation
  • Replace the configuration "NumGenActiveHosts" by a proper usage of the lead server

Issue

At the moment, there must be one single master server for e.g. generating unique numbers! If that server fails, the whole data center is no longer able to work.

To provide a full failover functionallity, it is necessary that any server can become the master server.

Idea: Look to MongoDB! They using a method with votes to determine the new master. The server with the majority of the votes becomes the new master.

Source: http://docs.mongodb.org/manual/core/replication-introduction/

### TODOs - [ ] Implement the simulated C#-Solution - [ ] Test the implementation - [ ] Replace the configuration "NumGenActiveHosts" by a proper usage of the lead server ### Issue At the moment, there must be one single master server for e.g. generating unique numbers! If that server fails, the whole data center is no longer able to work. To provide a full failover functionallity, it is necessary that any server can become the master server. Idea: Look to MongoDB! They using a method with votes to determine the new master. The server with the majority of the votes becomes the new master. Source: http://docs.mongodb.org/manual/core/replication-introduction/
thorsten commented 2014-06-05 14:14:35 +00:00 (Migrated from devops.tsommer.org)

Idea 1

  • First of all, the concept of a master server must be implemented
  • A component (e.g. NumGen) can register a local callback (to a local master-server callback list). If this local server gets the master server, this callback gets called and the component can set up anything.
  • The only way a "master server" can switch, is the shutdown event. Therefore, no callback for the event "you are no longer the master server" is necessary.
  • The handler for the common URL (for the next number) should use the ICCC to get the next number from the master server
  • For the most cases, this approach will work!
  • The only special case: Someone want a number right at the moment, where the master server shuts down. At this case, the handler should re-try the ICCC message (until a timeout occurs) until the new master server is up and ready.
### Idea 1 - First of all, the concept of a master server must be implemented - A component (e.g. NumGen) can register a local callback (to a local master-server callback list). If this local server gets the master server, this callback gets called and the component can set up anything. - The only way a "master server" can switch, is the shutdown event. Therefore, no callback for the event "_you are no longer the master server_" is necessary. - The handler for the common URL (for the next number) should use the ICCC to get the next number from the master server - For the most cases, this approach will work! - The only special case: Someone want a number right at the moment, where the master server shuts down. At this case, the handler should re-try the ICCC message (until a timeout occurs) until the new master server is up and ready.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Go/Ocean#14
No description provided.