Skip to content
IT glossary
ArchitectureUpdated December 3, 2026

Bounded context

Ограниченный контекст

A bounded context defines where a particular business model and its vocabulary apply. Outside that boundary, the same business term can have a different meaning or follow different rules.

What it means

In domain-driven design (DDD), a bounded context is the scope in which one model makes sense. Within that scope, developers and domain experts agree on what terms mean and use them consistently in conversation, documentation, and code. DDD calls this the ubiquitous language. It is shared within a context; it does not have to be shared across the whole organization.

Take the word customer. For Sales, a customer might be a company that negotiates and signs a purchase agreement. For Billing, the relevant concept might be a billing account: the same company could have several, each with different payment terms. If both workflows use one Customer class, a rule that makes sense for a billing account can easily be applied to the company as a whole.

How to find a boundary

Walk through real scenarios with the people who make the business decisions. Ask who can make each decision, which rules they must enforce, and what changes together. Different lifecycles or conflicting meanings are good reasons to consider separate models. Different screens or a few extra fields are not enough. If splitting two responsibilities means they must constantly coordinate to enforce the same rule, revisit the boundary.

A context map records how contexts relate: who depends on whom and how they exchange information. Communication can use a module interface, an API, or events. What matters is that each side understands the contract without having to adopt the other's internal model.

Example: Sales hands off to Billing

Sales accepts a purchase agreement and publishes an AgreementAccepted event containing the agreement ID and agreed charges. Billing uses that information to create an invoice for the corresponding billing account. The agreement ID ties the records together, but Billing decides when the invoice is overdue; Sales does not make that decision from the agreement's status. If billing information is needed in the sales UI, Sales can consume a defined invoice-status contract instead of querying Billing's tables directly.

What it isn't

A subdomain describes part of the business problem. A bounded context describes where a model applies in the solution. The two can align, but they are not necessarily a one-to-one match. A bounded context is also not a deployment unit: a modular monolith can contain several contexts, while deploying two services separately does not prove that they have distinct models.

In a system design interview

Don't stop at naming boxes on a diagram. Pick a decision such as marking an invoice overdue, say which context owns it, and show what other contexts need to know about the outcome. Explain the trade-off as well: an asynchronous handoff lets the models evolve separately behind a stable contract, but consumers may briefly see stale information.