You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Matthew Tice <mj...@gmail.com> on 2009/12/07 20:08:28 UTC

[users@httpd] mod_cache caching cluster

Hello, I was wondering if anyone has run across a means consolidating or
clustering their cache?  Currently we have 20 nodes that only serve up
static content.  Each node is configured with a 6G ramdisk
(mod_disk_cache).  This works *ok* except for a couple issues.  1) We
experience intermittent performance issues (it seems to happen when
htcacheclean kicks off), and 2) the cache varies from machine to machine.

I was digging around with mod_memcache - I really like the idea but 1) it
doesn't look like it's actively developed, and 2) I can't seem to get the
caching to do what I want.  I was also briefly looking at JCS - but that
maybe a little overkill?

I could have the content stored on a shared NFS mount but I wanted to stay
away from disk-based caching if I could.

If anyone has any suggestions or ideas I'd appreciate it greatly.

Matt

Re: [users@httpd] mod_cache caching cluster

Posted by Matthew Tice <mj...@gmail.com>.
On Mon, Dec 7, 2009 at 4:04 PM, Francis GALIEGUE <fg...@one2team.com> wrote:

> On Mon, Dec 7, 2009 at 20:08, Matthew Tice <mj...@gmail.com> wrote:
> > Hello, I was wondering if anyone has run across a means consolidating or
> > clustering their cache?  Currently we have 20 nodes that only serve up
> > static content.  Each node is configured with a 6G ramdisk
> > (mod_disk_cache).  This works *ok* except for a couple issues.  1) We
> > experience intermittent performance issues (it seems to happen when
> > htcacheclean kicks off), and 2) the cache varies from machine to machine.
> >
> > I was digging around with mod_memcache - I really like the idea but 1) it
> > doesn't look like it's actively developed, and 2) I can't seem to get the
> > caching to do what I want.  I was also briefly looking at JCS - but that
> > maybe a little overkill?
> >
> > I could have the content stored on a shared NFS mount but I wanted to
> stay
> > away from disk-based caching if I could.
> >
> > If anyone has any suggestions or ideas I'd appreciate it greatly.
> >
>
> Since it is only really static content, and provided that when a given
> element changes, its URI changes, you should definitely look at
> mod_expires:
>
> ExpiresActive On
>
> <Location /some/static/URI/base>
>    ExpiresDefault "access plus 1 month" # or more
>    Header append Cache-Control "private" # this tells that the proxy
> won't cache, but the final client will
> </Location>
>
> You don't even need disk-based caching. The OS' pagecache will largely
> fill the "need for speed".
>
> --
>

Thanks Francis, I'm a little confused about a couple things.  1) Is the
ExpiresDefault in mod_expires similar to CacheDefaultExpire in mod_cache?
2) This wouldn't address the need for a backend global cache?   Also I
wanted to limit/reduce any kind of paging and it seems that with 9+G of
cache I would be swapping all over the place.

Re: [users@httpd] mod_cache caching cluster

Posted by Francis GALIEGUE <fg...@one2team.com>.
On Mon, Dec 7, 2009 at 20:08, Matthew Tice <mj...@gmail.com> wrote:
> Hello, I was wondering if anyone has run across a means consolidating or
> clustering their cache?  Currently we have 20 nodes that only serve up
> static content.  Each node is configured with a 6G ramdisk
> (mod_disk_cache).  This works *ok* except for a couple issues.  1) We
> experience intermittent performance issues (it seems to happen when
> htcacheclean kicks off), and 2) the cache varies from machine to machine.
>
> I was digging around with mod_memcache - I really like the idea but 1) it
> doesn't look like it's actively developed, and 2) I can't seem to get the
> caching to do what I want.  I was also briefly looking at JCS - but that
> maybe a little overkill?
>
> I could have the content stored on a shared NFS mount but I wanted to stay
> away from disk-based caching if I could.
>
> If anyone has any suggestions or ideas I'd appreciate it greatly.
>

Since it is only really static content, and provided that when a given
element changes, its URI changes, you should definitely look at
mod_expires:

ExpiresActive On

<Location /some/static/URI/base>
    ExpiresDefault "access plus 1 month" # or more
    Header append Cache-Control "private" # this tells that the proxy
won't cache, but the final client will
</Location>

You don't even need disk-based caching. The OS' pagecache will largely
fill the "need for speed".

-- 

Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: mod_cache caching cluster

Posted by Matthew Tice <mj...@gmail.com>.
On Mon, Dec 7, 2009 at 12:23 PM, Dan Poirier <po...@pobox.com> wrote:

> Matthew Tice <mj...@gmail.com> writes:
>
> > I was digging around with mod_memcache - I really like the idea but 1) it
> > doesn't look like it's actively developed, and 2) I can't seem to get the
> > caching to do what I want.
>
> Yes, mod_mem_cache development is pretty much stopped, and it's been
> dropped from the next release of Apache.  Also consider that mem_cache
> would have an independent cache per process, which would be the reverse
> of the consolidation you're looking for.
>
>
Well, I was talking about mod_memcache (
http://code.google.com/p/modmemcache/) which seems to sort of be an
Apache-frontend for memcached servers.  To get around using mod_mem_cache I
use mod_disk_cache on a ramdisk.  It does great except for some reason I
can't get it to scale over 4G very well.

[users@httpd] Re: mod_cache caching cluster

Posted by Dan Poirier <po...@pobox.com>.
Matthew Tice <mj...@gmail.com> writes:

> I was digging around with mod_memcache - I really like the idea but 1) it
> doesn't look like it's actively developed, and 2) I can't seem to get the
> caching to do what I want.  

Yes, mod_mem_cache development is pretty much stopped, and it's been
dropped from the next release of Apache.  Also consider that mem_cache
would have an independent cache per process, which would be the reverse
of the consolidation you're looking for.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org