ops skills and tools for beginners [#mongodb world 2014]

Post on 15-Jan-2015

100 Views

Category:

Engineering

5 Downloads

Preview:

Click to see full reader

DESCRIPTION

Originally presented at MongoDB World 2014. This is an introduction to Ops with MongoDB aimed at Developers and people who haven't run MongoDB in production before. It covers some basics of servers, hosting, installation, monitoring and backups.

TRANSCRIPT

rainforest @rainforestqa

Ops Skills and Tools for Beginners

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

@rainforestqarainforest

Rainforest QA

!

Insanely simple testing

checkout: www.rainforestqa.com

What is Ops?

@rainforestqarainforest

Setting up servers / services

@rainforestqarainforest

Supporting Engineers

@rainforestqarainforest

Keeping stuff running

@rainforestqarainforest

Avoiding disasters

@rainforestqarainforest

Fixing breakage

Lets Learn the basics

Installation

@rainforestqarainforest

Replicated

@rainforestqarainforest

Sharded

@rainforestqarainforest

Best practices

Ubuntu is simplest

Install from Mongo’s repo

Chose the right replica set size: 3 nodes

Never use 32 bits

@rainforestqarainforest

Alternatives

MongoHQ

MonogLab

ObjectRocket

MMS + AWS (via automation)

Monitoring Mongo

@rainforestqarainforest

Server components

@rainforestqarainforest

Storage

magnetic, ssd

metric: disk io

@rainforestqarainforest

Memory / RAM

fastest general store

metrics; free, swap usage

@rainforestqarainforest

Network

allows communication

use 1gbit or higher (avoid 100mbit)

metrics; latency, throughput

@rainforestqarainforest

CPU

more is better

mostly used

metrics; % usage

@rainforestqarainforest

Monitoring & Diagnostics

@rainforestqarainforest

Top things to monitorFailover events

Repl Lag

Connections

Lock %

Disk usage

@rainforestqarainforest

Hosted is Simplest

MMSHosted, free for monitoring

!

Also can do Backups

Automation

ScoutMonitors mongo, servers and many

others (Plugins!) !

non-free

Server DensityMonitors mongo, servers and many

others (Plugins!) !

non-free

@rainforestqarainforest

Opensource options

Ganglia

Munin

Nagios

Zabbix

Linux tools to learnmongostat / mongotop

top iostat vmstat netstat

@rainforestqarainforest

Mongo shellrs.conf()

rs.status()

db.serverStatus()

db.stats()

db.currentOp()

@rainforestqarainforest

Backups

@rainforestqarainforest

Backup options

mongodump

from the file system

LVM / EBS

MMS

@rainforestqarainforest

TEST YOUR BACKUPS

Common pitfals

Missing indexes!

Running out of disk space

Untested backups

Sharding too late / wrong key

un-replicated / even set size

@rainforestqarainforest

Conclusion

do backups

monitor

read the docs

rainforest @rainforestqa

Questions?@rainforestqa

@rhs

top related