From 5d78217ab73b5dc3d9d6dcee3b1703d82338940c Mon Sep 17 00:00:00 2001 From: Casey Clements Date: Fri, 22 Mar 2024 16:23:21 -0400 Subject: [PATCH] Added Network Compression section to Configuration docs page --- doc/configuration.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/configuration.rst b/doc/configuration.rst index bde43025..97e6b861 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -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 `_. +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 `_ +and zstandard requires `zstandard `_:: + + $ python3 -m pip install "pymongo[snappy, zstd]"