AWS Multi-Tier Architecture

C R Nitheshwar
4 min readNov 16, 2020

--

The reason why multi-tier architecture is mainly used for Web Applications on AWS because of multiple factors such as availability, security, performance, reliability, and cost optimization. The network acts as the boundary between tiers in this approach. However, as part of our application, there are many undifferentiated aspects of the creation of a new web service tier. The pattern itself is a direct result of much of the code written within a multi-tier web application. Examples include code that integrates one level into another, code that defines an API and a data model used by the levels to understand each other, and security-related code that ensures that the integration points of the levels are not exposed in an unwanted manner.

Figure 1: Architectural pattern for a simple three-tier application

Introduction

For large companies, customer churn is one of the most critical issues. The telecommunications industry always suffers from extremely high churn rates when one industry provides a better plan than the previous one it is very difficult to prevent losses, but we can hold it to a minimal level by prediction. Because of the direct impact on the company’s sales, companies aim to predict the churn of potential customers. So that's where we come to solve the issue!

Our Approach

The approach we considered was to build a prediction model using an XGboost algorithm(achieved 73% accuracy). The XGBoost algorithm is an algorithm for machine learning and is based on a decision tree using a gradient boosting method. To interact with the model, we created a website using Flask and secured with AWS multi-tier Architecture. Total work was done in the AWS cloud we used various services of cloud, like Sagemaker for Machine learning with help of the API we created a user interface for the model and the architecture provides better security to secure the web application, and thus we create multiple tiers.

Figure 2: Churn prediction architecture

For load balancing we create a separate subnet for publicly accessing servers we create another subnet for databases, and we create a backup of EC2 instances as snapshots with the help of AWS lambda we monitor a website with AWS cloud watch. This helps to secure the website if anyone of the services compromised while an attacker attacks the website, he can’t access the other services which are there in other subnets. Still, if any attack happening a notification alert will be sent to the admin. To secure the admin access we use a VPN for admin.

Figure 3: AWS Multi-Tier Architecture for our overall web application

Our Experience

At first, it was totally chaotic, since it was the first time for either of us to configure multiple AWS services together but thankfully with the help of our mentor we were able to progress and work on it.

Figure 4: Customer Churn Model

Our project is more focused on the architecture to provide better security and high availability for the website. Our main backend part was a Machine learning model which predicts the churn of customers. We first preprocessed the data by cleaning the data and checked any duplicate or null values are present or not then visualized the data then we used label encoder to convert the strings to numerical values then we used feature scaling and created an endpoint to interact with other services and we created lambda function to trigger the ml model and we created rest API to create the website. This whole thing was secured with the architecture.

Figure 5: The Block diagram of the Churn Model

Our original goals for this project were to build the architecture that provides better security to secure a web application. We create multiple tiers. For load balancing we create a separate subnet for publicly accessing servers we create another subnet for databases, and we create a backup of EC2 instances as snapshots with the help of AWS lambda we monitor a website with AWS cloud watch. This helps to secure the website if anyone of the services compromised while an attacker attacks the website, he cannot access the other services which are there in other subnets. Still, if any attack happening an SMS alert will be sent to the admin. To secure the admin access we use a VPN for admin.

Acknowledgment

Thanks, Bennett University!

I would like to thank our mentor, Dr. Indrajeet Gupta, for all the guidance and mentoring throughout the capstone project for the past 4 months which ensured smooth sailing till the end and thus helped us in develop this project.

Special thanks to my teammate, BODDEDA AVINASH for every support and help throughout the project which did help us in finishing the process on time.

Thanks for reading!

--

--

No responses yet