Search code examples
loadload-balancingprivatemultiple-instancesdocker-registry

Can I run multiple private docker registry behind load balancer?


I was wondering if it's possible to run multiple docker registry hosts under an ELB or (any load balancer for that matter). I am planning to run the private docker registry inside a docker container. Has anyone tried that? Any ideas for how to have Docker registry containers autoheal without using cluster management tools like mesos, is that possible? For now with one docker registry container on an ec2 instance I could easily use an ELB for the health check and just tear down and spin up a baked AMI with the docker registry. But just curious if I can run a clustered setup for a docker registry (multiple docker regsitry containers on multiple ec2s or a single high end ec2.


Solution

  • We're currently performing testing of a private Docker registry behind an AWS ELB, and it appears the ELB is modifying the request/response in a way that prevents this from working properly (tcp connection timeouts are the symptom). We're still performing testing, but we may simply use DNS load balancing with service checks if an ELB is unable to properly proxy connections to the registry.

    EDIT: As of Monday, March 23rd 2015 it appears that AWS ELBs can properly pass docker traffic between clients and backend Docker registry instances.

    EDIT 2: We've moved away from managing our own Docker registry in AWS and now use the AWS container registry. We've found this to be a superior experience if you're in need of a container registry while running within AWS.