Presented by:
         Bill Takacs – Director, Product Management


September 2009
Agenda

     •!Rise of the dynamic web!


     •!The web architecture!


     •!The evolution of a dynamic site and Memcac...
The Web: What’s Changed?

     •!Population!

     •!Tra"c!

     •!Content and applications!




3 : Copyright 2009 Gear6...
Web Growth: Population

          Forrester: 2.2 billion people online globally by 2013




4 : Copyright 2009 Gear6 Inc.
Web Growth: Traffic

        Cisco: “Annual global IP traffic
     will exceed two-thirds of a zettabyte
         (667 exa...
Web Growth: Application & Content



                                  Entertainment
                                     ...
But growth can be
Growth can be painful
                painful
       (VERY)
Web Architecture

    !! Most sites (over 65%) based on LAMP or JAVA
    !! Industry standard servers replaced proprietary...
What to do?




9 : Copyright 2009 Gear6 Inc.
New Caching Architecture
     for Scaling Out

                                                            Web Stack      ...
Memcached: Pillar of Web 2.0 Architecture




                                 “Everything runs#
                         ...
The Fix: Memcached

            “A high performance, distributed memory object
            caching system, generic in natu...
Evolution of a Dynamic Site #1
     A day in the life of a growing web service


     •! Event: Site has growth in number ...
Evolution of a Dynamic Site #2
     A day in the life of a growing web service

    •! Event: Individual caches on the app...
Evolution of a Dynamic Site #3
     A day in the life of a growing web service

     •! Event: Memcached needs more memory...
What Memcached is NOT:

                                 A persistent data store!


                                 A dat...
Memcached: Best Practices

     •!Use with MySQL :-)!       •!Careful with
     •!Use on 64-bit               numbers of
 ...
Memcache Use Cases

          Site Type                 Repeatable Use

          Social networking         Profile caching...
Use Case Example:
     Session Management

                                 •! 4m+ daily visitors!
                       ...
Use Case Example:
     User Targeting Engine

    Recommendations on
      User webpages
                                 ...
Useful Memcached Tools

                       advanced reporter!
                       Track hot keys and clients in Mem...
Statsproxy + Cacti Templates




                                    To use the cacti
                                    ...
•! First and leading provider#
     of Memcached solutions!

  •! Memcached solution including!

          •! High density...
Questions?

         Thank you for attending our webinar
                                           !
   “Memcached and th...
References
     •!   Danga.com!
     •!   Highscalability.com!
     •!   Dev.gear6.com!
     •!   Groups.google.com/group/...
Upcoming SlideShare
Loading in...5
×

Memcached and the Rise of the Dynamic Web

6,808

Published on

Who's online, how they're using the Web, and what they're accessing have changed significantly over the last few years. All these factors are straining websites, and their outdated architectures. This presentation covers these changes by the numbers and looks at the emergence of a Web scale architecture that takes advantage of Memcached to improve performance and scalability of today's dynamic websites. The recorded webinar is now available at: http://bit.ly/aPe2T.

Published in: Technology
3 Comments
15 Likes
Statistics
Notes
No Downloads
Views
Total Views
6,808
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
174
Comments
3
Likes
15
Embeds 0
No embeds

No notes for slide

Memcached and the Rise of the Dynamic Web

  1. 1. Presented by: Bill Takacs – Director, Product Management September 2009
  2. 2. Agenda •!Rise of the dynamic web! •!The web architecture! •!The evolution of a dynamic site and Memcached! •!Gear6 solution! 2 : Copyright 2009 Gear6 Inc.
  3. 3. The Web: What’s Changed? •!Population! •!Tra"c! •!Content and applications! 3 : Copyright 2009 Gear6 Inc.
  4. 4. Web Growth: Population Forrester: 2.2 billion people online globally by 2013 4 : Copyright 2009 Gear6 Inc.
  5. 5. Web Growth: Traffic Cisco: “Annual global IP traffic will exceed two-thirds of a zettabyte (667 exabytes) in four years” [by 2013] Source: Cisco Visual Networking Index, 9 June 2009 5 : Copyright 2009 Gear6 Inc.
  6. 6. Web Growth: Application & Content Entertainment ! Social Networking! Media ! Communication ! Community-generated content ! 6 : Copyright 2009 Gear6 Inc.
  7. 7. But growth can be Growth can be painful painful (VERY)
  8. 8. Web Architecture !! Most sites (over 65%) based on LAMP or JAVA !! Industry standard servers replaced proprietary SMP !! Shift to Dynamic Content puts strain on origin sites Web Stack Net Interface Storage Clients PHP, Java, Rails, C, Database! Internet Apache, Nginx, Servers! Servers# Perl, Python! PostgreSQL ! Lighttpd! MySQL, Web App Proxy CDN! Load Balancer 8 : Copyright 2009 Gear6 Inc.
  9. 9. What to do? 9 : Copyright 2009 Gear6 Inc.
  10. 10. New Caching Architecture for Scaling Out Web Stack Net Interface Storage Clients PHP, Java, Rails, C, Database! Internet Apache, Nginx, Servers! Servers# Perl, Python! PostgreSQL ! Lighttpd! MySQL, Web App Proxy CDN! Load Balancer Cache Servers memcached 10 : Copyright 2009 Gear6 Inc.
  11. 11. Memcached: Pillar of Web 2.0 Architecture “Everything runs# from memory# in Web 2.0” ! Evan Weaver, Twitter, March 2009! 11 : Copyright 2009 Gear6 Inc.
  12. 12. The Fix: Memcached “A high performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load”! •! Big hash table! •! Created by Danga Interactive for LiveJournal! •! Significantly reduced database load! •! Perfect for web sites with high database load! •! In use by Facebook, Twitter, MyYearbook, others! 12 : Copyright 2009 Gear6 Inc.
  13. 13. Evolution of a Dynamic Site #1 A day in the life of a growing web service •! Event: Site has growth in number of users/sessions/page views/apps causing excessive read load on DB! •! Action: Replicate Database (and/or add more app servers)! App Server App Server App Server App Server App Server App Server App Server App Server App Server write! write! write! … MySQL MySQL MySQL 13 : Copyright 2009 Gear6 Inc.
  14. 14. Evolution of a Dynamic Site #2 A day in the life of a growing web service •! Event: Individual caches on the app/db servers are overwhelmed from chaotic/non-deterministic content access! •! Action: Add memcached server on servers with underutilized memory resources… results in even fewer reads to database! memcached memcached memcached App Server App Server App Server App Server App Server App Server memcached memcached memcached App Server App Server App Server App Server App Server App Server write! write! write! write! … … MySQL MySQL MySQL MySQL 14 : Copyright 2009 Gear6 Inc.
  15. 15. Evolution of a Dynamic Site #3 A day in the life of a growing web service •! Event: Memcached needs more memory resources than what is available on other (shared) servers! •! Action: Move memcached servers to dedicated servers! memcached memcached memcached App Server App Server App Server App Server App Server App Server memcached memcached memcached App Server App Server App Server App Server App Server App Server memcached memcached … memcached write! write! write! write! … … MySQL MySQL MySQL MySQL 15 : Copyright 2009 Gear6 Inc.
  16. 16. What Memcached is NOT: A persistent data store! A database! Application-specific! A large object cache! Fault-tolerant or highly available! 16 : Copyright 2009 Gear6 Inc.
  17. 17. Memcached: Best Practices •!Use with MySQL :-)! •!Careful with •!Use on 64-bit numbers of servers! connections! •!Cache “expensive »! Peak! operations”! »! Transitions! •!Cache bi- •!Evictions! directionally (R/W)! »! Segment Memcached data into separate pools ! •!Design to withstand •!Optimize sizing: failures gracefully! Instances and pools! •!Use consistent •!Instrumentation! hashing! 17 : Copyright 2009 Gear6 Inc.
  18. 18. Memcache Use Cases Site Type Repeatable Use Social networking Profile caching Content aggregation HTML/page caching Ad targeting Cookie/profile tracking Gaming and entertainment Session caching Location-based services DB query scaling Relationship Session caching E-commerce Session and HTML caching 18 : Copyright 2009 Gear6 Inc.
  19. 19. Use Case Example: Session Management •! 4m+ daily visitors! •! 15k hits/sec! •! 6k updates/sec! •! Tens of thousands concurrent connections! •! Session tracked and ads are placed in accordance to session! 19 : Copyright 2009 Gear6 Inc.
  20. 20. Use Case Example: User Targeting Engine Recommendations on User webpages User Targeting Service User Targeting Service Memcached User Targeting Service Thin/fast memcache pool! Client layer memcache Thin/fast (reads) Client layer memcache Thin/fast (reads) Client layer (reads) Update processing Webserver / php (writes) Update processing Bulk/batch Load Balancer (writes) updates Update processing Load Balancer Load Balancer (writes) Hadoop! “Lazy” Updates Map/Reduce Jobs Data processing User targeting data From logs and other User profile updates systems Reports! Ad-Hoc Analysis Memcache repopulation (bulk updates, recovery) 20 : Copyright 2009 Gear6 Inc.
  21. 21. Useful Memcached Tools advanced reporter! Track hot keys and clients in Memcached! wireshark! Dissect and analyze Memcached network tra"c! brutis! Size and test changes to memcache clusters! statsproxy! View bu$ered Memcached stats in your browser! cacti! Graph and analyze Memcached statistics! 21 : Copyright 2009 Gear6 Inc.
  22. 22. Statsproxy + Cacti Templates To use the cacti templates for memcached with statsproxy, you either need to modify the templates to use port 8080 or change the statsproxy config to use port 11211 22 : Copyright 2009 Gear6 Inc.
  23. 23. •! First and leading provider# of Memcached solutions! •! Memcached solution including! •! High density! •! High Availability! •! Advanced memory# management! •! Enhanced reporting# capabilities ! •! Support for multi-tenancy! •! Disruption free# software upgrades! •! 100% client compatible! 23 : Copyright 2009 Gear6 Inc.
  24. 24. Questions? Thank you for attending our webinar ! “Memcached and the Rise of the New Dynamic Web”! and please visit our web site at: ! www.gear6.com! 24 : Copyright 2009 Gear6 Inc.
  25. 25. References •! Danga.com! •! Highscalability.com! •! Dev.gear6.com! •! Groups.google.com/group/memcached! •! Code.google.com/p/memcached! •! Twitter.com/gearsix! •! Cacti.net! •! Wireshark.org! •! http://dev.mysql.com/doc/mysql-ha-scalability/en/ha-memcached- using-deployment.html! •! http://dev.mysql.com/doc/mysql-ha-scalability/en/ha-memcached- using-hashtypes.html! •! http://jayant7k.blogspot.com/2009/04/memcached-replication.html! •! http://www.lexemetech.com/2007/11/consistent-hashing.html! •! http://www8.org/w8-papers/2a-webserver/caching/paper2.htmlhttp:// www.last.fm/user/RJ/journal/2007/04/10/rz_libketama_- _a_consistent_hashing_algo_for_memcache_clients! •! http://bazaar.launchpad.net/~libmemcached-developers/libmemcached/ trunk/revision/539! 25 : Copyright 2009 Gear6 Inc.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×