Cloud¶
33 cards — 🟢 7 easy | 🟡 5 medium | 🔴 6 hard
🟢 Easy (7)¶
1. What is the difference between horizontal scaling and vertical scaling?
Show answer
[AWS Docs](https://wa.aws.amazon.com/wellarchitected/2020-07-02T19-33-23/wat.concept.horizontal-scaling.en.html):A "horizontally scalable" system is one that can increase capacity by adding more computers to the system. This is in contrast to a "vertically scalable" system, which is constrained to running its processes on only one computer; in such systems the only way to increase performance is to add more resources into one computer in the form of faster (or more) CPUs, memory or storage.
Horizontally scalable systems are oftentimes able to outperform vertically scalable systems by enabling parallel execution of workloads and distributing those across many different computers.
2. True or False? Cloud computing is a consumption-based model.
Show answer
TRUE.Consumption-based model means:
- Pay for what you use
- No upfront capital expense
- Scale up/down as needed
- Metered billing (per hour, GB, request)
Examples:
- EC2: Pay per hour/second of runtime
- S3: Pay per GB stored + requests
- Lambda: Pay per invocation + duration
Benefits:
- No overprovisioning waste
- Convert CapEx to OpEx
- Match cost to actual usage
- Easy to experiment
Contrast with traditional:
- Buy hardware upfront
- Pay for capacity not usage
- Difficult to scale
Key cloud economics principle: Pay-as-you-go.
Remember: cloud architecture patterns: scalability (horizontal > vertical), resilience (multi-AZ, multi-region), security (least privilege, encryption everywhere), and cost optimization (right-sizing, reserved capacity).
3. What is auto scaling?
Show answer
AWS definition: "AWS Auto Scaling monitors your applications and automatically adjusts capacity to maintain steady, predictable performance at the lowest possible cost"Read more about auto scaling [here](https://aws.amazon.com/autoscaling)
Remember: cloud architecture patterns: scalability (horizontal > vertical), resilience (multi-AZ, multi-region), security (least privilege, encryption everywhere), and cost optimization (right-sizing, reserved capacity).
4. What types of clouds (or cloud deployments) are there?
Show answer
* Public - Cloud services sharing computing resources among multiple customers* Private - Cloud services having computing resources limited to specific customer or organization, managed by third party or organizations itself
* Hybrid - Combination of public and private clouds
Remember: cloud architecture patterns: scalability (horizontal > vertical), resilience (multi-AZ, multi-region), security (least privilege, encryption everywhere), and cost optimization (right-sizing, reserved capacity).
5. What types of Cloud Computing services are there?
Show answer
IAAS - Infrastructure as a ServicePAAS - Platform as a Service
SAAS - Software as a Service
Remember: the three main cloud providers: AWS (market leader, most services), Azure (strong enterprise/Windows integration), GCP (strong data/ML, Kubernetes origin). Learn one deeply, then map to others.
Gotcha: cloud costs can spiral quickly. Set up billing alerts, use cost allocation tags, and right-size resources from day one. 'It's just a small instance' adds up across 50 services.
6. What are the advantages of cloud computing? Mention at least 3 advantages
Show answer
* Pay as you go: you are paying only for what you are using. No upfront payments and payment stops when resources are no longer used.* Scalable: resources are scaled down or up based on demand
* High availability: resources and applications provide seamless experience, even when some services are down
* Disaster recovery
Remember: cloud architecture patterns: scalability (horizontal > vertical), resilience (multi-AZ, multi-region), security (least privilege, encryption everywhere), and cost optimization (right-sizing, reserved capacity).
7. What is Cloud Computing? What is a Cloud Provider?
Show answer
Cloud computing refers to the delivery of on-demand computing servicesover the internet on a pay-as-you-go basis.
In simple words, Cloud computing is a service that lets you use any computing
service such as a server, storage, networking, databases, and intelligence,
right through your browser without owning anything. You can do anything you
can think of unless it doesn't require you to stay close to your hardware.
Cloud service providers are companies that establish public clouds, manage private clouds, or offer on-demand cloud computing components (also known as cloud computing services) like Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS), and Software-as-a-Service(SaaS). Cloud services can reduce business process costs when compared to on-premise IT.
🟡 Medium (5)¶
1. True or False? Auto Scaling is about adding resources (such as instances) and not about removing resource
Show answer
False. Auto scaling adjusts capacity and this can mean removing some resources based on usage and performances.Remember: the three main cloud providers: AWS (market leader, most services), Azure (strong enterprise/Windows integration), GCP (strong data/ML, Kubernetes origin). Learn one deeply, then map to others.
Gotcha: cloud costs can spiral quickly. Set up billing alerts, use cost allocation tags, and right-size resources from day one. 'It's just a small instance' adds up across 50 services.
2. What is Serverless Computing?
Show answer
The main idea behind serverless computing is that you don't need to manage the creation and configuration of server. All you need to focus on is splitting your app into multiple functions which will be triggered by some actions.It's important to note that:
* Serverless Computing is still using servers. So saying there are no servers in serverless computing is completely wrong
* Serverless Computing allows you to have a different paying model. You basically pay only when your functions are running and not when the VM or containers are running as in other payment models
3. Explain each of the following and give an example:
Show answer
* IAAS - Users have control over complete Operating System and don't need to worry about the physical resources, which is managed by Cloud Service Provider.* PAAS - Cloud Service Provider takes care of Operating System, Middlewares and users only need to focus on our Data and Application.
* SAAS - A cloud based method to provide software to users, software logics running on cloud, can be run on-premises or managed by Cloud Service Provider.
Remember: cloud architecture patterns: scalability (horizontal > vertical), resilience (multi-AZ, multi-region), security (least privilege, encryption everywhere), and cost optimization (right-sizing, reserved capacity).
4. Is there a difference between managed service and SaaS?
Show answer
Yes, though they overlap:Managed Service:
- Cloud provider manages infrastructure
- You control application/data
- Examples: RDS, ElastiCache, managed Kubernetes
- Still requires some configuration
SaaS (Software as a Service):
- Complete application provided
- No infrastructure management
- Just use the software
- Examples: Salesforce, Office 365, Slack
Comparison:
- Managed Service: Managed infrastructure, your app
- SaaS: Entire application managed for you
Spectrum of management:
- IaaS: You manage most (EC2)
- PaaS: Platform managed (Heroku)
- Managed Service: Specific service managed (RDS)
- SaaS: Everything managed (Gmail)
Remember: IaaS = you manage OS up (EC2). PaaS = you manage app + data (Heroku, App Service). SaaS = you manage nothing (Gmail). Think 'pizza analogy': IaaS=kitchen, PaaS=delivery, SaaS=restaurant.
Example: IaaS: AWS EC2, Azure VMs. PaaS: Heroku, Google App Engine. SaaS: Salesforce, Google Workspace.
5. What are the differences between Cloud Providers and On-Premise solution?
Show answer
In cloud providers, someone else owns and manages the hardware, hire the relevant infrastructure teams and pays for real-estate (for both hardware and people). You can focus on your business.In On-Premise solution, it's quite the opposite. You need to take care of hardware, infrastructure teams and pay for everything which can be quite expensive. On the other hand it's tailored to your needs.
Remember: cloud architecture patterns: scalability (horizontal > vertical), resilience (multi-AZ, multi-region), security (least privilege, encryption everywhere), and cost optimization (right-sizing, reserved capacity).
🔴 Hard (6)¶
1. How to secure instances in the cloud?
Show answer
* Instance should have minimal permissions needed. You don't want an instance-level incident to become an account-level incident* Instances should be accessed through load balancers or bastion hosts. In other words, they should be off the internet (in a private subnet behind a NAT).
* Using latest OS images with your instances (or at least apply latest patches)
Remember: cloud architecture patterns: scalability (horizontal > vertical), resilience (multi-AZ, multi-region), security (least privilege, encryption everywhere), and cost optimization (right-sizing, reserved capacity).
2. How do you control cloud sprawl?
Show answer
Sprawl is a governance problem, not a technical one:**IAM discipline**:
* Least privilege - no blanket admin
* Service accounts with minimal scope
* Regular access reviews
**Tagging**:
* Mandatory tags: owner, cost-center, environment
* Automated enforcement via policies
* Reports based on tags
**Budgets and alerts**:
* Per-team/project budgets
* Alerts before hitting limits
* Regular cost reviews
**Automation**:
* Infrastructure as Code only - no console clicking
* Automated cleanup of unused resources
* Scheduled shutdown for non-prod
Policy docs nobody reads don't work. Automation and enforcement do.
Remember: cloud architecture patterns: scalability (horizontal > vertical), resilience (multi-AZ, multi-region), security (least privilege, encryption everywhere), and cost optimization (right-sizing, reserved capacity).
3. Can we replace any type of computing on servers with cloud computing?
Show answer
Not always - some workloads are better on-premises.Cloud-suitable:
- Variable workloads
- Rapid scaling needs
- Global distribution
- New projects/startups
- Disaster recovery
Better on-premises:
- Consistent high utilization
- Strict data sovereignty
- Ultra-low latency requirements
- Specialized hardware (some HPC)
- Regulatory restrictions
- Large predictable workloads (cost)
Hybrid considerations:
- Legacy applications
- Integration requirements
- Compliance needs
- Cost optimization
Factors to evaluate:
- Total cost of ownership
- Performance requirements
- Security and compliance
- Operational expertise
- Vendor lock-in risk
Remember: cloud architecture patterns: scalability (horizontal > vertical), resilience (multi-AZ, multi-region), security (least privilege, encryption everywhere), and cost optimization (right-sizing, reserved capacity).
4. What are common cloud vs on-prem performance myths?
Show answer
Cloud isn't automatically faster. Reality:**Network latency**: Cloud network can have higher latency than local datacenter. Multi-region adds more.
**Storage class matters**: Default EBS isn't SAN performance. Provisioned IOPS costs money.
**Noisy neighbors**: Shared infrastructure means variable performance. Dedicated hosts exist but cost more.
**Right-sizing**: Oversized VMs waste money, undersized ones underperform. Cloud makes it easy to test.
**Truth**: Cloud buys flexibility and scale, not raw performance. On-prem can be faster for specific workloads, but harder to scale.
Design for the tradeoffs you actually have.
Remember: cloud architecture patterns: scalability (horizontal > vertical), resilience (multi-AZ, multi-region), security (least privilege, encryption everywhere), and cost optimization (right-sizing, reserved capacity).
5. Lift-and-shift vs re-architecture - when to use each?
Show answer
**Lift-and-shift** (rehosting):* Move VMs/apps as-is to cloud
* Buys speed - migrate fast
* Lower initial effort
* Technical debt comes later
* Good for: Datacenter exit deadlines, initial migration
**Re-architecture** (refactoring):
* Redesign for cloud-native patterns
* Long-term stability and cost control
* Higher initial investment
* Better scalability, resilience
* Good for: Core business apps, long-term cloud strategy
**Reality**: Most migrations are hybrid - lift critical apps, refactor over time. Don't let perfect be enemy of done, but have a modernization roadmap.
Remember: cloud architecture patterns: scalability (horizontal > vertical), resilience (multi-AZ, multi-region), security (least privilege, encryption everywhere), and cost optimization (right-sizing, reserved capacity).
6. How do you design for failure in cloud?
Show answer
Assume everything fails. Design accordingly:**Stateless services**: Don't store session state locally. Use external stores (Redis, database).
**Redundancy**: Multi-AZ at minimum. Multi-region for critical services. No single points of failure.
**Health checks**: Load balancers detect and route around failures automatically.
**Automation for rebuilds**: Can you recreate from scratch? Infrastructure as Code, immutable images, automated deployments.
**Graceful degradation**: Services should fail partially, not completely. Circuit breakers, timeouts, retries with backoff.
**Testing**: Chaos engineering - intentionally break things to verify resilience.
Manual recovery doesn't scale. If a human must intervene for every failure, you're doing it wrong.