In the multi-tier pattern, runtime structures are organized into logical groups. These logical groups may be allocated to specific physical components, such as a server or cloud platform. The multi-tier pattern is conceptually similar to the layers pattern. Layers are a module structure and deal with design-time elements, whereas tiers are either a component and connector or allocation structure and deal with runtime elements.
Any system in which components will live on different platforms or hardware will benefit by thinking about the tiers at play and which components reside on different tiers. See the table.
Category | Component & Connector or Allocation |
Elements |
Tier—a logical grouping of runtime components. There are many ways to partition tiers. Some examples include functional responsibilities, compute platforms, team responsibilities, communication mechanisms, security requirements, and data access. |
Relations |
Belongs to—used to group components into a tier. Communicates with—shows how tiers or the components within interact with one another. This relation may be specialized to include information about protocols and communication constraints. Allowed to communicate with—indicates which tiers may communicate with components in other tiers. Allocated to—maps tiers to physical compute platforms. |
Rules for Use | A component may belong to only one tier. Components within a tier are only allowed to communicate with other components within the same. Additional constraints describing tier communication can enhance reasoning and improve maintainability. A common approach is to allow communication only among adjacent tiers. |
Strengths | Promotes security, performance, availability, maintainability, modifiability. Can be used to reason about costs and deployment. |
Weaknesses | As a runtime construct, tiers can be difficult to enforce in large systems. Systems with many tiers can inhibit performance and maintainability. |
Here is a diagram depicting the multi-tier pattern. In this example, components in the application tier are allocated to the customer’s servers. Components in the middle tiers are allocated to a common platform but have different functional responsibilities. Components in the data tier are hosted on a different cloud platform and may only include databases.
3.142.245.44