简体   繁体   English

k8s 服务内部工作台

[英]k8s service internal bench

I'm currently trying to benchmark different services deployment in a k8s cluster.我目前正在尝试对 k8s 集群中的不同服务部署进行基准测试。

It's all here , but I'll save you the dig in. The service itself is ultra simple, as well as the deployment (basically a http get), and I added an hpa, which work well.一切都在这里,但我会为您省去深入研究的时间。 服务本身非常简单,部署也很简单(基本上是一个 http get),我添加了一个 hpa,效果很好。

The bench is running inside the same cluster, on a specific node.该工作台在同一集群内的特定节点上运行。

The bench runs ok, everything seems to be working as expected.板凳运行正常,一切似乎都按预期进行。

If I take one of the results and give an extract here:如果我采用其中一个结果并在此处给出摘录:

NAME                                   CPU(cores)   MEMORY(bytes)   
bencher-deployment-cf89ddc67-bwwgb     197m         4Mi             
go-induzo-deployment-d6cbc56c6-97j62   1m           7Mi             
go-induzo-deployment-d6cbc56c6-c2w24   0m           7Mi             
go-induzo-deployment-d6cbc56c6-jh768   0m           7Mi             
go-induzo-deployment-d6cbc56c6-mfdhb   0m           6Mi             
go-induzo-deployment-d6cbc56c6-mh6mt   820m         11Mi            
go-induzo-deployment-d6cbc56c6-pktn4   939m         11Mi            
go-induzo-deployment-d6cbc56c6-vdjjj   1m           5Mi             
go-induzo-deployment-d6cbc56c6-x64jw   893m         11Mi            
go-induzo-deployment-d6cbc56c6-zhsp7   0m           5Mi             
go-induzo-deployment-d6cbc56c6-zvf9m   0m           5Mi    

     

As you can notice, the hpa is triggered, and scaled to 10 pods.如您所见,hpa 被触发,并扩展到 10 个 pod。

But as you can notice as well, the load is only balanced between 3 pods, it's not using the other ones.但是您也可以注意到,负载仅在 3 个 pod 之间平衡,而不使用其他 pod。 It seems it can only use one pod per node, and not the other ones.似乎每个节点只能使用一个 pod,而不能使用其他 pod。

Anything I would have forgotten?有什么我会忘记的吗? Is it expected?是预期的吗? Do I need to add a load balancer service to actually leverage all pods?我是否需要添加负载均衡器服务才能真正利用所有 Pod?

I forgot to make sure there is no Keep Alive in the benchmark tool.我忘了确保基准测试工具中没有 Keep Alive。

in the case of wrk, which I'm using: -H "Connection: Close"在 wrk 的情况下,我正在使用: -H "Connection: Close"

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM