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
回答済み 1ヶ月前
profile picture
エキスパート
レビュー済み 1ヶ月前
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
回答済み 1ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ