SlideShare a Scribd company logo
MySQL Scaling with Memcached

Presented by: Bill Takacs
              Director, Product Management


July 9th 2009
Agenda

  • M SQL overview
    MySQL      i


  • Memcached overview


  • What’s Memcached good for – and
    how does it help me scale MySQL?


  • Example architectures


  • Customer examples


2 : Copyright 2009 Gear6 Inc.
About MySQL

     • 12 years old

     • 400+ employees
        00 e p oyees

     • 750 partners
           p

     • 60K downloads/day

     • Customers across every major operating system,
       hardware vendor, geography, industry, and application
       h d         d           h i d t         d    li ti
       type


3 : Copyright 2009 Gear6 Inc.
Cache is King

                     Browser cache

                     Web
                     W b server cache
                                   h

                     Memcached cache

                     MySQL database cache – query cache

                     Disk




4 : Copyright 2009 Gear6 Inc.
Memcached

         “A high performance, distributed memory object caching
              g p            ,                    y    j         g
              system, generic in nature, but intended for use in
            speeding up dynamic web applications by alleviating
                               database load”
                                                 Ref: http://www.danga.com/memcached/

     • Big hash table

     • Created by Danga Interactive for Live Journal

     • Significantly reduced database load

     • Perfect for web sites with high database load

     • In use by Facebook, Twitter, MyYearBook, others

5 : Copyright 2009 Gear6 Inc.
More on Memcached

     • Takes advantage of available DRAM

     • Open source
       Ope sou ce

     • Distributed under BSD license

     • Server - Current version is 1.2.8
           » http://www.danga.com/memcached/download.bml

     • M
       Many Clients
            Cli t
           » http://code.google.com/p/memcached/wiki/Clients


6 : Copyright 2009 Gear6 Inc.
Why Memcached with MySQL?

     • Scale-out of dynamic web sites
                     y

     • Page loads

     • Efficient resource utilization

     • Support for dozens
       to hundreds of nodes

     • Open source




7 : Copyright 2009 Gear6 Inc.
How Does Memcached Work?

                                • Client - Server

                                • H h Function
                                  Hash F  ti

                                • Memcached
                                  » Two stage
                                  » Key / value p
                                      y         pair




8 : Copyright 2009 Gear6 Inc.
Memcached Server

     • Slab allocator

     • Libevent based

     • Simple Protocol (no xml)

     • Server has internal hash table

     • Servers are dumb – they don’t know about each other




9 : Copyright 2009 Gear6 Inc.
Memcached Server

     • Limits
           » Key size = (250 bytes)
           » 1MB Limit
           » 32bit/64bit (maximum size of process)


     • LRU
           » Least recently accessed items are cycled out
           » One LRU exists per “slab class”
                                 slab class
           » LRU “evictions” need not be common


     • Threads? Yes



10 : Copyright 2009 Gear6 Inc.
Memcached Clients

     • Client hashes key to server list

     • Serializes t e object
       Se a es the

     • Many client libraries
          y

     • Authentication




11 : Copyright 2009 Gear6 Inc.
What about…..

     • Redundancy

     • Failover




12 : Copyright 2009 Gear6 Inc.
Consistent Hashing
     • Why?

     • How does it work?
           » Libk t
             Libketama
           » http://www.last.fm/user/RJ/journal/2007/04/10/rz_libketama_-
             _a_consistent_hashing_algo_for_memcache_clients



     • Reference:
     http://www.lexemetech.com/2007/11/consistent-hashing.html
        p                                                g
     http://www8.org/w8-papers/2a-
        webserver/caching/paper2.htmlhttp://www.last.fm/user/RJ/jo
        urnal/2007/04/10/rz_libketama_-
        _a_consistent_hashing_algo_for_memcache_clients
         a consistent hashing algo for memcache clients




13 : Copyright 2009 Gear6 Inc.
Commands

     • Storage commands:
           » Set / Add / Replace /
             Append / Prepend / CAS


     • Retrieval commands:
           » Get / Gets


     • Delete / increment /
       decrement

     • Stats


14 : Copyright 2009 Gear6 Inc.
Memcached UDFs for MySQL

     • Suite of functions that work
       with Memcached and MySQL

     • Leverage power of SQL Engine

     • Combine tasks

     • O
       Open source




15 : Copyright 2009 Gear6 Inc.
Putting it all together

                         Client 1
                         Client-1     Client 2
                                      Client-2            Client 3
                                                          Client-3




                                                      C
                           Server X    Server Y           Server Z

                                      Key = value
                                        y
                                      Foo = seattle
16 : Copyright 2009 Gear6 Inc.
Some Architectures
Memcached and Single MySQL
                      Read          Write


                                                Web Servers


                                                Application Servers


                                                Memcached Clients



                                                Memcached Servers

                                 Cache Update
                                                 MySQL


18 : Copyright 2009 Gear6 Inc.
MySQL Replication Scale-Out

Web / Application Servers              MySQL
            +                            +
  Memached Clients               Memcached Servers

                                        Writes



                                                      MySQL
                                                     Replication
                                        Reads


                                        Reads




19 : Copyright 2009 Gear6 Inc.
Memcached and MySQL Replication
  Read from cache                Write   Read from slave
                                                            Application Severs
                                                                     +
                                                            Memcached Clients



                                                           Memcached Servers



      Cache Update
                                                              MySQL Master


                                                              MySQL Slaves




20 : Copyright 2009 Gear6 Inc.
Memcached and MySQL Replication
  Read from cache                          Write   Read from slave
                                                                       Application Severs
                                                                                +
                                                                       Memcached Clients


          Shard1 Cust_id 0-999                       Shard1 Cust_id 1000 -1999




 Cache Update                                       Cache Update

                                  MySQL                               MySQL
                                 Replication                         Replication



21 : Copyright 2009 Gear6 Inc.
About Gear6
  • First and leading provider
    of Memcached solutions

  • Memcached solution including

          • High density

          • High Availability

          • Advanced memory
            management

          • Enhanced reporting
            capabilities
                biliti

          • Support for multi-tenancy

          • Disruption free
            software upgrades

          • 100% c e t co pat b e
             00% client compatible


22 : Copyright 2009 Gear6 Inc.
Credits and References
     • Designing and Implementing Scalable Applications with Memcached and MySQL, Monty
        Taylor
     http://www.mysql.com/why-mysql/white-papers/mysql_wp_memcached.php

     • Memcached Study, Brian Acker
     http://download.tangent.org/talks/Memcached%20Study.pdf
     htt //d    l dt       t    /t lk /M     h d%20St d df

     • A Bunch of Great Strategies for Using Memcached and MySQL Better Together, Todd Hoff
     http://highscalability.com/bunch great strategies using memcached and mysql better together
     http://highscalability.com/bunch-great-strategies-using-memcached-and-mysql-better-together

     • Memcached Functions for MySQL: Seamless Caching for MySQL, Patrick Galbraith
     http://www.scribd.com/doc/15014678/memcached-Functions-for-MySQL-Seemless-Caching-in-
        MySQL

     • Memcached Protocol
     http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt
     http://code sixapart com/svn/memcached/trunk/server/doc/protocol txt




23 : Copyright 2009 Gear6 Inc.
Thank You!




                    For more information
                             information:

             www.gear6.com
             www gear6 com




24 : Copyright 2009 Gear6 Inc.

More Related Content

What's hot

Maria db vs mysql
Maria db vs mysqlMaria db vs mysql
Maria db vs mysql
Nitin KR
 
Memcached, presented to LCA2010
Memcached, presented to LCA2010Memcached, presented to LCA2010
Memcached, presented to LCA2010
Mark Atwood
 
The New MariaDB Offering: MariaDB 10, MaxScale and More
The New MariaDB Offering: MariaDB 10, MaxScale and MoreThe New MariaDB Offering: MariaDB 10, MaxScale and More
The New MariaDB Offering: MariaDB 10, MaxScale and More
MariaDB Corporation
 
MariaDB 10.0 - SkySQL Paris Meetup
MariaDB 10.0 - SkySQL Paris MeetupMariaDB 10.0 - SkySQL Paris Meetup
MariaDB 10.0 - SkySQL Paris Meetup
MariaDB Corporation
 
MariaDB 10: The Complete Tutorial
MariaDB 10: The Complete TutorialMariaDB 10: The Complete Tutorial
MariaDB 10: The Complete Tutorial
Colin Charles
 
Choosing a MySQL High Availability solution - Percona Live UK 2011
Choosing a MySQL High Availability solution - Percona Live UK 2011Choosing a MySQL High Availability solution - Percona Live UK 2011
Choosing a MySQL High Availability solution - Percona Live UK 2011
Henrik Ingo
 
Maria db the new mysql (Colin Charles)
Maria db the new mysql (Colin Charles)Maria db the new mysql (Colin Charles)
Maria db the new mysql (Colin Charles)
Ontico
 
MySQL features missing in MariaDB Server
MySQL features missing in MariaDB ServerMySQL features missing in MariaDB Server
MySQL features missing in MariaDB Server
Colin Charles
 
What is MariaDB Server 10.3?
What is MariaDB Server 10.3?What is MariaDB Server 10.3?
What is MariaDB Server 10.3?
Colin Charles
 
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise ClusterWebseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
MariaDB Corporation
 
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
Ivan Zoratti
 
High Performance Drupal Sites
High Performance Drupal SitesHigh Performance Drupal Sites
High Performance Drupal Sites
Abayomi Ayoola
 
The MySQL ecosystem - understanding it, not running away from it!
The MySQL ecosystem - understanding it, not running away from it! The MySQL ecosystem - understanding it, not running away from it!
The MySQL ecosystem - understanding it, not running away from it!
Colin Charles
 
Meet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web SummitMeet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web Summit
Colin Charles
 
Memcached Code Camp 2009
Memcached Code Camp 2009Memcached Code Camp 2009
Memcached Code Camp 2009
NorthScale
 
Moxi - Memcached Proxy
Moxi - Memcached ProxyMoxi - Memcached Proxy
Moxi - Memcached Proxy
NorthScale
 
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin FrankfurtMariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB Corporation
 
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB MeetupMariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
Colin Charles
 
My first moments with MongoDB
My first moments with MongoDBMy first moments with MongoDB
My first moments with MongoDB
Colin Charles
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability Tutorial
Colin Charles
 

What's hot (20)

Maria db vs mysql
Maria db vs mysqlMaria db vs mysql
Maria db vs mysql
 
Memcached, presented to LCA2010
Memcached, presented to LCA2010Memcached, presented to LCA2010
Memcached, presented to LCA2010
 
The New MariaDB Offering: MariaDB 10, MaxScale and More
The New MariaDB Offering: MariaDB 10, MaxScale and MoreThe New MariaDB Offering: MariaDB 10, MaxScale and More
The New MariaDB Offering: MariaDB 10, MaxScale and More
 
MariaDB 10.0 - SkySQL Paris Meetup
MariaDB 10.0 - SkySQL Paris MeetupMariaDB 10.0 - SkySQL Paris Meetup
MariaDB 10.0 - SkySQL Paris Meetup
 
MariaDB 10: The Complete Tutorial
MariaDB 10: The Complete TutorialMariaDB 10: The Complete Tutorial
MariaDB 10: The Complete Tutorial
 
Choosing a MySQL High Availability solution - Percona Live UK 2011
Choosing a MySQL High Availability solution - Percona Live UK 2011Choosing a MySQL High Availability solution - Percona Live UK 2011
Choosing a MySQL High Availability solution - Percona Live UK 2011
 
Maria db the new mysql (Colin Charles)
Maria db the new mysql (Colin Charles)Maria db the new mysql (Colin Charles)
Maria db the new mysql (Colin Charles)
 
MySQL features missing in MariaDB Server
MySQL features missing in MariaDB ServerMySQL features missing in MariaDB Server
MySQL features missing in MariaDB Server
 
What is MariaDB Server 10.3?
What is MariaDB Server 10.3?What is MariaDB Server 10.3?
What is MariaDB Server 10.3?
 
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise ClusterWebseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
 
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
 
High Performance Drupal Sites
High Performance Drupal SitesHigh Performance Drupal Sites
High Performance Drupal Sites
 
The MySQL ecosystem - understanding it, not running away from it!
The MySQL ecosystem - understanding it, not running away from it! The MySQL ecosystem - understanding it, not running away from it!
The MySQL ecosystem - understanding it, not running away from it!
 
Meet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web SummitMeet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web Summit
 
Memcached Code Camp 2009
Memcached Code Camp 2009Memcached Code Camp 2009
Memcached Code Camp 2009
 
Moxi - Memcached Proxy
Moxi - Memcached ProxyMoxi - Memcached Proxy
Moxi - Memcached Proxy
 
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin FrankfurtMariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
 
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB MeetupMariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
 
My first moments with MongoDB
My first moments with MongoDBMy first moments with MongoDB
My first moments with MongoDB
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability Tutorial
 

Similar to Gear6 Webinar - MySQL Scaling with Memcached

Implementing High Availability Caching with Memcached
Implementing High Availability Caching with MemcachedImplementing High Availability Caching with Memcached
Implementing High Availability Caching with Memcached
Gear6
 
Gear6 and Scaling Website Performance: Caching Session and Profile Data with...
Gear6 and Scaling Website Performance:  Caching Session and Profile Data with...Gear6 and Scaling Website Performance:  Caching Session and Profile Data with...
Gear6 and Scaling Website Performance: Caching Session and Profile Data with...
Gear6
 
Introduction to First Commercial Memcached Service for Cloud
Introduction to First Commercial Memcached Service for CloudIntroduction to First Commercial Memcached Service for Cloud
Introduction to First Commercial Memcached Service for Cloud
Gear6
 
MySQL高可用
MySQL高可用MySQL高可用
MySQL高可用
thinkinlamp
 
Membase Meetup Chicago - january 2011
Membase Meetup Chicago - january 2011Membase Meetup Chicago - january 2011
Membase Meetup Chicago - january 2011
Membase
 
MySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached APIMySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached API
Mat Keep
 
5 scalability Cloudstack Developer Day
5  scalability Cloudstack Developer Day5  scalability Cloudstack Developer Day
5 scalability Cloudstack Developer Day
Kimihiko Kitase
 
MySQL State of the Dolphin - Rich Mason
MySQL State of the Dolphin - Rich MasonMySQL State of the Dolphin - Rich Mason
MySQL State of the Dolphin - Rich Mason
MySQL Brasil
 
My sql roadmap 2008 2009
My sql roadmap 2008 2009My sql roadmap 2008 2009
My sql roadmap 2008 2009
xKinAnx
 
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Arun Gupta
 
Mysql ecosystem in 2019
Mysql ecosystem in 2019Mysql ecosystem in 2019
Mysql ecosystem in 2019
Alkin Tezuysal
 
UKOUG 2011: MySQL Architectures for Oracle DBA's
UKOUG 2011: MySQL Architectures for Oracle DBA'sUKOUG 2011: MySQL Architectures for Oracle DBA's
UKOUG 2011: MySQL Architectures for Oracle DBA's
FromDual GmbH
 
The New MariaDB Offering - MariaDB 10, MaxScale and more
The New MariaDB Offering - MariaDB 10, MaxScale and moreThe New MariaDB Offering - MariaDB 10, MaxScale and more
The New MariaDB Offering - MariaDB 10, MaxScale and more
MariaDB Corporation
 
Couchdb + Membase = Couchbase
Couchdb + Membase = CouchbaseCouchdb + Membase = Couchbase
Couchdb + Membase = Couchbase
iammutex
 
Gear6 Web Cache Overview
Gear6 Web Cache OverviewGear6 Web Cache Overview
Gear6 Web Cache Overview
Gear6
 
MySQL InnoDB Cluster: High Availability Made Easy!
MySQL InnoDB Cluster: High Availability Made Easy!MySQL InnoDB Cluster: High Availability Made Easy!
MySQL InnoDB Cluster: High Availability Made Easy!
Vittorio Cioe
 
Living with SQL and NoSQL at craigslist, a Pragmatic Approach
Living with SQL and NoSQL at craigslist, a Pragmatic ApproachLiving with SQL and NoSQL at craigslist, a Pragmatic Approach
Living with SQL and NoSQL at craigslist, a Pragmatic Approach
Jeremy Zawodny
 
MySQL Aquarium Paris
MySQL Aquarium ParisMySQL Aquarium Paris
MySQL Aquarium Paris
Alexis Moussine-Pouchkine
 
Mysql wp memcached
Mysql wp memcachedMysql wp memcached
Mysql wp memcached
kbour23
 
Membase Meetup - Silicon Valley
Membase Meetup - Silicon ValleyMembase Meetup - Silicon Valley
Membase Meetup - Silicon Valley
Membase
 

Similar to Gear6 Webinar - MySQL Scaling with Memcached (20)

Implementing High Availability Caching with Memcached
Implementing High Availability Caching with MemcachedImplementing High Availability Caching with Memcached
Implementing High Availability Caching with Memcached
 
Gear6 and Scaling Website Performance: Caching Session and Profile Data with...
Gear6 and Scaling Website Performance:  Caching Session and Profile Data with...Gear6 and Scaling Website Performance:  Caching Session and Profile Data with...
Gear6 and Scaling Website Performance: Caching Session and Profile Data with...
 
Introduction to First Commercial Memcached Service for Cloud
Introduction to First Commercial Memcached Service for CloudIntroduction to First Commercial Memcached Service for Cloud
Introduction to First Commercial Memcached Service for Cloud
 
MySQL高可用
MySQL高可用MySQL高可用
MySQL高可用
 
Membase Meetup Chicago - january 2011
Membase Meetup Chicago - january 2011Membase Meetup Chicago - january 2011
Membase Meetup Chicago - january 2011
 
MySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached APIMySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached API
 
5 scalability Cloudstack Developer Day
5  scalability Cloudstack Developer Day5  scalability Cloudstack Developer Day
5 scalability Cloudstack Developer Day
 
MySQL State of the Dolphin - Rich Mason
MySQL State of the Dolphin - Rich MasonMySQL State of the Dolphin - Rich Mason
MySQL State of the Dolphin - Rich Mason
 
My sql roadmap 2008 2009
My sql roadmap 2008 2009My sql roadmap 2008 2009
My sql roadmap 2008 2009
 
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
 
Mysql ecosystem in 2019
Mysql ecosystem in 2019Mysql ecosystem in 2019
Mysql ecosystem in 2019
 
UKOUG 2011: MySQL Architectures for Oracle DBA's
UKOUG 2011: MySQL Architectures for Oracle DBA'sUKOUG 2011: MySQL Architectures for Oracle DBA's
UKOUG 2011: MySQL Architectures for Oracle DBA's
 
The New MariaDB Offering - MariaDB 10, MaxScale and more
The New MariaDB Offering - MariaDB 10, MaxScale and moreThe New MariaDB Offering - MariaDB 10, MaxScale and more
The New MariaDB Offering - MariaDB 10, MaxScale and more
 
Couchdb + Membase = Couchbase
Couchdb + Membase = CouchbaseCouchdb + Membase = Couchbase
Couchdb + Membase = Couchbase
 
Gear6 Web Cache Overview
Gear6 Web Cache OverviewGear6 Web Cache Overview
Gear6 Web Cache Overview
 
MySQL InnoDB Cluster: High Availability Made Easy!
MySQL InnoDB Cluster: High Availability Made Easy!MySQL InnoDB Cluster: High Availability Made Easy!
MySQL InnoDB Cluster: High Availability Made Easy!
 
Living with SQL and NoSQL at craigslist, a Pragmatic Approach
Living with SQL and NoSQL at craigslist, a Pragmatic ApproachLiving with SQL and NoSQL at craigslist, a Pragmatic Approach
Living with SQL and NoSQL at craigslist, a Pragmatic Approach
 
MySQL Aquarium Paris
MySQL Aquarium ParisMySQL Aquarium Paris
MySQL Aquarium Paris
 
Mysql wp memcached
Mysql wp memcachedMysql wp memcached
Mysql wp memcached
 
Membase Meetup - Silicon Valley
Membase Meetup - Silicon ValleyMembase Meetup - Silicon Valley
Membase Meetup - Silicon Valley
 

Recently uploaded

Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 

Recently uploaded (20)

Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 

Gear6 Webinar - MySQL Scaling with Memcached

  • 1. MySQL Scaling with Memcached Presented by: Bill Takacs Director, Product Management July 9th 2009
  • 2. Agenda • M SQL overview MySQL i • Memcached overview • What’s Memcached good for – and how does it help me scale MySQL? • Example architectures • Customer examples 2 : Copyright 2009 Gear6 Inc.
  • 3. About MySQL • 12 years old • 400+ employees 00 e p oyees • 750 partners p • 60K downloads/day • Customers across every major operating system, hardware vendor, geography, industry, and application h d d h i d t d li ti type 3 : Copyright 2009 Gear6 Inc.
  • 4. Cache is King Browser cache Web W b server cache h Memcached cache MySQL database cache – query cache Disk 4 : Copyright 2009 Gear6 Inc.
  • 5. Memcached “A high performance, distributed memory object caching g p , y j g system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load” Ref: http://www.danga.com/memcached/ • Big hash table • Created by Danga Interactive for Live Journal • Significantly reduced database load • Perfect for web sites with high database load • In use by Facebook, Twitter, MyYearBook, others 5 : Copyright 2009 Gear6 Inc.
  • 6. More on Memcached • Takes advantage of available DRAM • Open source Ope sou ce • Distributed under BSD license • Server - Current version is 1.2.8 » http://www.danga.com/memcached/download.bml • M Many Clients Cli t » http://code.google.com/p/memcached/wiki/Clients 6 : Copyright 2009 Gear6 Inc.
  • 7. Why Memcached with MySQL? • Scale-out of dynamic web sites y • Page loads • Efficient resource utilization • Support for dozens to hundreds of nodes • Open source 7 : Copyright 2009 Gear6 Inc.
  • 8. How Does Memcached Work? • Client - Server • H h Function Hash F ti • Memcached » Two stage » Key / value p y pair 8 : Copyright 2009 Gear6 Inc.
  • 9. Memcached Server • Slab allocator • Libevent based • Simple Protocol (no xml) • Server has internal hash table • Servers are dumb – they don’t know about each other 9 : Copyright 2009 Gear6 Inc.
  • 10. Memcached Server • Limits » Key size = (250 bytes) » 1MB Limit » 32bit/64bit (maximum size of process) • LRU » Least recently accessed items are cycled out » One LRU exists per “slab class” slab class » LRU “evictions” need not be common • Threads? Yes 10 : Copyright 2009 Gear6 Inc.
  • 11. Memcached Clients • Client hashes key to server list • Serializes t e object Se a es the • Many client libraries y • Authentication 11 : Copyright 2009 Gear6 Inc.
  • 12. What about….. • Redundancy • Failover 12 : Copyright 2009 Gear6 Inc.
  • 13. Consistent Hashing • Why? • How does it work? » Libk t Libketama » http://www.last.fm/user/RJ/journal/2007/04/10/rz_libketama_- _a_consistent_hashing_algo_for_memcache_clients • Reference: http://www.lexemetech.com/2007/11/consistent-hashing.html p g http://www8.org/w8-papers/2a- webserver/caching/paper2.htmlhttp://www.last.fm/user/RJ/jo urnal/2007/04/10/rz_libketama_- _a_consistent_hashing_algo_for_memcache_clients a consistent hashing algo for memcache clients 13 : Copyright 2009 Gear6 Inc.
  • 14. Commands • Storage commands: » Set / Add / Replace / Append / Prepend / CAS • Retrieval commands: » Get / Gets • Delete / increment / decrement • Stats 14 : Copyright 2009 Gear6 Inc.
  • 15. Memcached UDFs for MySQL • Suite of functions that work with Memcached and MySQL • Leverage power of SQL Engine • Combine tasks • O Open source 15 : Copyright 2009 Gear6 Inc.
  • 16. Putting it all together Client 1 Client-1 Client 2 Client-2 Client 3 Client-3 C Server X Server Y Server Z Key = value y Foo = seattle 16 : Copyright 2009 Gear6 Inc.
  • 18. Memcached and Single MySQL Read Write Web Servers Application Servers Memcached Clients Memcached Servers Cache Update MySQL 18 : Copyright 2009 Gear6 Inc.
  • 19. MySQL Replication Scale-Out Web / Application Servers MySQL + + Memached Clients Memcached Servers Writes MySQL Replication Reads Reads 19 : Copyright 2009 Gear6 Inc.
  • 20. Memcached and MySQL Replication Read from cache Write Read from slave Application Severs + Memcached Clients Memcached Servers Cache Update MySQL Master MySQL Slaves 20 : Copyright 2009 Gear6 Inc.
  • 21. Memcached and MySQL Replication Read from cache Write Read from slave Application Severs + Memcached Clients Shard1 Cust_id 0-999 Shard1 Cust_id 1000 -1999 Cache Update Cache Update MySQL MySQL Replication Replication 21 : Copyright 2009 Gear6 Inc.
  • 22. About Gear6 • First and leading provider of Memcached solutions • Memcached solution including • High density • High Availability • Advanced memory management • Enhanced reporting capabilities biliti • Support for multi-tenancy • Disruption free software upgrades • 100% c e t co pat b e 00% client compatible 22 : Copyright 2009 Gear6 Inc.
  • 23. Credits and References • Designing and Implementing Scalable Applications with Memcached and MySQL, Monty Taylor http://www.mysql.com/why-mysql/white-papers/mysql_wp_memcached.php • Memcached Study, Brian Acker http://download.tangent.org/talks/Memcached%20Study.pdf htt //d l dt t /t lk /M h d%20St d df • A Bunch of Great Strategies for Using Memcached and MySQL Better Together, Todd Hoff http://highscalability.com/bunch great strategies using memcached and mysql better together http://highscalability.com/bunch-great-strategies-using-memcached-and-mysql-better-together • Memcached Functions for MySQL: Seamless Caching for MySQL, Patrick Galbraith http://www.scribd.com/doc/15014678/memcached-Functions-for-MySQL-Seemless-Caching-in- MySQL • Memcached Protocol http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt http://code sixapart com/svn/memcached/trunk/server/doc/protocol txt 23 : Copyright 2009 Gear6 Inc.
  • 24. Thank You! For more information information: www.gear6.com www gear6 com 24 : Copyright 2009 Gear6 Inc.