Demystifying Performance Engineering of AWS Cloud Applications

Traditional load testing practices are now considered obsolete. As a result of agile methodologies and dev-ops practices, today’s customers expect frequent feedback and a shorter time to market. While good customer service and superior CX are paramount, test infrastructure provisioning and maintenance can hardly be ignored. With the emergence of cloud technologies several complexities have been simplified and stakeholders enjoy immense benefits such as quality and brand value.

The market offers several cloud computing platforms that are available on-demand. However, Amazon Web Services (AWS) has emerged as one of the most popular ones. In this blog, we will demystify some of their critical performance engineering services.

For more details about Indium’s testing solutions

Get in touch

About Cloud Computing

Cloud computing solutions refers to the on-demand availability of computer resources, especially data storage and computing power, without the user having to manage them actively. Major Cloud Service Models
• IaaS (Infrastructure as a Service)
• PaaS (Platform as a Service)
• SaaS (Software as a Service)
Pictorial representation of responsibilities management (Customer Vs Cloud Vendor)

The light blue areas indicate what the customer manages, while the dark blue denotes what the cloud vendor manages.

You might be interested in: Performance Testing – prevent your site from crashing this holiday season?

Challenges of On-prem Performance Testing

In traditional methodology, performance testing is usually conducted on-premises with a whole test infra setup built within a dedicated LAN environment. The testing activity performed at the end of the SDLC cycle often fails to cover real production issues.

Merits of Cloud Based Load Testing

Cloud Load Test  – Life Cycle

A must read: Is your Cloud Infrastructure optimized for Performance, Security, and Cost?

AWS Well-Architected Framework (PE Adoption)

Adoption of AWS well-architected framework during performance testing/engineering

Operational Excellence

This pillar emphasizes the effective coordination of the performance testing team with DevOps to achieve operational excellence in application testing.

The core design principles help with:

a. Understanding business and customer insights about the application to assess the risks and goals that drive daily business operations
b. Monitoring and refactoring production workloads during performance test evaluations to achieve maximum operational efficiency

Security

This pillar emphasizes adopting mechanisms that help to protect the system, data, and assets used during performance testing.

The core design principles aid in:

a. Setting up multi-layered security for infrastructure protection
b. Spotting and fixing security issues by logging and monitoring business transactions end-to-end
c. Ensuring data protection throughout the transit process
d. Implementing incident management effectively

Reliability

This pillar emphasizes approaches that help applications handle workloads accurately & consistently.

The core design principles assist with:

a. Verifying and validating whether test infra can handle current and future workloads
b. Performing DSR (Disaster Recovery) test on both frontend and backend to understand about failures, eliminating the single point of failures and reducing MTTR

Cost Optimization

This pillar emphasizes delivering optimal and resilient business solutions with the least cost for the end user.

The core design principles can help with:

a. Provisioning infra using cloud services which reduces both the CapEx, the OpEx, and the time spent

Performance Efficiency

This pillar emphasizes the effective use of computing resources to meet system and business requirements.

The core design principles aid in:

a. Deploying multi-regional workloads to reduce latency and lower deployment cost during infra setup
b. Testing and often experimenting during agile sprints and fixing performance issues incrementally during releases
c. Utilizing serverless functions where applicable to further optimize performance
d. Adopting cloud monitoring mechanisms and services to spot and fix performance issues/degradation

Core Services in Cloud Performance Engineering

Instance Provisioning

• Through AWS Console UI or CLI
• Through Import VM / Image Snapshots
• Through AWS Cloud Formation (Using YAML files)
• From Market Place


During this process, the instance type, OS type (AMI), storage, and network options can be configured. After creating the VM instance, we can also change a few parameters, such as the instance family and the disk size. There is also an option to provision a dedicated host/dedicated instance. As AWS infra is available globally, customers can choose a specific region/zone where the server can be provisioned, as shown in the diagram below.

 

Routing & Content Delivery

AWS Route 53 (Domain Name Server)

• Has DNS records for routing traffic to a specific domain
• DNS record types: A, AAAA, CNAME, NS and MX
• Routing types: Simple, Weighted, Latency, Failover, Geoproximity, Geolocation etc.

AWS Cloud Front (Content Delivery Network)

• Serve content directly from edge locations instead of hitting origin servers
• Has features to protect content.
• Integrates with Shield for DDOS attacks and WAF for SQL injection protection
• Use cases: Static web apps, audio, video and software downloads

Load Balancers & Auto Scalers

AWS Elastic Load Balancers (ELB)

• Classic Load Balancer (obsolete now)
• Application Load Balancer (Supports HTTP / HTTPS protocol)
• Network Loan Balancer (Supports TCP / UDP Protocol
• Core features: Cross Load Balancing, Session Stickiness, Health Checks, SNI etc

AWS Auto Scaling Groups (ASG)

• Has feature to expand & shrink instances with aid of health checks & policies
• Auto scaling can be done by means of various ways. Manual, Specific time based or by using custom metrics from cloud watch
• On-demand instances, spot instances, or both can be used while creating template for auto scaling

Queue Services & Cloud Functions

Simple Queue Service, SNS & MQ

• Used for asynchronous communications (Queue or Topic)
• Helps to decouple applications and has features for scalability, reliability, availability with low cost
• Types: Standard Queue, FIFO Queue, Push model (PUB-SUB)

AWS Serverless

• Serverless does not mean “no servers.” Instead, it implies that customers need not manage the server’s infra. It is highly available and has flexible scaling features too.
• AWS Lambda: Events can be triggered by writing the functions directly. You pay only for the number of requests, duration, and memory consumed. the maximum execution time is 15 minutes, and the supported languages include JAVA, GO, Python, Ruby, C#, and more.

Amazon API Gateway:

Publish, maintain, monitor, and secure APIs at scale; supports HTTPS/WebSocket

Resource Monitoring

AWS Cloud Trail (Single & Multi Region)

• API calls to modify the resource
• Used for compliance and regulatory standards
• Troubleshooting and delivering log files to S3 or Cloud Watch logs

AWS Config

• Auditing (Create a complete inventory of AWS resources)
• Resource history, change tracking, and governance
• Predefined rules set and checked for compliance

Cloud Monitoring

AWS Cloud Watch

• Aid in collecting monitoring info which comprises of logs, metrics & events.
• Has provision for alarm creation, logs viewer, automate action based on events to troubleshoot issues.
• Able to perform real time application monitoring with log retention capabilities.
• To monitor individual EC2 instances, Log agent needs to be installed which will feed metrics to Cloud Watch service
• Includes log insights feature which helps in writing queries and gather useful stats. Also has ability to monitor containerized based apps.

AWS Cloud Watch Alarms

Create alarms based on:
• Amazon EC2 instance CPU utilization
• Amazon SQS queue length
• Amazon DynamoDB table throughput or own custom metrics
Take immediate action:
• Send an SNS event notification
• Send an email using SNS
• Execute an auto-scaling policy

Cloud Watch Dashboards

• Create auto-refreshed graphs around all CloudWatch metrics
• Automatic dashboards are available for most AWS services and resources
• Each dashboard can have graphs from multiple regions

Databases

Below are the main criteria’s to be considered while choosing database

• Fixed Vs Flexible Schema
• Analytical Vs Data warehouse needs
• Caching vs Graphical purpose

Image Courtesy : John Robert article on AWS DB (https://trojrobert.github.io/selecting-the-right-database-in-amazon-web-service%28aws%29/)

Conclusion

Cloud-based load testing, a part of maintaining an application’s digital assurance can become very complex if the alignments are not correct. A proper understanding of the business requirements can help choose the right services from the cloud. Using the right approach and strategy will help manage a host of activities and enable one to reap the maximum benefits of cloud technologies.



Author: Indium
Indium Software is a leading digital engineering company that provides Application Engineering, Cloud Engineering, Data and Analytics, DevOps, Digital Assurance, and Gaming services. We assist companies in their digital transformation journey at every stage of digital adoption, allowing them to become market leaders.