Reputation: 3231
I have a web application that is deployed as follows on web hosting:
Is this considered a 2-tier architecture or 3-tier architecture?
I have seen different explanation from different sources
Definition of 2-tier by this source
In a 2-tier architecture, web server responds to requests for web pages and a database server provides backend data storage
Definition of multi-tier by this source
In a 3-tier architecture, a web server is linked to a middle-tier layer that typically includes a series of application servers that perform specific tasks, as well as to a backend layer of existing corporate systems
Hope that someone can clarify this.
Upvotes: 4
Views: 259
Reputation: 4759
It really depends on what you understand under the term "tiers" in your question.
From infrastructural/physical point of view in most web applications you will have 3 layers:
Client (browser) <--> Application Server <--> Database
As opposed to most desktop applications that consist of 2-tiers:
Client <--> Database
Note that by this this definition a website is not always 3 tier - you might not have any persistence in a simple site that just calculates compound interest for example.
In the web application architecture itself from logical point of view, you often have layers that are abstract representation the aforementioned tiers - for example in MVC, you will have Models corresponding to the database, Controllers corresponding to the logic performed on server and Views corresponding to what gets presented to the client.
So, infrastructurally, you have a 3-tier architecture (because you are clearly in the first case), but from what you have described, your website itself maybe doesn't follow a strict multi-layered approach and it unites multiple logical layers into one.
See this wikipedia article, it will further clear things up.
Update: Also this thread seems to clarify the issue.
Upvotes: 1