What are the difference between 2-Tier, 3-Tier and n-Tier?

1 month ago

Two-Tier Architecture:

The two-tier is based on Client Server architecture. The two-tier architecture is like client server application. The direct communication takes place between client and server. There is no intermediate between client and server. Because of tight coupling a 2 tiered application will run faster.

The above figure shows the architecture of two-tier. Here the direct communication between client and server, there is no intermediate between client and server.

Advantages

  1. Easy to maintain and modification is bit easy
  2. Communication is faster

Disadvantages:

  1. In two tier architecture application performance will be degrade upon increasing the users.
  2. Cost-ineffective

Three-Tier Architecture:


Three-tier architecture typically comprise a presentation tier, a business or data access tier, and a data tier. Three layers in the three tier architecture are as follows:

  1. Client layer
  2. Business layer
  3. Data layer

1) Client layer:

It is also called as Presentation layer which contains UI part of our application. This layer is used for the design purpose where data is presented to the user or input is taken from the user. For example designing registration form which contains text box, label, button etc.

2) Business layer:

In this layer all business logic written like validation of data, calculations, data insertion etc. This acts as a interface between Client layer and Data Access Layer. This layer is also called the intermediary layer helps to make communication faster between client and data layer.

3) Data layer:

In this layer actual database is comes in the picture. Data Access Layer contains methods to connect with database and to perform insert, update, delete, get data from database based on our input data.

Advantages

  1. High performance, lightweight persistent objects
  2. Scalability – Each tier can scale horizontally
  3. Performance – Because the Presentation tier can cache requests, network utilization is minimized, and the load is reduced on the Application and Data tiers.
  4. High degree of flexibility in deployment platform and configuration
  5. Better Re-use
  6. Improve Data Integrity
  7. Improved Security – Client is not direct access to database.
  8. Easy to maintain and modification is bit easy, won’t affect other modules
  9. In three tier architecture application performance is good.

Disadvantages

  1. Increase Complexity/Effort

N-Tier Architecture (multi-tier)


N-tier architecture (with N more than 3) is really 3 tier architectures in which the middle tier is split up into new tiers. The application tier is broken down into separate parts. These parts are differs from system to system. The primary advantage of N-tier architectures is that they make load balancing possible. Since the application logic is distributed between several servers, processing can then be more evenly distributed among those servers.

N-tiered architectures are also more easily scalable, since only servers experiencing high demand, such as the application server, need be upgraded. The primary disadvantage of N-tier architectures is that it is also more difficult to program and test an N-tier architecture due to its increased complexity. 

Bench Partner
Sep 21, 2021

Questions Bank

View all Questions

Top