AWS Define Performance Architectures

| Cheat Sheets

DynamoDB Streams to monitor the changes in the DynamoDB table.

DynamoDB streams helps monitor the change in the DynamoDB table. Other application can check the stream for the changes and what changed i.e. who added the photo. The application then can check the user who uploaded it, his friends to whom the notification can be sent.

Configuring DynamoDB Auto Scaling can enable DynamoDB scale the provisioned throughput as per the demand in a cost-efficient manner.

API Gateway Caching helps cache the endpoint’s response and improving performance.

CloudFront is already used along with the API gateway
API stages are used to deploy different versions of APIs
CORS enable cross domain access of API’s

EBS Throughput Optimized HDD is best suited for the large sequential I/O workloads

Usually involving big data, ETL jobs and log processing

Amazon EFS provides elastic, shared file storage that is POSIX-compliant.
The file system you create supports concurrent read and write access from multiple Amazon EC2 instances and is accessible from all of the Availability Zones in the AWS Region where it is created. It’s serve as a centralized document store. Amazon EFS provides file system access semantics, such as strong data consistency and file locking with an ability to manipulate large files.

Instance and EBS volumes cannot be shared
S3 is not POSIX compliant

AWS ALB can perform content based routing and can be used to replace the reverse proxy layers. ALB is also AWS managed and highly available and scalable.Application Load Balancer, unlike Classic and Network Load Balancer, supports WebSockets.

Note : The backend fleet can be associated with Auto Scaling to scale as per the demand. ( To scale backend Amazon EC2 instances)

Web sites and mobile apps, running in containers or on EC2 instances, will benefit from the use of Application Load Balancers.

ElasticCache can help store the session information, which can be shared across multiple instances.

From the content in persistent data stores (such as Amazon RDS, DynamoDB, or self-managed databases hosted on EC2) to dynamically generated web pages (with Nginx for example), or transient session data that may not require a persistent backing store. You can also use it to implement high-frequency counters to deploy admission control in high volume web applications. ElastiCache can help cache the results of complex database queries from RDS providing low latency access and reducing the load on RDS. Note: Memcached does not allow writes as well as its not persistent and hence not durable

Elastic Beanstalk is suited for Web environments with RDS database and Worker environments with SQS for long running jobs.

Elastic Beanstalk brings together AWS services like EC2, Auto Scaling, and S3 for the purpose of deploying elastic cloud applications.

Kinesis Data Streams provides real time scalable data ingestion service

Note: AWS Data Pipeline helps transfer for data only

CloudFront can be used to cache static resources and provide low latency access while being hosted on-premises also

CloudFront supports using several AWS resources as origins. For example, you can specify an Amazon S3 bucket or an MediaStore container, an MediaPackage channel, or a custom origin, such as an Amazon EC2 instance or your own HTTP web server.

And ElastiCache is key/value pair caching solution. It would not cache static content.

The usage is low with occasional spikes EBS General Purpose SSD (gp2) storage would be the ideal choice for the storage.

Note : The usage is Development and test environments, System boot volumes, Virtual desktops and Low-latency interactive apps

The issue is the delay and timeouts are experienced for popular products only, it would be cause of the hot partition. As a long term solution, it would make sense to change the partition key to a hash to better distribute the data.

DynamoDB Throttled Error Partitions are usually throttled when they are accessed by your downstream applications much more frequently than other partitions

Note : DAX would help improve performance, but does not address the root cause.

If requirement is not keep the instances private and hence can be hosted in public subnets with internet access. Also, internet gateway does not impose any bandwidth constraints.

Note : NAT gateway supports 5 Gbps of bandwidth and automatically scales up to 45 Gbps. If you require more, you can distribute the workload by splitting your resources into multiple subnets, and creating a NAT gateway in each subnet.

If you want the throughput of the Kinesis Data Stream can be increased then use UpdateShardCount command

There are two ways to change the throughput of your data stream. You can use the UpdateShardCount API or the AWS Management Console to scale the number of shards in a data stream, or you can change the throughput of an Amazon Kinesis data stream by adjusting the number of shards within the data stream (resharding).

If you want to handle very large spikes in traffic without significantly impacting database performance then DynamoDB Accelerator (DAX) would be an ideal choice to cache the contents and deliver high performance with no impact on underlying DynamoDB.

Note : Using auto scaling groups to increase the number of Amazon EC2 instances delivering the web application is not going to reduce the load on database.

CloudHSM instances are provisioned inside your VPC with an IP address that you specify, providing simple and private network connectivity to your Amazon Elastic Compute Cloud (EC2) instances.

Placing CloudHSM instances near your EC2 instances decreases network latency, which can improve application performance.

By default, Records of a stream are accessible for up to 24 hours from the time they are added to the stream.

You can raise this limit to up to 7 days by enabling extended data retention.

T2 burstable instances as they allow credits to be accumulated over the non-usage period with the ability to burst

If you are trying to reduce costs while still keeping the legacy application running as it should

Cross-zone load balancing reduces the need to maintain equivalent numbers of instances in each enabled Availability Zone, and improves your application’s ability to handle the loss of one or more instances.

However, we still recommend that you maintain approximately equivalent numbers of instances in each enabled Availability Zone for higher fault tolerance.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store