Jump to content

Topic on Talk:Fundraising tech/Chat/Scap3

"Instant switchover"

2
CDentinger (WMF) (talkcontribs)

How does this work? Is it done with multiversion, or flipping a symlink, both or something else?

TCipriani (WMF) (talkcontribs)

Scap3 instant switchover is done via symlink swapping.

There is a full, cached checkout on each target. Each deploy, a new checkout is made using the cached checkout as a remote. Since the git clone is done locally, the object files are hardlinks, which don't consume disk-space. So each deploy is a checkout of the code, and the final deployed location is a symlink to the latest revision. When a new rev is deployed, the symlink is simply swapped from the old code version to the new version.

Rollback is also instantaneous because of this setup. If there is a problem with a post-deploy check, the deployer is prompted to rollback. If the deployer opts to rollback, the symlink pointing to the latest revision is swapped to point to the next most-recent checkout.

It should be noted that this is currently in production for many services, but not yet in production for MediaWiki deployment. There are still some details yet to be accounted for with respect to how MediaWiki is currently deployed in production.

Reply to ""Instant switchover""