bigcapital
bigcapital copied to clipboard
eliminate redis & mongodb
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.
Or Postgres, which also has JSONB columns.
@derekperkins +1 for eliminating mongodb. Redis has a different purpose though.
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
https://twitter.com/TylerMKing/status/1668043629581987841
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.
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 plainconst data = await db.fetch()
You tagged the wrong Tyler King 👀😅
You tagged the wrong Tyler King 👀😅
Ouch.. sorry about that.
Looks like this thread is older, but thoughts on Postgres?