SlideShare a Scribd company logo
1 of 24
Redis cache
Redis is a in-memory, key-value data store. it’s
the most popular key-value data store, used by all
big IT brands in this world. Amazon Elastic Cache
supports Redis which makes redis a very powerful
and must know key-value data store.
What Is In-Memory, Key-
Value Store
Key-Value store is a storage system where data is
stored in form of key and value pairs. When we
say in-memory key-value store, by that we mean
that the key-value pairs are stored in primary
memory(RAM). So we can say that Redis stored
data in RAM in form of key-value pairs.
In Redis, key has to be a string but value can be a
string, list, set, sorted set or hash.
What Is In-Memory, Key-
Value Store
Lists: collections of string elements sorted
according to the order of insertion. They are
basically linked lists.
Sets: collections of unique, unsorted string
elements.
What Is In-Memory, Key-
Value Store
Sorted sets, similar to Sets but where every string
element is associated to a floating number value,
called score. The elements are always taken
sorted by their score, so unlike Sets it is possible
to retrieve a range of elements (for example you
may ask: give me the top 10, or the bottom 10).
Hashes, which are maps composed of fields
associated with values. Both the field and the
value are strings. This is very similar to Ruby or
Python hashes
Advantage And Disadvantage
of Redis over DBMS
Database Management systems store everything
in second storage which makes read and write
operations very slow. But Redis stores everything
in primary memory which is very fast in read and
write of data.
Advantage And Disadvantage
of Redis over DBMS
Exceptionally fast − Redis is very fast and can
perform about 110000 SETs per second, about
81000 GETs per second.
Supports rich data types − Redis natively supports
most of the datatypes that developers already
know such as list, set, sorted set, and hashes.
This makes it easy to solve a variety of problems
as we know which problem can be handled better
by which data type.
Advantage And Disadvantage
of Redis over DBMS
Operations are atomic − All Redis operations are
atomic, which ensures that if two clients
concurrently access, Redis server will receive the
updated value.
Multi-utility tool − Redis is a multi-utility tool and
can be used in a number of use cases such as
caching, messaging-queues (Redis natively
supports Publish/Subscribe), any short-lived data
in your application, such as web application
sessions, web page hit counts, etc.
Advantage And Disadvantage
of Redis over DBMS
Primary memory is limited(much lesser size and
expensive than secondary) therefore Redis
cannot store large files or binary data. It can only
store those small textual information which needs
to be accessed, modified and inserted at a very
fast rate.
Redis Single Instance
Architecture
Redis architecture contains two main processes:
Redis client and Redis Server.
Redis Single Instance
Architecture
Redis client and server can be in the same
computer or in two different computers.
Redis server is responsible for storing data in
memory. It handles all kinds of management and
forms the major part of architecture. Redis client
can be Redis console client or any other
programming language’s Redis API.
Redis Single Instance
Architecture
As we saw that Redis stores everything in primary
memory. Primary memory is volatile and therefore
we will loose all stored data once we restart our
Redis server or computer. Therefore we need a
way for datastore persistance.
Redis Persistance
There are two different ways to make Redis
persistance: RDB and AOF .
Redis Persistance
RDB Mechanism
RDB makes a copy of all the data in memory and
stores them in secondary storage(permanent
storage). This happens in a specified interval. So
there is chance that you will loose data that are
set after RDB’s last snapshot.
Redis Persistance
AOF
AOF logs all the write operations received by the
server. Therefore everything is persistance. The
problem with using AOF is that it writes to disk for
every operation and it is a expensive task and
also size of AOF file is large than RDB file.
Redis Persistance
You can use AOF and RDB together to get best
persistance result.
Backup And Recovery Of
Redis DataStore
Redis does not provide any mechanism for
datastore backup and recovery. Therefore if there
is any hard disk crash or any other kind of
disaster then all data will be lost. You need to use
some third party server backup and recovery
softwares to workaround it.
If you are using Redis in a replicated environment
then there is no need for backup.
Redis commands (SET)
SET supports a set of options that modify its
behavior:
1- EX seconds -- Set the specified expire time, in seconds
Ex ( SETEX mykey 10 "Hello").
2- PX milliseconds -- Set the specified expire time, in milliseconds.
3- NX -- Only set the key if it does not already exist.
Redis commands (GET)
Get the value of key. If the key does not exist the
special value nil is returned. An error is returned if
the value stored at key is not a string, because
GET only handles string values.
Redis commands (DEL)
Removes the specified keys. A key is ignored if it
does not exist.
Sets commands
1- SADD : Add the specified members to the set
stored at key
2- SMEMBERS : Returns all the members of the
set value stored at key.
3- SCARD : Returns the set cardinality (number of
elements) of the set stored at key.
4- SDIFF : Returns the members of the set
resulting from the difference between the first set
and all the successive sets.
Hash commands
HSET : Sets field in the hash stored at key to
value. If key does not exist, a new key holding a
hash is created. If field already exists in the hash,
it is overwritten.
ex : HSET myhash field1 "Hello"
HDEL : Removes the specified fields from the
hash stored at key.
ex : HDEL myhash field1
Hash commands
HGET : Returns the value associated with field in
the hash stored at key.
Ex : HGET myhash field1
HGETALL : Returns all fields and values of the
hash stored at key. In the returned value, every
field name is followed by its value, so the length of
the reply is twice the size of the hash.
Ex :HGETALL myhash
Who's using Redis?
Twitter GitHub Weibo Pinterest Snapchat
Craigslist Digg StackOverflow Flickr
Good bay
Created by : Ahmad EL-Khuja
Akhuja@bayt.net

More Related Content

What's hot

Redis in Practice
Redis in PracticeRedis in Practice
Redis in PracticeNoah Davis
 
Redis Introduction
Redis IntroductionRedis Introduction
Redis IntroductionAlex Su
 
An Introduction to REDIS NoSQL database
An Introduction to REDIS NoSQL databaseAn Introduction to REDIS NoSQL database
An Introduction to REDIS NoSQL databaseAli MasudianPour
 
Caching solutions with Redis
Caching solutions   with RedisCaching solutions   with Redis
Caching solutions with RedisGeorge Platon
 
Redis and its Scaling and Obersvability
Redis and its Scaling and ObersvabilityRedis and its Scaling and Obersvability
Redis and its Scaling and ObersvabilityAbhishekDubey902839
 
HBase Application Performance Improvement
HBase Application Performance ImprovementHBase Application Performance Improvement
HBase Application Performance ImprovementBiju Nair
 
Delta Lake Cheat Sheet.pdf
Delta Lake Cheat Sheet.pdfDelta Lake Cheat Sheet.pdf
Delta Lake Cheat Sheet.pdfkaransharma62792
 
Everything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to askEverything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to askCarlos Abalde
 
An overview of Neo4j Internals
An overview of Neo4j InternalsAn overview of Neo4j Internals
An overview of Neo4j InternalsTobias Lindaaker
 
Mongodb basics and architecture
Mongodb basics and architectureMongodb basics and architecture
Mongodb basics and architectureBishal Khanal
 
Hadoop hive presentation
Hadoop hive presentationHadoop hive presentation
Hadoop hive presentationArvind Kumar
 
Your first ClickHouse data warehouse
Your first ClickHouse data warehouseYour first ClickHouse data warehouse
Your first ClickHouse data warehouseAltinity Ltd
 
Paris Redis Meetup Introduction
Paris Redis Meetup IntroductionParis Redis Meetup Introduction
Paris Redis Meetup IntroductionGregory Boissinot
 

What's hot (20)

Redis in Practice
Redis in PracticeRedis in Practice
Redis in Practice
 
Redis Introduction
Redis IntroductionRedis Introduction
Redis Introduction
 
An Introduction to REDIS NoSQL database
An Introduction to REDIS NoSQL databaseAn Introduction to REDIS NoSQL database
An Introduction to REDIS NoSQL database
 
Redis introduction
Redis introductionRedis introduction
Redis introduction
 
Introduction to redis
Introduction to redisIntroduction to redis
Introduction to redis
 
Caching solutions with Redis
Caching solutions   with RedisCaching solutions   with Redis
Caching solutions with Redis
 
Redis Persistence
Redis  PersistenceRedis  Persistence
Redis Persistence
 
Kudu Deep-Dive
Kudu Deep-DiveKudu Deep-Dive
Kudu Deep-Dive
 
Redis and its Scaling and Obersvability
Redis and its Scaling and ObersvabilityRedis and its Scaling and Obersvability
Redis and its Scaling and Obersvability
 
HBase Application Performance Improvement
HBase Application Performance ImprovementHBase Application Performance Improvement
HBase Application Performance Improvement
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Delta Lake Cheat Sheet.pdf
Delta Lake Cheat Sheet.pdfDelta Lake Cheat Sheet.pdf
Delta Lake Cheat Sheet.pdf
 
Redis database
Redis databaseRedis database
Redis database
 
Everything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to askEverything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to ask
 
An overview of Neo4j Internals
An overview of Neo4j InternalsAn overview of Neo4j Internals
An overview of Neo4j Internals
 
Mongodb basics and architecture
Mongodb basics and architectureMongodb basics and architecture
Mongodb basics and architecture
 
Hadoop hive presentation
Hadoop hive presentationHadoop hive presentation
Hadoop hive presentation
 
Your first ClickHouse data warehouse
Your first ClickHouse data warehouseYour first ClickHouse data warehouse
Your first ClickHouse data warehouse
 
Paris Redis Meetup Introduction
Paris Redis Meetup IntroductionParis Redis Meetup Introduction
Paris Redis Meetup Introduction
 
Apache Hive
Apache HiveApache Hive
Apache Hive
 

Viewers also liked

An Updated Performance Comparison of Virtual Machines and Linux Containers
An Updated Performance Comparison of Virtual Machines and Linux ContainersAn Updated Performance Comparison of Virtual Machines and Linux Containers
An Updated Performance Comparison of Virtual Machines and Linux ContainersKento Aoyama
 
O uso do computador na educação
O uso do computador na educaçãoO uso do computador na educação
O uso do computador na educaçãoRafael Nogueira
 
Університетське містечко ЗНУ: подорож крізь десятиліття
Університетське містечко ЗНУ: подорож крізь десятиліттяУніверситетське містечко ЗНУ: подорож крізь десятиліття
Університетське містечко ЗНУ: подорож крізь десятиліттяОлена Семенець
 
Demystifying datastores
Demystifying datastoresDemystifying datastores
Demystifying datastoresvishnu rao
 
Introduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actorsIntroduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actorsdatamantra
 
Golang 101 (Concurrency vs Parallelism)
Golang 101 (Concurrency vs Parallelism)Golang 101 (Concurrency vs Parallelism)
Golang 101 (Concurrency vs Parallelism)Pramesti Hatta K.
 
Modèles de données types pour l'interopérabilité des systèmes de gestion acti...
Modèles de données types pour l'interopérabilité des systèmes de gestion acti...Modèles de données types pour l'interopérabilité des systèmes de gestion acti...
Modèles de données types pour l'interopérabilité des systèmes de gestion acti...Javier Caballero
 
Security Monitoring with eBPF
Security Monitoring with eBPFSecurity Monitoring with eBPF
Security Monitoring with eBPFAlex Maestretti
 
Introduction of Mesosphere DCOS
Introduction of Mesosphere DCOSIntroduction of Mesosphere DCOS
Introduction of Mesosphere DCOSDeughyeon Chang
 
Valeria Ramos
Valeria RamosValeria Ramos
Valeria RamosValejrd
 
Сергей Радзыняк ".NET Microservices in Real Life"
Сергей Радзыняк ".NET Microservices in Real Life"Сергей Радзыняк ".NET Microservices in Real Life"
Сергей Радзыняк ".NET Microservices in Real Life"Fwdays
 
CloudConf2017 - Deploy, Scale & Coordinate a microservice oriented application
CloudConf2017 - Deploy, Scale & Coordinate a microservice oriented applicationCloudConf2017 - Deploy, Scale & Coordinate a microservice oriented application
CloudConf2017 - Deploy, Scale & Coordinate a microservice oriented applicationCorley S.r.l.
 
Introduction To Anypoint CloudHub With Mulesoft
Introduction To Anypoint CloudHub With MulesoftIntroduction To Anypoint CloudHub With Mulesoft
Introduction To Anypoint CloudHub With MulesoftJitendra Bafna
 
Redis原生命令介绍
Redis原生命令介绍Redis原生命令介绍
Redis原生命令介绍Edward Lee
 
Инновационный опыт работы центра медико-психолого-социального сопровождения с...
Инновационный опыт работы центра медико-психолого-социального сопровождения с...Инновационный опыт работы центра медико-психолого-социального сопровождения с...
Инновационный опыт работы центра медико-психолого-социального сопровождения с...Parusnik55
 

Viewers also liked (20)

An Updated Performance Comparison of Virtual Machines and Linux Containers
An Updated Performance Comparison of Virtual Machines and Linux ContainersAn Updated Performance Comparison of Virtual Machines and Linux Containers
An Updated Performance Comparison of Virtual Machines and Linux Containers
 
Sensu Monitoring
Sensu MonitoringSensu Monitoring
Sensu Monitoring
 
O uso do computador na educação
O uso do computador na educaçãoO uso do computador na educação
O uso do computador na educação
 
Introducción a la P.O.O.
Introducción a la P.O.O.Introducción a la P.O.O.
Introducción a la P.O.O.
 
Університетське містечко ЗНУ: подорож крізь десятиліття
Університетське містечко ЗНУ: подорож крізь десятиліттяУніверситетське містечко ЗНУ: подорож крізь десятиліття
Університетське містечко ЗНУ: подорож крізь десятиліття
 
ERADA M3 S1 - Business Model Design
ERADA M3 S1 - Business Model DesignERADA M3 S1 - Business Model Design
ERADA M3 S1 - Business Model Design
 
Demystifying datastores
Demystifying datastoresDemystifying datastores
Demystifying datastores
 
Introduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actorsIntroduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actors
 
Seo
SeoSeo
Seo
 
Golang 101 (Concurrency vs Parallelism)
Golang 101 (Concurrency vs Parallelism)Golang 101 (Concurrency vs Parallelism)
Golang 101 (Concurrency vs Parallelism)
 
Modèles de données types pour l'interopérabilité des systèmes de gestion acti...
Modèles de données types pour l'interopérabilité des systèmes de gestion acti...Modèles de données types pour l'interopérabilité des systèmes de gestion acti...
Modèles de données types pour l'interopérabilité des systèmes de gestion acti...
 
Security Monitoring with eBPF
Security Monitoring with eBPFSecurity Monitoring with eBPF
Security Monitoring with eBPF
 
Introduction of Mesosphere DCOS
Introduction of Mesosphere DCOSIntroduction of Mesosphere DCOS
Introduction of Mesosphere DCOS
 
Valeria Ramos
Valeria RamosValeria Ramos
Valeria Ramos
 
Сергей Радзыняк ".NET Microservices in Real Life"
Сергей Радзыняк ".NET Microservices in Real Life"Сергей Радзыняк ".NET Microservices in Real Life"
Сергей Радзыняк ".NET Microservices in Real Life"
 
CloudConf2017 - Deploy, Scale & Coordinate a microservice oriented application
CloudConf2017 - Deploy, Scale & Coordinate a microservice oriented applicationCloudConf2017 - Deploy, Scale & Coordinate a microservice oriented application
CloudConf2017 - Deploy, Scale & Coordinate a microservice oriented application
 
Introduction To Anypoint CloudHub With Mulesoft
Introduction To Anypoint CloudHub With MulesoftIntroduction To Anypoint CloudHub With Mulesoft
Introduction To Anypoint CloudHub With Mulesoft
 
Redis原生命令介绍
Redis原生命令介绍Redis原生命令介绍
Redis原生命令介绍
 
A evolução do açúcar.
A evolução do açúcar.A evolução do açúcar.
A evolução do açúcar.
 
Инновационный опыт работы центра медико-психолого-социального сопровождения с...
Инновационный опыт работы центра медико-психолого-социального сопровождения с...Инновационный опыт работы центра медико-психолого-социального сопровождения с...
Инновационный опыт работы центра медико-психолого-социального сопровождения с...
 

Similar to Redis overview

Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to RedisItamar Haber
 
Beyond relational database - Building high performance websites using Redis a...
Beyond relational database - Building high performance websites using Redis a...Beyond relational database - Building high performance websites using Redis a...
Beyond relational database - Building high performance websites using Redis a...Dinh Pham
 
#SydPHP - The Magic of Redis
#SydPHP - The Magic of Redis#SydPHP - The Magic of Redis
#SydPHP - The Magic of RedisAaron Weatherall
 
Fun with Ruby and Redis
Fun with Ruby and RedisFun with Ruby and Redis
Fun with Ruby and Redisjavier ramirez
 
Introduction to hadoop ecosystem
Introduction to hadoop ecosystem Introduction to hadoop ecosystem
Introduction to hadoop ecosystem Rupak Roy
 
Redis data structure and Performance Optimization
Redis data structure and Performance OptimizationRedis data structure and Performance Optimization
Redis data structure and Performance OptimizationKnoldus Inc.
 
2_Redis.pptx very useful for begginers yes
2_Redis.pptx very useful for begginers yes2_Redis.pptx very useful for begginers yes
2_Redis.pptx very useful for begginers yessoufianbouktaib1
 
Big Data and Hadoop
Big Data and HadoopBig Data and Hadoop
Big Data and HadoopMr. Ankit
 
mar07-redis.pdf
mar07-redis.pdfmar07-redis.pdf
mar07-redis.pdfAnisSalhi3
 
Hadoop File system (HDFS)
Hadoop File system (HDFS)Hadoop File system (HDFS)
Hadoop File system (HDFS)Prashant Gupta
 
Various raid levels pros & cons
Various raid levels pros & consVarious raid levels pros & cons
Various raid levels pros & consIT Tech
 
Hadoop file system
Hadoop file systemHadoop file system
Hadoop file systemJohn Veigas
 

Similar to Redis overview (20)

redis-demo.pptx
redis-demo.pptxredis-demo.pptx
redis-demo.pptx
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Redis overview
Redis overviewRedis overview
Redis overview
 
Beyond relational database - Building high performance websites using Redis a...
Beyond relational database - Building high performance websites using Redis a...Beyond relational database - Building high performance websites using Redis a...
Beyond relational database - Building high performance websites using Redis a...
 
Redis vs Memcached
Redis vs MemcachedRedis vs Memcached
Redis vs Memcached
 
#SydPHP - The Magic of Redis
#SydPHP - The Magic of Redis#SydPHP - The Magic of Redis
#SydPHP - The Magic of Redis
 
Fun with Ruby and Redis
Fun with Ruby and RedisFun with Ruby and Redis
Fun with Ruby and Redis
 
Redis meetup
Redis meetupRedis meetup
Redis meetup
 
Introduction to hadoop ecosystem
Introduction to hadoop ecosystem Introduction to hadoop ecosystem
Introduction to hadoop ecosystem
 
Redis data structure and Performance Optimization
Redis data structure and Performance OptimizationRedis data structure and Performance Optimization
Redis data structure and Performance Optimization
 
Nextag talk
Nextag talkNextag talk
Nextag talk
 
2_Redis.pptx very useful for begginers yes
2_Redis.pptx very useful for begginers yes2_Redis.pptx very useful for begginers yes
2_Redis.pptx very useful for begginers yes
 
Big Data and Hadoop
Big Data and HadoopBig Data and Hadoop
Big Data and Hadoop
 
mar07-redis.pdf
mar07-redis.pdfmar07-redis.pdf
mar07-redis.pdf
 
Hadoop File system (HDFS)
Hadoop File system (HDFS)Hadoop File system (HDFS)
Hadoop File system (HDFS)
 
Redis and Ohm
Redis and OhmRedis and Ohm
Redis and Ohm
 
Various raid levels pros & cons
Various raid levels pros & consVarious raid levels pros & cons
Various raid levels pros & cons
 
Data storage and indexing
Data storage and indexingData storage and indexing
Data storage and indexing
 
Big Data & Hadoop
Big Data & HadoopBig Data & Hadoop
Big Data & Hadoop
 
Hadoop file system
Hadoop file systemHadoop file system
Hadoop file system
 

Recently uploaded

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Recently uploaded (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

Redis overview

  • 1. Redis cache Redis is a in-memory, key-value data store. it’s the most popular key-value data store, used by all big IT brands in this world. Amazon Elastic Cache supports Redis which makes redis a very powerful and must know key-value data store.
  • 2. What Is In-Memory, Key- Value Store Key-Value store is a storage system where data is stored in form of key and value pairs. When we say in-memory key-value store, by that we mean that the key-value pairs are stored in primary memory(RAM). So we can say that Redis stored data in RAM in form of key-value pairs. In Redis, key has to be a string but value can be a string, list, set, sorted set or hash.
  • 3. What Is In-Memory, Key- Value Store Lists: collections of string elements sorted according to the order of insertion. They are basically linked lists. Sets: collections of unique, unsorted string elements.
  • 4. What Is In-Memory, Key- Value Store Sorted sets, similar to Sets but where every string element is associated to a floating number value, called score. The elements are always taken sorted by their score, so unlike Sets it is possible to retrieve a range of elements (for example you may ask: give me the top 10, or the bottom 10). Hashes, which are maps composed of fields associated with values. Both the field and the value are strings. This is very similar to Ruby or Python hashes
  • 5. Advantage And Disadvantage of Redis over DBMS Database Management systems store everything in second storage which makes read and write operations very slow. But Redis stores everything in primary memory which is very fast in read and write of data.
  • 6. Advantage And Disadvantage of Redis over DBMS Exceptionally fast − Redis is very fast and can perform about 110000 SETs per second, about 81000 GETs per second. Supports rich data types − Redis natively supports most of the datatypes that developers already know such as list, set, sorted set, and hashes. This makes it easy to solve a variety of problems as we know which problem can be handled better by which data type.
  • 7. Advantage And Disadvantage of Redis over DBMS Operations are atomic − All Redis operations are atomic, which ensures that if two clients concurrently access, Redis server will receive the updated value. Multi-utility tool − Redis is a multi-utility tool and can be used in a number of use cases such as caching, messaging-queues (Redis natively supports Publish/Subscribe), any short-lived data in your application, such as web application sessions, web page hit counts, etc.
  • 8. Advantage And Disadvantage of Redis over DBMS Primary memory is limited(much lesser size and expensive than secondary) therefore Redis cannot store large files or binary data. It can only store those small textual information which needs to be accessed, modified and inserted at a very fast rate.
  • 9. Redis Single Instance Architecture Redis architecture contains two main processes: Redis client and Redis Server.
  • 10. Redis Single Instance Architecture Redis client and server can be in the same computer or in two different computers. Redis server is responsible for storing data in memory. It handles all kinds of management and forms the major part of architecture. Redis client can be Redis console client or any other programming language’s Redis API.
  • 11. Redis Single Instance Architecture As we saw that Redis stores everything in primary memory. Primary memory is volatile and therefore we will loose all stored data once we restart our Redis server or computer. Therefore we need a way for datastore persistance.
  • 12. Redis Persistance There are two different ways to make Redis persistance: RDB and AOF .
  • 13. Redis Persistance RDB Mechanism RDB makes a copy of all the data in memory and stores them in secondary storage(permanent storage). This happens in a specified interval. So there is chance that you will loose data that are set after RDB’s last snapshot.
  • 14. Redis Persistance AOF AOF logs all the write operations received by the server. Therefore everything is persistance. The problem with using AOF is that it writes to disk for every operation and it is a expensive task and also size of AOF file is large than RDB file.
  • 15. Redis Persistance You can use AOF and RDB together to get best persistance result.
  • 16. Backup And Recovery Of Redis DataStore Redis does not provide any mechanism for datastore backup and recovery. Therefore if there is any hard disk crash or any other kind of disaster then all data will be lost. You need to use some third party server backup and recovery softwares to workaround it. If you are using Redis in a replicated environment then there is no need for backup.
  • 17. Redis commands (SET) SET supports a set of options that modify its behavior: 1- EX seconds -- Set the specified expire time, in seconds Ex ( SETEX mykey 10 "Hello"). 2- PX milliseconds -- Set the specified expire time, in milliseconds. 3- NX -- Only set the key if it does not already exist.
  • 18. Redis commands (GET) Get the value of key. If the key does not exist the special value nil is returned. An error is returned if the value stored at key is not a string, because GET only handles string values.
  • 19. Redis commands (DEL) Removes the specified keys. A key is ignored if it does not exist.
  • 20. Sets commands 1- SADD : Add the specified members to the set stored at key 2- SMEMBERS : Returns all the members of the set value stored at key. 3- SCARD : Returns the set cardinality (number of elements) of the set stored at key. 4- SDIFF : Returns the members of the set resulting from the difference between the first set and all the successive sets.
  • 21. Hash commands HSET : Sets field in the hash stored at key to value. If key does not exist, a new key holding a hash is created. If field already exists in the hash, it is overwritten. ex : HSET myhash field1 "Hello" HDEL : Removes the specified fields from the hash stored at key. ex : HDEL myhash field1
  • 22. Hash commands HGET : Returns the value associated with field in the hash stored at key. Ex : HGET myhash field1 HGETALL : Returns all fields and values of the hash stored at key. In the returned value, every field name is followed by its value, so the length of the reply is twice the size of the hash. Ex :HGETALL myhash
  • 23. Who's using Redis? Twitter GitHub Weibo Pinterest Snapchat Craigslist Digg StackOverflow Flickr
  • 24. Good bay Created by : Ahmad EL-Khuja Akhuja@bayt.net