Skip to content

DOCS-7339: Sharding Reorganization #2657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 154 additions & 0 deletions config/htaccess.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4720,4 +4720,158 @@ type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/core/sharding-introduction'
to: '/sharding'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/core/sharding'
to: '/sharding'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/core/sharded-cluster-architectures'
to: '/core/sharded-cluster-components'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/core/sharded-cluster-architectures-production'
to: '/core/sharded-cluster-components'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/core/sharded-cluster-architectures-test'
to: '/core/sharded-cluster-components'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/core/sharded-cluster-operations'
to: '/sharding'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/core/sharded-cluster-mechanics'
to: '/sharding'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/core/sharding-chunk-migration'
to: '/core/sharding-balancer-administration'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/core/sharding-chunk-splitting'
to: '/core/sharding-data-partitioning'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/core/sharding-shard-key-indexes'
to: '/core/sharding-shard-key'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/core/sharded-cluster-metadata'
to: '/core/sharded-cluster-config-servers'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/administration/sharded-clusters'
to: '/sharding'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/administration/sharded-cluster-deployment'
to: '/tutorial/deploy-shard-cluster'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/tutorial/choose-a-shard-key'
to: '/core/sharding-shard-key'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/tutorial/shard-collection-with-a-hashed-shard-key'
to: '/core/hashed-sharding'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/administration/sharded-cluster-maintenance'
to: '/administration/sharded-cluster-administration'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/administration/sharded-cluster-data'
to: '/administration/sharded-cluster-administration'
type: 'redirect'
code: 301
outputs:
- 'after-v3.0'
---
from: '/administration/sharded-cluster-config-servers'
to: '/administration/sharded-cluster-maintenance'
type: 'redirect'
code: 301
outputs:
- 'before-v3.0'
---
from: '/core/hashed-sharding'
to: '/tutorial/shard-collection-with-a-hashed-shard-key'
type: 'redirect'
code: 301
outputs:
- 'before-v3.0'
---
from: '/core/ranged-sharding'
to: '/sharding'
type: 'redirect'
code: 301
outputs:
- 'before-v3.0'
---
from: '/tutorial/deploy-sharded-cluster-hashed-sharding'
to: '/tutorial/deploy-shard-cluster'
type: 'redirect'
code: 301
outputs:
- 'before-v3.0'
---
from: '/tutorial/deploy-sharded-cluster-ranged-sharding'
to: '/tutorial/deploy-shard-cluster'
type: 'redirect'
code: 301
outputs:
- 'before-v3.0'
...
4 changes: 4 additions & 0 deletions config/sphinx_local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ theme:
- /release-notes/3.0
- /release-notes/3.2
- /security
- /sharding
- /core/tag-aware-sharding
- /core/hashed-sharding
- /core/ranged-sharding
- /storage
- /tutorial/change-sharded-cluster-wiredtiger
- /tutorial/query-documents
Expand Down
16 changes: 16 additions & 0 deletions source/administration/sharded-cluster-administration.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
==============================
Sharded Cluster Administration
==============================

.. default-domain:: mongodb

.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol


.. include:: /includes/toc/sharded-cluster-administration.rst

.. include:: /includes/toc/dfn-list-sharded-cluster-administration.rst
17 changes: 17 additions & 0 deletions source/administration/sharded-cluster-config-servers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
============================================
Sharded Cluster Config Server Administration
============================================

.. default-domain:: mongodb

.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol

.. include:: /includes/toc/sharded-cluster-config-server-admin.rst

.. include:: /includes/toc/dfn-list-sharded-cluster-config-server-admin.rst

.. seealso:: :doc:`/administration/backup-sharded-clusters`
6 changes: 4 additions & 2 deletions source/administration/sharded-cluster-data.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:orphan:

===============================
Sharded Cluster Data Management
===============================
Expand All @@ -12,6 +14,6 @@ Sharded Cluster Data Management

The following documents provide information in managing data in sharded clusters.

.. include:: /includes/toc/dfn-list-sharded-cluster-data.rst
.. include /includes/toc/dfn-list-sharded-cluster-data.rst

.. include:: /includes/toc/sharded-cluster-data.rst
.. include /includes/toc/sharded-cluster-data.rst
6 changes: 4 additions & 2 deletions source/administration/sharded-cluster-deployment.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:orphan:

====================================
Sharded Cluster Deployment Tutorials
====================================
Expand All @@ -12,6 +14,6 @@ Sharded Cluster Deployment Tutorials

The following tutorials provide information on deploying sharded clusters.

.. include:: /includes/toc/dfn-list-sharded-cluster-deployment.rst
.. include /includes/toc/dfn-list-sharded-cluster-deployment.rst

.. include:: /includes/toc/sharded-cluster-deployment.rst
.. include /includes/toc/sharded-cluster-deployment.rst
19 changes: 0 additions & 19 deletions source/administration/sharded-cluster-maintenance.txt

This file was deleted.

10 changes: 6 additions & 4 deletions source/administration/sharded-clusters.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. index:: sharded clusters
.. _sharding-sharded-cluster:
:orphan:

=========================
Sharded Cluster Tutorials
Expand All @@ -17,6 +16,9 @@ The following tutorials provide instructions for administering
:term:`sharded clusters <sharded cluster>`. For a higher-level
overview, see :doc:`/sharding`.

.. include:: /includes/toc/dfn-list-spec-sharded-cluster-tutorials-landing.rst
.. TODO -> Remove this page entirely

.. include:: /includes/toc/sharded-cluster-tutorials-landing.rst

.. include /includes/toc/dfn-list-spec-sharded-cluster-tutorials-landing.rst

.. include /includes/toc/sharded-cluster-tutorials-landing.rst
2 changes: 1 addition & 1 deletion source/core/data-model-operations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Sharding

MongoDB uses :term:`sharding` to provide horizontal scaling. These
clusters support deployments with large data sets and high-throughput
operations. Sharding allows users to :term:`partition` a
operations. Sharding allows users to :term:`partition <data partition>` a
:term:`collection` within a database to distribute the collection's
documents across a number of :program:`mongod` instances or
:term:`shards <shard>`.
Expand Down
24 changes: 24 additions & 0 deletions source/core/gridfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,27 @@ create it using the :program:`mongo` shell:
the context of sharding.

.. _`GridFS specification`: https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst

Sharding GridFS
---------------

There are two collections to consider with :term:`gridfs` - ``files`` and
``chunks``.

If you need to shard a GridFS data store, use the ``chunks`` collection
setting ``{ files_id : 1, n : 1 }`` or ``{ files_id : 1 }`` as the shard key
index.

``files_id`` is an :term:`objectid` and changes
:ref:`monotonically<shard-key-monotonic>`.

You cannot use :doc:`/core/hashed-sharding` when sharding the ``chunks``
collection.

The ``files`` collection is small and only contains metadata. None of the
required keys for GridfS lend themselves to an even distribution in a
sharded environment. If you *must* shard the ``files`` collection, use the
``_id`` field, possibly in combination with an application field.

Leaving ``files`` unsharded allows all the file metadata documents to live
on the :term:`primary shard`.
Loading