Related the service to service communication

Hello All,

I have created a customized ingress gateway for a specific namespace and exposed it by Nodeport to access it via ALB of AWS. assume there are two services called A and B. Both services have their own GW and VS. If I want to access service A then “LoadBalancer/A” and If I want to access service B then “LoadBalancer/B”.

The question here is if Service A wants to communicate with Service B then what is the correct way of communication?

  1. Currently, we are doing a fully qualified domain name for the service<service-name.namespace.svc.cluster.local:
  2. Or the communication should have happened through the custome ingress gateway?

Please help me.

Hi @BADAL-KUMAR-SAHU,

IMO, we should use a single ingress and expose it by ALB for traffic routing. AWS ALB supported both path-based and host-based rules so you can either configure it like the below (1st option is preferred from my side).

For the communication, I would suggest not going through the GW. We can just use the svc FQDN and control the access with netpol.

Thanks,
Trung.

Thanks for the response. for the service-to-service communication, I can use svc FQDN. But when I used that, is VS is also applicable on that as well.

You’re welcome, I checked some reference architecture from Microsoft on microservices + k8s. The svc to svc communication normally goes through the svc FQNQ (service discovery).

Many samples can be found here as well: Browse Azure Architectures - Azure Architecture Center | Microsoft Learn.

Thanks,
Trung.