Skip to main content
CBE Nexus · Undergraduate Computer Science

Chapter 14: Cloud Computing and Distributed Systems

Undergraduate cloud computing and distributed systems notes on virtualisation, containers, service models, distributed architectures, consistency, replication, fault tolerance, scalability, serverless computing and observability.

Back to Computer Science course guide

Chapter overview and learning outcomes

This chapter develops the theory and practical foundations of cloud computing and distributed systems, linking core concepts to the design, evaluation and responsible operation of computing systems.

1. Cloud computing concepts and characteristics

Cloud computing provides on-demand access to configurable computing resources such as servers, storage, networks, platforms and applications. Common characteristics include resource pooling, broad network access, rapid elasticity and measured service. Cloud adoption changes procurement and operations but does not remove responsibility for architecture, security, cost control or data governance. Workloads should be assessed for latency, compliance, availability, portability and dependence on provider-specific services.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

2. Cloud service and deployment models

Infrastructure as a Service supplies virtualised compute, storage and networking; Platform as a Service provides managed application runtimes and development capabilities; Software as a Service delivers complete applications. Deployment models include public, private, hybrid and community cloud arrangements. Responsibility is shared between provider and customer, with the boundary varying by service. Teams must understand who manages identity, operating systems, application code, data, network configuration and physical infrastructure.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

3. Virtualisation, containers and orchestration

Virtual machines use a hypervisor to provide isolated guest environments with virtual hardware. Containers package applications and dependencies while sharing the host operating-system kernel, typically offering lighter deployment units. Container images should be minimal, scanned and reproducible. Orchestrators schedule workloads, manage service discovery, health checks, scaling and rolling updates. Isolation is not absolute: kernel vulnerabilities, misconfiguration and excessive privileges can compromise container environments.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

4. Distributed systems foundations

A distributed system consists of independent computers that communicate over a network and coordinate to provide a service. Nodes may fail independently; messages may be delayed, lost, duplicated or reordered; clocks may differ. Partial failure is a defining challenge because one component can be unavailable while others continue. Design should make assumptions explicit and define timeouts, retry policies, idempotency, service boundaries and failure behaviour.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

5. Communication, APIs and messaging

Distributed components communicate through synchronous request-response APIs or asynchronous messaging. Synchronous calls are straightforward but can couple availability and latency across services. Queues and event streams decouple producers and consumers, absorb bursts and support replay, but introduce delivery and ordering concerns. Message handlers should be idempotent where retries are possible. Define schemas, version compatibility, dead-letter handling and observability for every communication path.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

6. Consistency, replication and consensus

Replication stores copies of data or services across nodes to improve availability, resilience or read capacity. Synchronous replication may increase latency; asynchronous replication can create lag and stale reads. Consistency models describe what clients may observe, from strong consistency to eventual consistency. Consensus protocols coordinate agreement despite certain failures under stated assumptions. No design eliminates the trade-offs imposed by network partitions, failure models and latency requirements.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

7. Transactions and data partitioning

Distributed transactions coordinate updates across multiple resources. Two-phase commit can provide atomic coordination but may block under certain failures and adds operational complexity. Saga patterns divide a long transaction into local transactions with compensating actions. Partitioning or sharding distributes data across nodes to scale storage and throughput, but complicates joins, transactions and rebalancing. Choose partition keys to avoid hotspots and consider how queries cross partitions.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

8. Scalability, elasticity and performance

Vertical scaling increases resources on a machine; horizontal scaling adds instances. Stateless services are often easier to scale horizontally, while stateful services require deliberate session, storage and coordination strategies. Load balancing distributes requests. Caching reduces repeated work but requires invalidation and freshness policies. Capacity planning uses realistic workload profiles, latency percentiles, queue depth and saturation measures rather than average utilisation alone.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

9. Fault tolerance, availability and disaster recovery

Fault tolerance aims to continue useful service despite component failures. Redundancy, health checks, circuit breakers, bulkheads, retries with backoff and graceful degradation can reduce cascading failures. Availability objectives should be defined with service-level indicators and objectives. Recovery time objective (RTO) is the target time to restore service; recovery point objective (RPO) is the acceptable data-loss window. Backups and failover plans must be regularly tested.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

10. Serverless computing, storage and cloud-native design

Serverless platforms abstract server provisioning and execute functions or managed services in response to events. They can reduce operational overhead but introduce cold starts, execution limits, provider coupling and event-delivery considerations. Cloud storage options include object, block and file storage, each suited to different access patterns. Cloud-native systems often use automation, immutable deployments, infrastructure as code and managed observability. Cost and security controls must be designed from the start.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

11. Cloud security, cost governance and observability

Cloud security requires identity governance, least privilege, encryption, secret management, network segmentation, secure defaults, logging and continuous configuration review. Shared responsibility must be understood for each service. Cost governance uses budgets, tagging, usage reports, rightsizing and lifecycle policies. Observability combines logs, metrics and traces to explain system behaviour. Incident response must include provider dependencies, data residency, backup access and a tested exit or migration strategy.

Applied study: Work through a realistic scenario from the domain. Identify the assumptions, constraints, relevant stakeholders and expected outcome. Explain the reasoning behind a proposed method, compare it with at least one alternative, and discuss reliability, security, performance, ethical implications and limitations.

Learning activity: Prepare a labelled model or worked example, define how you would test it, and write a short reflection on what evidence would change your conclusion.

Figure 1. Cloud service models
IaaS: virtual infrastructure→PaaS: managed application platform→SaaS: complete application

Conceptual diagram for learning and revision.

Figure 2. Distributed request path
Client sends request→Load balancer selects service→Service calls data or dependencies→Response and telemetry returned

Conceptual diagram for learning and revision.

Figure 3. Resilience pattern
Detect dependency failure→Open circuit and limit retries→Serve fallback or reject safely→Recover and close circuit

Conceptual diagram for learning and revision.

Practical laboratory or project activity

  1. Choose a bounded problem relevant to this chapter and state its purpose.
  2. Identify inputs, outputs, constraints, assumptions and potential failure cases.
  3. Develop a small model, prototype, experiment or worked analysis.
  4. Use appropriate tools and authorised datasets or test environments.
  5. Test normal, boundary and failure conditions; record reproducible observations.
  6. Write a report explaining method, evidence, limitations and recommendations.

Follow institutional rules, protect private information and obtain permission before testing systems or collecting data.

Worked reasoning and self-assessment

Start by translating the question into a precise problem statement. Define variables and assumptions before calculating or implementing. Work through a small example manually, then verify it with an appropriate tool. Explain why the selected approach is suitable, identify an alternative, and discuss its trade-offs. For empirical claims, describe the data and method needed to support them; for system claims, specify observable tests and expected outcomes.

Examination and revision questions

Answer using precise definitions, diagrams, calculations and examples where appropriate.

  1. Define cloud computing.

    Show answer guidance

    On-demand network access to configurable shared computing resources that can be provisioned and released.

  2. Differentiate IaaS, PaaS and SaaS.

    Show answer guidance

    Infrastructure resources, managed application platforms and complete software applications respectively.

  3. What is a container?

    Show answer guidance

    A packaged application environment that isolates processes while sharing the host OS kernel.

  4. What is a distributed system?

    Show answer guidance

    Independent networked computers coordinating to provide a service or computation.

  5. What is partial failure?

    Show answer guidance

    A condition where some components fail or become unreachable while others continue operating.

  6. Differentiate synchronous and asynchronous communication.

    Show answer guidance

    Synchronous calls wait for a response; asynchronous messaging decouples sender and receiver in time.

  7. What is eventual consistency?

    Show answer guidance

    A model in which replicas may temporarily differ but converge if updates stop and propagation succeeds.

  8. Why make message handlers idempotent?

    Show answer guidance

    Repeated delivery or retries then do not cause repeated unintended effects.

  9. What is sharding?

    Show answer guidance

    Partitioning a dataset across multiple nodes.

  10. Define horizontal scaling.

    Show answer guidance

    Increasing capacity by adding more instances or machines.

  11. What is a circuit breaker pattern?

    Show answer guidance

    A mechanism that stops repeated calls to a failing dependency for a period to limit cascading failure.

  12. Differentiate RTO and RPO.

    Show answer guidance

    RTO is the target restoration time; RPO is the acceptable data-loss interval.

  13. What is serverless computing?

    Show answer guidance

    A model where a provider manages infrastructure and runs workloads on demand, often event-triggered.

  14. Name three observability signals.

    Show answer guidance

    Logs, metrics and distributed traces.

  15. Why monitor cloud costs?

    Show answer guidance

    To identify waste, enforce budgets, understand usage and align resource spending with value.

Revision checklist

Further study and academic references

Consult current university textbooks, peer-reviewed conference and journal papers, official standards and authoritative technical documentation. Verify versions and publication details before citing sources. Use the citation style required by your institution, cite data and software as well as written sources, and distinguish published evidence from your own analysis. Do not invent references, measurements or experimental outcomes.

Academic and responsible-use note: These notes support undergraduate study and do not replace your institution's course outline, laboratory rules or supervisor guidance. Respect privacy, intellectual property, licences, research ethics and applicable law.

Return to the full Computer Science course guide

Official Education References

Use these official organisations for curriculum guidance, examinations and further learning information.