3 ms·
Hey, Original blog post author here. What a lot of people don't understand is that you want it both. The resilience of Postgres and the speed of fetching from
by peterbe 7y ago
Hey, Original blog post author here.
What a lot of people don't understand is that you want it both. The resilience of Postgres and the speed of fetching from Redis.
You have data stored. You want to retrieve it as painlessly (shorter time, less CPU usage, less complexity, etc.) as possible. What are the options? How much faster is Redis? How much RAM is that going to eat up? Different tools have different properties. Run some tests to answer some of those questions. Don't just guess. Sure Redis is going to save some time, but how much? Do you know by heart?
- deleted 7y ago[deleted]
- ngrilly 7y agoI'm not sure you are measuring what you think you are measuring. Have you set CONN_MAX_AGE in Django?
- jdub 7y ago"Do you know by heart?" is very much the wrong question though. :-) Benchmarking is surprisingly hard. After some digging, you might discover that you're actually measuring how long it takes to bring up a TCP connection, or how long it takes PostgreSQL to serialise the JSON from its stored form. It could be differences in the driver layer Django is using. Coming up with the corrct experiment can be the toughest part of doing the science.
- bradhe 7y ago> What a lot of people don't understand is that you want it both. Of course I want both. I also want a car that requires zero fuel, can go super fast, has great safety features, and is less than $100. Life is about trade offs and you have to make them for specific reasons. People trade off using Redis vs Postgres for different workloads intentionally. They aren't meant to be used for the same workloads and are _not_ interchangeable. Your comparison (and article) is worthless and, in fact, hurts more than it helps.