# MongoDB Sharded

MongoDB Sharded is a pre-packaged sharded MongoDB deployment that distributes large datasets across multiple shard servers. It is open source and self-hosted, installable on Docker Hub and Kubernetes (Helm).

Canonical page: https://ourlocalhost.com/app/6421/mongodb-sharded

## Description

MongoDB Sharded is a pre-packaged sharded MongoDB deployment that distributes large datasets across multiple shard servers. It is for self-hosted applications needing horizontal database scaling, and it helps maintain performance and availability as data volume grows.

## Platform availability

Available on 1 of 10 platforms: Helm.

## Health score

33/100 (Low), based on 2 of 4 factors.
- Easy to install: 35 (1 install platform, install notes, Docker image)
- Light to run: 30 (4 GB minimum RAM)

## Links

- Docker Hub: https://hub.docker.com/r/bitnamicharts/mongodb-sharded
- Kubernetes (Helm): https://artifacthub.io/packages/helm/bitnami/mongodb-sharded

## Common questions

### Can sharding be used to keep customer data in a specific region?

Yes. MongoDB sharding can route data by a key such as customerId so that records stay in the US or Europe. This can be used for data-location requirements rather than only for horizontal scaling.

### What components are needed for a self-managed sharded cluster?

Deploy a mongos router, a config server replica set, and shard replica sets. You should also ensure connectivity and security between those components.

### What extension does a PHP service need before it can connect to MongoDB?

Install the MongoDB PHP extension with your package manager and make sure it is enabled. Without it, the app may fail with missing-extension or connection errors.

### How is search configured in a Laravel service that uses MongoDB?

Add Laravel Scout only if you need MongoDB search. Use Composer to add it and run the artisan command to publish its config.

### What packages are required to store and read files in MongoDB GridFS?

Install the Flysystem GridFS and read-only packages with Composer. Without them, the app may throw a missing-package RuntimeException when reading or listing files.

## Alternatives

- Apache Cassandra
- CockroachDB: CockroachDB is a distributed SQL database for developers and operators of transactional applications that need horizontal scaling and resil…
- CouchDB: CouchDB is a document-oriented NoSQL database with a RESTful HTTP/JSON interface for storing, querying, and synchronising JSON documents ac…
- FerretDB: FerretDB is an open-source MongoDB compatibility proxy for self-hosted stacks.
- KeyDB: KeyDB is a distributed, Redis-compatible key-value database that adds true multi-master replication, letting any number of servers accept w…
- Microsoft SQL Server: SQL Server delivers on Microsoft’s Data Platform vision by helping your organization manage your data by enabling you to store data from st…
- MongoDB: MongoDB is an open-source, document-oriented NoSQL database that stores flexible, JSON-like documents, helping developers and self-hosters…
- MySQL Community Edition: Free GPL database platform supporting SQL and NoSQL applications with InnoDB storage, replication, clustering, connectors, and cross-platfo…
- PostgreSQL: PostgreSQL (Postgres) is an open source object-relational database known for reliability and data integrity.
- RavenDB: RavenDB is an open-source, transactionally consistent document database that stores application data in flexible records, helping developer…
- Redis: Redis is a fast, in-memory data structure store that can be used as a database, cache, and message broker.
- SQLite: SQLite is a lightweight, embedded relational database engine that stores an entire database in a single file on your device.

---
Source: Our Local Host (https://ourlocalhost.com/app/6421/mongodb-sharded), the self-hosted and open-source app directory.
