At AWS re:Invent 2023, Amazon CTO Werner Vogels delivered a talk on the laws of frugal architecture. While I initially filed away those insights to review later, a year of cloud architecture experience crystallized a fundamental truth: in cloud computing, cost isn’t just a financial consideration — it is a first-class architectural concern through which we should design and optimize our systems.
Cloud providers charge for every conceivable resource: servers, API calls, data transfer, and computational milliseconds. But cost is more than just a line item on a monthly bill, it is a powerful forcing function that drives better architectural decisions.
Cost is Performance
Consider serverless functions like AWS Lambda, where pricing is directly tied to execution time. Lambda charges based on the number of requests and duration, rounded to the nearest millisecond. This means every optimization in your code translates directly to financial savings.
Consider the following real-world example: given an unoptimized Lambda function taking 1 second to execute might cost $0.0000166667 per request, if we optimize this function and reduce execution time to 100 milliseconds, that cost can be reduced by 90%. For 1 million monthly requests, that’s the difference between $16.67 and $1.67 per month.
Although this example saves you only $15 per month, applying it across an entire organization can drive significant performance improvements.
Cost is Simplicity
Complexity is expensive. Each additional service, dependency, or redundant component increases both your direct cloud costs, and your operational overhead.
You pay for every cloud service that you use, byte transferred, CPU cycle time expended, and more. By eliminating dependencies, removing duplication, and deleting unused resources will both simplify your architecture and reduce your costs.
Cost is Efficiency
Highly provisioned servers or resources will cost you more money, and can lead to significant waste. By reducing the overall cost of the resources you use, you will run a more efficient system that is better for both the environment, and for your bottom line.
Cost is Scalability
Designing your architecture to scale efficiently with demand can help manage costs. For example, using auto-scaling groups to automatically adjust the number of running instances based on load can ensure you only pay for what you need and minimize overall cost.
By focusing on cost optimization, you also develop a more cloud-native scaling strategy.
My hypothesis is that choosing cost as the core metric to optimize in a cloud environment doesn’t just make good business sense, it makes good software design and architecture sense: it results in a simpler, more performant, more efficient, and scalable system.
Of course, there are trade-offs. Cost optimization could be in tension with reliability or resilience goals. I wouldn’t recommend turning off mission critical backups as a cost-saving measure. But as a general rule, the design of your system depends on how well its costs are optimized and aligned to the business model.
By treating cost as a first-class architectural concern, we create systems that are inherently more efficient, performant, and aligned with business objectives.