May 30, 2020 / Nirav Shah
In this blog we will explain to you about two-tier and three-tier architecture, and how we can design two-tier architecture with high Availability on AWS infrastructure.
So let get started with single tier architecture and then go to other type of the architecture,
Generally single tier architecture is used for small applications in which there is one server (both the backend and the frontend). and Single-tier deployment is cost-effective.
But having all the resources on the same machine can create an availability and security risk. If the server is down, the application will be down, and it will not communicate with the database. If the server is externally attacked, you are at greater risk of data loss if you do not have a replica of your database.
The typical architecture of diagram of Single-Tier Solution looks like this:
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 Two-tier architecture is divided into two parts:
On the client application side the code is written for saving the data in the SQL server database. Client sends the request to the server and it processes the request & sends it back with data. The main problem of two tier architecture is the server cannot respond to multiple requests at the same time, as a result it causes a data integrity issue.
It’s also called server-client technology.
So now let understand in AWS cloud terminology,
Here simple explain of two-tier architecture web application deployment on AWS infrastructure,
Above diagram you can see so many AWS services are used, like,
Here you can see that a custom VPC is created so that your Web application will be secure, we have spread all resources across two availability zones (AZ) to provide for redundancy for scheduled system maintenance. As such, each availability zone is hosting at least one instance per service, except for services that are redundant by design (e.g. Simple Storage Service, Elastic Load Balancer, Route 53, etc.).
Web Tier consists of two web servers (one in each availability zone) that are deployed on Elastic Compute Cloud (EC2) instances. We balance external traffic to the servers using Elastic Load Balancers (ELB). Dynamic scaling policies allow you to elastically scale the environment in adding or removing web instances to the auto scaling group. Amazon Cloud Watch allows us to monitor demand in our environment and triggers scaling events using Cloud Watch alarms.
Database Tier, Relational Database Service (RDS) provides the relational (MySQL, MS SQL or Oracle) environment for this solution. In this design, it is established as a multi-AZ deployment. The multi-AZ deployment includes a standby RDS instance in the second availability zone, which provides us with increased availability and durability for the database service in synchronously replicating all data to the standby instance.
Optionally we can also provision read replicas to reduce the demand on the master database. To optimize costs, our initial deployment may only include the master and slave RDS instances, with additional read replicas created in each AZ as dictated by the demand.
For minimized latency we use Amazon’s CloudFront content distribution network. CloudFront maintains many edge locations across the globe. An edge location acts as a massive cache for web and streaming content.
We use the Route 53 domain name service for the registration and management of our Internet domain.
So this is about two-tier architecture Now see the below diagram of three-tier architecture on AWS infrastructure
When you design the solution for web- application you have to keep in mind the below points.
In this blog we learned about single tier, two tier and three tier architecture. So in single tier we have only one server and one database and in two tier architecture on
As a Director of Eternal Web Private Ltd an AWS consulting partner company, Nirav is responsible for its operations. AWS, cloud-computing and digital transformation are some of his favorite topics to talk about. His key focus is to help enterprises adopt technology, to solve their business problem with the right cloud solutions.
Have queries about your AWS project ideas and concepts? Please drop in your project details to discuss with our AWS experts, professionals and consultants.