microsoft / azure-container-apps

Roadmap and issues for Azure Container Apps
MIT License
362 stars 29 forks source link

Best networking resource for URL based routing to different container apps #327

Open adeliab opened 2 years ago

adeliab commented 2 years ago

I plan on deploying multiple internal APIs as container apps. These APIs will be triggered by a service bus subscription, HTTP call or event grid web hook.

I want to have 1 domain for these APIs and use URL based routing to map the requests to the right container app. The consumer of these APIs will be a public facing API. What would be the best networking resource for this?

Currently I'm leaning towards application gateway, but it seems like some of the features of application gateway are already supported by container app itself. Like TLS termination, HTTPS redirect, health probes. Is there a better option for this?

With TLS termination on the application gateway, would HTTP requests from the application gateway be redirected to HTTPS by container app?

If I create an internal container app environment which is only accessible through vnet, is there a way to test the deployed app from my browser? Maybe an IP exception?

kendallroden commented 2 years ago

We are investigating path-based routing because we don't support it today

cachai2 commented 1 year ago

It's on the roadmap to support path-based routing for Container Apps. In the meantime, you can achieve path-based routing using App Gateway with your container app if at a regional level, or you can use Azure Front Door at a global level.

If you want to test the deployed app through your browser, you can create a VM which is integrated with the VNet and is publicly accessible.

cachai2 commented 6 months ago

@adeliab we've recently released a blog post on how path-based routing can be achieved in Azure Container Apps today by using an nginx container as a reverse proxy. Would love to hear your feedback if this covers your scenarios and if not what is missing from the experience and what you would like to see.

Blog post: Path and hostname-based routing in Azure Container Apps with NGINX