• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Memcached and the Rise of the Dynamic Web
 

Memcached and the Rise of the Dynamic Web

on

  • 7,735 views

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 ...

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.

Statistics

Views

Total Views
7,735
Views on SlideShare
7,246
Embed Views
489

Actions

Likes
15
Downloads
161
Comments
2

15 Embeds 489

http://sqlandsiva.blogspot.in 418
http://sqlandsiva.blogspot.com 36
http://150.23.23.233:20000 9
http://www.slideshare.net 7
http://www.blogger.com 5
http://sqlandsiva.blogspot.fr 3
http://www.sqlandsiva.blogspot.in 2
http://sqlandsiva.blogspot.co.uk 2
http://www.slideee.com 1
http://sqlandsiva.blogspot.com.ar 1
http://sqlandsiva.blogspot.sg 1
http://sqlandsiva.blogspot.kr 1
http://sqlandsiva.blogspot.ca 1
http://150.23.23.149 1
http://sqlandsiva.blogspot.se 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

12 of 2 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Estorinhas da WEB
    Are you sure you want to
    Your message goes here
    Processing…
  • it is very usefule.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Memcached and the Rise of the Dynamic Web Memcached and the Rise of the Dynamic Web Presentation Transcript

    • 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 Memcached! •!Gear6 solution! 2 : Copyright 2009 Gear6 Inc.
    • The Web: What’s Changed? •!Population! •!Tra"c! •!Content and applications! 3 : Copyright 2009 Gear6 Inc.
    • 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 exabytes) in four years” [by 2013] Source: Cisco Visual Networking Index, 9 June 2009 5 : Copyright 2009 Gear6 Inc.
    • Web Growth: Application & Content Entertainment ! Social Networking! Media ! Communication ! Community-generated content ! 6 : Copyright 2009 Gear6 Inc.
    • 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 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.
    • What to do? 9 : Copyright 2009 Gear6 Inc.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • •! 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.
    • 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.
    • 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.