When writing microservices, you may sometimes need a data store that can keep values by keys; for example, if you want to store session, you can store a protected identifier of the session and keep additional information about users in a persistent cache. It's not a problem if a session's data is lost; on the contrary, it is a best practice to clean sessions periodically in case a user's session identifier is stolen.
Redis is a popular in-memory data structure store for this use case. It can be used as a database, as a message broker, or as a cache. In the following section, we will run a Redis instance with Docker and create a command-line tool that helps manage a users' sessions in Redis.