0 356 en

The Frugal Architect

In the ever-evolving landscape of technology and architecture, Dr. Werner Vogels, Amazon's CTO, proposed the concept of "The Frugal Architect." This approach advocates for a sustainable, cost-effective, and resource-efficient architectural design and implementation methodology. 

3 phases of Frugal Architect that contains 7 laws:

3 Pillar of Frugal Architect
  1. Design
    • Make Cost a Non-functional Requirement.
    • Systems that Last Align Cost to Business.
    • Architecting is a Series of Trade-offs.
  2. Measure
    • Unobserved Systems Lead to Unknown Costs.
    • Cost-Aware Architectures Implement Cost Controls.
  3. Observe
    • Cost Optimization is Incremental.
    • Unchallenged Success Leads to Assumptions.

Let's dive deeply inside each of the laws:

Law 1: Make Cost a Non-functional Requirement

Law 1: Make Cost a Non-functional Requirement

Cost as a non-functional requirement (NFR) ensures a system is designed, developed, and operated within budget. By focusing on cost early and throughout the process, businesses can balance features, efficiency, and profitability to avoid overspending and financial risks.

Vogels said: 

A non-functional requirement specifies criteria that can be used to judge the operation of a system, rather than specific features or functions. Examples are accessibility, availability, scalability, security, portability, maintainability, and compliance. What often goes overlooked is cost.

Companies can fail because they don’t consider cost at every stage of the business – from design to development to operation – or because they’re not measuring it properly. The math is simple: if costs are higher than your revenue, your business is at risk.

By considering cost implications early and continuously, systems can be designed to balance features, time-to-market, and efficiency. Development can focus on maintaining lean and efficient code. And operations can fine-tune resource usage and spending to maximize profitability.

Law 2: Systems that Last Align Cost to Business

Systems that Last Align Cost to Business

To create long-lasting systems, match costs to how the business makes money. Design systems that grow with the business and keep expenses under control to avoid problems from unchecked growth

Vogels said: 

The durability of a system depends on how well its costs are aligned to the business model. When designing and building systems, we must consider the revenue sources and profit levers. It’s important to find the dimension you’re going to make money over, then make sure the architecture follows the money.

For example, in e-commerce, that dimension might be the number of orders. When orders go up, infrastructure and operation costs rise. And that’s okay, because if your system is architected well, you can start to exploit economies of scale. What’s important is that infrastructure costs have a measurable impact on the business.

As builders, we need to think about revenue – and use that knowledge to inform our choices. Because growth at all costs leads to a trail of destruction.

Law 3: Architecting is a Series of Trade-offs

Law 3: Architecting is a Series of Trade-offs

It’s crucial to find the right balance between your technical and business needs – to find the sweet spot that aligns with your risk tolerance and budget. Remember, frugality is about maximizing value, not just minimizing spend. And to do that, you need to determine what you’re willing to pay for.

Vogels said: 

In architecture, every decision comes with a trade-off. Cost, resilience, and performance are non-functional requirements that are often at tension with each other.

As the saying goes, “Everything fails, all the time.” Defending against failure means investing in resilience, but performance may pay the price.

It’s crucial to find the right balance between your technical and business needs – to find the sweet spot that aligns with your risk tolerance and budget. Remember, frugality is about maximizing value, not just minimizing spend. And to do that, you need to determine what you’re willing to pay for.

Law 4: Unobserved Systems Lead to Unknown Costs

Law 4: Unobserved Systems Lead to Unknown Costs

If you don't monitor your system, you won't know its true costs. Regularly track and display key metrics to manage and reduce expenses effectively.

Vogels said: 

Without careful observation and measurement, the true costs of operating a system remain invisible. Like a utility meter tucked away in a basement, lack of visibility enables wasteful habits. Making meters more visible can profoundly shift behaviors.

Though observation requires investment, not implementing adequate monitoring is shortsighted. The adage warns, “If you can’t measure it, you can’t manage it.” Tracking utilization, spending, errors, and more, is crucial for cost management.

When critical cost metrics are placed front-and-center before engineers and their business partners, more sustainable practices emerge organically. Ongoing inspection lets you spot excess spend and tune operations to trim expenses. The return on investment in observability typically far outweighs the expense.

Most importantly, keeping costs in the forefront encourages sustainable practices.

Also, Vogels' told one insightful story from Amsterdam at the Amazon event. There were two buildings with similar structure. But one was getting more power consumption and the other was getting less power consumption. Why so?

The answer is in the below image.  One building was consuming more power as the meter was installed in the basement and another building meter was installed after entering the front door side.

If you don't monitor your system, you won't know its true costs. Regularly track and display key metrics to manage and reduce expenses effectively.
Spoiler: A house with an electricity counter in the hallway spends less money because the owner is able to often check current values and cares about cost.

Law 5: Cost-Aware Architectures Implement Cost Controls

Cost-Aware Architectures Implement Cost Controls.

Design systems with robust monitoring and tunable components to manage and optimize costs. Categorize components by importance to make informed trade-offs and ensure cost efficiency.

The essence of frugal architecture is robust monitoring combined with the ability to optimize costs. Well-designed systems allow you to take action on opportunities for improvement. For this to work, decompose applications into tunable building blocks.

A common approach is tiering components by criticality. Tier 1 components are essential; optimize regardless of cost. Tier 2 components are important but can be temporarily scaled down without major impact. Tier 3 components are “nice-to-have”; make them low-cost and easily controlled.

Defining tiers enables trade-offs between cost and other requirements. Granular control over components optimizes both cost and experience. Infrastructure, languages, and databases should all be tunable. Architect and build systems with revenue and profit in mind. Cost optimization must be measurable and tied to business impact.

Law 6: Cost Optimization is Incremental

Law 6: Cost Optimization is Incremental

Cost efficiency is a continuous process. Regularly review and refine systems to find small improvements that add up to significant savings over time. Keep looking for ways to optimize and reduce costs.

Vogels said: 

The pursuit of cost efficiency is an ongoing journey. Even after deployment, we must revisit systems to incrementally improve optimization. The key is continually questioning and diving deeper. Programming languages provide profiling tools to analyze code performance, and while these require setup and expertise, they enable granular analyses that can lead to changes that shave milliseconds. What may seem like small optimizations accumulate into large savings at scale.

In operations, most time is spent running existing systems. There are opportunities to profile resource usage and identify waste reduction. At Amazon, we continuously monitor services in production to understand patterns and trim inefficiencies. Frugality takes persistence – by incrementally reducing latencies and infrastructure costs, we can optimize the cost to serve.

There is always room for improvement… if we keep looking. The savings we reap today fund innovation for tomorrow.

Law 7: Unchallenged Success Leads to Assumptions

Unchallenged Success Leads to Assumptions

Never assume your current tools and methods are the best just because they worked in the past. Always explore and consider new options to stay efficient and innovative.

Vogels said: 

When software teams achieve significant success without facing major failures or roadblocks, complacency can set in. There is a dangerous tendency to become overconfident in the methods, tools, and practices that led to those wins.

Software teams often fall into the trap of assuming their current technologies, architectures, or languages will always be the best choice, simply because they have worked in the past. This can create a false sense of security that discourages questioning the status quo or exploring new options which could be more efficient, cost-effective, or scalable.

You see this frequently when it comes to programming languages. “We’re a Java shop” is a phrase I’ve heard too often – and it can stifle innovation. Unchallenged success breeds complacency through assumptions. We must always look for ways to question, optimize and improve.

As Grace Hopper famously stated, one of the most dangerous phrases in the English language is: “We’ve always done it this way.”

Conclusion

In the ever-evolving landscape of technology and architecture, the concept of "The Frugal Architect" proposed by Dr. Werner Vogels, CTO of Amazon, offers a sustainable, cost-effective, and resource-efficient approach to architectural design and implementation. By following the seven laws within the three pillars of Design, Measure, and Optimization, architects and developers can create systems that are not only efficient and cost-effective but also scalable and adaptable to changing business needs.

Key Takeaways:

  • Design: Always consider cost as a non-functional requirement, align system costs with business models, and balance trade-offs between cost, resilience, and performance.
  • Measure: Monitor systems regularly to understand true costs and implement cost controls through robust monitoring and tiered component management.
  • Optimize: Approach cost optimization as an ongoing process, continuously seeking small improvements, and remain open to new tools and methods to avoid complacency.

References:

Comments:

Please log in to be able add comments.