Backend Systems Engineering eBook
A Coursebook on Backend Systems Engineering
A Coursebook on Backend Systems Engineering
Formats
Free sample
Chapter 1: The Great Shift--–- On the morning of November 29th, 2014, a senior backend engineer named Sarah watched a graph turn vertical. It was 2:47 AM Pacific Time, and the checkout service she had personally designed for a major online retailer was failing in a way no load test had predicted. The green line representing successful requests plummeted toward zero. The red line for latency climbed past 30 seconds. The incident page filled with a single repeating error: "Connection pool exhausted."What happened next would determine the next five years of her career.
She could have blamed the database team for a slow query, or the Dev Ops team for under-provisioned servers, or the marketing team for launching an unannounced flash sale. Instead, she did something that, in retrospect, separated her from every other engineer in the room. She asked a different question: "What assumption did we make that turned out to be wrong?"The assumption was subtle but fatal. The checkout service had been designed to handle 10,000 concurrent users, but the flash sale brought 110,000. The load balancer distributed traffic across ten service instances, each configured with a database connection pool of 100 connections.
The math seemed sound: ten instances times one hundred connections equals one thousand total database connections, well within the database's configured limit of 1,500. The assumption was that users would complete their checkouts quickly. They did not. They lingered on the payment page, held connections open while deciding between shipping options, and triggered a cascade of timeouts that turned a slow checkout into a completely broken one.Sarah's team spent the next six hours manually restarting services, killing hung connections, and redirecting traffic to a backup database that had not been tested for failover. By 9:00 AM, the system was stable again.
The company had lost an estimated $12 million in revenue. The post-mortem meeting lasted four hours. The room was full of blame, finger-pointing, and the quiet resignation that this would happen again.But something changed in that meeting. Sarah did not defend her design. Instead, she walked to the whiteboard and drew six boxes.
She labeled them Service, Worker, Queue, Relational Database, Key-Value Store, and File Store. She said, "Our mistake was thinking like coders instead of systems engineers. We built a checkout feature. What we needed to build was a checkout system."That moment, on that whiteboard, is where this book begins.The False Identity: Coder vs. Systems Engineer The software industry has spent decades training engineers to think about code.
We learn programming languages, frameworks, libraries, and design patterns. We measure productivity in lines of code written, features shipped, and bugs fixed. We celebrate the engineer who can write a sorting algorithm from memory or implement a red-black tree in forty-five minutes. These are valuable skills, but they are not the skills that keep a system online at 3:00 AM when a million users suddenly show up.The fundamental shift this book requires is moving from identity as a "coder" to identity as a "systems engineer." A coder asks, "How do I implement this feature?" A systems engineer asks, "How does this feature behave when everything around it fails?" A coder focuses on the happy path. A systems engineer maps every possible failure mode.
A coder thinks in terms of functions and classes. A systems engineer thinks in terms of queues, workers, databases, and the unpredictable delays between them.Consider the difference in practice. When a product manager asks for a new feature that sends an email after a user completes a purchase, the coder writes a function that sends the email synchronously within the checkout request. It works perfectly in development. It passes all the unit tests.
It ships to production. Then, on Black Friday, the email service slows down, and every checkout request now waits three extra seconds for the email to send. The checkout service times out. Revenue is lost. The coder never considered that the email service could fail, or that synchronous execution couples the checkout system's availability to the email system's availability.The systems engineer, by contrast, immediately recognizes that sending an email is an asynchronous operation.
They place a message on a queue, let a separate worker process handle the email, and return the checkout response without waiting. The checkout system's availability no longer depends on the email system. The feature still works. This is not advanced knowledge. This is a shift in perspective that changes every design decision you will ever make.The Sarah in our opening story was a brilliant coder.
She had written the checkout service in a clean, maintainable, well-tested codebase. She had used design patterns and dependency injection and all the tools of modern software craftsmanship. None of that saved her from the failure because coding skill and systems thinking are not the same thing. They are complementary, but they are not interchangeable.The Five Non-Functional Requirements That Define Your System Every system has functional requirements: "The system shall allow a user to add an item to their cart." "The system shall calculate shipping costs based on the user's zip code." These are important, but they are also the easy part. The hard part—the part that separates systems that survive from systems that collapse—is the non-functional requirements.Non-functional requirements describe how the system behaves, not what it does.
They are the rules of engagement between your code and reality. Ignoring them is the single most common cause of production failures, and yet most engineering curricula spend less than five percent of their time on them. This book will reverse that ratio.Scalability: The Ability to Grow Without Rewriting Scalability is the capacity to handle increased load by adding resources rather than redesigning the system. It has two forms. Vertical scalability means buying a bigger machine: more CPU cores, more RAM, faster disks.
This is the easy path. It requires no architectural changes. You simply pay for a larger instance in your cloud provider and restart your service. The problem is that vertical scaling is finite. There is always a maximum machine size.
Eventually, you cannot buy a bigger server because no one sells one.Horizontal scalability means adding more machines. Instead of one server handling one million requests per second, you run ten servers each handling one hundred thousand requests per second. This is the scalable path. It has no theoretical upper bound. The challenge is that not all systems can scale horizontally.
A database that maintains strict consistency across all writes cannot simply be copied to ten machines without careful coordination. A service that stores user session data in local memory cannot route a user's second request to a different server and still find that session.The key insight about scalability is that it is never free. Horizontal scalability requires statelessness or shared state. It requires a load balancer that understands how to distribute traffic. It requires handling the failure of individual nodes.
But when you design for horizontal scalability from the beginning, you buy yourself the option to grow. When you ignore it, you eventually hit a wall that forces a painful and expensive rewrite.Availability: The Percentage of Time You Are Not On Fire Availability is measured as a percentage of uptime. 99.9% availability…
This is the end of the free sample. Get the eBook to keep going. Buy now
About this book
Details
- Author
- Battaglia Summer
- Publisher
- SamEnrico
- Language
- English
- Genre
- Non-Fiction, Informative, Educational
- Released
- 2026-06-02
- Pages (approx.)
- 139
- Available as
- eBook, Audiobook
Read better in the ZLOADR app
Your eBooks on your phone or tablet. Sign in with your SamEnrico account and start reading.
More by Battaglia Summer
Visual Focus Signals For Teams HandbookBattaglia Summer$11.99
Indian Data Security ComplianceBattaglia Summer$11.99
Education Essay GPT GuideBattaglia Summer$11.99
Anger After Unfair Performance ReviewBattaglia Summer$11.99
The Shlomo Carlebach Musical RabbiBattaglia Summer$11.99
The Eagle and the Lion: Marshal Ney at DennewitzBattaglia Summer$11.99
Water Utility M&A GuideBattaglia Summer$12.99
QuickBooks Year End GuideBattaglia Summer$12.99
Understanding Plummer–vinson SyndromeBattaglia Summer$17.99
How to Start a Optical Element (unmounted) Business (Beginners Guide)Battaglia Summer$11.99