简体   繁体   English

Traefik:负载均衡内部服务而不将其暴露在外面

[英]Traefik: Load balance internal service without exposing it outside

Currently, I have a frontend , backend , and tf-serving service.目前,我有frontendbackendtf-serving服务。 My current configuration exposes both frontend and backend services outside.我当前的配置对外公开了frontendbackend服务。

The service tf-serving , however, is an internal service only used by the backend service.然而,服务tf-serving是一个仅供backend服务使用的内部服务。 They communicate using the gRPC API provided by TensorFlow Serving.它们使用 TensorFlow Serving 提供的 gRPC API 进行通信。

Would it be possible for tf-serving to be load balanced too such that when I call it from the backend service, Traefik will load balance it for me? tf-serving是否也可以进行负载平衡,以便当我从backend服务调用它时,Traefik 会为我进行负载平衡?

Yes, it is possible.对的,这是可能的。 A better approach however, is to connect tf-serving service to the same network as your backend service (or create a separate network just for the two of them) and connect to it directly from backend using container name dns resolving.然而,更好的方法是将 tf-serving 服务连接到与您的后端服务相同的网络(或仅为它们两个创建一个单独的网络),并使用容器名称 dns 解析直接从后端连接到它。

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

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