SlideShare une entreprise Scribd logo
1  sur  59
Télécharger pour lire hors ligne
The Sky’s the Limit
                    Hints and Best Practices to Integrate and Run MySQL on Standard Servers and in the
                    Cloud




                                                                                             Ivan Zoratti
                                                                                                  V1212.01
Wednesday, 5 December 12
Who is Ivan


                               ?
Wednesday, 5 December 12
SkySQL
                •#1 provider of MySQL-based
                     solutions, for software and
                     services
                •Backed by Monty Program AB
                     and 3rd parties active in the
                     MySQL ecosystem
                •Committed to provide the best
                     solutions around MySQL for the
                     Community and for the
                     Enterprise

Wednesday, 5 December 12
Agenda


                           • Understanding the Cloud Landscape

                           • Anatomy of a MySQL Database in the Cloud

                           • MySQL in AWS - Tips and Tricks

                                                                        PAGE 4
Wednesday, 5 December 12
Understanding the Cloud Landscape
Wednesday, 5 December 12
The Landscape
                    Or maybe an aerial view...




                                                 PAGE 6
Wednesday, 5 December 12
The Landscape
                    Or maybe an aerial view...




                           Public Clouds

                                                 PAGE 6
Wednesday, 5 December 12
The Landscape
                    Or maybe an aerial view...




                           Public Clouds   Hybrid Clouds

                                                           PAGE 6
Wednesday, 5 December 12
The Landscape
                    Or maybe an aerial view...




                           Public Clouds   Hybrid Clouds   Private Clouds

                                                                            PAGE 6
Wednesday, 5 December 12
The Landscape
                    Or maybe an aerial view...




                                                      IaaS
                                           Infrastructure as a Service

                           Public Clouds         Hybrid Clouds           Private Clouds

                                                                                          PAGE 6
Wednesday, 5 December 12
The Landscape
                    Or maybe an aerial view...



                                                     PaaS
                                             Platform as a Service


                                                      IaaS
                                           Infrastructure as a Service

                           Public Clouds         Hybrid Clouds           Private Clouds

                                                                                          PAGE 6
Wednesday, 5 December 12
The Landscape
                    Or maybe an aerial view...

                                                    SaaS
                                             Software as a Service


                                                     PaaS
                                             Platform as a Service


                                                      IaaS
                                           Infrastructure as a Service

                           Public Clouds         Hybrid Clouds           Private Clouds

                                                                                          PAGE 6
Wednesday, 5 December 12
The Landscape
                    Or maybe an aerial view...

                                                                           SaaS
                                                                    Software as a Service
                           Level of Abstraction




                                                                            PaaS
                                                                    Platform as a Service


                                                                             IaaS
                                                                  Infrastructure as a Service

                                                  Public Clouds         Hybrid Clouds           Private Clouds

                                                                                                                 PAGE 6
Wednesday, 5 December 12
The Landscape
                    Or maybe an aerial view...
                                                                   Control / Governance


                                                                           SaaS
                                                                    Software as a Service
                           Level of Abstraction




                                                                            PaaS
                                                                    Platform as a Service


                                                                             IaaS
                                                                  Infrastructure as a Service

                                                  Public Clouds         Hybrid Clouds           Private Clouds

                                                                                                                 PAGE 6
Wednesday, 5 December 12
The Landscape
                    Or maybe an aerial view...
                                                                   Control / Governance


                                                                           SaaS




                                                                                                                 Flexibility of Purpose
                                                                    Software as a Service
                           Level of Abstraction




                                                                            PaaS
                                                                    Platform as a Service


                                                                             IaaS
                                                                  Infrastructure as a Service

                                                  Public Clouds         Hybrid Clouds           Private Clouds

                                                                                                                         PAGE 6
Wednesday, 5 December 12
The Landscape
                    Or maybe an aerial view...




                                                 PAGE 7
Wednesday, 5 December 12
The Landscape
                    Or maybe an aerial view...




                                                 PAGE 7
Wednesday, 5 December 12
The Landscape
                    Or maybe an aerial view...




                                                 PAGE 7
Wednesday, 5 December 12
The Cloud Promise

                           • Agility           • Reduced Costs

                           • Compatibility     • Reliability

                           • Elasticity        • Security
                           • Low Maintenance   • Systems Independence
                           • Multi-tenancy     • Virtualization

                                                                        PAGE 8
Wednesday, 5 December 12
The Cloud Promise

                           • Agility
                                                   F AC  T!• Reduced Costs

                           • Compatibility
                                                         lo
                                                           •ud ]
                                                              Reliability
                                                   he   C      on   al (*)
                           • Elasticity          T
                                                    t[ Re •
                                                          la  i
                                                             tSecurity !
                                                                nd   ly
                                               sN o          ie
                                                          Fr Systems Independence
                                              I
                           • Low Maintenance atabas    e- •
                                            D
                           • Multi-tenancy et...
                                        no ty
                                                           •  Virtualization
                                       Or
                                                                                    PAGE 8
Wednesday, 5 December 12
Challenges for a MySQL DBA
                    in the next 3 years
                           • Integration with other databases - primarily NoSQL
                           • Adopt the right technology to make MySQL and the Cloud work
                               together
                           •   Integration with provisioning, administration and monitoring tools
                           • Increase/provide better security for the database and for the users’
                               data
                           •   Provide elasticity and reduce TCO

                                                                                               PAGE 9
Wednesday, 5 December 12
Anatomy of a MySQL Database
                                  in the Cloud
Wednesday, 5 December 12
A Mix & Match
                           • Deployment

                           • Internal / External Communication

                           • High Availability
                           • Scalability
                           • Daily Operations

                           • Special (non-InnoDB and non-Replication) features

                                                                                 PAGE 11
Wednesday, 5 December 12
Deployment




                                 PAGE 12
Wednesday, 5 December 12
Deployment
                                   Amazon RDS                                    Rackspace


                •One-click
                                                               •Limited offering (max 4GB RAM)
                •Master/Slave replicas (up to 5 replicas)
                                                               •You can get up to 30GB RAM and 1.2TB/server
                •Choice of instances, IOPs, storage etc.


                                   Amazon EC2                                    Google SQL


                •Deployment procedure needed
                                                               •Up to 16GB RAM and 100GB storage
                •Full control on technology and configuration
                •Can go on SSDs, High
                  I/O etc.


                                                                                                       PAGE 13
Wednesday, 5 December 12
Communication & Networking




                                                 PAGE 14
Wednesday, 5 December 12
Communication & Networking
                                      Amazon RDS                                Rackspace


                •AWS vs Rackspace
                    •550MB/min (73Mbps)                       •No control on Networking
                      160MB/min (21Mbps)
                       •http://bit.ly/TLrILl


                                      Amazon EC2                               Google SQL



                •EC2 Placement Groups - 10Gbps connectivity   •No control on Networking




                                                                                            PAGE 15
Wednesday, 5 December 12
Highly Availability




                                          PAGE 16
Wednesday, 5 December 12
Highly Availability
                                  Amazon RDS                            Rackspace


                •Internal NAS replication
                                                     •SAN Replication
                •MySQL Replication
                •Multi-region replication


                                  Amazon EC2                            Google SQL


                •BYOR (Bring Your Own Replication)   •Internal sync/async replication (not MySQL
                                                     Replication)
                                                     •Multi-region replication


                                                                                              PAGE 17
Wednesday, 5 December 12
Scalability




                                  PAGE 18
Wednesday, 5 December 12
Scalability
                                  Amazon RDS                                    Rackspace


                •From Micro to XLarge instances (64GB RAM)
                                                             •No Replication or other solutions
                •Dedicated Instances
                •Up to 5 Read Replicas


                                  Amazon EC2                                    Google SQL
                •From Micro to XLarge instances              •No Replication
                •Hi I/O with SSDs and placement groups       •Used for Google applications
                •Dedicated Instances                         •Limited to 16MB for external applications
                •Unlimited Replicas

                                                                                                      PAGE 19
Wednesday, 5 December 12
Daily Operations




                                       PAGE 20
Wednesday, 5 December 12
Other Features




                                     PAGE 21
Wednesday, 5 December 12
Cost Factors




                                   PAGE 22
Wednesday, 5 December 12
MySQL in AWS - Tips & Tricks
Wednesday, 5 December 12
Some Tips for...

                           • New instances

                           • Tagging

                           • Networking
                           • Security
                           • Storage

                           • Backup & Restore

                                                PAGE 24
Wednesday, 5 December 12
Some Tips for...

                           • New instances

                           • Tagging

                           • Networking
                           • Security
                           • Storage

                           • Backup & Restore

                                                PAGE 24
Wednesday, 5 December 12
Some Tips for...

                           • New instances

                           • Tagging

                           • Networking
                           • Security
                           • Storage

                           • Backup & Restore

                                                PAGE 24
Wednesday, 5 December 12
Hidden Gems
                    AWS API
                       # Create the actual EC2 instance from the appropriate AMI using the key pair, security group, IAM role
                       # and user data script we previously created for this deployment

                       resource_id=`ec2-run-instances $ami -k $keypair -g $group -f $udscript -t $size -b /dev/sdf=:$ebssize:false -p $role
                       $extras 2> error | awk '$1 == "INSTANCE" { print $2 }'`

                       if [ "$resource_id" = "" ]; then
                               ./logerror $session_id "Create Instance" `cat error`
                               (echo "Create instance failed" ; cat error) > error.$SystemId
                               exit 1
                       fi

                       ./add_inventory "Machine Instance Node $NodeNo" $resource_id
                       if [ "$demo" = "1" ] ; then
                               ./db.sh "insert into DemoResources values ('$SystemId', 'EC2 Instance', '$resource_id');"
                       fi

                       echo $resource_id >> resources

                       # Add tags to the instances so that they can locate each other and synchronise during the boot phase
                       ec2-create-tags $resource_id --tag SystemID=$SystemId --tag NodeNo=$NodeNo 
                               --tag EIP=$EIP --tag IAM=SDS$SystemId 
                                --tag Name="SkySQL Data Suite $SystemId Node $NodeNo" 
                                 --tag SystemStatus=pending

                       # Find all the EBS volumes associated with an instance and tag those so that destruction can take place
                       # cleanly
                       cnt=0
                       devices=`ec2-describe-instances $resource_id | grep BLOCKDEVICE | awk '{ print $3 }'`
                       ...


                                                                                                                                          PAGE 25
Wednesday, 5 December 12
Hidden Gems
                    AWS API
                       # Create the actual EC2 instance from the appropriate AMI using the key pair, security group, IAM role
                       # and user data script we previously created for this deployment

                       resource_id=`ec2-run-instances $ami -k $keypair -g $group -f $udscript -t $size -b /dev/sdf=:$ebssize:false -p $role
                       $extras 2> error | awk '$1 == "INSTANCE" { print $2 }'`

                       if [ "$resource_id" = "" ]; then
                               ./logerror $session_id "Create Instance" `cat error`
                               (echo "Create instance failed" ; cat error) > error.$SystemId
                               exit 1
                       fi

                       ./add_inventory "Machine Instance Node $NodeNo" $resource_id
                       if [ "$demo" = "1" ] ; then
                               ./db.sh "insert into DemoResources values ('$SystemId', 'EC2 Instance', '$resource_id');"
                       fi

                       echo $resource_id >> resources

                       # Add tags to the instances so that they can locate each other and synchronise during the boot phase
                       ec2-create-tags $resource_id --tag SystemID=$SystemId --tag NodeNo=$NodeNo 
                               --tag EIP=$EIP --tag IAM=SDS$SystemId 
                                --tag Name="SkySQL Data Suite $SystemId Node $NodeNo" 
                                 --tag SystemStatus=pending

                       # Find all the EBS volumes associated with an instance and tag those so that destruction can take place
                       # cleanly
                       cnt=0
                       devices=`ec2-describe-instances $resource_id | grep BLOCKDEVICE | awk '{ print $3 }'`
                       ...


                                                                                                                                          PAGE 25
Wednesday, 5 December 12
Hidden Gems
                    Userdata.sh                                                              Variable definition - they will
                                                                                              be used later when other
                                                                                                   scripts are called
                      #!/bin/sh
                      export SystemId=12345
                      export keypair=SDS12345
                      export role=SDS12345
                      export security=SDS12345
                      export EIP=107.21.101.100
                      export DiskSize=5
                      export NodeNo=3
                      export NumberNodes=3
                      export InitialPassword=MyPassword
                      export EmailAddress="skysql.test@gmail.com"
                      echo Start boot script execution >> /var/log/SDS.boot.log
                      cat > /etc/my.cnf << MY_CNF_EOF                                          On-the-fly configuration
                                                                                                 files can be created
                           ... Specific my.cnf ...

                      MY_CNF_EOF
                      if [ -d /usr/local/skysql/init.boot ] ; then
                         for script in /usr/local/skysql/init.boot/* ; do
                            echo Run: $script       >> /var/log/SDS.boot.log   2>&1
                            sh $script              >> /var/log/SDS.boot.log   2>&1
                         done
                      fi                                                                                    Predefined scripts are
                      if [ -d /usr/local/skysql/init.boot.3 ] ; then
                         for script in /usr/local/skysql/init.boot.3/* ; do                                   present in the AMI
                            echo Run: $script       >> /var/log/SDS.boot.log   2>&1
                            sh $script              >> /var/log/SDS.boot.log   2>&1
                         done
                      fi

                      echo Completed boot script execution        >> /var/log/SDS.boot.log


                                                                                                                                     PAGE 26
Wednesday, 5 December 12
Hidden Gems
                    Userdata.sh     Work with IAMs if you
                                    want to interact with
                                      other instances




                                  Use custom AMIs with
                                   prepared scripts and
               Paste your boot    preloaded software for
               commands here          more complex
                                        operations


                                          PAGE 27
Wednesday, 5 December 12
Creating New Instances              hi1.4xlarge
                                              (8 cores, 60GB RAM) provides
                                                  10GBit networking and
                                                    placement groups




   Heavy I/O ops can benefit
     from the use of EBS
     optimised instances
                                             Best fit for a non-sync replication
                                                    cluster is m2.4xlarge
                                                    (8 cores, 68GB RAM)




     Use VPCs to create a VP DB
    Cluster or if you have already
         a VPC for your app



                                                              PAGE 28
Wednesday, 5 December 12
Using AMIs




                                 PAGE 29
Wednesday, 5 December 12
Using AMIs




                                 PAGE 29
Wednesday, 5 December 12
Using AMIs




                                 PAGE 29
Wednesday, 5 December 12
Using AMIs




                                 PAGE 29
Wednesday, 5 December 12
Tagging

    Volume tagging is also
     helpful to match the
          instances




      Name, Node etc. are
       helpful in scripts




                              PAGE 30
Wednesday, 5 December 12
Networking

             Elastic IP replaces
             public IP address




                     It reflects the EIP




                        Internal IP - it can be
                       used for intra-instance
                          communication




                                                  PAGE 31
Wednesday, 5 December 12
Security
                    Groups




                               PAGE 32
Wednesday, 5 December 12
Security
                    Identity and Access Management




                                                     PAGE 33
Wednesday, 5 December 12
Storage




       Use Separate System
       and Data storage... or
        even file per tables




                                PAGE 34
Wednesday, 5 December 12
Backup & Restore                                                 Even better:
                                                                                     •Attach a EBS Volume
                                                                                     •Direct the backup to the new volume
                      innobackupex                                                   •Stream to S3
                          --user=user                                                •...
                          --password=password                                        •Keep the last backup for emergencies
                          --stream=tar ./ 2>

                           tmp-file   | S3Control.sh stream bucket backup-name

                                   #!/bin/sh
                                   SkySQLLIB=/usr/local/skysql/skysql_aws/
                                   if [ ! -n "$EC2_HOME" ] ; then
                                     export EC2_HOME=/opt/aws/apitools/ec2
                                   fi
                                   LIBDIR="${EC2_HOME}/lib"

                                   for jar in "${LIBDIR}"/*.jar ; do
                                     CP="${CP}:${jar}"
                                   done

                                   LIBDIR="${EC2_HOME}/lib"
                                   for jar in "${LIBDIR}"/*.jar ; do
                                     CP="${CP}:${jar}"
                                   done
                                   CP=.:${SkySQLLIB}SkySQLAWS.jar:${SkySQLLIB}aws-java-sdk-1.3.16.jar:$CP
                                   java -classpath $CP S3Control $*

                                                                                                             PAGE 35
Wednesday, 5 December 12
Why RDS?

                           • One-Click solution, good feature set

                           • Peace of mind backup and disaster recovery

                           • Great if you have “few” DB Servers



                                                                          PAGE 36
Wednesday, 5 December 12
Why MySQL/MariaDB on EC2?
                           • You can choose among different technologies
                            • MySQL, MariaDB, Percona
                            •   MySQL Replication vs Galera, MySQL Cluster, TokuDB, InfiniDB etc.

                           • You want to use High I/O instances and SSDs
                           • You want to control the deployment with tuned configuration
                             params

                           • You want to save between 10% and 25%
                                                                                                    PAGE 37
Wednesday, 5 December 12
Why MySQL on Rackspace?

                           • Fanatical about support!

                           • Other systems running on Rackspace - Rackspace hosting

                           • More control of your instances



                                                                                  PAGE 38
Wednesday, 5 December 12
Why Google Cloud SQL?



                           •   You develop and use applications with Google AppEngine




                                                                                    PAGE 39
Wednesday, 5 December 12
For More Information...
                   •       Try the Configurator and How-To Video: http://
                           cloud.skysql.com

                   •       The Admin Console: http://www.skysql.com/
                           downloads/community/skysql-console

                   •       Forums: https://www.skysql.com/forums/
                           skysql-cloud-data-suite

                   •       Web: https://www.skysql.com/cloud

                   •       Bugs: http://bugs.skysql.com

                   •       Try it! http://config.skysql.com
                       •    Free SkySQL account available for testing
                       •    Test on your account


                                                                            PAGE 40
Wednesday, 5 December 12
Thank You!

                                                              ivan@skysql.com
                           www.skysql.com                 izoratti.blogspot.com
                                                     www.slideshare.net/izoratti

Wednesday, 5 December 12

Contenu connexe

En vedette (6)

HA Reloaded
HA ReloadedHA Reloaded
HA Reloaded
 
NeoMedia Mobile World Congress
NeoMedia Mobile World CongressNeoMedia Mobile World Congress
NeoMedia Mobile World Congress
 
visibility mobile and metatxt launch CTIA 2008
visibility mobile and metatxt launch CTIA 2008visibility mobile and metatxt launch CTIA 2008
visibility mobile and metatxt launch CTIA 2008
 
College Design Projects
College Design ProjectsCollege Design Projects
College Design Projects
 
MySQL DW Breakfast
MySQL DW BreakfastMySQL DW Breakfast
MySQL DW Breakfast
 
SEO for Mobile by visibility mobile
SEO for Mobile by visibility mobileSEO for Mobile by visibility mobile
SEO for Mobile by visibility mobile
 

Similaire à Sky Is The limit

Prince Building Tech Talk 12102012
Prince Building Tech Talk 12102012Prince Building Tech Talk 12102012
Prince Building Tech Talk 12102012
Andy Parsons
 
Cloud Foundry Open Tour Keynote
Cloud Foundry Open Tour KeynoteCloud Foundry Open Tour Keynote
Cloud Foundry Open Tour Keynote
RamnivasLaddad
 
2012 RightScale Roadtrip - Business Software Used by Real Businesses, Coupa S...
2012 RightScale Roadtrip - Business Software Used by Real Businesses, Coupa S...2012 RightScale Roadtrip - Business Software Used by Real Businesses, Coupa S...
2012 RightScale Roadtrip - Business Software Used by Real Businesses, Coupa S...
RightScale
 
Aras PLM Software Leveraging the Cloud
Aras PLM Software Leveraging the CloudAras PLM Software Leveraging the Cloud
Aras PLM Software Leveraging the Cloud
Aras
 
Understanding the Cloud Computing Stack
Understanding the Cloud Computing StackUnderstanding the Cloud Computing Stack
Understanding the Cloud Computing Stack
Rackspace
 
Aras Leveraging the Cloud for PLM
Aras Leveraging the Cloud for PLMAras Leveraging the Cloud for PLM
Aras Leveraging the Cloud for PLM
Aras
 
Stacking up with OpenStack: building for High Availability
Stacking up with OpenStack: building for High AvailabilityStacking up with OpenStack: building for High Availability
Stacking up with OpenStack: building for High Availability
OpenStack Foundation
 
Stacking up with OpenStack: Building for High Availability
Stacking up with OpenStack: Building for High AvailabilityStacking up with OpenStack: Building for High Availability
Stacking up with OpenStack: Building for High Availability
OpenStack Foundation
 
Oracle Cloud Computing Strategy (EMO)
Oracle Cloud Computing Strategy (EMO)Oracle Cloud Computing Strategy (EMO)
Oracle Cloud Computing Strategy (EMO)
rachgregs
 

Similaire à Sky Is The limit (20)

Prince Building Tech Talk 12102012
Prince Building Tech Talk 12102012Prince Building Tech Talk 12102012
Prince Building Tech Talk 12102012
 
Cloud Foundry Open Tour Keynote
Cloud Foundry Open Tour KeynoteCloud Foundry Open Tour Keynote
Cloud Foundry Open Tour Keynote
 
Beam PHP2012 Workshops: The Cloud
Beam PHP2012 Workshops: The CloudBeam PHP2012 Workshops: The Cloud
Beam PHP2012 Workshops: The Cloud
 
considering the cloud? From IaaS to SaaS and Beyond - Find Your Path to the C...
considering the cloud? From IaaS to SaaS and Beyond - Find Your Path to the C...considering the cloud? From IaaS to SaaS and Beyond - Find Your Path to the C...
considering the cloud? From IaaS to SaaS and Beyond - Find Your Path to the C...
 
2012 RightScale Roadtrip - Business Software Used by Real Businesses, Coupa S...
2012 RightScale Roadtrip - Business Software Used by Real Businesses, Coupa S...2012 RightScale Roadtrip - Business Software Used by Real Businesses, Coupa S...
2012 RightScale Roadtrip - Business Software Used by Real Businesses, Coupa S...
 
Open Cloud System Networking Vision
Open Cloud System Networking VisionOpen Cloud System Networking Vision
Open Cloud System Networking Vision
 
Oracle Enterprise Manager
Oracle Enterprise ManagerOracle Enterprise Manager
Oracle Enterprise Manager
 
Aras PLM Software Leveraging the Cloud
Aras PLM Software Leveraging the CloudAras PLM Software Leveraging the Cloud
Aras PLM Software Leveraging the Cloud
 
Understanding the Cloud Computing Stack
Understanding the Cloud Computing StackUnderstanding the Cloud Computing Stack
Understanding the Cloud Computing Stack
 
Aras Leveraging the Cloud for PLM
Aras Leveraging the Cloud for PLMAras Leveraging the Cloud for PLM
Aras Leveraging the Cloud for PLM
 
Stacking up with OpenStack: building for High Availability
Stacking up with OpenStack: building for High AvailabilityStacking up with OpenStack: building for High Availability
Stacking up with OpenStack: building for High Availability
 
Stacking up with OpenStack: Building for High Availability
Stacking up with OpenStack: Building for High AvailabilityStacking up with OpenStack: Building for High Availability
Stacking up with OpenStack: Building for High Availability
 
RightScale Introduction, Amazon EBS
RightScale Introduction, Amazon EBSRightScale Introduction, Amazon EBS
RightScale Introduction, Amazon EBS
 
OpenStack NASA
OpenStack NASAOpenStack NASA
OpenStack NASA
 
Oracle Cloud Computing Strategy (EMO)
Oracle Cloud Computing Strategy (EMO)Oracle Cloud Computing Strategy (EMO)
Oracle Cloud Computing Strategy (EMO)
 
The sky's the limit
The sky's the limitThe sky's the limit
The sky's the limit
 
Tour de Clouds: Understanding Multi-Cloud Integration
Tour de Clouds: Understanding Multi-Cloud IntegrationTour de Clouds: Understanding Multi-Cloud Integration
Tour de Clouds: Understanding Multi-Cloud Integration
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
What Does Cloud Computing Mean for the Channel?
What Does Cloud Computing Mean for the Channel?What Does Cloud Computing Mean for the Channel?
What Does Cloud Computing Mean for the Channel?
 
The Cloud and Next Gen IT Gordon Haff - p camp-boston2012
The Cloud and Next Gen IT   Gordon Haff - p camp-boston2012The Cloud and Next Gen IT   Gordon Haff - p camp-boston2012
The Cloud and Next Gen IT Gordon Haff - p camp-boston2012
 

Plus de Ivan Zoratti

Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ivan Zoratti
 

Plus de Ivan Zoratti (20)

AI, ML and Graph Algorithms: Real Life Use Cases with Neo4j
AI, ML and Graph Algorithms: Real Life Use Cases with Neo4jAI, ML and Graph Algorithms: Real Life Use Cases with Neo4j
AI, ML and Graph Algorithms: Real Life Use Cases with Neo4j
 
Introducing the Open Edge Module
Introducing the Open Edge ModuleIntroducing the Open Edge Module
Introducing the Open Edge Module
 
MySQL Performance Tuning London Meetup June 2017
MySQL Performance Tuning London Meetup June 2017MySQL Performance Tuning London Meetup June 2017
MySQL Performance Tuning London Meetup June 2017
 
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More FlexibilityNOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
 
MariaDB ColumnStore - LONDON MySQL Meetup
MariaDB ColumnStore - LONDON MySQL MeetupMariaDB ColumnStore - LONDON MySQL Meetup
MariaDB ColumnStore - LONDON MySQL Meetup
 
ScaleDB Technical Presentation
ScaleDB Technical PresentationScaleDB Technical Presentation
ScaleDB Technical Presentation
 
Time Series From Collection To Analysis
Time Series From Collection To AnalysisTime Series From Collection To Analysis
Time Series From Collection To Analysis
 
ScaleDB Technical Presentation
ScaleDB Technical PresentationScaleDB Technical Presentation
ScaleDB Technical Presentation
 
MySQL for Beginners - part 1
MySQL for Beginners - part 1MySQL for Beginners - part 1
MySQL for Beginners - part 1
 
Anatomy of a Proxy Server - MaxScale Internals
Anatomy of a Proxy Server - MaxScale InternalsAnatomy of a Proxy Server - MaxScale Internals
Anatomy of a Proxy Server - MaxScale Internals
 
Orchestrating MySQL
Orchestrating MySQLOrchestrating MySQL
Orchestrating MySQL
 
GTIDs Explained
GTIDs ExplainedGTIDs Explained
GTIDs Explained
 
The Evolution of Open Source Databases
The Evolution of Open Source DatabasesThe Evolution of Open Source Databases
The Evolution of Open Source Databases
 
MaxScale for Effective MySQL Meetup NYC - 14.01.21
MaxScale for Effective MySQL Meetup NYC - 14.01.21MaxScale for Effective MySQL Meetup NYC - 14.01.21
MaxScale for Effective MySQL Meetup NYC - 14.01.21
 
MariaDB 10 Tutorial - 13.11.11 - Percona Live London
MariaDB 10 Tutorial - 13.11.11 - Percona Live LondonMariaDB 10 Tutorial - 13.11.11 - Percona Live London
MariaDB 10 Tutorial - 13.11.11 - Percona Live London
 
SkySQL & MariaDB What's all the buzz?
SkySQL & MariaDB What's all the buzz?SkySQL & MariaDB What's all the buzz?
SkySQL & MariaDB What's all the buzz?
 
MySQL & MariaDB - Innovation Happens Here
MySQL & MariaDB - Innovation Happens HereMySQL & MariaDB - Innovation Happens Here
MySQL & MariaDB - Innovation Happens Here
 
What can we learn from NoSQL technologies?
What can we learn from NoSQL technologies?What can we learn from NoSQL technologies?
What can we learn from NoSQL technologies?
 
Big Data with MySQL
Big Data with MySQLBig Data with MySQL
Big Data with MySQL
 
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
 

Dernier

Dernier (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Sky Is The limit

  • 1. The Sky’s the Limit Hints and Best Practices to Integrate and Run MySQL on Standard Servers and in the Cloud Ivan Zoratti V1212.01 Wednesday, 5 December 12
  • 2. Who is Ivan ? Wednesday, 5 December 12
  • 3. SkySQL •#1 provider of MySQL-based solutions, for software and services •Backed by Monty Program AB and 3rd parties active in the MySQL ecosystem •Committed to provide the best solutions around MySQL for the Community and for the Enterprise Wednesday, 5 December 12
  • 4. Agenda • Understanding the Cloud Landscape • Anatomy of a MySQL Database in the Cloud • MySQL in AWS - Tips and Tricks PAGE 4 Wednesday, 5 December 12
  • 5. Understanding the Cloud Landscape Wednesday, 5 December 12
  • 6. The Landscape Or maybe an aerial view... PAGE 6 Wednesday, 5 December 12
  • 7. The Landscape Or maybe an aerial view... Public Clouds PAGE 6 Wednesday, 5 December 12
  • 8. The Landscape Or maybe an aerial view... Public Clouds Hybrid Clouds PAGE 6 Wednesday, 5 December 12
  • 9. The Landscape Or maybe an aerial view... Public Clouds Hybrid Clouds Private Clouds PAGE 6 Wednesday, 5 December 12
  • 10. The Landscape Or maybe an aerial view... IaaS Infrastructure as a Service Public Clouds Hybrid Clouds Private Clouds PAGE 6 Wednesday, 5 December 12
  • 11. The Landscape Or maybe an aerial view... PaaS Platform as a Service IaaS Infrastructure as a Service Public Clouds Hybrid Clouds Private Clouds PAGE 6 Wednesday, 5 December 12
  • 12. The Landscape Or maybe an aerial view... SaaS Software as a Service PaaS Platform as a Service IaaS Infrastructure as a Service Public Clouds Hybrid Clouds Private Clouds PAGE 6 Wednesday, 5 December 12
  • 13. The Landscape Or maybe an aerial view... SaaS Software as a Service Level of Abstraction PaaS Platform as a Service IaaS Infrastructure as a Service Public Clouds Hybrid Clouds Private Clouds PAGE 6 Wednesday, 5 December 12
  • 14. The Landscape Or maybe an aerial view... Control / Governance SaaS Software as a Service Level of Abstraction PaaS Platform as a Service IaaS Infrastructure as a Service Public Clouds Hybrid Clouds Private Clouds PAGE 6 Wednesday, 5 December 12
  • 15. The Landscape Or maybe an aerial view... Control / Governance SaaS Flexibility of Purpose Software as a Service Level of Abstraction PaaS Platform as a Service IaaS Infrastructure as a Service Public Clouds Hybrid Clouds Private Clouds PAGE 6 Wednesday, 5 December 12
  • 16. The Landscape Or maybe an aerial view... PAGE 7 Wednesday, 5 December 12
  • 17. The Landscape Or maybe an aerial view... PAGE 7 Wednesday, 5 December 12
  • 18. The Landscape Or maybe an aerial view... PAGE 7 Wednesday, 5 December 12
  • 19. The Cloud Promise • Agility • Reduced Costs • Compatibility • Reliability • Elasticity • Security • Low Maintenance • Systems Independence • Multi-tenancy • Virtualization PAGE 8 Wednesday, 5 December 12
  • 20. The Cloud Promise • Agility F AC T!• Reduced Costs • Compatibility lo •ud ] Reliability he C on al (*) • Elasticity T t[ Re • la i tSecurity ! nd ly sN o ie Fr Systems Independence I • Low Maintenance atabas e- • D • Multi-tenancy et... no ty • Virtualization Or PAGE 8 Wednesday, 5 December 12
  • 21. Challenges for a MySQL DBA in the next 3 years • Integration with other databases - primarily NoSQL • Adopt the right technology to make MySQL and the Cloud work together • Integration with provisioning, administration and monitoring tools • Increase/provide better security for the database and for the users’ data • Provide elasticity and reduce TCO PAGE 9 Wednesday, 5 December 12
  • 22. Anatomy of a MySQL Database in the Cloud Wednesday, 5 December 12
  • 23. A Mix & Match • Deployment • Internal / External Communication • High Availability • Scalability • Daily Operations • Special (non-InnoDB and non-Replication) features PAGE 11 Wednesday, 5 December 12
  • 24. Deployment PAGE 12 Wednesday, 5 December 12
  • 25. Deployment Amazon RDS Rackspace •One-click •Limited offering (max 4GB RAM) •Master/Slave replicas (up to 5 replicas) •You can get up to 30GB RAM and 1.2TB/server •Choice of instances, IOPs, storage etc. Amazon EC2 Google SQL •Deployment procedure needed •Up to 16GB RAM and 100GB storage •Full control on technology and configuration •Can go on SSDs, High I/O etc. PAGE 13 Wednesday, 5 December 12
  • 26. Communication & Networking PAGE 14 Wednesday, 5 December 12
  • 27. Communication & Networking Amazon RDS Rackspace •AWS vs Rackspace •550MB/min (73Mbps) •No control on Networking 160MB/min (21Mbps) •http://bit.ly/TLrILl Amazon EC2 Google SQL •EC2 Placement Groups - 10Gbps connectivity •No control on Networking PAGE 15 Wednesday, 5 December 12
  • 28. Highly Availability PAGE 16 Wednesday, 5 December 12
  • 29. Highly Availability Amazon RDS Rackspace •Internal NAS replication •SAN Replication •MySQL Replication •Multi-region replication Amazon EC2 Google SQL •BYOR (Bring Your Own Replication) •Internal sync/async replication (not MySQL Replication) •Multi-region replication PAGE 17 Wednesday, 5 December 12
  • 30. Scalability PAGE 18 Wednesday, 5 December 12
  • 31. Scalability Amazon RDS Rackspace •From Micro to XLarge instances (64GB RAM) •No Replication or other solutions •Dedicated Instances •Up to 5 Read Replicas Amazon EC2 Google SQL •From Micro to XLarge instances •No Replication •Hi I/O with SSDs and placement groups •Used for Google applications •Dedicated Instances •Limited to 16MB for external applications •Unlimited Replicas PAGE 19 Wednesday, 5 December 12
  • 32. Daily Operations PAGE 20 Wednesday, 5 December 12
  • 33. Other Features PAGE 21 Wednesday, 5 December 12
  • 34. Cost Factors PAGE 22 Wednesday, 5 December 12
  • 35. MySQL in AWS - Tips & Tricks Wednesday, 5 December 12
  • 36. Some Tips for... • New instances • Tagging • Networking • Security • Storage • Backup & Restore PAGE 24 Wednesday, 5 December 12
  • 37. Some Tips for... • New instances • Tagging • Networking • Security • Storage • Backup & Restore PAGE 24 Wednesday, 5 December 12
  • 38. Some Tips for... • New instances • Tagging • Networking • Security • Storage • Backup & Restore PAGE 24 Wednesday, 5 December 12
  • 39. Hidden Gems AWS API # Create the actual EC2 instance from the appropriate AMI using the key pair, security group, IAM role # and user data script we previously created for this deployment resource_id=`ec2-run-instances $ami -k $keypair -g $group -f $udscript -t $size -b /dev/sdf=:$ebssize:false -p $role $extras 2> error | awk '$1 == "INSTANCE" { print $2 }'` if [ "$resource_id" = "" ]; then         ./logerror $session_id "Create Instance" `cat error`         (echo "Create instance failed" ; cat error) > error.$SystemId         exit 1 fi ./add_inventory "Machine Instance Node $NodeNo" $resource_id if [ "$demo" = "1" ] ; then         ./db.sh "insert into DemoResources values ('$SystemId', 'EC2 Instance', '$resource_id');" fi echo $resource_id >> resources # Add tags to the instances so that they can locate each other and synchronise during the boot phase ec2-create-tags $resource_id --tag SystemID=$SystemId --tag NodeNo=$NodeNo         --tag EIP=$EIP --tag IAM=SDS$SystemId          --tag Name="SkySQL Data Suite $SystemId Node $NodeNo"           --tag SystemStatus=pending # Find all the EBS volumes associated with an instance and tag those so that destruction can take place # cleanly cnt=0 devices=`ec2-describe-instances $resource_id | grep BLOCKDEVICE | awk '{ print $3 }'` ... PAGE 25 Wednesday, 5 December 12
  • 40. Hidden Gems AWS API # Create the actual EC2 instance from the appropriate AMI using the key pair, security group, IAM role # and user data script we previously created for this deployment resource_id=`ec2-run-instances $ami -k $keypair -g $group -f $udscript -t $size -b /dev/sdf=:$ebssize:false -p $role $extras 2> error | awk '$1 == "INSTANCE" { print $2 }'` if [ "$resource_id" = "" ]; then         ./logerror $session_id "Create Instance" `cat error`         (echo "Create instance failed" ; cat error) > error.$SystemId         exit 1 fi ./add_inventory "Machine Instance Node $NodeNo" $resource_id if [ "$demo" = "1" ] ; then         ./db.sh "insert into DemoResources values ('$SystemId', 'EC2 Instance', '$resource_id');" fi echo $resource_id >> resources # Add tags to the instances so that they can locate each other and synchronise during the boot phase ec2-create-tags $resource_id --tag SystemID=$SystemId --tag NodeNo=$NodeNo         --tag EIP=$EIP --tag IAM=SDS$SystemId          --tag Name="SkySQL Data Suite $SystemId Node $NodeNo"           --tag SystemStatus=pending # Find all the EBS volumes associated with an instance and tag those so that destruction can take place # cleanly cnt=0 devices=`ec2-describe-instances $resource_id | grep BLOCKDEVICE | awk '{ print $3 }'` ... PAGE 25 Wednesday, 5 December 12
  • 41. Hidden Gems Userdata.sh Variable definition - they will be used later when other scripts are called #!/bin/sh export SystemId=12345 export keypair=SDS12345 export role=SDS12345 export security=SDS12345 export EIP=107.21.101.100 export DiskSize=5 export NodeNo=3 export NumberNodes=3 export InitialPassword=MyPassword export EmailAddress="skysql.test@gmail.com" echo Start boot script execution >> /var/log/SDS.boot.log cat > /etc/my.cnf << MY_CNF_EOF On-the-fly configuration files can be created ... Specific my.cnf ... MY_CNF_EOF if [ -d /usr/local/skysql/init.boot ] ; then for script in /usr/local/skysql/init.boot/* ; do echo Run: $script >> /var/log/SDS.boot.log 2>&1 sh $script >> /var/log/SDS.boot.log 2>&1 done fi Predefined scripts are if [ -d /usr/local/skysql/init.boot.3 ] ; then for script in /usr/local/skysql/init.boot.3/* ; do present in the AMI echo Run: $script >> /var/log/SDS.boot.log 2>&1 sh $script >> /var/log/SDS.boot.log 2>&1 done fi echo Completed boot script execution >> /var/log/SDS.boot.log PAGE 26 Wednesday, 5 December 12
  • 42. Hidden Gems Userdata.sh Work with IAMs if you want to interact with other instances Use custom AMIs with prepared scripts and Paste your boot preloaded software for commands here more complex operations PAGE 27 Wednesday, 5 December 12
  • 43. Creating New Instances hi1.4xlarge (8 cores, 60GB RAM) provides 10GBit networking and placement groups Heavy I/O ops can benefit from the use of EBS optimised instances Best fit for a non-sync replication cluster is m2.4xlarge (8 cores, 68GB RAM) Use VPCs to create a VP DB Cluster or if you have already a VPC for your app PAGE 28 Wednesday, 5 December 12
  • 44. Using AMIs PAGE 29 Wednesday, 5 December 12
  • 45. Using AMIs PAGE 29 Wednesday, 5 December 12
  • 46. Using AMIs PAGE 29 Wednesday, 5 December 12
  • 47. Using AMIs PAGE 29 Wednesday, 5 December 12
  • 48. Tagging Volume tagging is also helpful to match the instances Name, Node etc. are helpful in scripts PAGE 30 Wednesday, 5 December 12
  • 49. Networking Elastic IP replaces public IP address It reflects the EIP Internal IP - it can be used for intra-instance communication PAGE 31 Wednesday, 5 December 12
  • 50. Security Groups PAGE 32 Wednesday, 5 December 12
  • 51. Security Identity and Access Management PAGE 33 Wednesday, 5 December 12
  • 52. Storage Use Separate System and Data storage... or even file per tables PAGE 34 Wednesday, 5 December 12
  • 53. Backup & Restore Even better: •Attach a EBS Volume •Direct the backup to the new volume innobackupex •Stream to S3 --user=user •... --password=password •Keep the last backup for emergencies --stream=tar ./ 2> tmp-file | S3Control.sh stream bucket backup-name #!/bin/sh SkySQLLIB=/usr/local/skysql/skysql_aws/ if [ ! -n "$EC2_HOME" ] ; then export EC2_HOME=/opt/aws/apitools/ec2 fi LIBDIR="${EC2_HOME}/lib" for jar in "${LIBDIR}"/*.jar ; do CP="${CP}:${jar}" done LIBDIR="${EC2_HOME}/lib" for jar in "${LIBDIR}"/*.jar ; do CP="${CP}:${jar}" done CP=.:${SkySQLLIB}SkySQLAWS.jar:${SkySQLLIB}aws-java-sdk-1.3.16.jar:$CP java -classpath $CP S3Control $* PAGE 35 Wednesday, 5 December 12
  • 54. Why RDS? • One-Click solution, good feature set • Peace of mind backup and disaster recovery • Great if you have “few” DB Servers PAGE 36 Wednesday, 5 December 12
  • 55. Why MySQL/MariaDB on EC2? • You can choose among different technologies • MySQL, MariaDB, Percona • MySQL Replication vs Galera, MySQL Cluster, TokuDB, InfiniDB etc. • You want to use High I/O instances and SSDs • You want to control the deployment with tuned configuration params • You want to save between 10% and 25% PAGE 37 Wednesday, 5 December 12
  • 56. Why MySQL on Rackspace? • Fanatical about support! • Other systems running on Rackspace - Rackspace hosting • More control of your instances PAGE 38 Wednesday, 5 December 12
  • 57. Why Google Cloud SQL? • You develop and use applications with Google AppEngine PAGE 39 Wednesday, 5 December 12
  • 58. For More Information... • Try the Configurator and How-To Video: http:// cloud.skysql.com • The Admin Console: http://www.skysql.com/ downloads/community/skysql-console • Forums: https://www.skysql.com/forums/ skysql-cloud-data-suite • Web: https://www.skysql.com/cloud • Bugs: http://bugs.skysql.com • Try it! http://config.skysql.com • Free SkySQL account available for testing • Test on your account PAGE 40 Wednesday, 5 December 12
  • 59. Thank You! ivan@skysql.com www.skysql.com izoratti.blogspot.com www.slideshare.net/izoratti Wednesday, 5 December 12