As you said, the data will remain in Couchbase until the expiration date: - if the expiration time is set to 0: the data will remain until the application calls the delete () operation - if the expiration time is set to X: the data will remain in Couchbase until X (second) is reached, and the Couchbase server automatically invalidates and deletes the value.
I don’t understand why you say: “And when it is reached, Couchbase will not delete them automatically”, Couchbase automatically deletes the expired element: either when trying to access the expired element or its own internal process, see http: // www. couchbase.com/docs/couchbase-devguide-2.0/about-ttl-values.html
So, you are right when you say that you will have a “not_found” only when the key does not exist (never created or deleted from Couchbase automatically or using explicit delete ())
Couchbase will place the item first in RAM and write it to disk. Couchbase is responsible for managing memory and best retains the most used element in memory. Thus, you can obviously manage more data than the amount of your RAM, you just need to work with good balance in order to have good characteristics and avoid I / O.
When the server restarts, Couchbase has all the data on the disk and at startup it fills the memory with keys and metadata. Therefore, you are not losing anything.
I invite you to read these interesting articles / documents on the Couchbase architecture: - http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-introduction-architecture.html - http://horicky.blogspot.fr/ 2012/07 / couchbase-architecture.html
Let me know if you need more information.
Tag
source share