简体   繁体   English

Kubernetes 服务:IPVS 负载均衡算法

[英]Kubernetes Service: IPVS load balancing algorithm

As discovered here , there is a new kind of kube service that are IPVS and have many algorithms for load balancing.正如在这里发现的那样,有一种新型的 kube 服务是 IPVS,并且有许多负载平衡算法。

The only problem is I didn't find where those algorithms are specified.唯一的问题是我没有找到指定这些算法的位置。

My understanding:我的理解:

  1. rr : round-robin -> call backend pod one after another in a loop rr : round-robin -> 在循环中一个接一个地调用后端 pod
  2. lc : least connection -> group all pod with the lowest number of connection, and send message to it. lc : least connection -> 将所有连接数最少的 pod 分组,并向其发送消息。 Which kind of connection?哪种连接? only the ones from this service?仅来自此服务的?
  3. dh : destination hashing ->?something based on url? dh目标散列->?基于 url 的东西?
  4. sh: source hashing ->?something based on url? sh: source hashing ->?something based on url?
  5. sed : shortest expected delay -> either the backend with less ping or some logic on the time a backend took to respond in the past sed最短的预期延迟-> ping 较少的后端或后端过去响应时间的一些逻辑
  6. nq : never queue -> same as least connection? nq从不排队-> 与最少连接相同? but refusing messages at some points?但在某些时候拒绝消息?

If anyone has the documentation link (not provided in the official page and still saying IPVS is beta whereas it is stable sync 1.11) or the real algorithm behind all of them, please help.如果有人有文档链接(未在官方页面中提供,但仍然说 IPVS 是测试版,而它是稳定同步 1.11)或所有这些链接背后的真实算法,请提供帮助。

I tried: Google search with the terms + lookup in the official documentation.我试过:在官方文档中使用 terms + lookup 进行谷歌搜索。

They are defined in the code https://github.com/kubernetes/kubernetes/blob/master/pkg/proxy/apis/config/types.go#L193它们在代码中定义https://github.com/kubernetes/kubernetes/blob/master/pkg/proxy/apis/config/types.go#L193

  • rr round robin : distributes jobs equally amongst the available real servers rr round robin :在可用的真实服务器之间平均分配作业
  • lc least connection : assigns more jobs to real servers with fewer active jobs lc least connection :将更多作业分配给活动作业较少的真实服务器
  • sh source hashing : assigns jobs to servers through looking up a statically assigned hash table by their source IP addresses sh source hashing :通过源 IP 地址查找静态分配的哈希表,将作业分配给服务器
  • dh destination hashing : assigns jobs to servers through looking up a statically assigned hash table by their destination IP addresses dh目标散列:通过按目标 IP 地址查找静态分配的哈希表,将作业分配给服务器
  • sed shortest expected delay : assigns an incoming job to the server with the shortest expected delay. sed最短预期延迟:将传入作业分配给具有最短预期延迟的服务器。 The expected delay that the job will experience is (Ci + 1) / Ui if sent to the ith server, in which Ci is the number of jobs on the ith server and Ui is the fixed service rate (weight) of the ith server.如果发送到第 i 个服务器,作业将经历的预期延迟是 (Ci + 1) / Ui,其中 Ci 是第 i 个服务器上的作业数,Ui 是第 i 个服务器的固定服务速率(权重)。
  • nq never queue : assigns an incoming job to an idle server if there is, instead of waiting for a fast one; nq never queue :如果有空闲服务器,则将传入作业分配给空闲服务器,而不是等待快速作业; if all the servers are busy, it adopts the ShortestExpectedDelay policy to assign the job.如果所有服务器都忙,则采用 ShortestExpectedDelay 策略分配作业。

All those come from IPVS official documentation: http://www.linuxvirtualserver.org/docs/scheduling.html以上均来自IPVS官方文档: http ://www.linuxvirtualserver.org/docs/scheduling.html

Regards问候

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从 Kube.netes 集群外部对托管在 Kube.netes 集群内的 GRPC 服务进行客户端负载平衡? - How to do client-side load balancing of a GRPC service hosted inside a Kubernetes cluster from outside a Kubernetes cluster? Azure 云服务的负载平衡不工作 - Azure Load Balancing of Cloud Service not working GKE - 使用 Ingress 和内部负载平衡公开服务 - GKE - expose service with Ingress and Internal Load Balancing GCP:HTTP(S) 负载平衡后端服务区域选择 - GCP: HTTP(S) Load Balancing backend service region select 为什么 Elastic Load Balancing 报告“停止服务”? - Why does Elastic Load Balancing report 'Out of Service'? 具有负载平衡的 Umbraco 8 应用程序 - Umbraco 8 application with load balancing WordPress & 谷歌云平衡负载平衡 - WordPress & Load balancing on Google Cloud Balancing 非托管实例组的负载平衡 - load balancing for unmanaged instance group 对于实验“将应用程序部署到 Azure Kube.netes 服务”,为什么站点无法加载? - For the lab "Deploy Application to Azure Kubernetes Service" why does the site not load? EKS + NLB:`service.beta.kube.netes.io/aws-load-balancer-internal: true` 不适用于 `service.beta.kube.netes.io/aws-load-balancer-type: nlb` - EKS + NLB: `service.beta.kubernetes.io/aws-load-balancer-internal: true` not working with `service.beta.kubernetes.io/aws-load-balancer-type: nlb`
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM