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개 답변
1
수락된 답변

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
답변함 한 달 전
profile picture
전문가
검토됨 한 달 전
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
답변함 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠