# Cloud Computing Basics

Cloud computing is the on-demand delivery of IT resources—including servers, storage, databases, networking, software, analytics, and intelligence—over the Internet ("the cloud") to offer faster innovation, flexible resources, and economies of scale.

## 1. Service Models

Cloud services are typically categorized into three tiers:

### IaaS (Infrastructure as a Service)
The most basic category. You rent IT infrastructure—servers and virtual machines (VMs), storage, networks, operating systems—from a cloud provider on a pay-as-you-go basis.
*   **Examples:** Amazon EC2, Microsoft Azure VMs, Google Compute Engine.
*   **Analogy:** Renting a plot of land and building your own house.

### PaaS (Platform as a Service)
PaaS refers to cloud computing services that supply an on-demand environment for developing, testing, delivering, and managing software applications. It is designed to make it easier for developers to create web or mobile apps, without worrying about setting up or managing the underlying infrastructure of servers, storage, network, and databases.
*   **Examples:** AWS Elastic Beanstalk, Azure App Service, Heroku, Google App Engine.
*   **Analogy:** Renting a house where maintenance is included, but you furnish it.

### SaaS (Software as a Service)
SaaS is a method for delivering software applications over the Internet, on demand and typically on a subscription basis. With SaaS, cloud providers host and manage the software application and underlying infrastructure.
*   **Examples:** Gmail, Salesforce, Dropbox, Slack.
*   **Analogy:** Staying in a hotel. Everything is managed for you.

## 2. Major Providers

*   **AWS (Amazon Web Services):** The market leader. Offers a vast array of services. Known for S3 (Storage), EC2 (Compute), and Lambda (Serverless).
*   **Microsoft Azure:** Strong integration with enterprise Microsoft products (Windows Server, Active Directory, .NET).
*   **GCP (Google Cloud Platform):** Known for strong data analytics, AI/ML capabilities, and Kubernetes (GKE).

## 3. Core Concepts

### Compute
*   **Virtual Machines (VMs):** Digital versions of physical computers.
*   **Serverless:** Running code without provisioning or managing servers (e.g., AWS Lambda, Azure Functions). You pay only for the compute time you consume.

### Storage
*   **Object Storage:** Storing data as objects (files) in a flat hierarchy. Great for images, backups, logs. (e.g., AWS S3, Azure Blob Storage).
*   **Block Storage:** Used with VMs, acts like a hard drive.

### Databases
Cloud providers offer managed versions of popular databases, handling backups, patching, and scaling automatically.
*   **Relational:** AWS RDS, Azure SQL Database.
*   **NoSQL:** AWS DynamoDB, Azure Cosmos DB.

## 4. Benefits

1.  **Cost:** Pay-as-you-go model eliminates capital expense of buying hardware.
2.  **Speed:** Resources can be provisioned in minutes.
3.  **Global Scale:** Scale elastically (scale up/down) and deploy globally to regions near your users.

[[programming/microservices-architecture]]
[[programming/docker-and-containers]]
[[programming/cybersecurity-basics]]