allthingsare๐Ÿ…ฟ๏ธ.com Books โฌ…๏ธ Back allthingsare

4.1 Cloud Architecture Basics & DevOps Intro


Learning Goal:
โ€ข Understand core cloud computing concepts and how they relate to architecture.


Detailed Content:
โ€ข What is cloud computing: IaaS, PaaS, SaaS explained
โ€ข Public cloud overview: AWS, Azure, GCP
โ€ข Benefits: scalability, availability, cost-efficiency
โ€ข Basic DevOps: CI/CD pipelines, automated deployments
โ€ข Introduction to Docker and containerization


4.1.1 What is Cloud Computing: IaaS, PaaS, SaaS Explained


Cloud computing has transformed how companies build, deploy, and scale software. Instead of running everything on local physical servers, teams can rent computing power, storage, and services on-demand from large providers. This shift has unlocked massive flexibility and efficiency, but to use it wisely, you need to grasp the core service models: IaaS, PaaS, and SaaS.

IaaS (Infrastructure as a Service) gives you raw infrastructure resources: virtual machines, networking, and storage. With IaaS, you rent servers but still control the OS, runtime, and applications yourself. AWS EC2, Azure Virtual Machines, and Google Compute Engine are classic IaaS offerings. You handle patching, security hardening, and scaling policies.

PaaS (Platform as a Service) goes a step further. The cloud provider manages the OS, runtime, and even some scaling for you. You just focus on your application code. Examples include AWS Elastic Beanstalk, Google App Engine, and Azure App Service. PaaS is popular for startups and small teams who want to ship fast without worrying about managing infrastructure details.

SaaS (Software as a Service) is the top layer: fully managed applications you simply use. Examples include Gmail, Salesforce, or Slack. From an architecture perspective, many modern SaaS businesses build their products on top of IaaS or PaaS themselves, but the end customer only sees the finished application.

Understanding these layers helps architects make smart decisions about cost, control, and responsibility.


4.1.2 Public Cloud Overview: AWS, Azure, GCP


The three giants of the public cloudโ€”Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP)โ€”dominate the market.

AWS is the oldest and largest. It pioneered the model of on-demand compute and storage. Services like EC2 (virtual servers), S3 (object storage), RDS (managed databases), and Lambda (serverless functions) are industry standards. AWS has a huge service catalog but can feel complex for beginners.

https://aws.amazon.com/

Azure leverages Microsoftโ€™s ecosystem. Itโ€™s strong in enterprise adoption, hybrid cloud scenarios, and integrations with Windows Server, Active Directory, and Office 365. Services like Azure App Service, Azure Functions, and Azure DevOps make it popular with large organizations.

https://cloud.google.com/

GCP is known for its developer-friendly tools and data-heavy workloads. Googleโ€™s strength in big data, AI, and Kubernetes (which Google created) makes GCP a natural choice for analytics, machine learning, and containerized workloads. Services like Google BigQuery, Cloud Run, and Firebase are beloved by modern app developers.

https://cloud.google.com/

For architects, choosing a provider often depends on what fits the business context: existing tech stack, pricing, compliance needs, and team skillsets.


4.1.3 Benefits: Scalability, Availability, Cost-Efficiency

One of the main reasons companies move to the cloud is scalability. With physical servers, scaling meant buying more hardwareโ€”sometimes weeks or months in advance. In the cloud, you can spin up more virtual machines, storage, or containers in minutes. Auto-scaling groups adjust resources up and down based on traffic, keeping performance steady during spikes and saving money during quiet hours.

Availability is another huge benefit. Public clouds offer data centers spread across regions and zones. This makes it possible to design highly available systems that replicate data and failover automatically if one server or even an entire region goes down. Architecting for availability means thinking about redundancy, load balancing, and disaster recovery plans.

Cost-efficiency is the third pillar. Instead of heavy upfront capital expenditure, cloud costs become operational expenses. You pay only for what you useโ€”compute hours, storage, bandwidth. However, poor architecture can erase these benefits. For example, leaving unused instances running overnight or designing chatty microservices that rack up networking costs can lead to surprise bills.


4.1.4 Basic DevOps: CI/CD Pipelines and Automated Deployments

As teams build in the cloud, they quickly encounter the reality that managing servers manually doesnโ€™t scale. This is where DevOps comes in. DevOps combines development and operations practices to shorten the software delivery cycle, improve quality, and enable rapid iteration.

A core DevOps practice is CI/CDโ€”Continuous Integration and Continuous Delivery (or Deployment). Continuous Integration means that developers frequently merge code changes into a shared repository. Automated build and test pipelines catch bugs early. Continuous Delivery means the code is always ready to deploy to production at any time. Continuous Deployment goes one step furtherโ€”every code change that passes tests is automatically pushed live.

In practice, tools like Jenkins, GitHub Actions, GitLab CI, or Azure Pipelines automate these workflows. A simple CI/CD pipeline might:

  1. Run unit tests.

  2. Build the application into an artifact (like a JAR or Docker image).

  3. Deploy the artifact to a staging environment.

  4. Run integration tests.

  5. Deploy to production automatically if everything passes.

This pipeline reduces human error and speeds up delivery, which is crucial for cloud-native applications that may have multiple microservices, frequent releases, and teams deploying multiple times per day.


4.1.5 Introduction to Docker and Containerization

https://www.docker.com/

Modern DevOps heavily relies on containerization, and Docker is the most popular tool for this. Containers bundle an application and all its dependencies into a single, lightweight package that runs reliably anywhereโ€”from a developerโ€™s laptop to staging to production servers.

Unlike virtual machines, containers share the host OS kernel, making them faster to start and more resource-efficient. Docker allows you to define your app environment in a Dockerfile. Hereโ€™s a simple Java example:

dockerfile
# Use an official OpenJDK runtime as base image FROM openjdk:17-jdk-slim # Copy application jar to container COPY target/myapp.jar /app/myapp.jar # Run the jar when container starts ENTRYPOINT ["java", "-jar", "/app/myapp.jar"]

You build the image:

bash
docker build -t myapp .

And run it locally:

bash
docker run -p 8080:8080 myapp

Containers work well with cloud services and orchestration tools like Kubernetes, which automate deployment, scaling, and management of containerized applications. Today, building cloud-native apps almost always means building them as containers.


Wrap-Up

Cloud architecture and DevOps go hand in hand. The cloud offers the flexibility and scale; DevOps provides the discipline and automation to handle that complexity responsibly. Architects today must understand both worldsโ€”how to pick the right cloud services, how to design for scale and resilience, and how to ensure that code moves from development to production quickly and safely, every day.