Load balancing with Docker


(Tanner Filip) #1

We recently moved to hosting with Docker, but there’s one big problem. Once in a while, the page won’t load. I think it has to do with custom files not being synced across our two servers. Since everything is in a container, I’m not quite sure how I should sync them across the servers. I’m not sure that a CDN will work, since it seems like the file names are (somewhat) randomly generated, so won’t we just run into the same problem?

Screenshot of our problem:

/cc @Logan, hopefully you can provide some info I might’ve left out.


(Sam Saffron) #2

If you are going down this path of mega scalability, you are going to need to run your own registry.

bootstrap on one machine, publish image to registry, then pull the image to all nodes.

This is what we do.


(Tanner Filip) #3

Alright, I’ll look into that. Thanks much!


(Aaron Boushley) #4

@sam You mention how you guys bootstrap on one machine and publish to a registry.

How do you handle things like public/uploads which need to be shared between instances? I was thinking about S3, but it looks like that’s discouraged.


(Sam Saffron) #5

We have a glusterfs volume which is shared, considering ceph / moosefs or lizardfs, iterating directories in gluster takes a century