©Continuent 2013
Deploying Database
clusters in the Cloud
Neil Armitage - Continuent
Sunday, 15 September 13
©Continuent 2013 2
• DBA Oracle/Mainframes/MySQL (25 Years)
• Deployment Engineer @ Continuent
• 1 or 2 Customer Deploymen...
©Continuent 2013
The next 50 Minutes
• Di!erences between traditional deployments
and cloud deployments
• Introduction to ...
©Continuent 2013 4
On-premise/Colo deployments
• Raise a project
• Get Approval
• Order hardware
• Rack and cable hardware...
©Continuent 2013 5
Sunday, 15 September 13
©Continuent 2013
Cloud deployments
• Enter credit card number
• call API
nova boot --image centos6-x86_64 --flavor m1.larg...
©Continuent 2013
Cloud Providers
• Amazon AWS
• RackSpace
• HP Cloud
• .......
• On Premise Clouds
• Openstack
• VMWare
7
...
©Continuent 2013
Where is a cloud server located ?
8
Ireland
(3 AZ)
Sao Paulo
(2 AZ)
Northern Virginia
(5 AZ)
Oregon
(3 AZ...
©Continuent 2013
AWS Availability Zones
9
Region
Availability Zone Availability Zone
Availability Zone
Region
Availability...
©Continuent 2013
Cloud Instance Location
10
db1
db2
db3
EC2 Server A
EC2 Server B
Provision 3 nodes
DB1->DB3
Sunday, 15 Se...
©Continuent 2013
Cloud Instance Location
11
db3
EC2 Server B
Server A has died
Sunday, 15 September 13
©Continuent 2013
Where is your data?
12
Sunday, 15 September 13
©Continuent 2013
Where is your data?
13
X
Sunday, 15 September 13
©Continuent 2013
Where is your data?
14
X
X
Sunday, 15 September 13
©Continuent 2013
Where is your data?
15
X
X
X
Sunday, 15 September 13
©Continuent 2013
Networking in the Cloud
• Can be unreliable
• Where it is?
• What it is?
• Security?
16
Sunday, 15 Septem...
©Continuent 2013
High Availability
17
Sunday, 15 September 13
©Continuent 2013
High Availability - On Premise
• Ensure servers in di!erent Racks
• Redundant Power
• Redundant Network
•...
©Continuent 2013
High Availability - Cloud
19
Sunday, 15 September 13
©Continuent 2013
Simple
20
Region
Availability Zone Availability Zone
US-EAST-1
1B 1C
S3
Backups
MasterSlave
Separate Node...
©Continuent 2013
Better
21
Region
Availability Zone Availability Zone
Region
Availability Zone
US-EAST-1 US-WEST-1
1B 1C
1...
©Continuent 2013
Even Better
22
Region
Availability Zone Availability Zone
Region
Availability Zone
US-EAST-1
US-WEST-1
1B...
©Continuent 2013
High Availability in the Cloud
• Need to consider locations
• Have more nodes than you would with on
prem...
©Continuent 2013
High Availability in the Cloud
• Plan for and expect node failures
• Don’t assume that you will be able t...
©Continuent 2013
Running Databases in the Cloud
25
Sunday, 15 September 13
©Continuent 2013
AWS Relational Database Service (RDS)
• MySQL, Oracle, SQL Service
• Read Slaves
• Multi-AZ deployments
•...
©Continuent 2013
AWS Relational Database Service (RDS)
27
Sunday, 15 September 13
©Continuent 2013
AWS Relational Database Service (RDS)
• AWS Only
• Can not replicate data out
• Very limited options for ...
©Continuent 2013
Rackspace Databases
• MySQL Only
• Single Node?
• Replication?
• No Backups
29
Sunday, 15 September 13
©Continuent 2013
Others
• Google Cloud
• Google only
• HP Cloud
• ?
• OpenStack
• trove ?
30
Sunday, 15 September 13
©Continuent 2013
How we deploy clusters
(in the cloud)
31
Sunday, 15 September 13
©Continuent 2013
What our customers want
• All on-premise
• All in AWS
• Main Site on-premise - backup/DR in AWS
• Main Si...
©Continuent 2013
What our customers don’t want
33
Sunday, 15 September 13
©Continuent 2013
Deploying in the Cloud
• Automate everything
• Puppet allows us to work across clouds
• No need to mainta...
©Continuent 2013
Need to setup secure connections
• OpenVPN
• Need multiple servers to avoid a SPOF
• Software
• We now su...
©Continuent 2013
Best Practices
• RAID EBS Volumes (RAID1)
• Backups
• xtrabackup (backed up into S3)
• EBS Snapshot
• ec2...
©Continuent 2013
Best Practices
• Monitoring
• Nagios scripts converted to email alerts
• New Relic
37
Sunday, 15 Septembe...
©Continuent 2013
The future / Coming Soon
38
Sunday, 15 September 13
©Continuent 2013 39
hetzner.de
GUI CLI
REST
API
Queue
OpenShift OpenStack AWS Private
backofficewebfacing1 webfacing2
cross...
©Continuent 2013
Demo
40
Sunday, 15 September 13
©Continuent 2013
Lesson Learnt
• EC2 Instances fail
• One of anything is never enough
• Don’t assume you can spin up more ...
©Continuent 2013
Lesson Learnt
• Monitor everything
• Automate as much as possible
• Backup everything (twice)
42
Sunday, ...
©Continuent 2013
Questions
43
Sunday, 15 September 13
©Continuent 2013
We are recruiting
• Deployment Engineers
• QA Engineers
44
Sunday, 15 September 13
©Continuent 2013 45
Continuent Website:
http://www.continuent.com
Tungsten Replicator 2.0:
http://code.google.com/p/tungst...
Upcoming SlideShare
Loading in …5
×

Deploying database clusters in the cloud

997 views
858 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
997
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
7
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Deploying database clusters in the cloud

  1. 1. ©Continuent 2013 Deploying Database clusters in the Cloud Neil Armitage - Continuent Sunday, 15 September 13
  2. 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 whoami Sunday, 15 September 13
  3. 3. ©Continuent 2013 The next 50 Minutes • Di!erences between traditional deployments and cloud deployments • Introduction to clouds • High Availability • Running a database in the cloud • How we work • Lessons Learnt 3 Sunday, 15 September 13
  4. 4. ©Continuent 2013 4 On-premise/Colo deployments • Raise a project • Get Approval • Order hardware • Rack and cable hardware • Connect to network • Install Operating System • Connect to SAN Sunday, 15 September 13
  5. 5. ©Continuent 2013 5 Sunday, 15 September 13
  6. 6. ©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 6 Sunday, 15 September 13
  7. 7. ©Continuent 2013 Cloud Providers • Amazon AWS • RackSpace • HP Cloud • ....... • On Premise Clouds • Openstack • VMWare 7 Sunday, 15 September 13
  8. 8. ©Continuent 2013 Where is a cloud server located ? 8 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) Sunday, 15 September 13
  9. 9. ©Continuent 2013 AWS Availability Zones 9 Region Availability Zone Availability Zone Availability Zone Region Availability Zone Availability Zone Sunday, 15 September 13
  10. 10. ©Continuent 2013 Cloud Instance Location 10 db1 db2 db3 EC2 Server A EC2 Server B Provision 3 nodes DB1->DB3 Sunday, 15 September 13
  11. 11. ©Continuent 2013 Cloud Instance Location 11 db3 EC2 Server B Server A has died Sunday, 15 September 13
  12. 12. ©Continuent 2013 Where is your data? 12 Sunday, 15 September 13
  13. 13. ©Continuent 2013 Where is your data? 13 X Sunday, 15 September 13
  14. 14. ©Continuent 2013 Where is your data? 14 X X Sunday, 15 September 13
  15. 15. ©Continuent 2013 Where is your data? 15 X X X Sunday, 15 September 13
  16. 16. ©Continuent 2013 Networking in the Cloud • Can be unreliable • Where it is? • What it is? • Security? 16 Sunday, 15 September 13
  17. 17. ©Continuent 2013 High Availability 17 Sunday, 15 September 13
  18. 18. ©Continuent 2013 High Availability - On Premise • Ensure servers in di!erent Racks • Redundant Power • Redundant Network • Redundant Disk • Backup Server in DR location • Redundant network between DC’s 18 Sunday, 15 September 13
  19. 19. ©Continuent 2013 High Availability - Cloud 19 Sunday, 15 September 13
  20. 20. ©Continuent 2013 Simple 20 Region Availability Zone Availability Zone US-EAST-1 1B 1C S3 Backups MasterSlave Separate Nodes across AZ’s Sunday, 15 September 13
  21. 21. ©Continuent 2013 Better 21 Region Availability Zone Availability Zone Region Availability Zone US-EAST-1 US-WEST-1 1B 1C 1C S3 Backups S3 Backups Master SlaveSlave Separate Nodes across AZ’s and Regions Sunday, 15 September 13
  22. 22. ©Continuent 2013 Even Better 22 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 Separate Nodes across Providers Sunday, 15 September 13
  23. 23. ©Continuent 2013 High Availability in the Cloud • 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” 23 Sunday, 15 September 13
  24. 24. ©Continuent 2013 High Availability in the Cloud • 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 24 VS Sunday, 15 September 13
  25. 25. ©Continuent 2013 Running Databases in the Cloud 25 Sunday, 15 September 13
  26. 26. ©Continuent 2013 AWS Relational Database Service (RDS) • MySQL, Oracle, SQL Service • Read Slaves • Multi-AZ deployments • Simple to set up and use 26 Sunday, 15 September 13
  27. 27. ©Continuent 2013 AWS Relational Database Service (RDS) 27 Sunday, 15 September 13
  28. 28. ©Continuent 2013 AWS Relational Database Service (RDS) • AWS Only • Can not replicate data out • Very limited options for replicating in * • No Multi-Region • Slow failover with AZ’s (10 mins +) 28 Sunday, 15 September 13
  29. 29. ©Continuent 2013 Rackspace Databases • MySQL Only • Single Node? • Replication? • No Backups 29 Sunday, 15 September 13
  30. 30. ©Continuent 2013 Others • Google Cloud • Google only • HP Cloud • ? • OpenStack • trove ? 30 Sunday, 15 September 13
  31. 31. ©Continuent 2013 How we deploy clusters (in the cloud) 31 Sunday, 15 September 13
  32. 32. ©Continuent 2013 What our customers want • All on-premise • All in AWS • Main Site on-premise - backup/DR in AWS • Main Site in AWS - backup in Rackspace • Flexibility and no vendor lock in • Most on-premise clouds are VMWare 32 Sunday, 15 September 13
  33. 33. ©Continuent 2013 What our customers don’t want 33 Sunday, 15 September 13
  34. 34. ©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 • Prototype GUI/CLI launcher to deploy and scale clusters automatically 34 Sunday, 15 September 13
  35. 35. ©Continuent 2013 Need to setup secure connections • OpenVPN • Need multiple servers to avoid a SPOF • Software • We now support secure connections • Between DB’s • Between Apps and DB’s 35 Sunday, 15 September 13
  36. 36. ©Continuent 2013 Best Practices • RAID EBS Volumes (RAID1) • Backups • xtrabackup (backed up into S3) • EBS Snapshot • ec2-­‐consistent-­‐snapshot   --mysql --freeze-#lesystem /vol  --region eu-west-1  --description "$(hostanme) RAID snapshot $(date +'%Y-%m- %d %H:%M:%S')" vol-1f9a6446 vol-649a643d 36 Sunday, 15 September 13
  37. 37. ©Continuent 2013 Best Practices • Monitoring • Nagios scripts converted to email alerts • New Relic 37 Sunday, 15 September 13
  38. 38. ©Continuent 2013 The future / Coming Soon 38 Sunday, 15 September 13
  39. 39. ©Continuent 2013 39 hetzner.de GUI CLI REST API Queue OpenShift OpenStack AWS Private backofficewebfacing1 webfacing2 crosscloud tdf usa west east puppet Worker Sunday, 15 September 13
  40. 40. ©Continuent 2013 Demo 40 Sunday, 15 September 13
  41. 41. ©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 41 Sunday, 15 September 13
  42. 42. ©Continuent 2013 Lesson Learnt • Monitor everything • Automate as much as possible • Backup everything (twice) 42 Sunday, 15 September 13
  43. 43. ©Continuent 2013 Questions 43 Sunday, 15 September 13
  44. 44. ©Continuent 2013 We are recruiting • Deployment Engineers • QA Engineers 44 Sunday, 15 September 13
  45. 45. ©Continuent 2013 45 Continuent Website: http://www.continuent.com Tungsten Replicator 2.0: 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: sales@continuent.com Sunday, 15 September 13

×