Repository navigation
Document the Front Door origin timeout vs Container Apps cold starts - #33
Merged
Merged
Conversation
With the default of zero minimum replicas, the first request after an idle period waits for a container to start. If the Front Door profile's origin response timeout is close to or shorter than that cold start, Front Door returns 504 for the first call while later calls succeed. The README's Front Door section now explains the symptom, how to check and raise the profile-wide timeout, the min-replicas alternative, and that a non-idempotent AppendDocument should be checked before retrying. The Operating notes cold-start entry links to it, and the changelog records the addition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With the default of zero minimum replicas, the first request after an idle period waits for a container to start, which can take 30 seconds or more. When the app is published through an existing Front Door profile whose origin response timeout is close to or shorter than that, Front Door returns
504for that first call while later calls succeed. To a user it looks like random write failures.The template references the Front Door profile as
existing, so it doesn't own or change this profile-wide setting. This PR documents it instead:az afd profile show/az afd profile update --origin-response-timeout-seconds 60commands. Notes that the setting is profile-wide (range 16–240 s) and mentions thecontainerAppMinReplicasalternative. Also says that a non-idempotentAppendDocumentshould be checked withGetDocumentMetadataorCompareDocumentbefore retrying, since a write that returned504might still have been applied.[Unreleased]→ Added: one entry.Docs only. No code or template changes.
Independent review
An independent review agent checked the final diff. All seven findings are fixed in this PR:
AppendDocument, which isn't idempotent.containerAppMinReplicasis set → added "ininfra/main.bicep".az afd profile showcommand and the 16–240 s range.The reviewer verified the
azcommand and flag againstaz2.88.0 and Microsoft Learn. It also confirmed that the timeout is a profile property on Standard/Premium and that the diff has no deployment-specific names. Microsoft Learn disagrees with itself about the default timeout (30 vs 60 s), so the README doesn't state one.Testing
🤖 Generated with Claude Code