From 3b896617b0177f42b4dd2f26027f326399f9a14e Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Sat, 5 Oct 2024 12:32:44 -0400 Subject: [PATCH] Add FAQ about volumes Closes coop-cloud/organising#613 --- docs/intro/faq.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/intro/faq.md b/docs/intro/faq.md index 6cf098f..fb09d6d 100644 --- a/docs/intro/faq.md +++ b/docs/intro/faq.md @@ -175,3 +175,18 @@ By using Co-op Cloud infrastructure over private cloud infrastructure, you creat - You may interact with a server provider that is more ethical than Big Tech. Although the server provider may still succumb to law enforcement, you might place more trust in some providers than in private cloud providers (e.g. AWS). - You may be able to situate your servers in locations that are relatively more impervious to law enforcement attempts to dismantle your infrastructure. Indeed, if you deployed your infrastructure in a relatively secure setting such as Switzerland, then you would weather a greater chance of keeping your infrastructure alive than if you deployed it in, say, the United States. Protonmail and [Extinction Rebellion (XR)](https://www.youtube.com/watch?v=I_O3zj3p52A) choose Switzerland for their servers, for reasons along these lines. + +## Why are named volumes used instead of bind mounts? + +Many folks using Docker are probably used to using bind mounts; these are recommended in many (most?) upstream docker-compose files, and at one point Docker recommended bind mounts over named mounts due to poor performance of the Linux named volume storage drivers. + +It seems like this recommendation changed by the time Co-op Cloud was initiated: + +> Volumes are the preferred way to persist data in Docker containers and services.
+> — [Docker "Storage" docs](https://docs.docker.com/engine/storage/#good-use-cases-for-volumes) + + +> Volumes provide the best and most predictable performance for write-heavy workloads. This is because they bypass the storage driver and don't incur any of the potential overheads introduced by thin provisioning and copy-on-write. Volumes have other benefits, such as allowing you to share data among containers and persisting your data even if no running container is using them.
+> — [Docker OverlayFS docs](https://docs.docker.com/engine/storage/drivers/overlayfs-driver/#use-volumes-for-write-heavy-workloads) + +Following these recommendations, Co-op Cloud exclusively uses named volumes (except for rare special-case bind mounts, like Traefik and Caddy getting access to the host's `/var/run/docker.sock`).