Every Fly deployment interacts with registry.fly.io
. That’s where we store the docker image that gets transmogrified into a running firecracker VM. fly deploy
will push an image to registry.fly.io
and then flyd or nomad will pull that image when creating or updating an instance.
The registry stores images in the iad (Ashburn, Virginia USA) region. fly deploy
can struggle to push the image to the registry when run far away from Virginia USA, like say from Sydney. That’s because pushing gigabytes, or even lots of megabytes, of docker image content from Sydney to Virginia is… difficult. Packets get lost, timeouts occur, retries are needed all resulting in slow or even failed deployments.
We’re changing that today! We’re bringing the registry storage closer to you using our global network. Deploying from Sydney? We’ll store the docker image in Sydney. Deploy from Singapore and we’ll store the image in Singapore. Virginia => Virginia. This makes it more reliable and faster to deploy your applications.
Deploy using registry2.flyio.net
to test out this preview:
export FLY_REGISTRY_HOST=registry2.flyio.net
fly deploy
Make sure to run FLY_REGISTRY_HOST=registry2.flyio.net fly auth docker
if you directly push images with docker push
.
Let us know how it goes! We’d love to hear about bugs, performance & reliability changes, and anything else you encounter in the thread below.
Notes about the preview
The preview is starting with registry storage in iad (Ashburn, Virginia USA), sin (Singapore, Singapore), and syd (Sydney, Australia) regions. We’ll be adding more regions during the preview. The goal is to have storage in every region so deployments can be fast and reliable around the globe. We’re working on it!
You can switch back to the default registry at anytime by unsetting the FLY_REGISTRY_HOST
environment variable and then re-running deployments. It is safe to switch between the default registry and registry2 as much as you need.
Other global registry use cases
Do you have a use case for a global docker registry outside of fly deploy
? We’d love to hear from you! Post a message below or reach out to hello@fly.io to share those use cases.
We’re considering making a standalone registry product. No promises or anything yet. If we hear some real use cases that will definitely help us prioritize standalone registry work, though!