top | item 45381895

(no title)

mehphp | 5 months ago

I think you just convinced me to drop redis for my new project.

Definitely a premature optimization on my part.

discuss

order

flanked-evergl|5 months ago

We dropped Redis from a 4 year old app that had a rapidly growing userbase. Best choice ever. We never looked back once other than to think how annoying it was to have to deal with Redis in addition to Postgres.

Implicated|5 months ago

Sincerely (Feel the need to add that given the tension around here in these comments), I'm curious how Redis was annoying. Can you give any detail/insight?

throwup238|5 months ago

“Dropping” something from a “new” project is premature optimization?

Wherever you go, there you are.

qu4z-2|5 months ago

Presumably adding Redis to a new project with no performance issues (yet?) is the premature optimisation.

danielheath|5 months ago

I read it as dropping something that _had been_ a premature optimisation.

mehphp|5 months ago

I was referring to adding redis prematurely

MobiusHorizons|5 months ago

“Premature optimization” typically refers to optimizing before profiling. Ie optimizing in places that won’t help.

Is redis not improving your latency? Is it adding complexity that isn’t worth it? Why bother removing it?

maxbond|5 months ago

I like to call cases like this "premature distribution." Or maybe you could call it "premature capacity." If you have an application running in the cloud with several thousand requests per day, you could probably really benefit from adding a service like Redis.

But when you have 0-10 users and 0-1000 requests per day, it can make more sense to write something more monolithic and with limited scalability. Eg, doing everything in Postgres. Caching is especially amenable to adding in later. If you get too far into the weeds managing services and creating scalability you might bogged down and never get your application in front of potential users in the first place.

Eg, your UX sucks and key features aren't implemented, but you're tweaking TTLs and getting a Redis cluster to work inside Docker Compose. Is that a good use of your time? If your goal is to get a functional app in front of potential users, probably not.