What Is 3-Tier(Multi-Tier) Architecture And Why Do You Need It?
Three-tier or multi-tier architecture are often used when describing how clients connect to servers. But what does it all mean and do you need to make any changes to your existing infrastructure?
Let me try to explain this in non-technical terms (or as close to it I can get).
We all know software packages like MS Access, MS Excel, QuickBooks, and Peachtree just to name a few. They all have the same in common that they access files directly. This means that the file you want to work with must be accessible from a local or shared drive. This is the simplest of all the architectures, but also the least secure. Since users have direct access to the files, they could accidentally move, modify, or even worse, delete the file by accident or on purpose.
There is also usually an issue when multiple users access the same file at the same time: In many cases only one can edit the file while others only have read-only access.
So 1-tier architecture is simple and cheap, but usually unsecured and data can easily be lost if you are not careful.
This architecture is also called Client-Server architecture because of the two components: The client that runs the application and the server that handles the database back-end. When the client starts it establishes a connection to the server and communicates as needed with the server while running the client. The client computer usually can’t see the database directly and can only access the data by starting the client. This means that the data on the server is much more secure. Now users are unable to change or delete data unless they have specific user rights to do so.
The client-server solution also allows multiple users to access the database at the same time as long as they are accessing data in different parts of the database. One other huge benefit is that the server is processing data that allows the client to work on the presentation and business logic only. This mean that the client and the server is sharing the workload and by scaling the server to be more powerful than the client, you are usually able to load many clients to the server allowing more users to work on the system at the same time.
This involves one more layer called the business logic tier, service tier or middle tier (layer). In the client-server solution the client was handling the business logic and that makes the client “thick”. A thick client means that it requires heavy traffic with the server, thus making it difficult to use over slower network connections like Internet and Wireless (LTE, 3G, or Wi-Fi).
By introducing the middle layer, the client is only handling presentation logic. This means that only little communication is needed between the client and the middle tier making the client “thin” or “thinner”. An example of a thin client is an Internet browser that allows you to see and provide information fast and almost with no delay.
As more users access the system a three-tier solution is more scalable than the other solutions because you can add as many middle tiers (running on each own server) as needed to ensure good performance (N-tier or multiple-tier).
Security is also the best in the three-tier architecture because the middle layer protects the database tier.
There is one major drawback to the N-tier architecture and that is that the additional tiers increase the complexity and cost of the installation.
Take a look at the differences among these three.
No server needed
|Exceptional securityFastest execution
Multi user issues
|Users||Usually 1 (or a few)||2-100||50-2000 (+)|