Repository navigation
Closed
Description
October 2 in London a number of parties interested in Redis developments met in order to talk about future directions of the project. During the chats, a few critical issues that should be fixed as soon as possible were identified. This issue will list each issue, and for each issue a sub-issue will be created in order to discuss its design. The list now covers much more than discussed at the developers meeting.
Redis Server
- [DONE] Diskless replication: directly send the RDB file from the forked child to the slave, in order allow to replicate without touching the disk. Motivations: the main use case is environments where disks are a source of latency and there are no other reasons for the master to write to disk (for example cache usage where replication is used in order to have a pre-populated backup instance). Similarly in setups where persistence is provided by slaves since disks are not able to cope, this completely avoids on disk RDB generation. Status: merged into unstable, 3.0, 2.8, and documented at redis.io.
- RDB preamble on AOF to speedup both AOF rewriting and reloading.
- [DONE] Merge @mattsta Geocoding commands. This requires some refactoring but nothing that can't be done in the context of the
unstablebranch. See issue Add Geo Commands #1745 for comments reporting progresses. - Memory efficient small Sets storage. Currently small Sets are stored in a memory efficient way only when composed of numbers.
- [DONE via Matt's quicklists] More memory efficient Lists (linked lists of ziplists).
- Lua script
single commands replicationmode, that can be enabled by the script with a special command. - Linux specific OOM settings, to improve behavior under memory pressure. For example the slaves should be favored. Also there is to investigate if getting info via /proc about memory usage, caches, buffers, it is possible for the Redis process to anticipate when the OOM killer is going to be triggered, and kill the saving child automatically and ASAP. Issue Add oom-score-adj configuration option to control Linux OOM killer. #1690.
- RDB analysis and tools similar to
redis-rdb-toolswith a robust C implementation, part of redis-cli. - [DONE] RDB additional key-val fields to store additional information. This can be also used to store the size of DBs in order to give an hint for the hash table resize. This translates in faster RDB loading time.
- RDB partial resync information, so that slaves are able to partial resynchronize after a restart, as long as the master has the same run ID and there is enough backlog.
- Global clients memory usage and limits.
- SSL support, we have an implementation already available here to check. In theory this would be: opt-in (not complied by default), and optimized with different latency / compression tradeoffs in different cases, for example the replication channel could demand high compression, the client-server chat low latency. There is a use case at Square where currently stunnels are used extensively almost only for Redis. At this point we may be in a condition where lack of SSL support in Redis, at least optional, is making things too much complex in certain environments. CCing the PR for merging it into Redis in the original repo of the fork. Stand alone Issue about SSL is here.
- Retain master and slave replication offsets after a restart. This has the effect to make Sentinel slave selection process safer.
- Protected restarts in order to support the use case of a master-slave setup which is entirely diskless (persistence off, and the new diskless replication on), but yet is able to survive the restart of N-1 instances. Basically an instance with
protected-restartset to yes, once started, will just reply with an error to queries, unless it is unblocked using theSLAVEOFcommand, to turn it into either a slave or a master. Issue Protected restarts for memory-only setups with replication. #2087. - [ABANDONED IDEA] Enhancements to the HyperLogLogs API. Issue Enhancements to HyperLogLogs API #2100.
- Stream SYNC-less replication: slave connects and just get new updates from the master. Useful for caching with mostly idempotent writes. Reference implementation.
- Pub/Sub UNSUBSCRIBE requires a linear time proportional to the number of subscribers to a given channel.
Redis Sentinel
- Sentinel authentication.
- Sentinel: better handling of changing majority when some sentinel is removed explicitly via the SENTINEL FORGET command.
- Sentinel: simpler ways to remove a master without requiring SENTINEL RESET. Broadcasting of this information.
- [DONE] Better Sentinel documentation with example deployments, maintenance tasks, general rules for deployments before to go deep into algorithms and failure modes descriptions.
- Stand alone state file similar to
nodes.confof Redis Cluster. - [DONE] Sentinel ID remembered across restarts: the
runidwill no longer be used for this task. - [DONE] Sentinel scalability improvements when there are many masters monitored by the same set of Sentinels. Details are described into issue Very large Sentinel deployments require a crazy amount of connections. #2257.
- Improve Sentinel desynchronization during the voting process to avoid split brain (no Sentinel getting the majority) that delays the failover to a successive retry.
For a number of the above issues there is already some old pull request. We should link the above entires with the existing PRs, sometimes a new PR will be created when there is additional context available and when it is better to start from scratch with a clean description and design.
Metadata
Metadata
Assignees
Labels
No labels
Activity
mattsta commentedon Oct 6, 2014
• Replication with streaming RDB: https://github.com/antirez/redis/issues/1501 and https://github.com/antirez/redis/pull/1185
• Linux OOM: https://github.com/antirez/redis/pull/1690
• Related to global client memory usage + limits: https://github.com/antirez/redis/pull/1618
antirez commentedon Oct 6, 2014
@mattsta thank you. Btw I searched the issues list for a great deal of time yesterday without being able to find the in-memory replication stuff. I'm sure it was posted, either here on the google group. Btw I don't remember it to be a polished implementation, but I was curious at this point about the approach that was taken.
antirez commentedon Oct 6, 2014
@mattsta p.s. it is neither of what you mentioned, just to be clear. It was an implementation much similar to: directly send the RDB file to the slave.
badboy commentedon Oct 6, 2014
/subscribe (just so I get updates)
amix commentedon Oct 6, 2014
First of, great work on Redis! We have been using it for years and it's truly a marvel.
I discussed briefly with antirez today ( https://twitter.com/antirez/status/519057585576894464 ) that Sentinel documentation could be better. The conclusion was following:
It should start with example of docs and general rules for a deployment, and later get into failure modes, algorithms, and other low level details.
I added this here so it's not lost 👍
Thank you and keep on rocking!
djanowski commentedon Oct 7, 2014
I'm so sorry I missed the meetup :(
It's great to see this list of issues to be prioritized. I'm particularly interested in diskless replication!
Thank you :)
jzawodn commentedon Oct 7, 2014
+1 for diskless replication (even though we don't have latency issues)
michael-grunder commentedon Oct 7, 2014
I would like to give a +1 to linked lists of ziplists. I think that would show an exponential reduction in ram usage for zsets.
antirez commentedon Oct 7, 2014
@michael-grunder implementing this for sorted sets would be very hard or impractical unfortunately. Lists have a mostly append workload, zsets are continuously modified in the middle, and are one of the few operations that is more CPU bound currently. That would require a lot of work to both have the "far" points in the different levels and still be able to degragment the ziplist blobs. At least for now the feature is intended for the "List" type.
michael-grunder commentedon Oct 7, 2014
@antirez. Maybe one for the future then. We're using a custom data type that keeps things really tiny but it's not I think generic enough for widespread use. Glad the meet up was so productive! :)
antirez commentedon Oct 8, 2014
Update: Added SSL support as a new point in the wishlist. About RDB diskless creation for replication, I stopped a bit for Redis Cluster RC1 release testing, but actually I'm already half-way to provide an implementation in a branch to link at this issue for community evaluation.
mezzatto commentedon Oct 8, 2014
SSL would make possible the use of redis as a broker for https://github.com/elasticsearch/logstash-forwarder. Nice for people using logstash (very popular logging manager)!
xaviershay commentedon Oct 8, 2014
SSL support would be amazing.
stouset commentedon Oct 8, 2014
Another useful aspect of SSL support is that stunnels only provide host-based security. If you have multiple services running on a machine, any of them can talk over that stunnel. There are solutions, but nothing's as simple as managing UNIX permissions on secret keys.
mattsta commentedon Oct 8, 2014
Instead of stunnel (bad software anyway), you can run spiped on each host. It even retains the same "one shared password everywhere" semantics that Redis currently follows, except you set the shared password on your spiped tunnels instead of Redis.
18 remaining items
bbroerman30 commentedon Oct 23, 2014
@antirez The code I had was tightly integrated at the lowest levels... I had to essentially keep the bio object(s) in parallel to the raw sockets, and based on whether we were using ssl or not it would operate on the bio object or the socket. I'm not sure if it can easily be separated out without refactoring the socket and the read/write/select operations out into a class heirarchy. Honestly, at the time I did this, i didn't have the time to go to that level. The company I was working for wanted something quick that worked for all of our use cases. After they let me release it open source, I went and updated it with the 2.6 changes (up to the last 2.6 release), but haven't had a chance to really dig in and refactor.
If I get a Christmas vacation this year at my current company, maybe I can spend that time going through and clean it up and refactor. I also have some clean-up to do on my ssl changes to phpredis, and I was going to add ssl to jredis as well.
bbroerman30 commentedon Oct 23, 2014
@mattsta Sorry about that (the repo being a copy with bulk changes)... I was new to GIT at the time, and since it was pretty obvious at the time that SSL was not wanted as part of the core for Redis, I didn't spend the time to go back and fix that... I did spend some time merging (by hand) the 2.6 (up to 2.6.17 i think) branch updates into mine, and got hiredis and redis-cli working properly. Sentinel compiles, but I haven't tested it. The work that was done was kind of a quick and dirty implementation, as I was trying to get the company i was working for at the time to buy into the idea of using it. Using stunnel was killing us operationally... It did pass QA, but it was never put into production before i left the company due to issues with PHP and phpredis (which i also fixed later on).
I started looking at merging in the 2.7 branch into my code, but haven't had the time to really do anything with it yet. I'm hoping that I get some Christmas vacation time to look into it, and maybe do some refactoring, to clean thinks up.
antirez commentedon Oct 23, 2014
@yossigo @bbroerman30 thanks! Very interesting. We should move all this into an OpenSSL issue ASAP and link it from here.
antirez commentedon Oct 30, 2014
First issue in the list completed and merged into all the branches: diskless replication. Next target is protected restarts which is basically a must have now that people can drop replication in master-slaves setups in order to avoid incidents similar to the one at Stripe (https://stripe.com/blog/game-day-exercises-at-stripe).
tarcieri commentedon Nov 14, 2014
@antirez so how about that SSL issue? 😉 I tried to open one, but I guess it won't let me...
darionyaphet commentedon Dec 19, 2014
diskless replication ! seems interesting
badboy commentedon Dec 19, 2014
@darionyaphet Diskless replication is already implemented.
antirez commentedon Feb 3, 2015
Just added a new thing into this list: "Stream SYNC-less replication: slave connects and just get new updates from the master. Useful for caching with mostly idempotent writes".
bbroerman30 commentedon Feb 3, 2015
@tarcieri If you need SSL right away, my repo has it for a couple versions of Redis. I'm working on refactoring, clean-up, and adding additional OpenSSL options (like cypher lists, etc) before I create a pull request for @antirez.
tarcieri commentedon Feb 3, 2015
We're "fine" with stunnels for now, but I've been tracking your progress
and it's very exciting.
On Tuesday, February 3, 2015, Brad Broerman [email protected]
wrote:
Tony Arcieri
antirez commentedon Feb 5, 2015
More items added, listing split in two sections, Redis and Sentinel.
yossigo commentedon Apr 27, 2021
That was a great dev meeting indeed, but most issues here have been resolved and the rest have their own dedicated issues - closing this now.
Update RedisTimeSeries module to v8.9.80
Update RedisTimeSeries module to v8.9.80 (#15336)