Skip to content

Commit 33190e6

Browse files
RUBY-2807 - Add "compressors" option to Mongoid.yml (#5698)
* Add "compressors" option to Mongoid.yml Also removes connection string note from docs * Update docs * Move compressors above SSL in the docs
1 parent aa9c9d6 commit 33190e6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

source/reference/configuration.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ for details on driver options.
239239
# not belong to this replica set will be ignored.
240240
replica_set: my_replica_set
241241

242+
# Compressors to use for wire protocol compression. (default is to not use compression)
243+
compressors: ["zstd", "snappy", "zlib"]
244+
242245
# Whether to connect to the servers via ssl. (default: false)
243246
ssl: true
244247

@@ -260,9 +263,6 @@ for details on driver options.
260263
# used to validate certs passed from the other end of the connection.
261264
ssl_ca_cert: /path/to/ca.cert
262265

263-
# Compressors to use. (default is to not use compression)
264-
compressors: [zlib]
265-
266266
# Configure Mongoid-specific options. (optional)
267267
options:
268268
# Application name that is printed to the MongoDB logs upon establishing
@@ -755,9 +755,7 @@ the Ruby driver, which implements the three algorithms that are supported by Mon
755755
requires the `zstd-ruby <https://rubygems.org/gems/zstd-ruby>`_ library to
756756
be installed.
757757

758-
To use wire protocol compression, at least one compressor must be explicitly requested
759-
using either the `compressors URI option <https://www.mongodb.com/docs/manual/reference/connection-string/#mongodb-urioption-urioption.compressors>`_,
760-
or directly within the ``mongoid.yml``:
758+
To use wire protocol compression, configure the Ruby driver options within ``mongoid.yml``:
761759

762760
.. code-block:: yaml
763761

0 commit comments

Comments
 (0)