Scaling Docker #5 – Routing DNS to Docker images running on a CoreOS Cluster

Our last piece of the Docker puzzle - we need to dynamically direct DNS to our Docker load balancers! Once this is all up and running, it's so stinking fun to deploy and scale entirely new applications onto our infrastructure with just a few commands!

- Cluster computing - CoreOS is our solution here. CoreOS allows us to make an expandable cluster of computers so we can add more computers should our application need more power to scale. CoreOS also allows us to run services on any machine in the cluster and they can all communicate with each other.

- Scheduling: we shouldn't manually choose which app runs on which machine - this idea doesn't work at scale. Fleet will be our scheduler that decides where our apps/services run. If a CoreOS machine goes down, fleet will reschedule any services that it was running onto a new machine.

- Service Registration
Since we never know what ip address or port a service will be running on, we need to register that service so other services can find it and communicate with it. We'll use Etcd and Flannel for this

- Service Discovery:
Now that services have registered, we can discover them and load balance between them with a generic docker nginx container

- Public DNS: Once the app is working, we need a fixed way for the outside world to access it. We'll use Nginx and Confd for this. Confd will watch Etcd for service registration and when services come/go, it will build a new configuration file for Nginx and reload Nginx.

code source

  • Thank you very much for creating such a great videos series , it has given very good understanding of Docker + CoreOS cluster integration. If you dont mind can you please share configuration files and Dockerfiles which you used in this video for my future reference.

    Thanks Again for this greate video series.

    View Comment
  • awesome video series, thanks a lot for sharing this knowledge :)
    im gonna start testing stuff right now! :D

    View Comment
  • Such a great series. I watched all 8 videos in the play list twice now :). Thanks for being a great teacher!

    View Comment
  • This was one great series. I don't really know when I would do the load balancing part but, I really liked how docker-nginx-coreOS co-ordinated with each other.

    Thanks a lot.

    View Comment
  • How can I run more then one application instance in one host? So someapp@1 and someapp@3 on 1 host machine?

    View Comment
  • I'm a beginner, I'm trying create a web page where if i click an image it would pop up another image in the BG with text / any content over it. Something similar to e-commerce websites' quick view option of a product. Learn Code, got any tutorials for it?
    Please someone share it.

    View Comment
  • Doesn't the single-node nginx + etcd completely negate the whole "high-availability" architecture that we just set up over the past several videos? We just passed lack of fail-over up the chain. Turtles all the way down?

    Edit: It seems that DigitalOcean released "Floating IPs" in October for High-Availability. The link to the blog post:

    View Comment
  • hey I I've been looking for a guy that can make a website for me for not alot of money can you message me back thank you

    View Comment
  • Thank you for making this. I was a big fan of this series, because it's unlike almost anything else you can find on youtube in terms of tech tutorials. As someone looking to get more into DevOps, this series was very interesting to me, and I hope more like it come in the future.

    View Comment
  • meow

    View Comment