RAM matters

Couchbase is a "RAM first, disk second" database. Both the reads and writes are optimized to use RAM. On the write side, documents are written to the memory first and then flushed asynchronously to the disk. While volatile memory might not seem optimal for a database, remember that Couchbase will replicate your data on up to three nodes. Additionally, there are API methods that require a disk write before a write to RAM is considered a success.

On the read side, Couchbase maintains metadata about documents in the RAM to provide faster retrieval. Couchbase will also attempt to store as many documents as it is able to in the memory for faster access. Less available RAM means that Couchbase will need to fetch more documents from the disk. ...

Get Couchbase Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.