EticaAI / eticaai-infrastructure

Quick notes on part of what is done in the Etica.AI project infrastructure
https://github.com/orgs/EticaAI/projects/2
The Unlicense
3 stars 0 forks source link

Load balancing for microservices (first version) #1

Closed fititnt closed 7 years ago

fititnt commented 7 years ago

See Infrastructure strategy for Etica.AI agents: microservices at EticaAI/forum#30


It is interesting to have an infrastructure that abstracts employees from the routing and balance system for applications. I and most of the close people with infrastructure knowledge have experience using HAproxy, NGinx and Varnish as a load balancer.

Now we are considering the use of Træfik (traefik).

This issue is to gather information from the first version of load balancer for microservices of Etica.AI.

fititnt commented 7 years ago

Træfik (pronounced like traffic)

From documentation of https://traefik.io/

Træfik (pronounced like traffic) is a modern HTTP reverse proxy and load balancer made to deploy microservices with ease. It supports several backends (Docker, Swarm mode, Kubernetes, Marathon, Consul, Etcd, Rancher, Amazon ECS, and a lot more) to manage its configuration automatically and dynamically.

architecture

Features

  • It’s fast
  • No dependency hell, single binary made with go
  • Tiny official official docker image
  • Rest API
  • Hot-reloading of configuration. No need to restart the process
  • Circuit breakers, retry
  • Round Robin, rebalancer load-balancers
  • Metrics (Rest, Prometheus, Datadog, Statd)
  • Clean AngularJS Web UI
  • Websocket, HTTP/2, GRPC ready
  • Access Logs (JSON, CLF)
  • Let’s Encrypt support (Automatic HTTPS with renewal)
  • Proxy Protocol support
  • High Availability with cluster mode (beta)

    Supported backends

  • Docker / Swarm mode
  • Kubernetes
  • Mesos / Marathon
  • Rancher (API, Metadata)
  • Consul / Etcd / Zookeeper / BoltDB
  • Eureka
  • Amazon ECS
  • Amazon DynamoDB
  • File
  • Rest API

Interatives tutorials

Katacoda tutorial: https://www.katacoda.com/courses/traefik/deploy-load-balancer

Play-With-Docker: http://training.play-with-docker.com/traefik-load-balancing/

fititnt commented 7 years ago

This Play-With-Docker traefik tutorial is fantastic. Highly recommend it. Since last year I did not work on new projects with docker and this tutorial even shows recent additions like docker swarm, already working together with traefik.

Link: http://training.play-with-docker.com/traefik-load-balancing/

Além de permitir tutorial interativo, você tem acesso a URLs de aplicações testadas. É mais interessante testar com ele para quem esta aprendendo.


traefik

-

captura de tela de 2017-08-27 18-48-41

fititnt commented 7 years ago

It's working (for a first version, of course)