This section of the document provides a description of events that occur if the servers in the Enterprise Server becomes unavailable in various occasions as below:
State 1 - Normal Operation State
All client applications are connected to one of the servers in the Enterprise Server. It can be assumed that the clients are connected to the primary server at this instant. The backup server is up and running in passive mode. The backup server will not accept any client connections at this point of time. Primary and Backup servers are continuously exchanging health information over a dedicated channel. All persistent information is being stored in the 'back-end' data store through the primary server.
The above scenario is illustrated below:
State 2 - Active Server goes down
The backup server detects the primary server's failure and initiates its start up sequence. All client applications connected to the primary server detect the problem and Fiorano's runtime library internally attempts to re-connect to the secondary server. New messages published during this downtime are stored in a local repository in all client machines.
State 3 - Backup Server resumes operations
The backup Server then starts up and gets ready to take up client connections. All client applications reconnect with the secondary server once the backup server is up, such re-connections being managed automatically by the FioranoMQ client runtime system. Messages stored in the local repository (that were sent during down-time) are sent to the secondary server. All durable consumers continue to pick up messages from where they had left off.
When the primary server restarts, it detects that its backup is alive and enter into passive mode. The primary server continuously pings the backup server and initiates its startup sequence if the backup server goes down due to any reason. In this sense, the original backup is now the Primary and the original Primary is now the backup server.