gpt4 book ai didi

kubernetes - Kubernetes与Native之间的API网关性能比较。 TPS损失20%

转载 作者:行者123 更新时间:2023-12-02 11:36:55 25 4
gpt4 key购买 nike

我是Kubernetes的新手。
最近几天,我对API Gateway进行了性能测试,以比较Kubernetes和Native两种环境。
我预计两种测试都将获得类似的结果,但是第二次测试显示tps损失了20%。

如何强调:通过API网关的RestfulAPI请求。
Env 1:本地(CentOS)-结果:大约 1700 tps
Evn 2: Kubernetes -结果:大约 1350 tps
*硬件规格相同。

我不知道这是否是常见的结果。
我认为20%的损失太多。

对不起我的愚蠢问题,但我很困惑。

最佳答案

根据k8s documentation

Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.

The name Kubernetes originates from Greek, meaning helmsman or pilot.



Wikipedia还说:

Kubernetes (κυβερνήτης, Greek for "governor", "helmsman" or "captain")



显然,机长的优势不在于速度,而在于整个复杂系统整体工作的可预测性

k8s的优势是:
  • 服务发现和负载平衡
  • 存储流程
  • 自动部署和回滚
  • 自动装箱
  • 自我修复
  • secret 和配置管理

  • 如您所见,此处未提及性能提升。

    附言在HN上有 great comment关于无服务器炒作的讨论(TL; DR:缓慢和昂贵):

    It's concerning how typical the hype machine is in IT. I believe Serverless has its place and value. So does Kubernetes or many other products that are often discussed on HN.

    But let's be clear, we are talking about commercial products and there is a capital interest in selling these services to all of us devs and engineers.

    So while use cases exists and benefits wait to be reaped, as a consultant I strongly feel that we should be MUCH more insistent in pointing out when a product does not make sense instead of jumping onto the hype train.

    I am basically surrounded by "LETS TRANSFORM EVERYTHING TO KUBERNETES THIS WEEK!" exclamations, conferences are basically "DID YOU ALREADY HEAR ABOUT KUBERNETES?" and so on ...

    It reminds me of Ruby on Rails, a mature and well-developed framework used by global tech firms (correct me if wrong: Airbnb, ~Stack Overflow~, Github) to handle parts of their backend in 2019. But for half a decade now even tiny companies have been screaming around about FancyHTTPTechThisYear (tm) because scale while reporting 1/500th of the traffic of some famous Rails users.

    This is not engineering with objectives in mind, it's more akin to the gaming community yelling for a new console.

    关于kubernetes - Kubernetes与Native之间的API网关性能比较。 TPS损失20%,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58074773/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com