Jonathan Rudenberg
Automating MongoDB Clusters Jonathan Rudenberg @"tanous Flynn - - PowerPoint PPT Presentation
Automating MongoDB Clusters Jonathan Rudenberg @"tanous Flynn - - PowerPoint PPT Presentation
Automating MongoDB Clusters Jonathan Rudenberg @"tanous Flynn is an easy PaaS Flynn git push and Docker deploys HTTPS load balancing Log aggrega<on Everything is highly available Flynn TCP load balancing Service discovery with DNS
Flynn is an easy PaaS
Flynn
git push and Docker deploys HTTPS load balancing Log aggrega<on Everything is highly available
Flynn
TCP load balancing Service discovery with DNS Self-bootstrapping and self-hos<ng Database appliances
Databases are hard.
Best prac<ces are expensive.
One command to get a reliable database cluster without talking to a DBA
Produc<on parity Infrastructure portability Self-serve access
Safe out of the box Clusters not singletons Easy management
PostgreSQL
PostgreSQL MySQL
State Machine
P S A
github.com/joyent/manatee-state-machine
PostgreSQL MySQL MongoDB
P S A
P S A
priority:0 hidden priority:1 priority:0
S
priority:0
P
priority:1
discoverd
Peer discovery Compare and swap service metadata Leader registra<on HTTP/DNS
leader.mongodb.discoverd:27017
MongoDB bugs
Replica set reconfigura<on implosion
if (args.force) { incrementVersionByRandom(config); }
Demo
flynn.io | @<tanous
flynn resource add mongodb
MONGO_DATABASE=b5cf103f4f2a1446104a275ebb7aa7af MONGO_HOST=leader.mongodb.discoverd MONGO_PWD=381b4fa2c05073b88ac7b061d06da2ee MONGO_USER=c3fd8b67fef657dcb4074cb409a77e32
flynn mongodb dump
flynn mongodb mongo
Primary handles reads/writes Sync can take over for primary Async can transi6on to sync Unassigned Deposed
Primary → Deposed Sync → Primary Async → Sync Unassigned → {Primary, Sync, Async} Deposed
Genera<on number Current primary Assigned sync Ini<al WAL Async list
Components
(HTTP, TCP, TLS, Load Balancing) ROUTER
(Runs containers)
DATABASE APPLIANCES LOG AGGREGATOR CONTROLLER SCHEDULER SERVICE DISCOVERY HOST SERVICE DEPLOY HEALTH SERVICE USER APPS USER APPS USER APPS USER APPS USER APPS
Git Receiver Slugbuilder Blobstore
WEB DASHBOARD
DB A A A A A A DB A A A A F F F A A DB DB A A A A A A A A F F F A A A A DB A A A A A A DB F F F