Great Video 🔥 I started watching ur videos since a week ago nd I found that these are the best system design resource on the internet 🔥 by the way Sir ur handwritting is awesome 😀
great video @AsliEngineering ! One question - consider a scenario in which an "election" is in progress via LCR algorithm. The node with the highest UUID dies soon after passing its message. That means, the highest UUID keeps circling (however, its node does not exist) . What happens in this case ?
Nice. I wonder how the greatest UUID makes sure it contains all the data. Let's assume that other nodes were able to sync the data when the leader went down, but the largest UUID was unable to.
That is a different problem. Do not just think from data perspective. Think from a master cordinator whose job is to coordinate allocation of responsibilities. No need of stateful data management.
Question I have is Let's say we have ring A->B->C->D->E->A with C as leader (let's assume). Now if C goes down then how will B be able to send message to D? @Arpit can you please help understand this?
Great explanation Arpit. I have this doubt let's say nodes are in this order A->B->C->D->A and A is the leader but B goes down and then A goes down so in that case how C will be receiving messages as B is down which has the address of C?.
If the chain is broken before leader gets elected then the entire network floods for rebuilding the topology. Will be covering that 6 videos from this one.
So happy that folks are thinking of such edge cases and this would help us all realise how brittle are distributed systems and it takes so much of effort to make them robust.
@@AsliEngineering I think the need for a leader election would be when an existing leader stops responding. In that case the chain is broken. It means every time before leader election, the entire network floods for rebuilding the topology. right?
amazing series ! maybe a dumb question but what ensures a given node is being honest when it decides whether to forward received uid or send its own uid . what if some node goes rogue ?
Not a P2P network. This is your private network hence not a problem. But still to safeguard, private/public key cryptography can be used to validate the authenticity.
The assumption that nodes need to know its next neighbour to form a chain itself needs something else to rebuild when one node goes down. Thanks for sharing this, it gave me good food for thought.
I really doubt the n^2 complexity. The message will make trip max 2*n time when the first lowest uid node which initiates the message in clockwise direction would have an highest uid node present in its immediate anticlockwise position. What am I missing here?
@@AsliEngineering 😀 Got it. I thought when they're in sync, any single node can initiate the message and result will still be the same. But the problem is that there is no way of knowing who initiated in the given distributed environment assumption. Thanks
@@shantanutripathi exactly, and this is exactly what makes distributed systems fascinating and brittle. A lot of things we take for granted are thrown out of the window when we are in a distributed environment.
@@AsliEngineering hi Arpit, why does this topology smells like singly circular linked list ? What's the significance of every node pushing data at every iteration when this can be done in one go from a particular node ? Let us say none of them know who will initiate, so all of them initiate after leader fails and keeps on doing this till highest UUID node receives it's own UUID. Wouln't it be much more simpler( O(n) complexity) if failing node sends acknowledgement to next node it has address of ? Or something like a light weight ack. all nodes sending to their next node to show "Hey we're alive and active". This will not only help in leader selection but also in case slave fails, we can recover or remove it.
what exactly UID contain , is it data which this node has or something else for comparison , what are the factor to make a node to leader & one more thing if all chains break then how to figure it out neighbor node .
Great Video 🔥 I started watching ur videos since a week ago nd I found that these are the best system design resource on the internet 🔥 by the way Sir ur handwritting is awesome 😀
Thanks a ton Kalpesh 😁
great video @AsliEngineering ! One question - consider a scenario in which an "election" is in progress via LCR algorithm. The node with the highest UUID dies soon after passing its message. That means, the highest UUID keeps circling (however, its node does not exist) . What happens in this case ?
Nice.
I wonder how the greatest UUID makes sure it contains all the data. Let's assume that other nodes were able to sync the data when the leader went down, but the largest UUID was unable to.
That is a different problem. Do not just think from data perspective. Think from a master cordinator whose job is to coordinate allocation of responsibilities.
No need of stateful data management.
@@AsliEngineering ok
Question I have is Let's say we have ring A->B->C->D->E->A with C as leader (let's assume). Now if C goes down then how will B be able to send message to D?
@Arpit can you please help understand this?
Go through the comments under this video. Have answered this.
Great explanation Arpit.
I have this doubt let's say nodes are in this order A->B->C->D->A and A is the leader but B goes down and then A goes down so in that case how C will be receiving messages as B is down which has the address of C?.
If the chain is broken before leader gets elected then the entire network floods for rebuilding the topology. Will be covering that 6 videos from this one.
So happy that folks are thinking of such edge cases and this would help us all realise how brittle are distributed systems and it takes so much of effort to make them robust.
Thank you Arpit.
@@AsliEngineering I think the need for a leader election would be when an existing leader stops responding. In that case the chain is broken. It means every time before leader election, the entire network floods for rebuilding the topology. right?
amazing series ! maybe a dumb question but what ensures a given node is being honest when it decides whether to forward received uid or send its own uid . what if some node goes rogue ?
Not a P2P network. This is your private network hence not a problem.
But still to safeguard, private/public key cryptography can be used to validate the authenticity.
The assumption that nodes need to know its next neighbour to form a chain itself needs something else to rebuild when one node goes down.
Thanks for sharing this, it gave me good food for thought.
I really doubt the n^2 complexity. The message will make trip max 2*n time when the first lowest uid node which initiates the message in clockwise direction would have an highest uid node present in its immediate anticlockwise position. What am I missing here?
Each node taking a message and forwarding it. They all need to do it for every node's message.
@@AsliEngineering 😀 Got it. I thought when they're in sync, any single node can initiate the message and result will still be the same. But the problem is that there is no way of knowing who initiated in the given distributed environment assumption. Thanks
@@shantanutripathi exactly, and this is exactly what makes distributed systems fascinating and brittle.
A lot of things we take for granted are thrown out of the window when we are in a distributed environment.
@@AsliEngineering hi Arpit, why does this topology smells like singly circular linked list ? What's the significance of every node pushing data at every iteration when this can be done in one go from a particular node ? Let us say none of them know who will initiate, so all of them initiate after leader fails and keeps on doing this till highest UUID node receives it's own UUID. Wouln't it be much more simpler( O(n) complexity) if failing node sends acknowledgement to next node it has address of ? Or something like a light weight ack. all nodes sending to their next node to show "Hey we're alive and active". This will not only help in leader selection but also in case slave fails, we can recover or remove it.
@@Aditya-us5gj failing node won't have time to do it. It crashed.
Do we have a use case where this algorithm is currently implemented and used like Kalfa or somewhere else?
what exactly UID contain , is it data which this node has or something else for comparison , what are the factor to make a node to
leader & one more thing if all chains break then how to figure it out neighbor node .
Please make a video on Paxos algorithm.
Soon. On my list.
Where are these algorithms implemented..i.e on zookeeper or something where we can select the implementation we want to use
Zookeeper plugins can implement it or can run on your servers as well.
is this also called ring algo?