Issues with ECS Service Discovery and Spring Boot Connectivity

88 views Asked by At

I am encountering connectivity issues between two ECS services in AWS using Spring Boot and AWS Cloud Map for service discovery. Here is a breakdown of my setup:

**AWS Resources:**
    ECS services registered with AWS Cloud Map.
    Route 53 records with both SRV and A types pointing to the ECS services.

**Spring Boot Configuration:**
    In my Spring Boot application, I've configured the service discovery in the application.properties file.

properties

For SRV record

spring.cloud.discovery.client.simple.instances.service-name[0].uri=service-name.namespace.local

For A record

spring.cloud.discovery.client.simple.instances.service-name[0].uri=service-name-namespace.local:port

Observations:
    Both ECS services are registered correctly in AWS Cloud Map.
    Route 53 records seem accurate.
    However, the two ECS services are not able to connect internally.

Troubleshooting Steps Taken:
    Checked ECS service discovery configuration.
    Verified Route 53 record sets for both SRV and A types.
    Confirmed Spring Boot application properties match the AWS Cloud Map settings.
    Ensured security groups and network ACLs allow communication on the required ports.
    Enabled debug logging in Spring Boot for more insights.

Issue: Despite the aforementioned setup and troubleshooting steps, the ECS services are not able to connect internally. I suspect there might be an issue with the service discovery or DNS resolution.

Are there any additional steps or configurations I might be missing for ECS service discovery? How can I further diagnose and resolve the connectivity issue between the ECS services? Are there common pitfalls or best practices when integrating Spring Boot, AWS Cloud Map, and ECS for service discovery?

Any guidance or suggestions on resolving this issue would be greatly appreciated!

0

There are 0 answers