rotor: Enhance Redis support #1185
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces key enhancements to Redis support:
No breaking changes introduced - it supports smooth migration from Redis to MongoDB for users who still wish to use MongoDB.
Motivation
Our workload has shown that Redis outperforms MongoDB significantly in terms of resource efficiency. Specifically, MongoDB was consuming nearly 1 CPU core per replica and 750MB of memory at just ~250 requests per second, which we believe is excessive for such a simple use case as K/V storage.
Although Jitsu's documentation states that Redis is deprecated in favor of MongoDB, I believe this decision should be reconsidered. Based on our internal performance tests, Redis offers a more efficient solution than MongoDB for our workload. Redis' resource usage is far more optimal, making it a more suitable choice in scenarios with high-performance demands.
Supporting both MongoDB and Redis would provide greater flexibility, allowing users to choose the best storage solution for their needs. For users who don't require features like identity stitching and prefer Redis for its speed and resource efficiency, this approach would also result in more cost-effective Jitsu deployments.