memcache - lightning fast object retrieval

Post on 06-Jul-2015

844 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Memcache Lightning fast object retrieval

1

Site too slow?

2

Can’t serve all requests?

3

Memcache may be for you.

But maybe not.

4

• Spare memory?

• webserver

• fileserver

• database server

Do you have spare resources?

5

What’s cheapest to add?

• More webservers?

• More database servers?

• More memory servers?

6

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

Memory cache can turn down the heat

• Less PHP processing

• Fewer database queries

8

Advantages of Memcache

• Memory based and fast

• Keys and bytes (anything goes in)

• Cache things only once

9

Redundant caches

10

Single shared cache

11

What do you need?

12

Spare memory.4MB - nGB

15

Memcache Drupal module

http://drupal.org/projects/memcache

16

Memcache Drupal module

• A module

• An include file /includes/memcache.inc

• Patches

17

Why do you need patches?

• We’re caching things that Drupal normally doesn’t cache

• Built nodes

• Taxonomy terms, vocabularies, trees

• Comments

• Paths

18

Who should use memcache?

• A personal blog (Apache, MySql on one box)

Page requests went from 400ms to 100ms

19

Large Media site

• Handles yearly spikes by adding a cluster of memcache servers during the spike

20

21

Soon to come

• Admin section

• Statistics

• Clustering

• Bins

• Greater abstraction at the Drupal cache layer

22

top related