[英]Traefik: Load balance internal service without exposing it outside
Currently, I have a frontend
, backend
, and tf-serving
service.目前,我有
frontend
、 backend
和tf-serving
服务。 My current configuration exposes both frontend
and backend
services outside.我当前的配置对外公开了
frontend
和backend
服务。
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.