Automating MongoDB Clusters Jonathan Rudenberg @"tanous Flynn - - PowerPoint PPT Presentation

automating mongodb clusters
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Jonathan Rudenberg

Automating MongoDB Clusters

@"tanous

slide-2
SLIDE 2

Flynn is an easy PaaS

slide-3
SLIDE 3

Flynn

git push and Docker deploys HTTPS load balancing Log aggrega<on Everything is highly available

slide-4
SLIDE 4

Flynn

TCP load balancing Service discovery with DNS Self-bootstrapping and self-hos<ng Database appliances

slide-5
SLIDE 5

Databases are hard.

slide-6
SLIDE 6

Best prac<ces are expensive.

slide-7
SLIDE 7

One command to get a reliable database cluster without talking to a DBA

slide-8
SLIDE 8

Produc<on parity Infrastructure portability Self-serve access

slide-9
SLIDE 9

Safe out of the box Clusters not singletons Easy management

slide-10
SLIDE 10

PostgreSQL

slide-11
SLIDE 11

PostgreSQL MySQL

slide-12
SLIDE 12

State Machine

slide-13
SLIDE 13

P S A

slide-14
SLIDE 14

github.com/joyent/manatee-state-machine

slide-15
SLIDE 15

PostgreSQL MySQL MongoDB

slide-16
SLIDE 16

P S A

slide-17
SLIDE 17

P S A

priority:0 hidden priority:1 priority:0

slide-18
SLIDE 18

S

priority:0

P

priority:1

slide-19
SLIDE 19

discoverd

Peer discovery Compare and swap service metadata Leader registra<on HTTP/DNS

slide-20
SLIDE 20

leader.mongodb.discoverd:27017

slide-21
SLIDE 21

MongoDB bugs

slide-22
SLIDE 22

Replica set reconfigura<on implosion

slide-23
SLIDE 23

if (args.force) { incrementVersionByRandom(config); }

slide-24
SLIDE 24

Demo

slide-25
SLIDE 25

flynn.io | @<tanous

slide-26
SLIDE 26

flynn resource add mongodb

slide-27
SLIDE 27

MONGO_DATABASE=b5cf103f4f2a1446104a275ebb7aa7af MONGO_HOST=leader.mongodb.discoverd MONGO_PWD=381b4fa2c05073b88ac7b061d06da2ee MONGO_USER=c3fd8b67fef657dcb4074cb409a77e32

slide-28
SLIDE 28

flynn mongodb dump

slide-29
SLIDE 29

flynn mongodb mongo

slide-30
SLIDE 30

Primary handles reads/writes Sync can take over for primary Async can transi6on to sync Unassigned Deposed

slide-31
SLIDE 31

Primary → Deposed Sync → Primary Async → Sync Unassigned → {Primary, Sync, Async} Deposed

slide-32
SLIDE 32

Genera<on number Current primary Assigned sync Ini<al WAL Async list

slide-33
SLIDE 33

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

slide-34
SLIDE 34

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