Why is the Docker vfs backup not considered suitable for production?

The backend for storing Docker vfs is mentioned in several places as a non-production server (see, for example, this Docker GitHub comment on the release of Michael Crosby). What makes it unsuitable for production?

The Atomic project storage backend description says:

The vfs backend is a very simple backup that does not support copy to write. Each layer is a separate directory. Creating a new layer based on another level is done by creating a deep copy of the base layer in a new directory.

Since this backend does not use disk space between layers, and since creating a new layer is a slow operation, this is not a very practical backend. However, it still uses it, for example, to check other backends, or if you need a super reliable (if slow) backend that works everywhere.

In accordance with this description, this sounds like the only drawback is that you can use more disk space, and creating layers can be slower. But when accessing files, there is no mention of run-time flaws, and it is even described as "reliable." The problem with disk space in itself does not look like a blocker for use in production.

+6
source share
1 answer

In fact, you can use the vfs driver in production, but keep in mind that since it is a โ€œnormalโ€ copy, you wonโ€™t be able to use the functions that devicemapper or btrfs can provide, and you rely solely on the underlying file system.

The lack of runtime is that it is much slower than run . After starting, if you have the same base file system, it will be the same.

In short, I would recommend against, because:

  • It was first implemented for tests, which are then used for volumes. It was never intended to be used at runtime.
  • It relies on the main file system, so you give less control over Docker over your files. This may (or may not) cause problems with a future update. The very purpose of Docker is to abstract the host, so you better delegate these things to Docker.
  • It takes a lot of disk space
  • It takes a long time to start or commit
+7
source

Source: https://habr.com/ru/post/972170/


All Articles