Article · Solution Architect – role and craft · Modular Monolith
HLD step by step: from a blank page to an approved architecture
How the High-Level Design of a new system comes together – nine steps on a real example of a marketplace order system: 10k orders a day, a confirmation in < 2 s, a full audit trail, zero overselling. Context and NFRs, AS-IS, options, TO-BE, C4 Context and Container diagrams, the key flow's sequence, a time budget, deployment, risks, review – with a downloadable HLD template and checklist.
The project gets the green light, a budget and a deadline. At the first meeting someone asks: "so when will the HLD be ready?". The document that in a few weeks has to convince the architecture committee, security and infrastructure, and then guide four teams for months. An HLD (High-Level Design) describes the solution at the level of components, flows and decisions, without going into classes and tables. In this article we walk through how it is created, step by step, on a single real example.
- 9
- steps of HLD work – from context to epics and LLDs
- 11
- chapters of a typical document – from goal and scope to risks
- 2–4
- key flows – on sequence diagrams
HLD, LLD and ADR – what is what
| Artefact | Level | Answers the question | Who writes it |
|---|---|---|---|
| HLD (High-Level Design) | the solution: components, flows, integrations, decisions | what are we building and how does it connect? | Solution Architect |
| LLD (Low-Level Design) | a component: code structure, database schema, exact contracts, error handling | how exactly do we build this component? | the team, the tech lead |
| ADR (Architecture Decision Record) | one decision: context, options, choice, consequences | why this way and not another? | the architect or the team |
An HLD doesn't list the columns of a table or a class hierarchy. Instead, it says that order data is owned by a single component, that the confirmation happens synchronously, and that the ERP learns about the order from an event – and why.
The scenario: OrderFlow at Bazario
Bazario (a fictional but very typical marketplace) sells its own range and the offers of thousands of sellers. Today orders are handled by an old vendor shop platform: during promotions a confirmation can take a minute, stock levels sync from the ERP every hour, so overselling happens, and the ERP receives orders as a nightly CSV file. The goal of the new OrderFlow system fits in one sentence with numbers: 10k orders a day, a confirmation in < 2 s, a full audit trail of changes – and zero overselling.
Constraints: production launch in Q2, before the season; the company stack (Java 21 and Spring Boot, Kubernetes in an EU cloud region with several availability zones, managed Kafka, PostgreSQL); regulations (GDPR, NIS2, consumer law); data in the EU; card data never in our systems.
Nine steps
- Step 1 Context – Business goal, scope (what is in the project and what isn't), stakeholders, constraints: deadline, budget, company stack, regulations.
- Step 2 Requirements – Key use cases plus NFRs in numbers, e.g. "10k orders a day, a confirmation in < 2 s, a full audit trail".
- Step 3 Current state (AS-IS) – Which systems already exist, where the data comes from, what we must integrate with and what must not be touched.
- Step 4 Options – Usually 2–3 options with trade-offs: build or buy, microservice or module, REST or Kafka.
- Step 5 Target architecture (TO-BE) – Components and responsibilities, data flows, integrations, data model, security, deployment and monitoring.
- Step 6 Diagrams – C4 Context and Container, sequence diagrams for 2–4 key flows, a deployment diagram.
- Step 7 Risks, assumptions, questions – E.g. "we assume system X will expose an API by Q2".
- Step 8 Review and approval – Development teams, security, infrastructure, enterprise architecture. Usually several iterations.
- Step 9 Breakdown into work – The HLD produces epics and LLDs for the components. The HLD is updated when decisions change.
The order is approximate – in practice you go back to earlier steps. The AS-IS workshop reveals new NFRs, option B needs a PoC, the security review adds a risk. That's normal.
Steps 1–2: context and requirements
Before you draw the first box, write the scope explicitly – especially what you are not doing. Half of all project disputes are about scope nobody wrote down.
| In scope | Out of scope |
|---|---|
| orders in the mobile app, on the website and via a call-centre agent | returns and complaints (a separate project) |
| confirmation, stock reservation, payment through the operator, handover to manual fraud review | picking and shipping (WMS and carriers) |
| invoices, audit trail, status notifications for the customer and the seller | the loyalty programme |
Non-functional requirements go into the HLD in short form, with a link to the NFR catalogue (how to build it – in the previous article): a volume of 10k a day and a peak of 1,500 an hour (Black Friday ×5), confirmation p95 < 2 s, 99.9% monthly availability, RTO 1 h and RPO 0 for paid orders, zero overselling, a full audit trail.
Step 3: current state (AS-IS)
The AS-IS workshop is usually the most instructive two hours of the project. It turns out the ERP runs an end-of-day close at night and accepts no calls during it, the antifraud system bought a year ago has an API but with a request limit, and customer service checks suspicious orders manually, from e-mail.
Record the AS-IS findings as constraints: the ERP must not be called synchronously at night, the antifraud limit is 20 requests per second, the WMS is the source of truth for physical stock, and the CRM remains the customer contact system.
Step 4: options
We consider three real options (the full weighted decision matrix is in the article on decisions and ADRs):
| Option | Description | Strength | Weakness |
|---|---|---|---|
| A. Extend the shop platform | an orders module from the current platform vendor | familiar system, quick start | response time at peak, promotion flexibility, vendor dependency |
| B. New OrderFlow service | a modular service on our own stack + events in Kafka | performance, full control over reservations, promotions and audit | the most in-house work, deadline risk |
| C. SaaS OMS platform | a ready-made order management system | fastest rollout | customer data at the vendor, licence growing with order count, hard exit |
Decision: option B (ADR-0011) – with one caveat: we start with a modular monolith, not microservices. The Orders, Payments and Reservations modules have clear boundaries and can be extracted later if the need arises.
Steps 5–6: target architecture and diagrams
An HLD usually needs only two levels of Simon Brown's C4 model: Context (the system and its surroundings) and Container (applications, databases, queues inside the system). The Component and Code levels belong to the LLD.
Every box in the diagram gets a row in an HLD table: responsibility, technology, owning team. Every arrow gets a label and a protocol. A diagram with unlabelled arrows is a picture, not an architecture.
The rest of this article is for members
Create a free account or sign in to read it all. Still ahead:
- The key flow: placing and confirming an order
- Data, security, deployment
- Step 7: risks, assumptions, open questions
- Step 8: review and approval
- Step 9: breakdown into work
- The HLD template and checklist to download
- Related
- Check yourself