Every Penny Counts!

Hiren Dossani
6 min readMay 15, 2021

--

Every Penny Counts!

Recently, a mid-sized business owner contacted me. The reason being, the business IT infrastructure is in the AWS cloud and as an owner, she wanted to save on monthly bills. As a business owner, she told me, “Every Penny Counts”! My role was to provide the best business value for IT investments in the cloud. To save on every penny, it was important to understand system dynamics in terms of every bit of data(transfer & storage) and every millisecond of computation. I started with the key concepts, design principles, and architectural best practices for designing and running workloads in the cloud using AWS Well-Architected Framework.

What is AWS Well-Architected Framework?

AWS Well Architected Framework

AWS Well-Architected Framework is a whitepaper that helps you understand the pros and cons of decisions you make while building systems on AWS. Based on five pillars, it provides a consistent way to learn, measure, and build using architectural best practices. It is built after years of experience in architecting solutions across a wide variety of business verticals and use cases by AWS architects. The framework documents a set of foundational questions that allow you to understand if a specific architecture aligns well with cloud best practices.

The framework has expanded to include domain-specific lenses, hands-on labs, and the AWS Well-Architected Tool. As the business application was a web application built using cloud-native serverless services, it was important to ensure a consistent, secure, and reliable user experience.

The Pillars of AWS Well-Architected Framework:

  1. Operational Excellence: The operational excellence pillar includes how your organization supports your business objectives, your ability to run workloads effectively, gain insight into their operations, and continuously improve supporting processes and procedures to deliver business value.

Design Principles & Best Practices: Some of the design principles for operational excellence in the cloud are perform operations as code, make frequent & small reversible changes, refine operations procedures frequently and anticipate failure. Best practices revolve around well-defined priorities of an organization, understanding of the workloads and its expected behaviors, definition of successful outcome & how it will be measured and learn, share, & continuously improve to sustain operational excellence.

Questions that helped me to understand business priorities and understand its workload:

  • How do you determine what your priorities are?
  • How do you understand the health of your workload and operations?
  • How do you improve flow into production?

I used the below-mentioned services to optimize AWS infrastructure and reduce overall costs:

2. Security: The security pillar describes how to take advantage of cloud technologies to protect data, systems, and assets in a way that can improve your security posture.

Design Principles & Best Practices: There are a number of principles that can help you strengthen your workload security e.g. implement a strong identity foundation, enable traceability, automate security at all layers, protect data both in transit and at rest, keep people away from data and prepare for the security event.

Questions that helped me to understand overall security posture and potentially save on costs:

  • How do you protect your resources in the cloud?
  • How do you classify and protect data in transit and at rest?
  • How do you manage identities and permissions for people & machines?

I used the below services to understand organization security and protect infrastructure from unwanted access:

3. Reliability: The reliability pillar includes the ability of a system to recover from infrastructure or service disruptions, dynamically acquire computing resources to meet demand, and mitigate disruptions such as misconfigurations or transient network issues.

Design Principles & Best Practices: A system must have a well-planned foundation and monitoring in place, with mechanisms for handling changes in demand, requirements, or potentially defending an unauthorized denial of service attack. The system should be designed to detect the failure and, ideally, automatically heal itself.

Questions that helped me to address the reliability concerns were:

  • How do you plan for disaster recovery?
  • How do you test reliability?
  • How do you design your workload service architecture?
  • What’s your network topology?

Below are some of the key AWS services I used for addressing reliability concerns:

4. Performance Efficiency: The Performance Efficiency pillar includes the ability to use computing resources efficiently to meet system requirements, and to maintain that efficiency as demand changes and technologies evolve.

Design Principles & Best Practices: Design principles for performance efficiency in the cloud are democratizing advanced technologies, go global in minutes, use serverless architectures, experiment more often, and consider mechanical sympathy. Reviewing your choices on a regular basis ensures that you are taking advantage of the continually evolving AWS Cloud.

Questions that helped me to address performance efficiency are:

  • How do you select your best-performing architecture?
  • How do you select your network, storage, compute and database solutions?

Below are some of the key AWS services I used for addressing performance efficiency:

5. Cost Optimization: The Cost Optimization pillar includes the ability to run systems to deliver business value at the lowest price point.

Design Principles & Best Practices: Design decisions are sometimes directed by haste rather than data, and the temptation always exists to overcompensate “just in case” rather than spend time benchmarking for the most cost-optimal deployment. This might lead to over-provisioned and under-optimized deployments and ultimately higher costs! Investing the right amount of effort in a cost optimization strategy upfront allows you to realize the economic benefits of the cloud more readily by ensuring consistent adherence to best practices and avoiding unnecessary over-provisioning.

Questions to address cost optimization:

  • How do you use a pricing model to reduce cost?
  • How do you monitor usage and cost?
  • How do you manage demand and supply resources?

Below are some of the key AWS services I used for addressing Cost Optimization:

Conclusion

Happy Business Client!

Happy Customer!

After going through all the pillars, its design guidelines, and best practices, we realized that there were quite a few areas for improvement. The best part, we are able to save about 30% on monthly bills. Here is the summary of the steps to facilitate good design in the cloud for serverless applications:

  • Functions are concise, short, single-purpose and their environment may live up to their request lifecycle. Transactions are efficiently cost-aware and thus faster executions are preferred
  • Chaining Lambda executions within the code to orchestrate the workflow of your application results in a monolithic and tightly coupled application. Instead, use a state machine to orchestrate transactions and communication flows
  • Events such as writing a new Amazon S3 object or an update to a database allow for transaction execution in response to business functionalities. This asynchronous event behavior is often consumer agnostic and drives just-in-time processing to ensure lean service design
  • Serverless applications take advantage of the concurrency model, and tradeoffs at the design level are evaluated based on concurrency

Web applications typically have demanding requirements to ensure a consistent, secure, and reliable user experience. To ensure high availability, global availability, and the ability to scale to thousands or potentially millions of users in the most cost-optimized manner is quite challenging. But hey, it’s doable, and yes, Every Penny Counts!

Hiren Dossani, Cloud Consultant, Global Clouds Consultants Inc.

hiren.dossani@globalClouds.ca

--

--