Shared and Sharedv4 Volumes
Through shared and sharedv4 volumes (also known as a global namespace), a single volume’s filesystem is concurrently available to multiple containers running on multiple hosts.
A typical pattern is for a single container to have one or more volumes. Conversely, many scenarios would benefit from multiple containers being able to access the same volume, possibly from different hosts. Accordingly, the shared volume feature enables a single volume to be read/write accessible by multiple containers. Example use cases include:
- A technical computing workload sourcing its input and writing its output to a shared volume.
- Scaling a number of Wordpress containers based on load while managing a single shared volume.
- Collecting logs to a central location
Difference between shared and sharedv4 volumes, is the underlying protocol that is used to share this global namespace across multiple hosts.