Our customers use the Couchbase data platform in a wide variety of ways. Couchbase Mobile helps companies empower their workers around the globe with always-on, always reliable data on the go. Our flexible JSON document data storage allows customers to build modern, agile web applications that deliver great experiences to their end consumers.

And from the beginning of Couchbase over a decade ago, we have countless companies who leverage our highly available, in-memory distributed caching technologies to deliver single-digit millisecond responses even at extremely high volumes. Our customer, LinkedIn, recently posted on their blog about serving up to 1.4 million profiles per second with a cache hit rate of 99+%, while also trimming TCO by 10% annually. 

We recently announced that Couchbase Capella, our Database-as-a-Service (DBaaS), has expanded options for customers seeking to build out caching use cases by adding support for memory-only buckets. Capella has always supported caching, with adjustable high-speed in-memory storage, but would also persist data back to disk to prevent data loss. Now customers can choose the option to have data stored only as a cache and not be written to disk. 

Why use memory-only buckets?

Some sort of caching is used in most applications. Depending on a customer’s needs, some portion (large or small) of the data they use in their application may not be needed to persist permanently to disk. This transient (use-and-forget-it) data might be used to increase the performance of an application by reducing the data trips to disk, it can provide additional flexibility to applications in how data is managed for users, and it can also save on disk cost if a large percentage of data is not written into the database. Memory-only data can be very useful in situations of high traffic volumes where preloaded data in the cache is served quickly to support usage spikes. 

What are some example use cases?

Common uses cases include, but are not limited to, the following:

    • This temporary data, sometimes called ephemeral data, is commonly used in session management for web applications. Things like session token data, which is used to manage users’ sessions, maintain state while interacting with the application. Following the end of a session, the unneeded temporary data can be discarded. Temporary user preferences can also be managed in a similar way. 
    • Ephemeral data is often used in caching mechanisms to improve performance. For data that is most frequently accessed, cached data reduces the need for expensive or time-consuming disk operations. Over time, the temporary data that has been cached can be discarded or replaced if there is a need to free up resources.
    • Transient data can be used to manage anonymous information that doesn’t need long-term storage. An example may be temporary one-time-use authentication data that is generated for a specific reason and then discarded once the action has been completed. 
    • Some use ephemeral data to enhance security and privacy by limiting the exposure of sensitive information. Applications or microservices that handle messaging may want to keep core messaging data but have tertiary information that can be deleted over time.

How would one set up memory-only buckets in Capella?

Users would define a bucket as memory-only during the creation of the bucket. They can also control the Ejection Policy (setting how data is managed when it is full) and the durability level of the data (setting replications to other nodes for improved availability). Customers can utilize both memory-only and memory and disk buckets within a single database. And both bucket types can be used with either of the chosen storage engines (Magma or Couchstore) and are supported across AWS, GCP, and Azure cloud service providers. 

Summary

Overall, the use of transient/ephemeral data for caching and other use cases is a valuable tool that can be used to improve the performance, cost, flexibility, and scalability of applications. Capella makes it easier and faster to get started with Couchbase. Now with the support of memory-only buckets, even more use cases can take advantage of the Couchbase data platform via a fully managed Database-as-a-Service. 

Resources

Author

Posted by Tim Rottach, Director of Product Line Marketing

Tim Rottach is Director of Product Line Marketing at Couchbase.

Leave a reply