基于 AWS EKS websocket 的应用程序 - 好方法?

AWS EKS websocket based app - good approach?

我刚刚在 AWS EKS 上部署了基于 echo-server 的 websocket。我看到它 运行 稳定而且没问题,但是当我搜索实现细节时,我只找到了一些关于 nginx ingress controllerAWS application loadbalancer 的文章以及它们的很多麻烦。

我是否遗漏了我当前的原始配置中的任何内容?我需要 AWS ALB 还是 nginx 入口控制器?

谢谢大家的回复。 祝一切顺利。

Do I miss anything in my current, vanilla config?

您可能使用 which is fine if you only need to access your app locally in the cluster (ClusterIP) or using your node IP 地址 (NodePort) 公开了您的 echo-server 应用。

Do I need the AWS ALB or nginx ingress controller?

它们是不同的东西,但它们有相似的共同目标 - 让您的 websocket 应用程序在外部可用并且 . It's good solution if you have multiple deployments. So you need to answer yourself if you need some kind of Ingress Controller. If you are planning to deploy your application into production you should consider using those solutions, but probably it may be fine with service type LoadBalancer

编辑:

如果您已经在使用服务类型 LoadBalancer,您的应用程序已经可以在外部使用。 Ingress 控制器提供额外的配置可能性来配置 L7 流量路由到您的集群(Ingress 控制器通常在后台使用 LoadBalancer)。检查此 以了解有关 LoadBalancer 和 Ingress 之间差异的更多详细信息。

同时检查: