I have this class project which requires me to demonstrate service availability using active and backup servers with the following conditions and requirements:
A Name Server (say NS) to keep track of all the servers.
One TCP connection between each client and the server. There will be one active server (say AS) and two backup servers (say BS1 and BS2).
Heartbeat between the active server and client.
If AS fails, BS1 should handle the requests and it becomes the active server and same with BS2 if BS1 fails.
When AS comes back, BS1 or BS2 should relinquish the service and AS should be the active server
Can somebody give me an idea of how do I develop a client-server program in C to implement the above service.
A Name Server (say NS) to keep track of all the servers.
One TCP connection between each client and the server. There will be one active server (say AS) and two backup servers (say BS1 and BS2).
Heartbeat between the active server and client.
If AS fails, BS1 should handle the requests and it becomes the active server and same with BS2 if BS1 fails.
When AS comes back, BS1 or BS2 should relinquish the service and AS should be the active server
Can somebody give me an idea of how do I develop a client-server program in C to implement the above service.
Comment