8

There is a similar question here What is Stack Overflow's deployment process?, but it talks about the process with Stack Overflow, I want to know about the whole network.

How is the code deployed to all the sites in the Stack Exchange network?

Is the code deployed to all sites in the network at the same time, or is there a "priority queue"?

How much time it does it take?

How many agents are being used by TeamCity (if it's still the deployment solution being used)?

What are the specs of the deployment server?

How does the revision number at the bottom of the page work?

1 Answer 1

8

How is the code deployed to all the sites in the stackexchange network?

The process isn't different - it is done with TeamCity - just replace "Stack Overflow" with "Entire Network" and that's the answer...

The code is deployed to all sites in the network at the same time, or there is a "priority queue"?

The production codebase is deployed once - all the sites (except MSO and MSE at this time, they get deployed together, in a prior step). All the different sites share a single multi-tenant application pool in IIS, a single code base and application on each web server runs all Q&A sites.

How much time it takes?

From pushing the prod button to fully deployed, about 3 minutes. A fairly large amount of the time is spent in intentional delays - to ensure the first web server is fully up and running, before the last one starts deploying (and going offline), to ensure that there are no hiccups during deployment.

How many agents are being used by TeamCity (if it's still the deployment solution being used)?

We have 27 agents at the moment. We have one on each web server (purely for concurrent capacity) in both data centers. This simply means we aren't waiting on a build to kick off. Note: our build agents for the web are the web tier itself, though we have other agents on VMs for internal systems like Puppet, Bosun, scollector, RPMs, etc.

What are the specs of the deploy server?

TeamCity and Gitlab are on the same server. It is a dual Intel 2687W v3 proc machine with 64GB of RAM and dual 10Gb network connectivity, running CentOS 7.

How the revision number at the bottom of the page works?

year.month.day.teamcity-build-number

The teamcity-build-number is essentially an internal number that Team City maintains. It is essentially the number of times a specific build configuration has run (either automatically or by manual button click). As such, it will never go down, but if a build has been interrupted (broken build, manual override), it will not get deployed, though the counter will increment, meaning there could be gaps in that number. If a build is run on a different Team City instance (say for failover), that instance will have its own counter, so the number could change.

6
  • Excellent answer! Just maybe worth to expand a bit about the build number, e.g. explaining when it increase? Commented Feb 5, 2015 at 11:36
  • @Sha - not much to say there. It is an internal number that TC (TeamCity) maintains and increments every time a specific build is run (say production).
    – Oded
    Commented Feb 5, 2015 at 11:38
  • I know but it's not that trivial... does it ever go down? Can it skip a number? (e.g. now it's 3053, can the next build suddenly be 3055?) Commented Feb 5, 2015 at 11:40
  • 2
    @ShadowWizard yes, both could happen for a variety of reasons on the backend. For example: if we failover operations to another data center the build order may not be ensured if we're in a hurry. It serves as a map to the build so we can spot issues, the increasing nature is a side-effect but not an essential one for us. Commented Feb 5, 2015 at 13:18
  • One more thing: what about Area 51 and stackexchange.com? Do they have their own servers/deploy? Commented Feb 5, 2015 at 14:29
  • @ShadowWizard - they are different projects/solutions, but essentially follow the exact same pattern (except we don't have a meta/staging build for them). They are different sites/app-pools on IIS.
    – Oded
    Commented Feb 5, 2015 at 14:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .