Difference Between Two-tier Architecture and Three-Tier Architecture in Tabular Form
S.No
Comparison
Two-tier Architecture
Three -tier Architecture
1.
Diagram
WEB SERVER
WEB-SERVER
Three Tier Architecture Web Database Application
2.
Architecture Type
Client -Server Architecture
Web -based application
3.
Working
Client will hit request directly to server and client will get response directly from server,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.
Here in between client and server middle ware will be there, if client hits a request it will go to the middle ware and middle ware will send to server and vice versa.
4.
Layers
2-tier means
Design layer/Client Application (Client Tier)
Data layer/Database (Data Tier)
3-tier means
Design layer /presentation
Business layer or Logic layer / data access tier
Data layer / data tier.
5.
Security
Less secured as client can talk to database directly
Highly secured as client is not allowed to talk to database directly
6.
Scalability
Poor
Excellent as requests can be load balanced between servers
7.
Reusability
Mostly clients are monolothic and thereby reusability not possible
Reusability more with services implementation
8.
Advantages:
Easy to maintain and modification is bit easy.
Communication is faster.
Better Re-usability.
Improve Data Integrity.
Improved Security – Client is not direct access to database.
Forced separation of user interface logic and business logic.
Business logic sits on small number of centralized machines (may be just one).
Easy to maintain, to manage, to scale, loosely coupled etc.
9.
Disadvantages:
In two tier architecture application performance will be degrade upon increasing the users.