Well-Architected Framework review in GCP - Time & Space Complexity
When reviewing a cloud setup using the Well-Architected Framework, we want to understand how the time to complete the review grows as the number of resources increases.
We ask: How does the effort scale when checking more cloud components?
Analyze the time complexity of this review process.
// Pseudocode for Well-Architected Framework review
resources = list_all_resources()
for resource in resources:
check_security(resource)
check_performance(resource)
check_reliability(resource)
check_cost(resource)
check_operational_excellence(resource)
This sequence reviews each resource against five key pillars of the framework.
We look for repeated actions in the review.
- Primary operation: Checking each resource against five pillars.
- How many times: Once per resource, five checks each time.
As the number of resources grows, the total checks grow proportionally.
| Input Size (n) | Approx. API Calls/Operations |
|---|---|
| 10 | 50 (10 resources x 5 checks) |
| 100 | 500 (100 resources x 5 checks) |
| 1000 | 5000 (1000 resources x 5 checks) |
Pattern observation: The total work grows directly with the number of resources.
Time Complexity: O(n)
This means the review time grows in a straight line as you add more resources.
[X] Wrong: "The review time stays the same no matter how many resources there are."
[OK] Correct: Each resource needs individual checks, so more resources mean more work.
Understanding how review effort scales helps you design efficient cloud checks and shows you think about real-world growth challenges.
"What if the review added automated batch checks that handle multiple resources at once? How would the time complexity change?"