What Happens Behind Every Tap? A Journey into System Design

What Happens Behind Every Tap? A Journey into System Design

Explore system design fundamentals through a real-world payment example. This six-part series covers architecture, networking, APIs, databases, scalability, and failure handling, showing how individual components come together to build reliable, secure systems.

Series: The Anatomy of Modern Systems: From Architecture to Scalability (5 articles)

  1. 1
    What Happens Behind Every Tap? A Journey into System Design This article

What happens when thousands of people tap Pay at the same moment?

Most of us never see the answer. The button spins, the money moves, and a confirmation arrives. Behind that simple experience sits a series of decisions: where the request goes first, what happens if a server fails halfway through, and how the system prevents duplicate charges. Those decisions are system design.
This series teaches system design from scratch, in six focused posts. No prior knowledge is assumed, and every post builds on the one before it.

What is system design?


System design is the process of deciding how applications, databases, APIs, networks and external services work together to meet what the business needs. It is less about writing code and more about choosing the shape of the whole system, and understanding what each choice costs.
Every design starts by splitting requirements into two kinds.
  • Functional requirements describe what the system should do. A customer can make a payment and check its status.
  • Non-functional requirements describe how the system should behave. It stays available during failures, keeps data secure, and responds within an acceptable time.
Functional requirements decide what you build. Non-functional requirements decide how hard it is to build. Two systems can offer the identical feature, "send a payment", and need completely different designs depending on whether they must handle ten requests a minute or ten thousand a second.
For a payment system, the non-functional list is long and unforgiving: reliability, availability, security, scalability, consistency and low latency. Almost every post in this series is about one of them.

The running example: a payment system

Imagine Riya wants to pay ₹500 to Sameer for her chai.
  • Before payment: Riya has ₹2,000, and Sameer has ₹3,000.
  • Payment: Riya taps Pay ₹500 in the app.
  • What the system does: It checks Riya’s balance and processes both balance updates as one atomic transaction: ₹500 is deducted from Riya and credited to Sameer, or neither update is committed.
  • After payment: Riya has ₹1,500, and Sameer has ₹3,500.

Simple enough, right? But what if the server crashes while processing the payment? What if Riya taps Pay twice, or the app times out even though the payment has already succeeded?
These are the kinds of problems system design helps us solve. Throughout this series, we’ll start with this simple payment and gradually build a system that can handle more users, prevent duplicate payments, and recover safely from failures.

The Challenges We’ll Solve Along the Way

A simple payment is easy to understand, but making it work reliably at scale is a different challenge. As we build this system, we’ll explore what happens when:
  • Too many people pay at once: One server struggles to handle thousands of simultaneous requests.
  • Requests go wrong: Riya’s phone loses connection, or she taps Pay twice. How do we prevent duplicate payments?
  • Data grows: How do we store balances safely and retrieve information quickly?
  • Things fail: A server crashes during a payment, a bank takes too long to respond, or a notification fails to send.
  • Everything comes together: How do we combine these pieces into a reliable, secure payment system?
We’ll tackle each challenge step by step, using the same payment example throughout the series.
Each article ends with The payment-system thread, showing how the concepts we’ve explored change the design and bring us closer to a complete system.

The roadmap

The series moves from the structure of a system, to how it communicates, to how it stores data, to how it survives failure, and finally to putting it all together.

Who this is for, and how to read it

This series is for developers who want to move from building individual features to understanding how complete systems work, as well as anyone preparing for a system design interview. You don’t need experience running applications at scale. If you understand the basics of APIs and databases, you’re ready to begin. By the end, you’ll understand how to reason about architecture, evaluate trade-offs, and design a system that handles growth and failure.
One idea runs through the whole series: there is no best design, only trade-offs that fit your requirements. Whenever a post introduces a tool, we will also ask what it costs.

Next up

We’ll begin with a single application and explore how its architecture evolves as demand grows. We’ll compare monoliths and microservices, examine decoupling and load balancing, and see why adding microservices isn’t always the right first step.

Series: The Anatomy of Modern Systems: From Architecture to Scalability (5 articles)

  1. 1
    What Happens Behind Every Tap? A Journey into System Design This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article