Z
Z
znack22015-02-12 20:14:06
Redis
znack2, 2015-02-12 20:14:06

Explain why Redis and Memcached are specifically needed and can they be associated with technologies like nodejs?

Hello
Tell me what Redis and Memcached technologies are needed for?
What exactly is a cache, for example, in a social network or any other serious site?
and how to understand if i need to use this technology if i use asynchronous backend like nginx or nodejs?
Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Timur Shemsedinov, 2015-02-12
@MarcusAurelius

You can cache everything that is on disk or in the database. If you were writing in something like PHP, then Memcached would make sense, just putting it between the DBMS and the application, caching query results can significantly increase performance. But I don’t see the point in using it with node.js, because in a node you can already keep everything in data structures in the application’s memory, because node applications are “long-running”, they do not restart with each next GET / POST request and do not release memory. Therefore, we can place a cache in RAM right inside the application and save on inter-process communication (memcached is still a different process). But inter-process communication still cannot be completely abandoned if one node process cannot cope,

A
Alexander Prozorov, 2015-02-15
@Staltec

Redis is memcached on steroids. It is suitable not only for cache, but also for storing any application states (sessions, indexes, etc.). Redis saves all of this to disk. After the advent of Redis, it makes little sense to use memcached.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question