Docker Inc.’s introduction of container technology in 2013 set the industry standard for containers, a software development approach that isolates an app from its environment. The result: Developers can effortlessly create modern apps that run on many different types of machines and system environments.
Docker combines Docker Hub, the world’s largest marketplace of trusted content and integrations, with leading tools that allow developers to efficiently and collaboratively build, run, and share applications. Docker Hub supports more than 2 million active developers monthly and handles more than 500 million downloads daily. Through Docker Hub, developers can access free public repositories for storing and sharing images or subscribe to private repositories where they can upload their own app code.
Docker’s developer platform provides an unmatched experience for creating an integrated, reliable, and secure workflow that speeds app delivery to the cloud. Docker Desktop provides Mac, Linux, and Windows environments for building and sharing containerized applications and microservices.
When Docker’s contract for its AWS-based content delivery network (CDN) came up for renewal, the company’s platform group thoroughly investigated available options as part of the contract renewal process. The research led to implementing the Cloudflare CDN to handle download requests from Docker Hub. The primary reason was Cloudflare’s ability to cache content closer to users, which speeds the fulfillment of user download requests while ensuring security and reliability.
According to Brett Inman, Senior Manager of Engineering at Docker, implementing Cloudflare was simple and straightforward. However, the company became increasingly concerned about the rapidly rising egress fees incurred when download requests required the transfer of content from Amazon Simple Storage Service (S3) to Cloudflare servers.
“Essentially, the egress from S3 was costing us almost as much as we were paying Cloudflare to then serve that traffic to users,” Inman explains. “Our cache hit ratio was already at 97%, which is quite high and more than sufficient for many companies. But, because of our huge request volume, we needed to boost the ratio even higher to bring down the costs associated with pulling content from S3 to satisfy requests.”
Cloudflare CDN’s tiered caching ensures that the content users request the most is stored as close as possible to them. For Docker, this means faster and more efficient downloads. When cache storage in a particular data center nears capacity, Cloudflare “evicts” less-popular content to make room for the content that’s requested more frequently.
“Using eviction as a caching approach works well for most companies,” Inman says. “But when a developer requests content that has been evicted from our cache, that content has to be served from its origin in S3. Because of our massive content volume and huge number of requests, the egress costs are substantial. So when Cloudflare announced the Cache Reserve beta, we were enthusiastic about trying it.”
Cache Reserve ensures that cached content that hasn’t been requested for a long time remains in cache. This eliminates the need to go back to the source for that content. Cache Reserve increased Docker’s cache hit ratio from 97% to more than 99%.
“The 2% cache hit ratio improvement enabled by Cache Reserve has eliminated roughly two-thirds of our S3 egress. The reduction in egress charges is almost an order of magnitude larger than the price we paid for Cache Reserve.”
While Docker Hub is a place where people go for public content, many Docker customers also upload private application code and images, which they store in their own repositories on the Docker platform. Preventing unauthorized access to these private repositories is essential. Docker uses Cloudflare Workers to keep private content safe.