184 Commits

Author SHA1 Message Date
oranagra
c053025a0a active memory defragmentation 2016-12-30 03:37:52 +02:00
Salvatore Sanfilippo
94c0ea1120 Merge pull request #3498 from ZhukovAlexander/patch-1
Fix an article usage
2016-12-20 13:39:29 +01:00
antirez
e0565b519b Only show Redis logo if logging to stdout / TTY.
You can still force the logo in the normal logs.
For motivations, check issue #3112. For me the reason is that actually
the logo is nice to have in interactive sessions, but inside the logs
kinda loses its usefulness, but for the ability of users to recognize
restarts easily: for this reason the new startup sequence shows a one
liner ASCII "wave" so that there is still a bit of visual clue.

Startup logging was modified in order to log events in more obvious
ways, and to log more events. Also certain important informations are
now more easy to parse/grep since they are printed in field=value style.

The option --always-show-logo in redis.conf was added, defaulting to no.
2016-12-19 16:41:47 +01:00
antirez
7e4353c4d7 Merge branch 'psync2' into unstable 2016-11-17 09:37:03 +01:00
antirez
f53ed7a969 PSYNC2: different improvements to Redis replication.
The gist of the changes is that now, partial resynchronizations between
slaves and masters (without the need of a full resync with RDB transfer
and so forth), work in a number of cases when it was impossible
in the past. For instance:

1. When a slave is promoted to mastrer, the slaves of the old master can
partially resynchronize with the new master.

2. Chained slalves (slaves of slaves) can be moved to replicate to other
slaves or the master itsef, without requiring a full resync.

3. The master itself, after being turned into a slave, is able to
partially resynchronize with the new master, when it joins replication
again.

In order to obtain this, the following main changes were operated:

* Slaves also take a replication backlog, not just masters.

* Same stream replication for all the slaves and sub slaves. The
replication stream is identical from the top level master to its slaves
and is also the same from the slaves to their sub-slaves and so forth.
This means that if a slave is later promoted to master, it has the
same replication backlong, and can partially resynchronize with its
slaves (that were previously slaves of the old master).

* A given replication history is no longer identified by the `runid` of
a Redis node. There is instead a `replication ID` which changes every
time the instance has a new history no longer coherent with the past
one. So, for example, slaves publish the same replication history of
their master, however when they are turned into masters, they publish
a new replication ID, but still remember the old ID, so that they are
able to partially resynchronize with slaves of the old master (up to a
given offset).

* The replication protocol was slightly modified so that a new extended
+CONTINUE reply from the master is able to inform the slave of a
replication ID change.

* REPLCONF CAPA is used in order to notify masters that a slave is able
to understand the new +CONTINUE reply.

* The RDB file was extended with an auxiliary field that is able to
select a given DB after loading in the slave, so that the slave can
continue receiving the replication stream from the point it was
disconnected without requiring the master to insert "SELECT" statements.
This is useful in order to guarantee the "same stream" property, because
the slave must be able to accumulate an identical backlog.

* Slave pings to sub-slaves are now sent in a special form, when the
top-level master is disconnected, in order to don't interfer with the
replication stream. We just use out of band "\n" bytes as in other parts
of the Redis protocol.

An old design document is available here:

https://gist.github.com/antirez/ae068f95c0d084891305

However the implementation is not identical to the description because
during the work to implement it, different changes were needed in order
to make things working well.
2016-11-09 15:37:15 +01:00
Michel Tresseras
f5e79864b6 Typo 2016-10-24 17:27:48 +02:00
Alexander Zhukov
a794bb296e Fix an article usage 2016-09-12 13:53:47 +03:00
antirez
09f181a42b Document RDB preamble in AOF rewrites in redis.conf. 2016-08-24 15:33:44 +02:00
antirez
43b5a64a8f Ability of slave to announce arbitrary ip/port to master.
This feature is useful, especially in deployments using Sentinel in
order to setup Redis HA, where the slave is executed with NAT or port
forwarding, so that the auto-detected port/ip addresses, as listed in
the "INFO replication" output of the master, or as provided by the
"ROLE" command, don't match the real addresses at which the slave is
reachable for connections.
2016-07-27 17:32:15 +02:00
antirez
73df375139 LFU: make counter log factor and decay time configurable. 2016-07-20 15:00:35 +02:00
antirez
5d70ddaf85 Enable tcp-keepalive by default. 2016-06-13 12:03:14 +02:00
Salvatore Sanfilippo
f04cd2d044 Merge pull request #3180 from bogdanvlviv/fix_pidfile
fix pidfile in redis.conf
2016-06-10 09:02:06 +02:00
antirez
83fe739fb6 Modules: first preview 31 March 2016. 2016-05-10 06:40:05 +02:00
bogdanvlviv
e6fd878e5f fix pidfile in redis.conf 2016-04-19 14:43:06 +03:00
antirez
994afb81ee Cluster announce ip/port/bus-port documented in redis.conf. 2016-02-01 18:08:01 +01:00
antirez
d609d9942d New security feature: Redis protected mode.
An exposed Redis instance on the internet can be cause of serious
issues. Since Redis, by default, binds to all the interfaces, it is easy
to forget an instance without any protection layer, for error.

Protected mode try to address this feature in a soft way, providing a
layer of protection, but giving clues to Redis users about why the
server is not accepting connections.

When protected mode is enabeld (the default), and if there are no
minumum hints about the fact the server is properly configured (no
"bind" directive is used in order to restrict the server to certain
interfaces, nor a password is set), clients connecting from external
intefaces are refused with an error explaining what to do in order to
fix the issue.

Clients connecting from the IPv4 and IPv6 lookback interfaces are still
accepted normally, similarly Unix domain socket connections are not
restricted in any way.
2016-01-07 13:00:14 +01:00
antirez
3e9f8ae87e Fix typo UNCOMMENT -> COMMENT in example redis.conf. 2015-12-03 11:03:20 +01:00
antirez
0e2eb8234e Redis.conf example: make clear user must pass its path as argument. 2015-10-15 12:46:07 +02:00
antirez
97df261503 Lazyfree options documented in the example redis.conf. 2015-10-05 12:24:16 +02:00
antirez
6d9052dd78 Merge branch 'unstable' of github.com:/antirez/redis into unstable 2015-04-27 12:05:32 +02:00
antirez
7a93f552a7 Example redis.conf doc about pidfile fixed.
An user changed the behavior via a PR without upgrading the doc.
2015-04-26 19:23:27 +02:00
Itamar Haber
136c27edff Added reference to IANA ticket for port 6379
Just so it's extra official 😄
2015-04-24 01:33:41 +03:00
antirez
5977a25a94 Give obvious instructions on how to bind all interfaces. 2015-02-19 22:47:32 +01:00
antirez
487ab5d55b Example redis.conf binds just to 127.0.0.1.
It's hard to pick a good approach here. A few arguments:

1) There are many exposed instances on the internet.
2) Changing the default when "bind" is not given is very dangerous,
   after an upgrade the server changes a fundamental behavior.
3) Usually Redis, when used in a proper way, will be protected *and*
   accessed often from other computers, so this new default is likely
   not what most people want.
4) However if users end with this default, they are using the example
   redis.conf: likely they are reading what is inside, and they'll see
   the warning.
2015-02-19 22:42:31 +01:00
Masahiko Sawada
f3f936fb4c Unify to uppercase the headline 2015-02-12 21:20:22 +09:00
Matt Stancliff
02b75aac5a Supervise redis processes only if configured
Adds configuration option 'supervised [no | upstart | systemd | auto]'

Also removed 'bzero' from the previous implementation because it's 2015.
(We could actually statically initialize those structs, but clang
throws an invalid warning when we try, so it looks bad even though it
isn't bad.)

Fixes #2264
2015-01-09 15:19:18 -05:00
antirez
2fec76f222 Advertise Redis Cluster as experimental in redis.conf. 2015-01-08 14:41:34 +01:00
Matt Stancliff
16cda6f076 Config: Add quicklist, remove old list options
This removes:
  - list-max-ziplist-entries
  - list-max-ziplist-value

This adds:
  - list-max-ziplist-size
  - list-compress-depth

Also updates config file with new sections and updates
tests to use quicklist settings instead of old list settings.
2015-01-02 11:16:10 -05:00
Salvatore Sanfilippo
695d30eeb7 Merge pull request #2117 from mariano-perez-rodriguez/patch-4
Typo fixes in redis.conf
2014-12-11 14:40:18 +01:00
antirez
66096204cf Mark diskless replication as experimental in redis.conf. 2014-12-02 14:13:32 +01:00
Mariano Pérez Rodríguez
142c53fe12 Typo fixes in redis.conf
Fix two typos in redis.conf:

- "trnasfers" --> "transfers"
- "enalbed" --> "enabled"
2014-10-31 14:17:49 -03:00
antirez
f9ca2227c1 Document repl-diskless-sync-delay in redis.conf. 2014-10-27 10:42:49 +01:00
antirez
b27921829b Diskless replication documented inside example redis.conf. 2014-10-24 10:12:43 +02:00
Miguel Parramon
c9c19a38c1 redis.conf small grammar fix
😄

Closes #2034
2014-09-29 06:49:09 -04:00
Matt Stancliff
299c667adb Clean up text throughout project
- Remove trailing newlines from redis.conf
  - Fix comment misspelling
  - Clarifies zipEncodeLength usage and a C API mention (#1243, #1242)
  - Fix cluster typos (inspired by @papanikge #1507)
  - Fix rewite -> rewrite in a few places (inspired by #682)

Closes #1243, #1242, #1507
2014-09-29 06:49:07 -04:00
Ben
cc374176fe Grammar and typo fixes in redis.conf
Closes #1441
2014-09-29 06:49:07 -04:00
Jan-Erik Rediger
b61889d290 Fix typo in redis.conf
Closes #1713
2014-09-29 06:49:06 -04:00
Manuel Meurer
7dba0d146b Improve disable save comment in redis.conf
Closes #1897
2014-09-29 06:49:05 -04:00
antirez
aea347d60c Cluster: new option to work with partial slots coverage. 2014-09-17 11:10:09 +02:00
antirez
d881e15dfe Make aof-load-truncated option actually configurable. 2014-09-08 10:56:52 +02:00
Edgars Irmejs
d39acc90ba Change unixsocketperm comment to 700 from 755
According to unix manuals, "Connecting to the socket object requires
read/write permission." -- mode 755 is useless for anybody
other than the owner.

Fixes #1696
2014-08-07 17:13:01 +02:00
vps
5b66eb677f * fixed doc URL for keyspace events 2014-07-28 12:49:33 +02:00
antirez
c15c73db60 Example redis.conf: improve slaveof description. 2014-07-25 14:20:23 +02:00
antirez
71c60780e1 Latency monitor trheshold value is now configurable.
This commit adds both support for redis.conf and CONFIG SET/GET.
2014-07-02 12:28:17 +02:00
antirez
fb93fe727b Client types generalized.
Because of output buffer limits Redis internals had this idea of type of
clients: normal, pubsub, slave. It is possible to set different output
buffer limits for the three kinds of clients.

However all the macros and API were named after output buffer limit
classes, while the idea of a client type is a generic one that can be
reused.

This commit does two things:

1) Rename the API and defines with more general names.
2) Change the class of clients executing the MONITOR command from "slave"
   to "normal".

"2" is a good idea because you want to have very special settings for
slaves, that are not a good idea for MONITOR clients that are instead
normal clients even if they are conceptually slave-alike (since it is a
push protocol).

The backward-compatibility breakage resulting from "2" is considered to
be minimal to care, since MONITOR is a debugging command, and because
anyway this change is not going to break the format or the behavior, but
just when a connection is closed on big output buffer issues.
2014-06-16 10:43:05 +02:00
antirez
aec8e92316 Cluster: slave validity factor is now user configurable.
Check the commit changes in the example redis.conf for more information.
2014-05-22 16:57:54 +02:00
Kevin Menard
2ee50ba855 Fixed typos. 2014-04-23 15:34:51 +02:00
antirez
1dca87d69c User-defined switch point between sparse-dense HLL encodings. 2014-04-15 17:46:51 +02:00
antirez
385bc5807e The default maxmemory policy is now noeviction.
This is safer as by default maxmemory should just set a memory limit
without any key to be deleted, unless the policy is set to something
more relaxed.
2014-03-21 08:03:34 +01:00
antirez
c1c4fc292b Default LRU samples is now 5. 2014-03-20 17:05:42 +01:00