4 ms·
The article talks about _how much_ it is faster which is the interesting question. For a small project you might not want the added complexity of another datab
by xgb84j 7y ago
The article talks about _how much_ it is faster which is the interesting question.
For a small project you might not want the added complexity of another database and decide to store JSON blobs in PostgreSQL. In this case it's important to understand the performance trade-off you're making.
- l33tman 7y agoIn Django it's literally a matter of adding 5 lines of code to enable the redis cache. The complexity is in actually setting up the Redis server, but this can also be trivial in many cases.
- dsr_ 7y agoSorry, no. The complexity is that you are now relying on another server which can break in new ways, requires startup and shutdown and configuration and possibly load-balancing; management of all the above... updates, security reviews, and documentation. Will you need new server types with an emphasis on RAM? How many and when? How are you monitoring it for errors and performance? That's the difference between thinking about it as a solution to a problem and thinking about it as part of your infrastructure.
- volkk 7y agoTrue, but a lot of that can be solved with PaaS/DBaaS products like compose or something
- threeseed 7y agoShame you got downvoted because it's a valid point. These days most databases are available as a managed service and Redis in particular is a standard feature on AWS, Azure and Google Cloud.
- krenoten 7y agoJust use a hashmap. Hashmaps in some cases can be like 8 orders of magnitude faster than Redis.
- phamilton 7y agoHashmaps are faster, except when you need the data to be available to multiple machines. A good description of redis is a "shared heap". HashSets, HashMaps, Heaps, Priority Queues, etc. are all great and fast in an application, but once you need to start sharing that data things get complicated quickly. So you designate a single server to implement those data structures and expose them to your application. And what you end up with is basically redis.