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
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.
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.
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.
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.
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.
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.
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.
Latest posts by Rohit Chandak (see all)
- Developing Scalable Applications by Leveraging the AWS Resources - June 7, 2021
- AWS Route53: Understanding Features and its Usage - June 11, 2019
- A Step-by-Step Guide to Migrate from Magento 1.x to Magento 2.x - November 14, 2018