Internal communication between back-end and front-end pods - should it be from Ingress controller?

Viewed 30

In communication between front-end micro-service and back end micro-service, which of the following is a better approach?

  1. Define ClusterIP for back end service and define DNS name in that service and send HTTP request from the client micro-service with that DNS name?

  2. Send the request to the Ingress controller and it will know to which micro-service to forward the request?

2 Answers

Both are possible. But obviously it's more convenient and secure to simply use svc name and keep traffic inside local network.

I would take approach #2, several reasons, usage of certificates, load balancer, external dns name and not a "local" service name among other things.

Related