Build-versus-buy is usually argued as a one-time cost comparison with a spreadsheet attached. It is actually a decision about what your organisation will be on the hook for over the next five years, and about which failure you would rather have: the system nobody can maintain, the vendor you cannot leave, or the open-source project you quietly forked and stopped upgrading. Most senior engineers have lived all three. This chapter is about making the call deliberately — and knowing when to make it again.
Every experienced team can build a feature-flag service, a workflow engine or a metrics pipeline. Capability is never the constraint, which is why arguing about it goes nowhere. The useful question is whether owning it changes an outcome customers pay for. The standard answer — build what differentiates, buy commodity — is right but underspecified, because differentiation is a property of the interface to your business, not of the component. Search ranking can differentiate; the inverted index underneath it does not. A marketplace’s payout rules differentiate; card acquiring does not. The recurring move is to split the capability at the seam: buy the engine, own the thin layer where your business logic meets it.
The second axis is the one teams forget: fit gap, how far your actual requirement sits from what the market sells. A commodity capability with a large fit gap is the most dangerous quadrant on the map. Teams there talk themselves into building a workflow engine or an internal developer platform because ‘our needs are special’, when what is special is usually an accident of history — an old data model, a process nobody questioned. The correct response in that quadrant is to re-litigate the requirement before writing code. In our experience most such requirements do not survive a direct question to the business owner about what breaks if the vendor’s default behaviour is accepted; the ones that do are usually the seam described above, not a reason to build the whole engine.
The top-left quadrant is where most expensive mistakes live: commodity capabilities that a team has convinced itself need bespoke behaviour. The fix there is almost always to change the requirement, not to build. Positions are illustrative and company-specific — a ledger is commodity for a SaaS company and the product for a fintech.
Two properties of this map matter more than where any single dot sits. First, everything drifts left. What was differentiating in 2012 — container scheduling, log search, stream processing, and vector search as recently as 2021 — becomes a product category, and your in-house version stops being an advantage and becomes a liability you maintain at your own expense. A build decision therefore carries an implicit bet on how long the capability stays differentiating; if the honest answer is ‘until a vendor catches up in two years’, the build must pay back in two years. Second, the map is company-specific. A ledger is a commodity for a SaaS company and the entire product for a payments company. Copying another firm’s build list — the familiar ‘Netflix built it, so should we’ — imports their differentiation map, not yours.
Architect's note · the 18-month test
The procurement comparison almost always pits a vendor’s annual price against the engineering estimate for v1. Both numbers are wrong in the same direction. For a build, v1 is typically a third or less of the three-year cost: after it ships come the long tail of feature requests from every consuming team, dependency and security upgrades, the on-call rota, SOC 2 and audit evidence, documentation for new joiners, and the migration when the original design meets a scale it was not built for. For a buy, the licence is often the smaller half: integration, the admin role that appears in year one, the workaround scripts that fill the fit gap, and — the big one — pricing that scales with your success. For a self-run open-source adoption, the licence is zero and the cost is people: operating it, upgrading across major versions, and carrying whatever patches you add.
The model below is deliberately simple and explicitly illustrative, but its shape is the lesson. A usage-priced product whose volume grows with traffic at about 80% a year looks cheaper than building on the 36-month cumulative view — and yet its monthly run-rate passed the build’s around month 20. The next decision is about the next 36 months, not the last: in this model, the following three years of the usage-priced vendor cost roughly five times what continuing to run the in-house version would. Cumulative-cost charts in procurement decks systematically hide this, because they average over the cheap early period. Always compare forward run-rates at projected volume, not historical totals.
Build
0.67 EY to v1, then 0.6 EY/yr sustain + on-call
Buy · usage
$50k integration; $4k/mo growing 5%/mo (~80%/yr) + $2k/mo admin
OSS self-run
0.3 EY setup; 0.4 EY/yr ops + $1.5k/mo infra; $40k per major upgrade
Buy · flat
$50k integration; $5k/mo licence + $2k/mo admin
Three corrections make the model honest. Opportunity cost: for a company with runway measured in months, the build’s real price is not $570k but the product work those engineers did not ship — which is why the same arithmetic produces opposite answers at different stages (1.6). Volume discounts: usage-priced vendors negotiate, and a committed-spend contract can flatten the pink curve substantially; the real risk is the team that never renegotiates and only notices at the renewal. Maintenance is not constant: a built system’s sustaining cost rises as its authors leave and its assumptions age — the dynamics of that interest rate belong to Managing Technical Debt Deliberately, the next chapter.
Decompose the build line and the bias becomes visible. The proposal presents v1 because v1 is what the proposing team can see and estimate; everything after it is work that other people will ask for. In the illustrative split below, the consumer feature tail is almost as large as v1 itself — six consuming teams each asking for ‘one small thing’ a year at a week or two apiece is more than half an engineer-year over three years, before anyone counts the review and coordination around it. On-call and operability is the next line, and it is the one Q3 in 1.5 is designed to force into the open. Compliance evidence is small in absolute terms but lands on the most senior people at the least convenient time: an auditor asking for access reviews, change-approval records and backup-restore evidence for a system that was built without any of them.
The buy column has its own hidden lines, and they cluster in the first six months. A realistic integration of a bought SaaS component into a mid-size estate — SSO and SCIM, a data sync into your warehouse, webhook consumers with idempotent handling, secrets rotation, a security questionnaire and DPA, alerting on the vendor’s health, and a runbook for its outages — is, illustratively, 8–12 engineer-weeks, spread across three or four teams who did not budget for it. That is the $50k in the model. The point is not the number but the distribution: the build cost lands on one team that asked for it, while the integration cost lands on many teams that did not, so it is systematically under-counted in the proposal and systematically resented afterwards. A useful discipline is to require the proposing team to name, in the decision record, every team that will do work as a result of the decision and roughly how much.
Finally, check the sensitivity before trusting the output. In the model above, the build-versus-usage decision flips on two inputs: the vendor’s volume growth rate and the build’s sustain cost. At 20% a year volume growth instead of 80%, the usage run-rate does not overtake the build’s until around month 63, and buying wins on any horizon a CFO cares about. Double the build’s sustain to 1.2 EY a year and the crossover slides from month ~20 to month ~36 — still a build win on the forward view at 80% growth, but now one that depends entirely on the growth forecast being right. If the decision flips inside the plausible range of an input, that input is the decision — spend the analysis effort narrowing it (a volume forecast, a negotiated price schedule, a staffing commitment in writing) rather than polishing the rest of the spreadsheet.
~⅓
v1 share of 3-yr build cost (typical)
0.5–1 EY
sustain for a ‘small’ internal system
Run-rate
compare forward, not cumulative
Renewal
where usage pricing bites
Pitfall · the headcount that doesn’t appear
Lock-in is not a property of the vendor; it is a property of how much of your system has grown around it. It accrues in discrete steps, each approved locally by someone solving a real problem: a second service calls the API, SSO and SCIM get wired up, five services consume its webhooks, operations writes 140 rules in its DSL, finance builds month-end on its reports. None of those steps went through an architecture review, and together they move the exit cost past the cost of building the thing yourself — the point at which you are locked in in practice, whatever the contract says.
1 REST client in 2 services
2 SSO + SCIM provisioning
3 webhooks consumed by 5 services
4 140 rules in the vendor’s DSL
5 finance month-end runs on vendor reports
6 3 years of history only queryable in-vendor
7 code silently depends on vendor retry/order semantics
8 two people whose job is administering the tool
The expensive steps are rarely the API calls. They are data gravity — years of history that exist only in the vendor’s store, in the vendor’s schema — and behavioural coupling: code that silently depends on the vendor’s retry policy, ordering, idempotency window or rate-limit shape. Behavioural coupling does not appear in any dependency graph and is discovered only during migration, when the replacement is ‘API compatible’ and production still breaks. This is also why the classic hedge fails. A vendor-agnostic abstraction layer protects the API surface, which is the cheap part to change; it does nothing for data or semantics, and it forces you onto the lowest common denominator of every provider you pretend to support. You pay the abstraction tax every day to save a migration that, if it ever comes, will be dominated by the parts the abstraction does not cover.
What works instead: own the data model (replicate the canonical records into your own store continuously, so the vendor holds a copy rather than the original); keep the seam at a business-meaningful boundary — ‘send notification’, ‘evaluate entitlement’ — rather than wrapping the vendor’s primitives one to one; and rehearse the exit once a year by running a full export and loading it somewhere else. An export that has never been exercised is a hypothesis, not a guarantee.
There is a second kind of lock-in that procurement never prices: operational lock-in on the request path. Every vendor called synchronously while serving a user multiplies into your availability. Three bought services at typical published SLAs on the same path turn a 99.95% service into roughly 99.7% — about 26 hours a year of potential user-visible failure instead of four and a half — and that arithmetic assumes independent failures, which is optimistic when half your vendors run in the same cloud region. Worse, during a vendor incident your MTTR is their MTTR: your on-call engineer can confirm the problem, post a status update and wait. Service credits refund a slice of the vendor’s fee, not your lost revenue or the enterprise customer’s SLA credits you now owe.
The design response is to decide, per bought dependency, whether it is on the path, beside the path, or behind the path. Feature flags evaluated from a locally cached ruleset, email sent through a queue, analytics fired asynchronously — each converts a hard dependency into a degraded mode. Auth and payments usually cannot be moved off the path, so they deserve explicit failure behaviour: how long a cached session stays valid when the IdP is down, whether checkout queues or fails. The build-versus-buy review should ask this question of every candidate vendor, because the answer often decides between two otherwise equal products: the one with an SDK that evaluates locally and survives the vendor’s outage is worth materially more than the one that makes a network call per decision.
Vendor risk has four distinct shapes, and they need different mitigations. Repricing after acquisition: Broadcom’s acquisition of VMware, completed in late 2023, ended perpetual licences in favour of subscription bundles, and many customers faced sharp increases at renewal — mitigated by renewal caps and multi-year terms negotiated before you are dependent. Licence change: Elastic (2021), HashiCorp Terraform (2023) and Redis (2024) all moved off OSI-approved licences, and each triggered a community fork (OpenSearch, OpenTofu, Valkey). Elastic and Redis later added AGPL as an option, but by then the ecosystems had split and every adopter had been forced to choose — mitigated by preferring foundation-governed projects, where no single company can relicense the code. Shutdown: Parse, Facebook’s backend-as-a-service, was closed a year after the 2016 announcement; Google Cloud IoT Core was retired in 2023 — mitigated by owning the data model. And correlated failure: the CrowdStrike update of July 2024 crashed Windows hosts across airlines, hospitals and banks simultaneously, a reminder that a bought agent with kernel access is part of your blast radius — mitigated by staged rollouts you control and asking vendors how theirs work.
Architect's note · negotiate the exit on day one
Adopting open source feels like the free middle path — no vendor, no build. It is really a third ownership model with its own failure mode. The sequence is familiar: the project fits 90% of the need, a senior engineer patches the remaining 10%, the upstream PR stalls in review or is rejected as too specific, and the patch stays local. Three patches later, every upstream release requires a rebase whose cost grows with patch count × upstream churn in the files those patches touch. The first upstream refactor of an internal API one of your patches depends on turns a two-day rebase into a two-week one; it is deferred; the next release is further away still. The fork is now frozen, and you own a private distribution of a project — with none of the staffing a build decision would have forced you to plan.
Rebase cost grows with patches × upstream churn in the files those patches touch, not linearly with time. The fork usually dies at the first upstream refactor of an internal API one of your patches leans on — and the security team finds out at the next CVE.
You find out at the worst possible time. When a critical CVE is fixed in a release several versions ahead of your frozen base, you either backport the fix by hand into code nobody has touched in a year or do the full upgrade under incident pressure. Log4Shell in December 2021 was, for many organisations, exactly this: the vulnerability was in a dependency they had adopted without owning, and the scramble was as much about finding every copy and version as about patching. The 2024 xz-utils backdoor showed the other side of the same coin — critical infrastructure maintained by a single exhausted volunteer is a supply-chain risk, and ‘widely used’ is not the same as ‘well maintained’.
The criteria for adopting open source are therefore about the project’s future, not its current feature set. Who governs it — a foundation with multiple corporate contributors, or one company whose commercial incentives might change the licence? How many maintainers actually review PRs, and do they accept outside contributions? How often do breaking majors land, and how long are old lines patched? And the rule that prevents the unfunded fork: upstream-first, with a patch budget. Any local patch has an owner and an upstreaming plan; above a small number of carried patches — two or three is a reasonable line — the adoption is re-classified as a build and staffed like one, or the patches are removed.
Why two or three? Run the arithmetic with illustrative inputs. Suppose each carried patch touches code that changes in a given upstream release with probability about 0.3, and a conflicted patch costs two engineer-days to re-apply and re-test while your base is current. With three patches and quarterly releases, the expected rebase work is 3 × 0.3 × 2 ≈ 2 engineer-days a quarter — noise, and absorbable by whoever owns the upgrade. With ten patches it is six days a quarter on average, but the variance is what kills it: the quarter an upstream refactor touches seven of the ten, the rebase is a month of work, it slips, and the next release lands on a base that is already behind, where every conflict now costs more because the diff has grown. The process is self-reinforcing: once one rebase is skipped, the expected cost of the next one rises, which makes skipping it more likely. That is the dynamic behind the frozen fork in the diagram above, and it is why the threshold is on patch count rather than on patch size.
The countermeasure that works in practice is to budget OSS dependencies like a small internal product: a named owner, an upgrade SLO (for example, ‘within one minor release of upstream, within 30 days of a security release’), and a line item. For a heavily used, fast-moving project, that budget is realistically a fraction of an engineer on an ongoing basis — and if the organisation will not fund even that, the honest classification is ‘buy the managed version’. Where the project matters enough, contributing upstream is the cheap option, not the charitable one: a maintainer who knows your team is far more likely to merge the change that would otherwise become patch number four.
Pitfall · managed OSS is not the same OSS
The decision tree below is intentionally short. Most bad build/buy decisions are not the result of a missing criterion but of asking the right questions in the wrong order — typically starting from ‘can we afford the vendor?’ or ‘could we build it in a quarter?’, both of which are downstream of whether you should own it at all.
OSS modifier — at any BUY leaf, prefer managed open source when exit cost matters more than features, governance is multi-vendor (a foundation, not one company’s repo), and at least two providers sell it managed. At the BUILD leaf, prefer adopting OSS only if you commit to upstream-first and budget the maintainers (1.4). Open source is a hedge on exit, not a discount on cost.
Q1 is the 18-month test from 1.1. Be strict: ‘it would be nicer’ is not a metric. Q2 is about fit gap, and the ~20% line is a heuristic: once more than about a fifth of the behaviour you need has to be supplied by workarounds, configuration DSLs or sidecar scripts, you are building on a foundation you do not control, and the cost of that grows with every vendor release that changes behaviour underneath you. Below the line, bend the requirement; above it, buy the engine and own the seam — and write down which part of the fit gap the seam absorbs, so it does not quietly grow into a second product. Q3 is where most build decisions should fail and do not. ‘Three permanent owners’ is a floor for knowledge, not for on-call: with fewer than three people who can change a system, one departure plus one parental leave leaves a single person holding everything, and review stops being independent of authorship. It is nowhere near enough to carry a pager alone — Google’s SRE book puts the minimum for a sustainable single-site 24/7 rota at eight engineers. So a three-owner build must be operable by a wider rota that did not write it, which means runbooks, dashboards, safe-to-restart semantics and a deploy path someone else can drive at 3 a.m. That operability work is routinely missing from the build estimate and is, as an illustrative rule of thumb, a fifth to a third of the sustaining effort. If the answer to ‘who is paged for this, and could they fix it without the authors?’ is a name rather than a rota, Q3 is a no.
Two things the tree deliberately leaves out. Engineer enthusiasm is not an input — it is correlated with the wrong answer (1.1). And vendor price appears only at the leaves: it decides which vendor and on what terms, never whether this should be yours. The most common procedural failure is running the tree after a team has already prototyped the build; at that point Q1 is answered by sunk cost, so ask it before anyone writes code.
The rightmost leaf deserves emphasis because it is the most common correct answer for a differentiating capability that a company cannot yet staff: buy now, design the exit. Own the data model and the seam, keep the vendor behind an interface expressed in your domain’s terms, and set an explicit revisit trigger. This is not indecision; it is buying an option to build later at a known strike price.
The option has a price and it can be computed. Owning the data model means a continuous replication job and a canonical schema — illustratively 3–4 engineer-weeks to set up and a few days a quarter to keep in step with the vendor’s changes. Keeping the seam in domain terms costs little at integration time and mostly costs discipline in review. Against that, compare the staircase in 1.3: without exit design, the illustrative exit cost reached 150 engineer-weeks by year four; with the data owned and the seam held, the steps for data gravity, reports and behavioural coupling largely disappear, and the exit cost stays near the cost of re-implementing the seam. Spending on the order of five engineer-weeks to cap a 150-week liability is the best trade in this chapter, and it is almost never made, because the cost is paid now by the integrating team while the benefit accrues years later to someone else.
Where the conventional advice is wrong
Architect's note · write the reversal cost into the decision
The same component gets opposite answers at different stages, and both can be correct. A pre-product-market-fit company should buy almost everything, including things it will later build, because its scarce resource is roadmap slots and the probability that any given internal system survives the next pivot is low. Overpaying a vendor for two years is a cheap mistake; a platform that three of twelve engineers maintain is an existential one. At the growth stage the scarce resource becomes senior attention: vendor sprawl, overlapping tools and integration glue start to cost more than any individual licence, and the right move is consolidation plus the first deliberate seams. At scale, unit economics finally dominate — a vendor bill that is a rounding error at 50 engineers can equal a team at 1,000, and the long-running pattern of large companies bringing a single high-volume commodity in-house (Dropbox moving storage off S3 onto its own infrastructure, 37signals leaving the public cloud) is rational only because the volume is large and stable enough to amortise a dedicated team.
The line at scale is computable, and it is usually further out than the team pushing the build believes. What you are trying to recapture is the vendor’s gross margin — infrastructure SaaS companies commonly report 70–80% — but you only capture it net of your own infrastructure (you do not get the vendor’s multi-tenant utilisation or its volume discounts on compute), your team, and the migration. A back-of-envelope with illustrative numbers: a $3M/yr bill; the equivalent self-run infrastructure at 35–45% of that bill, so about $1.2M; a six-person team at $250k loaded, $1.5M. Steady-state saving is roughly $300k/yr — 10% of the bill — before a one-off migration that easily costs a year of that team’s output. The same arithmetic at a $10M bill, with the same team, yields about $4.5M a year, and there building wins clearly. The break-even bill is roughly team cost ÷ (1 − self-run infra ratio); below about 1.5–2× that figure, the saving is inside the error bars of the estimate and the build is a bet on your team being unusually efficient.
The non-obvious corollary: a credible, costed build plan is worth money even if you never execute it. Renewal negotiations at this size are about the vendor’s estimate of your walk-away cost. A written plan with a named team, a migration sequence and a date moves that estimate more than any procurement tactic — and if the vendor’s counter-offer lands below your break-even, you have bought the discount for the price of a design document.
Pre-PMF · < 20 eng
Growth · 50–200 eng
Scale · 500+ eng
Regulated · any size
Scarce resource
roadmap slots and months of runway
senior attention; integration sprawl
unit cost at volume; vendor concentration
audit evidence and approval lead time
Default posture
buy nearly everything, even what you will later build
consolidate vendors; build the first real seams
build where the bill or the constraint bites; buy the long tail
fewer, deeper vendors; self-host where residency demands
Wrong choice that hurts most
building infra nobody will maintain after the next pivot
a usage-priced tool that grows faster than revenue
a platform team rebuilding a commodity to justify itself
a vendor that fails third-party risk review after integration
Re-review trigger
first enterprise deal with security review
vendor bill > 1 engineer-year or > 2× YoY
any single vendor > ~5% of infra spend
new jurisdiction, new regulator, vendor sub-processor change
Thresholds are heuristics from practice, not laws — the point is to have one written down before the bill or the incident forces the conversation.
Regulation reshapes the whole grid. In financial services, healthcare and the public sector, every vendor passes through third-party risk management: security questionnaires, data-processing agreements, sub-processor reviews, sometimes regulator notification for material outsourcing. That process can add months to onboarding and has to be repeated when the vendor changes sub-processors or hosting regions. The practical consequences are counter-intuitive: regulated firms should often prefer fewer, deeper vendors over best-of-breed sprawl, and self-hosting open source becomes more attractive not because it is cheaper but because it removes a party from the evidence chain. Data residency requirements can eliminate a vendor outright if its processing region cannot be pinned.
The decision also decays. A good buy at 30 engineers is a questionable buy at 300, and a good build in 2019 may be a liability by the time the vendor market catches up. The fix is to attach re-review triggers to the decision when it is made — a bill threshold, a growth-rate threshold, an acquisition of the vendor, the departure of a system’s last original author — so that revisiting it is a scheduled event rather than a crisis.
The reason to schedule rather than wait is leverage. A review triggered by a bill threshold at month nine happens with two years left on the contract, a costed alternative in hand and no incident in progress; the same review forced at renewal happens with a 60- or 90-day notice window, no alternative ready, and a vendor that knows both. Triggers should be mechanical and cheap to evaluate — a line on the monthly cost report, a watch on the vendor’s corporate news, a check in the ownership registry when someone changes team — because a trigger that needs a meeting to evaluate will not be evaluated. Most reviews should conclude ‘no change’; a review process whose every outcome is a migration is really a migration backlog with extra steps.
Wrong decisions rarely announce themselves. Each has a characteristic trajectory, and recognising the early signal is worth more than any framework applied at decision time. The composite scenarios below are anonymised amalgams of situations that recur across companies, not accounts of any one firm.
Wrong build
Month 3
v1 ships; demo is great; the builders are proud
Month 12
feature requests from 6 teams; 2 of 4 builders moved on
Month 24
the system is ‘the thing only Priya understands’; upgrades of its dependencies stall
Tell
the roadmap for it is all parity with a product you could have bought
Reversal
migration + retraining + politics of retiring someone’s creation
Wrong buy
Month 3
live in a week; everyone loves the UI
Month 12
workarounds: cron jobs and scripts filling the fit gap
Month 24
the bill forces sampling or seat rationing — the product degrades where you need it most
Tell
engineers spend more time on the vendor’s model than on yours
Reversal
the staircase in 1.3: data, DSL rules, reports, semantics
Wrong adopt
Month 3
free, flexible, one engineer’s passion project in prod
Month 12
three local patches; upstream ignored the PR
Month 24
pinned two majors behind; a CVE needs a hand backport
Tell
nobody can name who upgrades it, and the champion has left
Reversal
catch up on upstream or pay a vendor to — both cost more than day one
Composite · the in-house workflow engine. A growth-stage company builds its own orchestration engine in 2019 because the available products did not fit its multi-tenant model. It works. By year four, the two original authors have left, three engineers spend most of their time on it, and every product team’s roadmap includes ‘migrate to the new workflow API’. The engine is not bad; it simply never differentiated, and it now absorbs the capacity that should have gone to what does. The correct reversal is not a big-bang migration but a strangler at the seam: new workflows go to a bought or foundation-governed engine behind the same domain interface, old ones are retired on a schedule, and the team is explicitly given a sunset date — which is itself a leadership act covered in Knowing What Not to Build.
Composite · the usage-priced observability platform. Bought at 40 engineers; perfect fit. At 400 engineers and five times the traffic, the bill is growing faster than revenue, so teams are told to cut log volume and drop high-cardinality tags. Observability degrades exactly where it matters — in the rare, high-cardinality failure that takes an hour to diagnose instead of five minutes. The wrong response is a panicked rebuild; the right one is to split the capability: keep the vendor for the high-value, low-volume signals (traces for key user journeys, alerting) and move bulk, low-value telemetry to self-run open-source storage. That is the fit-gap move from 1.1 applied after the fact.
Composite · the patched search cluster. A team adopts an open-source search engine, carries four local patches for a ranking plugin, and falls two major versions behind. A licence change upstream then splits the ecosystem in two, and the team must choose between two forks while already unable to upgrade either. The reversal is the discipline of 1.4 applied late: delete or upstream patches first, catch up to a supported line, and only then make the governance choice.
In every case, the reversal is cheapest when it is partial and at the seam, and most expensive when it is framed as a replacement project. Reversals also carry an organisational cost that the spreadsheet never shows: retiring an in-house system means telling its builders their work is being decommissioned, and replacing a vendor means admitting the original decision was wrong. Leaders who make these calls well separate the decision from the people who made it, and they make it easy to revisit a decision by recording the context it was made in — so that ‘the context changed’ is an acceptable reason rather than an accusation.
18 mo
differentiation test horizon
~20%
fit-gap line before you own the seam
≥ 3
permanent owners for any build
2–3
carried OSS patches before it’s a build
Questions to ask in a design review
Where next