Why doesn't ECS Service Connect register new services properly?

0

I just started using ECS Service Connect and I'm seeing some weird behaviour. I have a cluster with a "web" service that handles all the incoming requests, and a couple of Rails services (App-A, App-B) that actually process the requests. If I create all the services at the same time (web, App-A, App-B) they all seem to communicate with each other without any problem.

The problem starts when I create the web and App-A services first and then wait a while (>5 hours) to create App-B service. When that happens, the web and App-A services talk to each other without any problem. However, the web service cannot see the newly created App-B service. Running ping from the web service to App-A works fine, but trying to ping App-B gives me a ping: bad address 'app-b.local' error.

Am I imagining this problem? If I re-deploy the web service it can see both App-A and App-B services just fine. It's almost like the web service doesn't update it hosts file or something but the reboot forces it to rebuild it somehow.

2 Antworten
1
Akzeptierte Antwort

Well, it looks like this is WAD (working as designed). According to this Stackoverflow post, this is a know problem with ECS Service Connect.

Oh well. I guess I'll just re-deploy my "web" service. ☹️

profile picture
RNHurt
beantwortet vor einem Monat
profile picture
EXPERTE
überprüft vor einem Monat
0

Ah, I did discover something interesting. It looks as though the ECS Service Connect agent updates the /etc/hosts file on the "web" service (somehow). Before I rebooted my "web" service the /etc/hosts file only contained entries for the App-A service. After rebooting my "web" service, the /etc/hosts file contains entries for both the App-A and App-B service.

Is there a way to force the "web" service to update it's /etc/hosts file?

profile picture
RNHurt
beantwortet vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen