This is a suggestion on how we could start implementing canaries in a more quantitative manner.
Goals
- Route any amount of traffic through specific app/api servers running release X.
- Ability to increase this amount (gradually or not)
- Have a view of how everything is going while we are at it
---> This way we could catch issues not visible when deploying to Group0 and Group1 due to low traffic, without affecting 100% of our users
Problem
Scap blindly rsyncs to app/api servers and is not aware of what. Currently we can't tell scap to deploy to a random number of servers an arbitrary version/revision of MediaWiki.
Proposed solution
We could have scap keep a state file on each server, which may include:
- the version of the last "stable" deployment (i.e. last week's train)
- the version currently deployed on the server
Example workflow:
- $ scap sync --canary=10% --version=1.33.0-wmf.6
- Check dashboards, error rates on logs
- $ scap sync --canary=20% --version=1.33.0-wmf.6
On step 3, scap will poll all servers to check which ones are already running version 1.33.0-wmf.6, calculates to how many more servers it needs to add up to 20% of traffic, and move forward with deploying to the additional servers.
We already have those functionalities partially implemented on scap, which is great :)