• No results found

Avoiding Pain Running MySQL in the Cloud

N/A
N/A
Protected

Academic year: 2021

Share "Avoiding Pain Running MySQL in the Cloud"

Copied!
51
0
0

Loading.... (view fulltext now)

Full text

(1)

!

Avoiding Pain Running MySQL in the

Cloud

(2)

©Continuent 2013 2

DBA Oracle/Mainframes/MySQL (25 Years)

Deployment Engineer @ Continuent

1 or 2 Customer Deployments/Week

On Premise or Cloud deployments

Developer for Cloud Operations and Deployments @ Continuent

(3)

Quick Continuent Facts

Largest Tungsten installation processes over 700 million transactions daily on 225

terabytes of data

Tungsten Replicator was application of the year at the 2011 MySQL User Conference

Wide variety of topologies including MySQL, Oracle, Vertica, and MongoDB are in

production now

MySQL to Hadoop deployments are now in progress with multiple customers

(4)

©Continuent 2013

Aims

Make you think

(5)

Aims

Make you think

(6)

©Continuent 2013

Aims

Make you think

Make you question

Make you discuss

(7)

Aims

Make you think

Make you question

Make you discuss

(8)

©Continuent 2013

Why Cloud

Everyone wants servers now.

Waiting months to provision a database environment is no longer acceptable.

The business would have failed before new physical servers could be provisioned.

Initial capital outlay is low - long term cost can be higher.

Less internal skills are required to maintain and deploy servers.

(9)

Before Cloud Came Along

(a year or so ago)

(10)

©Continuent 2013 10

On-premise/Colo deployments

Raise a project

Get Approval

Order hardware

Rack and cable hardware

Connect to network

Install Operating System

(11)
(12)

©Continuent 2013

Cloud deployments

Enter credit card number

call API

nova boot --image centos6-x86_64 --flavor m1.large db1 nova boot --image centos6-x86_64 --flavor m1.large db2 nova boot --image centos6-x86_64 --flavor m1.large db3

!

ec2-run-instances ami-xxxxx -k ${EC2_KEYPAIR} -t m1.large ec2-run-instances ami-xxxxx -k ${EC2_KEYPAIR} -t m1.large ec2-run-instances ami-xxxxx -k ${EC2_KEYPAIR} -t m1.large

!

(13)
(14)

©Continuent 2013 14

(15)

Cloud Providers

Public Clouds

Amazon AWS

Google Cloud

RackSpace

HP Cloud

Many others

On Premise Clouds

VMware

Openstack

(16)

©Continuent 2013

Where is a cloud server located ?

16 Ireland (3 AZ) Sao Paulo (2 AZ) Northern Virginia (5 AZ) Oregon (3 AZ) California (3 AZ) Singapore (2 AZ) Tokyo (3 AZ) Sydney (2 AZ)

(17)

AWS Availability Zones

Region

Availability Zone Availability Zone

Availability Zone

Region

(18)

©Continuent 2013 18

Why is working in the

Cloud Different?

(19)

Where is my server?

db1 db2 db3

(20)

©Continuent 2013

Where is my server?

20 db1 db2 EC2 Server A db3 EC2 Server B

(21)

Where is my server?

db3

EC2 Server B

(22)

©Continuent 2013

Where is your data?

(23)

Where is your data?

(24)

©Continuent 2013

Where is your data?

24

X

(25)

Where is your data?

X

X

X

(26)

©Continuent 2013

Networking in the Cloud

Can be unreliable

Where it is?

What it is?

Security?

IP’s can change

(27)
(28)

©Continuent 2013

High Availability - On Premise

Ensure servers in different Racks

Redundant Power

Redundant Network

Redundant Disk

Backup Server in DR location

Redundant network between Datacenters

(29)
(30)

©Continuent 2013

Cloud Environments Fail

(31)
(32)

©Continuent 2013

Cloud Environments Fail

(33)

Cloud Deployment Options - Simple

Region

Availability Zone Availability Zone

US-EAST-1 1B 1C S3 Backups Master Slave

(34)

©Continuent 2013

Cloud Deployment Options - Better

34

Region

Availability Zone Availability Zone

Region Availability Zone US-EAST-1 US-WEST-1 1B 1C 1C S3 Backups S3 Backups Master Slave Slave

(35)

Cloud Deployment Options - Even Better

Region

Availability Zone Availability Zone

Region Availability Zone US-EAST-1 US-WEST-1 1B 1C 1C S3 Backups S3 Backups Master Slave Slave Slave Rackspace Cloud Backups

(36)

©Continuent 2013

What to think about

Need to consider locations

Have more nodes than you would with on premise

Nodes can just disappear or stop functioning

“Spain cluster has had an issue this afternoon - the current master DB has dropped off the

network/out of AWS”

(37)

What to think about

Plan for and expect node failures

Don’t assume that you will be able to quickly provision new nodes.

Take plenty of backups (S3 costs only $100/ month to store 1TB)

Expect a few ‘bad’ nodes

poor cpu performance

poor disk performance

throw them away - shoot them

(38)

©Continuent 2013

Running Databases in the Cloud

(39)

AWS Relational Database Service (RDS)

MySQL, Oracle, SQL Service

Read Slaves

Multi-AZ deployments

(40)

©Continuent 2013

AWS Relational Database Service (RDS)

AWS Only

Limited options for replicating data out

Very limited options for replicating in

Slow failover with AZ’s (10 mins +)

(41)

Trove

MySQL Only

Single Node

No Replication

(42)

©Continuent 2013

Google Cloud

Google only

Synchronous and asynchronous replication

Across DC’s?

(43)

How we deploy clusters

(in the cloud)

(44)

©Continuent 2013

Deploying in the Cloud

Automate everything

Puppet allows us to work across clouds

No need to maintain AMI’s/Images just use a standard o/s images

‘masterless’ puppet to ensure we don’t have a SPOF

Our install tools work across multi-nodes in parallel

Heavy use of vagrant with AWS plugin for demos and POC installs

(45)

Need to setup secure connections

OpenVPN

Need multiple servers to avoid a SPOF

Software

We now support secure connections

Between DB’s

(46)

©Continuent 2013

Best Practices

RAID EBS Volumes (RAID1)

Backups

xtrabackup (backed up into S3)

EBS Snapshot

ec2-­‐consistent-­‐snapshot  \
 --mysql --freeze-filesystem /vol \
 --region eu-west-1  \


--description "$(hostanme) RAID snapshot $(date +'%Y-%m-%d %H:%M:%S')" \


vol-1f9a6446 vol-649a643d

Use VPC’s and fixed networks

(47)

Best Practices

Monitoring

Nagios / Opsview

Zabbix

Email Alerts

New Relic

(48)

©Continuent 2013

Lesson Learnt

EC2 Instances fail

One of anything is never enough

Don’t assume you can spin up more resources instantly

Think multi-cloud, public/private

Resources are disposable - throw away and rebuild if needed

(49)

Lesson Learnt

Monitor everything

Automate as much as possible

(50)

©Continuent 2013

Questions

(51)

Continuent Website:

http://www.continuent.com

!

Tungsten Replicator:

http://code.google.com/p/tungsten-replicator

Our Blogs: http://scale-out-blog.blogspot.com http://datacharmer.blogspot.com http://flyingclusters.blogspot.com 560 S. Winchester Blvd., Suite 500 San Jose, CA 95128 Tel +1 (866) 998-3642 Fax +1 (408) 668-1009 e-mail: [email protected]

References

Related documents

Treasury bills are the main financial instruments of money market. These Treasury bills are the main financial instruments of money market. These  bills are issued by the

 MySQL Enterprise backup writes status to internal backup table.  Useful to see detailed history

Region Availability Zone US-EAST-1 US-WEST-1 1B 1C 1C S3 Backups S3 Backups Master Slave Slave Slave Rackspace.. High Availability in

D slave unit 3 Slave unit 1 Slave unit 2 Slave unit 1 Slave unit 2 C slave unit 2 B slave unit 1 A master unit Master unit Master unit Connecting piping of outdoor

If you’ve virtualized on VMware or Hyper-V, now is the time to move up to the data protection solution Built for Virtualization: Veeam Backup & Replication. Unlike

Linda Widdop, Tech Impact’s Director of Technical Services, has been helping nonprofit executives and IT staff find cost-effective technology solutions, for issues like

CRITERIA Design/management separation Capacity for variations Complexity Speed Cost certainty Clarity of r emedies.. Default Delay Quality failur e RISK AREAS HIGH

ROTARY CLUB OF BEAUMARIS BULL ET IN – SERVING THE COMMUNIT Y SINCE 1985 This Week’s Meeting. PP David Hone finally got to hand out some of the Paul Harris Fellowship Awards from his