Reducing costs has been a focus area for us ever since the COVID pandemic started. We recently published a blog post on this topic. One of the promine

Reducing data transfer costs with a Docker registry cache

submited by
Style Pass
2021-06-13 11:00:07

Reducing costs has been a focus area for us ever since the COVID pandemic started. We recently published a blog post on this topic. One of the prominent contributors to our AWS costs was the data transfer of our internal Docker registry. We use the Oregon region for our development environment & Singapore region for the production environment because of the cost difference between different AWS regions. This multi-region setup led to high costs of data transfer. In this post, we will talk about how we managed to reduce this cost.

We run the Docker registry on EC2 instances with AWS S3 as a storage backend for images and AWS CloudFront as CDN for caching images. Docker registry container behind an Nginx proxy for authentication. We use the way recommended in the documentation.

To save data transfer costs from outside the VPC, we disabled CloudFront middleware from the configuration. Removing CloudFront from our configuration impacted our Docker pull times in the Oregon region, but there was no impact in pull times for the Singapore region since the S3 bucket storing all the Docker images is in the Singapore region as well.

Leave a Comment