Sharding არის MongoDB-ის მეთოდი ჰორიზონტალური სკალირებისთვის — მონაცემების განაწილება რამდენიმე სერვერზე (shards) ისე, რომ მონაცემთა ბაზა შეძლოს მონაცემების და მოტრაფიკის დამუშავება, რომელიც ერთი სერვერის შესაძლებლობებს აღემატება. იგი ყოფს მონაცემებს shard key-ის მიხედვით, MongoDB-მა კი გამოკითხვები სწორ shard-ებში გადაამისამართებს.
რატომ უნდა shard: სკალირება ერთი სერვერის ფარგლებს ფარგლებს გარეთ
A single server has limits (storage, RAM, write throughput). When data/load exceeds
what one server (even a powerful one) can handle, SHARDING distributes it:
→ data is split across multiple SHARDS (each a replica set)
→ each shard holds a SUBSET of the data → combined capacity scales horizontally
→ handles huge datasets and high write throughput
