Developing Scalable Applications by Leveraging the AWS Resources

Developing Scalable Applications by Leveraging the AWS Resources

What is scalable application architecture?

Scalable Application Architecture is a smarter way to manage large applications with concurrent users. It allows you to make your application scalable so that it can handle the load at run time without affecting user experience .

AWS provides resources like EC2, S3, SQS and Lambda that help develop a scalable application.

Let’s understand by taking an example of a credit card transaction and online payment application

Example
Scalable Architecture diagram for implementing solution with EC2, S3, SQS and Lambda

Understanding the process of Scalable Architecture using EC2, S3, SQS, Lambda services  

The application will run on an EC2 where users will make transactions via credit card.

The process is as follows:

1. We shall use EC2 services to host and scale the entire application. The image below shows how you can use EC2 to scale the application and its resources

2. Once a user reaches the application and makes the online payment or any transaction on the application – the application shall push the message in SQS and a queue will be formed to make a pool of messages.

Queue

3. The image above shows that there are two types of queues: Standard and FIFO

4. Here we shall leverage a standard queue because it supports unlimited number of transactions whereas FIFO has limitation of 300-message per transaction limit. 

FIFO

5. After selecting and naming our queue, we have to set some parameters like visibility time. Here the Lambda will check any message available in queue so that it can process further.

check message

6.  Application will use lambda which will pool all messages from SQL and will execute all messages and delete them once the execution is completed.

messages from SQL

7. Application shall use SQS-Poller default blueprint to pull all the messages available in SQS pool. You can also create a lambda function from scratch. 

SQS-Poller

8. Once you click on SQL Poller you will see the screen as shown below where you can define the lambda function name and trigger SQS settings

9. The code will trigger and check if any new messages are available in pool and if yes it will process the messages further. 

10. For testing purposes, lets’ send one message in the queue to check if any messages are stored in the pool. Below matrices show the status of the queue.

11. Here S3 is also used for storing the transaction log files and the log data can be stored in DynamoDB. 

12. With the Help of S3 application, you can store the transactions and payment invoices of users as well , so S3 will work as a storage application.

S3 buckets

In this blog, we discussed how to set up and configure scalable solutions, hence after implementing all above services together like EC2, S3, Lambda, SQS we can say our application can be made scalable and handle large amounts of traffic and load in an effective manner. This scalable architecture will surely help to develop futuristics and high-level applications on the go.

In case of any queries, do get in touch with an DEV IT expert here.

The following two tabs change content below.

Rohit Chandak

Sr. Software Developer (PHP) at Dev Information Technology Ltd.
I am a Sr. Software Developer having 6+ years of experience in open source and mean stack technology. I have hands on experience on cloud technology like EC2,s3 bucket, Route 53. My area of interest is tech blog writing.

Leave a Reply

Your email address will not be published. Required fields are marked *