An LLD turns the decisions of the high-level design into a blueprint of a specific component — one that developers can write code from without follow-up questions. The IEEE 1016 standard applies to both high-level and low-level design. An LLD is written for a module or a service, usually once the HLD has been agreed.
What an LLD contains
| Section | What it describes |
|---|---|
| Modules and classes | the structure of the component’s code: classes, their responsibilities, class and sequence diagrams |
| Data | database tables and fields, indexes, relationships, migrations |
| API | the contracts of endpoints and internal interfaces: parameters, responses, error codes |
| Algorithms | the logic of key operations — pseudocode or flowcharts, performance requirements |
| Integrations and failures | calls to neighbouring services, message formats, error handling, logging |
LLD and HLD
An HLD answers the question of what the system consists of, an LLD — of how each component is built. Usually there is one HLD for the system, while an LLD is written for each component. The level of detail is such that a developer can implement the component from the document. How deep to go is for the team to decide: excessive detail quickly goes out of date along with the code.
When an LLD is needed
- a large system with several teams: an LLD records the contracts so that the teams do not block one another
- custom development: the low-level design is agreed with the customer before programming begins
- complex algorithms and integrations: it is cheaper to check the solution on paper before writing code
- a small service or part of a monolith: usually an HLD and code review are enough, and no separate LLD is written
Sources
the term is written from these pagesVerified 8 Nov