Start here. This is the direct spoken answer to practice first.
Why this question matters
Sharding can raise storage and write capacity, but it permanently changes queries, transactions, operations, and recovery. It belongs after simpler scaling options have been measured and exhausted.
I would partition only after confirming that vertical scaling, query tuning, archiving, read replicas, and workload isolation cannot meet the target. The shard key must be stable, available on common requests, and distribute both data and traffic. Tenant id can provide useful locality for a SaaS product, while a hash can spread load more evenly. The application or a routing service maps the key to a shard, and each request stays on one shard whenever possible. Cross-shard joins and transactions become expensive, so the domain boundary and access patterns need to fit the partition.