Skip to content

Commit

Permalink
[Motor-1175] Document Network Compression (#271)
Browse files Browse the repository at this point in the history
* Clean up link to TLC cheat sheet

* Added Network Compression section to Configuration docs page

* Fix typo pymongo -> motor
  • Loading branch information
caseyclements committed Mar 23, 2024
1 parent 7bcea04 commit 0f1a6cd
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions doc/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ and executing the following command::

You should see "TLS 1.X" where X is >= 1.

You can read more about TLS versions and their security implications here:
You can read more about TLS versions and their security implications in this `cheat sheet`_.

`<https://cheatsheetseries.owasp.org/cheatsheets/Transport_Layer_Security_Cheat_Sheet.html#only-support-strong-protocols>`_

.. _python.org: https://www.python.org/downloads/
.. _homebrew: https://brew.sh/
.. _macports: https://www.macports.org/
.. _requests: https://pypi.python.org/pypi/requests
.. _cheat sheet: https://cheatsheetseries.owasp.org/cheatsheets/Transport_Layer_Security_Cheat_Sheet.html#only-support-strong-protocols

Thread Pool Size
''''''''''''''''
Expand All @@ -46,3 +46,17 @@ system; to override the default set the environment variable ``MOTOR_MAX_WORKERS

Some additional threads are used for monitoring servers and background tasks, so the total
count of threads in your process will be greater.

Network Compression
'''''''''''''''''''

Like PyMongo, Motor supports network compression where network traffic between
the client and MongoDB server are compressed.
Keyword arguments to the Motor clients match those in MongoClient, documented
`here <https://pymongo.readthedocs.io/en/stable/examples/network_compression.html>`_.
By default no compression is used. If you wish to use wire compression,
you will have to install one of the optional dependencies.
Snappy requires `python-snappy <https://pypi.org/project/python-snappy>`_
and zstandard requires `zstandard <https://pypi.org/project/zstandard>`_::

$ python3 -m pip install "motor[snappy, zstd]"

0 comments on commit 0f1a6cd

Please sign in to comment.