mysql at yelp

30
MySQL at Yelp!

Upload: yelp-engineering

Post on 02-Jul-2015

509 views

Category:

Technology


1 download

DESCRIPTION

MySQL at Yelp, a talk given at the Yelp Girl Geek Dinner

TRANSCRIPT

Page 1: MySQL At Yelp

MySQL at Yelp!

Page 2: MySQL At Yelp

Jenni S.

Page 3: MySQL At Yelp

MySQL

MySQL + Yelp

MySQL + You

What

Page 4: MySQL At Yelp

First released in 1995

InnoBase -> Oracle in 2005

Sun acquired in 2008

Sun -> Oracle in 2009

MySQL - history

Page 5: MySQL At Yelp

Percona

MariaDB

Drizzle

MySQL - forks

Page 6: MySQL At Yelp

Community Edition

vs Enterprise/Support

Consulting

MySQL - model

Page 7: MySQL At Yelp

Relational

Replication

Transactions

Performance

MySQL - overall features

Page 8: MySQL At Yelp

Portable

Stored Procedures

Triggers

Full-text searching

MySQL - features

Page 9: MySQL At Yelp

ANSI SQL*

ACID compliant*

Foreign Keys*

MySQL - asterisks

Page 10: MySQL At Yelp

Large Community

Free

"it was here when I got here"

MySQL - reasons to use it

Page 11: MySQL At Yelp

~100 MySQL Servers

InnoDB + Replication

puppet for configuration

MySQL 5.5+

MySQL + Yelp - we use

Page 12: MySQL At Yelp

MySQLdb python connector

Foreign Keys

Simple SQL

Separate Search, Caching

MySQL + Yelp we use

Page 13: MySQL At Yelp

Master Data Center

Replicate to read-only DCs

"Local" masters in each DC

MySQL + Yelp - replication

Page 14: MySQL At Yelp

MySQL + Yelp - replication

Page 15: MySQL At Yelp

Nagios/Sensu

Ganglia/Grafana

Percona Toolkit

home-grown

MySQL + Yelp - tools

Page 16: MySQL At Yelp

schema changes!

rollback-safe

MySQL + Yelp - changes happen

Page 17: MySQL At Yelp

schema changes!

online vs offline

MySQL + Yelp - changes happen

Page 18: MySQL At Yelp

monitoring, easy resolution

gross query checker

pt-kill

MySQL + Yelp - developer automation

Page 19: MySQL At Yelp

ReviewBoard - automation

oncall/onpoint DBA

DBA Office Hours

MySQL + Yelp - developer support

Page 20: MySQL At Yelp

install MySQL

mysql cli/guiCREATE DATABASE foo

MySQL + You - new project

Page 21: MySQL At Yelp

mysql -u user -p -h host DBshow databases ;show tables ;show variables like 'log_error' ;

MySQL + You - existing project

Page 22: MySQL At Yelp

MySQL + You - errors

perrorjsnyder@nnnnnnnnnn:~$ mysql -usdlfkj ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

jsnyder@nnnnnnnnnn:~$ perror 2OS error code 2: No such file or directory

Or, web search.

Page 23: MySQL At Yelp

the slow logshow processlist ;host health

MySQL + you - "it's slow"

Page 24: MySQL At Yelp

don't get bitten twice

lots of open source tools

MySQL + You - monitoring rocks

Page 25: MySQL At Yelp

LVM

xtrabackup

monitor your backups

test restore

MySQL + you - if you like it then you

should have put backups on it

Page 26: MySQL At Yelp

DBA Stack Exchange

lists.mysql.com

good ol' online search

MySQL + You - online community

Page 27: MySQL At Yelp

Troubleshooting MySQL -

Sveta Smirnova

MySQL - Paul DuBois

High Performance MySQL -

Baron Schwartz, Peter Zaitsev

MySQL + You - books

Page 28: MySQL At Yelp

Questions?

Page 29: MySQL At Yelp

manual - http://dev.mysql.com/doc/

percona toolkit

http://www.percona.com/software/percona-toolkit

MySQL Utilities

http://dev.mysql.com/downloads/utilities/

MySQL/Percona tools

Page 30: MySQL At Yelp

GitHub

https://github.com/Yelp

https://github.com/Yelp/ybinlogp

Blog

http://engineeringblog.yelp.com/

MySQL + Yelp - links