Hello, I am Dustin Kirkland a product manager at Google and your host at this year's KubeCon
Copenhagen.
I am join by one of my colleagues Jan Tattermusch, he is a software engineer at Google and a
real expert at gRPC load balancing.
Jan tell us a little about what makes gRPC load balancing essential to high availably applications in
Kubernetes.
Ok, so if I was to say it in a few words it's basically load balancing is one of the key techniques
that allows you to build scalable applications and one of the things that are maybe a little
bit less obvious also allow you to make your services more reliable and to be able to do
things like live updates.
Right.
That's a core piece of what happens in Google Kubernetes Engine.
Right?
Yes, so Kubernetes basically like you can't really not do load balancing when you are deploying
to Kubernetes.
It's simply the right way to deploy applications at scale?
Yes. Ok I understand you have a demo here for us, you want to show us how this works?
So what I have here is basically, so I have already deployed a service that has three
replicas and I am going to show you that these three replicas are here so you can see three
end points and now I am going to deploy a client on the Kubernetes cluster, so I am going to create
it based on my yaml definition i just created and when I show you the logs you can see that the client
basically reaches to all of the three existing replicas and it's doing the round balancing
using the balancer that is built into the gRPC client itself so let's now see what happens if let's
say two of my replicas die - it's going to take a little bit - now you can see one of
the, some of the last backends that we reached to its only the one last remaining
backend the other ones are unfortunate dead. They are not responding anymore?
So that is pretty much it.
I could also easily scale up.
If I wanted to.
Let's get those back.
It might take a bit longer then scaling down because, you know,
when they die they are immediately gone and it might take a little bit for the DNS resolution
to pick up and to see those things replica so I don't know if that is work immediately
But we can see a lot of our hits?
Ah there we are.
So we were hitting 115 for a long time Ok. And now we'll start to spread those across.
to 116. and so we should be reaching all of the 5 new replicas.
Excellent.
Wow.
That looks really simple
actually to set up.
I actually have some other examples that are little bit more complex then this. They are
in a public GitHub repository that's open to everyone so I welcome everyone to go ahead and try those examples.
Great, thanks Jan.
Không có nhận xét nào:
Đăng nhận xét