Elastic By Design

Learn how design choices can drastically influence costs.

As said earlier in the course, creating and maintaining cost-effective AWS workloads starts in the design phase. How we design our architectures can have a significant impact on operational costs. Let's go over some design strategies for cost efficiency.

Queuing design pattern

Earlier, we described a system design where we used horizontal and vertical scaling to rightsize the landscape, but we have other options as well. In that earlier design, we assumed that our single instance was the bottleneck and caused our whole process to be unstable.

The instability there was driven by our instance getting overloaded and causing connection errors and corrupt data. What if we removed this bottleneck not by scaling out or up, but by implementing a buffer? By transforming a synchronous process into an asynchronous one, we can potentially solve the bottleneck problem by allowing our worker instance to process records more consistently.

Here is a design that uses SQS queuing in front of DynamoDB. Using this design, we can carefully control the throughput of DynamoDB, allowing us to use the “Provisioned” mode rather than the more expensive “On-Demand” mode.

Get hands-on with 1400+ tech skills courses.