Thank you all for your responses. I appreciate your efforts, but I need to clarify a few important points:
- I'm specifically using Azure App Service with scale-out capability, not Azure Container Apps.
- I do not wish to migrate to Kubernetes or AKS. Suggesting a completely different service architecture is not a solution to my current issue. If Azure App Service officially supports scale-out functionality (which it clearly does, as per the UI), then there should be a way to enable direct communication between those scaled instances.
- To reiterate my original question: Why are container instances within the same App Service and VNet being assigned IP addresses in different subnets that cannot communicate with each other? This seems like a fundamental networking configuration issue.
- I've already confirmed:
- We have a VNet configured
- Environment variables like HOSTNAME don't resolve (DNS error: "Name or service not known")
- WEBSITE_PRIVATE_IP produces "Connection refused" errors
- The container is listening on IPv6 port 8080 (via netstat), despite ASPNETCORE_URLS being set to 0.0.0.0:8181
To me it looks like that the environment variables HOSTNAME:PORT provided in the container which provided us with something like "app-name-6fd8287f:8080" (which in turn should translate into 10.0.1.xxx IP) would work is it wasn't for the DNS resolution error: "Name or service not known".
What I need is specific guidance on how to properly configure the VNet or App Service networking settings to allow direct communication between instances. This is a basic networking requirement for any scaled application and should be possible without requiring architectural changes.
Could someone from your team please address the specific networking configuration required, rather than suggesting we switch to entirely different Azure services?
Thank you.