The 3 are different things that can be understood as a pool of solutions that used together can solve architecture and scalability problems for applications that need a great performance (when they have many simultaneous accesses, constant search, Realtime, etc).
Redis you can use for various purposes as inter-process communication (imagine that you have a system that is part Node.js, Java and PHP, and you need to communicate all this, the redis would help in this, with the Pub/Sub https://redis.io/topics/pubsub), leave the data in RAM for faster access, and it replicates on disk for persistence in case of restarting the server for example, value key and lists (including range option). No doubt Redis is a very complete solution that we can use to solve many architecture problems.
In the case of Elasticsearch, the idea is not to store data, but to SEARCH data. Elasticsearch and Solr were developed on top of the Lucene, where the idea is to organize files. Imagine that in this context, you can save only properties and indexes that you would like to use for searches.
Now let’s go to a real-world application where you need performance using Redis, Elasticsearch and a relational database.
You load the lines of a given table of your RDB that has a large volume of search in Redis using value key (id=>line of data in JSON), you load Elasticsearch with the properties including for geolocation search. When the user accesses your site / webservice, you do the search using Elasticsearch and returns the indexes, which you will use to retrieve the data in redis, which is loaded in RAM. Try to imagine this working in an environment that actually has many simultaneous accesses.
When the user updates some information, replicate it in Elasticsearch and Redis.
Remembering that this is just one example of the thousands of things that can be done.
I hope I’ve helped you understand.
Ih, it is better to separate this in several questions. Also, be careful so that it cannot be taken to the opinionated side.
– Jéf Bueno
I thought of separating but leaving this type of content in one place only helps in search of later, and on the opinions, I think I went straight, I did not ask which is better than the other.
– João