Deploying database clusters in the cloud - CloudOpen Europe

404 views

Published on

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

No Downloads
Views
Total views
404
On SlideShare
0
From Embeds
0
Number of Embeds
61
Actions
Shares
0
Downloads
12
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Deploying database clusters in the cloud - CloudOpen Europe

  1. 1. ©Continuent 2013 Deploying Database clusters in the Cloud Neil Armitage - Continuent CloudOpen - Europe Tuesday, 24 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 Tuesday, 24 September 13
  3. 3. ©Continuent 2013 3 On-premise/Colo deployments • Raise a project • Get Approval • Order hardware • Rack and cable hardware • Connect to network • Install Operating System • Connect to SAN Tuesday, 24 September 13
  4. 4. ©Continuent 2013 4 Tuesday, 24 September 13
  5. 5. ©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 5 Tuesday, 24 September 13
  6. 6. ©Continuent 2013 Cloud Providers • Amazon AWS • RackSpace • HP Cloud • ....... • On Premise Clouds • Openstack • VMWare 6 Tuesday, 24 September 13
  7. 7. ©Continuent 2013 Where is a cloud server located ? 7 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) Tuesday, 24 September 13
  8. 8. ©Continuent 2013 AWS Availability Zones 8 Region Availability Zone Availability Zone Availability Zone Region Availability Zone Availability Zone Tuesday, 24 September 13
  9. 9. ©Continuent 2013 Cloud Instance Location 9 db1 db2 db3 EC2 Server A EC2 Server B Provision 3 nodes DB1->DB3 Tuesday, 24 September 13
  10. 10. ©Continuent 2013 Cloud Instance Location 10 db3 EC2 Server B Server A has died Tuesday, 24 September 13
  11. 11. ©Continuent 2013 Where is your data? 11 Tuesday, 24 September 13
  12. 12. ©Continuent 2013 Where is your data? 12 X Tuesday, 24 September 13
  13. 13. ©Continuent 2013 Where is your data? 13 X X Tuesday, 24 September 13
  14. 14. ©Continuent 2013 Where is your data? 14 X X X Tuesday, 24 September 13
  15. 15. ©Continuent 2013 Networking in the Cloud • Can be unreliable • Where it is? • What it is? • Security? 15 Tuesday, 24 September 13
  16. 16. ©Continuent 2013 High Availability 16 Tuesday, 24 September 13
  17. 17. ©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 17 Tuesday, 24 September 13
  18. 18. ©Continuent 2013 High Availability - Cloud 18 Tuesday, 24 September 13
  19. 19. ©Continuent 2013 Cloud Environments Fail 19 Tuesday, 24 September 13
  20. 20. ©Continuent 2013 Cloud Environments Fail 20 Tuesday, 24 September 13
  21. 21. ©Continuent 2013 Cloud Environments Fail 21 Tuesday, 24 September 13
  22. 22. ©Continuent 2013 Simple 22 Region Availability Zone Availability Zone US-EAST-1 1B 1C S3 Backups MasterSlave Separate Nodes across AZ’s Tuesday, 24 September 13
  23. 23. ©Continuent 2013 Better 23 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 Tuesday, 24 September 13
  24. 24. ©Continuent 2013 Even Better 24 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 Tuesday, 24 September 13
  25. 25. ©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” 25 Tuesday, 24 September 13
  26. 26. ©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 26 VS Tuesday, 24 September 13
  27. 27. ©Continuent 2013 Running Databases in the Cloud 27 Tuesday, 24 September 13
  28. 28. ©Continuent 2013 AWS Relational Database Service (RDS) • MySQL, Oracle, SQL Service • Read Slaves • Multi-AZ deployments • Simple to set up and use 28 Tuesday, 24 September 13
  29. 29. ©Continuent 2013 AWS Relational Database Service (RDS) 29 Tuesday, 24 September 13
  30. 30. ©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 +) 30 Tuesday, 24 September 13
  31. 31. ©Continuent 2013 Rackspace Databases • MySQL Only • Single Node? • Replication? • No Backups 31 Tuesday, 24 September 13
  32. 32. ©Continuent 2013 Others • Google Cloud • Google only • HP Cloud • trove ? (private beta) • OpenStack • trove ? 32 Tuesday, 24 September 13
  33. 33. ©Continuent 2013 How we deploy clusters (in the cloud) 33 Tuesday, 24 September 13
  34. 34. ©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 34 Tuesday, 24 September 13
  35. 35. ©Continuent 2013 What our customers don’t want 35 Tuesday, 24 September 13
  36. 36. ©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 36 Tuesday, 24 September 13
  37. 37. ©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 37 Tuesday, 24 September 13
  38. 38. ©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 38 Tuesday, 24 September 13
  39. 39. ©Continuent 2013 Best Practices • Monitoring • Nagios • Zabbix • Email Alerts • New Relic 39 Tuesday, 24 September 13
  40. 40. ©Continuent 2013 The future / Coming Soon 40 Tuesday, 24 September 13
  41. 41. ©Continuent 2013 41 hetzner.de GUI CLI REST API Queue OpenShift OpenStack AWS Private backofficewebfacing1 webfacing2 crosscloud tdf usa west east puppet Worker Tuesday, 24 September 13
  42. 42. ©Continuent 2013 Demo 42 Tuesday, 24 September 13
  43. 43. ©Continuent 2013 Whats next • Instance Autoscaling • MongoDB • Oracle • Postgres • Better support for VMWare and On-Premise installs 43 Tuesday, 24 September 13
  44. 44. ©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 44 Tuesday, 24 September 13
  45. 45. ©Continuent 2013 Lesson Learnt • Monitor everything • Automate as much as possible • Backup everything (twice) 45 Tuesday, 24 September 13
  46. 46. ©Continuent 2013 Questions 46 Tuesday, 24 September 13
  47. 47. ©Continuent 2013 47 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 Tuesday, 24 September 13

×