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
| Store | How it works | Suits |
|---|---|---|
| Distributed file system | Files split into blocks, replicated across many machines | Huge files processed in parallel |
| Object storage | Files as objects with metadata, addressed by key, effectively unlimited | Cheap durable storage of anything, the usual basis of a data lake |
| Data lake | Raw data of any structure, schema applied on read | Keeping everything now, deciding later |
| Data warehouse | Structured, modelled, columnar, optimised for queries | The questions you already know you will ask |
| Lakehouse | A warehouse-style engine over lake storage | Both, which is why it is now the common design |
| NoSQL document store | Flexible JSON-like records, no fixed schema | Variety, rapidly changing structure |
| Key-value store | A key and a blob, extremely fast | Caching, sessions, lookups |
| Column-family store | Wide sparse rows across a cluster | Time series and very high write rates |
| Graph database | Nodes and relationships as first class things | Networks, fraud rings, recommendations |
| Time series database | Optimised for timestamped measurements | Sensors, 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.
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.
Network and movement
Data has weight. Moving it is often the binding constraint rather than storing or processing it.
| Factor | Why it matters |
|---|---|
| Bandwidth | How much data can move per second. A petabyte over a gigabit link takes months |
| Latency | The delay before a response. Irreducible below the speed of light over distance |
| Throughput | What is actually achieved, which is always less than the bandwidth |
| Egress cost | Cloud providers charge to move data out, which is what makes lock-in real |
| Congestion and contention | Shared links slow under load, and backups compete with users |
| Reliability | A 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.
Step 1 of 3 Scaling up: a bigger machine, until there isn't one.
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.
| Approach | How it runs | Suits |
|---|---|---|
| Batch | A large volume processed on a schedule | Reporting, retraining, billing |
| Micro-batch | Small batches every few seconds | A compromise where near real time is enough |
| Stream | Each event handled as it arrives | Fraud, alerting, live dashboards, sensors |
| Interactive query | A human waiting for an answer | Exploration and dashboards |
Compute
| Resource | What it is good for |
|---|---|
| CPU | General purpose logic, branching, coordination |
| GPU | Thousands of identical calculations at once, which is exactly what training a model is |
| TPU and accelerators | Purpose-built for machine learning workloads |
| Memory | Holding working data in RAM instead of reading from disk, the main source of modern speedups |
| Cluster | Many 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.
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.
- One core takes the jobs one after another, in order.
- Four cores take four jobs at once, so the queue clears sooner.
- Only if the work can be split. Some jobs must wait for the one before.
- A GPU takes this much further: thousands of tiny cores, one kind of job.
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.
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
- 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.
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
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.
- LScaling up increases the capacity of one machine
- LScaling out adds more machines working together
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.
- 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
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.
- 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
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.
- 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
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.