Slide 1

Slide 1 text

LOAD TESTING EVENT-DRIVEN SERVERLESS BACKENDS Renaldi Gondosubroto

Slide 2

Slide 2 text

AGENDA Introduction Motivation Planning for Load Testing Implementation for Load Testing Demo Key Takeaways ServerlessDays ANZ 2023

Slide 3

Slide 3 text

A BIT ABOUT ME 3 Load Testing Event-Driven Serverless Backends Renaldi Gondosubroto Software Developer for Seek Limited @Renaldig @renaldigondosubroto ServerlessDays ANZ 2023

Slide 4

Slide 4 text

MOTIVATION Load Testing Event-Driven Serverless Backends 4 More workloads shifted to serverless after the pandemic Determining the optimal loads of a system Identifying bottlenecks and potential issues early on ServerlessDays ANZ 2023

Slide 5

Slide 5 text

PLANNING FOR LOAD TESTING Load Testing Event-Driven Serverless Backends 5 1 Define the test goals 2 Identify the system(s) that will be under test 3 Design the test plan 4 Create the testing environment 5 Configure the testing tools 6 Execute the test 7 Analyze the results that are obtained 8 Optimize and Repeat ServerlessDays ANZ 2023

Slide 6

Slide 6 text

QUESTIONS TO ASK Load Testing Event-Driven Serverless Backends 6 How much load can my application withstand? Can my application handle X load? Does my application’s scaling work properly? How is my application’s behaviour when having a constant high load? Is my application working? ServerlessDays ANZ 2023

Slide 7

Slide 7 text

TESTING LIFECYCLE Load Testing Event-Driven Serverless Backends 7 Init Setup VU Code Teardown ServerlessDays ANZ 2023

Slide 8

Slide 8 text

DEFINING THRESHOLDS AND METRICS Load Testing Event-Driven Serverless Backends 8 Metrics Understanding metrics such as average response time, error rate, concurrent users Thresholds Setting thresholds such as a proportion that is allowed to return an error, having an endpoint return in a certain period ServerlessDays ANZ 2023

Slide 9

Slide 9 text

UNDERSTANDING WRITING PERFORMANCE TESTS Load Testing Event-Driven Serverless Backends 9 HTTP request against system that is being tested Load configuration for controlling the duration of the tests and virtual users (VUs) Provided performance goal or service level objective ServerlessDays ANZ 2023

Slide 10

Slide 10 text

THE TEST SCRIPT Load Testing Event-Driven Serverless Backends 10 ServerlessDays ANZ 2023

Slide 11

Slide 11 text

DEFINING PARAMETERS 11 Load Testing Event-Driven Serverless Backends ServerlessDays ANZ 2023

Slide 12

Slide 12 text

CONFIGURING STAGES Load Testing Event-Driven Serverless Backends 12 ServerlessDays ANZ 2023

Slide 13

Slide 13 text

Load Testing Event-Driven Serverless Backends 13 WORKING IN CODEBUILD AWS IAM GitHub Actions CICD Workflow GitHub Repo Git Push Amazon S3 AWS CodeDeploy Auto Scaling Group ServerlessDays ANZ 2023

Slide 14

Slide 14 text

Load Testing Event-Driven Serverless Backends 14 APPLICATION PROCESS FLOW GET /vendors GetVendors Function Vendors Table CloudWatch SNS Email Notification ServerlessDays ANZ 2023

Slide 15

Slide 15 text

CREATING A BUILDSPEC YAML FILE Load Testing Event-Driven Serverless Backends 15 ServerlessDays ANZ 2023

Slide 16

Slide 16 text

RUNNING IN CODEBUILD Load Testing Event-Driven Serverless Backends 16 ServerlessDays ANZ 2023

Slide 17

Slide 17 text

PUTTING EVENTBRIDGE INTO THE MIX Load Testing Event-Driven Serverless Backends 17 Create schedule for running at given times Automated load testing without the need of manual execution Ensure configuration is well-prepared for this ServerlessDays ANZ 2023

Slide 18

Slide 18 text

PUTTING EVENTBRIDGE INTO THE MIX CONT. 18 Load Testing Event-Driven Serverless Backends AWS CodeBuild AWS CodeCommit AWS EventBridge ServerlessDays ANZ 2023

Slide 19

Slide 19 text

DEMO

Slide 20

Slide 20 text

COMMON PITFALLS AND WHAT TO DO Load Testing Event-Driven Serverless Backends 20 Not simulating real world conditions Improperly configuring the test environment Not having the proper scaling Not monitoring the system during the test Not adequately testing the system holistically ServerlessDays ANZ 2023

Slide 21

Slide 21 text

WHERE TO FROM HERE? Load Testing Event-Driven Serverless Backends 21 Increased use of automation More use of cloud-based load testing solutions More use of ML and AI to identify potential issues and bottlenecks ServerlessDays ANZ 2023

Slide 22

Slide 22 text

KEY TAKEAWAYS Load Testing Event-Driven Serverless Backends 22 ROI • Cost saving within teams in working with deployments • Visualize savings made with AWS Cost Explorer • Engage in conversations around impact on scaling CUSTOMIZABILITY • Vary based on different workloads • Coordinate testing needs alongside AWS representatives EASY TO IMPLEMENT • Many similar load testing tools (e.g. Artillery) • Optimize for differing patterns and load tests ServerlessDays ANZ 2023

Slide 23

Slide 23 text

THANK YOU Connect with me @Renaldig @renaldigondosubroto