SlideShare a Scribd company logo
1 of 44
Download to read offline
Chicago
What is Membase?
Membase is a distributed database




                             Application user




 Web application server   Web application server   Web application server




                           Membase Servers




              In the data center                                            On the administrator console


                                                                                                           3
Membase is Simple, Fast, Elastic

               Five minutes or less to a working
               cluster
               • Downloads for Linux and Windows
               • Start with a single node
               • One button press joins nodes to a cluster
               Easy to develop against
               • Just SET and GET – no schema required
               • Drop it in. 10,000+ existing applications
                 already “speak membase” (via memcached)
               • Practically every language and application
                 framework is supported, out of the box
               Easy to manage
               • One-click failover and cluster rebalancing
               • Graphical and programmatic interfaces
               • Configurable alerting



                                                              4
Membase is Simple, Fast, Elastic

               Predictable
               • “Never keep an application waiting”
               • Quasi-deterministic latency and throughput
               Low latency
               • Built-in Memcached technology
               High throughput
               •   Multi-threaded
               •   Low lock contention
               •   Asynchronous wherever possible
               •   Automatic write de-duplication




                                                              5
Membase is Simple, Fast, Elastic

               Zero-downtime elasticity
               • Spread I/O and data across commodity
                 servers (or VMs)
               • Consistent performance with linear cost
               • Dynamic rebalancing of a live cluster
               All nodes are created equal
               • No special case nodes
               • Any node can replace any other node, online
               • Clone to grow
               Extensible
               • Filtered TAP interface provides hook points
                 for external systems (e.g. full-text search,
                 backup, warehouse)
               • Data bucket – engine API for specialized
                 container types



                                                                6
Built-in Memcached Caching Layer


      Memcached                    Membase Cache

   Membase Database              Membase Database




     Memcached Mode                  Membase Mode

 Fact: Membase development team has also contributed over
 half of the code to the Memcached project.                 7
Use Cases
Ad targeting

                             40 milliseconds to come
                             up with an answer.




                            profiles, real time campaign
                        3   statistics




                                        2
                 1                     profiles, campaigns
               events

                                                             9
Search and Gaming Portal




                           Database



                                      10
Membase Architecture
Clustering
             • Underlying cluster
               functionality based on
               erlang OTP
             • Have a custom, vector
               clock based way of storing
               and propagating...
                – Cluster topology
                – vBucket mapping
             • Collect statistics from many
               nodes of the cluster
                – Identify hot keys, resource
                  utilization




                                                12
TAP

     • A generic, scalable method of streaming mutations
       from a given server
            – As data operations arrive, they can be sent to arbitrary TAP
              receivers
     • Leverages the existing memcached engine interface,
       and the non-blocking IO interfaces to send data
     • Three modes of operation

                                Data
                              Mutations   Data set




  Data
Mutations          Data set                                    Data set


                                                                             13
Membase data flow – under the hood

                   SET request arrives at          SET acknowledgement
                    KEY’s master server     1 2    returned to application




                           3        Listener-Sender
                                                                                   3

                                   RAM


                                                      membase storage engine
                                                                               4

                                  Disk Disk Disk



                                  Disk Disk Disk


Replica Server 1 for KEY          Master server for KEY                                Replica Server 2 for KEY
                                                                                                              14
A Membase Node



  memcached operations   memcached smart
      (any client)        client operations   REST Interface




                   Membase Node




                                                               15
A Membase Node: Component View


            moxi                         ns_server




                    membase             ns_server
           (memcached + membase engine)



           TAP


       vbucketmigrator




                                                     16
Clients, nodes and other nodes


                                 Client                      moxi + Client

                                                port 11210
                  port 11211                memcached operations           REST/comet
              memcached operations                                       cluster topology
                                                                        and vbucket map


  memcached operations
                                     moxi               ns_server



                                    membase      ns_server
                           (memcached + membase engine)


                                     TAP
  memcached operations
   with tap commands      vbucketmigrator


                                                                                            17
Data buckets are secure membase “slices”



               Application user




            Web application server




 Bucket 1
 Bucket 2
    Aggregate Cluster Memory and Disk Capacity




             Membase data servers




    In the data center                           On the administrator console
                                                                           18
vBucket mapping




                  19
Disk > Memory



Dataset may have many                                 memory quota




                                Bucket Configuration
items infrequently accessed.                          mem_high_wat

However, memcached has                                mem_low_wat
different behavior (LRU) than
wanted with membase.

Still, traditional (most)
RDBMS implementations are
not 100% correct for us
either. The speed of a miss
is very, very important.

                                                                 20
(Intermission)
Thanks!

          22
Membase Demo
Key-Value Patterns
Key-Value




            25
Key-Value




 Items have:            Operations include:
 Key                    Get/Set
 Value                  Increment/Decrement
 Expiration             Append/Prepend
 Flags
 CAS (more on this later)
                                              25
Key-Value




            25
Key-Value




       (with a replica                                                                        )
Image courtesy http://www.flickr.com/photos/brenda-starr/3509344100/sizes/m/in/photostream/




                                                                                                  25
Membase Datatypes




                    26
Membase Datatypes

• byte[]
  – Does your data have
    1s and 0s?




                          26
Membase Datatypes

• byte[]
  – Does your data have
    1s and 0s?




                          “Any customer can have
                          a car painted any colour
                          that he wants so long as
                          it is black.”

                                                     26
Membase Datatypes

• byte[]
  – Does your data have
    1s and 0s?
• Items do have flags
  – Many clients use flags
 – Data type options
  • Google protobuf          “Any customer can have
                             a car painted any colour
  • Thrift                   that he wants so long as
  • Avro                     it is black.”

                                                        26
Transactions

• Lock == slow me down
• CAS operations                    User 1          User 2
  – Optimistic locking




                                       Su
• Very useful with complex




                                         cc




                                                    il!
                                             es



                                                  Fa
  datatypes




                                             s
  – Imagine two clients trying to
    update a complex item
• You’re likely using CAS
  already... if you use a CPU

                                                             27
Common Use: Sessions

• Web user sessions
  – Highly read, less writes in many case
  – Protocol advantage of memcached
     • Options already for PHP, Ruby and Java
• Application state
  – Not necessarily “entity” style things
  – May be appropriate for a “cache” pool




                                                28
Common Use (cache): Rate Limiting

• Want to provide API calls
  into the system                   Your Users

  – Twitter search                             h   !
                                            uc
                                          ¡O
  – Google search services
• Use the atomic increment          Your App

  – Set an item with a unique ID
  – Upon API request,
    increment and check
     • HTTP 420: go away and come
       back later

                                                       29
Looking Ahead
Frequent Requests: New Access Methods

  Beyond key-value
  • Indexing/Range Queries
  • Advanced Data Structures
  • Sub-object direct manipulation


  Validation and In-flight transformation
  • Block mutations failing validation
  • Enrich or transform objects


  Connectors (Integrate easily with other systems)
  • Solr
  • Hadoop


                                                     31
Feedback: your turn!

• Querying and indexing?




• Use cases you can share?




                             32
NodeCode - What is it?


 Method for extending & customizing Membase

 Separate code modules

 Defined interface to datapath and cluster manager

 Notification on events
  • Synchronous
  • Asynchronous




                                                    33
NodeCode – Drivers

 Simple
 •   Packaged modules for easy install and enable
 •   Library of “off the shelf” modules
 •   Module monitoring
 •   Straight forward development and debugging
 Fast
 • Low latency/high-throughput
 • Per-bucket process isolation
 • Don’t break data manager performance/correctness
 Elastic
 • Automatically migrate and instantiate on rebalance
 • Provide support for migration of internal data
 • Leverage native Membase engine for internal data storage


                                                              34
Block-level architecture




                           35
Q&A
 Matt Ingenthron
  matt@membase.com
  Twitter: ingenthr
  IRC: #membase
                      36
Attributions

•   http://commons.wikimedia.org/wiki/File:Flag_of_China.png
•   http://commons.wikimedia.org/wiki/File:Flag_of_South_Korea.svg
•   http://commons.wikimedia.org/wiki/File:Flag_of_Japan.svg




                                                                     37
Membase Meetup Chicago - january 2011

More Related Content

What's hot

Migrating Novell GroupWise to Linux
Migrating Novell GroupWise to LinuxMigrating Novell GroupWise to Linux
Migrating Novell GroupWise to LinuxNovell
 
Virtualization Primer for Java Developers
Virtualization Primer for Java DevelopersVirtualization Primer for Java Developers
Virtualization Primer for Java DevelopersRichard McDougall
 
Why Choose Xen For Your Cloud?
Why Choose Xen For Your Cloud? Why Choose Xen For Your Cloud?
Why Choose Xen For Your Cloud? Todd Deshane
 
Avnet & Rorke Data - Open Compute Summit '13
Avnet & Rorke Data - Open Compute Summit '13Avnet & Rorke Data - Open Compute Summit '13
Avnet & Rorke Data - Open Compute Summit '13DaWane Wanek
 
XCP: The Art of Open Virtualization for the Enterprise and the Cloud
XCP: The Art of Open Virtualization for the Enterprise and the CloudXCP: The Art of Open Virtualization for the Enterprise and the Cloud
XCP: The Art of Open Virtualization for the Enterprise and the CloudThe Linux Foundation
 
Application Live Migration in LAN/WAN Environment
Application Live Migration in LAN/WAN EnvironmentApplication Live Migration in LAN/WAN Environment
Application Live Migration in LAN/WAN EnvironmentMahendra Kutare
 
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterToward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterRyousei Takano
 
Oracle rac 10g best practices
Oracle rac 10g best practicesOracle rac 10g best practices
Oracle rac 10g best practicesHaseeb Alam
 
Cache-partitioning
Cache-partitioningCache-partitioning
Cache-partitioningdavidkftam
 
21.10.09 Microsoft Event, Microsoft Presentation
21.10.09 Microsoft Event, Microsoft Presentation21.10.09 Microsoft Event, Microsoft Presentation
21.10.09 Microsoft Event, Microsoft Presentationdataplex systems limited
 
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterToward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterRyousei Takano
 
Ph.D. thesis presentation
Ph.D. thesis presentationPh.D. thesis presentation
Ph.D. thesis presentationdavidkftam
 
Yabusame: postcopy live migration for qemu/kvm
Yabusame: postcopy live migration for qemu/kvmYabusame: postcopy live migration for qemu/kvm
Yabusame: postcopy live migration for qemu/kvmIsaku Yamahata
 
NSS File System Performance, Clustering and Auditing in Novell Open Enterpris...
NSS File System Performance, Clustering and Auditing in Novell Open Enterpris...NSS File System Performance, Clustering and Auditing in Novell Open Enterpris...
NSS File System Performance, Clustering and Auditing in Novell Open Enterpris...Novell
 
Using Novell Sentinel Log Manager to Monitor Novell Applications
Using Novell Sentinel Log Manager to Monitor Novell ApplicationsUsing Novell Sentinel Log Manager to Monitor Novell Applications
Using Novell Sentinel Log Manager to Monitor Novell ApplicationsNovell
 

What's hot (20)

Migrating Novell GroupWise to Linux
Migrating Novell GroupWise to LinuxMigrating Novell GroupWise to Linux
Migrating Novell GroupWise to Linux
 
Virtualization Primer for Java Developers
Virtualization Primer for Java DevelopersVirtualization Primer for Java Developers
Virtualization Primer for Java Developers
 
Why Choose Xen For Your Cloud?
Why Choose Xen For Your Cloud? Why Choose Xen For Your Cloud?
Why Choose Xen For Your Cloud?
 
Xen in the Cloud at SCALE 10x
Xen in the Cloud at SCALE 10xXen in the Cloud at SCALE 10x
Xen in the Cloud at SCALE 10x
 
Avnet & Rorke Data - Open Compute Summit '13
Avnet & Rorke Data - Open Compute Summit '13Avnet & Rorke Data - Open Compute Summit '13
Avnet & Rorke Data - Open Compute Summit '13
 
XCP: The Art of Open Virtualization for the Enterprise and the Cloud
XCP: The Art of Open Virtualization for the Enterprise and the CloudXCP: The Art of Open Virtualization for the Enterprise and the Cloud
XCP: The Art of Open Virtualization for the Enterprise and the Cloud
 
Application Live Migration in LAN/WAN Environment
Application Live Migration in LAN/WAN EnvironmentApplication Live Migration in LAN/WAN Environment
Application Live Migration in LAN/WAN Environment
 
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterToward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
 
Oracle rac 10g best practices
Oracle rac 10g best practicesOracle rac 10g best practices
Oracle rac 10g best practices
 
Cache-partitioning
Cache-partitioningCache-partitioning
Cache-partitioning
 
21.10.09 Microsoft Event, Microsoft Presentation
21.10.09 Microsoft Event, Microsoft Presentation21.10.09 Microsoft Event, Microsoft Presentation
21.10.09 Microsoft Event, Microsoft Presentation
 
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterToward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
 
Ph.D. thesis presentation
Ph.D. thesis presentationPh.D. thesis presentation
Ph.D. thesis presentation
 
Paravirtualized File Systems
Paravirtualized File SystemsParavirtualized File Systems
Paravirtualized File Systems
 
Yabusame: postcopy live migration for qemu/kvm
Yabusame: postcopy live migration for qemu/kvmYabusame: postcopy live migration for qemu/kvm
Yabusame: postcopy live migration for qemu/kvm
 
VM Live Migration Speedup in Xen
VM Live Migration Speedup in XenVM Live Migration Speedup in Xen
VM Live Migration Speedup in Xen
 
Xen community update
Xen community updateXen community update
Xen community update
 
NSS File System Performance, Clustering and Auditing in Novell Open Enterpris...
NSS File System Performance, Clustering and Auditing in Novell Open Enterpris...NSS File System Performance, Clustering and Auditing in Novell Open Enterpris...
NSS File System Performance, Clustering and Auditing in Novell Open Enterpris...
 
Using Novell Sentinel Log Manager to Monitor Novell Applications
Using Novell Sentinel Log Manager to Monitor Novell ApplicationsUsing Novell Sentinel Log Manager to Monitor Novell Applications
Using Novell Sentinel Log Manager to Monitor Novell Applications
 
Management server internals
Management server internalsManagement server internals
Management server internals
 

Viewers also liked

Membase East Coast Meetups
Membase East Coast MeetupsMembase East Coast Meetups
Membase East Coast MeetupsMembase
 
Membase Meetup 2010
Membase Meetup 2010Membase Meetup 2010
Membase Meetup 2010Membase
 
Membase Meetup - Silicon Valley
Membase Meetup - Silicon ValleyMembase Meetup - Silicon Valley
Membase Meetup - Silicon ValleyMembase
 
Membase Intro from Membase Meetup San Francisco
Membase Intro from Membase Meetup San FranciscoMembase Intro from Membase Meetup San Francisco
Membase Intro from Membase Meetup San FranciscoMembase
 
Membase Introduction
Membase IntroductionMembase Introduction
Membase IntroductionMembase
 
Banco de Dados Não Relacionais vs Banco de Dados Relacionais
Banco de Dados Não Relacionais vs Banco de Dados RelacionaisBanco de Dados Não Relacionais vs Banco de Dados Relacionais
Banco de Dados Não Relacionais vs Banco de Dados Relacionaisalexculpado
 
Sistemas NoSQL, surgimento, características e exemplos
Sistemas NoSQL, surgimento, características e exemplosSistemas NoSQL, surgimento, características e exemplos
Sistemas NoSQL, surgimento, características e exemplosAricelio Souza
 

Viewers also liked (11)

Ms mustapha biology
Ms mustapha biologyMs mustapha biology
Ms mustapha biology
 
9 2
9 29 2
9 2
 
Labegunak SEO aurkezpena
Labegunak SEO aurkezpenaLabegunak SEO aurkezpena
Labegunak SEO aurkezpena
 
Ms mustapha biology
Ms mustapha biologyMs mustapha biology
Ms mustapha biology
 
Membase East Coast Meetups
Membase East Coast MeetupsMembase East Coast Meetups
Membase East Coast Meetups
 
Membase Meetup 2010
Membase Meetup 2010Membase Meetup 2010
Membase Meetup 2010
 
Membase Meetup - Silicon Valley
Membase Meetup - Silicon ValleyMembase Meetup - Silicon Valley
Membase Meetup - Silicon Valley
 
Membase Intro from Membase Meetup San Francisco
Membase Intro from Membase Meetup San FranciscoMembase Intro from Membase Meetup San Francisco
Membase Intro from Membase Meetup San Francisco
 
Membase Introduction
Membase IntroductionMembase Introduction
Membase Introduction
 
Banco de Dados Não Relacionais vs Banco de Dados Relacionais
Banco de Dados Não Relacionais vs Banco de Dados RelacionaisBanco de Dados Não Relacionais vs Banco de Dados Relacionais
Banco de Dados Não Relacionais vs Banco de Dados Relacionais
 
Sistemas NoSQL, surgimento, características e exemplos
Sistemas NoSQL, surgimento, características e exemplosSistemas NoSQL, surgimento, características e exemplos
Sistemas NoSQL, surgimento, características e exemplos
 

Similar to Membase Meetup Chicago - january 2011

Couchdb + Membase = Couchbase
Couchdb + Membase = CouchbaseCouchdb + Membase = Couchbase
Couchdb + Membase = Couchbaseiammutex
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparisonRohit Kelapure
 
Couchbase b jmeetup
Couchbase b jmeetupCouchbase b jmeetup
Couchbase b jmeetupmysqlops
 
CloudStack Architecture Future
CloudStack Architecture FutureCloudStack Architecture Future
CloudStack Architecture FutureKimihiko Kitase
 
Gear6 Webinar - MySQL Scaling with Memcached
Gear6 Webinar - MySQL Scaling with MemcachedGear6 Webinar - MySQL Scaling with Memcached
Gear6 Webinar - MySQL Scaling with MemcachedGear6
 
MySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached APIMySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached APIMat Keep
 
How AOL Advertising Uses NoSQL to Make Millions of Smart Targeting Decisions ...
How AOL Advertising Uses NoSQL to Make Millions of Smart Targeting Decisions ...How AOL Advertising Uses NoSQL to Make Millions of Smart Targeting Decisions ...
How AOL Advertising Uses NoSQL to Make Millions of Smart Targeting Decisions ...DATAVERSITY
 
Shared personalization service. How to scale to 15 k rps (Patrice Pelland)
Shared personalization service. How to scale to 15 k rps (Patrice Pelland)Shared personalization service. How to scale to 15 k rps (Patrice Pelland)
Shared personalization service. How to scale to 15 k rps (Patrice Pelland)Ontico
 
A memcached implementation in Java
A memcached implementation in JavaA memcached implementation in Java
A memcached implementation in Javaelliando dias
 
Memcached, presented to LCA2010
Memcached, presented to LCA2010Memcached, presented to LCA2010
Memcached, presented to LCA2010Mark Atwood
 
network ram parallel computing
network ram parallel computingnetwork ram parallel computing
network ram parallel computingNiranjana Ambadi
 
Windsor: Domain 0 Disaggregation for XenServer and XCP
	Windsor: Domain 0 Disaggregation for XenServer and XCP	Windsor: Domain 0 Disaggregation for XenServer and XCP
Windsor: Domain 0 Disaggregation for XenServer and XCPThe Linux Foundation
 
5 scalability Cloudstack Developer Day
5  scalability Cloudstack Developer Day5  scalability Cloudstack Developer Day
5 scalability Cloudstack Developer DayKimihiko Kitase
 
Blue host openstacksummit_2013
Blue host openstacksummit_2013Blue host openstacksummit_2013
Blue host openstacksummit_2013Jun Park
 
Blue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environmentBlue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environmentOpenStack Foundation
 
SDEC2011 Using Couchbase for social game scaling and speed
SDEC2011 Using Couchbase for social game scaling and speedSDEC2011 Using Couchbase for social game scaling and speed
SDEC2011 Using Couchbase for social game scaling and speedKorea Sdec
 
Common Sense Performance Indicators in the Cloud
Common Sense Performance Indicators in the CloudCommon Sense Performance Indicators in the Cloud
Common Sense Performance Indicators in the CloudNick Gerner
 
Openstorage with OpenStack, by Bradley
Openstorage with OpenStack, by BradleyOpenstorage with OpenStack, by Bradley
Openstorage with OpenStack, by BradleyHui Cheng
 
Pm 01 bradley stone_openstorage_openstack
Pm 01 bradley stone_openstorage_openstackPm 01 bradley stone_openstorage_openstack
Pm 01 bradley stone_openstorage_openstackOpenCity Community
 

Similar to Membase Meetup Chicago - january 2011 (20)

Couchdb + Membase = Couchbase
Couchdb + Membase = CouchbaseCouchdb + Membase = Couchbase
Couchdb + Membase = Couchbase
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparison
 
Couchbase b jmeetup
Couchbase b jmeetupCouchbase b jmeetup
Couchbase b jmeetup
 
CloudStack Architecture Future
CloudStack Architecture FutureCloudStack Architecture Future
CloudStack Architecture Future
 
Gear6 Webinar - MySQL Scaling with Memcached
Gear6 Webinar - MySQL Scaling with MemcachedGear6 Webinar - MySQL Scaling with Memcached
Gear6 Webinar - MySQL Scaling with Memcached
 
MySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached APIMySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached API
 
How AOL Advertising Uses NoSQL to Make Millions of Smart Targeting Decisions ...
How AOL Advertising Uses NoSQL to Make Millions of Smart Targeting Decisions ...How AOL Advertising Uses NoSQL to Make Millions of Smart Targeting Decisions ...
How AOL Advertising Uses NoSQL to Make Millions of Smart Targeting Decisions ...
 
Shared personalization service. How to scale to 15 k rps (Patrice Pelland)
Shared personalization service. How to scale to 15 k rps (Patrice Pelland)Shared personalization service. How to scale to 15 k rps (Patrice Pelland)
Shared personalization service. How to scale to 15 k rps (Patrice Pelland)
 
A memcached implementation in Java
A memcached implementation in JavaA memcached implementation in Java
A memcached implementation in Java
 
cosbench-openstack.pdf
cosbench-openstack.pdfcosbench-openstack.pdf
cosbench-openstack.pdf
 
Memcached, presented to LCA2010
Memcached, presented to LCA2010Memcached, presented to LCA2010
Memcached, presented to LCA2010
 
network ram parallel computing
network ram parallel computingnetwork ram parallel computing
network ram parallel computing
 
Windsor: Domain 0 Disaggregation for XenServer and XCP
	Windsor: Domain 0 Disaggregation for XenServer and XCP	Windsor: Domain 0 Disaggregation for XenServer and XCP
Windsor: Domain 0 Disaggregation for XenServer and XCP
 
5 scalability Cloudstack Developer Day
5  scalability Cloudstack Developer Day5  scalability Cloudstack Developer Day
5 scalability Cloudstack Developer Day
 
Blue host openstacksummit_2013
Blue host openstacksummit_2013Blue host openstacksummit_2013
Blue host openstacksummit_2013
 
Blue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environmentBlue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environment
 
SDEC2011 Using Couchbase for social game scaling and speed
SDEC2011 Using Couchbase for social game scaling and speedSDEC2011 Using Couchbase for social game scaling and speed
SDEC2011 Using Couchbase for social game scaling and speed
 
Common Sense Performance Indicators in the Cloud
Common Sense Performance Indicators in the CloudCommon Sense Performance Indicators in the Cloud
Common Sense Performance Indicators in the Cloud
 
Openstorage with OpenStack, by Bradley
Openstorage with OpenStack, by BradleyOpenstorage with OpenStack, by Bradley
Openstorage with OpenStack, by Bradley
 
Pm 01 bradley stone_openstorage_openstack
Pm 01 bradley stone_openstorage_openstackPm 01 bradley stone_openstorage_openstack
Pm 01 bradley stone_openstorage_openstack
 

Membase Meetup Chicago - january 2011

  • 3. Membase is a distributed database Application user Web application server Web application server Web application server Membase Servers In the data center On the administrator console 3
  • 4. Membase is Simple, Fast, Elastic Five minutes or less to a working cluster • Downloads for Linux and Windows • Start with a single node • One button press joins nodes to a cluster Easy to develop against • Just SET and GET – no schema required • Drop it in. 10,000+ existing applications already “speak membase” (via memcached) • Practically every language and application framework is supported, out of the box Easy to manage • One-click failover and cluster rebalancing • Graphical and programmatic interfaces • Configurable alerting 4
  • 5. Membase is Simple, Fast, Elastic Predictable • “Never keep an application waiting” • Quasi-deterministic latency and throughput Low latency • Built-in Memcached technology High throughput • Multi-threaded • Low lock contention • Asynchronous wherever possible • Automatic write de-duplication 5
  • 6. Membase is Simple, Fast, Elastic Zero-downtime elasticity • Spread I/O and data across commodity servers (or VMs) • Consistent performance with linear cost • Dynamic rebalancing of a live cluster All nodes are created equal • No special case nodes • Any node can replace any other node, online • Clone to grow Extensible • Filtered TAP interface provides hook points for external systems (e.g. full-text search, backup, warehouse) • Data bucket – engine API for specialized container types 6
  • 7. Built-in Memcached Caching Layer Memcached Membase Cache Membase Database Membase Database Memcached Mode Membase Mode Fact: Membase development team has also contributed over half of the code to the Memcached project. 7
  • 9. Ad targeting 40 milliseconds to come up with an answer. profiles, real time campaign 3 statistics 2 1 profiles, campaigns events 9
  • 10. Search and Gaming Portal Database 10
  • 12. Clustering • Underlying cluster functionality based on erlang OTP • Have a custom, vector clock based way of storing and propagating... – Cluster topology – vBucket mapping • Collect statistics from many nodes of the cluster – Identify hot keys, resource utilization 12
  • 13. TAP • A generic, scalable method of streaming mutations from a given server – As data operations arrive, they can be sent to arbitrary TAP receivers • Leverages the existing memcached engine interface, and the non-blocking IO interfaces to send data • Three modes of operation Data Mutations Data set Data Mutations Data set Data set 13
  • 14. Membase data flow – under the hood SET request arrives at SET acknowledgement KEY’s master server 1 2 returned to application 3 Listener-Sender 3 RAM membase storage engine 4 Disk Disk Disk Disk Disk Disk Replica Server 1 for KEY Master server for KEY Replica Server 2 for KEY 14
  • 15. A Membase Node memcached operations memcached smart (any client) client operations REST Interface Membase Node 15
  • 16. A Membase Node: Component View moxi ns_server membase ns_server (memcached + membase engine) TAP vbucketmigrator 16
  • 17. Clients, nodes and other nodes Client moxi + Client port 11210 port 11211 memcached operations REST/comet memcached operations cluster topology and vbucket map memcached operations moxi ns_server membase ns_server (memcached + membase engine) TAP memcached operations with tap commands vbucketmigrator 17
  • 18. Data buckets are secure membase “slices” Application user Web application server Bucket 1 Bucket 2 Aggregate Cluster Memory and Disk Capacity Membase data servers In the data center On the administrator console 18
  • 20. Disk > Memory Dataset may have many memory quota Bucket Configuration items infrequently accessed. mem_high_wat However, memcached has mem_low_wat different behavior (LRU) than wanted with membase. Still, traditional (most) RDBMS implementations are not 100% correct for us either. The speed of a miss is very, very important. 20
  • 22. Thanks! 22
  • 25. Key-Value 25
  • 26. Key-Value Items have: Operations include: Key Get/Set Value Increment/Decrement Expiration Append/Prepend Flags CAS (more on this later) 25
  • 27. Key-Value 25
  • 28. Key-Value (with a replica ) Image courtesy http://www.flickr.com/photos/brenda-starr/3509344100/sizes/m/in/photostream/ 25
  • 30. Membase Datatypes • byte[] – Does your data have 1s and 0s? 26
  • 31. Membase Datatypes • byte[] – Does your data have 1s and 0s? “Any customer can have a car painted any colour that he wants so long as it is black.” 26
  • 32. Membase Datatypes • byte[] – Does your data have 1s and 0s? • Items do have flags – Many clients use flags – Data type options • Google protobuf “Any customer can have a car painted any colour • Thrift that he wants so long as • Avro it is black.” 26
  • 33. Transactions • Lock == slow me down • CAS operations User 1 User 2 – Optimistic locking Su • Very useful with complex cc il! es Fa datatypes s – Imagine two clients trying to update a complex item • You’re likely using CAS already... if you use a CPU 27
  • 34. Common Use: Sessions • Web user sessions – Highly read, less writes in many case – Protocol advantage of memcached • Options already for PHP, Ruby and Java • Application state – Not necessarily “entity” style things – May be appropriate for a “cache” pool 28
  • 35. Common Use (cache): Rate Limiting • Want to provide API calls into the system Your Users – Twitter search h ! uc ¡O – Google search services • Use the atomic increment Your App – Set an item with a unique ID – Upon API request, increment and check • HTTP 420: go away and come back later 29
  • 37. Frequent Requests: New Access Methods Beyond key-value • Indexing/Range Queries • Advanced Data Structures • Sub-object direct manipulation Validation and In-flight transformation • Block mutations failing validation • Enrich or transform objects Connectors (Integrate easily with other systems) • Solr • Hadoop 31
  • 38. Feedback: your turn! • Querying and indexing? • Use cases you can share? 32
  • 39. NodeCode - What is it? Method for extending & customizing Membase Separate code modules Defined interface to datapath and cluster manager Notification on events • Synchronous • Asynchronous 33
  • 40. NodeCode – Drivers Simple • Packaged modules for easy install and enable • Library of “off the shelf” modules • Module monitoring • Straight forward development and debugging Fast • Low latency/high-throughput • Per-bucket process isolation • Don’t break data manager performance/correctness Elastic • Automatically migrate and instantiate on rebalance • Provide support for migration of internal data • Leverage native Membase engine for internal data storage 34
  • 42. Q&A Matt Ingenthron matt@membase.com Twitter: ingenthr IRC: #membase 36
  • 43. Attributions • http://commons.wikimedia.org/wiki/File:Flag_of_China.png • http://commons.wikimedia.org/wiki/File:Flag_of_South_Korea.svg • http://commons.wikimedia.org/wiki/File:Flag_of_Japan.svg 37