feat(storers): Add a new NutsMemcached storage backend built on NutsDB #452
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.


Add a new storage backend:
NutsMemcached. It is composed of both NutsDB and Memcached (i.e., two layers storage).Layer 1:
Keys+Headersalone are stored in NutsDB in RAM to take advantage of its fast prefix search.Layer 2: Keys+Values are stored in Memcached to take advantage of its advanced RAM+disk eviction system and hard limits on RAM and disk usage.
Note: since NutsDB has no preemptive eviction system, keys would remain until the end of their TTL, while key+values stored in Memcached could be evicted. Question: could we bring back
HintBPTSparseIdxModewhich was very efficient for caching many keys.Note: prefix search is not (easily?) supported on Memcached alone.
References
HintBPTSparseIdxModewas removed in this PR: refactor: Remove the 3rd mode nutsdb/nutsdb#456, last release with the "3rd mode" is v0.14.0.