From: Aleš Mrázek Date: Fri, 8 Nov 2024 06:07:28 +0000 (+0100) Subject: doc/user/deployment-docker.rst: added info about cache X-Git-Tag: v6.0.9~2^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fenvironments%2Fdocs-develop-dock-51ud85%2Fdeployments%2F5532;p=thirdparty%2Fknot-resolver.git doc/user/deployment-docker.rst: added info about cache --- diff --git a/doc/user/deployment-docker.rst b/doc/user/deployment-docker.rst index 0ddf0447c..42f5503b3 100644 --- a/doc/user/deployment-docker.rst +++ b/doc/user/deployment-docker.rst @@ -26,6 +26,18 @@ Now you can try sending a query to the resolver using `kdig `_. @@ -42,9 +54,15 @@ Get ``CONTAINER_ID`` using the ``docker ps`` command or give your container name $ docker exec -it CONTANER_ID kresctl reload -.. warning:: - - Beware of running the container with a software defined network (i.e. in Kubernetes). - This will likely to result in some performance losses. - We haven't done any measurements comparing different types of installations so we don't know the performance differences. - If you have done your own measurements yourself, please contact us and we will share it with everyone else. +----- +Cache +----- + +You can also use persistent volume for the cache, but sharing it between more containers requires special option ``--pid=host``. +This is caused by the LMDB's reliance on unique PID numbers, see `issue #637 `_ for more information. +It is also good to mount the cache on ``tmpfs`` (semi-persistent), otherwise it will not work well under heavy load. + +.. code-block:: bash + + $ docker volume create --opt type=tmpfs --opt device=tmpfs cache + $ docker run --rm -ti --pid=host --network host -v cache:/var/cache/knot-resolver docker.io/cznic/knot-resolver:6