Levels of Caching

Reinis Rozitis roze at roze.lv
Thu Feb 1 18:51:19 UTC 2007

It fully depends on your website.

For example if you run a site with userbase and where users log in (some 
social network) - you cant really make a static cache because every page is 
different for every user (rewriting cache on each pageview isnt really 
usefull). In this case even the squids are useless and just one extra layer. 
You can of course cache some parts / variables / datasets of the output 
(where memcached comes in).

But in case of some newsportal (where all visitors get the same page) you 
can even dynamically generate static htmls.

I would avoid NFS in this case. It will be a major slowdown (if your idea 
was to distribute the same cache to each of the apaches).
Cache localy on squids or directly on webservers and it will be enough.
I would avoid also Smarty.. There are a lot more and better implementations 
of transparent opcode/content caches for php - eaccelerator, APC, xcache, 
ioncube and also the commercial Zend Platform/Core.


----- Original Message ----- 
From: "howard chen" <howachen at gmail.com>
To: "Memcached list" <memcached at lists.danga.com>
Sent: Thursday, February 01, 2007 7:49 PM
Subject: Levels of Caching

> This post might be a little bit off topic, but as you know, many
> people in this list are running very high traffic sites, so this might
> be good for knowledge sharing :)
> Traditional scalable web architecture, such as used by wikipedia, use
> the following similar model (correct me if i am wrong)
> Load Balancer <--Squids <--- Apaches(PHP) ---> Memcacheds / MySQLs
> The Squids handle around 70% of the total traffics, while the rest of
> the request hit the WS and will fetch data from memcached or mysql.
> (of coz their mysql is seriously tunned and configuration is very
> good).
> I am wonder to add another layer of cache into this setup, e.g.
> Load Balancer <--Squids <--- Apaches(PHP) ---> NFS/Memcached Page
> Cache (e.g. Smarty Cache) --> Memcacheds / MySQLs
> The web server will only fetch data from MySQL is only page cache not 
> exist.
> What do you think abt this idea?

More information about the memcached mailing list