Transcript
Page 1: Ops Skills and Tools for Beginners [#MongoDB World 2014]

rainforest @rainforestqa

Ops Skills and Tools for Beginners

Page 2: Ops Skills and Tools for Beginners [#MongoDB World 2014]

Russell Smith!

English guy Mongo DB Master Ex Ops consultant

Ruby / PHP developer YC S12 Alum

Using mongo in Prod since 1.6/1.8

Page 3: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Rainforest QA

!

Insanely simple testing

checkout: www.rainforestqa.com

Page 4: Ops Skills and Tools for Beginners [#MongoDB World 2014]

What is Ops?

Page 5: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Setting up servers / services

Page 6: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Supporting Engineers

Page 7: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Keeping stuff running

Page 8: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Avoiding disasters

Page 9: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Fixing breakage

Page 10: Ops Skills and Tools for Beginners [#MongoDB World 2014]

Lets Learn the basics

Page 11: Ops Skills and Tools for Beginners [#MongoDB World 2014]

Installation

Page 12: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Replicated

Page 13: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Sharded

Page 14: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Best practices

Ubuntu is simplest

Install from Mongo’s repo

Chose the right replica set size: 3 nodes

Never use 32 bits

Page 15: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Alternatives

MongoHQ

MonogLab

ObjectRocket

MMS + AWS (via automation)

Page 16: Ops Skills and Tools for Beginners [#MongoDB World 2014]

Monitoring Mongo

Page 17: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Server components

Page 18: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Storage

magnetic, ssd

metric: disk io

Page 19: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Memory / RAM

fastest general store

metrics; free, swap usage

Page 20: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Network

allows communication

use 1gbit or higher (avoid 100mbit)

metrics; latency, throughput

Page 21: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

CPU

more is better

mostly used

metrics; % usage

Page 22: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Monitoring & Diagnostics

Page 23: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Top things to monitorFailover events

Repl Lag

Connections

Lock %

Disk usage

Page 24: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Hosted is Simplest

Page 25: Ops Skills and Tools for Beginners [#MongoDB World 2014]

MMSHosted, free for monitoring

!

Also can do Backups

Automation

Page 26: Ops Skills and Tools for Beginners [#MongoDB World 2014]

ScoutMonitors mongo, servers and many

others (Plugins!) !

non-free

Page 27: Ops Skills and Tools for Beginners [#MongoDB World 2014]

Server DensityMonitors mongo, servers and many

others (Plugins!) !

non-free

Page 28: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Opensource options

Ganglia

Munin

Nagios

Zabbix

Page 29: Ops Skills and Tools for Beginners [#MongoDB World 2014]

Linux tools to learnmongostat / mongotop

top iostat vmstat netstat

Page 30: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Mongo shellrs.conf()

rs.status()

db.serverStatus()

db.stats()

db.currentOp()

Page 31: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Backups

Page 32: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Backup options

mongodump

from the file system

LVM / EBS

MMS

Page 33: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

TEST YOUR BACKUPS

Page 34: Ops Skills and Tools for Beginners [#MongoDB World 2014]

Common pitfals

Page 35: Ops Skills and Tools for Beginners [#MongoDB World 2014]

Missing indexes!

Running out of disk space

Untested backups

Sharding too late / wrong key

un-replicated / even set size

Page 36: Ops Skills and Tools for Beginners [#MongoDB World 2014]

@rainforestqarainforest

Conclusion

do backups

monitor

read the docs

Page 37: Ops Skills and Tools for Beginners [#MongoDB World 2014]

rainforest @rainforestqa

Questions?@rainforestqa

@rhs


Top Related