Skip to main content

Design Tradeoffs

Updated Sep 21, 2020 ·

Overview

Cloud architecture is a sequence of tradeoffs.

You rarely get a design that is best for cost, performance, security, reliability, and speed all at once.

The job is to understand what the business values most, and then choose the tradeoff that fits.

Architectural Tradeoffs

Every architectural decision involves some form of tradeoff.

Improving one area often increases cost, complexity, or reduces another architectural quality.

Design PriorityProsCons / Trade-offs
Higher ReliabilityBetter availability, resilience, and fault toleranceHigher infrastructure and operational costs
Higher SecurityBetter protection, compliance, and risk reductionMore operational overhead and complexity
Faster DeliveryFeatures and changes reach users soonerCan reduce architecture simplicity and increase technical debt
Lower CostReduces infrastructure and operational spendingMay reduce performance, availability, or resilience

These tradeoffs also appear when combining multiple architectural priorities.

For example, an architecture may prioritize both reliability and performance, but doing so can significantly increase cost.

PrioritiesTrade-offExample
Reliability + PerformanceHigher cost
  • Multi-zone deployment
  • Always-on redundancy
  • Synchronous replication
  • Premium networking
  • Provides high availability and performance but requires paying for additional capacity
Performance + Low CostLess redundancy
  • Right-sized resources
  • Caching
  • Serverless services
  • Single-zone deployments reduce costs but may become unavailable if the zone fails
Reliability + Low CostSlower recovery
  • Warm standby provides redundancy at a lower cost than hot standby
  • Resources may need to scale up during recovery
  • Results in a longer recovery time

The wrong answer is the one that meets a secondary goal but breaks an important constraint.

The right answer is the one that meets the primary business goal without breaking the important constraints.

Decision Inputs

Before choosing an option, identify the decision inputs.

  • Business goal
  • Risk tolerance
  • Compliance requirements
  • Budget
  • Migration timeline
  • Operational maturity

When these inputs are clear, the tradeoff becomes easier to defend.

Examples

Cloud SQL HA vs. Cloud Spanner

A good example of architectural tradeoffs is choosing between Cloud SQL HA and Cloud Spanner.

Both provide highly available databases, but they are designed for different requirements and scales.

Cloud SQL HACloud Spanner
ScopeRegional with zonal failoverGlobal and multi-region
AvailabilitySynchronous standby with failover typically under 1 minuteUp to 99.999% availability with multi-region configurations
ResilienceHandles regional workloads well, but does not protect against a full regional outageCan survive a full regional outage
ScalingCannot horizontally scale writesHorizontal write scaling
CostSignificantly cheaper than SpannerConsiderably more expensive
Best ForRegional applications with predictable trafficGlobal-scale applications requiring multi-region resilience

The choice depends on the application's actual requirements:

  • Choose Cloud SQL HA for regional applications where high availability, predictable traffic, and lower cost are the main priorities.
  • Choose Cloud Spanner when you need global consistency, horizontal write scaling, or multi-region resilience.

Using Cloud Spanner for a simple regional application may provide greater resilience and scalability, but the additional cost and complexity could make it unnecessary over-engineering.

Cloud Run vs. Managed Instance Group

Another example of architectural tradeoffs is choosing between Cloud Run and a Managed Instance Group (MIG).

The decision depends mainly on traffic patterns, latency requirements, cost, and the level of infrastructure control required.

Cloud RunManaged Instance Group (MIG)
Compute ModelServerless, can scale to zeroPre-warmed VMs with minimum instances
ScalingAutomatically handles bursts and can scale to zeroAutoscaling available, but minimum instances can remain running
LatencyCold starts can introduce variable latencyConsistent and predictable latency with no cold starts
ManagementNo VM management or OS patchingRequires VM and OS management
ControlLess control over the underlying infrastructureFull control over OS and runtime
CostCan cost very little when idle because it scales to zeroPay for minimum instances even when idle
Best ForVariable traffic and event-driven workloadsWorkloads where consistent latency is a hard requirement

The choice should be driven by the application's latency and traffic requirements:

  • Choose Cloud Run when traffic is variable, automatic scaling is important, and occasional cold-start latency is acceptable.
  • Choose a Managed Instance Group when consistent p99 latency is a hard SLO and pre-warmed compute capacity is required.

If predictable latency is a strict requirement, paying for always-ready instances can be justified.

If workloads are bursty and can tolerate cold starts, Cloud Run can provide a simpler and more cost-efficient architecture.

Cloud Storage Cost vs. Access Frequency

Cloud Storage classes provide another example of an architectural tradeoff.

Storage cost can be reduced for infrequently accessed data, but this comes with different retrieval costs and minimum storage durations.

Storage ClassRelative CostAccess PatternTypical Use Case
Standard🔵 🔵 🔵 🔵Frequently accessed / immediate accessActive data requiring immediate access
Nearline🔵 🔵 🔵 ⚪About once per month or lessMonthly backups
Coldline🔵 🔵 ⚪ ⚪About once per quarter or lessQuarterly disaster recovery copies
Archive🔵 ⚪ ⚪ ⚪About once per year or lessCompliance and long-term retention

The appropriate storage class should be based on how frequently the business needs to access the data, rather than simply choosing the lowest storage cost.

A simple approach is:

  1. Identify the binding constraint.
  2. Determine what the business actually needs.
  3. Make the tradeoff explicitly.

For example, if data must be accessed frequently, Standard may be appropriate despite its higher storage cost.

If data is retained primarily for compliance and rarely accessed, Archive can provide a lower-cost option.