How multiple Docker containers meet the same URL (Microservices)

Asked

Viewed 71 times

-1

I’m starting with Docker and apply with Microservices and I was left with a question, as instance of my micro service that goes up has a new IP, how do I call a single URL I can distribute the requests among the various containers of my service?

1 answer

0


They do not answer directly. There is an intermediary, which can be a load Balancer or a reverse proxy.

On a Docker deploy, you hardly use multiple ports, you usually only use ports 80 and 443 if we’re talking http traffic.

Routing inside the Docker infrastructure is done from this principle, where we host a reverse proxy listening to these ports, and the reverse proxy has the routing and distribution settings for each scenario.

Common products/projects in this role:

  • NGINX
  • Traefik
  • Haproxy
  • Envoy

Browser other questions tagged

You are not signed in. Login or sign up in order to post.