couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <>
Subject Re: using couchdb as caching system
Date Thu, 03 Apr 2008 21:36:25 GMT
Heya Sven,
On Mar 30, 2008, at 15:15, Sven Tietje wrote:
>>> do you have experience in using couchdb as caching-system? we are
>>> thinking about storing generated html-documents in couchdb. your
>>> experience?
>> No experience so far, but why not use the filesystem? :-)
> hi jan,
> it`s a distributed system and only files like images, pdf are handled
> through the filesystem. caching should be done by a single independent
> server. another point is that we cache parts of a html-page -> some  
> parts
> are generated dynamically. doing a request to the file-system for  
> each part
> is not performant :-)
> i`d like to get all cached parts with one request. eg: html-page / 
> blub.html
> ist called. now, there can be 2 cases:
> 1. total page has been cached
> 2. only parts have been cached
> i want to get all information with one request. storing it in  
> couchdb would
> make it possible to store it all in one document - correct?
> {
> 	full_html: null or html,
> 	parts: {
> 			....
> 	}
> }
> of course, i can store json in a file in the filesystem, but will i  
> be able
> to scale my caching-system?

Okay, your reasons to use CouchDB seem, erm, reasonable :)
The only problem at the moment is that CouchDB does not
perform any internal caching. So all reads and writes go directly
through disk. While a caching layer is planned and relatively
easy to embed, it has not been done yet. So at the moment you
would not benefit from a lot of actual caching. In the future: Sure.
When: I do not know.

You could put a reverse HTTP proxy in front of CouchDB for the
actual caching in the meantime, though and remove it, when
CouchDB is fast enough for your needs.


View raw message