Hello to all,
I would like to ask a rather peculiar question for me, I heard a teacher asked one of my colleagues this, but I have no further information about the answer, and it's killing me :)
This is the question, more or less: "How would you deal with the following situation: you have three servers and any one of them can crash at a random time. How would you make sure you do not stop receiving data, without checking more than one server at a time?"
The "without checking more than one server at a time" is a little confusing to me, and I can only think of a couple of possible solutions:
1. Connect to one of the servers and constantly checking each one of the servers(like looping through an array), and if the one you're connected to crashes, you'll just connect to the one that's one(they'll have some kind of a boolean flag or so).
2. Set some kind of a trigger(I only know about DB triggers, which are stored in the database server, I've never heard of a 'server trigger' before) if that's possible, and it'll be set to fire on the closing of a socket/connection and its body will just reconnect the client to another server, one that's on.
These options seem a little to easy to me, but I'm not quite sure I fully understand the question.
Do any of you have any ideas or have met this kind of situation in real life?
Thank you, regards