DeployInfra
← All articles

How we cut deploy time 5x with parallel builds

A year and a half ago, a typical deploy for one of our clients took about 40 minutes: the frontend, backend and migrations built sequentially in a single pipeline, and any failure on the last step rolled everything back to zero.

The first step was splitting the pipeline into independent jobs with no shared data dependencies — the frontend, backend and static assets now build in parallel instead of one after another.

The second step was caching build artifacts between runs: dependencies that haven't changed are no longer rebuilt every time, they're pulled from storage instead.

The third step was moving database migrations into a separate, reversible step with a pre-apply check, so a failed migration no longer blocks the rest of the deploy.

As a result, average deploy time dropped from 40 to 8 minutes, and rollbacks caused by CI timeouts fell to almost zero.