MinIO
medium 26 minMinIO is an object store with the S3 API that runs on your own drives and protects each object with erasure coding.
See it run
Shards on drives: a write, reads after failures, quorums, healing and growth.
Operations
A write
One object on a set of six drives with EC:2.
Step 1 of 5
Choose the set
The node hashes the name. The result is a set of six drives.
Step 1: Choose the set
def put(name, data): drives = erasure_set(hash(name)) shards = split(data, 4) + parity(data, 2) ok = write_all(drives, shards) if ok >= 4: return 200 return 503- Space
- 1.5 times the object
- What it survives
- Any two drives
All shards are sent at the same time; the quorum only decides when the write counts as done.
In the real world
The same minio doing real jobs. Pick one and step through it.
Four nodes with four drives each, one set of 16, EC:4.
Step 1 of 3
Healthy
| Node 1 | Node 2 | Node 3 | Node 4 | |
|---|---|---|---|---|
| shards | 4 | 4 | 4 | 4 |
16 of 16
Each node holds four shards of every object.
Step 1: Healthy
Common mistakes
The bugs interviewers watch for, with the fix beside each.
Starting on the archived edition
criticalIt gets no security fixes. A storage server without patches is a growing risk.
Wrongimage: minio/minio:latestRight# AIStor with a licence, Ceph,# or a managed S3 serviceParity mistaken for backup
criticalA delete removes every shard, and a fire removes every drive.
Wrong# EC:4, so no backupRight# EC:4 + versioning# + second siteAll shards in one rack
majorOne power strip takes more than M shards at once.
Wrongrack A: 16 drives of the setRight4 racks: 4 drives of the set eachRAID or NFS below
majorProtection is paid twice, and file system promises that MinIO relies on may not hold.
Wrongminio server /mnt/nfsRight# plain local drives, XFSminio server /mnt/drive{1...4}/dataFull before planning
minorA full cluster refuses writes, and hardware takes weeks to arrive.
Wrongalert at 95%Rightplan the next pool at 70%
Interview tips
How to explain it
- Cut, add parity, spread.
- Any K of N bring it back.
- A hash finds the set.
Numbers
- 12 + 4 uses 1.33 times.
- Write needs one more at half.
- Count shards per rack.
Edition
- Open source: archived.
- AIStor Free: one node.
- Several nodes: subscription.
Before production
- Second site tested.
- Own keys per application.
- Exit by the S3 API rehearsed.