Hello! Welcome to your next lesson in the "Staff-Level System Design Depth" module.
In our last lesson, we built a comprehensive playbook for proposing and executing phased system migrations. A critical decision you'll face repeatedly during such a migration—or when designing any new system—is what to do with each piece of functionality. Do you build a new service from scratch, or do you integrate a third-party solution?
This lesson directly addresses the learning outcome: Evaluate build vs. buy decisions and third-party service integrations with clear reasoning.
As a candidate for a Staff-level role, a simple pros and cons list won't suffice. You are expected to demonstrate strategic thinking that balances business goals, long-term technical health, financial implications, and risk. Your ability to articulate a clear, defensible framework for these decisions is a powerful signal of your seniority.
1. The Strategic Starting Point: Differentiator vs. Commodity
The most crucial question to ask is: "Does this capability create a competitive advantage for our business?" This single question helps you frame the entire decision.
A great way to think about this is to categorize capabilities as either differentiators or commodities.
- Differentiators are the unique, core functions that make your product special and give you an edge in the market. This is your secret sauce, your core intellectual property. Examples might include Google's search ranking algorithm, Uber's dynamic pricing model, or Netflix's content recommendation engine. You should almost always build your differentiators.
- Commodities are necessary functions that are not unique to your business. They are the "table stakes" required to operate, but customers don't choose your product because of them. Examples include payment processing, user authentication, email delivery, or application monitoring. You should strongly lean towards buying commodities.
Let's ground this concept with a foundational resource.
[PDF] Build vs. buy - A strategic framework for evaluating third-party solutions
The whitepaper '[PDF] Build vs. buy - A strategic framework' from ThoughtWorks provides an excellent overview of this core strategic dilemma. It will help you formalize the distinction between commodity and differentiator capabilities.
Please read the 'Introduction' and 'Defining your needs' sections (pages 3-10). As you read, focus on how the paper defines commodity vs. differentiator capabilities. Note the reference to Wardley Mapping, which we encountered in our previous lesson, as a tool for visualizing this.
2. A Framework for Analysis
Once you've established whether a capability is a commodity or a differentiator, you need a systematic process for a deeper evaluation. For a Staff-level interview, presenting a structured framework shows rigor and thoroughness.

This process is underpinned by a multi-dimensional analysis. Let's break down the key dimensions you need to evaluate.
Build vs. Buy Software Decision: Your Strategic Guide
The article 'Build vs. Buy Software Decision: Your Strategic Guide' provides a comprehensive framework that we can use to structure our analysis. It breaks the decision down into several key dimensions.
Read 'Step 3: Perform a multidimensional Build vs. Buy analysis' (from section 3.1 to 3.6). We will use these six dimensions as our core framework. Focus on the key questions posed for each dimension.
Let's synthesize those dimensions into a checklist you can mentally run through during an interview:
The 6-Dimension Framework
- Strategic Value: (As discussed) Is this a core differentiator or a commodity? Will custom features deliver a measurable competitive advantage?
- Total Cost of Ownership (TCO):
- Build: Factor in development cost (your team's salaries), infrastructure, ongoing maintenance, security patching, on-call support, and the opportunity cost of not having your best engineers work on differentiator features.
- Buy: Factor in license/subscription fees, implementation/integration costs, training, and potential cost increases as usage scales or the vendor changes pricing.
- Time to Value & Risk:
- How quickly can you deliver business value? Buying is almost always faster.
- What are the risks? Building carries project risk (delays, cost overruns). Buying carries integration risk and vendor dependency risk.
- Flexibility & Future-Proofing:
- How much control do you need over the feature roadmap? Building gives you total control.
- When buying, you are subject to the vendor's roadmap. Will their priorities align with yours in 2-3 years?
- What is the exit strategy? How difficult would it be to replace this solution (build or buy) in the future? This is the vendor lock-in problem.
- Control & Compliance:
- Does your business operate in a highly regulated industry (e.g., finance, healthcare)?
- Are there specific data sovereignty, security, or compliance requirements (e.g., GDPR, HIPAA) that a generic SaaS might not meet? Building can provide precise control over these aspects.
- Resource Availability & Organizational Fit:
- Do you have the in-house expertise to build and maintain this system at a high level of quality?
- Is attracting and retaining talent for this specific domain (e.g., building a search engine from scratch) feasible and desirable?
- Does this decision align with your company's engineering culture and existing tech stack?
3. "Buy" Decisions in Practice: Integrating Third-Party Systems
In many system design interviews, demonstrating the wisdom to "buy" commodity services is a strong positive signal. Let's look at common examples.
Example 1: Payment Processing
Almost no company should build its own payment gateway from scratch due to the immense complexity of PCI compliance, global payment methods, and fraud detection. This is a classic commodity.
System Design Interview: Design Ticketmaster w/ a Ex-Meta Staff Engineer
In this clip from a mock interview for designing Ticketmaster, notice how the candidate quickly decides to offload payment processing to a third party (Stripe). This is a standard and correct move.
Watch from 00:16:53 to 00:17:40. Observe how integrating a service like Stripe simplifies the system design by abstracting away a highly complex and regulated domain.
Example 2: Mapping and ETAs
For a company like Uber or DoorDash, while logistics are core to the business, the underlying geospatial data and route-finding algorithms are an incredibly deep and complex commodity. Building a competitor to Google Maps is not the business they're in.
Design Uber w/ a Ex-Meta Staff Engineer: System Design Interview breakdown
This clip from a mock interview for designing Uber shows a similar decision being made for mapping and ETA calculations.
Watch from 00:23:42 to 00:24:26. The candidate explicitly decides to use a third-party mapping service, simplifying the problem to an API call and allowing focus on the core ride-sharing logic.
Example 3: Search Functionality
This is a more nuanced case. While a database's built-in LIKE operator is a form of "built-in" search, it doesn't scale. For any serious search requirement (full-text search, faceting, ranking), you would "buy" a specialized solution like Elasticsearch or use a SaaS search provider. You wouldn't write your own inverted index and query engine.
System Design Interview: Design Ticketmaster w/ a Ex-Meta Staff Engineer
Let's return to the Ticketmaster design. Here, the candidate hits the limits of a traditional database for search and decides to integrate Elasticsearch.
Watch from 00:37:05 to 00:42:35. Pay attention to the reasoning: performance (full table scan is slow) and advanced features (inverted index, geospatial queries). Also, note the discussion on keeping the search index synchronized with the primary database (using application logic or Change Data Capture), which is a key integration challenge.
4. Architecting the Integration: The Gateway Pattern
When you decide to "buy," your work as an architect is not over. You must design the integration in a way that protects your system's integrity and maintains flexibility. The key principle is loose coupling. You should isolate your core business logic from the specific implementation details of the third-party service.
The Gateway (or Adapter) Pattern is the canonical way to achieve this.

By using this pattern:
- Your core application is shielded from vendor-specific data models (DTOs) and APIs.
- You can create mock implementations of the gateway for fast and reliable testing.
- If you ever need to switch vendors (e.g., from Stripe to Adyen), you only need to write a new adapter. The rest of your system remains unchanged. This directly addresses the "vendor lock-in" risk.
5. Beyond the Binary: The Build-Buy Spectrum
Finally, a sophisticated answer acknowledges that the choice isn't a strict binary. It's a spectrum.
- Pure Build: Writing everything from the ground up. (Rarely wise).
- Build on Platform: Using cloud-native services (e.g., AWS Lambda, SQS, DynamoDB) as building blocks. You're "buying" the infrastructure but "building" the business logic.
- Assemble from Components: Using open-source libraries (e.g., Redis for caching, gRPC for networking) and stitching them together with your custom code.
- Configure Off-the-Shelf Software (COTS): Buying a large enterprise system (e.g., Salesforce, SAP) and configuring it extensively.
- Software-as-a-Service (SaaS): A pure "buy" decision, subscribing to a service like Stripe, Auth0, or SendGrid.
Mentioning this spectrum shows you understand the nuanced landscape of modern software development.
Conclusion
In this lesson, we've developed a robust framework for evaluating one of the most fundamental strategic decisions in system design. For a Staff-level role, your reasoning process is more important than the final answer.
Key Takeaways:
- Start with Strategy: Always frame the decision around whether a capability is a differentiator or a commodity.
- Use a Multi-Dimensional Framework: Systematically analyze Strategic Value, TCO, Time to Value, Flexibility, Compliance, and Organizational Fit.
- Buy Commodities, Build Differentiators: Lean heavily on battle-tested third-party solutions for common problems like payments, authentication, and search.
- Architect for Loose Coupling: When you buy, use the Gateway/Adapter Pattern to isolate your system from the vendor, mitigating risk and preventing lock-in.
- Think in Spectrums: Acknowledge that modern solutions often blend building and buying (e.g., building on a cloud platform).
Preview of the Next Lesson:
Our build vs. buy decision has direct consequences on team structure. If you build a new service, you need a team to own it. If you buy a SaaS product, you might need a smaller team focused on integration and vendor management. This leads us directly to our next topic: "Discuss organizational and team boundary implications of architectural decisions (Conway's Law)." We will explore how your architectural choices and your organization's structure are deeply intertwined.