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.
### 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/
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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
TODOs
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/
Idea 1