1. 22 Jul, 2013 1 commit
  2. 12 Jul, 2013 1 commit
  3. 09 Jul, 2013 1 commit
  4. 08 Jul, 2013 2 commits
  5. 26 Jun, 2013 1 commit
    • antirez's avatar
      Don't disconnect pre PSYNC replication clients for timeout. · 8ca265cd
      antirez authored
      Clients using SYNC to replicate are older implementations, such as
      redis-cli --slave, and are not designed to acknowledge the master with
      REPLCONF ACK commands, so we don't have any feedback and should not
      disconnect them on timeout.
      8ca265cd
  6. 24 Jun, 2013 2 commits
    • antirez's avatar
      Use the RSC to replicate EVALSHA unmodified. · f0bf5fd8
      antirez authored
      This commit uses the Replication Script Cache in order to avoid
      translating EVALSHA into EVAL whenever possible for both the AOF and
      slaves.
      f0bf5fd8
    • antirez's avatar
      Replication of scripts as EVALSHA: sha1 caching implemented. · 94ec7db4
      antirez authored
      This code is only responsible to take an LRU-evicted fixed length cache
      of SHA1 that we are sure all the slaves received.
      
      In this commit only the implementation is provided, but the Redis core
      does not use it to actually send EVALSHA to slaves when possible.
      94ec7db4
  7. 30 May, 2013 2 commits
  8. 27 May, 2013 5 commits
    • antirez's avatar
      Close connection with timedout slaves. · 3c82c85f
      antirez authored
      Now masters, using the time at which the last REPLCONF ACK was received,
      are able to explicitly disconnect slaves that are no longer responding.
      
      Previously the only chance was to see a very long output buffer, that
      was highly suboptimal.
      3c82c85f
    • antirez's avatar
      Send ACK to master once every second. · e06a5604
      antirez authored
      ACKs can be also used as a base for synchronous replication. However in
      that case they'll be explicitly requested by the master when the client
      sends a request that needs to be replicated synchronously.
      e06a5604
    • antirez's avatar
      Don't ACK the master after every command. · efd87031
      antirez authored
      Sending an ACK is now moved into the replicationSendAck() function.
      efd87031
    • antirez's avatar
      dd0adbb7
    • antirez's avatar
      REPLCONF ACK command. · 6b4635f4
      antirez authored
      This special command is used by the slave to inform the master the
      amount of replication stream it currently consumed.
      
      it does not return anything so that we not need to consume additional
      bandwidth needed by the master to reply something.
      
      The master can do a number of things knowing the amount of stream
      processed, such as understanding the "lag" in bytes of the slave, verify
      if a given command was already processed by the slave, and so forth.
      6b4635f4
  9. 05 Mar, 2013 1 commit
  10. 04 Mar, 2013 2 commits
  11. 27 Feb, 2013 1 commit
  12. 13 Feb, 2013 2 commits
  13. 12 Feb, 2013 12 commits
  14. 08 Feb, 2013 1 commit
  15. 05 Feb, 2013 2 commits
    • antirez's avatar
      b70b459b
    • charsyam's avatar
      Turn off TCP_NODELAY on the slave socket after SYNC. · c85647f3
      charsyam authored
      Further details from @antirez:
      
      It was reported by @StopForumSpam on Twitter that the Redis replication
      link was strangely using multiple TCP packets for multiple commands.
      This wastes a lot of bandwidth and is due to the TCP_NODELAY option we
      enable on the socket after accepting a new connection.
      
      However the master -> slave channel is a one-way channel since Redis
      replication is asynchronous, so there is no point in trying to reduce
      the latency, we should aim to reduce the bandwidth. For this reason this
      commit introduces the ability to disable the nagle algorithm on the
      socket after a successful SYNC.
      
      This feature is off by default because the delay can be up to 40
      milliseconds with normally configured Linux kernels.
      c85647f3
  16. 19 Jan, 2013 1 commit
  17. 15 Jan, 2013 1 commit
    • antirez's avatar
      Undo slave-master handshake when SLAVEOF sets a new slave. · ef99e146
      antirez authored
      Issue #828 shows how Redis was not correctly undoing a non-blocking
      connection attempt with the previous master when the master was set to a
      new address using the SLAVEOF command.
      
      This was also a result of lack of refactoring, so now there is a
      function to cancel the non blocking handshake with the master.
      The new function is now used when SLAVEOF NO ONE is called or when
      SLAVEOF is used to set the master to a different address.
      ef99e146
  18. 03 Jan, 2013 1 commit
  19. 14 Dec, 2012 1 commit
    • antirez's avatar
      serverCron() frequency is now a runtime parameter (was REDIS_HZ). · f1481d4a
      antirez authored
      REDIS_HZ is the frequency our serverCron() function is called with.
      A more frequent call to this function results into less latency when the
      server is trying to handle very expansive background operations like
      mass expires of a lot of keys at the same time.
      
      Redis 2.4 used to have an HZ of 10. This was good enough with almost
      every setup, but the incremental key expiration algorithm was working a
      bit better under *extreme* pressure when HZ was set to 100 for Redis
      2.6.
      
      However for most users a latency spike of 30 milliseconds when million
      of keys are expiring at the same time is acceptable, on the other hand a
      default HZ of 100 in Redis 2.6 was causing idle instances to use some
      CPU time compared to Redis 2.4. The CPU usage was in the order of 0.3%
      for an idle instance, however this is a shame as more energy is consumed
      by the server, if not important resources.
      
      This commit introduces HZ as a runtime parameter, that can be queried by
      INFO or CONFIG GET, and can be modified with CONFIG SET. At the same
      time the default frequency is set back to 10.
      
      In this way we default to a sane value of 10, but allows users to
      easily switch to values up to 500 for near real-time applications if
      needed and if they are willing to pay this small CPU usage penalty.
      f1481d4a