In-memory databases: use cases and pros-cons

Ecommerce

Storing a small component on an ecommerce application (such as a customer’s shopping cart) in an in-memory database can help provide a better customer experience by speeding up application response times. It greatly improves shopping cart conversion probability.

Selling online ads

Selling online ad impressions relies on dynamic bidding. In the time it takes a user to load a web page, multiple advertisers must bid simultaneously for the ad space that’s about to be created. This process must be completed in far less than a second, a job well suited to an in-memory database.

IoT sensor data

Networks of IoT sensors collect and transmit constant streams of data. Some organizations use an in-memory database to quickly compute and store IoT data prior to transfer to a traditional database for long-term storage.

Session stores and caching

Caching temporarily stores data to provide a faster experience for website users. Session management works similarly by temporarily storing information on a user’s identity and actions for tracking purposes. In-memory databases are ideal for storing temporary data and making it available for quick retrieval.

Real-time analytics

Being able to query data as it’s created offers some big benefits, especially when it comes to industries such as online retail and banking. Online retailers suggest related or similar products based on real-time actions of customers, providing additional opportunities to boost sales. In banking, in-memory databases can help analyze a consumer’s typical purchasing patterns quickly, allowing financial institutions to block potentially fraudulent transactions that deviate from the norm.

In-memory databases ?

Most databases, including cloud and on-premises systems, store data on physical hard drives. In contrast, in-memory databases store data within the RAM of one or more computers. The data isn’t committed to a hard disk―it exists only in the RAM.

DATABASE

With data stored directly in RAM, in-memory databases can perform in ways that aren’t possible when using traditional databases. Although this unique database configuration presents some significant benefits, it also comes with some significant drawbacks.

Advantages

Much higher access speeds

The biggest selling point of an in-memory database is its speed. With no need to retrieve data from physical storage, these systems are much faster than traditional databases, making it easier and quicker to complete data analytics tasks. Without any disk operations to contend with, latency is also more consistent.

Increased performance for read operations

In-memory databases remove the need to limit how many read operations are occurring simultaneously on a disk. With this constraint removed, different algorithms can be used to query the data, resulting in a general performance boost.

Evaluate all types of data with a distributed data infrastructure

Setting up a distributed data infrastructure can result in significant improvements in the storage capacity, processing, and transfer of unstructured data such as video, images, and text.

Disadvantages

Cost

The expense of in-memory data is substantially higher than cloud storage or on-premises options. Storing data in the working memory of a computer or network of computers is orders of magnitudes higher, so RAM storage is much more costly to purchase and maintain than disk storage.

High potential for data loss

RAM was originally intended to be used for temporary storage. If the computer or network crashes, the stored data could be lost. For this reason, it’s vital to use either nonvolatile RAM or replicate the in-memory database contents into a conventional database.

Increased performance for read operations

In-memory databases remove the need to limit how many read operations are occurring simultaneously on a disk. With this constraint removed, different algorithms can be used to query the data, resulting in a general performance boost.

Data storage constraints

RAM memory has far less storage capacity than the near-limitless storage capabilities of modern cloud warehouses. Networking computers together can help ease storage constraints to a point, but when RAM storage runs out, any new write operations would fail, resulting in unplanned data loss.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Arun Singh

Arun Singh

Work as Enterprise Data Architect, Cloud Data Architect and focuses on building data architectures on cloud platforms. www.linkedin.com/in/arun-k-singh-3221372