Horizontal scaling
Sharding partitions data across shards via a shard key. Bad keys cause hotspots (e.g. monotonic _id on one shard).
Quirk: Changing a shard key later is painful. Design for distribution upfront — hashed shard keys help spread writes.
Output
Press Run to execute your code.