现代的HTTP反向代理和负载平衡器:Træfɪk

jopen 9年前

Træfɪk是一个现代的HTTP反向代理和负载平衡器,能够很方便得实现微服务部署。它支持多种后端 (Docker , Mesos/Marathon, Consul, Etcd, Rest API, file...) 来自动,动态地管理它的配置。

特性

  • No dependency hell, single binary made with go
  • Simple json Rest API
  • Simple TOML file configuration
  • Multiple backends supported: Docker, Mesos/Marathon, Consul, Etcd, and more to come
  • Watchers for backends, can listen change in backends to apply a new configuration automatically
  • Hot-reloading of configuration. No need to restart the process
  • Graceful shutdown http connections during hot-reloads
  • Circuit breakers on backends
  • Round Robin, rebalancer load-balancers
  • Rest Metrics
  • Tiny docker image included
  • SSL backends support
  • SSL frontend support
  • WebUI

Plumbing

  • Oxy: an awsome proxy library made by Mailgun guys
  • Gorilla mux: famous request router
  • Negroni: web middlewares made simple
  • Graceful: graceful shutdown of http.Handler servers

Quick start

./traefik traefik.toml
  • Use the tiny Docker image:
docker run -d -p 8080:8080 -p 80:80 -v $PWD/traefik.toml:/traefik.toml emilevauge/traefik
  • From sources:
git clone https://github.com/EmileVauge/traefik

项目主页:http://www.open-open.com/lib/view/home/1443190840091