- [Instructor] When it comes to using persistent storage
across Docker cluster nodes,
you should keep in mind that volumes
are the recommended way to do this.
However, those volumes still need to be
distributed across the host.
There's a few different ways of accomplishing this.
Here in the Docker documentation,
it covers sharing data among machines.
For example, if you were to build
a fault tolerant application,
you have multiple replications of the same service,
and they all need access to the same files.
Those files need to be distributed from
node to node to node, or host to host to host.
And there's several different ways to do this.
You could do this without involving Docker
in any way.
For example, you could use Amazon S3 and store that data
directly into the public cloud.
But in most cases, you're going to use a volume driver
that supports writing your application data
to some sort of external storage,
such as NFS or VMWare Vsphere.
If we look at the Docket documentation here
on storage volume plug-ins,
you can see, down here on volume plug-ins,
there are many different options available to us.
For example, Azure file storage, which allows you
to share Docker containers as volumes
using the SMB three protocol.
So just like a Windows file share there.
And then there's many options here.
Blockbridge, Contiv, Convoy, Digital Ocean Block Storage,
Flocker, GCE, or Google Compute Engine
where you could store your application data
up in the Google public cloud.
Gluster File System, HPE 3Par, Infinite Volume Plugin,
NetApp, Netshare, Nimble, OpenStorage, Portworx,
Quobyte, Rex-Ray, which allows you to talk to
many different storage providers.
VirtualBox, EC two, Google Compupter Engine,
Open Stack and EMC, and, finally,
the VMWare Vsphere storage plug-in driver.
If we click on that, as with many of these others,
it takes you over to GitHub for you to
get more information and download
this Docker volume driver.
I also recommend that you check out this article
out on the web from TheNewStack that covers
managing persistence for Docker containers.
It goes down and covers all the different options
that you have available to you for
managing persistent data across multiple
Docker hosts and between multiple Docker containers
running on multiple Docker hosts.
So it covers host-based persistence per container,
host-based persistence shared among containers,
and, what we were just talking about here,
multi-host persistence shared among containers
using a distributed file system such as NFS.
It also mentions using Ceph, or the Gluster file system.
And then, finally, it covers volume plug-ins,
which is what we've been talking about here.
And the Docker volume plug-in architecture.
So again, another great resource on using
Docker volume plug-in drivers to share
persistent data across multiple Docker hosts
and multiple Docker containers
running on those hosts.