In
software engineering
Software engineering is a branch of both computer science and engineering focused on designing, developing, testing, and maintaining Application software, software applications. It involves applying engineering design process, engineering principl ...
, multitier architecture (often referred to as ''n''-tier architecture) is a
client–server architecture in which presentation, application processing and
data management
Data management comprises all disciplines related to handling data as a valuable resource, it is the practice of managing an organization's data so it can be analyzed for decision making.
Concept
The concept of data management emerged alongsi ...
functions are physically separated. The most widespread use of multitier architecture is the three-tier architecture (for example, Cisco's
Hierarchical internetworking model).
''N''-tier
application architecture provides a
model
A model is an informative representation of an object, person, or system. The term originally denoted the plans of a building in late 16th-century English, and derived via French and Italian ultimately from Latin , .
Models can be divided in ...
by which developers can create flexible and reusable applications. By segregating an application into tiers, developers acquire the option of modifying or adding a specific tier, instead of reworking the entire application. N-tier architecture is a good fit for small and simple applications because of its simplicity and low-cost. Also, it can be a good starting point when architectural requirements are not clear yet. A three-tier architecture is typically composed of a ''presentation'' tier, a ''
logic
Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the study of deductively valid inferences or logical truths. It examines how conclusions follow from premises based on the structure o ...
'' tier, and a ''
data
Data ( , ) are a collection of discrete or continuous values that convey information, describing the quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpreted for ...
'' tier.
While the concepts of layer and tier are often used interchangeably, one fairly common point of view is that there is indeed a difference. This view holds that a ''layer'' is a logical structuring mechanism for the conceptual elements that make up the software solution, while a ''tier'' is a physical structuring mechanism for the hardware elements that make up the system infrastructure. For example, a three-layer solution could easily be deployed on a single tier, such in the case of an extreme
database-centric architecture
Database-centric Architecture or data-centric architecture has several distinct meanings, generally relating to software architectures in which databases play a crucial role. Often this description is meant to contrast the design to an alternative ...
called RDBMS-only architecture or in a personal workstation.
Layers
The "Layers"
architectural pattern
Software architecture pattern is a reusable, proven solution to a specific, recurring problem focused on architectural design challenges, which can be applied within various architectural styles.
Examples
Some examples of architectural patte ...
has been described in various publications.
[Buschmann, Frank; Meunier, Regine; Rohnert, Hans; Sommerlad, Peter; Stal, Michael (1996-08). Pattern-Oriented Software Architecture, Volume 1, A System of Patterns. Wiley, August 1996. . Retrieved from http://www.wiley.com/WileyCDA/WileyTitle/productCd-0471958697.html.]
Common layers
In a logical multilayer architecture for an information system with an
object-oriented design
Object-oriented analysis and design (OOAD) is a technical approach for analyzing and designing an application, system, or business by applying object-oriented programming, as well as using visual modeling throughout the software development proc ...
, the following four are the most common:
* Presentation layer (a.k.a. UI layer, view layer, presentation tier in multitier architecture)
* Application layer (a.k.a.
service layer or
GRASP
A grasp is an act of taking, holding or seizing firmly with (or as if with) the hand. An example of a grasp is the handshake, wherein two people grasp one of each other's like hands.
In zoology
Zoology ( , ) is the scientific study of an ...
Controller Layer )
*
Business layer (a.k.a. business logic layer (BLL), domain logic layer)
*
Data access layer (a.k.a.
persistence layer, logging, networking, and other services which are required to support a particular business layer)
If the application architecture has no explicit distinction between the business layer and the presentation layer (i.e., the presentation layer is considered part of the business layer), then a traditional client-server (two-tier) model has been implemented.
The more usual convention is that the application layer (or service layer) is considered a sublayer of the business layer, typically encapsulating the API definition surfacing the supported business functionality. The application/business layers can, in fact, be further subdivided to emphasize additional sublayers of distinct responsibility. For example, if the
model–view–presenter pattern is used, the presenter sublayer might be used as an additional layer between the user interface layer and the business/application layer (as represented by the model sublayer).
Some also identify a separate layer called the business infrastructure layer (BI), located between the business layer(s) and the infrastructure layer(s). It is also sometimes called the "low-level business layer" or the "business services layer". This layer is very general and can be used in several application tiers (e.g. a CurrencyConverter).
[''Applying UML and Patterns'', 3rd edition, page 203](_blank)
The infrastructure layer can be partitioned into different levels (high-level or low-level technical services).
Developers often focus on the persistence (data access) capabilities of the infrastructure layer and therefore only talk about the persistence layer or the data access layer (instead of an infrastructure layer or technical services layer). In other words, the other kind of technical services is not always explicitly thought of as part of any particular layer.. The Data Access layer normally contains an object known as the
Data Access Object (DAO).
A layer is on top of another, because it depends on it. Every layer can exist without the layers above it, and requires the layers below it to function. Another common view is that layers do not always strictly depend on only the adjacent layer below. For example, in a relaxed layered system (as opposed to a strict layered system) a layer can also depend on all the layers below it.
The relaxed layered system has more couplings and subsequently it's more difficult to change. Multi-tier architectures can use a hybrid approach so that some layers are strict while other layers are relaxed.
Three-tier architecture

Three-tier architecture is a client-server
software architecture pattern in which the
user interface
In the industrial design field of human–computer interaction, a user interface (UI) is the space where interactions between humans and machines occur. The goal of this interaction is to allow effective operation and control of the machine fro ...
(presentation),
functional process logic ("business rules"),
computer data storage
Computer data storage or digital data storage is a technology consisting of computer components and Data storage, recording media that are used to retain digital data. It is a core function and fundamental component of computers.
The cent ...
and
data access
Data access is a generic term referring to a process which has both an IT-specific meaning and other connotations involving access rights in a broader legal and/or political sense. In the former it typically refers to software and activities relat ...
are developed and maintained as independent
modules, most often on separate
platforms. It was developed by
John J. Donovan in Open Environment Corporation (OEC), a tools company he founded in
Cambridge, Massachusetts
Cambridge ( ) is a city in Middlesex County, Massachusetts, United States. It is a suburb in the Greater Boston metropolitan area, located directly across the Charles River from Boston. The city's population as of the 2020 United States census, ...
..
Apart from the usual advantages of modular
software
Software consists of computer programs that instruct the Execution (computing), execution of a computer. Software also includes design documents and specifications.
The history of software is closely tied to the development of digital comput ...
with well-defined interfaces, the three-tier architecture is intended to allow any of the three tiers to be upgraded or replaced independently in response to changes in requirements or
technology
Technology is the application of Conceptual model, conceptual knowledge to achieve practical goals, especially in a reproducible way. The word ''technology'' can also mean the products resulting from such efforts, including both tangible too ...
. For example, a change of
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
in the ''presentation tier'' would only affect the user interface code.
Typically, the user interface runs on a desktop
PC or
workstation
A workstation is a special computer designed for technical or computational science, scientific applications. Intended primarily to be used by a single user, they are commonly connected to a local area network and run multi-user operating syste ...
and uses a standard
graphical user interface
A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
, functional process logic that may consist of one or more separate modules running on a workstation or
application server
An application server is a server that hosts applications or software that delivers a business application through a communication protocol. For a typical web application, the application server sits behind the web servers.
An application ser ...
, and an
RDBMS on a
database server
A database server is a server which uses a database application that provides database services to other computer programs or to computers, as defined by the client–server model. Database management systems (DBMSs) frequently provide database- ...
or
mainframe
A mainframe computer, informally called a mainframe or big iron, is a computer used primarily by large organizations for critical applications like bulk data processing for tasks such as censuses, industry and consumer statistics, enterpris ...
that contains the computer data storage logic. The middle tier may be multitiered itself (in which case the overall architecture is called an "''n''-tier architecture").
; Presentation tier
: This is the topmost level of the application. The presentation tier displays information related to such services as browsing merchandise, purchasing and shopping cart contents. It communicates with other tiers by which it puts out the results to the browser/client tier and all other tiers in the network. In simple terms, it is a layer that users can access directly (such as a web page, or an operating system's GUI).
; Application tier (business logic, logic tier, or middle tier)
: The logical tier is pulled out from the presentation tier and, as its layer, it controls an application’s functionality by performing detailed processing.
; Data tier
: The data tier includes the data persistence mechanisms (database servers, file shares, etc.) and the data access layer that encapsulates the persistence mechanisms and exposes the data. The data access layer should provide an
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
to the application tier that exposes methods of managing the stored data without exposing or creating dependencies on the data storage mechanisms. Avoiding dependencies on the storage mechanisms allows for updates or changes without the application tier clients being affected by or even aware of the change. As with the separation of any tier, there are costs for implementation and often costs to performance in exchange for improved scalability and maintainability.
Web development usage
In the
web development
Web development is the work involved in developing a website for the Internet (World Wide Web) or an intranet (a private network). Web development can range from developing a simple single static page of plain text to complex web applications, ...
field, three-tier is often used to refer to
website
A website (also written as a web site) is any web page whose content is identified by a common domain name and is published on at least one web server. Websites are typically dedicated to a particular topic or purpose, such as news, educatio ...
s, commonly
electronic commerce
E-commerce (electronic commerce) refers to Commerce, commercial activities including the electronic buying or selling Goods and services, products and services which are conducted on online platforms or over the Internet. E-commerce draws on tec ...
websites, which are built using three tiers:
# A front-end
web server
A web server is computer software and underlying Computer hardware, hardware that accepts requests via Hypertext Transfer Protocol, HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, co ...
serving static content, and potentially some
cached dynamic content. In web-based application, front end is the content rendered by the browser. The content may be static or generated dynamically.
# A middle dynamic content processing and generation level
application server
An application server is a server that hosts applications or software that delivers a business application through a communication protocol. For a typical web application, the application server sits behind the web servers.
An application ser ...
(e.g.,
Symfony,
Spring,
ASP.NET
ASP.NET is a server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name stands for Ac ...
,
Django,
Rails
Rail or rails may refer to:
Rail transport
*Rail transport and related matters
* Railway track or railway lines, the running surface of a railway
Arts and media Film
* ''Rails'' (film), a 1929 Italian film by Mario Camerini
* ''Rail'' (1967 fi ...
,
Node.js).
# A back-end
database
In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and a ...
or
data store
A data store is a repository for persistently storing and managing collections of data which include not just repositories like databases, but also simpler store types such as simple files, emails, etc.
A ''database'' is a collection of data that ...
, comprising both data sets and the
database management system
In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and an ...
software that manages and provides access to the data.
Other considerations
Data transfer between tiers is part of the architecture. Protocols involved may include one or more of
SNMP
Simple Network Management Protocol (SNMP) is an Internet Standard protocol for collecting and organizing information about managed devices on IP networks and for modifying that information to change device behavior. Devices that typically su ...
,
CORBA
The Common Object Request Broker Architecture (CORBA) is a standard defined by the Object Management Group (OMG) designed to facilitate the communication of systems that are deployed on diverse platforms. CORBA enables collaboration between sy ...
,
Java RMI,
.NET Remoting,
Windows Communication Foundation
The Windows Communication Foundation (WCF), previously known as Indigo, is a free and open-source runtime and a set of APIs in the .NET Framework for building connected, service-oriented applications.
.NET Core 1.0, released 2016, did not s ...
,
sockets,
UDP,
web service
A web service (WS) is either:
* a service offered by an electronic device to another electronic device, communicating with each other via the Internet, or
* a server running on a computer device, listening for requests at a particular port over a n ...
s or other standard or proprietary protocols. Often
middleware
Middleware is a type of computer software program that provides services to software applications beyond those available from the operating system. It can be described as "software glue".
Middleware makes it easier for software developers to imple ...
is used to connect the separate tiers. Separate tiers often (but not necessarily) run on separate physical servers, and each tier may itself run on a
cluster.
Traceability
The end-to-end traceability of data flows through ''n''-tier systems is a challenging task which becomes more important when systems increase in complexity. The
Application Response Measurement defines concepts and
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
s for measuring performance and correlating transactions between tiers.
Generally, the term "tiers" is used to describe physical distribution of components of a system on separate servers, computers, or networks (processing nodes). A three-tier architecture then will have three processing nodes. The term "layers" refers to a logical grouping of components which may or may not be physically located on one processing node.
See also
*
Abstraction layer
In computing, an abstraction layer or abstraction level is a way of hiding the working details of a subsystem. Examples of software models that use layers of abstraction include the OSI model for network protocols, OpenGL, and other graphics libra ...
*
Client–server model
The client–server model is a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients. Often clients and servers communicate ov ...
*
Database-centric architecture
Database-centric Architecture or data-centric architecture has several distinct meanings, generally relating to software architectures in which databases play a crucial role. Often this description is meant to contrast the design to an alternative ...
*
Front-end and back-end
*
Load balancing (computing)
In computing, load balancing is the process of distributing a set of tasks over a set of resources (computing units), with the aim of making their overall processing more efficient. Load balancing can optimize response time and avoid unevenly ov ...
*
Monolithic application
*
Open Services Architecture
*
Rich web application
*
Service layer
*
Shearing layers
*
Web application
A web application (or web app) is application software that is created with web technologies and runs via a web browser. Web applications emerged during the late 1990s and allowed for the server to dynamically build a response to the request, ...
References
External links
Linux journal, ''Three Tier Architecture''Microsoft Application Architecture GuideDescription of a concrete layered architecture for .NET/WPF Rich Client Applications
{{DEFAULTSORT:Multitier Architecture
Distributed computing architecture
Software architecture
Architectural pattern (computer science)
Software design
Software engineering terminology
Software design patterns