CMP424 Cloud Computing and Virtualization

Cloud Computing and VirtualizationUnit 510 min read

Server, Storage & Network Virtualization: Concepts, Techniques & Real-World Use

Unit 5 of Cloud Computing and Virtualization explores how cloud providers abstract physical hardware into virtual resources—servers, storage, and networks—to enable scalability, efficiency, and multi-tenancy. This note covers server virtualization (VMs, hypervisors), storage virtualization (SAN, NAS, object storage), n

Core Concepts: What Is Virtualization?

Virtualization is the process of creating a virtual (rather than physical) version of computing resources—servers, storage, or networks—so that multiple workloads can run on a single physical machine efficiently. In cloud computing, this enables:

  • Resource pooling: Sharing hardware among multiple users (tenants).
  • Isolation: Each virtual resource operates independently.
  • Scalability: Dynamically allocating resources based on demand.

Why Virtualize?

Physical Resources Virtual Resources Benefit
Single server Multiple VMs Cost savings, better utilization
Dedicated storage Shared storage pools Flexibility, redundancy
Physical network Software-defined networks Agility, security

1. Server Virtualization: Turning One Machine into Many

Server virtualization divides a physical server into multiple virtual machines (VMs), each running its own OS and applications.

How It Works

  1. Hypervisor (VMM): Software that allocates hardware resources (CPU, RAM, storage) to VMs.
    • Type 1 (Bare-metal): Runs directly on hardware (e.g., VMware ESXi, Microsoft Hyper-V).
    • Type 2 (Hosted): Runs on a host OS (e.g., Oracle VirtualBox, VMware Workstation).
  2. VM Components:
    • Guest OS: Runs inside the VM (e.g., Windows Server, Linux).
    • Virtual Hardware: Emulated CPU, RAM, disk, and network interfaces.
    • Hypervisor Layer: Manages resource allocation and isolation.
Hypervisor LayerManages CPU/RAM allocationVirtual Machines (VMs)Runs isolated VMsGuest OSWindows/Linux
Simplified VM architecture showing hypervisor isolation and resource management

Real-World Example: eSewa’s Cloud Infrastructure

eSewa, Nepal’s leading digital payment platform, uses server virtualization to:

  • Host multiple services (bill payments, remittance, e-commerce) on fewer physical servers.
  • Scale VMs during peak hours (e.g., Dashain/Tihar festivals).
  • Isolate payment processing VMs from customer-facing VMs for security.

Worked Example: VM Resource Allocation Suppose a cloud provider assigns resources to VMs for a Daraz order processing system:

  • VM1 (Web Server): 2 vCPUs, 4GB RAM, 50GB SSD.
  • VM2 (Database): 4 vCPUs, 8GB RAM, 200GB HDD.
  • VM3 (API Gateway): 1 vCPU, 2GB RAM, 20GB SSD. Question: If the hypervisor allocates 16 vCPUs and 32GB RAM, how much is left for the host OS? Answer: Total allocated = (2+4+1) vCPUs + (4+8+2) GB RAM = 7 vCPUs, 14GB RAM. Remaining = 16–7 = 9 vCPUs, 32–14 = 18GB RAM for the host.

2. Storage Virtualization: Pooling and Abstracting Storage

Storage virtualization combines multiple physical storage devices (HDDs, SSDs, NAS) into a single logical pool, managed by software.

Types of Storage Virtualization

Type Description Example Use Case
Block Storage Raw storage divided into blocks (e.g., SAN). Databases (MySQL, PostgreSQL).
File Storage Shared file systems (e.g., NAS). Employee documents, backups.
Object Storage Stores data as objects (key-value pairs). Cloud backups (AWS S3, Google Cloud Storage).

How It Works

  1. Storage Area Network (SAN): High-speed network connecting servers to storage arrays.

  2. Network-Attached Storage (NAS): Dedicated file storage device on a network.

File-level access (NFS/CIFS)Block-level access (iSCSI/Fibre Channel)ServersNAS DeviceSAN Storage Array
NAS vs SAN: NAS shares files directly; SAN provides block storage over high-speed networks

Real-World Example: Ncell’s Cloud Storage

Ncell uses object storage to:

  • Store millions of customer photos/videos in a scalable, cost-effective way.
  • Enable auto-scaling during data backups (e.g., nightly uploads).
  • Provide disaster recovery via geographically distributed storage.

Worked Example: Storage Allocation for a Bank A bank needs to store 1TB of transaction data. The cloud provider offers:

  • Option 1: 1TB HDD ($50/month, 100MB/s speed).
  • Option 2: 1TB SSD ($150/month, 500MB/s speed). Question: Which should the bank choose for high-frequency transactions? Answer: Option 2 (SSD) because:
  • Faster read/write speeds reduce latency.
  • Critical for real-time processing (e.g., loan approvals, fund transfers).

3. Network Virtualization: Software-Defined Networks (SDN)

Network virtualization decouples the network’s physical hardware from its control logic, allowing dynamic configuration via software.

Key Techniques

Technique Description Example
VLANs Logical segmentation of a physical network. Isolating departments in a company.
Overlays Virtual networks on top of physical infrastructure. VMware NSX, Cisco ACI.
SDN Controllers Centralized management of network flows. OpenDaylight, ONOS.
Policy RequestFlow RulesFlow RulesTraffic ForwardingSDN ControllerSwitch 1Switch 2Application
SDN control plane vs data plane separation with policy-driven routing

How SDN Works

  1. Control Plane: Software (SDN controller) decides where traffic goes.
  2. Data Plane: Physical switches/routers forward traffic based on controller rules.
  3. Northbound API: Applications request network services (e.g., "Create a new VLAN").
  4. Southbound API: Controller communicates with switches (e.g., OpenFlow).
sequenceDiagram
    participant App as Application
    participant Controller as SDN Controller
    participant Switch as Physical Switch
    App->>Controller: Request new VLAN
    Controller->>Switch: Install flow rules (OpenFlow)
    Switch-->>App: Forward traffic via new VLAN

Real-World Example: Pathao’s Dynamic Routing

Pathao uses network virtualization to:

  • Isolate rider and driver apps in separate VLANs for security.
  • Dynamically reroute traffic during peak hours (e.g., evening rush) via SDN.
  • Optimize latency for real-time GPS updates.

Worked Example: VLAN Configuration A university has 3 departments (CS, IT, EE) sharing a network. Assign VLAN IDs:

  • CS: VLAN 10 (192.168.10.0/24)
  • IT: VLAN 20 (192.168.20.0/24)
  • EE: VLAN 30 (192.168.30.0/24) Question: If a CS student (IP: 192.168.10.50) tries to access an IT server (192.168.20.100), what happens? Answer: The router drops the packet because:
  • VLANs are isolated by default.
  • Inter-VLAN routing requires explicit configuration (e.g., router ACLs or layer-3 switch).

4. Integration in Cloud Environments

Cloud providers combine all three virtualizations to deliver Infrastructure as a Service (IaaS).

Cloud Virtualization Stack

Physical HardwareServers/Storage/NetworkVirtualization LayerHypervisor/SDN/Storage PoolCloud IaaSVMs/Networks/StorageUser ApplicationsSaaS/PaaS/Custom Apps
Cloud virtualization stack with real-world components at each layer

Real-World Example: Google Cloud’s Global Network

Google uses:

  • Server Virtualization: Millions of VMs running on Borg (Google’s custom hypervisor).
  • Storage Virtualization: Colossus (object storage) for user data (Gmail, Drive).
  • Network Virtualization: B4 (SDN-based global network) for low-latency routing.
HTTP/HTTPSContent DeliveryLow-latency routingGlobal Load BalancerRegional Edge CachesCompute ZonesUser Devices
Google Cloud’s distributed architecture with global load balancing

Worked Example: Cost Calculation for a Cloud VM A startup deploys a VM with:

  • 2 vCPUs, 4GB RAM, 100GB SSD.
  • Google Cloud pricing: $0.05/hour for vCPU, $0.01/GB RAM, $0.10/GB SSD. Question: Monthly cost (730 hours)? Answer:
  • vCPU: 2 × $0.05 × 730 = $73
  • RAM: 4 × $0.01 × 730 = $29.20
  • SSD: 100 × $0.10 = $10 Total = $73 + $29.20 + $10 = $112.20/month

In the Real World

  1. Khalti’s Payment Processing

    • Uses server virtualization to isolate transaction VMs from customer-facing VMs.
    • Storage virtualization pools SSDs for high-speed fraud detection.
  2. Daraz’s Order Fulfillment

    • Network virtualization (SDN) dynamically routes traffic during sales (e.g., Dashain).
    • Container orchestration (Kubernetes) manages microservices, but underlying VMs use server virtualization.
  3. NTC’s Network Monitoring

    • SDN controllers analyze traffic patterns to detect DDoS attacks.
    • VLANs segment internal and customer networks.

Exam Tip

  1. Definitions: Know the difference between Type 1 vs. Type 2 hypervisors, SAN vs. NAS, and VLAN vs. VPN.
  2. Diagrams: Be ready to draw:
    • Hypervisor-VM relationships.
    • SAN/NAS architectures.
    • SDN control/data planes.
  3. Calculations: Practice:
    • VM resource allocation.
    • Storage cost comparisons (HDD vs. SSD).
    • VLAN/IP subnetting.
  4. Applications: Link concepts to Nepali companies (eSewa, Ncell, Daraz) or global platforms (AWS, Google Cloud).
  5. Shortcomings: Discuss limitations like:
    • Virtualization overhead (hypervisor latency).
    • Storage bottlenecks in SANs.
    • SDN complexity in legacy networks.

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

Discussion

Loading…