Back to System Design Concepts
Q16Question 16 of 16

Build vs Buy

Key Concepts
  • Build what differentiates you (proprietary fraud model); buy commodity infrastructure (email, blob storage, message queue).
  • Total cost of ownership includes ongoing maintenance, upgrades, security patches, scaling, and on-call burden, not just initial development.
  • Vendor lock-in and data-sovereignty risks can push the decision toward building, especially for regulated banking data.
  • Time to market heavily favours buying : a bought solution ships weeks faster than a built one.
  • "We can build it better" usually means "we will maintain it forever" : the long tail is the expensive part.
  • The decision is reversible : buy to reach market, then selectively build later if it becomes a differentiator.
  • Prefer vendors with open standards to limit lock-in and keep the option to switch.

Definition

Build what differentiates you, buy commodity infrastructure, and judge by total cost of ownership and opportunity cost : "we can build it better" usually means "we will maintain it forever."
  • Core differentiator : something customers choose you for and competitors cannot easily copy, worth building (fraud model, scoring algorithm).
  • Commodity infrastructure : a solved problem many vendors provide equally well, worth buying (email, blob storage, message queue).
  • Total cost of ownership (TCO) : the full cost including initial build, ongoing maintenance, security patches, scaling, and on-call burden.
  • Vendor lock-in : the cost and difficulty of switching from a third-party service once deeply integrated.
  • Data sovereignty : regulatory requirement to keep sensitive data within specific jurisdictions, which can restrict vendor choice.

National Bank of India must decide whether to build its own email-sending system or pay a provider. Building its own fraud-scoring model, a genuine competitive edge, may be worth it. But building its own email server, a solved commodity, means years of patching, scaling, and being woken at night for a problem that has nothing to do with banking. The phrase "we can build it better" usually ignores that the bank would own that system forever.

Understanding the Concepts

What is the core differentiator vs commodity question?

The first and most important question is whether the capability is a core differentiator or commodity infrastructure. Build differentiators, buy commodities.

JAVA
package com.bank.design;

public class BuildBuyDecision {
    public String decide(String capability) {
        return switch (capability) {
            case "fraud_detection_model" -> "BUILD (competitive edge, proprietary data)";
            case "email_sending" -> "BUY (solved commodity, no edge)";
            case "core_ledger" -> "BUILD (regulated, sovereign, critical)";
            case "message_queue" -> "BUY (Kafka/SQS, commodity infra)";
            case "blob_storage" -> "BUY (S3, commodity, cheap)";
            default -> "Evaluate per capability";
        };
    }
}

What is total cost of ownership?

TCO goes far beyond initial development. Building includes ongoing maintenance, upgrades, security patches, scaling work, and the on-call burden. Buying includes license or usage fees but offloads most operational weight to the vendor.

JAVA
package com.bank.design;

public class TcoComparison {
    public static void main(String[] args) {
        System.out.println("Build TCO: dev + maintenance + patches + scaling + on-call");
        System.out.println("Buy TCO:   license fees + integration + migration risk");
        System.out.println("Hidden cost of build: opportunity cost of engineers");
    }
}

What are the risk factors?

Vendor lock-in makes switching costly. Data sovereignty means sensitive banking data may not leave certain jurisdictions. Team expertise determines whether you can not only build it but maintain it for years.

Why is "we can build it better" expensive?

Even if the team could build a marginally better message queue, every hour maintaining it is an hour not spent on banking features. The opportunity cost compounds for years.

When should you build despite higher TCO?

Build when the capability is a genuine competitive advantage, when regulatory or sovereignty requirements prohibit third-party data handling, or when no vendor meets your specific technical requirements.

When should you buy despite risk?

Buy when the capability is commodity, when time to market is critical, when the team lacks expertise to build and maintain, or when the vendor TCO is clearly lower.

How do you manage lock-in risk?

Prefer vendors with open standards and portable data formats. Design with an abstraction layer so you can swap the implementation later.

JAVA
package com.bank.design;

public interface NotificationSender {
    void send(String to, String message);
}
// Swap implementation from SendGrid to AWS SES without changing callers

What should a senior engineer know?

The decision is not permanent: buy to get to market, then selectively build later if a commodity becomes a bottleneck or differentiator. Judge honestly by TCO and opportunity cost, not by engineering ego.

Visual Overview

DIAGRAM
  Build vs Buy Decision Framework

  ┌──────────────────────────────────────────┐
  │ Is it a core differentiator?             │
  └──────────┬───────────────┬───────────────┘
         YES │               │ NO (commodity)
             ▼               ▼
  ┌──────────────┐  ┌──────────────────────────┐
  │ BUILD        │  │ Does data sovereignty     │
  │ (own the     │  │ prohibit 3rd party?       │
  │  edge)       │  └──────┬───────────┬────────┘
  └──────────────┘     YES │           │ NO
                           ▼           ▼
                   ┌──────────┐  ┌──────────────┐
                   │ BUILD    │  │ BUY          │
                   │ (regulate│  │ (faster,      │
                   │  -ion)   │  │  cheaper TCO) │
                   └──────────┘  └──────────────┘

  Banking examples:
  ┌───────────────────┬─────────┬────────────────────┐
  │ Capability        │ Decision│ Reason             │
  ├───────────────────┼─────────┼────────────────────┤
  │ Fraud model       │ BUILD   │ Competitive edge   │
  │ Core ledger       │ BUILD   │ Sovereignty, ACID  │
  │ Email/SMS         │ BUY     │ Commodity           │
  │ Message queue     │ BUY     │ Commodity (Kafka)   │
  │ Blob storage      │ BUY     │ Commodity (S3)      │
  └───────────────────┴─────────┴────────────────────┘

Key Takeaway

Build versus buy is driven by one primary question: is this a core differentiator or commodity infrastructure? A core differentiator is something customers choose you for, like a bank's proprietary fraud model. Commodity infrastructure is a solved problem, like email or blob storage. Build differentiators, buy commodities.

The second factor is total cost of ownership, which goes far beyond initial development. Building means owning maintenance, patches, scaling, and on-call forever. Buying trades fees for offloading that weight. I also weigh lock-in risk, data sovereignty, team expertise, and time to market.

In banking, this leads to clear calls. Email is commodity : buy it. The fraud model is a competitive edge : build it. The core ledger carries regulated data : build or keep on tightly controlled infrastructure.

The reason "we can build it better" is so expensive is opportunity cost. Every hour maintaining a custom message queue is an hour not spent on features that differentiate the business. The senior discipline is to buy to reach market, prefer open standards to limit lock-in, and build only when a commodity becomes a true differentiator.

Remember one sentence: build what differentiates you, buy commodity infrastructure, and judge by total cost of ownership and opportunity cost rather than engineering ego.

---

Share
Use ← → arrow keys to navigate