Serverless Multi-Tier Architecture on AWS

Serverless Multi-Tier Architecture

Multi-tier Architecture

Multi-tier Architecture is also known as n-tier architecture. In such architecture, an application is developed and distributed in more than one layer. The number of layers depend on business requirements but three tier architecture is a preferred choice and most commonly used.

This three-tier architecture includes the Presentation tier, the Logic tier and the Data tier.

Blog 2 Fig. 1 Tiers Of Architecture Multi-tier Architecture

Fig 1: Tiers of Architecture

Users directly interact with Presentation tier. The Logic tier contains code that translates the user’s actions to the application’s behavior. The Data tier consists of storage that holds the data relevant to the application

Thousands of servers could be used in monolithic architecture to increase the performance of an application. This serverless multi-tier architecture pattern eliminates server management.
Following are the several benefits of using serverless services managed by AWS

1. No Operating Systems to choose, patch or manage
2. No servers to monitor, scale out or secure
3. No risk to Infrastructure cost by over-provisioning
4. No risk to application performance by under-provisioning

Serverless Services

Blog 2 Fig. 2 Serverless Services

Fig 2: Serverless Services

All the above services scale automatically to support the exact needs of the application.

Serverless Architecture

Blog 2 Fig. 3 Serverless Architecture

Fig 3: Serverless Architecture

Presentation Tier

In above architecture, static content is hosted on Amazon S3 and distributed by Amazon CloudFront. Hosting static website content on Amazon S3 is an economical alternative to host content on server-based infrastructure. Also, a large amount of data can be stored in Amazon S3. Amazon CloudFront is a content delivery network to cache the static content and serve the dynamic and static content to improve webpage load times and reduce network bandwidth costs.

AWS CognitoUser pool is a user directory that provides sign-up and sign-in option for app users. It can also control who can access API in Amazon API Gateway

Logic Tier

For dynamic content route-53 send the request to API Gateway through AWS WAF and from API Gateway Lambda function triggers and stores the data in Amazon S3 and DynamoDB or AWS Aurora. Integration of Amazon’s API Gateway with AWS Lambda enables code functions to be triggered directly via HTTPS request. Both API Gateway and Lambda scale automatically regardless of the request volume required. These two services allow to focus on code that matters to the application rather than focusing on various other aspects of implementing multi-tiered architecture.
For Network Privacy AWS has the ability to create lambda function within Amazon VPC

AWS WAF is a web application firewall that can be deployed on CloudFront to protect the application against DDoS attack. WAF either allows or blocks the traffic by defining the security rules. Amazon Route 53 can connect user’s request to CloudFront distribution through AWS WAF.

AWS Glue can run ETL (Extract, Transform and Load) jobs based on an event such as getting new data set. In the above architecture, as soon as new data (logs) becomes available in Amazon S3, Glue runs ETL jobs and also these logs will be pushed to Amazon CloudWatch and notifications can be sent through Amazon SNS from Amazon CloudWatch.

Data Tier

As per the application scenario AWS Lambda will store the data to Amazon DynamoDB or AWS Aurora.

Amazon DynamoDB has the capability of storing infinitely scalable NoSQL database and also provides both provisioned and on-demand capacity modes so that costs can be optimized by specifying capacity per workload.

AWS Aurora is a MySQL and PostgreSQL compatible, fully managed relational database service built for the traditional enterprise database which needs performance and availability with the cost effectiveness of open source databases. It has the ability to automatically start up, shut down and scale capacity up or down based on application’s needs. It’s a cost effective solution for infrequent or unpredictable workloads

Amazon Athena/Amazon Redshift Spectrum uses the AWS Glue as a central location to store and retrieve table metadata. It has the ability to analyze unstructured, semi-structured and structured data store. Athena also can generate reports and Amazon QuickSightcan be integrated with Athena for easy data visualization

As per the best practices all the services are connected with AWS IAM Role. In many scenarios one can take advantage of this AWS Managed service rather than managing typical server-based infrastructure. With the help of this serverless multi-tier architecture one can easily create production application components that are easy to maintain, decouple, secure, scale and are highly available.

By Aarti Parikh

Mobile Apps Business

It May Not Be Sexy, But Strict Compliance Delivers The Freedom To Innovate

Compliance and Business Innovation When the U.S. based non-profit organization RHD | Resources for Human Development decided to move its operations into the cloud, one of its top priorities was compliance. As a company that ...
Signal Messenger: How to Successfully Resist Wiretapping Attempts

Signal Messenger: How to Successfully Resist Wiretapping Attempts

Successfully Resist Wiretapping Attempts Against the backdrop of events in the US, the popularity of the Signal secure messenger has grown sharply - from 6,000 to 26,000 downloads per day. This software uses strong cryptography ...
Future Fintech

What’s the cloud forecast for 2020?

Tech Agnosticism In 2019, we saw how cloud computing transformed the way data is managed, the way applications are developed and deployed, and also the way IT teams operate. Organizations are starting to experience the ...
Isc2

Episode 2: Coronavirus Phishing Emails and Work-from-Home Meetings

Coronavirus Phishing Emails What to watch out for as scammers exploit pandemic panic, and tips on how to attend meetings while working from home. Working from home this week? There are a few challenges and ...
Mark Casey Apcela

How to Optimize Your Office 365 Performance with Network Peering

Optimize Performance with Network Peering Microsoft Office 365 usage has grown significantly in recent years. More than 56 percent of organizations all around the world now use Office 365 cloud-based services. In terms of user ...
Scott Leatherman

Beware the Perils of Blind Cloud Provisioning

The COVID-19 Rush to the Cloud Results in Steep Costs and Chaos For many companies, their data center capacity was not built for the instant tsunami-sized jolt of increased load caused by the global pandemic ...