DEV Community

Cover image for AWS Power Hour Week 4: Design High-Performance Architecture
techD
techD

Posted on

AWS Power Hour Week 4: Design High-Performance Architecture

For this week's 'HomeFun' assignment, we were asked to don our proverbial 'thinking caps' for a thought experiment on designing a High-Performance Architecture. The Scope is very broad, so the answers (by necessity) need to be broad as well, but staying within the purview of the Well-Architected Framework. The Question is:

As a new solution architect you are tasked with fixing the outages that occur when marketing runs sales campaigns that drive heavy demand on company website. consider improvements in performance in the following areas:

  • storage

  • compute

  • database

  • network

  • data ingestion

In order to determine how to optimize the architecture, we need to understand the workload requirements for the site under normal circumstances versus the workload requirements during the sales campaigns. We need to benchmark the current environment so that we can understand the performance and find our bottlenecks. If we don't have Cloudwatch or other metric gathering service enabled, then that should be our first steps. If we configure Kinesis Firehose, we can get real-time metrics and analyze them in order to determine what our next steps should be. This will enable us to utilize a data-driven approach to designing a high-performance architecture

Once we have initial benchmarks, we can identify the areas where improvements can be made after working with the Marketing Team to determine their requirements for optimal customer experience. To make improvements, we need to identify the most important metrics to target. Script out the user journeys to better understand the performance requirements.

  1. Compute: Consider the use of Auto-Scaling Groups with EC2 instances with a Minimum, Maximum and Desired Size. Consider running them across Availability Zones for resiliency as well as performance. Or, conversely, consider offloading some compute functions to a serverless architecture, such as AWS Lambda, with Content Delivery via Cloudfront.

  2. Storage: Consider storing video using S3 or other object storage. File storage can utilize EFS, or FSx for enhanced throughput and resiliency.

  3. Database: If an Relational Database is not needed, use a No-SQL Database such as Amazon DynamoDB to store the data, with DynamoDB Accelerator to provide a fully-managed in-memory cache for increased throughput (to microseconds). Also, use only SSD based storage to increase throughput.

  4. Networking: Understanding how networking affects performance is critical to provide the optimal user experience. Insufficient capacity will create a bottleneck and an poor user experience. If necessary, take advantage of AWS Global Accelerator, or the newer N-Series of Network Enhanced EC2 instances such as M5n and M5dn, which use the 4th Gen nitro cards and elastic network adapters to deliver up to 100 Gbps to a single instance. Leverage Load Balancing to distribute traffic more efficiently across resources. Determine optimal placement of Data by determining where the majority of your users will access data from.

Once you have determined your required Architecture, configure a test environment and load-test everything. Try to make it fail so that you can see your constraints and work to mitigate them. Consider cost in every step--optimized based on your stakeholder requirements, but ensure that the cost is well-documented and presented. You will need to consider the trade-offs for an optimal performance experience.

Get buy-in from your stakeholders and implement the design, ensuring that you leverage Infrastructure as Code to rapidly deploy and evolve the Architecture. Configure the necessary Cloudwatch alarms and/or Kinesis Firehose to monitor the environment and swiftly move to mitigate bottlenecks.

Top comments (0)