Redis is a popular choice for a key-value store for backend applications. This can be used for a multitude of different reasons, such as caching with automatic expiration, rate limiting based on ip address, leaderboards, pub/sub and much more. Its performance characteristics make it a fantastic choice for queuing systems, which we'll cover soon. In this episode we will set up a redis server in our docker compose file, then integrate it into our Vapor application with a simple middleware to count the number of requests to a given path.
Links Redis - The official homepage, docs, etc. Valkey - A new fork of redis that is gaining traction and is backed by Amazon, Google Cloud, Oracle, and others.