是否使用kube-router IPVS最少连接算法,是否在同一节点或不同节点中的Pod之间实现负载平衡? [英] Does kube-router IPVS-least connection algorithm, does load balancing across pods in same node or different nodes?

查看:81
本文介绍了是否使用kube-router IPVS最少连接算法,是否在同一节点或不同节点中的Pod之间实现负载平衡?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理的应用程序在kubernetes集群中作为部署运行.为此部署创建的Pod分布在群集中的各个节点上.我们的应用程序一次只能处理一个TCP连接,并且会拒绝其他连接.当前,我们使用kube-proxy(Iptables模式)在各个节点中的Pod之间分配负载,但是Pod是随机选择的,当连接传递到繁忙Pod时,连接会断开.我可以为我的用例使用Kube-router的基于最少连接的负载平衡算法.我希望流量在各个节点上运行的各个Pod之间实现负载平衡.我可以使用Kube-router实现此功能吗?

The application which I am working on runs as a deployment in kubernetes cluster. Pods created for this deployment is spread across various nodes in the cluster. Our application can handle only one TCP connection at a time and would reject further connections. Currently we use kube-proxy (Iptables mode) for distributing loads across pods in various nodes, but pods are chosen in a random way and connections are getting dropped when its passed to a busy pod. Can I use Kube-router's least-connection based load balancing algorithm for my usecase. I want the traffic to be load balanced across various pods running in various nodes. Can I achieve this using Kube-router.

到目前为止,我知道kube-proxy的IPVS模式仅通过同一节点中的pod来负载均衡流量,因为kube-proxy是作为守护程序集运行的. Kube-router也一样吗?

As far I know kube-proxy's IPVS mode load balances traffic only across pods in same node, as kube-proxy runs as a daemon set. Is it the same with Kube-router as well?

推荐答案

Kube-proxy的IPVS模式可对位于不同节点中的Pod的流量进行负载均衡.

Kube-proxy's IPVS mode does load balancing of traffic across pods placed in different nodes.

您可以参考此博客文章,深入了解此问题:

You can refer to this blog post where have a Deep Dive into this matter: IPVS-Based In-Cluster Load Balancing Deep Dive

这篇关于是否使用kube-router IPVS最少连接算法,是否在同一节点或不同节点中的Pod之间实现负载平衡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆