Scaling Docker #4 - Docker Service Discovery and Load Balancing

preview_player
Показать описание
Now that we've registered all of our docker services, load balancing between them is easy.

- 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.

-~-~~-~~~-~~-~-
Also watch: "Responsive Design Tutorial - Tips for making web sites look great on any device"
-~-~~-~~~-~~-~-
Рекомендации по теме
Комментарии
Автор

Nice tutorials about scaling docker. Everything is explained with a good clear voice. (y)

ZigzagKazak
Автор

I know this is an unrelated, but have you thought of making a video about how folder structure and naming conventions looks like in a professional development environment? It would be helpful to learn how to organize stuff properly. :)

gaborzeller-daczi
Автор

Hi, when I try to access someapp-lb using its ip address and port, it returns a 502 bad gateway error. What could be the problem?

RenzoLLB
Автор

It will be great if you make some videos on ECMAscript 6.

matrixzoo
Автор

how big does a project have to be before load balancing is required?

MarcelRobitaille