Introduction to Computer Science

Chapter 11
Networks, Internet, Web, Cloud, and Distributed Computing

Bachelors Program in Computer Science Engineering
Introduction to Computer Science   •   Post Graduate

Networks, Internet, Web, Cloud, and Distributed Computing

Introduction and Context

Computer systems increasingly operate as connected systems rather than isolated machines. A modern application may execute partly on a mobile device, partly in a browser, partly in a cloud data centre, and partly on edge devices distributed across several geographic regions. Understanding this environment requires more than memorising networking protocols. It requires an integrated view of communication, naming, routing, computation, storage, security, reliability, and governance.

A computer network is an interconnected set of computing and communication devices that exchange data according to agreed rules called protocols. The Internet is a global interconnection of independently operated networks. The World Wide Web is an information and application system built primarily on the Internet using technologies such as URLs, HTTP, HTML, CSS, and JavaScript. Cloud computing provides configurable computing resources as services, while distributed computing studies systems whose components cooperate across multiple machines and appear, to some extent, as one system.

These ideas are related but not interchangeable. The Internet is infrastructure; the Web is an important application platform on that infrastructure. Cloud computing is a service and operational model, whereas distributed computing is a systems paradigm. A cloud service is usually distributed, but not every distributed system is a cloud service.

Learning Objectives

After completing this chapter, students should be able to:

  1. Explain network architectures, communication models, addressing, naming, routing, and protocol layering.
  2. Distinguish the Internet, the Web, cloud computing, and distributed computing.
  3. Analyse latency, throughput, reliability, scalability, and consistency in connected systems.
  4. Describe important Internet and Web protocols and their security mechanisms.
  5. Compare cloud service and deployment models and evaluate architectural trade-offs.
  6. Explain distributed-system challenges, including partial failure, replication, coordination, and consistency.
  7. Assess practical, ethical, regulatory, and professional implications of networked computing.

1. Network Foundations

1.1 Components and classifications

A network contains hosts or end systems, such as laptops, servers, sensors, and phones. Intermediate devices include switches, which forward frames within a local network, and routers, which forward packets between networks. Wireless access points connect radio-based devices to a wired or wireless local network. Transmission media may be copper, fibre-optic cable, radio, or satellite links.

Networks may be classified by scope:

TypeTypical scopeExample
PANPersonal spaceBluetooth devices
LANBuilding or campusEthernet network
MANCity or metropolitan areaMunicipal fibre
WANLarge geographic areaEnterprise or carrier network
InternetInterconnected global networksPublic Internet

A network may also be described by topology. In a star topology, devices connect to a central switch; in a mesh, multiple paths exist between nodes; in a bus, devices share a common medium. Contemporary enterprise networks predominantly use switched star-like structures, while Internet backbones use partially meshed topologies for resilience.

1.2 Packet switching and circuit switching

In packet switching, a message is divided into packets. Each packet contains payload data and control information such as source and destination addresses. Packets share links with traffic from other applications. This statistical sharing is efficient for bursty computer communication but introduces variable delay and possible loss.

Circuit switching reserves a communication path and capacity for a session. Traditional telephone networks used circuit switching extensively. Packet switching is more flexible for modern data services, although real-time applications may use reservations, quality-of-service mechanisms, or redundant paths to control variability.

1.3 Performance measures

Important network measures include:

  • Bandwidth: maximum data-transfer capacity, commonly measured in bits per second.
  • Throughput: actual achieved data rate.
  • Latency: time required for data to travel and be processed.
  • Jitter: variation in packet delay.
  • Loss rate: proportion of packets that do not arrive successfully.
  • Availability: proportion of time a service is operational.

For a message of size S bits transmitted over a link with rate R bits per second, transmission delay is:

dtrans = S / R

Here, dtrans is in seconds, S is in bits, and R is in bits per second. This formula assumes that the entire message is transmitted on one link and excludes propagation, queuing, and processing delays.

For a path containing links i = 1 to n, a useful decomposition is:

dtotal = ∑(dprop,i + dtrans,i + dqueue,i + dproc,i)

Propagation delay depends on distance and signal velocity; queuing delay depends on traffic; processing delay depends on device and protocol operations. These components must not be confused. Increasing link bandwidth reduces transmission time for a fixed message but does not necessarily reduce geographic propagation delay.

Worked example. A 12-megabit file is sent over a 6-megabit-per-second link. Ignoring other delays:

dtrans = 12 Mb ÷ 6 Mb/s = 2 s

If the link is upgraded to 60 megabits per second, the transmission time becomes 0.2 seconds. The improvement is tenfold, but the total application delay may be less improved if propagation, server processing, or queueing dominates.

2. Layered Communication Models

Networking is organised into layers so that each layer provides services to the layer above and hides implementation details below. Layering supports modularity, interoperability, independent evolution, and fault isolation.

The seven-layer OSI reference model consists of physical, data link, network, transport, session, presentation, and application layers. The practical Internet protocol suite is commonly represented more compactly:

Internet layerMain responsibilityExamples
LinkLocal delivery and framingEthernet, Wi-Fi
InternetInternetwork addressing and routingIP, ICMP
TransportProcess-to-process deliveryTCP, UDP, QUIC
ApplicationApplication-specific communicationHTTP, DNS, SMTP

When an application sends data, each layer may add a header. This process is called encapsulation. At the destination, headers are removed through decapsulation. A protocol specifies message formats, sequencing, error handling, and interpretation rules.

2.1 Addressing and naming

An IP address identifies a network interface within an addressing system. IPv4 uses 32-bit addresses, while IPv6 uses 128-bit addresses and provides a vastly larger address space. IP addresses support routing, but users generally use names. The Domain Name System (DNS) maps hierarchical names such as example.edu to resource records, including IP addresses.

DNS is distributed and hierarchical. Root servers direct queries to top-level domain servers, which direct them to authoritative servers. Caching reduces delay and query load, but cached information may remain temporarily stale according to its time-to-live value.

A Uniform Resource Locator (URL) identifies a Web resource through components such as scheme, host, port, path, and query. A URL is a locator; a URI is the broader identifier concept.

2.2 Transport protocols

TCP provides a reliable, ordered byte stream using sequence numbers, acknowledgements, retransmission, flow control, and congestion control. It is appropriate when applications require reliable delivery and can tolerate connection-management overhead.

UDP provides a connectionless datagram service with minimal protocol overhead. It does not itself guarantee delivery, order, or duplicate suppression. Applications such as DNS, streaming, online games, and real-time media may use UDP when application-level control or low latency is important.

QUIC is a modern transport protocol implemented over UDP. It supports encrypted connections, multiplexed streams, and reduced connection establishment overhead. HTTP/3 uses QUIC.

3. The Internet

The Internet is a network of networks. Autonomous systems, operated by Internet service providers, universities, enterprises, and content providers, exchange routes using inter-domain routing. Within an organisation, an interior routing protocol may calculate paths; between autonomous systems, Border Gateway Protocol (BGP) supports policy-based route exchange.

The Internet is not centrally owned or operated. Its interoperability depends on open standards, voluntary coordination, commercial agreements, technical communities, and regulatory frameworks. The end-to-end principle historically placed application intelligence at network endpoints, although modern networks also employ firewalls, content delivery networks, middleboxes, and traffic inspection.

Security architecture

Security objectives are commonly expressed through the CIA triad:

  • Confidentiality: preventing unauthorised disclosure.
  • Integrity: preventing unauthorised alteration.
  • Availability: ensuring authorised access when needed.

TLS protects application communication against eavesdropping and tampering when correctly configured. HTTPS is HTTP carried over TLS. Public-key cryptography supports authentication and key establishment; symmetric cryptography usually protects bulk data because it is computationally efficient. Certificates bind public keys to identities through a certificate authority system, although trust depends on correct validation and governance.

Security is not achieved by encryption alone. Systems also require authentication, authorisation, secure configuration, patching, logging, rate limiting, backups, vulnerability management, and incident response. Common threats include phishing, malware, denial-of-service attacks, credential theft, routing attacks, insecure APIs, and supply-chain compromise.

4. The World Wide Web

The Web uses a client-server model in which a browser or other client requests resources from a Web server. HTTP defines request and response semantics. A request may specify a method such as GET, POST, PUT, or DELETE. Responses include a status code, headers, and an optional body. Status-code classes include successful 2xx responses, redirection 3xx responses, client errors 4xx, and server errors 5xx.

HTML expresses document structure, CSS controls presentation, and JavaScript supports dynamic behaviour. Modern Web applications often use APIs, asynchronous requests, browser storage, authentication tokens, and server-side services. REST is a style of API design based on resources and representations; it is not identical to HTTP, nor is every HTTP API fully RESTful.

Web performance depends on DNS lookup, connection establishment, TLS negotiation, server processing, data transfer, rendering, and client-side execution. Caching and content delivery networks place copies of content closer to users. However, caching must respect freshness, privacy, authorisation, and invalidation requirements.

Accessibility is a design obligation. Semantic HTML, keyboard navigation, sufficient contrast, captions, meaningful labels, and compatibility with assistive technologies improve access. Privacy requires data minimisation, purpose limitation, informed consent where applicable, retention controls, and protection against tracking abuse.

5. Cloud Computing

Cloud computing is a model for on-demand network access to a shared pool of configurable resources that can be rapidly provisioned and released with limited direct interaction by the consumer. Its characteristic properties include on-demand self-service, broad network access, resource pooling, rapid elasticity, and measured service.

5.1 Service models

ModelProvider managesCustomer mainly managesExamples of responsibility
IaaSPhysical infrastructure and virtualisationOperating system, applications, dataVirtual machines and networks
PaaSInfrastructure and runtime platformApplication code and dataManaged application platform
SaaSMost technology stackConfiguration, users, data useWeb-based business software

The shared-responsibility model means that the provider secures some layers while the customer remains responsible for other layers. The precise boundary varies by service. Misunderstanding this boundary is a frequent cause of exposed storage, weak identities, and insecure deployments.

5.2 Deployment models and architecture

Public clouds serve multiple customers on provider infrastructure. Private clouds are dedicated to one organisation. Hybrid clouds combine environments, while multi-cloud architectures use services from more than one provider. Containers package applications and dependencies, while orchestration platforms schedule containers, manage service discovery, and support rolling deployment. Virtual machines provide stronger isolation at the cost of greater resource overhead than many containers.

Cloud-native design commonly uses stateless services, automated infrastructure, observability, managed databases, queues, autoscaling, and infrastructure as code. Yet migration to the cloud is not automatically beneficial. Costs may rise through excessive data transfer, idle resources, duplicated services, or vendor-specific dependencies.

A simplified availability model for independent components in series is:

Asystem = ∏(Ai), i = 1 to n

Ai is the availability of component i, and the product applies only when component failures are statistically independent and all components are required for service. For two required components with availability 0.99 each, Asystem = 0.99 × 0.99 = 0.9801, or 98.01%. Real systems may violate independence because a shared power supply, region, identity service, or software defect can create correlated failure.

For redundant components in parallel, where service succeeds if at least one independent component works:

Aparallel = 1 − ∏(1 − Ai)

Two independent components each with availability 0.99 yield 1 − (0.01 × 0.01) = 0.9999, or 99.99%. Redundancy does not remove common-mode failures and introduces operational complexity.

6. Distributed Computing

A distributed system consists of multiple autonomous computing components that communicate through a network and coordinate their actions. Its defining difficulty is that communication is not instantaneous and components may fail independently. A process cannot always distinguish a slow peer from a failed peer.

6.1 Core challenges

  1. Partial failure: some nodes or links fail while others continue.
  2. Concurrency: operations occur simultaneously and may conflict.
  3. Clock uncertainty: physical clocks drift and network time is imperfect.
  4. Ordering: systems may need causal or total ordering of events.
  5. Consistency: replicas may temporarily or permanently disagree.
  6. Scalability: adding resources should increase capacity without disproportionate coordination cost.
  7. Observability: a failure may span several services and be difficult to reproduce.

A distributed computation cannot assume a single global memory or perfectly shared clock. Logical clocks, vector clocks, leases, consensus protocols, idempotent operations, retries, and durable logs are techniques for managing these limitations.

6.2 Replication and consistency

Replication stores multiple copies of data or services to improve availability, latency, and fault tolerance. Strong consistency aims to make operations appear as though they occurred in a single, well-defined order. Eventual consistency permits temporary differences but requires replicas to converge if updates stop. Between these extremes are session guarantees, causal consistency, bounded staleness, and application-specific models.

The CAP theorem is often simplified incorrectly. In the presence of a network partition, a distributed data system cannot simultaneously guarantee both strong consistency and availability for all requests. This does not mean that systems must always choose only two of consistency, availability, and partition tolerance; network partitions are a possibility, so the practical design choice concerns behaviour during partitions.

A system may choose to reject some operations during a partition to preserve consistency, or accept operations and reconcile them later to preserve availability. The appropriate choice depends on the domain. Duplicate financial transfers require stronger coordination than social-media reactions.

6.3 Consensus and coordination

Consensus protocols enable non-faulty nodes to agree on a value despite certain failures. Raft and Paxos are important families of consensus algorithms. They generally require a majority quorum for progress and assume specified communication and failure models. Consensus is expensive relative to local computation because it requires communication, durable state, and careful leader or quorum management.

Distributed transactions attempt to preserve atomicity across services or databases. Two-phase commit can coordinate participants but may block if the coordinator fails and can reduce availability. Modern architectures often prefer local transactions plus asynchronous messaging, sagas, compensating actions, and idempotent consumers.

7. Integrated Architecture

Layered cloud and distributed application architecture User deviceBrowser / mobile app InternetDNS, IP, TLS, routing Edge / CDNCache and protection API gatewayAuthentication, routing ServicesStateless application logic Data and queuesReplicas, events, backups Observability, security, governance, automationCross-cutting controls
Layered cloud and distributed application architecture
Figure: Layered cloud and distributed application architecture

Figure: A simplified Internet-facing distributed cloud application and its cross-cutting controls.

The figure illustrates that an application is not merely a collection of servers. Identity, encryption, monitoring, logging, deployment automation, policy enforcement, backup, and disaster recovery operate across layers. A technically functional design can still be unsafe or uneconomic if these cross-cutting concerns are neglected.

8. Applied Case: Illustrative University Learning Platform

Background

Consider a fictional university that operates a learning platform used by 40,000 students. The platform serves course pages, video lectures, assessments, discussion forums, and grade records. Examination periods create traffic many times higher than ordinary weeks.

Problem

Users report slow page loads during examinations. A single database server is a performance bottleneck, and an outage could prevent submission of time-limited assessments. The university must improve resilience without compromising privacy or academic integrity.

Analysis

Measurement shows that static files consume substantial bandwidth, while grade updates require transactional consistency. Video delivery is read-heavy and geographically distributed. Assessment submission requires authentication, authorisation, integrity protection, and durable storage. Treating all workloads identically would either waste resources or weaken correctness.

Approach and solution

The university places static assets and video segments behind a content delivery network. An autoscaled application tier handles Web and API requests. A database primary processes grade changes, while read replicas serve non-critical course browsing. A queue absorbs non-urgent notifications. Assessment submissions use idempotency keys so that a retry does not create duplicate attempts. Backups are encrypted and regularly restored in a test environment.

The design uses TLS, multi-factor authentication for staff, role-based access control, audit logs, vulnerability scanning, and data-retention policies. A disaster-recovery plan defines recovery time objective (RTO) and recovery point objective (RPO). RTO is the maximum acceptable time to restore service; RPO is the maximum acceptable amount of data loss measured in time.

Outcome

In this illustrative case, caching reduces origin traffic, autoscaling handles peak demand, and separating read-heavy from write-critical workloads improves responsiveness. The platform remains deliberately conservative for grades: eventual consistency is acceptable for a course catalogue but not for final marks. Regular load tests and restore exercises reveal operational weaknesses before examination periods.

Learning points

The case demonstrates workload classification, layered architecture, selective consistency, capacity planning, observability, and governance. Cloud migration alone is not the solution; the solution is a measured architecture aligned with user needs, risk, and institutional obligations.

9. Professional, Ethical, and Regulatory Considerations

Networked systems process personal, financial, educational, health, and behavioural data. Engineers must consider lawful purpose, minimisation, retention, access control, transparency, and the rights of affected people. Applicable obligations vary by jurisdiction and sector; examples include data-protection legislation, breach-notification requirements, accessibility rules, copyright law, and sector-specific security controls.

Digital systems can exclude users through poor accessibility, unaffordable connectivity, language assumptions, or algorithmic bias. Network neutrality, platform concentration, surveillance, content moderation, and cross-border data transfers are socio-technical issues rather than purely technical optimisation problems.

Artificial intelligence services intensify these concerns. AI applications may send prompts and personal data to external providers, depend on distributed GPU infrastructure, and produce outputs whose provenance is uncertain. Good practice includes data classification, provider assessment, human oversight, auditability, model monitoring, rate controls, and explicit treatment of failure and uncertainty.

10. Best Practices and Contemporary Directions

Effective networked and distributed systems generally follow these practices:

  • define reliability, latency, privacy, and recovery requirements before selecting technology;
  • use least privilege, strong identity, secure defaults, encryption, and timely patching;
  • design for failure through redundancy, timeouts, retries with bounded backoff, circuit breakers, and graceful degradation;
  • make operations observable through metrics, logs, traces, health checks, and meaningful alerts;
  • test capacity, security, disaster recovery, and dependency failure;
  • control cloud cost through tagging, budgets, rightsizing, lifecycle policies, and architecture review;
  • document data ownership, retention, consistency expectations, and incident responsibilities.

Contemporary developments include edge computing, serverless functions, software-defined networking, 5G and private cellular networks, confidential computing, zero-trust architectures, platform engineering, service meshes, and federated learning. Each addresses particular constraints but introduces new complexity. Edge computing can reduce latency but complicates deployment and trust. Serverless can provide elasticity but may create cold-start, observability, and vendor-dependency concerns. Zero trust improves identity-centric security but requires disciplined asset and policy management.

Chapter Summary

Networks provide the communication foundation for modern computing. Packet switching, addressing, routing, protocol layering, and transport services explain how data moves between processes. The Internet connects independently operated networks, while DNS supplies scalable naming and HTTP supports the Web. Cloud computing delivers elastic resources through IaaS, PaaS, and SaaS models, but responsibility for security, cost, and governance remains shared. Distributed computing coordinates autonomous components in the presence of latency, concurrency, partial failure, and uncertain information. Replication, consistency models, consensus, queues, caching, and observability are tools for managing these challenges. Sound architecture balances performance, availability, correctness, security, privacy, accessibility, cost, and regulatory obligations rather than maximising a single metric.

Key Terms

Network: Interconnected devices that exchange data using protocols.

Protocol: Agreed rules governing communication.

Packet switching: Sending data in separately routed packets sharing network capacity.

Bandwidth: Maximum data-transfer capacity of a link.

Latency: Time taken for data or a request to travel and be processed.

Throughput: Actual rate of successful data transfer.

Router: Device that forwards packets between networks.

Protocol layering: Division of communication functions into cooperating layers.

IP address: Numerical address used for network-layer delivery.

DNS: Hierarchical distributed system that maps names to resource records.

HTTP: Application protocol for Web requests and responses.

TLS: Cryptographic protocol providing confidentiality and integrity for connections.

Cloud computing: On-demand provision of shared configurable computing resources.

IaaS: Cloud model providing infrastructure resources such as virtual machines.

PaaS: Cloud model providing a managed application platform.

Distributed system: Multiple networked components coordinating as a computational system.

Replication: Maintaining multiple copies of data or services.

Consistency: Rules describing how updates become visible across replicas.

Consensus: Agreement among distributed processes despite specified failures.

Observability: Ability to infer internal system state from outputs such as logs, metrics, and traces.

Review Questions

Short Answer Questions

  1. Distinguish bandwidth, throughput, and latency.
  2. What is the purpose of protocol layering?
  3. Explain the role of DNS in Internet communication.
  4. Differentiate IaaS, PaaS, and SaaS.
  5. What is a partial failure in a distributed system?

Long Answer Questions

  1. Explain packet switching, routing, transport protocols, and application protocols as parts of an Internet communication process.
  2. Discuss cloud deployment and service models, including the shared-responsibility model.
  3. Explain replication and consistency, and analyse why different applications require different consistency guarantees.
  4. Describe the major security controls required for a Web-based distributed application.
  5. Evaluate the benefits and limitations of cloud-native architectures.

Analytical / Application Questions

  1. A Web service has two required independent components, each with availability 0.99. Calculate system availability and explain why the result may be optimistic in a real deployment.
  2. Design an architecture for an online examination platform. Identify which data can be eventually consistent and which operations require strong consistency.
  3. A video service experiences high latency for users on another continent. Analyse possible causes and propose improvements involving caching, routing, transport, and application design.

Multiple Choice Questions with Answers

Question 1

Which component primarily forwards packets between different IP networks?

A. Router

B. Keyboard

C. Compiler

D. Database index

Correct Answer: A. Router

Question 2

A 20-megabit file is transmitted over a 10-megabit-per-second link, ignoring all other delays. What is the transmission delay?

A. 0.2 seconds

B. 2 seconds

C. 10 seconds

D. 200 seconds

Correct Answer: B. 2 seconds

Question 3

Which protocol maps hierarchical domain names to resource records?

A. HTTP

B. DNS

C. TCP

D. TLS

Correct Answer: B. DNS

Question 4

Which cloud model gives the customer the greatest responsibility for managing the operating system?

A. SaaS

B. PaaS

C. IaaS

D. Managed DNS

Correct Answer: C. IaaS

Question 5

What does TLS primarily provide for a correctly configured HTTPS connection?

A. Guaranteed zero latency

B. Confidentiality and integrity

C. Unlimited bandwidth

D. Automatic data backup

Correct Answer: B. Confidentiality and integrity

Question 6

Which property is characteristic of a distributed system?

A. All components share one perfectly accurate clock

B. Components may experience partial failure

C. All computation occurs on one processor

D. Network delay is always zero

Correct Answer: B. Components may experience partial failure

Question 7

For two independent required components with availability 0.99 each, what is the system availability?

A. 0.0199

B. 0.9801

C. 0.99

D. 1.98

Correct Answer: B. 0.9801

Question 8

During a network partition, the CAP theorem concerns the practical trade-off between which two properties, assuming partition tolerance?

A. Consistency and availability

B. Bandwidth and encryption

C. Latency and naming

D. Caching and compression

Correct Answer: A. Consistency and availability

Question 9

Which technique prevents a retried request from creating duplicate effects when the same operation is submitted again?

A. Idempotency design

B. Increasing screen brightness

C. Removing authentication

D. Disabling logging

Correct Answer: A. Idempotency design

Question 10

Which practice most directly helps diagnose a failure spanning several distributed services?

A. Observability using metrics, logs, and traces

B. Removing all monitoring

C. Using only larger displays

D. Disabling backups

Correct Answer: A. Observability using metrics, logs, and traces

Introduction to Computer Science
Chapter 11 of 11