Running Redis using Compose
Our main application is set up. For simplicity purposes, instead of storing the tasks in a database, we used an in-memory map. This works well for prototyping; however, our data and tasks remain only in one process. In the case of spinning up two instances of our application, each instance will contain different tasks.
To tackle this, we will store the data in a database. This way, the data will be kept in one place and there will not be any differences in the tasks served by various instances. Redis will be our choice for storing the data.
Redis is a popular in-memory data structure storage. It’s widely used as a cache, and all major cloud providers use it as a caching offering. Components such as ElastiCache in Amazon Web Services (https://aws.amazon.com/elasticache) or Memorystore in Google Cloud Platform (https://cloud.google.com/memorystore) have the option of using Redis. Also, Redis can be used for database purposes. Furthermore, it...