CMP424 Cloud Computing and Virtualization

Cloud Computing and VirtualizationUnit 220 min read

Cloud Service & Deployment Models: Types, Comparisons & Real-World Use

Unit 2 of Cloud Computing and Virtualization explores the three cloud service models (IaaS, PaaS, SaaS) and four deployment models (public, private, hybrid, community), their architectures, real-world applications in Nepali and global tech, and how to choose between them for cost, security, and scalability.

Cloud Service Models: What You Get from the Cloud

Cloud computing delivers services over the internet in three main layers, each abstracting more complexity from the user. Think of them like renting a house:

  • Infrastructure as a Service (IaaS): You rent the land and walls (servers, storage, networking). You bring your own furniture (OS, apps).
  • Platform as a Service (PaaS): You rent a furnished apartment (pre-installed OS, middleware, runtime). You bring your own dishes (your app code).
  • Software as a Service (SaaS): You rent a fully furnished hotel room (complete app). You just bring your luggage (data).
classDiagram
    class CloudService {
        <<abstract>>
        +Delivers: Resources over internet
    }
    class IaaS {
        +Provides: Virtual machines, storage, networks
        +User: Manages OS, middleware, apps
        +Example: AWS EC2, Google Compute Engine
    }
    class PaaS {
        +Provides: Runtime, middleware, OS
        +User: Deploys apps
        +Example: Heroku, Google App Engine
    }
    class SaaS {
        +Provides: Complete application
        +User: Accesses via browser
        +Example: Gmail, Salesforce
    }
    CloudService <|-- IaaS
    CloudService <|-- PaaS
    CloudService <|-- SaaS

IaaS: The Building Blocks

Definition: IaaS provides raw computing resources—virtualized servers, storage, and networking—over the internet. You control the OS, middleware, runtime, and apps.

How it works:

  1. You request resources (e.g., 2 vCPUs, 4GB RAM, 100GB storage) from a cloud provider.
  2. The provider allocates virtual machines (VMs) with those specs.
  3. You install your OS (e.g., Ubuntu) and deploy your applications.
  4. You pay only for what you use (pay-as-you-go).

Real-world example: Ncell’s Disaster Recovery Ncell uses AWS IaaS to host backup servers for its core network. During a power outage in Kathmandu, Ncell’s primary data centers fail, but AWS’s IaaS allows them to spin up identical VMs in seconds in a different region. The VMs replicate critical network configurations, and traffic is rerouted automatically. This avoids downtime while Ncell restores local systems.

Worked example: Cost comparison for a web server Suppose you need to host a medium-traffic website (500 concurrent users). Compare hosting it yourself vs. using AWS IaaS:

Option Cost (Monthly) Maintenance Scalability
On-premise server Rs. 80,000 High (hardware, OS, security) Manual (buy new hardware)
AWS IaaS (t3.medium) Rs. 25,000 Low (AWS manages hardware) Automatic (scale up/down)

Advantages:

  • Flexibility: Scale resources up or down instantly.
  • Cost-efficiency: Pay only for what you use (no idle capacity).
  • Disaster recovery: Replicate data across regions.

Disadvantages:

  • Management overhead: You handle OS, middleware, and app deployment.
  • Security responsibility: You secure your VMs, data, and access controls.

Nepali use case: Daraz’s Microservices Daraz uses IaaS (AWS EC2) to host its microservices architecture. Each service (e.g., product catalog, payment processing) runs on separate VMs. During the Dashain sale, Daraz scales up VMs for the payment service to handle 10x traffic, then scales down afterward.


PaaS: The Developer’s Playground

Definition: PaaS provides a cloud environment for developing, testing, and deploying applications without managing the underlying infrastructure. It includes the OS, middleware, runtime, and sometimes databases.

How it works:

  1. You upload your app code (e.g., a Python/Django app).
  2. The PaaS platform handles:
    • OS installation and updates.
    • Web server (e.g., Apache, Nginx).
    • Database (e.g., PostgreSQL).
    • Scaling (horizontal/vertical).
  3. You focus only on writing and deploying code.

Real-world example: eSewa’s Payment Gateway eSewa’s development team uses Heroku (PaaS) to build and deploy its payment gateway microservices. Heroku automatically scales the app during peak hours (e.g., Dashain when transactions spike). The team doesn’t worry about server maintenance—Heroku handles OS patches, load balancing, and failover.

Worked example: Deploying a Node.js app You’re building a real-time chat app for a Nepali startup. Compare deploying it on:

  1. IaaS (AWS EC2): You’d need to:
    • Install Node.js and Nginx.
    • Configure a load balancer.
    • Set up a database (e.g., MongoDB).
    • Write scripts to scale the app.
  2. PaaS (Heroku): You just:
    • Push your code to GitHub.
    • Run heroku create and git push heroku master.
    • Heroku handles everything else.

Advantages:

  • Faster development: No infrastructure setup.
  • Built-in tools: Databases, caching, monitoring.
  • Scalability: Automatic scaling based on traffic.

Disadvantages:

  • Vendor lock-in: Apps may depend on PaaS-specific features.
  • Limited control: You can’t customize the underlying OS or middleware.
  • Cost at scale: Can become expensive for high-traffic apps.

Nepali use case: Khalti’s API Development Khalti uses Google App Engine (PaaS) to host its API services. Developers write APIs in Python/Java, and App Engine handles:

  • Auto-scaling during Diwali (when transactions peak).
  • Database management (Firestore).
  • Security patches.

SaaS: The Ready-to-Use App

Definition: SaaS delivers fully functional applications over the internet. Users access the software via a web browser or app, and the provider manages everything—infrastructure, platform, and software.

How it works:

  1. You sign up for a SaaS service (e.g., Gmail, Salesforce).
  2. The provider hosts the app on their servers.
  3. You access it via a URL or mobile app.
  4. You pay a subscription fee (monthly/yearly).

Real-world example: NTC’s Network Management The Nepal Telecommunications Company (NTC) uses SaaS-based network monitoring tools like SolarWinds to manage its fiber-optic backbone. SolarWinds provides:

  • Real-time network performance monitoring.
  • Alerts for outages (e.g., fiber cuts in Chitwan).
  • Automated reports for NTC’s engineers. NTC doesn’t need to install or maintain any software—it just logs in to SolarWinds’ web portal.

Worked example: Choosing between SaaS and self-hosted CRM A Nepali logistics company wants to track orders. Compare:

  1. SaaS (Salesforce):
    • Cost: Rs. 50,000/month for 10 users.
    • Maintenance: None (Salesforce handles updates, security, backups).
    • Features: AI-driven insights, mobile app.
  2. Self-hosted (Odoo on IaaS):
    • Cost: Rs. 30,000/month (IaaS + Odoo license).
    • Maintenance: High (OS updates, database backups, security patches).
    • Features: Customizable but requires IT staff.

Advantages:

  • No installation: Access from anywhere with an internet connection.
  • Automatic updates: The provider handles security patches and new features.
  • Cost-effective for small teams: No need for in-house IT staff.

Disadvantages:

  • Limited customization: You can’t modify the underlying code.
  • Data privacy concerns: Your data is stored on the provider’s servers.
  • Downtime risk: Dependent on the provider’s uptime (e.g., Gmail outages).

Nepali use case: Pathao’s Ride-Hailing App Pathao’s drivers and riders use the Pathao app (SaaS), but Pathao’s backend uses IaaS (AWS) + PaaS (Heroku). The app itself is SaaS:

  • Riders/drivers don’t install servers—they just download the app.
  • Pathao manages all updates, security, and scalability.

Cloud Deployment Models: Where to Host Your Cloud

The deployment model defines who owns and operates the cloud infrastructure. There are four main types:

mindmap
  root((Cloud Deployment Models))
    Public
      +Owned by: Third-party provider (AWS, Google Cloud)
      +Access: Multi-tenant (shared resources)
      +Cost: Low (pay-as-you-go)
      +Example: Ncell’s AWS-hosted backup systems
    Private
      +Owned by: Single organization
      +Access: Single-tenant (dedicated resources)
      +Cost: High (capital expenditure)
      +Example: NEPSE’s secure trading platform
    Hybrid
      +Combines: Public + Private
      +Use case: Sensitive data in private cloud, scalable apps in public
      +Example: Bank of Kathmandu’s customer data (private) + marketing site (public)
    Community
      +Owned by: Shared by several organizations
      +Access: Restricted to specific group
      +Example: Nepal Police’s shared cloud for forensic analysis

1. Public Cloud

Definition: Cloud services are delivered over the public internet by third-party providers (e.g., AWS, Google Cloud, Microsoft Azure). Resources are shared among multiple tenants.

How it works:

  • You rent resources from a provider (e.g., AWS).
  • The provider manages all hardware, networking, and security.
  • You access services via the internet.

Real-world example: YouTube’s Global Infrastructure YouTube runs on Google Cloud’s public cloud. When you upload a video:

  1. Your upload goes to the nearest Google data center.
  2. Google’s CDN (Content Delivery Network) distributes the video to edge servers worldwide.
  3. Users stream the video from the closest server, reducing latency.

Worked example: Hosting a Nepali news website A Kathmandu-based news site (e.g., OnlineKhabar) wants to host its website. Compare:

  • Public cloud (AWS): Costs Rs. 15,000/month, scales automatically during elections, but shares resources with other AWS customers.
  • Private cloud: Costs Rs. 100,000/month (on-premise servers), but offers full control and isolation.

Advantages:

  • Cost-effective: No upfront capital expenditure.
  • Scalability: Instantly scale up/down.
  • Global reach: Deploy in multiple regions (e.g., AWS Mumbai for Indian users).

Disadvantages:

  • Security risks: Shared responsibility model (you secure your data).
  • Compliance issues: May not meet industry regulations (e.g., banking).
  • Downtime: Dependent on provider’s uptime (e.g., AWS outages in 2021).

Nepali use case: Daraz’s Global Expansion Daraz uses AWS’s public cloud to host its e-commerce platform. During the Dashain sale:

  • Traffic spikes from 10,000 to 500,000 users/hour.
  • AWS auto-scales servers in Singapore and India.
  • Daraz pays only for the extra resources used.

2. Private Cloud

Definition: Cloud infrastructure is dedicated to a single organization. It can be hosted on-premise or by a third party but is not shared with others.

How it works:

  1. The organization buys or leases servers/storage.
  2. A virtualization layer (e.g., VMware) creates a private cloud.
  3. Only authorized users access the cloud via a secure network.

Real-world example: NEPSE’s Trading System The Nepal Stock Exchange (NEPSE) uses a private cloud to host its trading platform. Why?

  • Security: Highly sensitive financial data must not be exposed.
  • Compliance: Must adhere to Nepal Rastra Bank regulations.
  • Control: NEPSE manages all updates and security patches.

Worked example: Hospital Patient Records A hospital in Pokhara wants to store patient records. Compare:

  • Public cloud (AWS): Cheaper but risks HIPAA violations (Nepal’s patient data laws are strict).
  • Private cloud (on-premise): Costs Rs. 500,000 to set up but ensures data sovereignty and compliance.

Advantages:

  • Security: Dedicated resources, no shared tenancy.
  • Compliance: Meets industry-specific regulations (e.g., banking, healthcare).
  • Customization: Full control over hardware/software.

Disadvantages:

  • High cost: Capital expenditure for hardware/software.
  • Maintenance: Requires in-house IT staff.
  • Scalability: Harder to scale than public cloud.

Nepali use case: Nepal Rastra Bank’s Core Banking The Nepal Rastra Bank (NRB) uses a private cloud for its core banking systems. Reasons:

  • Data sovereignty: Financial data cannot leave Nepal.
  • Disaster recovery: Backups are stored in a secondary data center in Chitwan.
  • Custom workflows: Tailored to Nepal’s banking laws.

3. Hybrid Cloud

Definition: A mix of public and private clouds, connected via secure networking. Sensitive data stays in the private cloud, while scalable apps run in the public cloud.

How it works:

  1. Private cloud: Hosts critical workloads (e.g., customer databases).
  2. Public cloud: Hosts variable workloads (e.g., marketing websites).
  3. Integration: Secure VPN or API connects the two.

Real-world example: Bank of Kathmandu’s Digital Banking Bank of Kathmandu uses a hybrid cloud:

  • Private cloud: Stores customer account data (must comply with Nepal’s banking laws).
  • Public cloud (AWS): Hosts the mobile banking app and customer support chatbots.
  • Integration: When you log in to the mobile app, it securely fetches your account data from the private cloud.

Worked example: E-commerce with PCI Compliance An online pharmacy in Nepal sells medicines. It must comply with PCI DSS (Payment Card Industry standards). How?

  • Private cloud: Stores customer payment data (credit card numbers).
  • Public cloud (AWS): Hosts the product catalog and checkout process (non-sensitive).
  • Flow:
    1. Customer browses products (public cloud).
    2. Customer enters payment details → data encrypted and sent to private cloud.
    3. Private cloud processes payment and returns confirmation to public cloud.

Advantages:

  • Flexibility: Use public cloud for scalability, private for security.
  • Cost-efficiency: Avoid over-provisioning private cloud resources.
  • Compliance: Meet regulatory requirements (e.g., GDPR, Nepal’s data laws).

Disadvantages:

  • Complexity: Requires expertise to integrate public/private clouds.
  • Higher cost: More management overhead than pure public/private.
  • Vendor lock-in: May depend on specific integration tools.

Nepali use case: Ncell’s Billing System Ncell uses a hybrid cloud:

  • Private cloud: Stores customer billing records (sensitive data).
  • Public cloud (AWS): Hosts the customer portal and self-service options.
  • Benefit: During network outages, AWS-hosted services remain available while private cloud systems recover.

4. Community Cloud

Definition: Cloud infrastructure is shared by several organizations with common concerns (e.g., security, compliance, or mission). It can be managed by a third party or one of the organizations.

How it works:

  1. A group of organizations (e.g., Nepal Police, Army, Intelligence) agrees to share a cloud.
  2. A third party or one organization manages the cloud.
  3. Only authorized users from member organizations access it.

Real-world example: Nepal Police’s Forensic Cloud The Nepal Police shares a community cloud with the Army and Intelligence agencies for forensic analysis. Why?

  • Shared cost: Expensive tools (e.g., DNA analysis software) are shared.
  • Standardized security: All agencies follow the same security protocols.
  • Collaboration: Agencies can share evidence (e.g., cybercrime data) securely.

Worked example: Healthcare Consortium Three hospitals in Kathmandu (KIST, CIWEC, B.P. Koirala) share a community cloud for:

  • Patient records: Shared across hospitals (with consent).
  • Emergency response: Real-time data sharing during disasters.
  • Cost savings: Avoid each hospital buying its own EHR system.

Advantages:

  • Cost-sharing: Reduces individual organization’s expenses.
  • Standardized security: Shared responsibility for compliance.
  • Collaboration: Easy data sharing between trusted entities.

Disadvantages:

  • Limited flexibility: Must align with all members’ needs.
  • Complex governance: Requires agreements on data ownership, access, and liability.
  • Performance issues: Shared resources may lead to bottlenecks.

Nepali use case: Nepal Government’s e-Governance Cloud The Nepal government is piloting a community cloud for:

  • Land records: Shared between Land Reform Office and District Development Committees.
  • Tax data: Shared between Inland Revenue Department and local governments.
  • Disaster management: Shared between Home Ministry and Army.

Comparing Service and Deployment Models

Use this table to decide which model fits your needs:

Criteria IaaS PaaS SaaS
Control High (OS, apps) Medium (code only) Low (no control)
Management High Low None
Use Case Custom apps, big data App development End-user apps
Example (Nepal) Ncell’s backup VMs Khalti’s APIs Pathao app
Criteria Public Cloud Private Cloud Hybrid Cloud Community Cloud
Ownership Third-party Single org Mixed Shared orgs
Cost Low (pay-as-you-go) High (CAPEX) Medium Shared
Security Medium (shared) High (dedicated) High (segmented) High (trusted group)
Scalability High Low High Medium
Example (Nepal) Daraz on AWS NEPSE’s trading system Bank of Kathmandu Nepal Police forensic cloud

In the Real World

  1. eSewa’s Payment Gateway (PaaS + Hybrid Cloud)

    • Service Model: Uses PaaS (Heroku) for its API backend and IaaS (AWS) for high-traffic scaling.
    • Deployment Model: Hybrid cloud—sensitive transaction data is stored in a private cloud in Nepal, while the public-facing app runs on AWS.
    • Why? During Dashain, eSewa processes 50,000 transactions/hour. AWS auto-scales the public cloud, while private cloud ensures PCI compliance for payment data.
  2. Ncell’s Network Resilience (IaaS + Public Cloud)

    • Service Model: Uses IaaS (AWS EC2) to host backup network configurations.
    • Deployment Model: Public cloud for disaster recovery.
    • How? When a fiber cut occurs in Chitwan, Ncell’s system automatically fails over to AWS-hosted VMs in Mumbai, restoring service within 2 minutes.
  3. NEPSE’s Trading Platform (SaaS + Private Cloud)

    • Service Model: The trading app is SaaS for brokers, but the backend uses IaaS (private cloud).
    • Deployment Model: Private cloud to ensure no shared tenancy risks.
    • Why? During market volatility (e.g., 2020 COVID crash), NEPSE’s private cloud ensures stable performance without public cloud latency.

Exam Tip

This unit is heavily tested in TU/PU exams with:

  1. Definitions: Know the exact differences between IaaS/PaaS/SaaS and public/private/hybrid/community clouds.

    • Example question: "Differentiate between PaaS and SaaS with examples from Nepali tech companies."
    • Answer tip: Use Khalti (PaaS) vs. Pathao app (SaaS).
  2. Scenario-based questions: You’ll be given a real-world scenario (e.g., a bank, hospital, or e-commerce site) and asked to choose the best service/deployment model.

    • Example question: "A hospital in Pokhara wants to store patient records. Recommend a cloud service and deployment model, justifying your choice."
    • Answer tip:
      • Service Model: IaaS (they need control over the OS and apps like EHR software).
      • Deployment Model: Private cloud (compliance with Nepal’s health data laws).
      • Why? Public cloud risks data breaches; SaaS lacks customization.
  3. Diagrams: Draw layered models for service models and integration diagrams for hybrid clouds.

    • Example: "Draw the architecture of a hybrid cloud used by a Nepali bank."
    • Answer tip:
      flowchart LR
        User["Customer"] --> PublicCloud["AWS: Mobile App & Marketing Site"]
        PublicCloud --> API["Secure API Gateway"]
        API --> PrivateCloud["On-Premise: Customer Data & Transactions"]
        PrivateCloud --> Compliance["Nepal Rastra Bank Regulations"]
  4. Advantages/disadvantages tables: Memorize the pros/cons of each model for quick comparison.

    • Example question: "Compare public and private clouds for a government agency in Nepal."
    • Answer tip: Use the table above, emphasizing cost (public) vs. security (private).
  5. Real-world mapping: Exams often ask to map Nepali companies to models. Know:

    • IaaS: Ncell, Daraz, NTC.
    • PaaS: eSewa, Khalti APIs.
    • SaaS: Pathao, eSewa app, Google Workspace (used by many Nepali businesses).
    • Private cloud: NEPSE, Nepal Rastra Bank.
    • Hybrid cloud: Bank of Kathmandu, Global IME Bank.
    • Community cloud: Nepal Police, government e-governance projects.

Pro tip: For numerical questions (e.g., cost comparisons), always show step-by-step calculations with clear assumptions. For example:

"Calculate the annual cost of hosting a web server on AWS IaaS vs. on-premise for a startup in Nepal." Assume:

  • AWS: 1 VM (t3.small) @ Rs. 8,000/month + Rs. 5,000/month for storage.
  • On-premise: Rs. 150,000 for server + Rs. 20,000/year for maintenance. Answer:
    Option Monthly Cost Annual Cost
    AWS IaaS Rs. 13,000 Rs. 156,000
    On-premise Rs. 14,167 Rs. 170,000
    Conclusion: AWS is cheaper by Rs. 14,000/year, plus no maintenance overhead.

Based on the PU BE Computer (PU) syllabus for Cloud Computing and Virtualization (CMP424), unit 2.

Discussion

Loading…