‫So let's assume I have three shots and that's the example we're going to build, by the way, guys,
‫on the example part of it.
‫And and these three three databases, let's say I have an important one, right?
‫So the idea of consistent things you take in and put or a strand or any user provided piece of data
‫that you can't you want to query on and you want to know which database to query on, essentially that
‫hash, you're going to give you back that instance somehow.
‫Right.
‫So let's say hashing of inputs.
‫One will give you a database.
‫Five, four, three, two.
‫You got here.
‫So every time you submit the inputs one string, it will always goes to this database.
‫Right.
‫And if you submit to somehow this goes to five, four, three, three.
‫Right.
‫And then if you have an the three that might go to server five, four, three, four.
‫Right.
‫Which is listening report five, four, three, four.
‫And then that's kind of a consistent fashion.
‫So as long as you give me always the same story, I'm going to make sure.
‫Right.
‫To always consistently hash that to the same server, to the same node, essentially.
‫And you might get another like I say again, if you submit and input to again, you can always get the
‫same output.
‫Right.
‫All right.
‫So how much you want is like how does actually this work?
‫So one implementation would be just, hey, make this input into some sort for no.
‫Right.
‫I don't know how you do this sum.
‫All this character ASCII codes convert into a binary and then shove it back to a decimal and then do
‫a modulo.
‫Right, which is the remainder of three because I have three nodes and then the input is like, I don't
‫know if it happened to be ten.
‫Right.
‫Let's say you got ten, ten.
‫Modula Three years or I divide it by three.
‫That's three and then nine and it's up to the remainder of one.
‫Right.
‫So one is you add back five, four, three, two and that equals to five, four, three, three, and
‫that goes to the server.
‫So that's how one implementation.
‫I'm not saying that is right.
‫And we're going to use one implementation.
‫And Norges, that does consistent hashing.
‫Essentially, they get an input.
‫Give me the port no back so I can connect to my database.
‫And yeah.
‫And that is called the hash rank as well.
‫Right.
‫So this is like almost like a ring.
‫And then you start, Cassandre, use this all the time with the shards that they have.
‫Right.
‫That consistent hashing ring essentially.
‫So every time you have an input, I know which which database to hit.