KS5H019/H119 F201 TA2 28 min read 10 question quiz 20 exam marks

F201 TA2: The Infrastructure Challenges of Big Data

Storage, network and processing at a scale where one machine is not an option, and the trade-offs each choice forces.

Storage at scale

Scaling up and scaling out

  • Scaling up, vertically: a bigger machine. Simple, and it hits a ceiling that no budget can move.
  • Scaling out, horizontally: more machines working together. No ceiling, but now everything is a distributed systems problem.

Big data is defined by having passed the point where scaling up works, so every storage option below is a way of scaling out.

The options

StoreHow it worksSuits
Distributed file systemFiles split into blocks, replicated across many machinesHuge files processed in parallel
Object storageFiles as objects with metadata, addressed by key, effectively unlimitedCheap durable storage of anything, the usual basis of a data lake
Data lakeRaw data of any structure, schema applied on readKeeping everything now, deciding later
Data warehouseStructured, modelled, columnar, optimised for queriesThe questions you already know you will ask
LakehouseA warehouse-style engine over lake storageBoth, which is why it is now the common design
NoSQL document storeFlexible JSON-like records, no fixed schemaVariety, rapidly changing structure
Key-value storeA key and a blob, extremely fastCaching, sessions, lookups
Column-family storeWide sparse rows across a clusterTime series and very high write rates
Graph databaseNodes and relationships as first class thingsNetworks, fraud rings, recommendations
Time series databaseOptimised for timestamped measurementsSensors, telemetry, monitoring

Replication, partitioning and the consequence

Data is partitioned, or sharded, across machines so that work can run in parallel, and replicated so that a machine failing does not lose anything. Those two together buy scale and resilience, and they cost consistency: after a write, different replicas can briefly disagree. Many big data stores therefore offer eventual consistency rather than the immediate consistency a relational database guarantees, and the design question is whether the application can tolerate that. For a bank balance it cannot; for a view count it obviously can.

Store everything is a decision with a bill

Object storage is cheap per gigabyte and not free, and retrieval, transfer and the compute to process it are charged separately. A data lake with no retention policy becomes a data swamp: expensive, undocumented, and unused.

OLTP, warehouse, lake and lakehouse comparedFour data stores and the job each is built for. An OLTP database runs the business: many small reads and writes, strict integrity and transactions, normalised and row oriented, with the schema enforced when data is written, as when taking an order or updating a balance. A data warehouse analyses the business: large analytical queries over modelled data, often in a star schema, stored columnar and compressed, again with the schema enforced on write, as when reporting sales by region by month. A data lake keeps everything: any structure, raw as it arrived, on cheap object storage, rejecting nothing and promising nothing, with the schema applied only when the data is read, which suits images, logs and anything else being kept for later. A lakehouse does both, running a warehouse style engine over lake files in open table formats so one copy of the data serves two workloads, which is the common modern design. The underlying trade is that schema on write guarantees quality and rejects what does not fit, while schema on read loses nothing and guarantees nothing.Four stores, four different jobsOLTP DATABASErunning the business• Many small reads and writes• Strict integrity and transactions• Normalised, row oriented• Schema enforced on writeTake an order, update a balanceDATA WAREHOUSEanalysing the business• Large analytical queries• Modelled, often star schema• Columnar, compressed• Schema enforced on writeSales by region by monthDATA LAKEkeeping everything• Any structure, raw as it arrived• Cheap object storage• Nothing rejected, nothing promised• Schema applied on readImages, logs, anything, for laterLAKEHOUSEboth at once• Warehouse engine over lake files• Open table formats• One copy, two workloads• Schema where it is neededThe common modern designSchema on write guarantees quality and rejects what does not fit. Schema on read loses nothing and guarantees nothing.
Pick the store from the question. The one that runs the business is almost never the one that should answer it.

Network and movement

Data has weight. Moving it is often the binding constraint rather than storing or processing it.

FactorWhy it matters
BandwidthHow much data can move per second. A petabyte over a gigabit link takes months
LatencyThe delay before a response. Irreducible below the speed of light over distance
ThroughputWhat is actually achieved, which is always less than the bandwidth
Egress costCloud providers charge to move data out, which is what makes lock-in real
Congestion and contentionShared links slow under load, and backups compete with users
ReliabilityA transfer that fails at 94% has to be resumable, or it is worthless

The principle that follows

Move the computation to the data, not the data to the computation. This is the single most important design idea in big data. Instead of pulling a petabyte to an analysis machine, the query is sent to the machines that already hold the blocks, each processes its own share locally, and only the small result comes back. Distributed processing frameworks exist to make that practical.

Edge processing

Where velocity and bandwidth are both constrained, processing happens at the edge, on or near the device. A camera that detects motion locally and uploads only the clips that matter is moving kilobytes instead of a continuous stream, and it works when the connection does not.

Scaling up, scaling out, and moving the computationThree ideas in sequence. Scaling up means replacing a machine with a bigger one, from four cores to sixteen to sixty four; it is simple and it stops, because there is a largest available machine and no budget moves that ceiling, and big data begins precisely where this approach failed. Scaling out means using many machines together as a cluster, with the data partitioned across them so work can run in parallel and replicated so that a machine failing loses nothing; the cost is consistency, because replicas can briefly disagree, which is what eventual consistency means. The third idea follows from the second: rather than pulling a petabyte to an analysis machine, the query is sent to the four machines that already hold the blocks, each counts its own quarter locally, and only the four small results are combined. The petabyte never moves and a few kilobytes come back, which is the organising principle of every distributed processing framework.Three ideas, in the order you need themSCALING UP: one bigger machine4 cores16 cores64 coresSimple, and it stops. There is a largest machine, and no budget moves that ceiling.Big data begins at the point where this stopped working.SCALING OUT: more machines, working togethernode 1node 2node 3node 4node 5node 6node 7node 8Partitioned for parallel work, replicated so a failure loses nothing.The cost is consistency: replicas can briefly disagree, which is eventual consistency.MOVE THE COMPUTATION TO THE DATAblock 1250 TBcount locallyblock 2250 TBcount locallyblock 3250 TBcount locallyblock 4250 TBcount locallycombine 4 small resultsOne petabyte never moves. A few kilobytes come back. That is the whole idea.
Moving data is usually the binding constraint. The fix is to not move it.

Processing and computing power

Distributed processing

The pattern underneath most big data processing has three steps: split the data across machines, process each part locally in parallel, combine the partial results. Map-reduce is the classic expression of it, and modern engines do the same thing in memory rather than via disk, which is why they are far faster.

ApproachHow it runsSuits
BatchA large volume processed on a scheduleReporting, retraining, billing
Micro-batchSmall batches every few secondsA compromise where near real time is enough
StreamEach event handled as it arrivesFraud, alerting, live dashboards, sensors
Interactive queryA human waiting for an answerExploration and dashboards

Compute

ResourceWhat it is good for
CPUGeneral purpose logic, branching, coordination
GPUThousands of identical calculations at once, which is exactly what training a model is
TPU and acceleratorsPurpose-built for machine learning workloads
MemoryHolding working data in RAM instead of reading from disk, the main source of modern speedups
ClusterMany machines coordinated as one, which is how all of the above is scaled

Cloud elasticity and its economics

The cloud's real advantage for big data is elasticity: a cluster of two hundred machines for the forty minutes a job needs, then nothing. On premise, that peak capacity has to be bought and then sits idle. The matching risk is that elastic resources left running, or a badly written query that scans the entire lake, produce a bill nobody authorised, which is why cost monitoring is part of the architecture rather than an afterthought.

Resilience

Replication across availability zones, automatic failover, retried and idempotent jobs, checkpointing so a failed job resumes rather than restarts, and backups that are tested. At this scale component failure is not an incident, it is the normal operating condition, so the system is designed to continue through it.

The trade-off is the answer

Every infrastructure question is a trade. Scale out buys capacity and costs consistency. Streaming buys immediacy and costs simplicity. The lake buys flexibility and costs governance. Naming the trade and then choosing, with a reason tied to the scenario, is what the top band looks like.

Batch, micro-batch, stream and interactive processingFour processing models arranged by how quickly an answer is needed. Batch processes a large volume on a schedule with a latency of hours to a day, and suits monthly billing, model retraining and overnight reports. Micro-batch processes small batches frequently with a latency of seconds to minutes, and suits near-live dashboards and frequent aggregates. Stream processing handles each event as it arrives with a latency of milliseconds, and suits fraud blocking, sensor alerts and live routing. Interactive query answers while a person waits, and suits exploration and dashboard filtering. The choice between them is not about the volume of data but about how fast the value of the answer decays: a fraudulent transaction has been authorised and settled before a nightly batch ever sees it.How quickly does the answer stop being useful?BATCHhours to a daya large volume on a schedule• monthly billing• model retraining• overnight reportsMICRO-BATCHseconds to minutessmall batches, often• near-live dashboards• frequent aggregatesSTREAMmillisecondseach event as it arrives• fraud blocking• sensor alerts• live routingINTERACTIVEwhile someone waitsa human asking a question• exploration• a dashboard filteranswer needed slowlyanswer needed immediatelyThe choice is not about volume. It is about how fast the value of the answer decays.A fraudulent transaction is settled before a nightly batch ever sees it.
Pick the model from how fast the answer goes stale, not from how much data there is.
Why more cores is not simply more speedWhy more cores is not simply more speed. A single core takes jobs from the queue one after another, so four jobs take four times as long as one. Four cores can take one job each at the same moment, and the queue clears in roughly a quarter of the time. That only works if the work can genuinely be split: when job three needs the result of job two it has to wait however many cores are sitting idle, which is why doubling the cores rarely doubles the speed. A graphics processor takes the idea much further, with thousands of tiny cores that all do the same kind of job at once, which suits work that splits perfectly, such as the pixels in a picture.One core: the jobs queue upCore 1Job 1Job 2Job 3Job 4timeFour cores: four jobs at onceCore 1Job 1Core 2Job 2Core 3Job 3Core 4Job 4done in a quarter of the time...but only if the work can be splitCore 1Job 1Core 2Job 2Core 3Job 3Job 3 needs Job 2the other cores sit idleGPUthousands of tiny coresall doing the same kind of jobPixels in a pictureFrames of a filmSteps that need the lastsplit well, or not at all1234
  1. One core takes the jobs one after another, in order.
  2. Four cores take four jobs at once, so the queue clears sooner.
  3. Only if the work can be split. Some jobs must wait for the one before.
  4. A GPU takes this much further: thousands of tiny cores, one kind of job.
The exam answer is the condition, not the claim: more cores help when the task can be divided.
A rack of servers in a data centreA rack of servers in a data centre, with rows of identical units stacked in a cabinet and cabling running down the side.one servera flat computerstatus lightsthe rackmany servers, one cabinetcables carry network and power
When a website is described as being in the cloud, this is the cloud.Drawn illustration

Key terms you must be able to define

Scaling up
Increasing the capacity of a single machine.
Scaling out
Adding more machines that work together as a cluster.
Distributed file system
A system splitting files into blocks replicated across many machines.
Object storage
Effectively unlimited storage of files as keyed objects with metadata.
Lakehouse
An architecture applying warehouse-style querying directly to data lake storage.
Partitioning
Splitting data across machines so it can be processed in parallel.
Replication
Keeping copies of data on several machines so a failure loses nothing.
Eventual consistency
A guarantee that replicas will agree in time, but may briefly disagree.
Latency
The delay between a request and the start of a response.
Bandwidth
The volume of data a connection can carry per second.
Egress cost
A charge for moving data out of a cloud provider.
Edge processing
Processing data on or near the device that generated it.
Batch processing
Processing a large volume of data on a schedule.
Stream processing
Processing each event as it arrives.
Elasticity
The ability to add and remove computing capacity on demand.
GPU
A processor with many cores suited to large numbers of identical calculations.

Flashcards

Say the definition out loud before you flip the card. Retrieving it from memory is what builds recall, reading it again is not.

DefineScaling up
AnswerIncreasing the capacity of a single machine.
DefineScaling out
AnswerAdding more machines that work together as a cluster.
DefineDistributed file system
AnswerA system splitting files into blocks replicated across many machines.
DefineObject storage
AnswerEffectively unlimited storage of files as keyed objects with metadata.
DefineLakehouse
AnswerAn architecture applying warehouse-style querying directly to data lake storage.
DefinePartitioning
AnswerSplitting data across machines so it can be processed in parallel.
DefineReplication
AnswerKeeping copies of data on several machines so a failure loses nothing.
DefineEventual consistency
AnswerA guarantee that replicas will agree in time, but may briefly disagree.

Reach the top grade on this topic

Answers reach the top band by quantifying the constraint and then choosing. "A gigabit link moves about 10 terabytes a day at best, so a 400 terabyte migration is six weeks of continuous transfer; physical transfer or processing in place is the only realistic option" beats any amount of general discussion of bandwidth.

Mistakes that cost marks here

Avoid these
  • Treating scaling out as simply 'more computers' without mentioning the consistency cost.
  • Confusing bandwidth with latency. A fat link is not a fast one.
  • Forgetting that moving data is usually the binding constraint, not storing it.
  • Describing a data lake as a warehouse. One applies schema on read, the other on write.
  • Assuming the cloud is automatically cheaper. Elasticity is cheaper; idle capacity and egress are not.
  • Treating component failure as an exception rather than the normal condition at scale.
Fun fact

Moving a petabyte over a fast internet connection takes months. Cloud providers therefore sell a service where they post you a ruggedised storage appliance, you fill it and post it back, because a lorry has a higher effective bandwidth than a fibre link.

Knowledge check

0 of 10 answered
1What does scaling out mean?
2What is the main cost of replicating and partitioning data across a cluster?
3Which principle underlies distributed processing frameworks?
4A data lake applies structure:
5Which workload type suits fraud detection on card transactions?
6Why are GPUs used to train machine learning models?
7What is egress cost?
8What is edge processing?
9Why is cloud elasticity valuable for big data?
10At large scale, component failure should be treated as:
Score 0 / 10

Exam-style questions

Five written questions in the style of the real paper. Write a full answer, then let the marker check it against the mark scheme.

20 marks
1State the difference between scaling up and scaling out.2 marks
State

Mark scheme0 / 2
  • LScaling up increases the capacity of one machine
  • LScaling out adds more machines working together
Model answer

Scaling up means increasing the capacity of a single machine, with more processors, memory or storage. Scaling out means adding more machines that work together as a cluster.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
2Explain why a data lake is often chosen over a data warehouse for big data.4 marks
Explain

Mark scheme0 / 4
  • LA lake accepts any structure
  • LSchema is applied on read rather than on write
  • LIt avoids losing data that does not fit a schema
  • LA drawback is recognised
Model answer

A data lake accepts data in whatever structure it arrives in, including unstructured content such as images, audio and free text that a relational warehouse cannot hold at all. It applies structure when the data is read rather than when it is written, so nothing has to fit a schema at the point of arrival and nothing is rejected or reshaped before anyone knows what questions will be asked of it. That matters for big data because variety is one of its defining characteristics and the useful questions are often not known in advance. The cost is governance: because the lake guarantees nothing about quality, structure or meaning, an undocumented lake becomes a swamp that is expensive to store and that nobody trusts enough to use, so a catalogue, lineage and retention policy are not optional extras.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
3A manufacturer has 4,000 sensors on its production line, each sending a reading every second. The site has a limited internet connection.Explain how the data should be collected and processed, and justify your choices.6 marks
Explain

Mark scheme0 / 6
  • LThe data rate is quantified or recognised as high
  • LEdge processing is proposed
  • LJustified by bandwidth or connectivity
  • LAggregation or filtering at the edge is described
  • LA suitable store is named for the retained data
  • LStream processing for alerts, with a reason
Model answer

Four thousand sensors at one reading a second is 4,000 values every second, around 345 million a day, and a limited connection will not carry that continuously, so the design has to reduce the data before it leaves the site. Processing should therefore start at the edge: a local gateway ingests every reading, applies threshold rules immediately so an out of range vibration raises an alert on site within milliseconds, and aggregates the rest into, say, one-minute summaries holding the mean, minimum, maximum and standard deviation per sensor. That cuts the uploaded volume by roughly sixty times while keeping the statistical shape of the signal, and it means the line keeps being monitored when the connection drops, which a cloud-only design would not. Full resolution readings should be buffered locally for a short window and uploaded only around an event, because that is when per-second detail is actually needed for diagnosis. In the cloud the summaries belong in a time series store, which is built for timestamped measurements and compresses them far better than a relational table, with the raw event windows in object storage as a lake for later model training. Alerting should be stream processed rather than batched, because the entire value of the data is in acting before a component fails, and a nightly batch would discover the failure after it had already stopped the line.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
4Discuss the infrastructure challenges an organisation faces when moving from a single-server database to a big data platform.8 marks
Discuss

Mark scheme0 / 8
  • LStorage must be distributed rather than enlarged
  • LPartitioning and replication are explained
  • LThe consistency trade-off is identified
  • LNetwork bandwidth or data movement is addressed
  • LProcessing model change is addressed
  • LCost and skills are addressed
  • LResilience and failure handling are addressed
  • LA judgement about the hardest challenge and why
Model answer

The first challenge is that the familiar answer stops working. A single server is improved by scaling up, and big data is by definition the point at which no affordable single machine is large enough, so storage has to become a cluster with the data partitioned across nodes for parallel processing and replicated so that a lost machine loses nothing. That immediately introduces a cost the organisation has not had to think about before: replicas can briefly disagree, so the immediate consistency a relational database guaranteed is replaced in many stores by eventual consistency, and every application has to be examined to see whether it can tolerate that. A balance cannot; a dashboard count can. The second challenge is movement. Data has weight, and at terabyte and petabyte scale the network becomes the binding constraint rather than storage: a migration that would take weeks of continuous transfer may need physical shipment, and cloud egress charges mean that moving data out later is a budget decision rather than a technical one. This is why the governing design principle inverts, from bringing data to the analysis to sending the computation to the machines that already hold the blocks. Third, the processing model changes. Queries become distributed jobs that split, process in parallel and combine, and workloads divide into batch for reporting and retraining and streaming for anything whose value decays within seconds, each needing different tooling and different thinking. Fourth, failure stops being an incident. With hundreds of components something is always broken, so jobs have to be retried, idempotent and checkpointed, and resilience has to be designed rather than hoped for. Finally there is cost and capability: elastic cloud capacity is genuinely cheaper than idle on premise hardware, but a runaway query that scans the whole lake produces a bill nobody approved, so cost monitoring belongs in the architecture, and the platform needs people who have run a distributed system before. Weighing these, the hardest challenge is not any of the technical ones; it is the skills and governance gap. Clusters can be rented in an afternoon, whereas the discipline to catalogue a lake, define ownership, control cost and reason correctly about consistency takes far longer to build, and it is the absence of that discipline, rather than any shortage of capacity, that turns most big data projects into expensive storage.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
Machine mark 0 / 20