seegongsik
Saved words
Data

When one machine is not enough, split it up

What happens as information keeps piling up? Even one big warehouse fills up someday. So you grow into several warehouses and split the load among them. On top of that, so you do not lose the load if one warehouse collapses, you copy the same load into another warehouse. Data is the same. When one machine cannot cope, you split across several, and you copy across several so nothing breaks.

01

One machine stops being enough

Earlier we learned a database
is a giant warehouse.
It stored safely and found fast.
But information piles up without stopping.
People grow, records grow,
photos and videos pour in too.
No matter how big one warehouse is,
someday it fills up and can hold no more.
A moment comes when one machine is not enough.

one machine's capacity
Tap to add more data
0 / 8

Tap to keep adding data. Once it passes one machine's capacity, no more fits.

One machine got completely full.
You want to add more but there is no room.
Swap in a bigger computer
and even that fills up again someday.
Growing one machine endlessly
has a clear limit.
So we should change our approach.
Instead of growing one machine,
what if we grow into several?

02

We split it across several machines

The way is simpler than you'd think.
Cut the data into pieces
and scatter them across several machines.
Instead of one machine groaning under it all,
each machine takes only a part.
For example, names A to M on machine 1,
N to Z on machine 2, that kind of split.
Chopping the load and sharing it out
is called distribution.
It is also called sharding.

pieces to split
A
B
C
D
E
F
machine 1
machine 2
machine 3
Tap to split pieces across the machines

Tap a piece to split it across the machines. Each machine holds only part of the whole.

The load scattered across machines.
The burden one machine carried got lighter.
When data grows more,
you just bolt on one more machine.
Then the new pieces go to the new machine.
Since you can keep growing like this,
you can hold even very big data.
But one worry creeps in.
What if that one machine suddenly dies?

03

We keep a copy of the same thing

Splitting has one weak point.
If the machine holding a piece dies,
that whole piece vanishes.
So we copy the same data
onto several machines.
Even if one machine dies,
another machine with a copy takes over.
So the data does not break.
Keeping the same thing copied across machines
is called replication.

Copy first, then turn one machine off

Tap copy to place the same data on several machines. Turn one off and another stays alive, so it does not break.

Turning one off, it stayed fine.
Thanks to the copy standing by.
Here we must tell two things apart.
Distribution, which splits, chops pieces
and shares them to different machines;
replication, which copies, keeps the same thing
on several machines, identically.
Distribution is splitting; replication is copying.
They look alike but are wholly different jobs.

04

A looser container, NoSQL

But when data is enormous
and must rush in and out very fast,
a strict table gets in the way instead.
The rule of lining slots up in order
holds the speed back.
So we use a container with loosened rules.
Instead of a table, hang one value on one key
and put in and take out straight.
It is the hash we saw earlier, grown big.
Such a loose container is called NoSQL.

strict table
-
loose key-value (NoSQL)
-
Tap a test to compare the two containers

Tap to compare a strict table with a loose key-value container. The loose one suits huge and fast handling.

The loose container,
with fewer rules, is free and fast.
No need to align slots like a table;
with just a key you put in and take out a value.
In return, the tidiness of lined-up rows
you let go of a little.
What to gain and what to let go,
you choose to fit the use.
For huge and fast data,
this loose container fits well.

05

Let's wrap up the data area

We've walked a long way to here.
We began with a container for values,
saw the database that gathers those containers,
and learned to find the row you want
fast in a giant table.
The index that builds a shortcut,
the relations that link tables,
and handling that stays safe if it cuts off midway.
And today we saw, when one machine is short,
how to split it up and keep copies.

Tap the big threads of the data area in order to close it

Tap the big threads of the data area in order to close it. (container -> database -> fast finding -> index -> relations -> safe handling -> split and copy)

Gathered on one line, it is this.
When data is too much for one machine,
you cut it and split across several (distribution),
and copy across several so it does not break (replication).
Splitting and copying are different jobs.
For huge and fast handling,
you use NoSQL, a container that loosens the table.
This is the hash grown big,
so it is the bridge leading to the enormous data
of the artificial intelligence we meet next.

Now the big picture of handling data
comes into view at a glance.
From one small container we came
all the way to a vast operation
that splits and copies across machines.
Storing information safely,
finding it fast, and growing it big,
this craft becomes the ground
that holds up the next area, artificial intelligence.
Where data gathers,
a thinking machine grows.

In one lineWhen data grows too big for one machine, you cut it into pieces and split it across several. This is called distribution, or sharding. Each machine holds only part of the whole, so together they can hold even very big data. And so nothing breaks when one machine dies, you copy the same data onto several machines. This is called replication. Distribution, which splits, and replication, which copies, are different ideas. Distribution chops the load and shares it out; replication keeps the same load in several places. For this huge and fast handling, a container that loosens the strict table form is called NoSQL. It is like a much bigger version of the hash container that puts in and finds a value straight by its key, so it becomes a bridge to the enormous data handled by the next area, artificial intelligence.
Data
Was this helpful? Support seegongsik