Can I save a document on disk only instead of memory in Couchbase server?


I am new to couchbase, currently my company is using couchbase server to save data for fast retrieval, but we have a document with 500mg that only want to save into disk instead of memory.

Is any one can suggest some approach to save this document only into disk in couchbase server?

Thanks in the advance,

Couchbase will always write to memory first but it will flush the documents to disk as space is needed. This means that you can do a normal write, and if the document is not accessed it will be removed from memory and only the disk version remains. The only thing which stays in memory is a small amount of meta data, which holds the key, and some other small values, not the document contents.

That being said, if I understand right the document you want to write is 500MB? That is a really large document, and even though it is theoretically possible to write it we limit the document size to 20MB right now, what you should do in this case is split the document in multiple smaller ones so you basically get a chunked version of the document. You could also take a look at CBFS for example to use as a blob store for those kind of documents.