Aliases and Promotion
Route on meaning, govern the movement
Aliases give semantic names ('champion', 'candidate') to versions so pipelines route on meaning while stage transitions handle governed movement. Together they make promotion describable and reversible.
What you will learn
- Set and query aliases for semantic addressing
- Automate promotion with alias + stage coordination
- Use aliases for instant rollback
What is this?
Aliases are named pointers to versions — champion, challenger, candidate — stable even as the version behind them changes. Stage transitions are the governed move to Production; aliases let serving, monitoring and pipelines say 'use the champion' without hardcoding version numbers, and flip instantly on promotion or rollback.
Why do you need it?
- Semantic references (champion) decouple code from version numbers.
- Promotion becomes: promote the alias an engineering material — point 'champion' at the new version after gates.
- Rollback is re-pointing an alias, which serving and monitoring already read.
- Pipeline automation stays small: compare candidate alias vs champion alias.
Mental model
Captain vs the ship's registry number
Alias vs version number
The fleet says 'call the captain' (alias) rather than remembering registry numbers. The captain can change, but the job title stays stable — and calling 'the captain' always reaches the right person. That's a champion alias.
How it works
- On promotion evidence, an alias like 'champion' is set to the passing version (and latest kept).
- Serving and monitoring read the alias, not the version number.
- The previous champion retains its alias history; a 'previous' alias eases exact rollback.
- Stage transitions still record the governed move for audit.
- Rollback sets 'champion' back to the prior version — an instant, reversible operation.
Alias-based promotion and rollback.
In production
- A matching pipeline scores against 'champion' every request; promotion doesn't touch client config.
- A regression in the new champion flips routing via the alias to 'previous' in under a minute.
- Challengers are compared live against 'champion' alias in shadow mode.
Best practices
- Establish alias conventions: champion, previous, candidate/shadow.
- Update aliases on promotion evidence, not on a whim.
- Keep alias history so rollback targets are explicit.
- Audit alias flips as seriously as stage transitions.
Common mistakes
- Hardcoding version numbers in serving, making every promotion a code change.
- Two teams writing to 'champion' without coordination.
- Promoting the alias without moving the stage, so the audit trail and routing disagree.
- Rollback by editing config manually instead of the registry alias.
Debugging tips
- 'Champion' scoring older than expected — check which version the alias currently points at.
- New model live but nobody changed code — that's the design; verify alias + stage now match.
Interview checkpoint
Hands-on lab
- Register two versions and set champion/previous aliases
- Promote a candidate by flipping the champion alias
- Roll back by re-pointing the alias
Promote with Aliases and Roll Back
25 min · intermediate
Quick quiz
During a rollback, what actually changes?
Alias flips should be as audited as stage transitions.