Skip to content

A few urgent issues identified during the October 2014 dev meeting. #2045

Closed

Description

@antirez

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 unstable branch. 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 replication mode, 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-tools with 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-restart set to yes, once started, will just reply with an error to queries, unless it is unblocked using the SLAVEOF command, 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.conf of Redis Cluster.
  • [DONE] Sentinel ID remembered across restarts: the runid will 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.

Activity

  1. antirez commented on Oct 6, 2014

    @antirez
    ContributorAuthor

    @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.

  2. antirez commented on Oct 6, 2014

    @antirez
    ContributorAuthor

    @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.

  3. badboy commented on Oct 6, 2014

    @badboy
    Contributor

    /subscribe (just so I get updates)

  4. amix commented on Oct 6, 2014

    @amix

    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!

  5. djanowski commented on Oct 7, 2014

    @djanowski
    Contributor

    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 :)

  6. jzawodn commented on Oct 7, 2014

    @jzawodn
    Contributor

    +1 for diskless replication (even though we don't have latency issues)

  7. michael-grunder commented on Oct 7, 2014

    @michael-grunder
    Contributor

    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.

  8. antirez commented on Oct 7, 2014

    @antirez
    ContributorAuthor

    @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.

  9. michael-grunder commented on Oct 7, 2014

    @michael-grunder
    Contributor

    @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! :)

  10. antirez commented on Oct 8, 2014

    @antirez
    ContributorAuthor

    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.

  11. mezzatto commented on Oct 8, 2014

    @mezzatto

    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)!

  12. xaviershay commented on Oct 8, 2014

    @xaviershay

    SSL support would be amazing.

  13. stouset commented on Oct 8, 2014

    @stouset

    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.

  14. mattsta commented on Oct 8, 2014

    @mattsta
    Contributor

    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.

  15. 18 remaining items

  16. bbroerman30 commented on Oct 23, 2014

    @bbroerman30

    @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.

  17. bbroerman30 commented on Oct 23, 2014

    @bbroerman30

    @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.

  18. antirez commented on Oct 23, 2014

    @antirez
    ContributorAuthor

    @yossigo @bbroerman30 thanks! Very interesting. We should move all this into an OpenSSL issue ASAP and link it from here.

  19. antirez commented on Oct 30, 2014

    @antirez
    ContributorAuthor

    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).

  20. tarcieri commented on Nov 14, 2014

    @tarcieri

    @antirez so how about that SSL issue? 😉 I tried to open one, but I guess it won't let me...

  21. darionyaphet commented on Dec 19, 2014

    @darionyaphet

    diskless replication ! seems interesting

  22. badboy commented on Dec 19, 2014

    @badboy
    Contributor

    @darionyaphet Diskless replication is already implemented.

  23. antirez commented on Feb 3, 2015

    @antirez
    ContributorAuthor

    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".

  24. bbroerman30 commented on Feb 3, 2015

    @bbroerman30

    @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.

  25. tarcieri commented on Feb 3, 2015

    @tarcieri

    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:

    @tarcieri https://github.com/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 https://github.com/antirez.

    —
    Reply to this email directly or view it on GitHub
    https://github.com/antirez/redis/issues/2045#issuecomment-72728166.

    Tony Arcieri

  26. antirez commented on Feb 5, 2015

    @antirez
    ContributorAuthor

    More items added, listing split in two sections, Redis and Sentinel.

  27. yossigo commented on Apr 27, 2021

    @yossigo
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions