Skip to main content
Software Architectures

Cloud Computing

Published: 2026-08-21
Level: postgraduate
Audience: Postgraduate students in software engineering and architecture

Prerequisite Knowledge

This lecture builds on the following concepts from earlier lectures. If any feel unfamiliar, review the linked notes before proceeding.

Previously Covered in This Subject

  • Quality attributes and their trade-offs — covered in Lectures 1 and 4
  • Availability — covered in Lecture 4
  • Interoperability — covered in Lecture 4

Everything before this point in the course built concepts and theory — quality attributes, tactics, architectural styles, evaluation methods. From here on, the material turns to modern technology, and cloud computing is the first stop. That ordering is deliberate: the cloud is not a new subject bolted onto architecture; it is the place where every trade-off discussion so far gets a real, billable, global-scale stage.

Almost everyone has already used the cloud in personal or work life — webmail, shared documents, video calls, streaming. The real job of this lecture is to name what you have been using: the service models (IaaS, PaaS, SaaS), the deployment models (private, public, community, hybrid), and the economics that make the whole thing possible. Once you can name a thing, you can reason about it, design with it, and answer exam questions about it.

The lecture travels through five connected stops: what the cloud is and which qualities it trades off, where it can be deployed, why scale makes it cheap, how virtual machines and distributed file systems actually work under the hood, and how service-oriented architecture ties it all together for the enterprise.

12.1 Cloud Foundations: Ubiquity, Service Models, and Trade-Offs

12.1.1 What Makes a System "Cloud"

The cloud is everywhere. Asking who has never used it is like asking who does not breathe — almost nobody can claim that.

Calls made from a transatlantic flight, files opened on any device, mail reachable from anywhere: all of this is the cloud operating in the background. The network may be expensive for some, and some people choose not to use it. Still, it is available — the way courier advertisements promise delivery to the Himalayas or onto a ship at sea. Whether the courier actually skates across water matters less than the promise: modern networks reach practically everywhere. That property has a name — ubiquitous access: the service is reachable over the standard network from any device, any place.

A working definition, before the formal one: the cloud is like a restaurant that cooks against order. You ask for what you want, it is prepared and delivered, and you can place the order from wherever you are. You never buy the kitchen; you buy the meal. That single picture explains on-demand self-service, which is the first pillar of cloud thinking — you help yourself to resources without negotiating with a salesperson or waiting for a delivery truck.

Formally, standards bodies such as NIST describe the cloud through a small set of essential characteristics, and every one of them maps onto something you have already experienced:

Characteristic Plain meaning Everyday face
On-demand self-service Provision resources yourself, automatically Filling a web panel, clicking a button
Ubiquitous network access Reachable over standard networks from any device Mail on phone, laptop, and hotel PC
Resource pooling One big shared pool serves many consumers The condominium gym (next subsection)
Location independence You neither know nor control where the machine sits Your photos are "in Google Photos", not "in building 7"
Rapid elasticity Capacity grows and shrinks with demand, often automatically A video that streams fine on match day
Measured service Usage is metered; you pay for what you consumed The electricity bill model, not the furniture model
Multi-tenancy One application instance serves many organizations safely Salesforce (below)

Real-world: everyday services such as webmail, file sharing, and video calls are cloud services consumed without any thought about the machines behind them. Naming them correctly is the first skill this lecture builds.

12.1.2 Resource Pooling and Elasticity

Resource pooling means many users share one large pool of equipment. The best mental picture is a modern condominium complex. It has one common kitchen where you pay and eat, one common guest reception room, a clubhouse, a gym, and a games room shared by the whole building. Nobody builds a private gym inside a small flat; the building pools the facility and everyone benefits. The analogy holds because the economics match: an expensive facility sitting idle 23 hours a day in every flat becomes cheap and fully used when pooled. Where the analogy breaks: a gym cannot be split into two gyms at peak time, but a computing pool can literally grow new machines.

Computing did exactly this. Earlier, companies wrote software to soak up the idle power of standalone workstations inside one office. Today the idle capacity of many machines is pooled into one large data center — or several data centers — and everybody draws from the pool. Textbook measurements back the payoff: a traditional data center runs servers at roughly 10–15% utilization because each application gets its own box, while virtualized pools push that figure far higher by co-locating workloads whose peaks arrive at different hours.

Elasticity is the pool's ability to grow and shrink with your need. There are several forms, but the ultimate form looks like this:

  • Your virtual machine runs with 4 GB of RAM. Once a week it needs 12 GB, so the allocation jumps to 12 GB while you use it and falls back to 4 GB afterwards.
  • A file system sitting at a normal 20 GB suddenly demands 5 TB. It expands to serve the need, then shrinks back towards its normal size once the burst passes.

Usage is measured throughout, and you pay only for what you consumed — the measured service pillar again. Notice what elasticity removes: the fear of buying capacity "just in case". In the old world, guessing too low meant your site collapsed on launch day, and guessing too high meant paying for idle hardware forever. Elasticity converts both failure modes into a metered bill.

12.1.3 Multi-Tenancy and Everything as a Service

Multi-tenancy is one application maintained as one, serving many user organizations at the same time. Salesforce is the classic case: the company maintains a single application, provisions it for many customers, and the whole world logs into that same application. One codebase, many tenants. Each tenant's data and access rights stay logically separate even though the running software is shared. The economic punchline arrives in section 12.3: one crack team maintains one copy, and thousands of tenants share the cost.

This idea scales up into "everything as code" — more precisely, everything as a service. The ladder has three rungs, and each rung is defined by who the consumer is and what the consumer still manages:

  • Infrastructure as a Service (IaaS). Buying infrastructure once meant raising a purchase order, comparing vendors, and fixing a delivery date. Now you fill a panel, click a button, and the machine exists. Some providers generate it in ten minutes, some in five, and offline providers promise it within 24 hours. "Infrastructure" here means storage, processing power, networking, and RAM. The consumer is a developer or administrator who still manages the operating system and everything above it.
  • Platform as a Service (PaaS). One level up: the programming language, the development tools, and the operating system are offered ready-made, so you bring only your application. The consumer is a developer who no longer patches operating systems or tunes databases — the platform does it. Service-level agreements often pin down uptime, response time, and fault-correction time at this level.
  • Software as a Service (SaaS). The finished application itself is the service. Think Salesforce, mail services, and any other software delivered over the network. The consumer is an end user who manages nothing at all. Salesforce is really application as a service; "software" as a service is the slightly more general label.

A useful memory device: walk down the ladder from SaaS to IaaS and ask "what do I still manage?" — nothing, then the application and its data, then also the runtime, OS, and middleware. The more you manage, the lower the rung and the more control you keep.

Services consumed by very large numbers of people are what we call clouds.

12.1.4 Data Location and Residency Rules

Ask people who work on the cloud where their data physically sits, and many cannot answer. Location no longer matters to the technology — but it matters to auditors and governments. Regulators have come down hard on social media companies, requiring certain categories of data to stay within national boundaries so that local law applies. So: technologically location is irrelevant, legally it is not. Expect audit questions about data location.

This tension is worth naming because it recurs later in the SOA discussion: data sovereignty — the rule that data falls under the laws of the country where it physically resides — is the legal mirror of the architectural property called location independence. The engineering gives you freedom; the law takes some of it back.

12.1.5 Architectural Trade-Offs: You Cannot Have Every Quality

Compromise sits at the heart of architecture. You cannot maximize reliability, availability, modifiability, testability, and extensibility all at once.

Life forces the same kind of choice. Wanting a partner who is always present, has no work pressure, and tops every list — smartest, most handsome, most muscular, most agile, fastest runner — ends in compromise. Somewhere you make a choice, and you pick what matters most.

In architecture you do the same: decide which qualities matter for your system, and accept trade-offs on the rest. Each quality costs something concrete. Maximizing availability means redundancy — duplicate machines, duplicate data centers, failover machinery — which raises cost and complicates testing. Maximizing modifiability means layers and indirection, which cost performance. Maximizing security means checks and isolation, which cost convenience and speed. The qualities pull against each other, so the architect's job is not to maximize but to prioritize.

Very often, the best set of trade-offs lands you in the cloud — which is why people say they are "on cloud nine". The cloud bundles a particular trade-off package: superb availability and elasticity bought with reduced control over location and hardware.

Exam note: expect conceptual questions on why quality attributes must be traded off rather than all maximized. Be ready to name two qualities that conflict and say precisely what mechanism creates the tension between them.

12.1.6 Student Question: Do Classes Still Matter?

Q: If everything can be looked up on Google and ChatGPT, what is the point of attending a class?

A: Pick the approach that suits you. If searching tools alone carry you, skip the room; if interaction helps your retention, attend. Either way, the misuse trap is real: tools served predigested answers, passively copied, earn marks and a degree but leave an engineer in name only. Use them to strengthen your own capability instead.

The question seemed plausible because search tools genuinely hold more facts than any lecturer. What they do not hold is the sequence of reasoning — why a correction happened, why an analogy was chosen, which confusion is common. That sequence is what a live class transmits, and it is also what exams test.

Recap: the cloud = on-demand, pooled, elastic, metered, multi-tenant services reached over the network; its three service rungs are IaaS, PaaS, SaaS; and choosing among qualities — including whether to buy them from a provider — is architecture's oldest rule. Next we ask where a cloud can physically live: the deployment models.

12.2 Deployment Models: Private, Public, Community, Hybrid

12.2.1 The Four Deployment Models

Deployment models answer one question: who owns and operates the cloud? The same virtualization machinery powers all four; only the ownership boundary moves.

  • Private cloud. An organization sets up its own cloud. The usual drivers are security concerns and privacy — a large bank hosting its own cloud is the standard example. Anyone with the rights inside the organization can spin up a virtual environment, or a central support team can do it for them. The organization keeps full control of hardware, location, and compliance, and pays for that control even when the machines idle.
  • Public cloud. Sold openly by providers to anybody. The big names: Amazon, Google, Microsoft Azure, Oracle. Economies of scale are largest here because the provider amortizes everything across the whole world's demand.
  • Community cloud. Set up for a particular group with a shared interest. Examples: an industry group such as textile or cement manufacturers, or a national government whose units all draw from one shared cloud. The members share concerns — mission, security requirements, policy, compliance — so they share infrastructure tuned to those concerns.
  • Hybrid cloud. Mix and match: take some services from a public provider, keep some inside a private or community cloud, and combine them into one architecture. The classic pattern has a name worth remembering — cloud bursting: run normally on your private cloud, and let load spikes overflow onto a public provider instead of buying peak capacity you would use twice a year.

A quick contrast table:

Model Who may join Typical driver Cost profile
Private One organization Control, security, compliance Full cost even when idle
Public Everybody Zero upfront cost, elasticity Pay per use
Community A defined group with shared concerns Shared policy at shared cost Split among members
Hybrid Combination Keep sensitive parts in, burst peaks out Base + overflow

12.2.2 Student Question: Community versus Public Cloud

Q: What actually separates a community cloud from a public cloud?

A: Mostly semantics — the difference is precious little. A public offering is open to everybody. The moment you add a restriction — say, only government companies may join — the same cloud becomes a community cloud. A community cloud is simply a public cloud with membership restricted to a defined community.

The question felt necessary because both models serve many organizations, so "shared" cannot be the distinguishing feature. The correction sharpens it: the distinguishing feature is the membership rule, not the sharing. Why this matters in practice: the membership rule is what lets a community enforce its own compliance requirements — banks auditing banks, ministries auditing ministries — which an open public cloud cannot promise.

Recap: four deployment models differ only in who owns the cloud and who may join; hybrid exists to combine their strengths, and community is public-plus-a-membership-rule. Next: why hyperscale operation makes all of this dramatically cheaper than owning.

12.3 The Economics of Scale Behind Cloud Pricing

Why is renting from a hyperscaler cheaper than owning? Not one reason — a stack of them, each multiplying the last: cheaper support, cheaper power, better security, better hardware prices, and a load curve that never sleeps.

12.3.1 Support Staffing and the One-Server Extreme

Cloud providers operate massive numbers of servers and massive amounts of storage. At that scale you play in a completely different marketplace: hardware makers treat you differently, and you can hire the best experts.

Take the extreme opposite — a company running everything on one server in its own room. It still needs a database administrator, a network administrator, a server administrator, and security staff, all charged against that one server. With costs concentrated like that, it cannot hire expensive people, cannot afford backups, and cannot run multiple shifts. If five companies pool their resources, the math improves. Multiply by tens or hundreds of thousands of servers and you get the best of the best — which is exactly who the big cloud firms employ.

Textbook measurements make the ratio concrete: in a traditional data center one administrator services roughly 140 servers, while in an automated cloud data center the same administrator services thousands. Economy of scale shows up first in support because staff cost does not grow with the machine count once automation exists.

12.3.2 Location Strategy: Power, Climate, and Government Stability

Scale also buys cheaper electricity: unit costs drop with volume, and location can cut them further. Power is not a rounding error — it runs to roughly 15–20% of a data center's total operating cost, and very large buyers negotiate discounts of up to half the retail rate.

Data centers prefer cooler climates because air-conditioning bills dominate — Seattle works well: mild summers, cold winters but not as harsh as regions farther north. Moving even higher, to Vancouver or into the hills, trades cooling savings for higher transportation and communication costs. Beyond climate, operators shift to countries and states offering better power deals — within India, industries relocate to states with cheaper power.

Other locational factors stack up: shared space, common security, better government terms, and favorable tax laws. Hostile jurisdictions are avoided. A city that can order a lockdown at a moment's notice, and force your servers off, is a business risk. An unstable government is worse. Access to good people at reasonable pay matters too. India is a strong candidate wherever it shows stable government and low disturbance; the states that proved this became attractive destinations.

Real-world: roughly three decades ago, Hewlett-Packard ran a data center in Bangalore on a high-speed fiber-optic line. It operated resources for clients worldwide and pioneered outsourced support staff seated in that center. Labor-cost savings came from both the location and the volume of work, splitting salaries while still hiring the best.

12.3.3 Security and Disaster Resilience at Scale

Concentrating thousands of servers in one place justifies head-of-state-grade protection — the sort arranged for a president. A story makes it concrete.

A race course computer room — betting money flows there, and crowds can turn hostile — held a powerful Supermax mid-range computer. The room had no windows, and its main door carried a collapsible iron gate. The moment the system misbehaved, the gate dropped and locked from the inside — with the staff inside — before anything else could happen. That is the grade of physical security a serious data center provides.

Disaster preparedness comes with the territory: tsunamis, earthquakes, distributed power feeds. A well-built facility rides through even an event on the scale of 9/11 without a blip in service. Perhaps access drops for a moment for technical reasons; then life continues. Somebody would have to blast the entire earth before those systems go down.

The economic point hiding inside the war story: this level of protection has a nearly fixed price tag. A small server room cannot buy it at all; a hyperscale campus amortizes it across so many machines that it becomes noise on the bill.

12.3.4 Hardware Bargains and Load Balancing Across Time Zones

At hyperscale, hardware bargains are unimaginable for ordinary buyers: Amazon, Microsoft, Apple, and Alphabet's Google never pay the price you and I pay — bulk discounts on equipment run to tens of percent below retail.

There is also a time dimension to savings. Finance discovered it first as synergy: a company needing funds in summer would acquire a company needing funds in winter, smoothing cash needs. Power companies price the same way — discounted industrial power at night, expensive power on weekends — to flatten their load curve. Pool computing work into one place and the average load balances out. Better still, offices run in India while the US sleeps, and vice versa: the eastern hemisphere drives load for 12 hours, the western hemisphere for the other 12. The same equipment serves both communities around the clock — a 100% economy on equipment use, part of which is passed on to customers.

Picture the provider's load curve as a chart: hours of the day across the horizontal axis, total demand up the vertical axis. A single office produces two sharp humps (working hours) with a deep valley between; pooling hemispheres fills the valley until the curve flattens into a plateau. The flatter the curve, the more of the purchased hardware earns its keep every hour.

Real-world: the price of 1 TB on Google Drive, OneDrive, or Dropbox buys reliability and availability no single office could match. On your own, you would have to carry your disk home every night just to keep it available.

12.3.5 Worked Example: Owning a Drive versus Renting OneDrive

Setup: compare buying one 1 TB hard disk per person against a cloud family plan.

  • A 1 TB disk costs roughly ₹4,000–₹5,000.
  • OneDrive sells a family plan — about six people — with 1 TB each for ₹7,000 per year.
  • Suppose seven people each want 1 TB.

Buying disks: rupees, spent once, buying seven devices with zero replication.

Renting the plan: rupees covers five years for all seven people — the same money.

So owning covers barely the purchase price of five cloud-years. Per person per year, the plan works out to rupees — about a quarter of one disk's price annually, with replication included.

Over those five years, each owned disk carries a real probability of breaking down and losing all its data (consumer drives fail at a few percent per year), plus no off-site copy, no availability away from the desk. The cloud price includes replication, availability, and reliability that a lone disk cannot offer.

Sense check: equal totals over five years, but the cloud side delivers seven replicated, anywhere-accessible terabytes while the ownership side delivers seven fragile boxes — the comparison is not close.

The point is not to market OneDrive or Google Drive — it is to market the cloud: the cost per unit of availability and reliability is enormously low.

12.3.6 Multi-Tenancy Economics at Salesforce Scale

Multi-tenancy closes the economics loop. Salesforce maintains one piece of software with a crack team behind it, and when an application runs multi-tenanted, thousands of tenants are simultaneously paying for the same resources. Every improvement — a security patch, a new feature — is written once and lands for every tenant at the same instant, which is why update costs amortize instead of multiplying. The provider passes the benefit back as a reduced, affordable cost for every tenant. That shared-cost flywheel is something to marvel at — and it only works because the tenant base is enormous.

Recap: scale cheapens support (automation ratios), power (location and bargaining), security (fixed cost spread thin), hardware (bulk pricing), and utilization (hemisphere-wide load smoothing) — textbook estimates put the combined saving near 80% versus a mid-size private data center. Next we open the box and see the machinery that makes pooling possible: virtual machines and the hypervisor.

12.4 Virtual Machines and the Hypervisor

12.4.1 The Base Mechanism

The most basic cloud arrangement is large hardware managed by a hypervisor. That is a software layer managing the hardware to create many virtual machines on one physical machine — think of it as an operating system whose "applications" are entire computers. Around it sit a powerful file system holding the files of all these virtual machines, and networking that wires them together. To any outside observer, each virtual machine looks like an ordinary standalone computer.

Every cloud advantage appears here. The virtual machines rarely need all resources at the same instant, so pooling pays. Expansion is easy, and changing a virtual machine is far easier than changing a physical one — a virtual machine is, after all, mostly a set of files that can be copied, moved, or restored like any other file. Measured overhead makes the trick practical: modern hardware is designed for virtualization, and the cost of the extra layer has been measured at roughly 1% per instance.

12.4.2 Address Spaces: What the Hypervisor Maps

Recall how a computer works. The CPU operates through address spaces: a heap, a stack, a program loaded into memory, an address register, the register copy of the current instruction. Then it fetches the next instruction and executes it. Alongside, the machine maintains a memory map, hash tables holding data, and references to disk locations — block spaces and block numbers where data lives.

On a physical machine, the CPU does all of this directly: every address the program generates goes through one page table that translates it to a physical memory location. On a virtual machine, a layer must sit in between and map the physical machine onto the virtual one — that layer is the hypervisor. The translation now happens twice:

  1. The guest program generates a target address; the virtual machine's own page table maps it to an address inside the virtual machine.
  2. The hypervisor's page table maps that virtual-machine address onto a real physical address of the host hardware.

Each virtual machine keeps its own tables and its own address-space markings, and the hypervisor passes control among the virtual machines. Two levels of indirection is the whole secret: no guest can name — or even express — an address outside its own box.

12.4.3 Time-Slicing and Why Interleaving Is Invisible

On a multiprocessing system, processors hand time slices to each virtual machine in turn. Without multiprocessing — unlikely on real server hardware — control would rotate round-robin among the virtual machines, exactly like an operating system time-slices processes.

Does hopping across sixty machines hurt? For most applications, no. Run the arithmetic: a single machine instruction completes in nanoseconds — say seconds — while a whole program might take a second ( seconds) to run. The switching overhead vanishes inside that gap of nine orders of magnitude; each virtual machine experiences the pauses the way a reader experiences turning pages while reading one long book.

Everything here is a trade-off — from the moment you wake up. Attending class could be the right choice, or watching a movie or a recorded cricket match instead; people who choose right, by calculation or by accident, do better. Architecture is choosing deliberately.

That aside is not a detour from the material — it is the material. Time-slicing trades a tiny per-switch cost for enormous utilization gains, and the architect's job is to notice which side of such trades a given system should favor.

12.4.4 Identifying Virtual Machines: IP Addresses, Ports, IPv6, and IoT

Every virtual machine is identified from the outside world. A client addresses a global IP address, reaches a particular port on it, and lands on the actual machine. An outsider has no way to tell whether the machine answering is virtual or physical — which is the point. The indirection even has a tidy operational form: providers offer elastic IPs, static public addresses you can re-point from one virtual machine to another programmatically when a machine fails or a replacement rolls out.

IPv4 addresses are 32-bit numbers — about 4.3 billion combinations — and they are running close to exhaustion for the number of connectable machines; IPv6 answers that problem with 128-bit addresses and belongs to a networking course. What makes IPv6 unavoidable is the Internet of Things (IoT): eventually nearly every object carries an IP address. People already wear pacemakers and fitness trackers, and homes fill with devices that want their own addresses so owners can reach them from outside. Mapping public addresses to private ones — address translation — is a huge subject in itself. But the architectural takeaway stands: every virtual machine is publicly identifiable, indistinguishable from a physical box.

Recap: a hypervisor plus two-level address mapping turns one physical machine into many convincing computers; nanosecond instructions make second-scale time-slicing invisible; and IP-level identity keeps the illusion perfect from outside. Next we scale this out horizontally: a file system spread across thousands of such machines — HDFS.

12.5 The Hadoop Distributed File System

12.5.1 Hadoop Building Blocks: HDFS, MapReduce, YARN

Distributed architectures need a file system that spans machines, and the enduring choice is the Hadoop Distributed File System (HDFS), inspired by the Google File System. Its design premise is blunt: at thousands of machines, hardware failure is normal, not exceptional — so the file system must expect disks and nodes to die and keep serving data anyway. Three pieces matter architecturally:

  • HDFS stores the data.
  • MapReduce is the processing pattern — glimpsed earlier in the course and revisited later.
  • YARN (Yet Another Resource Negotiator) handles all resource negotiation.

The division of labor is clean: HDFS answers "where does data live?", MapReduce answers "how do we compute over it?", and YARN answers "which machine may run which piece of work?".

12.5.2 Name Nodes, Data Nodes, and Metadata

Hadoop views data as name-node pairs — an ID plus a description, much like the Windows registry. Data arriving from client applications goes to the name node, with YARN managing the negotiation and allotment. The name node maintains the metadata of all files.

Metadata is data about data. Say you hold employee records: name, sex, date of birth, date of joining, bank card number, and so on.

Four things that count as metadata for those records:

  1. The field names themselves ("date_of_birth", "bank_card_number").
  2. Where each block of the data physically lives (which data node, which block number).
  3. When the records were last updated.
  4. The total file size — and, in HDFS specifically, how many replicas exist and on which nodes.

The actual employee rows are the data; everything describing them is metadata.

The actual records live as data in data nodes. YARN negotiates the resources hosting both name nodes and data nodes. A crucial architectural rule from the textbook treatment: the name node manages only metadata and never touches the bulk data transfer — keeping the directory keeper light lets one name node serve a whole cluster.

Execution runs through a master scheduler and task handlers: master schedulers schedule tasks; task handlers execute them and report progress back.

When reporting stops arriving, the node is assumed dead. There is no polite waiting period beyond the timeout: silence is the failure signal in a cluster too large for anyone to come tell you a disk crashed.

Backups are maintained across data node 1, data node 2, and data node 3. Storing in node 1 replicates into nodes 2 and 3, so processing simply switches to alternatives when a node disappears. YARN coordinates all of it, letting enormous data sit across very large locations.

12.5.3 Worked Example: The HDFS Write Pipeline

The write path proceeds as an exact sequence:

  1. The application writes data through an HDFS client library.
  2. The client buffers locally until it accumulates a full block — 64 MB in the classic description of the pipeline; current Hadoop defaults the block to 128 MB, matching the correction heard in class.
  3. The client informs the name node that a new block must be written.
  4. The name node returns a list of three data nodes chosen to hold the replicas — spread across racks so one rack failure cannot take all copies, preferring lightly loaded nodes.
  5. The client sends the block to the first data node and tells it the other two replica targets.
  6. The first data node writes its copy while forwarding the stream to the second; the second writes and forwards to the third. The three nodes form a pipeline: bytes flow downstream while each node saves what passes through.
  7. Each data node reports completion back up the chain as it finishes writing — to the client, and separately to the name node so the metadata stays accurate.
  8. The client commits the write to the name node; the task handler confirms the job done, and the client rests satisfied.

Notice the chain shape: the client touches only the first data node; replicas flow down the chain, and acknowledgements flow back up. One client-to-network transfer carries three durable copies.

Two design details worth pausing on. First, HDFS uses no locks for writing: a file has a single writer until complete, after which many readers may read simultaneously — dropping lock machinery buys speed at web scale. Second, blocks are undifferentiated byte strings: HDFS attaches no structure or type to them, so any meaning (records, columns, formats) belongs to the application above — another example of pushing application-specific work up the stack rather than down into the infrastructure.

12.5.4 Failure Handling and Three-Way Replication

Each failure mode has a defined recovery path:

Who fails Detection Recovery
Client Application notices the failed operation Application retries the operation
Name node Cluster loses its directory keeper Backup/checkpoint name node takes over and continues
Data node Heartbeat reports stop arriving Ask the name node to assign a different data node; missing replicas are re-created elsewhere

Because every block is replicated three times, losing one data node loses no data. Replication plus reassignment is what lets processing continue uninterrupted — and the next subsection puts a number on exactly how much protection three copies buy.

12.5.5 Worked Example: Reliability of Three Parallel Replicas

How much does triple replication really buy? Work it out. Let one storage unit have failure probability — one chance in a hundred that the unit is unreadable when needed. Assume failures are independent: one disk dying neither raises nor lowers another's chance of dying. That independence is engineered, not assumed — replicas live on different nodes and different racks precisely so one fire cannot touch two copies.

Two units in parallel fail together only if both fail. For independent events, probabilities multiply:

One in ten thousand — already a hundredfold improvement over a single unit.

Add a third unit; again all three must fail together:

So the chance that the data survives — at least one replica readable — is one minus the chance all copies are lost:

Final answer: about 99.9999% availability — one lost-in-a-million.

Sense check: the result must sit between the single-unit availability (99%) and certainty, and closer to certainty as replicas increase — satisfies both. Each added replica multiplies the loss probability by again, which is why redundancy gains arrive multiplicatively, not additively.

Since the Six Sigma benchmark is 3.4 defects per million opportunities, three parallel replicas at one expected loss per million land beyond Six Sigma. (In the session the spoken figures paired "reliability 99.99" with "chances of failure 0.01"; note that 99.99% reliability corresponds to . The arithmetic above uses throughout, giving the computed survival figure of 99.9999%.) The lesson stands either way: parallel redundancy drives failure probability down multiplicatively.

12.5.6 Cluster Resource Management and Persistence

Inside clusters, node managers handle data storage, and the cluster manages everything within its boundary. Persistence — storage that can be recovered even after the machine that created it disappears — is ensured by a persistent object manager, the component that maintains files intended to outlive any individual virtual machine instance. Virtual resource managers assign resources, and all messages and data flow through the virtual resource manager, which acts as the gateway deciding which cluster manager handles each request. The persistent object manager keeps those resources safely stored across clusters, so a client can reach persisted files independently of the instance that wrote them. The Hadoop file system manages resources network-wide.

12.5.7 Student Questions: Block Size and MAC Addresses

Q: How large is a block in Hadoop?

A: The initial guess offered was sixty-four megabyte blocks, but the correction from the floor stands: Hadoop stores data in 128 MB blocks. Data is stored in blocks, and YARN controls the flow — when a data node fills up, another data node is created.

The guess was reasonable — older descriptions of the write pipeline used 64 MB blocks, which is why the figure lingers in textbooks — but modern Hadoop doubled the default to 128 MB to reduce metadata bookkeeping per terabyte.

Q: What is a MAC address?

A: The unique identity of a piece of hardware — specifically the ID of the network card. The manufacturer places it under a scheme in which the manufacturers' association distributes MAC IDs among its members. An IP is transferable and can be allocated to a particular MAC address. A firewall rule based on MAC works no matter where the machine is plugged in: allow that MAC ID, or debar it.

One precision fix to the spoken form: a standard MAC address is 48 bits long — six groups of 8 bits each, conventionally written as six hexadecimal pairs (for example 00:1A:2B:3C:4D:5E). The first three groups identify the card's manufacturer under the registration scheme; the last three are the individual card's serial number. So the address divides into six octets, not into 16-bit units.

Why both identifiers exist: the MAC pins the hardware, the IP pins a location in the network. Move the card to another building and the MAC travels with it while the IP changes — which is exactly why a firewall can recognize the machine anywhere by MAC but can only route to it by IP.

Exam note: the metadata-versus-data distinction is a favorite conceptual check — be ready to list four things that count as metadata. Also know the HDFS write pipeline order and the three-replica reliability calculation as concrete, workable items.

Recap: HDFS splits files into replicated 128 MB blocks across data nodes, keeps the directory in one lightweight name node, detects death by silence, and multiplies reliability with every replica. Next: how clients find these machines reliably even when one dies mid-request — IP failover and DNS redirection.

12.6 IP Failover, DNS Redirection, and Horizontal Scaling

12.6.1 Failover by Reallocating the IP

When a virtual machine fails, traffic falls over to a backup machine, and the IP address is automatically reallocated. That is the beauty of working at the IP level: clients never notice which physical box answered. The client holds one address; behind it, the provider swaps the machine that answers — the conversation continues as if nothing happened.

The same trick supports planned moves, not just emergencies: stage a complete new environment on a second machine, verify it quietly, then switch from the old environment simply by moving the IP to the new one. Providers expose this as elastic IPs — static public addresses you can re-point programmatically from one instance to another. Rollbacks are equally cheap: if the new environment misbehaves, move the address back.

12.6.2 Domain-Level Redirection Through DNS

One more level of redirection exists above the IP. Clients often reach services through a URL rather than a raw IP, and URL-to-IP translation happens through DNS. A DNS manager can change which IP a domain points to.

The practiced pattern: build the full new environment on a different IP, test it there quietly, then one fine day repoint the domain. Two caveats: the domain change takes time to replicate across the internet — DNS resolvers cache answers for hours — and during that window traffic can still be steered by redirecting at the IP level. The two layers therefore work as a pair: DNS for slow, global, planned migrations; IP reallocation for fast, surgical switches. All of this belongs to networking proper — the architectural point is that indirection enables painless migration: every layer of "a name that points at something else" is a seam where you can swap machinery invisibly.

12.6.3 Load Balancers and Horizontal Scaling

Scaling out uses the same indirection. Point the service IP at a load-handling device, and it distributes incoming network traffic across many virtual machines. That is horizontal scaling: adding more identical resources to serve web traffic rather than making one machine bigger.

Scope: horizontal scaling assumes the workload can be split into independent requests and any replica can serve any request — which pushes you toward stateless service design. If sessions live on individual machines, the balancer must pin users to machines (sticky sessions), and failover gets harder. Vertical scaling (one bigger machine) avoids that constraint but hits a hard ceiling: there is only so large a single box can be bought.

Picture the three indirections stacked: a domain name points at an IP, the IP points at a load balancer, the balancer fans requests out to a farm of interchangeable virtual machines. Each arrow is a place where failure or growth can be absorbed without any client ever knowing.

Recap: IP reallocation gives instant failover, DNS repointing gives planned migration, and load balancers turn both into unlimited horizontal growth. Next: what it looks like when a provider hands you all four layers ready-made — the LAMP platform.

12.7 Platform as a Service: The LAMP Stack

12.7.1 Four Layers Offered as One Platform

One of the most popular platforms is LAMP: Linux as the operating system, Apache as the web server, MySQL as the database, and Python as the programming language. (Notation note: reference texts write the stack as Linux, Apache, MySQL, PHP/Perl/Python — the P is a family, and Python is one of its members; the professor's listing picks that member.) Offer all four together and a full-stack developer can build and deliver entire applications on top: database, web server, operating system, and programming language, delivered as one platform. That is Platform as a Service in practice.

The value is in what the developer stops doing. Nobody installs or patches Linux; nobody tunes Apache for connection limits; nobody plans MySQL backups. The provider runs the integrated stack — and on a full PaaS adds automatic scaling across virtual machines based on customer load, failure detection with automatic recovery, backup/restore, security patching, and built-in persistence. The developer writes application code against stable interfaces and ships.

A concrete picture of the rungs from section 12.1, using the same web application:

  • IaaS: you request a virtual machine, install Linux, then Apache, then MySQL, then your language runtime yourself.
  • PaaS (LAMP): all four arrive preinstalled and managed; you upload your code and it runs.
  • SaaS: you skip development entirely and subscribe to someone else's finished application.

Same machinery at every rung — the difference is which layers you can see and must manage.

Real-world: teams of full-stack developers still standardize on this exact bundle for web applications, and cloud providers sell ready-made LAMP machine images precisely because the combination is so well understood.

Recap: PaaS = an integrated, managed stack (here Linux + Apache + MySQL + a P-language) that turns infrastructure into a backdrop. Next, a short statistical detour that will let us attach real numbers to quality claims like "reliable": Six Sigma and the normal curve.

12.8 Quality Digression: Six Sigma and the Normal Curve

12.8.1 From Raw Marks to the Standard Normal Distribution

Six Sigma is a quality standard, and understanding it takes a short statistics detour. Almost any natural quantity — marks, heights, measurement errors — falls on a bell-shaped curve called the normal distribution. That curve has a mean and a standard deviation, and the standard deviation is called sigma ().

Why a bell? Small independent influences pile up: a student's mark absorbs sleep, luck, preparation, guessing — dozens of small pushes in both directions. When many small independent effects add up, the pile concentrates in the middle and thins out at the extremes, which is exactly the bell shape.

Convert any normal distribution into the standard normal distribution in two moves:

  1. Shift the mean to zero. If the mean is 50, subtract 50 from every value. The center of the data now sits at zero; nothing else changes.
  2. Scale the spread to one. Divide every value by the standard deviation. A dataset that typically strayed from its center now strays exactly 1.

As a formula, the standardized value is

where is a raw value, is the population mean, and is the standard deviation — both and are scalars, and ends up unit-free. The units cancel by construction: marks minus marks divided by marks leaves a pure number, so a -score means "how many standard deviations above or below average" for any measured quantity — marks, heights, defect rates.

Worked example. A class scored out of 100 maximum and 0 minimum, averaging .

Step 1 — center: subtract 50 from everybody. The average becomes ; half the class sits negative, half positive. A mark of 80 becomes .

Step 2 — scale: suppose the standard deviation comes out — typical for a class is 10 or 15; any programming language hands you a function that computes it from a data set. Divide the centered marks by 15:

The 80-scorer sits exactly two sigmas above average. Now nearly everybody's standardized mark falls below 3, with a few outliers above — because on a bell curve, almost all of the probability mass lies within three standard deviations of the mean.

Sense check: must correspond to the average student (50 → yes), and a perfect 100 gives — just past three sigma, matching our intuition that full marks are rare.

12.8.2 Sigma Levels, Zero Defect, and 3.4 Defects per Million

Read the bands off the standardized curve. Between minus one and plus one sigma lie about 67% of values. Between minus two and plus two sigma sit around 95–96%. Three sigma covers 99-something percent. (Standard normal tables list these bands as about 68%, 95%, and 99.7% respectively — the spoken figures were close approximations; use the table values when precision matters.) Six Sigma is far stricter — "absolutely crazy" strict. The Japanese quality tradition refers to it as zero defect, because at Six Sigma accuracy the defect chance is tiny: about 3.4 defects per million opportunities.

Put that number in human terms: even for a nice plate of dosa, would you accept a risk of three to four deaths per million? You probably would — because breathing carries a higher chance of death than 3.4 per million. Companies operating at that standard deliver what gets jokingly called double-Sigma-Six service; most established firms work to roughly that discipline.

Connect this back one section: the three-replica storage calculation produced one expected loss per million — better than the 3.4-per-million Six Sigma bar. That is what it means, numerically, to call replicated cloud storage "reliable".

Q: What exactly is Six Sigma?

A: A quality standard built on the normal curve. After centering and scaling, sigma counts standard deviations away from the mean. Six Sigma accuracy leaves only about 3.4 defects per million — which the Japanese quality system calls zero defect.

Recap: standardization turns any bell curve into one universal ruler; sigma levels price rarity; Six Sigma sets the bar at 3.4 defects per million. Next we return to storage technology: how databases changed shape when the web outgrew SQL.

12.9 NoSQL Storage: Key-Value and Document Stores

12.9.1 Key-Value Stores: HBase and the Registry Analogy

Key-value pairs are the simplest NoSQL shape: give a key, get a value. No schema declares what the value must contain; the store just keeps the association and returns it fast.

HBase is a very good key-value database, built on ideas from Google's BigTable. It scales to billions or trillions of data items. One column is designated the key; the other columns hold values — and a single cell can keep multiple versions of a value distinguished by timestamp, so history accumulates instead of being overwritten.

For a feel of key-value lookup on your own machine, open the Windows registry editor (regedit) — keys mapping to stored values, hierarchically arranged. You are looking at the same access pattern: name in, value out, structure carried by the key's path rather than by a schema.

For a human-scale picture of a reliable pickup-and-delivery system, study the dabbawala lunchbox network — a genuinely fantastic mechanism, famous enough to have documentaries made about it. A lunchbox is handed from home to a coded collection point, routed through sorting hubs by an encoding only the carriers read, and delivered to the right desk at lunch hour with Six-Sigma-grade accuracy — keys (the painted codes) resolving to values (the boxes) through a distributed network with no central computer.

12.9.2 Document Stores: MongoDB

Document-centric storage keeps self-contained objects, and MongoDB is the standard example. Documents hold objects that contain links to other objects, so related data travels together instead of being split across joined tables. Documents are stored in binary JSON form: an object carries all the information about one concept — a customer with their addresses and preferences inside one document — and where it references another concept, it stores a link that the application follows rather than a join the database executes.

Why abandon tables? Because at web scale joins are the expensive part. The relational model reconstructs a whole object by stitching rows from several tables on every query; the document model pays that cost once, at write time, by keeping the object whole.

12.9.3 What "Not Only SQL" Really Means

Q: Does the "No" in NoSQL mean SQL is banned entirely?

A: No — remember that NoSQL stands for Not Only SQL. Both SQL databases and non-SQL databases live under that umbrella. What actually changes: transactions are not locked, schemas are not predefined, and the normalization-and-joins machinery of SQL is absent.

The misreading was natural — "No" reads as prohibition. The correction matters because it changes what you may combine: nothing stops a system from using both kinds side by side. Each feature dropped buys performance: locks hinder concurrent writes, schemas forbid flexible records, joins cost time at scale — so web-scale systems drop all three and take responsibility for those guarantees in application code.

That flexibility is the beauty of these databases. The practical pattern, though, is combination: store objects in a NoSQL store, then refer to them through SQL where relational querying helps. Object store plus SQL access is, honestly, a beautiful idea.

12.9.4 Student Question: Gap Theorem or CAP Theorem?

Q: Is the gap theorem part of this subject?

A: The theorem meant here is the CAP theorem, and yes, it is part of the syllabus. It is about choices — the forced trade-offs of distributed systems, consistent with everything said about compromise in architecture. It gets dedicated time in the next session.

A preview to anchor next session: CAP says a distributed data system cannot simultaneously guarantee Consistency (every reader sees the same latest value), Availability (every request gets an answer), and Partition tolerance (the system survives the network splitting into islands) — pick two. Notice it is the same lesson as section 12.1.5 wearing distributed-systems clothes: you cannot maximize every quality at once.

Recap: NoSQL = Not Only SQL; key-value stores (HBase) trade schema for speed, document stores (MongoDB) trade joins for wholeness, and the theory underneath both is the CAP trade-off arriving next session.

12.10 Running Concerns: Security, Performance, Availability

12.10.1 Security Risks in Shared Virtualization

Security demands extra caution in the cloud because early implementations leaked. Attackers took one virtual machine, exploited bugs or limitations in the hypervisor, and hopped into another machine on the same host — an attack class the literature calls virtual machine escape. They exploited memory maps to extract data. Side-channel attacks monitored the cache: by timing how fast their own memory accesses returned, an attacker could infer what data a neighbor's process had just pulled through the shared cache — deducing secrets without ever touching them.

The root cause is sharing itself:

The same memory space may serve different virtual machines in turn. If a space is not cleared between tenants, whoever captures it next can try to lift leftover data.

Denial-of-service attacks matter too — a flood aimed at one virtual server can degrade every server sharing that hypervisor, because neighbors breathe the same CPU and network air.

These risks were fair warnings years ago; modern hypervisors have hardened, and such problems are largely handled. The textbook taxonomy of multi-tenancy attacks is worth knowing by shape: inadvertent information sharing (leftover state), virtual machine escape (hypervisor bugs), side-channel attacks (cache timing), and denial of service (resource hogging). For the paranoid, one provider option removes the risk class entirely: reserving an entire physical machine for your exclusive use — at the price of giving up some of the cloud's economics.

12.10.2 Performance Pitfalls of Cheap Providers

Performance suffers when load grows beyond inadequate resources, and small shared data centers can be a genuine pain. Because the technology is opaque, buyers fall prey to very cheap virtual-machine offers.

Some sellers advertising "web space" are actually handing over a mere user account on one server — not even a virtual machine. Others carve one RDBMS installation — say MS SQL Server — into per-customer databases.

Then heavy users arrive: mass-mailers sending out bulk mail and pulling huge volumes in, with no performance balancing in place. They swallow the resources, and one user's enormous memory map drags down everyone else on that single server. A properly run hypervisor with true virtual machines isolates tenants from exactly this — each VM gets its own bounded slice regardless of what neighbors do.

A few bad providers give the whole market a bad reputation — which is why the safe play is buying only from top-tier providers. Direct-from-provider service from Amazon and Azure dominates; Google's offerings are acknowledged as very good even by those not personally using them.

12.10.3 Availability and Auto Scaling

Availability tracks the quality of the service provider; top-end providers have built serious capacity. As a calibration point, Amazon's EC2 service agreement has guaranteed 99.95% availability — read that number both ways: it is high enough to trust, and it openly budgets roughly 0.05% of the year (about four and a half hours) as your problem to survive. Mature tenants plan for that slice: keep services stateless so any replica can answer any request, replicate data across availability zones, and degrade gracefully — fail fast with timeouts, fall back to lower-quality responses, drop non-critical features under load.

Auto scaling needs planning: growth will not necessarily scale itself, especially when you impose your own limits. AWS, for example, lets you cap the quantum of resources allotted automatically. Once you hit your limit, runaway problems stop there — a billing circuit-breaker as much as a capacity one. Study security, availability, and performance together as concepts in the cloud context; they are the three qualities the textbook singles out as meaningfully different once you move into the cloud.

Recap: share nothing carelessly — isolation between tenants is a security boundary, a performance boundary, and an availability budget all at once; buy from top-tier providers and set explicit auto-scaling caps. Next: the playbooks the top providers themselves publish.

12.11 Best Practices and Provider Reference Guides

12.11.1 Programmable Infrastructure and Managed Services

The core shift: what used to be hardware is now programmable, available globally, with strong availability and effectively unlimited capacity.

Capacity feels unlimited since you grow without ordering hardware or waiting on a vendor — the whole world's spare machines sit behind one API call.

Nothing is truly unlimited, but from your seat you can grow without ordering hardware or waiting on a vendor. The practical consequences reach daily operations: production environments can be cloned for testing in minutes, a compute job that takes 500 hours on one machine can run for one hour across 500 machines, and disaster recovery becomes "replicate the environment to another region" rather than "maintain a second building".

Managed services are the operational answer. Buying directly from the biggest providers works well but runs a little expensive. Intermediaries resell and manage Azure or AWS on your behalf. You pay the intermediary separately for the managed service, while storage is billed directly by AWS. Support comes in levels: on-call plans or time-billed arrangements. The decision rule: if usage is significant and you can hire in-house talent, go direct and manage internally; otherwise use an intermediary. Small firms almost always should. One small company with a long tail of loyal clients prefers Indian intermediaries with solid reputations — Cloud4C among them. They operate in cities like Jaipur, Delhi, and Hyderabad, handling everything on call or via a raised ticket.

12.11.2 AWS Design Principles

AWS's own documentation lays out design principles worth knowing by name: scalability; disposable resources; automation; loose coupling between services; removing single points of failure; optimization of cost; caching; and security. Loose coupling means servers and databases arrive as separable pieces — any instance can die and be replaced without ceremony because nothing depends on its identity.

Two of these deserve unpacking. Disposable resources inverts an old instinct: instead of nursing a fragile server for years, you treat instances as cattle — replaceable parts rebuilt from templates whenever needed. Automation follows from disposability: if machines are replaceable, scripts can replace them, and human operators stop being the bottleneck (recall from section 12.3 that one cloud administrator services thousands of servers — automation is what makes that ratio possible).

12.11.3 The Microsoft Azure Architecture Guide

Microsoft's Azure document covers a parallel set of topics: application lifecycle, customization, choosing an architecture, partitioning, maximizing availability, scalability, elasticity, securing the application, and managing and monitoring multi-tenanted applications. Its architecture guide organizes applications into layers — presentation layer, business layer, data layer, service layer. Hands-on testimony: Microsoft Presentation Foundation (WPF) and Microsoft Communication Foundation (WCF) were used for small applications and came nicely done. Multi-tenancy gets dual treatment — the tenant's perspective and the provider's perspective, single tenancy versus multiple tenancy, and multi-tenancy architecture.

Exam note: overall awareness of these guides is expected; deep detail is not required. Be able to name several AWS design principles and the Azure guide's layer split.

Recap: infrastructure is now programmable and effectively unbounded; managed-service intermediaries exist for firms that lack in-house depth; both major providers publish design playbooks worth knowing at name-recognition level. Next we zoom out to the architectural style that binds consumers to all these services: SOA.

12.12 Service-Oriented Architecture in the Cloud

12.12.1 Services as Black Boxes Under Contract

Service-oriented architecture (SOA) was introduced earlier; now place it against the cloud. Providers offer services; consumers consume them. The consumer must understand how to use a service without any knowledge of how it is implemented — whatever happens at the back is not the consumer's concern.

Services are black boxes bound by contract: provide these inputs, credentials included, and you receive information of this type. The contract — not the code — is the interface. Everything behind it can be rewritten, rehosted, or moved to another continent without breaking a single consumer.

That black-box property, plus implementation-language independence across organizations on the internet, is why SOA became a specialized field: your Python service can consume my Java service and neither side learns anything about the other's internals.

12.12.2 Components: Enterprise Service Bus, Registry, Orchestration

The SOA menagerie:

  • Service providers and service consumers — and sometimes the provider doubles as a consumer of other services.
  • The enterprise service bus (ESB) — an intermediary element that routes or transfers services between providers and consumers.
  • A registry supporting service discovery — a discovery network where consumers find available services.
  • An orchestration server holding all available services, supplying whichever one your application requires at a given moment for a given task.

Picture the wiring: consumers ask the registry what exists, bind through the bus, and the orchestration server composes individual services into complete business flows. Because intermediaries sit in the middle, the system can be complex, evolution of different services stays controllable, and legacy systems can keep running at the back — an old mainframe can serve the world as long as someone wraps its function in a service contract.

12.12.3 Trust, Litigation, and Data Sovereignty

If your provider is itself a consumer elsewhere, that is not your problem — you use a service only if you trust it. Upfront integrity of the provider is key; without trust, walk away.

The courts prove the stakes: litigation rages over whether Google uses data the way users authorized, and whether Facebook is transparent about sharing. People hesitate to install security-camera systems whose servers sit in China. For a high-security site, nobody wants a foreign country able to read video feeds retained or relayed by third-party servers. The worry grows when the provider lacks certification in a country known for transparency. Many trust American providers because American law restricts misuse of private information; others counter that national-security agencies may have access. India, meanwhile, insists that data relating to India be accessible to Indian law and stored on Indian soil — data sovereignty from section 12.1.4 returning as a procurement requirement.

Security, secrecy, privacy is a vast subject — but the practical rule for SOA: consume sensitive services over secure lines with encrypted message exchange and proper cryptographic arrangements.

12.12.4 Connectors: SOAP, REST, and Asynchronous Messaging

Services attach through connectors, and message exchange takes one of three shapes:

Connector Pattern Character
SOAP protocol Synchronous communication between services Formal contracts, structured envelopes
REST connections Basic request-reply operations riding HTTP Lightweight, everywhere, easy to test
Asynchronous messaging connectors Message queues offering point-to-point or publisher-subscriber exchange Sender and receiver need not be up at the same time

Any of these may connect you to a provider; the choice shapes latency, coupling, and guarantees. Synchronous connectors answer immediately but hold both sides hostage to each other's speed; asynchronous queues decouple them in time — the sender drops a message and continues, which absorbs bursts and survives receiver outages at the cost of delayed answers.

12.12.5 Middleware Overhead and Legacy Systems

Middleware is not free. Because you no longer call a service directly, the middleware adds performance overhead and can become a bottleneck; some middleware cannot guarantee performance at all. Every hop through the bus adds latency, and every translation between formats costs processor time.

The compensating advantage is enormous — it lets the whole world talk to one another — which is why infrastructure and operations leaders accept the trade. This is the same shape as every trade-off in this course: pay latency, buy interoperability.

12.12.6 Cloud Strategy Lessons for Operations Leaders

Working out a cloud strategy is now a major task for infrastructure and operations leaders. It is a tightrope walk: you lack full control, you must trust people, you go by certifications — yet there is no survival without the cloud.

Failure modes are known. One is a lukewarm approach that never understands the required changes and strategies. Another is fear-driven avoidance that waits so long the bus leaves — leaving catch-up mode while competitors occupy the market space.

The playbook that works: understand service providers deeply; long relationships earn better service; map your applications, then tweak them to run on the cloud; understand privacy; investigate; commission thorough audits. Real projects have run deep audits purely to verify performance and storage levels.

History rewards the legal side of software too. The founder of Microsoft signed the agreement with IBM to write PC-DOS — Microsoft's first big project. That contract, a genuine legal victory, is what made the company: Microsoft kept the right to license its operating system (as MS-DOS) to other manufacturers while IBM got its version, so when IBM-compatible machines flooded the market, every one of them paid Microsoft. Read that life story — the founder is Bill Gates, the counterparty IBM — to see what the project was really about.

Name the giants: Facebook, Google, Microsoft, AWS, Apple — the big five behind the FAANG-style acronym. Personal allegories vary. There is fondness for Google, and admiration for Microsoft's resurgence after its "old man on steroids" phase — Windows 10, Windows 11, and Azure rebuilt the company under its India-born leadership. AWS carries much of the world's servers. Architecturally, all five shape the practices above. And the announced closing topic, the CAP theorem, arrives next session: the formal framework for the choices every distributed system must make.

Recap: SOA binds organizations together with contracts instead of code knowledge; buses, registries, and orchestrators carry the traffic; trust and sovereignty decide which contracts you may sign; and strategy failure comes from drifting, not from choosing wrong. Next session: CAP — the theorem that turns this lecture's recurring theme of compromise into law.

Exam Guidance Summary

  • This is a high-level course demanding enormous breadth; cramming is pointless. Go through the provided material, understand the concepts, and search outside sources for anything unclear.
  • Definitional regurgitation — e.g., "state the economics of cloud" — would be a poor question; the economics are intuitive once understood. Expect concept and application questions instead.
  • Reference literature from the major providers (AWS design principles, the Azure architecture guide) merits overall awareness; details are not required.
  • The CAP theorem is part of the subject and arrives next session; treat trade-offs as the connecting theme of the whole course.
  • Know the metadata-versus-data distinction, the HDFS write pipeline, and the three-replica reliability calculation as concrete, workable items — these are the kind of questions that reward having worked the steps by hand.
  • Assignment discipline doubles as professional training. Assume the deadline is two or three days earlier than the real one, and submit something rather than nothing. Remember the agile rule: you may downsize the product and negotiate backlog cuts with the client in advance, but you may never miss the deadline.

Delivering late is like serving wedding biryani two days after the ceremony; ordinary rice served on time beats it.

  • Use AI tools to strengthen your own capability; passive copy-paste produces predigested answers and an engineer in name only. Study failure stories harder than success stories — failures teach patterns you can circumvent.

Key Industry Applications

  • Salesforce — canonical multi-tenant SaaS: one application, many tenants, shared crack team, affordable pricing for all.
  • Amazon Web Services (AWS) and Microsoft Azure — the dominant direct providers; Google's cloud acknowledged as excellent; Oracle named among public providers. AWS publishes the design principles of section 12.11.2; Azure documents layered application architecture and multi-tenancy from both tenant and provider perspectives.
  • Google Drive, OneDrive, Dropbox — consumer cloud storage whose per-terabyte pricing beats private ownership on cost, reliability, and availability — the worked comparison of section 12.3.5 in products you can price yourself.
  • Hewlett-Packard, Bangalore — early offshore data center running global operations over fiber optics decades ago; the outsourcing template that later cities and firms copied.
  • Hadoop ecosystem — HDFS, MapReduce, YARN, HBase; MongoDB for documents; Windows registry as the everyday key-value analogy; MS SQL Server as the shared-RDBMS cautionary tale when one installation is carved up without isolation.
  • LAMP stack — Linux, Apache, MySQL, Python/PHP as the classic PaaS bundle for full-stack web delivery.
  • WPF and WCF — Microsoft frameworks praised for building layered presentation/service applications.
  • IoT devices — pacemakers, fitness trackers, and home devices driving IPv6 adoption and addressability of everything.
  • Indian managed-service intermediaries — Cloud4C and peers in Jaipur, Delhi, and Hyderabad reselling and operating hyperscaler services for smaller firms.
  • IBM PC-DOS agreement — the founding legal win that turned Microsoft into Microsoft: license the OS to IBM while keeping rights to sell it everywhere else.

SA Lecture 12 notes · Cloud Computing

Software Architectures· postgraduate· 2026-08-21

Sections Breakdown

1Cloud Foundations: Ubiquity, Service Models, and Trade-Offs

Essential cloud characteristics, the IaaS/PaaS/SaaS ladder, data residency, and why quality attributes must be traded off.

2Deployment Models: Private, Public, Community, Hybrid

The four ownership models, cloud bursting, and the membership rule that separates community from public clouds.

3The Economics of Scale Behind Cloud Pricing

Support staffing ratios, power and location strategy, security amortization, hardware bargains, hemisphere load smoothing, and the OneDrive-versus-disks comparison.

4Virtual Machines and the Hypervisor

Two-level address mapping, time-slicing arithmetic, virtualization overhead, and how VMs are identified by IP.

5The Hadoop Distributed File System

Name nodes and data nodes, metadata versus data, the eight-step write pipeline, failure handling, and the three-replica reliability calculation.

6IP Failover, DNS Redirection, and Horizontal Scaling

Elastic IPs for instant failover, DNS repointing for planned migration, and load balancers for scaling out.

7Platform as a Service: The LAMP Stack

Linux, Apache, MySQL, and a P-language delivered as one managed platform, and what the developer stops doing.

8Quality Digression: Six Sigma and the Normal Curve

Standardizing to the z-score, sigma bands on the bell curve, and the 3.4 defects per million benchmark.

9NoSQL Storage: Key-Value and Document Stores

HBase key-value lookup, MongoDB documents with links, Not Only SQL, and a preview of the CAP theorem.

10Running Concerns: Security, Performance, Availability

Multi-tenancy attack classes, cheap-provider pitfalls, SLA budgets, and auto-scaling caps.

11Best Practices and Provider Reference Guides

Programmable infrastructure, managed-service intermediaries, AWS design principles, and the Azure architecture guide.

12Service-Oriented Architecture in the Cloud

Services as black boxes under contract, ESB/registry/orchestration, SOAP/REST/messaging connectors, trust and data sovereignty.

13Exam Guidance Summary

How this lecture is examined: concept and application questions, concrete workable items, and deadline discipline.

14Key Industry Applications

Named industry anchors from Salesforce multi-tenancy to the IBM PC-DOS agreement.

Postgraduate students in software engineering and architecture

Exam Revision Notes

Below is the distilled, exam-ready core. Every entry comes from the full explanation above. Use this section for rapid review; return to the main notes when a point needs more context.

Cloud Foundations: Ubiquity, Service Models, and Trade-Offs

Must-know: Name the essential cloud characteristics and place IaaS/PaaS/SaaS on the 'what do you still manage' ladder; quality attributes are traded off, never all maximized.

⚠️ Top pitfall: Believing one application per tenant is multi-tenancy — true multi-tenancy is one maintained application serving many organizations.

Self-check: Which service model leaves the consumer managing only the application and its data?

Connects to: Deployment models (12.2), Economics of scale (12.3), LAMP PaaS (12.7)

Deployment Models: Private, Public, Community, Hybrid

Must-know: The four deployment models and their drivers; community = public + membership restriction; hybrid supports cloud bursting.

⚠️ Top pitfall: Thinking community and public differ by scale or technology — they differ only by the membership rule.

Self-check: What single change turns a public cloud into a community cloud?

Connects to: Cloud foundations (12.1), Economics of scale (12.3)

The Economics of Scale Behind Cloud Pricing

Must-know: Name at least four economies of scale (support staffing, power/location, security, hardware bargaining, time-zone load balancing) and work the storage cost comparison with real numbers.

⚠️ Top pitfall: Comparing only purchase price against one year of subscription — the fair comparison spans the ownership lifetime against multiple cloud-years.

Self-check: Seven people each need 1 TB: what does buying disks cost versus five years of a ₹7,000/year family plan?

Connects to: Cloud foundations (12.1), Deployment models (12.2), HDFS (12.5)

Virtual Machines and the Hypervisor

Must-know: What the hypervisor maps (address spaces via two page-table levels), why interleaving sixty VMs is invisible (nanosecond instructions vs second-scale programs), and how a VM is identified from outside (global IP + port).

⚠️ Top pitfall: Assuming virtualization carries heavy overhead — measured cost is about 1% per instance on modern hardware.

Self-check: Why does hopping across sixty virtual machines not hurt most applications?

Connects to: Cloud foundations (12.1), HDFS (12.5), IP failover and scaling (12.6)

The Hadoop Distributed File System

Must-know: Four kinds of metadata; the eight-step HDFS write pipeline in order; P(all three fail) = p^3 and A = 1 - p^3 = 99.9999% for p = 0.01.

⚠️ Top pitfall: Adding replica reliabilities instead of multiplying failure probabilities — redundancy compounds multiplicatively only when failures are independent.

Self-check: With p_fail = 0.01 per unit, what is the probability that data on three parallel replicas is lost?

Connects to: Virtual machines and hypervisors (12.4), IP failover and scaling (12.6), Six Sigma (12.8)

IP Failover, DNS Redirection, and Horizontal Scaling

Must-know: Failover = automatic IP reallocation; planned migration = repoint DNS after testing on a new IP; horizontal scaling = more identical machines behind a balancer.

⚠️ Top pitfall: Forgetting DNS changes propagate slowly through caches — keep IP-level redirection ready during the transition window.

Self-check: Which mechanism moves traffic fastest: DNS repointing or IP reallocation, and why?

Connects to: Virtual machines and hypervisors (12.4), Security, performance, availability (12.10)

Platform as a Service: The LAMP Stack

Must-know: The four LAMP layers and that PaaS means the provider manages all of them while you supply only code.

⚠️ Top pitfall: Treating P as exclusively PHP — reference texts define it as PHP/Perl/Python.

Self-check: Which layers does a developer stop managing when moving from IaaS to a LAMP PaaS?

Connects to: Cloud foundations (12.1), Provider best practices (12.11)

Quality Digression: Six Sigma and the Normal Curve

Must-know: The two-step standardization (center at zero, scale to one), the formula z = (x - mu)/sigma with every symbol named, and the Six Sigma figure of 3.4 defects per million.

⚠️ Top pitfall: Quoting band coverages loosely — standard tables give about 68%, 95%, and 99.7% for one, two, and three sigma.

Self-check: A class averages 50 with sigma 15: what is the z-score of a mark of 80?

Connects to: HDFS (12.5)

NoSQL Storage: Key-Value and Document Stores

Must-know: NoSQL = Not Only SQL; what changes versus SQL (no locked transactions, no predefined schema, no joins); HBase = key-value, MongoDB = documents with links.

⚠️ Top pitfall: Reading 'No' in NoSQL as a ban on SQL — it is an umbrella covering both SQL and non-SQL stores.

Self-check: Name three SQL features NoSQL stores typically omit, and say what each omission buys.

Connects to: HDFS (12.5), Six Sigma (12.8), SOA in the cloud (12.12)

Running Concerns: Security, Performance, Availability

Must-know: The four multi-tenancy attack classes and why cheap 'web space' is not a virtual machine; 99.95% EC2-style SLA read as a budget you must plan around.

⚠️ Top pitfall: Trusting that isolation comes free on the cheapest offer — without true hypervisor-based VMs, one heavy neighbor degrades everyone.

Self-check: How can an attacker read a neighbor's data through a shared cache without touching it?

Connects to: Virtual machines and hypervisors (12.4), IP failover and scaling (12.6), Provider best practices (12.11)

Best Practices and Provider Reference Guides

Must-know: Name several AWS design principles and the Azure guide's application layers (presentation, business, data, service); decision rule for direct provider versus intermediary.

⚠️ Top pitfall: Assuming deep guide detail is examinable — only overall awareness is expected.

Self-check: State the decision rule for hiring an intermediary versus going direct to a hyperscaler.

Connects to: Cloud foundations (12.1), LAMP PaaS (12.7), Security, performance, availability (12.10)

Service-Oriented Architecture in the Cloud

Must-know: The SOA component set (provider, consumer, ESB, registry, orchestration server), the three connector families with their trade-offs, and the two known cloud-strategy failure modes.

⚠️ Top pitfall: Forgetting middleware costs latency — interoperability is bought with performance overhead.

Self-check: Which connector family lets a sender continue without waiting for the receiver to be up?

Connects to: Cloud foundations (12.1), NoSQL (12.9), Provider best practices (12.11)

Exam Guidance Summary

Must-know: Expect concept/application questions, not definitions; work the HDFS pipeline and reliability math by hand; never miss deadlines — downsize scope instead.

⚠️ Top pitfall: Cramming breadth or regurgitating definitions — both lose to understanding concepts deeply enough to apply them.

Self-check: Which three concrete items does this lecture flag as most likely to be examined?

Connects to: HDFS (12.5), Six Sigma (12.8), NoSQL (12.9)

Key Industry Applications

Must-know: Match each named company/product to the concept it illustrates (Salesforce = multi-tenancy, Hadoop = distributed storage, Cloud4C = managed intermediary).

⚠️ Top pitfall: Listing products without connecting each to its architectural lesson.

Self-check: Which product is the canonical example of multi-tenant SaaS?

Connects to: Cloud foundations (12.1), Economics of scale (12.3), HDFS (12.5), LAMP PaaS (12.7), Provider best practices (12.11)

Was this lecture useful?

Loading comments…
🤖

BitsNotes AI Assistant

Subject Notes Assistant

Configure AI Chat

Choose how to access the chatbot
Have your own API key?

Switch to "Bring Your Own Key" tab above for unlimited access with any OpenAI-compatible provider.

🔑 Enter API key above to fetch live models from provider, or enter model name manually.
OpenAI-Compatible API Support

Choose any provider preset (Gemini, DeepSeek, Kimi, GLM, MiniMax, Qwen, OpenAI, Groq, Ollama, etc.) or enter a custom endpoint URL.

Security & Privacy First

Your API key is sent directly from your browser to your specified provider. BitsNotes servers never store or see your key.