Cloud ComputingUnit 215 min read

Cloud Service Models: IaaS, PaaS, SaaS – Definitions, Workings & Comparisons

Unit 2 of Cloud Computing explores the three core cloud service models—Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS)—their technical architectures, real-world applications (e.g., AWS EC2, Google App Engine, eSewa), and how they differ in deployment, control, and cost

What Are Cloud Service Models?

Cloud service models define how cloud resources are delivered to users. They categorize cloud offerings based on what the provider manages (infrastructure, platform, or software) and what the customer controls. The three primary models are:

classDiagram
    class CloudServiceModel {
        <<abstract>>
        +String name
        +String description
        +String managedByProvider
        +String controlledByCustomer
    }
    class IaaS {
        +String virtualizedCompute
        +String storage
        +String networking
    }
    class PaaS {
        +String runtimeEnvironment
        +String middleware
        +String developmentTools
    }
    class SaaS {
        +String readyToUseSoftware
        +String noInstallationNeeded
    }
    CloudServiceModel <|-- IaaS
    CloudServiceModel <|-- PaaS
    CloudServiceModel <|-- SaaS

Key Definitions

Model Full Form Definition Example Providers
IaaS Infrastructure as a Service Provides virtualized computing resources (VMs, storage, networks) over the internet. AWS EC2, Microsoft Azure VMs, Google Compute Engine
PaaS Platform as a Service Offers a development platform (OS, middleware, runtime) to build, test, and deploy apps. Google App Engine, Heroku, AWS Elastic Beanstalk
SaaS Software as a Service Delivers ready-to-use software applications via the cloud (no installation required). Gmail, eSewa, Salesforce, Microsoft 365

1. Infrastructure as a Service (IaaS)

IaaS is the most basic cloud service model, where providers offer virtualized computing resources (servers, storage, networks) on a pay-as-you-go basis. Customers manage operating systems, applications, and data, while the provider handles the physical hardware.

How IaaS Works

  1. Virtualization: Physical servers are divided into virtual machines (VMs) using hypervisors (e.g., VMware, Hyper-V).
  2. Resource Allocation: Users allocate CPU, RAM, storage, and networking as needed.
  3. Scalability: Resources can be scaled up/down dynamically (e.g., adding more VMs during peak traffic).
  4. Billing: Charged based on usage (hourly/daily rates).
flowchart TD
    A["User Requests VM"] --> B["Hypervisor Allocates Resources"]
    B --> C["OS Installed on VM"]
    C --> D["User Deploys Apps"]
    D --> E["Pay for Used Resources"]

Real-World Example: Daraz Order Queue (IaaS in E-Commerce)

Daraz, Nepal’s largest e-commerce platform, uses IaaS to handle order processing during sales events (e.g., Dashain sales). During peak traffic:

  • Problem: Thousands of orders flood the system simultaneously, risking crashes.
  • Solution: Daraz uses AWS EC2 auto-scaling to spin up additional VMs dynamically.
  • How IaaS Helps:
    • Load Balancing: Distributes traffic across multiple VMs.
    • Database Scaling: Uses Amazon RDS (IaaS-based managed databases) to handle query spikes.
    • Cost Efficiency: Pays only for VMs used during peak hours (not 24/7).

Worked Example: Calculating IaaS Cost for a Small Business A café in Kathmandu wants to host its website and customer database on IaaS.

  • Requirements:
    • 2 vCPUs, 4GB RAM, 100GB SSD storage.
    • Expected traffic: 10,000 visitors/month.
  • Provider: AWS EC2 (On-Demand pricing in Nepal region: ~$0.08/hour for this config).
  • Monthly Cost:
    Cost per hour = $0.08
    Hours in a month = 730 (30 days × 24 hours)
    Total cost = 0.08 × 730 = **$58.40/month**
    
  • Comparison: Hosting the same setup on a local server would cost ~$500/month (including maintenance, electricity, and cooling).

2. Platform as a Service (PaaS)

PaaS provides a complete development and deployment platform, including OS, middleware, databases, and development tools. Users focus on building and deploying applications without managing infrastructure.

How PaaS Works

  1. Pre-Configured Environment: Includes SDKs, databases (e.g., PostgreSQL), and runtime (e.g., Node.js, Python).
  2. Automated Deployment: Code is deployed directly to the cloud (e.g., GitHub → Heroku).
  3. Collaboration Tools: Built-in CI/CD pipelines (e.g., Jenkins integration).
  4. Scaling: Automatic scaling of apps (not just infrastructure).
sequenceDiagram
    participant User
    participant PaaSProvider
    participant Database
    User->>PaaSProvider: Uploads Code (Git Push)
    PaaSProvider->>Database: Creates DB Instance
    PaaSProvider->>User: Deploys App (Live URL)
    User->>PaaSProvider: Monitors Performance

Real-World Example: Ncell’s Mobile App Development (PaaS)

Ncell, Nepal’s largest telecom provider, uses PaaS to develop and update its mobile apps (e.g., Ncell MyAccount, Ncell Recharge).

  • Problem: Frequent app updates require fast deployment without infrastructure hassles.
  • Solution: Uses Google App Engine (PaaS) for:
    • Backend Services: Handles user authentication, recharge requests, and bill payments.
    • Database: Firebase (managed by Google) stores customer data.
    • CI/CD: Automated testing and deployment via GitHub Actions.
  • Benefits:
    • No need to manage servers or databases.
    • Apps scale automatically during Diwali recharge rush.

Worked Example: Deploying a Weather App on Heroku (PaaS) A startup wants to build a weather app for Pokhara.

  • Steps:
    1. Code: Writes app in Python (Flask framework).
    2. PaaS Setup: Signs up on Heroku (free tier available).
    3. Database: Uses Heroku Postgres (managed database).
    4. Deployment: Connects GitHub repo → Heroku deploys automatically.
  • Cost: Free tier allows 512MB RAM, 10,000 monthly requests (sufficient for a small app).

3. Software as a Service (SaaS)

SaaS delivers fully functional software applications over the internet. Users access the software via a web browser without installation or maintenance.

How SaaS Works

  1. Multi-Tenancy: Single instance of the software serves multiple customers (e.g., Gmail for all users).
  2. Centralized Hosting: Provider manages data, security, and updates.
  3. Subscription Model: Paid via monthly/annual subscriptions (e.g., $5/user/month).
  4. Accessibility: Works on any device with an internet connection.
stateDiagram-v2
    [*] --> User: Logs in via Browser
    User --> SaaSProvider: Sends Request
    SaaSProvider --> Database: Fetches Data
    Database --> SaaSProvider: Returns Data
    SaaSProvider --> User: Renders UI
    User --> [*]: Exits

Real-World Example: eSewa Payments (SaaS in Nepal)

eSewa, Nepal’s leading digital payment platform, is a SaaS application used by:

  • Merchants: Accept online payments (e.g., Daraz, Pathao).
  • Customers: Pay bills (electricity, internet) and transfer money.
  • Banks: Integrate eSewa for loan repayments.

How SaaS Enables eSewa:

  • No Installation: Users access eSewa via web/mobile app (no server setup needed).
  • Scalability: Handles millions of transactions/day during festivals (e.g., Dashain, Tihar).
  • Security: eSewa manages PCI-DSS compliance (payment security standards).
  • Cost: Businesses pay transaction fees (1.99% + Rs. 3) instead of maintaining payment infrastructure.

Worked Example: Calculating SaaS Cost for a School A school in Lalitpur wants to use Google Workspace (SaaS) for email and documents.

  • Requirements:
    • 50 teachers + 500 students = 550 users.
    • Google Workspace pricing: $6/user/month (Education discount: ~$3/user/month).
  • Annual Cost:
    Cost per user/year = $3 × 12 = $36
    Total cost = 550 × $36 = **$19,800/year (~Rs. 2.5 million)**
    
  • Comparison: Setting up a self-hosted email server would cost ~$50,000/year (including hardware, maintenance, and security).

In the Real World

Company/App Service Model How It Uses Cloud Models Nepal Relevance
eSewa SaaS Users access payment services via web/mobile app; eSewa manages all backend infrastructure. Enables digital transactions for 20M+ users.
Daraz IaaS + PaaS Uses AWS IaaS for VMs during sales and PaaS (Heroku) for app development. Handles 100K+ orders/day in Nepal.
Ncell MyAccount PaaS Built on Google App Engine; auto-scales during peak recharge periods. Used by 15M+ Ncell customers.
NTC Billing System SaaS Citizens pay electricity bills via NTC’s web portal (SaaS); NTC manages servers. 5M+ households use this service.
Pathao Driver App IaaS + SaaS IaaS: AWS EC2 for ride-matching during peak hours. SaaS: Drivers use the app without server setup. 1M+ drivers in Nepal.

Comparison of IaaS, PaaS, and SaaS

Feature IaaS PaaS SaaS
Managed By Provider Network, servers, storage OS, middleware, runtime Entire application
Managed By Customer OS, apps, data, middleware Apps, data Nothing (just usage)
Control High (full infrastructure) Medium (platform-level) Low (only configuration)
Use Case Hosting websites, big data Developing/deploying apps End-user applications
Examples AWS EC2, Azure VMs Heroku, Google App Engine Gmail, Salesforce, eSewa
Cost Model Pay per usage (hourly) Pay per app instance Subscription per user
Scalability Manual or auto-scaling Automatic (app-level) Limited by provider

Advantages and Disadvantages

IaaS

✅ Pros:

  • Full control over infrastructure.
  • Cost-effective for large-scale deployments (e.g., hosting a website).
  • Flexible and scalable.

❌ Cons:

  • Requires IT expertise to manage OS, security, and apps.
  • Higher maintenance overhead.

PaaS

✅ Pros:

  • Faster development (no server management).
  • Built-in scaling and security.
  • Ideal for startups and developers.

❌ Cons:

  • Vendor lock-in: Hard to migrate between PaaS providers.
  • Limited control over underlying infrastructure.

SaaS

✅ Pros:

  • No installation or maintenance.
  • Accessible from anywhere.
  • Automatic updates and security patches.

❌ Cons:

  • Dependency on provider (downtime affects users).
  • Limited customization.
  • Privacy concerns (data stored on provider’s servers).

When to Use Which Model?

Scenario Recommended Model Why?
Hosting a website with high traffic IaaS Need full control over servers and databases.
Developing a mobile app PaaS Faster deployment without managing infrastructure.
Running a business with no IT team SaaS No need to maintain software (e.g., CRM, email).
Big data analytics IaaS Requires scalable storage and compute (e.g., AWS S3 + EC2).
Custom enterprise software PaaS or IaaS Need flexibility to modify platform (e.g., banking systems).
Consumer-facing apps (e.g., games) SaaS Users don’t want to install anything (e.g., Candy Crush on mobile).

Exam Tip

This unit is heavily tested in TU exams with:

  1. Definitions: Expect 1-mark questions on definitions of IaaS, PaaS, SaaS.
    • Example: "Define PaaS and give one example." → Must include "development platform" + "Heroku/Google App Engine".
  2. Comparisons: 5-mark questions comparing the three models (use the table above).
    • Example: "Differentiate between IaaS and PaaS with respect to control and use cases."
  3. Scenario-Based Questions: 10-mark questions asking which model to use for a given scenario.
    • Example: "A hospital wants to deploy a patient management system. Should they use IaaS, PaaS, or SaaS? Justify your answer."
      • Answer: PaaS (because they need a customizable platform for the app but don’t want to manage servers).
  4. Cost Calculations: 3-5 mark questions on pricing (e.g., AWS EC2, Google Workspace).
    • Example: "Calculate the monthly cost of hosting a VM with 4 vCPUs, 8GB RAM on AWS EC2 (On-Demand pricing)."
  5. Real-World Applications: Link to Nepalese examples (e.g., eSewa = SaaS, Daraz = IaaS).
    • Example: "How does Ncell use PaaS in its mobile app development?"

Common Mistakes to Avoid

  • ❌ Mixing up control levels: IaaS = customer controls OS/apps; SaaS = customer controls nothing.
  • ❌ Ignoring cost models: SaaS is subscription-based; IaaS/PaaS are usage-based.
  • ❌ Overlooking multi-tenancy: SaaS runs on a shared infrastructure (e.g., Gmail for all users).
  • ❌ Not mentioning scalability: IaaS/PaaS are scalable; SaaS is limited by provider.

Practice Questions for TU Exams

  1. Short Answer (1 mark each)

    • What is the difference between PaaS and SaaS in terms of what the customer manages?
    • Give one example of a SaaS application used in Nepal.
  2. Descriptive (5 marks)

    • Explain how a startup developing a food delivery app (like Pathao) can benefit from using PaaS. Include the steps involved in deploying the app.
  3. Scenario-Based (10 marks)

    • A bank in Nepal wants to migrate its loan management system to the cloud. The system requires:
      • High security for customer data.
      • Customizable workflows for loan approvals.
      • Scalability during festival seasons (e.g., Dashain).
    • Recommend the most suitable cloud service model (IaaS, PaaS, or SaaS) and justify your choice with at least three reasons. Also, suggest a cloud provider and explain why.
  4. Calculation (3 marks)

    • A small business in Pokhara wants to host its website on AWS EC2. The configuration requires:
      • 2 vCPUs, 4GB RAM, 50GB SSD storage.
      • Expected uptime: 24/7.
    • The On-Demand price for this instance in the Asia Pacific (Mumbai) region is $0.09/hour.
    • Calculate the monthly cost of running this instance. Assume 30 days in a month.

Final Summary

Model Key Idea Nepal Example Best For
IaaS Rent virtual machines Daraz’s order processing Full infrastructure control
PaaS Develop apps without servers Ncell MyAccount Developers, startups
SaaS Use ready-made software eSewa, Google Workspace End-users, businesses without IT

Based on the TU BITM syllabus for Cloud Computing (IT277), unit 2.

Discussion

Loading…