The article doesn’t give enough details to really understand what is that is happening here, but I would recommend everyone to take this 14/16x report and not expect that to be the general case.
How much faster is Redis at storing a blob of JSON compared to Postgres?
11–20 of 119 posts
Re: How much faster is Redis at storing a blob of JSON compared to Postgres?
#12Why can't Postgres implement a transparent caching layer similar to Redis?
Re: How much faster is Redis at storing a blob of JSON compared to Postgres?
#13Its faster, but then, thats the point of it. Its like saying that memcache is faster than postgres. they do different things for different purposes. I still wouldn't trust redis for anything other than ephemeral storage. Most of the use cases where we use redis assume that the data will at some point go away. The places where we use postgres assume that data is permanent. Infact, we use both together, and it works re…
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.
Re: How much faster is Redis at storing a blob of JSON compared to Postgres?
#14Why can't Postgres implement a transparent caching layer similar to Redis?
Re: How much faster is Redis at storing a blob of JSON compared to Postgres?
#15Its faster, but then, thats the point of it. Its like saying that memcache is faster than postgres. they do different things for different purposes. I still wouldn't trust redis for anything other than ephemeral storage. Most of the use cases where we use redis assume that the data will at some point go away. The places where we use postgres assume that data is permanent. Infact, we use both together, and it works re…
If the design condition allows asynchronous operation and I don't need to wait for background tasks to finish before I reply, it's not faster unless I somehow care more about background CPU time per request than I do about things like storage guarantees.
If the design condition requires durable storage to have happened before I reply, putting it in Redis doesn't even count as getting started.
Re: How much faster is Redis at storing a blob of JSON compared to Postgres?
#16TLDR; this update is not about redis vs postgresql but about caching!
Re: How much faster is Redis at storing a blob of JSON compared to Postgres?
#17Re: How much faster is Redis at storing a blob of JSON compared to Postgres?
#18Its faster, but then, thats the point of it. Its like saying that memcache is faster than postgres. they do different things for different purposes. I still wouldn't trust redis for anything other than ephemeral storage. Most of the use cases where we use redis assume that the data will at some point go away. The places where we use postgres assume that data is permanent. Infact, we use both together, and it works re…
One of the shops I worked in used Redis as the primary datastore. While there was a lot of extra complexity around relational data (especially referential integrity), the snapshotting systems worked very well and we didn't have to worry about data loss. I don't necessarily think this was an ideal setup (I can't tell you how many headaches Postgres would have solved for us), but I think there are plenty of cases where…
What about "redis-cli flushall"? (Don't type this on your production cluster).
Re: How much faster is Redis at storing a blob of JSON compared to Postgres?
#19Re: How much faster is Redis at storing a blob of JSON compared to Postgres?
#20Earlier quoted context omitted.
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.
In 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.
That's the difference between thinking about it as a solution to a problem and thinking about it as part of your infrastructure.