SlideShare a Scribd company logo
1 of 45
Download to read offline
#SGvFabric
   © 2011 VMware Inc. All rights reserved
vFabric: What’s in it?




                         Rich                                   Integration   Batch            Spring
 Frameworks & Tools      Web
                                    Social and      Data
                                                                Patterns      Framework        Tool Suite
                                    Mobile          Access




      vFabric            Application Srv Web Runtime Messaging Elastic Data Grid  DBaaS
                                                                                  Perf, Mgmt
  Application Services    tc Server        ERS                                   vPostgres
                                                     RabbitMQ Gemfire / SQLFire Hyperic / Insight




                             EM4J                                                    Data                   vCops/
                                                                                    Director                 APM
                                                              vSphere 5




  2
Cloud-scale challenge…




3
Challenge


 Managing on-line applications on
 a cloud-scale is hard.
 As number of users grows,
 database becomes
 the bottleneck.


 4
DB Bottleneck




                Scales…




                Scales…




  5
Cause


 Traditional databases were
 never designed to support
 thousands of concurrent
 users.



 6
Traditional DB Characteristics

 § Designed against no            § Centralized in nature
      longer relevant               • Data change capture an
      constraints                    afterthought
      • Network unreliable/slow     • Lacks data partitioning
      • RAM prices prohibitive       facilities

 § One size fits all              § Obsessed with ACID
      • Designed for everything,    • Constant contention for
       optimized for nothing         resources cause locks
      • Often incompatible with    § Monolithic design
       modern workloads             §  Requires lots of hardware to
                                      scale



  7
Traditional DB Loves IO


      Buffers primarily
        tuned for IO




                          First write
                           to LOG
          Second write
          to Data files



  8
Transaction in Traditional DB
                                        Source: Research by MIT and Brown: “OLTP Under
                                        the Looking Glass” by S. Harizopoulos, D. J. Abadi,
                                        S. Madden, M. Stonebraker, SIGMOD 2008.



                           12%

          30%
                                  8%              Data
                 Percentage of                    Btrees keys
                Computer cycles                   Logging
                 based on 3.5M
                    sample
                                                  Locking
                                  21%             Latching
          10%                                     Buffer management


                    19%




  9
Cloud-scale solution…




10
Apparent Choices


 Build expensive database
 clustering solution or
 lengthy re-write
 for “big data”?



 11
Next generation option



SQLFire is different;
it’s build for speed     Scale
                         much?
                                 Hablo
                                 SQL?



and scale.




12
New Approach


 Elastic, in-memory database
 designed specifically for
 speed and low latency
 accessible through a
 familiar SQL interface.


 13
SQLFire Characteristics

 §  Highly concurrent data       §  Shared nothing logs on
   structures resident in and      disk; application writes are
   optimized for main memory       never exposed to the disk
 §  Rethink ACID transactions;    seek latencies
   all state resides in           §  Parallelize data access
   distributed memory to avoid     and application behavior;
   any single points of            dynamically “shard SQL”
   contention                     §  Dynamic rebalancing of
 §  Partition-aware DB design     data as cluster size grows/
   spreads workloads across        shrinks. Most efficient way
   both data set and physical      of managing resources/
   nodes                           data.


  14
SQLFire speed…




15
SQLFire v Traditional Databases


 SQLFire response times
 are faster and more
 consistent under
 increased
 database load.

  16
Sample Comparison

 §  Spring Travel Application
 §  Similar hardware (8 vCPU, 4GB)
 §  Out-of-the-box configuration

          SQLF R/T (ms)   SQLF CPU %   MySQL R/T (ms)   MYSQL CPU %

                14              9            25              1

                8              32            23             19
                5              61           172             76

                6              77           fail            fail


               984             98           fail            fail




 17
Response Time

  R/T
 200
 180
 160
                    MySQL
 140          increased with load
 120
 100
  80                                                SQLFire
                                                  near constant
  60                                               much lower

  40
  20
      0
                                                                         Threads
          0          500            1000   1500                   2000


 18
Number of Threads


  R/T
                                                             SQLFire scales
 1200	
                                                      to 7200 threads
                                                            with 1 second R/T
 1000	
  

  800	
  
                           MySQL reaches
                              saturation
  600	
                    at 1850 threads


  400	
  

  200	
  

       0	
  
               0	
     1000	
     2000	
     3000	
     4000	
     5000	
     6000	
     7000	
     8000	
   Threads



  19
Distributed data…




20
Why Scale Horizontally?


 Sub-divide system into
 independent data sets, eliminate
 distributed transactions to
 achieve elasticity,
 linear scalability
 and predictable
 latency.

  21
Horizontal Scalability – Throughput
                      800000                                    1400




                      700000
                                                                1200




                      600000
 Queries per second




                                                                1000




                                                                       Client threads
                      500000

                                                                800


                      400000
                                                                                        queriesPerSecond
                                                                600
                                                                                        client threads
                      300000



                                                                400
                      200000




                                                                200
                      100000




                          0                                     0
                               2     4         6       8   10
                                   Number of servers


            22
Horizontal Scalability – Consistency/HA


 §  Resiliency through replication, synchronous but in parallel
 §  Row updates are always atomic; no need for transactions
 §  Shared nothing architecture, including storage
   §  Instant failover at protocol level
   §  Apps retain their connections
   §  Data remains available

                                                    APP




                                    SQLFire       SQLFire          SQLFire




  23
Data management strategies…




24
Data strategies – Partitioning

 §  Balances data across SQLFire cluster
 §  Delivers redundancy for high availability



                                     APP




                 SQLFire            SQLFire         SQLFire



               Write operation (with 2 redundant copies)
               Read operation


  25
SQLFire Hash Partitioning

 §  Partition by column or primary key
     •  Can specify multiple columns
     •  Uses hashCode() for single column or primary key
     •  Uses serialized bytes for multiple columns
     •  Creates uniform distribution of data across the cluster




       // Partition by column
       CREATE TABLE MY_TABLE
       ( . . . ) PARTITION BY COLUMN ( COLUMN_A)

       // Partition by primary key
       CREATE TABLE MY_TABLE
       ( . . . ) PARTITION BY PRIMARY KEY



  26
SQLFire Range Partitioning

 §  Partition by range of column values
     •  Can specify multiple ranges
     •  Colocates data in specified ranges
     •  Used to ensure locality of data in a partition for range queries or cross table
       joins




       // Partition by range
       CREATE TABLE MY_TABLE
       ( . . . ) PARTITION BY RANGE ( COLUMN_A)
         (
             VALUES BETWEEN 1 AND 10,
             VALUES BETWEEN 50 AND 60
           )



  27
SQLFire List Partitioning

 §  Partition by a set of column values
     •  Can specify column value sets
     •  Colocates data with specified column values
     •  Used to ensure locality of data in a partition for sets of values or cross table
       joins




       // Partition by list
       CREATE TABLE MY_TABLE
       ( . . . ) PARTITION BY LIST ( COLUMN_A)
         (
             VALUES (‘VALUE_A’, ‘VALUE_B’),
             VALUES (‘VALUE_Y’, ‘VALUE_Z’)
           )



  28
SQLFire Expression Partitioning

 §  Partition by a column expression
     •  Expression must be valid SQL function
     •  Must reference only columns in the table
     •  Hash partition with value determined by the expression




       // Partition by expression
       CREATE TABLE MY_TABLE
       ( . . . ) PARTITION BY ( MONTH ( MY_DATE ) )




  29
SQLFire Default Partitioning

 §  Default hash partitioning strategy
     •  Start server with table-default-partitioned property set to true!
        •  First foreign key whose referenced primary key is also a partition column
        •  Primary key
        •  First unique key
        •  SQLFire-generated row id


       // No PARTITION BY clauses
       CREATE TABLE MY_TABLE
          (COLUMN_A INT NOT NULL CONSTRAINT A_PK PRIMARY
       KEY, . . .)

       CREATE TABLE MY_OTHER_TABLE
          (COLUMN_B INT NOT NULL CONSTRAINT B_PK PRIMARY KEY,
           COLUMN_C INT CONSTRAINT A_FK REFERENCES MY_TABLE
           (COLUMN_A), . . .)

  30
Data strategies – Replication

 §  Copies all data across SQLFire cluster
 §  Appropriate for reference data



                                    APP




                SQLFire           SQLFire           SQLFire



              Write operation (with replicated copies)
              Read operation


  31
SQLFire Replicated Tables

 §  Created by default with no PARTITION BY clause
 §  Created with REPLICATE clause
 §  Reference data or fact tables are good candidates
 §  Replicates data across all peers in server group
 §  Replication is parallel and synchronous
 §  Automatic replication failure detection




       // Replication example
       CREATE TABLE MY_TABLE
       ( . . . )
       REPLICATE



  32
Topology strategies…




33
Topology

 Client-server
                           JVM                     JVM

                           APP                     APP




                                 SQLFire Locator




                  JVM                JVM                  JVM


                 SQLFire           SQLFire               SQLFire




 34
Topology

 Embedded Peer-to-peer




            JVM           JVM       JVM

            APP           APP       APP



           SQLFire       SQLFire   SQLFire




 35
Synchronization strategies…




36
Synchronous strategy
 In data-center or over private network


            JVM                 JVM                       JVM                 JVM

            APP                APP                        APP                APP




                  SQLFire Locator                               SQLFire Locator




      JVM              JVM              JVM       JVM                JVM              JVM


  SQLFire            SQLFire          SQLFire   SQLFire            SQLFire          SQLFire




            Redundancy Zone A                             Redundancy Zone B
                      Site 1                                    Site 2




 37
Asynchronous strategy
Multi-site over the Cloud


           JVM                 JVM                                 JVM                 JVM

           APP                APP                                  APP                APP




                 SQLFire Locator                WAN                      SQLFire Locator
                                               Gateway



     JVM              JVM              JVM                 JVM                JVM              JVM


SQLFire            SQLFire           SQLFire             SQLFire           SQLFire           SQLFire




                    Site 1                                                  Site 2


38
Data strategies – Server Groups


                              SQLFire Cluster

          JVM              JVM             JVM

                                                   Group 1
         SQLFire          SQLFire        SQLFire




          JVM              JVM             JVM

                                                   Group 2
         SQLFire          SQLFire        SQLFire



        Group 3




  39
data demo…




40
Summary…




41
Why SQLFire?

               In-memory, delivers maximum speed
Speed          and minimum latency


  Scale
               Horizontally scalable, easily adopts to
               changing workloads, usage patterns


      SQL
               Familiar SQL interface, accessible from
               Java and .NET




 42
If you forgot everything else…


 SQLFire is better in
 supporting on-line applications
 than traditional databases.




  43
SQLFire Artifacts


              Sample Apps
              §  Side-by-side comparison of SQLFire v MySQL
                    performance - https://github.com/vFabric/sqlf-demo
              §  Demo call-center application, SQLFire configuration
                    scripts https://github.com/vFabric/sqlf-cloud


              Demo Video
              §  Real-life performance comparison (YouTube, 3 min.)
                    http://youtu.be/HV-broQHJlk




  44
The end




     http://vmware.com/go/sqlfire
     @vFabricSQLFire, @_cmc


45

More Related Content

Similar to Modernización del manejo de datos con v fabric

Solving the VDI Storage Problem, WhipTail Technologies
Solving the VDI Storage Problem, WhipTail TechnologiesSolving the VDI Storage Problem, WhipTail Technologies
Solving the VDI Storage Problem, WhipTail Technologies
subtitle
 

Similar to Modernización del manejo de datos con v fabric (20)

Betting On Data Grids
Betting On Data GridsBetting On Data Grids
Betting On Data Grids
 
Whiptail XLR8r SSD Array
Whiptail XLR8r SSD ArrayWhiptail XLR8r SSD Array
Whiptail XLR8r SSD Array
 
Solving the VDI Storage Problem, WhipTail Technologies
Solving the VDI Storage Problem, WhipTail TechnologiesSolving the VDI Storage Problem, WhipTail Technologies
Solving the VDI Storage Problem, WhipTail Technologies
 
SQL and NoSQL in SQL Server
SQL and NoSQL in SQL ServerSQL and NoSQL in SQL Server
SQL and NoSQL in SQL Server
 
MySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion QueriesMySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion Queries
 
Virtualizing Latency Sensitive Workloads and vFabric GemFire
Virtualizing Latency Sensitive Workloads and vFabric GemFireVirtualizing Latency Sensitive Workloads and vFabric GemFire
Virtualizing Latency Sensitive Workloads and vFabric GemFire
 
Database Virtualization: The Next Wave of Big Data
Database Virtualization: The Next Wave of Big DataDatabase Virtualization: The Next Wave of Big Data
Database Virtualization: The Next Wave of Big Data
 
Steelhead DX for Datacenter-to-Datacenter optimization
Steelhead DX for Datacenter-to-Datacenter optimizationSteelhead DX for Datacenter-to-Datacenter optimization
Steelhead DX for Datacenter-to-Datacenter optimization
 
Aditi
AditiAditi
Aditi
 
Aditi
AditiAditi
Aditi
 
MySQL高可用
MySQL高可用MySQL高可用
MySQL高可用
 
Hadoop World 2011: BI on Hadoop in Financial Services - Stefan Grschupf, Data...
Hadoop World 2011: BI on Hadoop in Financial Services - Stefan Grschupf, Data...Hadoop World 2011: BI on Hadoop in Financial Services - Stefan Grschupf, Data...
Hadoop World 2011: BI on Hadoop in Financial Services - Stefan Grschupf, Data...
 
Towards an Architectural Style for Multi-tenant Software Applications
Towards an Architectural Style for Multi-tenant Software ApplicationsTowards an Architectural Style for Multi-tenant Software Applications
Towards an Architectural Style for Multi-tenant Software Applications
 
Cloud architecture and deployment: The Kognitio checklist, Nigel Sanctuary, K...
Cloud architecture and deployment: The Kognitio checklist, Nigel Sanctuary, K...Cloud architecture and deployment: The Kognitio checklist, Nigel Sanctuary, K...
Cloud architecture and deployment: The Kognitio checklist, Nigel Sanctuary, K...
 
Using Distributed In-Memory Computing for Fast Data Analysis
Using Distributed In-Memory Computing for Fast Data AnalysisUsing Distributed In-Memory Computing for Fast Data Analysis
Using Distributed In-Memory Computing for Fast Data Analysis
 
The 5 Stages of Scale
The 5 Stages of ScaleThe 5 Stages of Scale
The 5 Stages of Scale
 
Scality, Cloud Storage pour Zimbra
Scality, Cloud Storage pour ZimbraScality, Cloud Storage pour Zimbra
Scality, Cloud Storage pour Zimbra
 
QQCOS
QQCOSQQCOS
QQCOS
 
Isat06 Rev2
Isat06 Rev2Isat06 Rev2
Isat06 Rev2
 
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
 

More from Software Guru

More from Software Guru (20)

Hola Mundo del Internet de las Cosas
Hola Mundo del Internet de las CosasHola Mundo del Internet de las Cosas
Hola Mundo del Internet de las Cosas
 
Estructuras de datos avanzadas: Casos de uso reales
Estructuras de datos avanzadas: Casos de uso realesEstructuras de datos avanzadas: Casos de uso reales
Estructuras de datos avanzadas: Casos de uso reales
 
Building bias-aware environments
Building bias-aware environmentsBuilding bias-aware environments
Building bias-aware environments
 
El secreto para ser un desarrollador Senior
El secreto para ser un desarrollador SeniorEl secreto para ser un desarrollador Senior
El secreto para ser un desarrollador Senior
 
Cómo encontrar el trabajo remoto ideal
Cómo encontrar el trabajo remoto idealCómo encontrar el trabajo remoto ideal
Cómo encontrar el trabajo remoto ideal
 
Automatizando ideas con Apache Airflow
Automatizando ideas con Apache AirflowAutomatizando ideas con Apache Airflow
Automatizando ideas con Apache Airflow
 
How thick data can improve big data analysis for business:
How thick data can improve big data analysis for business:How thick data can improve big data analysis for business:
How thick data can improve big data analysis for business:
 
Introducción al machine learning
Introducción al machine learningIntroducción al machine learning
Introducción al machine learning
 
Democratizando el uso de CoDi
Democratizando el uso de CoDiDemocratizando el uso de CoDi
Democratizando el uso de CoDi
 
Gestionando la felicidad de los equipos con Management 3.0
Gestionando la felicidad de los equipos con Management 3.0Gestionando la felicidad de los equipos con Management 3.0
Gestionando la felicidad de los equipos con Management 3.0
 
Taller: Creación de Componentes Web re-usables con StencilJS
Taller: Creación de Componentes Web re-usables con StencilJSTaller: Creación de Componentes Web re-usables con StencilJS
Taller: Creación de Componentes Web re-usables con StencilJS
 
El camino del full stack developer (o como hacemos en SERTI para que no solo ...
El camino del full stack developer (o como hacemos en SERTI para que no solo ...El camino del full stack developer (o como hacemos en SERTI para que no solo ...
El camino del full stack developer (o como hacemos en SERTI para que no solo ...
 
¿Qué significa ser un programador en Bitso?
¿Qué significa ser un programador en Bitso?¿Qué significa ser un programador en Bitso?
¿Qué significa ser un programador en Bitso?
 
Colaboración efectiva entre desarrolladores del cliente y tu equipo.
Colaboración efectiva entre desarrolladores del cliente y tu equipo.Colaboración efectiva entre desarrolladores del cliente y tu equipo.
Colaboración efectiva entre desarrolladores del cliente y tu equipo.
 
Pruebas de integración con Docker en Azure DevOps
Pruebas de integración con Docker en Azure DevOpsPruebas de integración con Docker en Azure DevOps
Pruebas de integración con Docker en Azure DevOps
 
Elixir + Elm: Usando lenguajes funcionales en servicios productivos
Elixir + Elm: Usando lenguajes funcionales en servicios productivosElixir + Elm: Usando lenguajes funcionales en servicios productivos
Elixir + Elm: Usando lenguajes funcionales en servicios productivos
 
Así publicamos las apps de Spotify sin stress
Así publicamos las apps de Spotify sin stressAsí publicamos las apps de Spotify sin stress
Así publicamos las apps de Spotify sin stress
 
Achieving Your Goals: 5 Tips to successfully achieve your goals
Achieving Your Goals: 5 Tips to successfully achieve your goalsAchieving Your Goals: 5 Tips to successfully achieve your goals
Achieving Your Goals: 5 Tips to successfully achieve your goals
 
Acciones de comunidades tech en tiempos del Covid19
Acciones de comunidades tech en tiempos del Covid19Acciones de comunidades tech en tiempos del Covid19
Acciones de comunidades tech en tiempos del Covid19
 
De lo operativo a lo estratégico: un modelo de management de diseño
De lo operativo a lo estratégico: un modelo de management de diseñoDe lo operativo a lo estratégico: un modelo de management de diseño
De lo operativo a lo estratégico: un modelo de management de diseño
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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...
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 

Modernización del manejo de datos con v fabric

  • 1. #SGvFabric © 2011 VMware Inc. All rights reserved
  • 2. vFabric: What’s in it? Rich Integration Batch Spring Frameworks & Tools Web Social and Data Patterns Framework Tool Suite Mobile Access vFabric Application Srv Web Runtime Messaging Elastic Data Grid DBaaS Perf, Mgmt Application Services tc Server ERS vPostgres RabbitMQ Gemfire / SQLFire Hyperic / Insight EM4J Data vCops/ Director APM vSphere 5 2
  • 4. Challenge Managing on-line applications on a cloud-scale is hard. As number of users grows, database becomes the bottleneck. 4
  • 5. DB Bottleneck Scales… Scales… 5
  • 6. Cause Traditional databases were never designed to support thousands of concurrent users. 6
  • 7. Traditional DB Characteristics § Designed against no § Centralized in nature longer relevant • Data change capture an constraints afterthought • Network unreliable/slow • Lacks data partitioning • RAM prices prohibitive facilities § One size fits all § Obsessed with ACID • Designed for everything, • Constant contention for optimized for nothing resources cause locks • Often incompatible with § Monolithic design modern workloads §  Requires lots of hardware to scale 7
  • 8. Traditional DB Loves IO Buffers primarily tuned for IO First write to LOG Second write to Data files 8
  • 9. Transaction in Traditional DB Source: Research by MIT and Brown: “OLTP Under the Looking Glass” by S. Harizopoulos, D. J. Abadi, S. Madden, M. Stonebraker, SIGMOD 2008. 12% 30% 8% Data Percentage of Btrees keys Computer cycles Logging based on 3.5M sample Locking 21% Latching 10% Buffer management 19% 9
  • 11. Apparent Choices Build expensive database clustering solution or lengthy re-write for “big data”? 11
  • 12. Next generation option SQLFire is different; it’s build for speed Scale much? Hablo SQL? and scale. 12
  • 13. New Approach Elastic, in-memory database designed specifically for speed and low latency accessible through a familiar SQL interface. 13
  • 14. SQLFire Characteristics §  Highly concurrent data §  Shared nothing logs on structures resident in and disk; application writes are optimized for main memory never exposed to the disk §  Rethink ACID transactions; seek latencies all state resides in §  Parallelize data access distributed memory to avoid and application behavior; any single points of dynamically “shard SQL” contention §  Dynamic rebalancing of §  Partition-aware DB design data as cluster size grows/ spreads workloads across shrinks. Most efficient way both data set and physical of managing resources/ nodes data. 14
  • 16. SQLFire v Traditional Databases SQLFire response times are faster and more consistent under increased database load. 16
  • 17. Sample Comparison §  Spring Travel Application §  Similar hardware (8 vCPU, 4GB) §  Out-of-the-box configuration SQLF R/T (ms) SQLF CPU % MySQL R/T (ms) MYSQL CPU % 14 9 25 1 8 32 23 19 5 61 172 76 6 77 fail fail 984 98 fail fail 17
  • 18. Response Time R/T 200 180 160 MySQL 140 increased with load 120 100 80 SQLFire near constant 60 much lower 40 20 0 Threads 0 500 1000 1500 2000 18
  • 19. Number of Threads R/T SQLFire scales 1200   to 7200 threads with 1 second R/T 1000   800   MySQL reaches saturation 600   at 1850 threads 400   200   0   0   1000   2000   3000   4000   5000   6000   7000   8000   Threads 19
  • 21. Why Scale Horizontally? Sub-divide system into independent data sets, eliminate distributed transactions to achieve elasticity, linear scalability and predictable latency. 21
  • 22. Horizontal Scalability – Throughput 800000 1400 700000 1200 600000 Queries per second 1000 Client threads 500000 800 400000 queriesPerSecond 600 client threads 300000 400 200000 200 100000 0 0 2 4 6 8 10 Number of servers 22
  • 23. Horizontal Scalability – Consistency/HA §  Resiliency through replication, synchronous but in parallel §  Row updates are always atomic; no need for transactions §  Shared nothing architecture, including storage §  Instant failover at protocol level §  Apps retain their connections §  Data remains available APP SQLFire SQLFire SQLFire 23
  • 25. Data strategies – Partitioning §  Balances data across SQLFire cluster §  Delivers redundancy for high availability APP SQLFire SQLFire SQLFire Write operation (with 2 redundant copies) Read operation 25
  • 26. SQLFire Hash Partitioning §  Partition by column or primary key •  Can specify multiple columns •  Uses hashCode() for single column or primary key •  Uses serialized bytes for multiple columns •  Creates uniform distribution of data across the cluster // Partition by column CREATE TABLE MY_TABLE ( . . . ) PARTITION BY COLUMN ( COLUMN_A) // Partition by primary key CREATE TABLE MY_TABLE ( . . . ) PARTITION BY PRIMARY KEY 26
  • 27. SQLFire Range Partitioning §  Partition by range of column values •  Can specify multiple ranges •  Colocates data in specified ranges •  Used to ensure locality of data in a partition for range queries or cross table joins // Partition by range CREATE TABLE MY_TABLE ( . . . ) PARTITION BY RANGE ( COLUMN_A) ( VALUES BETWEEN 1 AND 10, VALUES BETWEEN 50 AND 60 ) 27
  • 28. SQLFire List Partitioning §  Partition by a set of column values •  Can specify column value sets •  Colocates data with specified column values •  Used to ensure locality of data in a partition for sets of values or cross table joins // Partition by list CREATE TABLE MY_TABLE ( . . . ) PARTITION BY LIST ( COLUMN_A) ( VALUES (‘VALUE_A’, ‘VALUE_B’), VALUES (‘VALUE_Y’, ‘VALUE_Z’) ) 28
  • 29. SQLFire Expression Partitioning §  Partition by a column expression •  Expression must be valid SQL function •  Must reference only columns in the table •  Hash partition with value determined by the expression // Partition by expression CREATE TABLE MY_TABLE ( . . . ) PARTITION BY ( MONTH ( MY_DATE ) ) 29
  • 30. SQLFire Default Partitioning §  Default hash partitioning strategy •  Start server with table-default-partitioned property set to true! •  First foreign key whose referenced primary key is also a partition column •  Primary key •  First unique key •  SQLFire-generated row id // No PARTITION BY clauses CREATE TABLE MY_TABLE (COLUMN_A INT NOT NULL CONSTRAINT A_PK PRIMARY KEY, . . .) CREATE TABLE MY_OTHER_TABLE (COLUMN_B INT NOT NULL CONSTRAINT B_PK PRIMARY KEY, COLUMN_C INT CONSTRAINT A_FK REFERENCES MY_TABLE (COLUMN_A), . . .) 30
  • 31. Data strategies – Replication §  Copies all data across SQLFire cluster §  Appropriate for reference data APP SQLFire SQLFire SQLFire Write operation (with replicated copies) Read operation 31
  • 32. SQLFire Replicated Tables §  Created by default with no PARTITION BY clause §  Created with REPLICATE clause §  Reference data or fact tables are good candidates §  Replicates data across all peers in server group §  Replication is parallel and synchronous §  Automatic replication failure detection // Replication example CREATE TABLE MY_TABLE ( . . . ) REPLICATE 32
  • 34. Topology Client-server JVM JVM APP APP SQLFire Locator JVM JVM JVM SQLFire SQLFire SQLFire 34
  • 35. Topology Embedded Peer-to-peer JVM JVM JVM APP APP APP SQLFire SQLFire SQLFire 35
  • 37. Synchronous strategy In data-center or over private network JVM JVM JVM JVM APP APP APP APP SQLFire Locator SQLFire Locator JVM JVM JVM JVM JVM JVM SQLFire SQLFire SQLFire SQLFire SQLFire SQLFire Redundancy Zone A Redundancy Zone B Site 1 Site 2 37
  • 38. Asynchronous strategy Multi-site over the Cloud JVM JVM JVM JVM APP APP APP APP SQLFire Locator WAN SQLFire Locator Gateway JVM JVM JVM JVM JVM JVM SQLFire SQLFire SQLFire SQLFire SQLFire SQLFire Site 1 Site 2 38
  • 39. Data strategies – Server Groups SQLFire Cluster JVM JVM JVM Group 1 SQLFire SQLFire SQLFire JVM JVM JVM Group 2 SQLFire SQLFire SQLFire Group 3 39
  • 42. Why SQLFire? In-memory, delivers maximum speed Speed and minimum latency Scale Horizontally scalable, easily adopts to changing workloads, usage patterns SQL Familiar SQL interface, accessible from Java and .NET 42
  • 43. If you forgot everything else… SQLFire is better in supporting on-line applications than traditional databases. 43
  • 44. SQLFire Artifacts Sample Apps §  Side-by-side comparison of SQLFire v MySQL performance - https://github.com/vFabric/sqlf-demo §  Demo call-center application, SQLFire configuration scripts https://github.com/vFabric/sqlf-cloud Demo Video §  Real-life performance comparison (YouTube, 3 min.) http://youtu.be/HV-broQHJlk 44
  • 45. The end http://vmware.com/go/sqlfire @vFabricSQLFire, @_cmc 45