THREE TIER ARCHITECTURE : THE BEGINNING

Surabhi Pandey
CoffeeTechAndMe
Published in
3 min readFeb 11, 2018

Hi Guys! This is my very first blog and the reason I am here today and will be in future, is to share my technical experiences, learn, unlearn and relearn in the process and I’ll regularly be posting/updating any of my new technical involvements.

I don’t want to bore you from all the big fancy theoretical words. I’ll just be posting relevant practical implementation. But first lets get our basics done right.

WHY there is need to understand an architecture?? because no matter if you are just a budding developer, a college student or an experienced professional.If you want to gain end to end knowledge or want to develop an end to end application, first thing you need to be aware of the architecture of application.

For any application, apart from its efficient code the next most important thing is the kind of environment it is running in. And we never want our application to experience a downtime because of the environment lags.

So lets quickly dive into the topic:

A typical representation of three tier architecture

Web Layer: When we think from a user’s perspective, first thing we see is web layer, this layer presents data to the user and optionally permits data manipulation and data entry. This layer interacts with the application layer, to fetch any of the requests user makes on web layer. Common e.g. of web servers: Apache Tomcat, Nginx, Jetty

Application Layer: Next layer and the layer where all your business logic resides is the application layer. Supposedly you have created a jar/war or any of the bundled file out of your code, it runs on this layer. Many of the common application server like Jboss/Tomcat/Oracle WebLogic/IBM WebSphere, they act as a container for your bundled file and executes them at this app layer.

Application layer is also like middleman holding two hands, one is of web layer (where user tells your webapp what it wants) and the other one is db layer.

DB Layer: Last and the most crucial layer is the DB layer. Crucial because you can’t mess with the DB data, you can even risk the availability of your application layer, but if your application is up and it is giving the wrong data, this is the last thing application owner wants. As evident from its name this is the place where all your application related data resides.

However here I have briefed about three tier architecture. But if you are developing a small scale application and there is not much requirement for horizontal scaling of application, or you are student developing any small scale project you can skip the first layer and opt for just two tier architecture i.e. (app and db layer only).

But for professionals developing high scaling applications, to have a better performance (caching), scalability I would suggest to go for three tier architecture.

For my next post I’ll be explaining about flow of request in the architecture and HA at each layer with load balancing and fail over cases.

STAY TUNED!

--

--

Surabhi Pandey
CoffeeTechAndMe

DevOps professional on road to be architect. Loves to sing, dance, cook, play.