AlgoViz

MinIO

medium 26 min

MinIO 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

Our systemClientNodehash of the nameDrive 1Drive 2Drive 3Drive 4Drive 5Drive 6

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 1Node 2Node 3Node 4
shards4444

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

    critical

    It gets no security fixes. A storage server without patches is a growing risk.

    Wrong
    image: minio/minio:latest
    Right
    # AIStor with a licence, Ceph,# or a managed S3 service
  • Parity mistaken for backup

    critical

    A delete removes every shard, and a fire removes every drive.

    Wrong
    # EC:4, so no backup
    Right
    # EC:4 + versioning# + second site
  • All shards in one rack

    major

    One power strip takes more than M shards at once.

    Wrong
    rack A: 16 drives of the set
    Right
    4 racks: 4 drives of the set each
  • RAID or NFS below

    major

    Protection is paid twice, and file system promises that MinIO relies on may not hold.

    Wrong
    minio server /mnt/nfs
    Right
    # plain local drives, XFSminio server /mnt/drive{1...4}/data
  • Full before planning

    minor

    A full cluster refuses writes, and hardware takes weeks to arrive.

    Wrong
    alert at 95%
    Right
    plan 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.