Importance of in Memory Nosql Databases
Importance of in Memory Nosql Databases
Real-Time
Applications Need
Real-Time Data:
The Importance
of In-Memory NoSQL
Databases
© 2021 Redis
2
Table of Chapter 1:
Slow Response Is the Top Reason Customers Leave. . . . 4
Chapter 6:
Powered by Real-Time Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Contents What’s slow and what’s fast in real life . . . . . . . . . . . . . . . . . . . 4 Popular use cases for real-time data
Top five problems encountered with powered by in-memory NoSQL. . . . . . . . . . . . . . . . . . . . . . . 11
digital services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Consumers are not tolerant of slow experiences. . . . . . 4 Chapter 7:
Beyond Speed and Scale:
Other Enterprise Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Chapter 2: The In-memory NoSQL database checklist. . . . . . . . . . . . . 12
Developers’ Nemesis: Too Much Latency and Not
Enough Throughput. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Chapter 7:
Latency is the new outage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Customer Engagement at Real-Time Speed. . . . . . . . . . . . . 13
The components of latency. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Freshworks relies on Redis Enterprise
to support different use cases . . . . . . . . . . . . . . . . . . . . . . . . 13
Chapter 3:
One Millisecond Response– Chapter 8:
Can Your Database Do That?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 The Last Word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
The components of latency. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Nine Essential Database Capabilities. . . . . . . . . . . . . . . . . . . . 14
Linear Scaling Benchmark. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Chapter 4:
A Job for NoSQL Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Chapter 9:
What is a NoSQL database?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 The World’s Most Loved NoSQL Real-Time Database . . 15
Chapter 5: About Redis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
A NoSQL Database in Memory?
Now That’s Real-Time Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Advantages of an in-memory NoSQL database. . . . . . . 10
Redis E-Book / Real-Time Applications Need Real-Time Data: The Importance of In-Memory NoSQL Databases © 2021 Redis
3
You read that right. The database must be so fast as to not add any delay in the
end-to-end response time to the user.
It’s real-time data that powers real-time applications such as gaming and
entertainment, online shopping, fraud detection, customer 360, personalization,
and many others. Can your current databases provide real-time data at scale or is it
time to look for a much faster alternative for your projects and applications?
Redis E-Book / Real-Time Applications Need Real-Time Data: The Importance of In-Memory NoSQL Databases © 2021 Redis
4
Chapter 1
Slow Response Is the
Top Reason Customers Leave
What’s slow and what’s fast in real life is vastly different from what people expect today in the
digital world.
Think about it: If you waited one second for coffee at Starbucks, that would be extraordinarily fast. If it took
one second to purchase a new t-shirt at your favorite retail store, that would be incredibly fast. A one-
second wait for your doctor’s appointment? That would make anyone happy.
In the digital world, waiting one second for an application to respond feels so slow. We expect digital
services to feel instantaneous and one second doesn’t even come close.
How bad is it to deliver slower than expected digital experiences? Of the top five problems that customers
encounter with digital services, slow response is the driving factor for two of them and is the number one
problem reported by customers.
Top five problems encountered with digital Consumers are not tolerant of slow
services experiences
Source: “The App Attention Index 2021,” AppDynamics Source: “The App Attention Index 2021,” AppDynamics
Redis E-Book / Real-Time Applications Need Real-Time Data: The Importance of In-Memory NoSQL Databases © 2021 Redis
5
Chapter 2
Developers’ Nemesis:
Too Much Latency and
Not Enough Throughput
While latency has always been an issue for application performance, it takes on even more importance
today when modern use cases and customer expectations demand data in real time.
2
“Milliseconds Make Millions,” Deloitte, 2020
Redis E-Book / Real-Time Applications Need Real-Time Data: The Importance of In-Memory NoSQL Databases © 2021 Redis
6
Chapter 2 In fact, the goal should be for total turnaround time to be 100 milliseconds or less. Why? Usability expert
Jakob Nielsen states that 0.1 second (100 milliseconds) is the upper limit for the user feeling that a system
is responding instantaneously. Users will perceive having a real-time experience when the end-to-end
response time is less than 100 milliseconds.
3
“Usability Engineering,” Jakob Nielsen, 1993
MOBILE DEVICE
Redis E-Book / Real-Time Applications Need Real-Time Data: The Importance of In-Memory NoSQL Databases © 2021 Redis
7
Chapter 3
One Millisecond Response–
Google ranking: 100
milliseconds or less for
Can Your Database Do That?
interactivity
Redis E-Book / Real-Time Applications Need Real-Time Data: The Importance of In-Memory NoSQL Databases © 2021 Redis
8
Chapter 3
The Components of Latency
Figure 2: In the modern
application equation,
databases have to respond in
less than 1 millisecond to give
users end-to-end real-time
responsiveness.
HUMANS APP SERVERS DATABASE
1 msec Required DB
response time
100 msec The new standard for E2E application response time, under any load
MACHINES
Redis E-Book / Real-Time Applications Need Real-Time Data: The Importance of In-Memory NoSQL Databases © 2021 Redis
9
Chapter 4
A Job for NoSQL Databases
What is a NoSQL What kind of database can deliver less than one millisecond response time? It’s certainly not a legacy
database? relational database. Raise your hand if you’ve had slow queries against relational databases dragging down
digital performance.
A NoSQL database is a
distributed, non-relational Traditional SQL/relational databases were designed for legacy data types that are highly structured and
database designed for easily organized into defined fields, columns, and tables. These types of databases don’t lend themselves to
large-scale data storage efficient or effective support of unstructured and semi-structured data relied upon by modern applications.
and for massively parallel,
high-performance data That’s why NoSQL, non-relational databases have become far more popular. In fact, thanks to a major ac-
processing using a celeration in development and expansion in the past decade or more, today NoSQL databases are the first
scaleout architecture. It choice of developers and architects for applications that require:
is a modern data storage
paradigm that provides
data persistence for
environments where high
performance is a primary
requirement. Within a
NoSQL database, data is Superior A flexible data High scalability True high Interconnectivity
stored in such a way that performance model s availability with between applications
both writing and reading upporting built-in and between
are fast, even under heavy different data replication microservices
load. types
Redis E-Book / Real-Time Applications Need Real-Time Data: The Importance of In-Memory NoSQL Databases © 2021 Redis
10
Chapter 5
A NoSQL Database in Memory?
Now That’s Real-Time Data
Even with the speed advantages of a NoSQL database, if it’s a
pure disk-based system, it can’t deliver the less than one
millisecond latency needed to meet the expectations of
instantaneous response times for customers. Advantages of an
in-memory NoSQL database
But what if you put the NoSQL database in random
access memory (RAM)? What if you had the entire Incredible speed
dataset in RAM?
Linear scalability with consistent
You’d have no more hard-disk drives that cost performance
hundreds of milliseconds or more of delay. (real-time data at scale)
Combining the benefits of NoSQL databases
with the ability to keep data in-memory gives you High availability
the less than one millisecond response time your
company needs for real-time data. Plus all the other benefits of a
NoSQL database
That’s why businesses of all kinds—financial
services, e-commerce and retail, healthcare, logistics,
entertainment and gaming, and others—are embracing in-
memory NoSQL databases to power their real-time applications,
deliver the kind of fast experience customers expect, and outperform
the competition.
Redis E-Book / Real-Time Applications Need Real-Time Data: The Importance of In-Memory NoSQL Databases © 2021 Redis
11
Chapter 6
Powered by Real-Time Data
While relational databases will certainly continue to have a place in your technology stack, usage of in-
memory NoSQL databases is growing at a faster pace. That’s because they deliver the speed at scale that’s
needed for a broad set of digital use cases.
real-time data Session management: Read and write session data at each user interaction without
slowing down the user experience.
powered by Gaming: Deliver fast performance from anywhere in the world regard
in-memory
less of the number of simultaneous players.
Leaderboards: Update, track, and calculate all the data and statistics users
NoSQL want to see on a leaderboard in real time across hundreds of
thousands or millions of users.
Real-time inventory: Survive seasonal peaks, maintain data consistency, and
deliver instantaneous results with a real-time inventory
system.
Fraud detection: Analyze transactions in real time and compare them with
geodata and previous spending patterns to rapidly identify
potential fraud without impacting the customer experience.
Claims processing: Power real-time claims inquiries, fast member lookups, auto
claims adjudication, and more in memory to deliver a great
customer experience.
Personalization: Update customer profiles in real time for dynamic pricing,
credit-risk analysis, targeted advertising, credit card
promotions, and more.
Real-time analytics: Unlock insights from large volumes of data, drive powerful
artificial intelligence applications, and respond quickly to
trends and drivers.
Redis E-Book / Real-Time Applications Need Real-Time Data: The Importance of In-Memory NoSQL Databases © 2021 Redis
12
Chapter 7
Beyond Speed and Scale:
Other Enterprise Requirements
While an in-memory NoSQL Is the in-memory NoSQL database …
database is the only way to
achieve the high throughput Capability Why this capability is important
and low latency required for
To make sure transactions that have been committed will survive permanently, your in-
real-time data, there are other
Durable? memory NoSQL database needs to be fully durable, without affecting performance even
requirements that are also
under heavy write loads. Look for support for data persistence using network-attached
important when considering
storage and mechanisms such as Append-Only File (AOF) data persistence and snapshot
a database platform for the
persistence.
enterprise.
Globally For local high throughput and low latency as well as a disaster-proof architecture, your
Here’s your checklist for an distributed? in-memory NoSQL database should support geo-distributing applications in both Active-
enterprise-ready, in-memory Active and Active-Passive replication deployments.
NoSQL database. To get the
In today’s digital world, highly available is defined as five-nines, available 99.999% of the
most from your real-time
Highly available? time. To prevent loss of data or operations, an in-memory NoSQL database needs to offer
database, it should be able to
uninterrupted high availability with diskless replication, instant failure detection, and single-
check all of these boxes.
digit-seconds failover across racks, zones, and geographies.
Supporting different real-time data use cases requires a variety of ways to model the data.
Flexible to support To minimize any impact on performance, throughput, and latency, your in-memory NoSQL
a variety of data database should support multiple data types and models—such as Strings, Hashes, Lists,
models? Sets, Sorted Sets, Bitmaps, Bitfields, HyperLogLog, Geospatial indexes, and Streams—in a
single platform.
Flexible in its Flexibility also applies to deployment, with support for any cloud platform, on premises, as
deployment model? well as multi-cloud and hybrid architectures.
Every database platform should offer robust, multi-layer security and compliance
Secure? safeguards, including role-based access control, authentication, authorization, and
encryption of data in flight and at rest.
Redis E-Book / Real-Time Applications Need Real-Time Data: The Importance of In-Memory NoSQL Databases © 2021 Redis
13
Chapter 8
Customer Engagement
at Real-Time Speed
“We have access to A leader in customer engagement software, Freshworks offers a suite of cloud-based business products. Its
the highest in-memory flagship offering Freshdesk is used by more than 50,000 organizations worldwide, including Bridgestone,
performance available on NYU, and American Express. The company’s initial public offering saw the company value reach $12 billion.
the market today, flexible
data structures for extreme Freshworks has seen impressive year-over-year growth, with more than $300 million in annual recurring
efficiency across a wide revenue. This extraordinary growth, spurred by the rapid adoption of Freshdesk and the addition of seven
variety of use cases, and other new products, strained the capabilities of the company’s application architecture and development
fully managed operations operations and led it to adopt Redis Enterprise Cloud, a fully managed in-memory NoSQL database.
that speed up—rather than
slow down—application
delivery.” Today, Freshworks relies on Redis Enterprise to support many different
use cases, including:
— Naren Janakiraman,
Director of Engineering,
• Caching: Provides a front-end cache for Freshworks’ MySQL database
Freshworks
• Metering: Meters API requests coming into Freshdesk for rate-limiting
purposes
Redis E-Book / Real-Time Applications Need Real-Time Data: The Importance of In-Memory NoSQL Databases © 2021 Redis
14
Chapter 9
The Last Word
Choosing a new database is not a trivial exercise—nor should it be. With all the choices available, it can feel
overwhelming.
However, given the state of customer expectations today and the knowledge that they’ll continue to rise
even higher, the choice of database has never been more important.
Before you begin your next project, think about the throughput and latency requirements. What would real-
time response mean for your application? For your customers? For your business?
Then learn more about in-memory NoSQL database platforms by starting with these resources:
Redis E-Book / Real-Time Applications Need Real-Time Data: The Importance of In-Memory NoSQL Databases © 2021 Redis
15
Chapter 10
The World’s Most Loved
NoSQL Real-Time Database
Redis Enterprise is a robust in-memory NoSQL database platform built by the people who develop open
source Redis. It maintains the simplicity and high performance of Redis, while adding many enterprise-
grade capabilities, such as linear scaling to hundreds of millions of operations per second, Active-Active
geo-replication with local high throughput and low latency, Redis on Flash to tier data across dynamic and
persistent memory and solid-state disk (SSD) to reduce total cost of ownership, and five-nines (99.999%)
uptime based on built-in durability and single-digit-seconds failover.
Redis Enterprise supports many data modeling methods with modules such as RediSearch, RedisJSON,
RedisGraph, RedisTimeSeries, RedisBloom, and RedisAI, and allows operations to be executed across and
between modules and core Redis functionality using RedisGears, a serverless engine that runs across
shards and nodes of Redis Enterprise cluster. All this while keeping database latency under one millisecond,
so your application can respond in real time.
Redis E-Book / Real-Time Applications Need Real-Time Data: The Importance of In-Memory NoSQL Databases © 2021 Redis
About Redis