bigcapital icon indicating copy to clipboard operation
bigcapital copied to clipboard

eliminate redis & mongodb

Open derekperkins opened this issue 2 years ago • 7 comments

I know this is very presumptuous of a newcomer, but I would strongly recommend eliminating the redis + mongodb dependencies from the stack. MySQL is more than capable to handle almost any workload you would use the other two for, and less infrastructure is always easier to manage.

FWIW, I'm a core maintainer of the https://github.com/vitessio/vitess project and have operated sharded MySQL at high scale, so I am confident in MySQL's ability to handle those workloads.

derekperkins avatar May 31 '23 22:05 derekperkins

Or Postgres, which also has JSONB columns.

mariusa avatar Jun 13 '23 09:06 mariusa

@derekperkins +1 for eliminating mongodb. Redis has a different purpose though.

toshsan avatar Jun 30 '23 20:06 toshsan

Again, I'm not in the code to know what redis is being used for, but this tweet (not mine) succinctly expresses my opinion on caching. No specific judgments meant here, just an overall push to reduce complexity

image

https://twitter.com/TylerMKing/status/1668043629581987841

derekperkins avatar Jun 30 '23 20:06 derekperkins

While I'm in favor for reduction in complexity, i whole hardheartedly disagree with @tylerking's opinion on it. Unless you are building a prototype or MVP, caching layer is necessary. Sooner it's get added to a SAAS app is better IMO.

const data = await Cache.wrap('key', ()=>db.fetch()) isn't very complex compared to plain const data = await db.fetch()

Edit: Read in code

In this project REDIS is being used as ephemeral storage for rate limiting in node-rate-limiter-flexible module. That's justifiable for a SAAS but probably not necessary for self hosting. node-rate-limiter-flexible supports RateLimiterMemory, that can be a fallback if redis were to be removed from the stack. I did't see Redis based Caching implementation. May be @abouolia can comment on it.

toshsan avatar Jun 30 '23 20:06 toshsan

While I'm in favor for reduction in complexity, i whole hardheartedly disagree with @tylerking's opinion on it. Unless you are building a prototype or MVP, caching layer is necessary. Sooner it's get added to a SAAS app is better IMO.

const data = await Cache.wrap('key', ()=>db.fetch()) isn't very complex compared to plain const data = await db.fetch()

You tagged the wrong Tyler King 👀😅

doitliketyler avatar Jun 30 '23 20:06 doitliketyler

You tagged the wrong Tyler King 👀😅

Ouch.. sorry about that.

toshsan avatar Jun 30 '23 20:06 toshsan

Looks like this thread is older, but thoughts on Postgres?

ccantrell72 avatar May 13 '24 04:05 ccantrell72