Strategy

Build vs buy: a decision framework that survives contact with reality

When to build software yourself and when to buy it, including the ongoing costs of building that rarely appear in the comparison, and the specific cases where buying goes wrong.

3 min readBy Mayur Kale

Key takeaways

  • Build only what differentiates you. Everything else is a permanent maintenance obligation bought in exchange for control you rarely use.
  • Build comparisons routinely omit the ongoing cost: updates, security patches, on-call, and the engineer-months per year the thing consumes forever.
  • Buying fails mainly on lock-in and on the ninety-percent problem, the vendor does most of what you need and cannot do the rest.
  • The strongest default is to buy the commodity, build the differentiator, and put an abstraction between the two.
  • Revisit the decision when your volume, your requirements or the vendor's pricing changes materially. It is not permanent.

The build-versus-buy conversation usually turns into a spreadsheet comparing a licence fee against an estimated build cost. That comparison is wrong in a specific and expensive way: it compares a recurring cost to a one-off one, when building is not a one-off cost at all.

The question that decides it

Is this something customers choose you for?

If yes, build it. A vendor's roadmap will never prioritise your differentiator the way you would, and outsourcing it caps how good it can become.

If no, buy it. You are not going to build a better one than a company whose entire business is building that one thing, and every hour spent trying is an hour not spent on what you are actually for.

Most decisions resolve at that question. The remainder are genuinely difficult.

The cost that gets left out

A build estimate is a starting cost. The real figure includes everything after:

  • Security patches and dependency updates, on someone else's schedule
  • Someone on call when it breaks at 2am
  • Every new engineer learning it
  • Documentation, written and then maintained
  • Migrations when the platform underneath it changes
  • The features you will need next year, and the year after

A reasonable heuristic is that a system consumes a meaningful fraction of its original build cost every year simply to keep existing. Over five years, a "cheaper to build" decision frequently turns out to have been the more expensive one, and the cost arrives as engineering capacity you cannot spend on your product.

Where buying goes wrong

Two failure modes, both worth checking for before you sign.

Lock-in. Your data and processes become entangled with the vendor to the point where leaving costs more than any price increase they might impose. The tell is that you cannot answer "what would it take to move off this?" with a number.

The ninety-percent problem. The tool does most of what you need. The remaining ten percent is genuinely impossible, not on the roadmap, not achievable through the API. So you build workarounds, and the workarounds accumulate, and three years later you have built a worse version of the thing anyway, wrapped around a vendor you are still paying.

The ninety-percent problem is the more common and the less anticipated. Test for it during evaluation by trying the hardest thing you need, not the demo.

A working framework

CapabilityDefaultReasoning
AuthenticationBuyHigh risk, zero differentiation, well commoditised
PaymentsBuyRegulatory burden, high cost of error
Email deliveryBuyDeliverability is a specialist discipline
AnalyticsBuyUntil your questions are genuinely unusual
Your core workflowBuildThis is why customers pay you
Your data modelBuildThe thing everything else is shaped by
Internal admin toolingBuy or deferRarely worth building early
Reporting for customersDependsBuy if generic; build if it is part of the product

The middle case

The hard one: a capability that is not your differentiator but is deeply embedded in how you operate.

The answer here is buy, but wrap it. Put an interface of your own between your code and the vendor, so the dependency lives in one place. This costs a small amount now and preserves your ability to change your mind, which for an embedded system is worth a great deal.

This is the same principle as treating backing services as attached resources, the value is not abstraction for its own sake, it is that switching becomes a bounded project rather than an unbounded one.

Revisit it

This is not a permanent decision. Volumes change, requirements change, vendors change their pricing and their roadmap.

Set a reminder to re-evaluate significant vendor decisions annually. Know what your switching cost is before the renewal conversation rather than during it, the negotiating position is entirely different when you can credibly leave.

Frequently asked questions

How do I decide whether to build or buy software?

Ask whether the capability is something customers choose you for. If yes, build it, outsourcing your differentiator to a vendor caps how good it can get. If no, buy it, and accept the constraints. The middle case is a capability that is not differentiating but is deeply embedded in how you operate; there, buy and wrap it in an interface of your own so you can replace it later.

What costs do people forget when building?

The ongoing ones. Security patches and dependency updates arrive whether or not you have capacity. Someone has to be on call. Every new engineer must learn it. It needs documentation. It will need a migration when the underlying platform changes. A rough rule is that a system costs a meaningful fraction of its build cost every year just to keep working, and that line rarely appears in the comparison.

When does buying go wrong?

Two ways. Lock-in, where your data and processes become so entangled with a vendor that leaving costs more than staying at any price they choose to charge. And the ninety-percent problem, where the tool does most of what you need and the remaining ten percent is impossible, so you build workarounds that end up costing more than building properly would have.

Should we build our own authentication?

Almost certainly not. Authentication is high-risk, heavily commoditised, and provides no differentiation, the same applies to payments, email delivery and analytics. The cost of getting these wrong is severe and the cost of buying them is low. Build them only if your product's actual value proposition is in that area.

How do we avoid vendor lock-in?

Put an interface of your own between your code and the vendor, so the dependency is in one place. Ensure you can export your data in a usable form, and test that you can. Prefer vendors with open standards or credible alternatives. And know your switching cost before you sign, rather than discovering it during a renewal negotiation.

References & further reading

  1. [1]
  2. [2]

Turn the trend into shipped software

I contract as a senior fullstack and data engineer, building the production systems your customers and your reporting depend on.

Explore services↗