The Problem How do we automate the load balancer and A/B style deployments? for heterogeneous apps? (node.js, Java, etc.) in heterogenous environments (public/private cloud, bare metal) Friday, September 13, 13
Why node.js? • Many connections • Streaming data • Relatively lightweight • Very programmable • Seaport was an excellent head-start Friday, September 13, 13
Thalassa • Registry of services • API for configuring HAProxy • Dynamically set HAProxy backend servers based on registry services name and version • Fault tolerant, do no harm fka “Spindrift” Friday, September 13, 13
Thalassa • Lightweight service registry • Formerly build on top of @substack’s Seaport • Ping and expire based approach through HTTP API • Built on Redis, axon for pub-sub • https://github.com/PearsonEducation/ thalassa Friday, September 13, 13
local res = redis.call('ZRANGEBYSCORE','__thalassa.registrations', 0, 1, 'LIMIT', 0, 100 ) if #res > 0 then redis.call( 'ZREMRANGEBYRANK', KEYS[1], 0, #res-1 ) return res else return false end function onOnline (reg) { pub.send(reg.id, 'online', reg.stringify()); } function onOffline(regId) { pub.send(regId, 'offline'); } The Reaper Friday, September 13, 13
Use of Streams • Aqueduct streams config and HAProxy stats to Crowsnest over a websocket • Crowsnest aggregates and streams to the browser • MuxDemux Friday, September 13, 13
When? • Modules will be officially published this month within the next several weeks • Repositories http://github.com/PearsonEducation Friday, September 13, 13