Azure Container Apps implements container app versioning by creating revisions. More than one revision can be active at the same time with the possibility to split external HTTP traffic between the active revisions. This is useful in our scenario where we recently made updates to our Order HTTP API code and we want to make sure this change is working as expected.
You will make needed changes to the configuration to support splitting traffic 80/20 between two revisions of the HTTP API.
The following image illustrates the steps in this challenge
- Add support for traffic splitting
- Deploy new version of Container App
- Run load testing tool to examine splitting behavior
- Add traffic split to the HTTP API app by changing existing Bicep template v3
- Deploy updated Bicep template
- Run hay tool to bulk add orders via HTTP API
- Verify that traffic is distributed between HTTP API Container App revisions
- Deployed traffic splitting with ratio 80/20 between blue and green revisions of HTTP API Container App
- Bulk add 25 orders to HTTP API (https://httpapi.[your container app environment domain]/data?message=[your message])
- Verify logs in Log Analytics for Queue Reader application that approximately 20 % of the calls include your actual message and approximately 80 % still have the GUID message from the earlier revision.
- Revisions in Azure Container Apps (learn.microsoft.com)
- curl manual (curl.se)
- Invoke-RestMethod (learn.microsoft.com)
- Monitor logs in Azure Container Apps with Log Analytics (learn.microsoft.com)
- View the solution here: Challenge 3 - Solution
- Challenge 1: Setup the environment
- Challenge 2: Deploy Container Apps Environment and troubleshoot Container Apps
- Challenge 3: Split traffic for controlled rollout
- Challenge 4: Scale Container Apps
- Challenge 5: Configure CI/CD for Container Apps
- Challenge 6: Protect Container App with API Management
- Challenge 7: Enable Container App authentication