Redis and Redis Sentinel Crash Course - Redis Commands and High Availability tutorial

preview_player
Показать описание
In This tutorial we will talk about Redis and Sentinel high availability. you will have it in 2 parts. Part 1 will all theoretical and the second will have our hands dirty with the code :D have fun!.

Part 1
- 00:52: What is Redis?
- 01:42: Redis use cases
- 02:02: Who using Redis in Production?
- 02:50: Redis Sentinel
Part 2
- 04:25: Redis Installation
- 09:30: Redis Important Comands / Strings
- INFO: Return informations and statistics about the server in a format that is simple to parse by computers and easy to read by humans
- KEYS: Returns all keys matching pattern
- SET: Add/update a record
- GET: Gets a single record
- EXISTS: Returns if a record exists or not (0 or 1)
- EXPIRE: Set a timeout on a key. After the timeout has expired, the key will automatically be deleted
- TTL: Returns the remaining time to live of a key that has a timeout
- SETEX: Equivalent to executing SET and EXPIRE
- SETNX: Set a single record if not exists
- INCR: Increment a number by 1
- INCRBY: Increment by a different number
- DECR: Decrement by 1
- DECRBY: Decrement by a different number
- APPEND: Appends the value at the end of a string
- MGET: Gets multiple records
- MSET: Sets multiple record
- DEL: Delete one or multiple records
- 19:15: Redis Important Comands / Hashes
- HSET: Sets field in the hash stored at key to value
- HGET: Returns the value associated with field in the hash stored at key.
- HMGET: Returns the multiple values associated with field in the hash stored at key.
- HMSET: Sets multiple values associated with field in the hash stored at key.
- HGETALL: Returns all fields and values of the hash stored at key
- HINCRBY: Increment by a different number
- HDECRBY: Decrement by a different number
- 24:05: Redis Important Comands / Sets
- SADD: Add the specified members to the set stored at key. Specified members that are already a member of this set are ignored
- SMEMBERS: Returns all the members of the set
- SCARD: Returns the set cardinality (number of elements)
- SISMEMBER: Returns if member is a member of the set stored at key.
- SREM: Remove the specified members from the set stored at key
- 25:58: Redis Important Comands / Sorted Sets
- ZADD: Adds specified members with the specified scores to the sorted set
- ZRANGE: Returns the specified range of elements in the sorted set stored at key. The elements are considered to be ordered from the lowest to the highest score
- ZREM: Removes the specified members from the sorted set stored at key. Non existing members are ignored.
- ZSCORE: Returns the score of member in the sorted set at key.
- 27:54: Redis Important Comands / Pub-Sub
- PUBLISH: Posts a message to the given channel.
- SUBSCRIBE: Subscribes the client to the specified channels.
- 30:06: Redis Important Comands / Transactions
- MULTI: Marks the start of a transaction block. Subsequent commands will be queued for atomic execution using EXEC.
- EXEC: Executes all previously queued commands in a transaction.
- DISCARD: Flushes all previously queued commands in a transaction.
- 31:50: Redis Important Comands / Connection
- AUTH: Request for authentication in a password-protected Redis server.
- PING: used to test if a connection is still alive, or to measure latency. Returns PONG if no argument is provided, otherwise return a copy of the argument as a bulk.
- SELECT: Selectable Redis databases are a form of namespacing.
- 34:46: Slave Master configuration
- 39:49: Sentinel Configuration and Failover test
Рекомендации по теме
Комментарии
Автор

Thank you for this video. Lays out Sentinel on Docker better than any other tutorial I have seen. Great!!

jeff
Автор

This Crash course is very nice, please post more like this video about the architecture of sentinel, etc.

kharthigeyan
Автор

This is the best tutorial available for redis in youtube. Everything is very clear and very useful. Thanks!

poshan-nandam
Автор

Perfect! Straith to the point easily understandable demo. Thanks for sharing, it's awesome.

motarski
Автор

update ... in case slave can not connect to master due to protected issue - update this in both .conf
"protected-mode no"

AkshayGupta-ddht
Автор

Very very useful, thank you so much 4 sharing your know-how with us!!

riccardomarzo
Автор

This was very useful for me. Thank you!

Universe_Stormer
Автор

Greate video. Can I ask what is your terminal or OS you using in the video?

haiduongcong
Автор

Great tutorial, one question though, I followed the tutorial step by step and getting error: Can't resolve instance hostname for Redis Sentinel, any thoughts ?

*** FATAL CONFIG FILE ERROR (Redis 6.2.3) ***
redis-sentinelOne | Reading the configuration file, at line 84
redis-sentinelOne | >>> 'sentinel monitor mymaster redis-master 6379 1'
redis-sentinelOne | Can't resolve instance hostname.

holyquraan
Автор

nice tut question here, what if the master and slave is on a different server, if the master goes down, how does the slave become master gets its data from>?

jasonshen
Автор

I need some help setting up sentinel in master slave setup with 1 master and 2 slaves . After failover the resurrected master is not getting placed into master slave setup unless sentinel is restarted

varunbhardwaj
Автор

Thank you for sharing this tutorial but i have permission issue

wryamhamad
Автор

I have a question. I did this in a remote server but when I want to access it from my laptop It tells me "Reset by Peer" Do you know why ?

marianogastaldi
Автор

Hello, How can i fix the problem : data on master is not appearing in slave I followed your tutorial i'm on 38:12 of the video

jadewensylfariscal
Автор

we ain't seeing a damn thing, you need to redo the recording.. zoom in the text..

kapssul