Memcache - Lightning fast object retrieval

976 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
976
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Memcache - Lightning fast object retrieval

  1. 1. Memcache Lightning fast object retrieval 1
  2. 2. Site too slow? 2
  3. 3. Can’t serve all requests? 3
  4. 4. Memcache may be for you. But maybe not. 4
  5. 5. Do you have spare resources? • Spare memory? • webserver • fileserver • database server 5
  6. 6. What’s cheapest to add? • More webservers? • More database servers? • More memory servers? 6
  7. 7. Memory servers are cheap • You may have spare memory on your network • Memory servers don’t need hard disks • Memory servers don’t need fast CPUs 7
  8. 8. Memory cache can turn down the heat • Less PHP processing • Fewer database queries 8
  9. 9. Advantages of Memcache • Memory based and fast • Keys and bytes (anything goes in) • Cache things only once 9
  10. 10. Redundant caches 10
  11. 11. Single shared cache 11
  12. 12. What do you need? 12
  13. 13. Memcached server http://danga.com/ memcached/ 13
  14. 14. Memcache PECL extension http://pecl.php.net/ package/memcache 14
  15. 15. Spare memory. 4MB - nGB 15
  16. 16. Memcache Drupal module http://drupal.org/projects/memcache 16
  17. 17. Memcache Drupal module • A module • An include file /includes/memcache.inc • Patches 17
  18. 18. Why do you need patches? • We’re caching things that Drupal normally doesn’t cache • Built nodes • Taxonomy terms, vocabularies, trees • Comments • Paths 18
  19. 19. Who should use memcache? • A personal blog (Apache, MySql on one box) Page requests went from 400ms to 100ms 19
  20. 20. Large Media site • Handles yearly spikes by adding a cluster of memcache servers during the spike 20
  21. 21. 21
  22. 22. Soon to come • Admin section • Statistics • Clustering • Bins • Greater abstraction at the Drupal cache layer 22

×