Faster way to serve up simple requests?
Sergio Salvatore
sergiosalvatore at yahoo.com
Mon Jul 11 11:59:39 PDT 2005
Hey,
Just a thought that memcached is simply a cache -- not
really a database. Although PHP + Apache can be
expensive for a simple static serve up you need to
have a way to generate the content in case of a cache
miss (or the machine running memcached being
inaccessable).
Using a ramdisk type filesystem (like tmpfs) is
certainly an option, but it's not very efficient in a
clustered environment because the filesystem is not
shared across web serving nodes. This is where
memcache is particularly good because everything is
balanced and available to all machines in the cluster
-- making the best use of available space.
/sergio
--- Jamie Burns <fantasticjamieburns at hotmail.com>
wrote:
> Could you not simply save the items as html pages
> into a filesystem (RAM
> based perhaps) to begin with from whichever process
> creates/manages these
> data objects?
>
> And then access them as:
>
> /abc.html
> /xyz.html
> etc.
>
> If you cannot change the way the pages are
> referenced (ie. you must use a
> GET parameter instead of a page name) then use
> Apache's URL rewrite so:
>
> /fetchpage.html?page=abc
> /fetchpage.html?page=xyz
>
> Becomes:
>
> /abc.html
> /xyz.html
>
> And then you don't even need to have the PHP engine
> compiled into, or
> invoked from Apache at all.
>
> I would imagine that would be many, many times
> faster.
>
> Jamie.
>
> ----- Original Message -----
> From: "Jeevan _" <jeevan at gmail.com>
> To: <memcached at lists.danga.com>
> Sent: Sunday, July 10, 2005 3:18 AM
> Subject: Faster way to serve up simple requests?
>
>
> I have an extremely simple page that basically takes
> one value passed
> as a get, fetches that key from memcached and serves
> the result as a
> page (the pages are less than 10KB each). There's
> basically no
> processing involved and it's a page that gets hit
> numerous times per
> second.
>
> Right now I'm using Apache + PHP + mcache (the PHP
> extension) to do
> this simple fetch-from-memcached-and-serve routine
> but it seems
> extremely wasteful to use apache and php for such a
> small, simple
> task.
>
> My question is: are there any smaller (less resource
> consuming)
> programs out there that can perform this task?
>
____________________________________________________
Sell on Yahoo! Auctions no fees. Bid on great items.
http://auctions.yahoo.com/
More information about the memcached
mailing list