01

Maintainability: The Ongoing Responsibility

Product maintenance spans from launch to end-of-life. It includes identifying bugs, fixing them, adding features, improving performance, expanding test coverage, and writing documentation.

Companies that prioritize maintainability conduct an operational readiness review before launch. This process draws from BFSA recommendations and builds a list of best practices for operational excellence.

The goal is to educate teams and uncover operational gaps in the system. Only after resolving all major issues is the product considered launch-ready.

The core challenge is integrating operational practices into the system design phase—rather than treating them as post-launch tasks.

02

Key Maintainability Topics in Interviews

During interviews, expect questions on these maintainability aspects:

  • Failure modes and mitigations: What happens when a component fails? How does the system respond?
  • Network partition handling: How does the system manage and recover from network partitions?
  • Monitoring: How is system health tracked? How do we detect specific failures?
  • Testing: How are individual components tested? How are end-to-end data flows validated?
  • Deployment: How are regular changes deployed safely? How quickly can bad changes be rolled back?

This list is not exhaustive. But mastering these four areas enables meaningful discussions with engineering teams.

03

How to Learn Maintainability Topics

Each topic is vast—some could fill entire books. A pragmatic approach is needed.

In this course, we build a reference architecture for a distributed messaging system. We then apply the four maintainability topics to this real-world system.

For each topic, we focus on concepts commonly used in practice.

04

Security: The CIA Triad

Secure systems rely on three fundamental attributes: confidentiality, integrity, and availability.

  • Confidentiality: Data is protected from unauthorized access.
  • Integrity: Data is not corrupted or lost; only authorized users can modify it.
  • Availability: Authorized users can access resources when needed.

In practice, this means the system must defend against unauthorized access and security attacks.

05

Practical Security Concepts

Key security areas include:

  • Identity and permissions management: Who can access the system? Who can access what? How are authentication and authorization implemented?
  • Infrastructure protection: Is the system resilient to DDoS attacks? How is it protected from SQL injection or cross-site scripting?
  • Use of security tools: Should a web application firewall or API gateway be deployed?
06

Data Protection

Data must be protected in two states:

  • At rest: When stored on disks or databases.
  • In transit: When transmitted over networks.
07

Cost Optimization: The Three Components

System cost consists of three parts:

  • Engineering cost: The effort required to design, implement, test, and deploy the system.
  • Maintenance cost: The effort needed to maintain the system over time.

Cost estimation is essential during design. This ensures financial feasibility and long-term sustainability.

These components form the foundation of cost optimization in system design.

08

Cost of Engineering in System Design

In a system design interview, we should not expect questions about engineering cost.

This is because estimating engineering cost requires a detailed breakdown of tasks.

Such a breakdown is time-consuming and demands deep system understanding.

We lack both time and system-level detail during interviews.

Thus, engineering cost is not typically a focus in interviews.

09

Maintenance Cost and Automation

Maintenance cost may be discussed in interviews.

Typical questions involve reducing maintenance cost.

This usually means automation.

Examples include automating:

  • Monitoring
  • Testing
  • Deployments
  • Configuration management
  • Security patches

These topics will be covered separately when discussing maintainability.

10

Resource Cost: Hardware and Software

We should expect questions about resource cost.

Resource cost includes both hardware and software.

Hardware resources include:

  • Physical machines
  • Hardware load balancers
  • Networking devices

These are required to run the system.

Interviewers may ask for capacity estimation.

This involves determining how many machines are needed to process data.

Or how many disks are needed to store data.

Once we have the number, we multiply it by the cost per machine.

This gives an approximate total hardware cost.

Software resources include all commercial software used in the system.

Today, most such software is provided by public cloud services.

It does not matter whether the software comes from a public cloud provider or an in-house team.

From a cost perspective, both are equivalent.

In both cases, we pay.

For cloud providers: real money.

For in-house solutions: virtual money.

This virtual money is still a form of cost.

It contributes to the total system cost.

Therefore, we must include it in our estimation.

When using managed services, three main parameters affect cost:

  • Number of requests made to the service
  • Number of bytes transferred (in or out)
  • Number of bytes stored

We can express total resource cost with this formula:

Total resource cost = hardware cost + request cost + transfer cost + storage cost

This is not an exact formula.

If we consider costs per hour—for example, virtual machines or load balancers—we should include those in hardware cost.

We could also include license costs.

But my goal is to show how system design influences cost.

This formula, though incomplete, effectively illustrates that design decisions impact cost.

When increasing system availability, we add redundant hardware.

This raises hardware cost.

Total resource cost increases.

To improve durability, we replicate data.

This increases storage.

Storage cost goes up.

There are cost-reduction techniques.

Elasticity allows releasing resources when not needed.

This reduces hardware cost.

We can use request batching and load polling to reduce the number of requests.

This lowers request cost.

These techniques directly affect total resource cost.

Thus, design choices directly influence cost efficiency.

Each decision—availability, durability, scalability—has a measurable cost impact.

Design must balance performance with financial constraints.

Cost is not a secondary concern.

It is a core outcome of system design decisions.

11

Data Compression Reduces Network Transfer

Data compression decreases the number of bytes transferred over the network, directly reducing bandwidth usage and improving response times.

12

Storage Tiering: Hot and Cold

To reduce storage costs, implement two-tiered storage:

  • Hot storage: Holds frequently accessed data requiring fast retrieval.
    • Example: Use DynamoDB for low-latency access.
  • Cold storage: Stores infrequently accessed or archived data with no need for fast access.
    • Example: Use S3 for long-term, infrequently accessed data.

Cold storage solutions are typically less expensive than hot storage.

13

Cost Optimization via Pragmatic Design

Apply a pragmatic approach to cost optimization using real-world system designs.

Include back-of-the-envelope capacity estimation techniques.

14

Core Principle: Knowledge of Best Practices

Maintainability, security, and cost optimization rely on practical knowledge.

These include:

  • Familiarity with proven design patterns
  • Understanding of optimization techniques
  • Experience with real system trade-offs

In interviews, avoid reinventing solutions.

Pre-learn established practices and techniques.

When asked, retrieve specific knowledge directly from memory.

This approach ensures efficient, accurate responses without overcomplicating the design.

Questions

  • What happens to the rest of the system if a component fails, and how does the system handle network partitions?
  • How do we monitor the health of the system, and how do we know what exactly is broken in case of a failure?
  • How should individual components be tested, and how do we test end-to-end data flows?
  • What is the safest way to deploy changes, and how can bad changes be rolled back quickly?
  • What are the three fundamental attributes of secure systems, and how do they apply to data protection?
  • How can we protect data at rest and in transit?
  • What are the main components of the total cost of a system, and how do they break down?
  • How can we estimate the number of machines or disks needed for a system, and what does that cost involve?

Key takeaways

  • Maintainability requires answering operational readiness questions before launch, such as failure modes and monitoring, and these must be designed into the system from the start.
  • Failure modes and network partition handling are key maintainability topics that should be discussed in interviews.
  • Monitoring must be built in to detect failures, and the system must be able to identify exactly what is broken.
  • Testing should cover individual components and end-to-end data flows to ensure system integrity.
  • Deployment must allow safe updates and quick rollbacks, which are essential for operational stability.
  • Security is grounded in the CIA triad—confidentiality, integrity, and availability—and must be implemented through practical mechanisms like authentication, authorization, and infrastructure protection.
  • Data protection includes both at-rest and in-transit safeguards, such as encryption and secure communication channels.
  • The total cost of a system includes engineering effort, maintenance effort, and resource costs—hardware and software—each of which can be optimized in practice.
  • Resource cost estimation involves capacity planning: number of machines, storage, requests, and bytes transferred, with techniques like elasticity, batching, and data compression helping reduce costs.