Skip to content

20170830_srecon17_2.3

20170830_srecon17_2.3

Scriptable LoadBalancer

1 - Middleware LB

Overview
  • Classic LBs
  • Custom LBs (Fb, Google, Fastly, Cloudlfare)

-> In between: “Scriptable loadbalancer”

Scriptable LBs
  • nginScript: Nginx.com properitary lanagage
  • OpenResty (Nginx + Lua)
  • Haproxy + lua (since recently)
Why Scriptable LBs

Begining
* WebServer
* AppServer
* DBServer

Then:
* DB shards

Then:
* MultiDCs

-> Issue: WAN access between AppServer -> DB Shard in an other DC …

=> Went with Nginx +lua

  • Implemented dynamic config with ZK

2 - Edge cache servers

3 - Getting Clever

Using ECMP

4 - Tips / take away

Deterministric config
- Remove Config from the cfg Mgmt tool to make the conf closer the App that needs it, and match the App lifecycle

Testing
- Using all the tooling and automation existing in Dev helps a lot

Stating / Production Deployment
- Treat it like an other App
- Multiple environment
- As close as they can be