Contact Us

Contact Us



Pleas confirm by checkbox


Technical

Performance Testing for Serverless Architecture (AWS)

Author_img
By Arpita Bhat March 22, 2018

Purpose

This document provides a brief introduction/idea of how JMETER can be used with a serverless architecture also, like AWS, for evaluating the no. of read/writes capacity to benchmark the load an application can survive with.

What are AWS Lambdas? 

The code written is deployed over the cloud with one or more lambda functions, to AWS lambda, a compute service that runs the code on our behalf.

It takes care of the trouble of provisioning and maintaining the servers, elastic enough to scale, cost effective and secure, making easy for us to jump right at the business logic and not worry about the infrastructure and resource allocations.

Terminologies to be familiar with:

  1. API Gateway: It handles all the tasks involved in accepting and processing up to hundreds of thousands of concurrent API calls, including traffic management, authorization and access control, monitoring, and API version management.
  2. DynamoDB: It is a NOSQL database service triggered as we create, update, and delete items from the associated lambda tables.
  3. Lambda functions: It is our custom code with its dependent libraries. Both the Lambda function and the DynamoDB stream must be in the same AWS region.
  4. Cloud watch: These Logs helps to monitor, store, and access our log files.

 

How to use JMETER for Lambdas? 

Apache JMETER is widely known open source software, used as a load testing tool for analyzing and measuring the performance of a variety of services, with major focus on web applications.

It is easy to get started with and can be download from here for the quick reference.

Now, for a serverless architecture, the setup of JMETER would be quite similar to the server based architecture, as we need to keep in mind the required number of threads, target concurrency, etc.

We can use the concurrency thread group to maintain the level of concurrency, by adding set of threads during the runtime. As it won’t launch all the target threads upfront, so extra memory won’t be used and behavior of application can be gauged on how it tackles the load as no. of threads increase.

blogg1

Also, we need to keep an eye on the tables or indexes of DynamoDB to witness the spike received once we trigger or hit the APIs of lambda functions.

Note: There can be multiple values accessed from multiple lambda functions, thus we need to be very cautious when we call a lambda which involves values from multiple tables.

How to check graphs/logs/results on AWS? 

Once the intended API’s of related lambda functions are triggered through JMETER, we need to check on the AWS console inside the Cloud watch’s ‘Metrics’ tab about the consumed reads and writes of respective tables.

blogg2

The immediate spike in the graphs within the same time frame as when the lambda was invoked will provide a relevant visibility of the read write capacity used for that particular table or index.

The cumulative consumed capacity of each table can then be used to set a maximum load with 20% buffer, for an index or table to handle.

Conclusion 

Thus, In order to determine the responsiveness and stability of the application under test (AUT) for server less architecture and to make the application robust by setting a read/write measure, JMETER for AWS provide a great support to go ahead with.

Related posts
3 Crucial Ways of Inserting Code into a Running Application without Creating Bottlenecks
Technical

3 Crucial Ways of Inserting Code into a Running Application without Creating Bottlenecks

By talentica January 28, 2022
Apache Spark Standalone Setup On Linux/macOS
Technical

Apache Spark Standalone Setup On Linux/macOS

By talentica October 20, 2021
Apache Flink Standalone Setup on Linux/macOS
Technical

Apache Flink Standalone Setup on Linux/macOS

By talentica October 13, 2021
Identity, Authentication, And Access Management Using Azure Active Directory  
Technical

Identity, Authentication, And Access Management Using Azure Active Directory  

By talentica September 22, 2021
Things to Know Before You Select A Crypto Wallet
Blockchain

Things to Know Before You Select A Crypto Wallet

By talentica September 20, 2021
Solve 3 Most Irritating Outlook Email Rendering Issues.
Technical

Solve 3 Most Irritating Outlook Email Rendering Issues.

By talentica September 15, 2021
Intuit Wasabi – A Scalable A/B Testing Solution
Technical

Intuit Wasabi – A Scalable A/B Testing Solution

By talentica September 01, 2021
How To Pick The Right Data Analytics Strategy For Serverless Systems?
Big Data

How To Pick The Right Data Analytics Strategy For Serverless Systems?

By talentica August 25, 2021
Change Notifications and Named Options using Options pattern in .NET Core
Technical

Change Notifications and Named Options using Options pattern in .NET Core

By talentica August 18, 2021
Create Strongly Typed Configurations in .NET Core
Technical

Create Strongly Typed Configurations in .NET Core

By talentica August 13, 2021

Stay updated

Get the latest creative news from Fubiz about art, design and pop-culture.