Database Performance With Proxy Architectures

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Database Performance With Proxy Architectures - Presentation Transcript

    1. Database Performance with Proxy Architectures Tungsten SQL Router Robert Hodges CTO, Continuent, Inc. Percona Performance Is Everything 2009 © Continuent 2009
    2. The “Proxy Math” Problem / Proxy layers solve a number of database problems • Seamless failover • Intelligent load balancing • Intelligent partitioning / Big Question: What’s the cost for applications? / Let’s run a few tests to show basic limits • Simple queries with data guaranteed to be in buffer cache • Dell SC 1425, Xeon 2 CPU x 2 Cores, 2.8Mhz • No/minimal proxy logic © Continuent 2009
    3. Proxy Overhead Compared to Databases © Continuent 2009
    4. Proxy with Increasing Result Sizes © Continuent 2009
    5. How Do We Avoid Proxy Math? / Proxy performance is CPU intensive • Mostly copying and transforming bytes / Bad case: 4x CPU resources for same throughput • Could be far worse if proxy does more than copy data • It’s not enough to make proxies faster / Alternative 1: Hardware load balancer • If I only had a brain… / Alternative 2: VIPs • Handy for availability but load balancing is a problem / Alternative 3: An embeddable library • This would work on Amazon as well! © Continuent 2009
    6. Tungsten SQL Router Overview / Library-based intelligent failover and load balancing / Connection-level routing / Implemented as JDBC library wrapper (Java!) • Adds intelligence to vendor drivers / DBMS-independent and non-partisan / 100% open source • http://sourceforge.net/projects/tungsten / Built-in management • Manageable from network • Monitoring integration / Routing based on CAP theorem • Trade off consistency vs. availability vs. partition tolerance © Continuent 2009
    7. CAP-Based Routing--“Quality of Service” Connection for Writes Connection for Reads jdbc:t-router://mysvc/db1 jdbc:t-router://mysvc/db1 ?qos=RW_STRICT ?qos=RO_RELAXED (Data Service) Strict Session Relaxed Consistency Consistency* Consistency Replication Slave Master Slave (latency) Slave *In progress © Continuent 2009
    8. Services and Data Sources / SQL Router connects to services, not hosts / Services are composed of data sources / Configuration stored in CLUSTER_HOME directory $CLUSTER_HOME/ services/ mysvc/ datasource/ db1.properties db2.properties db3.properties replicator/ / Configuration updated by administrative commands © Continuent 2009
    9. Administration and Monitoring / SQL Router library has JMX ports for administration / Update status of data sources using rmctl program: sql-router[mysvc:ONLINE]> db2 offline SENT NOTIFICATION: DATASTORE db2 offline sql-router[mysvc:ONLINE]> db1 online SENT NOTIFICATION: DATASTORE db1 online sql-router[mysvc:ONLINE]> db3 online SENT NOTIFICATION: DATASTORE db3 online / Listeners for monitoring events • Use UDP or group communications or… • Automatically take data sources online/offline © Continuent 2009
    10. Does It Work with Non-Java Programs? / Yes / Use Tungsten Connector as front end / Full circle back to better SQL proxies © Continuent 2009
    11. Tungsten Drilldown – SQL-Router © Continuent 2009
    12. Roadmap / Upgraded monitoring • Create/remove data sources automatically from monitoring data • Specify maximum permitted latency / Session consistency / Partitioning / Sharding • Route databases to different servers © Continuent 2009
    13. Contact Information HQ and Americas EMEA and APAC 560 S. Winchester Blvd., Suite 500 Lars Sonckin kaari 16 San Jose, CA 95128 02600 Espoo, Finland Tel (866) 998-3642 Tel +358 50 517 9059 Fax +358 9 863 0060 Fax (408) 668-1009 My e-mail: robert.hodges “at” continuent.com Commercial solutions: http://www.continuent.com Tungsten open source stack: http://community.continuent.com http://sourceforge.net/projects/tungsten © Continuent 2009
    SlideShare Zeitgeist 2009

    + PerconaPerformancePerconaPerformance Nominate

    custom

    926 views, 0 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 926
      • 926 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 4
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories