Ask HN: How Long Does a Deployment Take at Your Company
For example, I have a Next.js project currently deployed via Vercel and it's about 40-60 seconds before becoming available. I have heard stories of several minutes to deploy and would love to hear what kind of spread there is.
[+] [-] throwaway118899|3 years ago|reply
1-2 days. Multiple senior engineers cherry picking commits into a release branch with even more seniors doing atteststion. It’s a company-wide effort that happens every sprint. We have “staff” SREs who can’t figure out automated releases.
[+] [-] fragmede|3 years ago|reply
[+] [-] devtailz|3 years ago|reply
[+] [-] pitsnatch|3 years ago|reply
[+] [-] pprotas|3 years ago|reply
[+] [-] shoo|3 years ago|reply
To deploy the entire system, maybe it'd take a few hours: there'd be 1-2 dozen services, a few databases, probably 20+ external integrations. Usually we'd only deploy the services or components that were changing. Deploying a single service would only take a few minutes, even with human in loop manually triggering the deploy scripts.
Deploying changes was decoupled from activating changes, to avoid outages due to deployments. There were two instances of the system running in production at all times, deployed to two datacentres. It was one giant monolithic blue-green deployment sitting behind a customer-facing load balancer. Suppose the "blue" prod system is currently the live instance of the system and "green" is the dark instance. You'd deploy your new release of your component to green, then once deployment was complete and seemed stable, someone would pull the big lever on the load balancer to start forwarding customer traffic to the green instance. For a while both prod instances would receive customer traffic, until all the timeouts for customer sessions being served by the blue instance kicked in, and they established new sessions with green. Then green would be live and blue would be fully dark. It'd usually take around 5 minutes or so to completely drain traffic from an instance.
If you saw error rates spike on some component and wanted to abort, then you'd need to jam the big metaphorical lever on the load balancer the other way to direct all the traffic back again. Might take 5 minutes or so, again governed by the client session timeouts designed into the system. Usually the technical speed wasn't the bottleneck -- it's more like it'd take 15 to 60 minutes to get the business stakeholders into a room to make a decision on if they were willing to live with the errors or wanted to roll back to the old version.
In this context the real bottleneck wasn't deployment or activation time, they were both fine. The bottleneck was on the pre-release test process in staging. There was a single staging environment for dozens of services owned and maintained by different teams, which would all be tested manually in lockstep. Changes had to be planned and coordinated weeks or months in advance, to get a test window. Releases happened every four weeks or so, if your change wasn't stable in time to enter the big heavy testing phase in the integrated staging environment, you missed the boat and you had to wait 4 weeks for another try.
[+] [-] rvdginste|3 years ago|reply
[+] [-] ElfinTrousers|3 years ago|reply
The good news is, we have an engineer putting in about 70% of his time on converting this to Terraform, and every time I do a deployment, it gets a little quicker and easier.
[+] [-] manv1|3 years ago|reply
If no database migration, than maybe a minute or two (via GitHub actions).
If there is a database migration it might take a while depending on how much data needs to get moved around.
Adding columns usually takes no time. Adding indexes to a big table takes a few hours.
[+] [-] manv1|3 years ago|reply
Their rebuild-from-clean documentation worked in 2 out of 3 environments...unfortunately production was the one that it didn't work in. At this point we're like fuck it.
At least it's not Hibernate(tm).
[+] [-] aprdm|3 years ago|reply
[+] [-] theandrewbailey|3 years ago|reply
All told, maybe 30 minutes from writing code to running in production. That turnaround is extremely rare, only when an urgent hotfix is needed. Most releases are heavily tested in staging for several days before moving to production.
[+] [-] anacrolix|3 years ago|reply
[+] [-] Rev359a|3 years ago|reply
If you are in the company which has consultancy, consultants and freelancers and permanent employees - it can take ages because consultancy, consultants and freelancers are all competing each other while sucking the money from the companies. Every deployment in this case will result in a disaster because they never work with each other - they are just sucking the money and the permanent employee suffers and they start leaving for better options
If you are in the company which has talented permanent employees and good visionary leaders who work with the spirit of team building and team work I can assure you it will be as easy as pie - they work with each other and they make good results and take responsibility.
Piece of advice look for silos in your company and make them work as a team and it will take less time.
Development time can be more but deployment should always be easy if you have the right people. Try to hire right people for the right job
Deployment now a days is all cloud managed with in house or service providers like aws, google or azure and mostly offers serverless solutions as most of the databases and services are available as a service and a good DevOps would do it easily without taking much time provided if your team has people who do not like to work in silos and compete with each other
[+] [-] unknown|3 years ago|reply
[deleted]
[+] [-] liampulles|3 years ago|reply
[+] [-] iends|3 years ago|reply
We have Dev, Test, & 10+ prod regions. The service I work on takes about an hour to run tests in each region, but that involves almost 10 years of test automation, building a custom AMI on EC2, and deploying. There is also cross region AMI copying which slows things down.
To bootstrap a new region takes about 2 months for the entire product with developers kinda working in the background. My service takes about a week worth of work, but lots of external dependencies and issues pop up. We do this about once a year so its' almost not worth optimizing for.
[+] [-] vixalien|3 years ago|reply
(note this is with Vercel's [proprietary] build cache, it takes longer when there's no build cache)
[+] [-] nevon|3 years ago|reply
[+] [-] aviperl|3 years ago|reply
[+] [-] gfarah|3 years ago|reply
Lambda/Cloud Functions code: testing 1m-5m, deployment <3m. We use NX for our monorepo so we usually only deploy a fraction of all of our serverless code.
Containers: testing 5m-1h (depending on build time and type of tests), deployment 3m-10m.
Migrations: anywhere from 1m up to 1h depending on the tables/migration type and the number of affected PostgreSQL instances.
Infraestructure: anywhere from 2m up to 8h depending on what's being changed.
[+] [-] ElevenLathe|3 years ago|reply
[+] [-] tharkun__|3 years ago|reply
We can see in some of the other answers that comments assume wildly different meanings for this. From when code is pushed to it being available in production to how long it takes to start the service.
My experience include a lot of the whole spectrum. Back at a previous place, if you were unlucky, i.e. this is the start of the quarter and you made a small change that took you 5 minutes to make, you'd have to wait a quarter of a year minus 5 minutes until your change would be deployed to production during a weekend night in which the application would be taken offline (actually not fully offline, but read-only state w/ queues for write operations not delivering messages but taking them). This was for a large telecom provider's backend (ordering) systems.
To nowadays where the smallest service for our SaaS starts up in a second or two, depending on what you count. Does the cluster have room for the new pod? Yeah it's seconds. Does k8s think it needs to add a new node? Well you're gonna wait a bit. And yes some services take minutes to initialize. But no matter what, customers won't notice. Even if there's a database update that's included in the changeset that gets deployed and that runs hours per tenant (times thousands of tenants), the services will be available during that time. It has to be coded that way and be deployed in stages.
[+] [-] onelli|3 years ago|reply
[+] [-] ktrnka|3 years ago|reply
[+] [-] Oldham-Made|3 years ago|reply
[+] [-] quickthrower2|3 years ago|reply
[+] [-] devtailz|3 years ago|reply
I would probably condense my definition to how quickly can you go from new code added to someone seeing that code running (in web dev terms essentially available on some URL). So even if you had different layers of pipeline, the build artifact stage would still be included, because you can't deploy without it.
[+] [-] rozenmd|3 years ago|reply
The backend services take about two minutes.
(It's my own company, so I took the time to make deployments as fast as possible since I value short feedback loops)