JavaScript is disabled. Lockify cannot protect content without JS.

What Is System Design in Software Engineering? A-to-Z Guide!

This article explains about What Is System Design in Software Engineering? And how developers turn business requirements into a plan for building software. It also covers the difference between high-level design and low-level design, with a practical example of an online store checkout.

Have you ever wondered what happens when two customers try to buy the last item in an online store at the same time?

Imagine you run an online electronics store. There’s one pair of headphones left, and two customers click “Pay now” within seconds of each other. One customer starts paying, but their internet connection drops before the order confirmation appears. When they reconnect and try again, your store needs to recover the existing order and check the payment status without creating a duplicate order.

This is one practical use of system design. The team decides which part of the software reserves stock, where the order status is stored, and how the payment provider confirms the result. It also decides what each customer sees while the system checks availability or waits for payment confirmation.

A diagram can show how the website, backend, database, and payment provider connect. The team still needs to define what happens when two requests arrive together, a customer submits the same checkout twice, or a payment confirmation arrives after the stock reservation expires. Each of these cases gives developers and testers a specific rule to verify.

Whether you’re building your first booking app, adding payments to an existing website, or preparing for a software engineering interview, understanding system design can help you choose the right components, give each one a clear responsibility, and plan how the system will recover when a step fails.

What Is System Design in Software Engineering

In this Oflox® guide, we will walk through an online store checkout, compare high-level design with low-level design, and show you how to turn requirements into an architecture, a data model, and a set of testable rules.

Let’s explore it together!

What Is System Design in Software Engineering?

System design in software engineering is the process of defining a software system’s components, data, interfaces, and behaviour so it can meet specific requirements. It covers how components work together, where information is stored, how the system handles load and failures, and which trade-offs the team accepts.

Consider a requirement such as “Customers should be able to buy items online.” System design turns that statement into decisions a team can implement. The backend recalculates the price, the inventory module reserves stock, the payment provider processes the payment, and the order module records the outcome. The customer can return later and check the order’s current status.

A system design usually includes a mix of diagrams, written rules, API contracts, data models, and decision records. The amount of detail depends on the project. A small internal tool might need a page of notes and a data model. A checkout shared by several teams may need clear contracts, ownership details, and recovery procedures.

System design vs software architecture vs system analysis:

TermMain questionCheckout example
System analysisWhat problem are we solving, and what do users and the business need?Customers need to pay online and recover their order status after closing the browser.
Software architectureWhat major structures and relationships will support the system?One backend owns order and inventory processing, and an external provider handles payments.
System designHow will the system meet its requirements at both architectural and implementation levels?Define service boundaries, stock reservation rules, API responses, and payment recovery steps.

The boundaries between these terms vary by team. Architecture typically covers decisions with broad consequences. Detailed design makes those decisions concrete enough to implement and test.

Why Is System Design Important?

Design gives a team a way to examine behaviour before customers depend on it. A designer, developer, tester, and support lead can all review the same question. If a payment has gone through but the order is still pending, what should each person be able to see and do?

Good system design helps teams in four ways.

  • It makes requirements testable. “Checkout should be reliable” becomes a series of checks for duplicate submissions, stock conflicts, and delayed payment confirmations.
  • It makes changes easier to plan. If payment logic has a clear boundary, the team can estimate the work involved in adding a second provider and identify which workflows need retesting.
  • It connects engineering effort to customer impact. Making a catalogue page slightly faster might matter less than reducing the number of paid orders stuck in a pending state.
  • It establishes ownership. Support knows where to find the payment reference. Engineering knows which component can change the order status. Operations knows when to investigate.

A useful design review follows a real workflow from start to finish. When a customer presses Pay now, trace what happens in the browser, backend, database, and provider. Then trace the same path with a slow connection. The second walkthrough often reveals the decisions the first one missed.

A Brief History of System Design

In 1972, computer scientist David L. Parnas examined how teams divide software into modules. He argued for organising modules around design decisions that may change. In a checkout, that idea translates into keeping the rules for reserving stock in one place. A change to reservation timing should have a clear home, even if several screens depend on it.

As software came to rely more on networks and external services, designers had to account for outcomes they could only observe indirectly. A local database can report whether its transaction committed. A remote payment request can time out after the provider has accepted it. Teams need a way to recognise that uncertainty and resolve it later.

Modern practices give teams ways to describe and measure these decisions. The C4 model offers different zoom levels for architecture diagrams. Site reliability engineering uses service level objectives to describe the level of service users should receive. Both approaches help turn a broad design discussion into something people can review together.

High-Level Design and Low-Level Design

High-level design (HLD) describes the main parts of a system and how they interact. Low-level design (LLD) explains the data, interfaces, and rules that make those parts behave correctly.

AspectHigh-level designLow-level design
ScopeSystem boundaries, major components, dependencies, and deploymentData structures, API contracts, state transitions, and validation
Typical outputContext diagram, component overview, or deployment viewDatabase schema, API specification, sequence diagram, or pseudocode
Checkout exampleBrowser calls a backend that uses a database and a payment providerAn order in pending_payment can move to confirmed after a verified payment and a valid stock allocation
Review questionWhat happens if the payment provider is unavailable?How does the handler process a duplicate confirmation for an already confirmed order?

Imagine a high-level diagram with an arrow labelled Payment confirmation. It tells readers how the provider communicates with the application. The low-level design explains how the application authenticates the callback, links it to an order, and applies the correct state change.

Teams often move between these levels. Discovering that a provider callback can arrive hours after checkout may change the architecture. The team might add a background process to compare unresolved orders with provider records. What started as a detailed edge case becomes a component the team must deploy and monitor.

Key Components & Features of a Well-Designed System

A software system can contain an interface, an API, application logic, a database, and integrations. Each component should have a clear responsibility that can be explained in the context of a user task.

ComponentResponsibilityCheckout example
ClientPresents information and collects user inputDisplays the cart and payment status
APIDefines how clients and systems exchange requests and responsesAccepts a checkout request and returns an order ID
Application logicEnforces business rulesDetermines whether items can be reserved and an order can be confirmed
DatabaseStores durable records and enforces data constraintsStores orders, inventory, reservations, and payment references
External integrationConnects the application to a separate systemStarts payment and receives a confirmation from the provider
Background workerHandles work independently of the original requestChecks expired reservations and reconciles unresolved payments

Several qualities help you judge whether these components work well together.

  • Reliability means the system continues to produce the expected outcome under the conditions it is designed to handle.
  • Scalability means it can support more work within acceptable limits by using additional capacity or a more efficient approach.
  • Maintainability means people can understand, test, change, and operate the software as requirements evolve.
  • Security includes verifying identity, enforcing access rules, and protecting sensitive data throughout the workflow.
  • Observability helps the team understand what the system is doing through signals such as traces, metrics, and logs. For checkout, those signals can show whether time is being spent in the backend, database, or an external call.

Components such as caches, message queues, and load balancers earn their place through a specific need. A catalogue cache can speed up browsing when a short delay in product updates is acceptable. The inventory decision at checkout needs an authoritative stock record. The same store can benefit from both approaches within the same customer journey.

How to Design a Software System?

Start with one workflow and draw its boundary. In this example, the design begins when the customer submits a cart and ends when the order is confirmed, cancelled, or routed to recovery. Shipping, coupons, returns, and multiple warehouses can be designed as separate workflows.

1. Define functional requirements

Functional requirements describe what people and integrated systems should be able to do. Use concrete verbs and state the expected outcome.

For checkout, the customer can submit a cart, start a payment, and look up the resulting order. The payment provider can send a confirmation. The support team can look up an order and its associated payment reference.

Add rules for conflicting or incomplete actions. For instance, if two customers request the last unit, only one should receive an active reservation. If the same customer resends an identical checkout request after a connection failure, they should recover the same order.

2. Define non-functional requirements

Non-functional requirements describe the conditions the system must meet while doing its work. They cover qualities such as performance, security, availability, and recoverability.

Illustrative targets for this store could include the following.

RequirementExample target or rule
API performanceThe 95th percentile for successful order-creation responses is under 500 ms at the expected peak load, measured before external payment processing.
Inventory integrityTwo concurrent checkout requests cannot reserve the same final unit.
Customer privacyAn authenticated customer can view only their own orders.
RecoveryUnresolved payments older than the agreed threshold enter a reconciliation workflow.

The 95th percentile, commonly written as p95, is the time within which about 95 out of 100 measured requests finish. Define which requests count, where timing starts and ends, and how often you measure it. Pair a latency target with an error-rate target so that a system which rejects many requests quickly cannot appear healthy based on speed alone. Google’s SRE guidance explains how indicators and objectives relate to the experience users receive.

3. Estimate traffic, data, and constraints

Use available numbers and label your assumptions. Suppose a sale campaign brings 12,000 checkout attempts during its busiest hour. That averages about 3.3 attempts per second over the hour. If half those attempts arrive in the first five minutes, that interval averages 20 per second, with shorter bursts potentially higher.

Then look at where the work lands. A sale featuring one popular product can send many requests to the same inventory row. Testing an evenly distributed set of products may hide that contention. A realistic test includes the busy item, repeat checkout calls, and payment updates arriving at the same time.

Other constraints matter too. A small team may have limited time to operate multiple services. An external provider may cap requests. A tight budget can affect test environments, backup frequency, and retention. Record the constraints that influence your choice so the next engineer can revisit it when circumstances change.

4. Draw the architecture and assign ownership

Start with the customer-facing application, the backend, the database, the payment provider, and any background worker you need. Label the arrows with actions such as Reserve stock, Start payment, and Receive payment event.

Then assign authority. The inventory module owns reservation decisions. The order module applies order status changes. The provider reports payment outcomes, and the backend verifies and records them. Support can view the resulting history through a permission-controlled interface.

For this store, a modular monolith is a reasonable starting point. One deployable application contains distinct order, inventory, and payment modules. It can use a single database transaction for changes that must commit together. If order traffic, team ownership, or deployment needs change, the team can review which boundaries justify an independently deployed service.

5. Design the data model and API contracts

List the records the system needs and explain what each one owns. For checkout, separate a durable order from an individual payment attempt. A customer may try a second payment after the first is definitively unsuccessful, while the order still represents the same purchase.

RecordExample fieldsDesign purpose
ordersOrder ID, customer ID, total, currency, statusTracks the purchase and its progress
order_itemsOrder ID, product ID, quantity, unit pricePreserves the items and prices agreed at checkout
inventoryProduct ID, available quantitySupports an authoritative stock check
reservationsOrder ID, product ID, quantity, expiry, statusTracks stock held for a particular order
payment_attemptsOrder ID, provider reference, amount, statusConnects provider results to the correct attempt
processed_eventsProvider event ID, handling timeHelps identify events already applied

An example API could use POST /checkouts to create or recover an order, GET /ORDER/{id} to fetch a customer’s order, and POST /webhooks/payments to receive provider events. Specify authentication, required fields, response meanings, and which errors a client can safely retry.

Define idempotency for operations that can repeat. In this design, an identical checkout request with the same key and customer identity returns the existing order. Reusing that key with a different cart is treated as a conflict. The backend stores the key with a uniqueness rule so that simultaneous duplicates cannot both create orders. A provider may support its own idempotency key for payment creation. Use a stable key tied to the specific payment attempt and follow that provider’s rules.

6. Walk through failures and trade-offs

Ask what happens if a network call times out, a database change fails, or two events arrive in an unexpected order. Record the customer-facing result and the backend’s recovery path for each case.

Use timeouts and limited retries for temporary failures. Backoff increases the delay between retries, and jitter adds variation so that many clients are less likely to retry together. Apply retries to operations that are safe to repeat under their API contracts.

A separate problem appears when an order is confirmed in the database but the process stops before sending the fulfilment message. A transactional outbox can save the order update and an outgoing event in the same database transaction. A worker publishes the event afterwards. Consumers still need to recognise duplicate delivery.

7. Validate the design with tests and measurements

Turn each important rule into a test. Run two checkout requests against one remaining item, repeat an identical payment event, and send a late confirmation after the reservation has expired. Check the stored data as well as the messages returned to customers.

Choose operational signals that tell the team when to investigate. Three examples are the age of the oldest unresolved payment, the number of confirmation events that fail validation, and the time between payment confirmation and fulfilment handoff. Write down who reviews each signal and how they find the affected orders. A chart becomes more useful when someone can act on what it shows.

Practical System Design Example: Online Store Checkout

The checkout in this example uses one backend, one relational database, an external payment provider, and a worker for recovery tasks. The flow centres on two decisions. The database determines whether stock can be reserved, and the backend confirms an order only after checking the payment and reservation.

```mermaid
sequenceDiagram
    participant C as Customer
    participant B as Store backend
    participant D as Database
    participant P as Payment provider
    C->>B: Submit cart with request key
    B->>D: Create order and attempt reservation
    alt Stock reserved
        B->>P: Start payment for the order
        B-->>C: Return order ID and payment step
        P-->>B: Send payment event
        B->>D: Apply verified event and check reservation
        C->>B: Check order status
        B-->>C: Return current status
    else Stock unavailable
        B-->>C: Return stock conflict
    end
```

1. When two customers try to buy the last item

The backend recalculates the cart total using server-side product information. It then creates the pending order and reserves stock in one transaction. For a single product, the inventory statement reduces the available quantity only when enough stock remains. If the statement cannot reserve the requested quantity, the backend rolls back the checkout transaction.

In PostgreSQL’s default Read Committed isolation level, a concurrent update to the same row waits for the first update and then rechecks its condition against the updated row. For the simple conditional update in this example, the second request sees that the last unit has already been reserved. A cart with several items still needs an all-or-nothing transaction so it cannot leave behind a partial reservation

2. When the payment succeeds but the browser loses its connection

The application stores the order before starting payment and links the provider operation to a specific payment attempt. When the customer reconnects, the app can retrieve that order. If the outcome is still uncertain, the screen displays Payment pending and gives the customer a way to check again.

The provider can send a webhook, an HTTP notification that reaches the backend independently of the browser. The handler verifies its signature and checks that the reference, amount, currency, and status apply to the expected payment attempt. It records event handling durably and applies valid state changes. Provider events can repeat or arrive out of order, so the handler also checks the current state before changing it.

The backend should also account for a timeout while starting payment. A provider may have accepted the request. The store can recover that attempt using the stored reference, the provider’s idempotency mechanism, or its status API, depending on the integration.

3. When payment arrives after the stock reservation expires

An expired reservation may have already returned its unit to available inventory. Another customer may now hold it. The backend must coordinate expiry and payment confirmation against the same reservation state so they cannot both claim the unit.

A late payment goes through an explicit recovery rule. In this example, the system tries to reserve the item again if the business permits it. If stock is unavailable, it records the successful payment and routes the order to the agreed refund or support workflow. The customer sees a payment received message with the order’s actual recovery status. The order reaches fulfilment only when the stock allocation is valid.

4. How the same design thinking applies elsewhere

ScenarioDecision to get rightExample failure test
Clinic appointmentsWhich record owns the reservation for a doctor’s time slot?Two patients try to confirm the same slot simultaneously.
Food delivery trackingHow old can a location update be before the app labels it as stale?The rider goes offline and an older update arrives after reconnection.
Business invoice softwareWhich action issues an invoice and assigns its number?A user submits the issue request twice after a connection drop.

Each example has a different definition of correctness. An old delivery location can be shown with a timestamp. A duplicate confirmed appointment creates a direct operational conflict. Design starts by deciding which outcomes the business can accept and which rules the software must enforce.

Benefits, Challenges, & System Design Trade-Offs

A good design makes responsibilities easier to find, gives testers clear scenarios, and makes failures easier to diagnose. It also creates work. Every component adds behaviours to understand, dependencies to maintain, and costs to plan for. The goal is to choose that work deliberately.

Trade-offWhen the choice helpsWhat the team takes on
Keep modules in one applicationOne team owns the workflow and several changes need to commit togetherReleases and capacity are shared across modules
Deploy an independent serviceA component needs independent releases, ownership, or scalingNetwork failures, contract changes, and additional operational work
Cache frequently read dataUsers can tolerate bounded staleness and repeated reads are expensiveAn expiry or invalidation policy and a fallback when the cache is unavailable
Move work to a queueThe original request can finish while a worker handles the taskDelayed completion, duplicate delivery, and a need to track job progress

Changes to an existing system bring another challenge. Suppose an early version knows only pending and paid. Adding a new payment state affects current database records, the support dashboard, reports, and older clients. Plan how those parts will behave throughout the rollout. A compatibility period can give you time to backfill historical records, update clients, and check that reporting totals remain correct.

When there is uncertainty, prototype the smallest part that can settle it. Compare two ways of reserving inventory under realistic contention. Record what you measured, the conditions you tested, and what would make you revisit the choice.

5+ Helpful Tools for System Design

Use tools that produce something a teammate can review, reuse, or verify.

ToolWhat to createHow to use it for checkout
diagrams.netA system context or architecture diagramShow boundaries among the store, payment provider, and support team.
MermaidSequence or state diagrams stored as textModel the checkout request or the transitions between order states.
dbdiagram.ioAn entity-relationship diagramReview how reservations, orders, and payment attempts connect.
Swagger Editor and OpenAPIAn API contractDescribe checkout input, order responses, and stock conflict errors.
Grafana k6A repeatable load testModel a sale spike with many customers attempting to reserve the same product.

Start with one diagram and one table for the workflow you’re designing. Add an API contract when clients need to integrate. Add a load test when an assumption about capacity or latency could change the design.

Expert Tips and Common Mistakes

Before you start building, use these tips to clarify what your system must do, test how it handles failures, and avoid common design mistakes.

1. Write the rules that must always hold

A rule that must hold throughout a workflow is called an invariant. Examples include “available stock cannot go below zero” and “an order can enter fulfilment only when payment and allocation meet the confirmation rules.”

Write each invariant in plain English. Then mark where it is enforced and how a test will prove it. A common mistake is putting a critical rule only in the interface. The customer might use an old page, and two different requests can still reach the backend at the same time.

2. Make customer-facing states actionable

“Something went wrong” gives little guidance if money may have moved. Present a recoverable status, keep the order reference available, and give the customer a way to check progress. Give support staff enough context to find the payment attempt and see which step remains unresolved.

3. Record why you chose the design

An architecture decision record, or ADR, can fit on a single page. Capture the problem, options considered, decision, and consequences. For this store, a record could explain why inventory and orders initially share a database transaction and what change in ownership or workload would justify revisiting that choice.

4. Test recovery as carefully as the successful path

A demo often follows one customer on a stable connection. Test with expired reservations, repeated webhook deliveries, older client versions, and a worker that stops halfway through a task. Include a recovery test that starts from a previously stored order. The service needs to continue correctly after real interruptions, with enough history to explain the result.

FAQs:)

Q. What is system design in software engineering?

A. It is the process of deciding how software components, data, and interfaces work together to meet requirements. In an online store, system design defines how checkout reserves stock, starts payment, processes confirmation, and gives the customer an order status they can retrieve later.

Q. What is the difference between system design & software architecture?

A. Software architecture describes the major structures and relationships in a system. System design can include those architectural choices and the detailed rules, data models, interfaces, and failure behaviour needed to implement them.

Q. What is the difference between HLD and LLD?

A. HLD shows the main components and their relationships. LLD explains their implementation details. An HLD diagram shows that a backend receives a payment event. LLD defines how the backend verifies it, finds the order, and updates its state.

Q. Do small software projects need system design?

A. Yes. The amount of design work should match the project. A small appointment app may need only a simple architecture sketch, a data model, and a rule for preventing double bookings. A multi-location platform will usually need more detail about permissions, integrations, and recovery.

Q. How can beginners practise system design?

A. Choose a workflow you know, such as booking a classroom. Write three functional requirements and two quality targets. Draw its components, list the main records, then walk through one successful booking and two failure cases. Explain which design decision resolves each case.

Q. Does system design require coding?

A. You can start with requirements, diagrams, and data models. A small prototype becomes valuable when the design depends on a specific database behaviour, provider API, or performance assumption. Use code to verify decisions that could materially affect the outcome.

Conclusion:)

Understanding what system design is in software engineering helps you turn business requirements into decisions your team can build and test. Start with one workflow. Define what the user needs to do, which part of the system owns each decision, and what should happen if a request fails or arrives twice.

For an online store checkout, test whether two customers can reserve the same item, whether a retry returns the existing order, and what the customer sees when payment confirmation is delayed. The answers help you refine the design before customers depend on it.

At Oflox®, we approach custom software development by defining the workflow, the data it depends on, and how the software should recover when a step fails. If you’re planning a software project, share one workflow you want to improve and where it currently breaks down.

“A good system design gives your team a clear answer when the same request arrives twice, a payment takes longer than expected, or two users need the same thing at once.” — Suggested quote for Mr Rahman, Oflox®

Read also:)

Have you designed a checkout, booking system, or another software workflow? Share one edge case that changed your design in the comments below.

Leave a Comment