Skip to content
Menu
myCloud myCloud

Personal short notes about Cloud

  • XMPie
  • AWS
    • AWS Topics
    • AWS Architecture
    • AWS CLI
    • AWS Health
    • AWS Policies
    • AWS Cost
  • CHEAT SHEETS
myCloud myCloud

Personal short notes about Cloud

redis 1

By mikado on February 25, 2023February 25, 2023

open source, in-memory data structure store used as:

  • Database
  • Cache
  • Message broker

Data structures

  • strings
  • Hashes
  • Lists
  • Sets
  • Sorted Sets
  • Bitmaps
  • Heperloglogs
  • Geospatial indexes

Redis has built-in

  • replication
  • Lua scripting
  • LRU eviction
  • HA via Redis Sentinel
  • Automatic partitioning with Redis Cluster

Pub/Sub

Docker image

docker network create redis
docker run -it --rm --name redis --net redis -p 6379:6379 redis:7.0-alpine

Launch with your own configuration

  • Check the self documented redis.conf
  • Create /config/redis.conf in the redis project
cd ./redis
docker run -it --rm --name redis --net redis -v ${PWD}/config:/etc/redis/ redis:7.0-alpine redis-server /etc/redis/redis.conf

Security

  • Check the redis.conf for:

requirepass

Persistence

RDB – Redis Database

  • Point in time snapshots of dataset at specified intervals
  • To enable RDB mode in redis.conf:

dbfilename dump.rdb

AOF – Append Only File

  • logs every WRITE operations received by the server
  • reconstructing original dataset by ops replayed at server startup
  • To enable Append Only mode in redis.conf:

appendonly yes

appendfilename “appendonly.aof”

  • Recommended to use both
docker volume create redis
cd ./redis/
docker run -it --rm --name redis --net redis -v ${PWD}/config:/etc/redis/ -v redis:/data/  redis:7.0-alpine redis-server /etc/redis/redis.conf

Category: AWS

Categories

  • AWS (4)
  • AWS Architecture (8)
  • AWS CLI (5)
  • AWS Cost (3)
  • AWS Health (4)
  • AWS Policies (2)
  • AWS Topics (24)
  • CHEAT SHEETS (16)
  • Container (21)
  • Datadog (4)
  • Jenkins (2)
  • Linux (9)
  • Microsoft (7)
  • Python (1)
  • SCRIPTS (9)
  • Terraform (5)
  • XMPie (6)
©2025 myCloud
Click to Copy