MongoDB has the Sharding (Fragmentation) feature!
It is a method that Mongo allows you to enable in collections, preferably giant ones (many documents), distributing the collection's documents across different machines and providing greater performance in operations that may be carried out on fragmented collections.
Mongo divides the documents in a collection by a shard key, which can be one or several fields in the documents.
GitHub link using Spring Boot and Sharding: https://github.com/oigorrudel/mongodb-shard-example
Sources:
https://www.mongodb.com/pt-br/docs/manual/sharding/
https://docs.spring.io/spring-data/mongodb/reference/mongodb/sharding.html
The above is the detailed content of MongoDB Sharding. For more information, please follow other related articles on the PHP Chinese website!