Cluster
Cluster is how bigger MySQL setups split or copy data. Replication: one primary takes writes, replicas copy via the binary log (binlog) for reads/backups. Sharding: split rows across servers by a key (app-level or extra tools). Partitioning: split one table into pieces on the same server (PARTITION BY RANGE …).
A fresher viva: ‘we replicate for backup/read scale; we shard only when one server cannot hold the data.’ Don’t design sharding on day one of a college project.
Trap: calling PARTITION the same as SHARD. Trap: replica as a second writable primary without a plan (see primary-primary only if they ask).
On the example next to this theory: Cluster: create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.
Replication vs partition vs shard in one line each.