After much anticipation, Docker is delivering on the promise of plug-ins for networking and storage. The new frameworks enable 3rd parties to extend Docker containers with features beyond the “batteries included” defaults. Initially released as experimental previews with Docker 1.7, the capabilities are maturing quickly with Docker 1.8. These developments are exciting to us at Datawise.io (now Diamanti) because they enable innovations to improve the performance and production readiness of containers deployed as densely packed, interconnected services across a cluster of hosts.
Docker provides several different networking options. Port-mapping and links are the typical defaults, relying on the docker0 bridge and iptables rules to forward packets between each host, its containers, and the outside world. Virtual network overlays (such as those based on VXLAN) are also starting to emerge, although the overheads of doing packet encapsulation entirely in software often exhibits significant performance overheads. The introduction of libnetwork enables new possibilities. It makes networks first class entities in Docker and gives users the freedom to select different backend implementations that best suit their preferences and environments. The API is very clean and provides a flexible networking model based on networks, endpoints, and sandboxes to isolate the different endpoints (see here for details). Early implementations are encouraging, starting to demonstrate simplified management, interoperability with external network services, and improved performance.
On the storage side, Docker has provided several useful features for managing data. In the simplest use cases, directories and files on a host can be mounted as volumes into a container. In other scenarios, “data volume containers” can be created where the volumes and data from one container can be shared and mounted into other containers using the “volumes-from” option. The volumes created, however, remain tied to individual hosts and require periodic housekeeping to clean-up after they’re no longer being used, or custom scripts to copy/backup data between hosts.
The volume plug-ins framework enables Docker environments to integrate with external, 3rd party storage providers. Like the networking extensions, the API is well designed and centered around a “volume-driver” to specify which external system to use, and a “volume-name” to identify what volume to mount. The volume-provider specified takes responsibility for creating, deleting, mounting, and unmounting volumes as requested by the user (see https://docs.docker.com/extend/plugins_volume/ for details). More interestingly, the external volume-providers can start to implement additional storage services such as replication, migrating volumes between hosts, or taking periodic snapshots.
Overall, these new interfaces provide the flexibility needed to advance multi-host networking and storage capabilities for Docker, and it is exciting to see the rapid progress by the ecosystem.