Commit Graph

350 Commits

Author SHA1 Message Date
Jack Drogon 93238575f7 Fix typo 2018-07-03 18:19:46 +02:00
Salvatore Sanfilippo 94658303e9
Merge pull request #4758 from soloestoy/rdb-save-incremental-fsync
Rdb save incremental fsync
2018-06-16 10:59:37 +02:00
shenlongxing 018cf118d6 fix stream config typo 2018-06-07 23:13:36 +08:00
antirez f847dd3ad8 Streams: better document the max node limits. 2018-06-07 14:37:56 +02:00
antirez 19a438e2c0 Streams: use non static macro node limits.
Also add the concept of size/items limit, instead of just having as
limit the number of bytes.
2018-06-07 14:24:49 +02:00
antirez 28d28ef3cf AOF: enable RDB-preamble rewriting by default.
There are too many advantages in doing this, RDB is faster to persist,
more compact, much faster to load back. The main issues here are that
the code is less tested because this was not the old default (so we are
enabling it for the new 5.0 release), and that the AOF is no longer a
trivially parsable format from now on. However the non-preamble mode
will be supported in the future as well, if new data types will be
added.
2018-03-25 11:43:30 +02:00
Salvatore Sanfilippo da621783f0
Merge pull request #4691 from oranagra/active_defrag_v2
Active defrag v2
2018-03-22 09:16:32 +01:00
zhaozhao.zz fd0c4c0277 add rdb-save-incremental-fsync option in redis.conf 2018-03-16 00:48:59 +08:00
antirez 432bf4770e Cluster: ability to prevent slaves from failing over their masters.
This commit, in some parts derived from PR #3041 which is no longer
possible to merge (because the user deleted the original branch),
implements the ability of slaves to have a special configuration
preventing that they try to start a failover when the master is failing.

There are multiple reasons for wanting this, and the feautre was
requested in issue #3021 time ago.

The differences between this patch and the original PR are the
following:

1. The flag is saved/loaded on the nodes configuration.
2. The 'myself' node is now flag-aware, the flag is updated as needed
   when the configuration is changed via CONFIG SET.
3. The flag name uses NOFAILOVER instead of NO_FAILOVER to be consistent
   with existing NOADDR.
4. The redis.conf documentation was rewritten.

Thanks to @deep011 for the original patch.
2018-03-14 14:01:38 +01:00
Oran Agra be1b4aa9aa active defrag v2
- big keys are not defragged in one go from within the dict scan
  instead they are scanned in parts after the main dict hash bucket is done.
- add latency monitor sample for defrag
- change default active-defrag-cycle-min to induce lower latency
- make active defrag start a new scan right away if needed, so it's easier
  (for the test suite) to detect when it's done
- make active defrag quick the current cycle after each db / big key
- defrag  some non key long term global allocations
- some refactoring for smaller functions and more reusable code
- during dict rehashing, one scan iteration of the dict, can end up scanning
  one bucket in the smaller dict and many many buckets in the larger dict.
  so waiting for 16 scan iterations before checking the time, may be much too long.
2018-03-12 15:07:43 +02:00
antirez db7bd6fda9 Document new protocol options in #4568 into redis.conf. 2018-01-11 11:40:57 +01:00
WuYunlong 3f232ebfb8 fix some notes 2017-12-05 14:41:16 +08:00
Salvatore Sanfilippo b998e2035c
Merge pull request #4165 from zyegfryed/patch-1
Fix some typos
2017-11-28 18:43:45 +01:00
Shaun Webb f06f10e66b Typo fix 2017-07-27 15:27:46 +09:00
Sébastien Fievet 22bcee5178 Fix some typos 2017-07-26 14:11:05 +02:00
antirez 634b096610 Defrag: document the feature in redis.conf. 2017-01-11 17:24:49 +01:00
oranagra 7aa9e6d2ae active memory defragmentation 2016-12-30 03:37:52 +02:00
Salvatore Sanfilippo 43bccbc3f4 Merge pull request #3498 from ZhukovAlexander/patch-1
Fix an article usage
2016-12-20 13:39:29 +01:00
antirez 06bfeb482d 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 8fb3ad2444 Merge branch 'psync2' into unstable 2016-11-17 09:37:03 +01:00
antirez 2669fb8364 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 20feafda09 Typo 2016-10-24 17:27:48 +02:00
Alexander Zhukov 27d08fb8f0 Fix an article usage 2016-09-12 13:53:47 +03:00
antirez 764cc69e2b Document RDB preamble in AOF rewrites in redis.conf. 2016-08-24 15:33:44 +02:00
antirez 55385f99de 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 6854c7b9ee LFU: make counter log factor and decay time configurable. 2016-07-20 15:00:35 +02:00
antirez c6e3ce38ce Enable tcp-keepalive by default. 2016-06-13 12:03:14 +02:00
Salvatore Sanfilippo bac4de7d1b Merge pull request #3180 from bogdanvlviv/fix_pidfile
fix pidfile in redis.conf
2016-06-10 09:02:06 +02:00
antirez 6dead2cff5 Modules: first preview 31 March 2016. 2016-05-10 06:40:05 +02:00
bogdanvlviv 5565cc629e fix pidfile in redis.conf 2016-04-19 14:43:06 +03:00
antirez 5ac5e3ebd7 Cluster announce ip/port/bus-port documented in redis.conf. 2016-02-01 18:08:01 +01:00
antirez edd4d555df 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 f1472252eb Fix typo UNCOMMENT -> COMMENT in example redis.conf. 2015-12-03 11:03:20 +01:00
antirez 6ed12bd430 Redis.conf example: make clear user must pass its path as argument. 2015-10-15 12:46:07 +02:00
antirez 19f6ab50c3 Lazyfree options documented in the example redis.conf. 2015-10-05 12:24:16 +02:00
antirez 1d6eb701d8 Merge branch 'unstable' of github.com:/antirez/redis into unstable 2015-04-27 12:05:32 +02:00
antirez 1a93501f8b 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 066d7a29eb Added reference to IANA ticket for port 6379
Just so it's extra official 😄
2015-04-24 01:33:41 +03:00
antirez 0aa5acc8f3 Give obvious instructions on how to bind all interfaces. 2015-02-19 22:47:32 +01:00
antirez 1024664247 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 2b3eba056c Unify to uppercase the headline 2015-02-12 21:20:22 +09:00
Matt Stancliff 36a3b75355 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 42357668e8 Advertise Redis Cluster as experimental in redis.conf. 2015-01-08 14:41:34 +01:00
Matt Stancliff 02bb515a09 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 8b81383401 Merge pull request #2117 from mariano-perez-rodriguez/patch-4
Typo fixes in redis.conf
2014-12-11 14:40:18 +01:00
antirez e07dd8b3e9 Mark diskless replication as experimental in redis.conf. 2014-12-02 14:13:32 +01:00
Mariano Pérez Rodríguez 6df9001d6c Typo fixes in redis.conf
Fix two typos in redis.conf:

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

Closes #2034
2014-09-29 06:49:09 -04:00
Matt Stancliff 12d0195b30 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 f62f00e062 Grammar and typo fixes in redis.conf
Closes #1441
2014-09-29 06:49:07 -04:00
Jan-Erik Rediger aa628446f2 Fix typo in redis.conf
Closes #1713
2014-09-29 06:49:06 -04:00
Manuel Meurer df484c7a2c Improve disable save comment in redis.conf
Closes #1897
2014-09-29 06:49:05 -04:00
antirez c89afc8e5d Cluster: new option to work with partial slots coverage. 2014-09-17 11:10:09 +02:00
antirez 31f79a46ff Make aof-load-truncated option actually configurable. 2014-09-08 10:56:52 +02:00
Edgars Irmejs 67c4fbed82 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 c90af7cd14 * fixed doc URL for keyspace events 2014-07-28 12:49:33 +02:00
antirez 49c817c250 Example redis.conf: improve slaveof description. 2014-07-25 14:20:23 +02:00
antirez e173f7a0e3 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 56d26c2380 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 39603a7e31 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 12e435d2a4 Fixed typos. 2014-04-23 15:34:51 +02:00
antirez 402110f9fd User-defined switch point between sparse-dense HLL encodings. 2014-04-15 17:46:51 +02:00
antirez 5fa3248bad 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 f4da796c53 Default LRU samples is now 5. 2014-03-20 17:05:42 +01:00
antirez e40d3e28e8 Redis.conf comment about tcp-backlog option improved. 2014-01-31 14:59:50 +01:00
antirez 7be946fde2 Option "backlog" renamed "tcp-backlog".
This is especially important since we already have a concept of backlog
(the replication backlog).
2014-01-31 14:56:10 +01:00
Nenad Merdanovic d76aa96d1a Add support for listen(2) backlog definition
In high RPS environments, the default listen backlog is not sufficient, so
giving users the power to configure it is the right approach, especially
since it requires only minor modifications to the code.
2014-01-31 14:52:10 +01:00
antirez b8bfbf46c5 Cluster: fix an error in migration-barrier comment in redis.conf. 2014-01-31 11:31:50 +01:00
antirez cbfdd13b3a Cluster: barrer -> barrier in redis.conf. 2014-01-31 11:30:49 +01:00
antirez a7d30681c9 Cluster: configurable replicas migration barrier.
It is possible to configure the min number of additional working slaves
a master should be left with, for a slave to migrate to an orphaned
master.
2014-01-31 11:26:36 +01:00
antirez 305d7f29f3 Clarify include directive behavior in example redis.conf. 2013-12-19 16:02:31 +01:00
Yubao Liu 7da423f79f CONFIG REWRITE: don't throw some options on config rewrite
Those options will be thrown without this patch:
  include, rename-command, min-slaves-to-write, min-slaves-max-lag,
appendfilename.
2013-12-19 15:56:48 +01:00
antirez 6d184e02be Example redis.conf formatted to better show appendfilename option. 2013-12-19 10:18:45 +01:00
Yubao Liu 6d5fa2e06c fix typo in redis.conf and sentinel.conf 2013-12-11 15:46:42 +08:00
antirez 8534a290d3 Fixed typo in redis.conf. 2013-12-06 10:48:46 +01:00
Anurag Ramdasan fb6b9b14bd fixed typo 2013-12-05 21:47:17 +05:30
Anurag Ramdasan 74431b80a3 Fixed grammar: 'usually' to 'usual' 2013-12-05 21:09:31 +05:30
antirez 74da4a574f Fixed typos in redis.conf file. 2013-12-05 16:28:35 +01:00
antirez e5864c73b6 Cluster: example redis.conf updated from sec to ms for cluster-node-timeout. 2013-10-09 16:21:27 +02:00
antirez c76df73010 Revert "Document port6 and bind6 config options."
IPv6 support is not going to use IPv6 specific options, just it will be
possible to specify all the ipv4 / ipv6 addresses of the interfaces to
bind, otherwise connections will be accepted from all the interfaces in
both IPv4 and IPv6 addresses.

This reverts commit 93570e179e.
2013-07-08 16:08:43 +02:00
Geoff Garside 93570e179e Document port6 and bind6 config options.
Add commented port6 and bind6 options to default redis.conf file.
2013-07-08 16:06:44 +02:00
antirez 64b3b9b1d4 Example redis.conf: bind to multiple interfaces documented. 2013-07-08 10:42:22 +02:00
antirez ed599d3aca min-slaves-to-write: don't accept writes with less than N replicas.
This feature allows the user to specify the minimum number of
connected replicas having a lag less or equal than the specified
amount of seconds for writes to be accepted.
2013-05-30 11:30:04 +02:00
antirez cbdb2153c5 min-slaves-to-write: initial description of the feature in redis.conf 2013-05-30 11:29:58 +02:00
antirez c9b55a29d6 redis.conf updated: repl-timeout now uesd by masters as well. 2013-05-27 11:42:45 +02:00
antirez 310dbba01c Added a define for most configuration defaults.
Also the logfile option was modified to always have an explicit value
and to log to stdout when an empty string is used as log file.

Previously there was special handling of the string "stdout" that set
the logfile to NULL, this always required some special handling.
2013-05-15 10:12:29 +02:00
antirez d264122f6a Config option to turn AOF rewrite incremental fsync on/off. 2013-04-24 10:57:07 +02:00
antirez 05fa4f4034 Cluster: node timeout is now configurable. 2013-04-04 12:29:10 +02:00
antirez 4d62912619 Add a warning about command renaming in redis.conf. 2013-03-06 15:47:16 +01:00
Stam He d783860457 point 2 of slave-serve-stale-data miss '-' between 'stale' and 'data' 2013-03-04 10:49:07 +01:00
antirez 078882025e PSYNC: work in progress, preview #2, rebased to unstable. 2013-02-12 12:52:21 +01:00
antirez 93ae95de74 TCP keep-alive. Better documentation in redis.conf. 2013-02-09 01:17:59 +01:00
antirez 98b1a852b4 tcp-keepalive option documented in redis.conf. 2013-02-08 17:03:11 +01:00
antirez b70b459b0e TCP_NODELAY after SYNC: changes to the implementation. 2013-02-05 12:04:30 +01:00
David Celis 81144645b4 Fix a few typos and improve grammar of redis.conf
Make several edits to the example redis.conf configuration file for
improved flow and grammar.

Signed-off-by: David Celis <me@davidcel.is>
2013-02-03 11:40:07 -08:00
antirez fce016d31b Keyspace events: it is now possible to select subclasses of events.
When keyspace events are enabled, the overhead is not sever but
noticeable, so this commit introduces the ability to select subclasses
of events in order to avoid to generate events the user is not
interested in.

The events can be selected using redis.conf or CONFIG SET / GET.
2013-01-28 13:15:12 +01:00
antirez 4cdbce341e Keyspace events notification API. 2013-01-28 13:14:36 +01:00
guiquanz 9d09ce3981 Fixed many typos. 2013-01-19 10:59:44 +01:00
antirez f1481d4a03 serverCron() frequency is now a runtime parameter (was REDIS_HZ).
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.
2012-12-14 17:10:40 +01:00
antirez 712656e848 Sentinel: added documentation about slave-priority in redis.conf 2012-08-28 17:53:18 +02:00
antirez d3701d2714 Limit memory used by big SLOWLOG entries.
Two limits are added:

1) Up to SLOWLOG_ENTRY_MAX_ARGV arguments are logged.
2) Up to SLOWLOG_ENTRY_MAX_STRING bytes per argument are logged.
3) slowlog-max-len is set to 128 by default (was 1024).

The number of remaining arguments / bytes is logged in the entry
so that the user can understand better the nature of the logged command.
2012-04-21 20:34:45 +02:00
antirez 60e2e5b50d redis.conf AOF section comments improved. 2012-04-20 00:04:07 +02:00
antirez 84bcd3aa24 It is now possible to enable/disable RDB checksum computation from redis.conf or via CONFIG SET/GET. Also CONFIG SET support added for rdbcompression as well. 2012-04-10 15:47:10 +02:00
antirez ba864e09d4 Comments about security of slave-read-only in redis.coinf. 2012-03-21 12:26:05 +01:00
antirez f3fd419fc9 Support for read-only slaves. Semantical fixes.
This commit introduces support for read only slaves via redis.conf and CONFIG GET/SET commands. Also various semantical fixes are implemented here:

1) MULTI/EXEC with only read commands now work where the server is into a state where writes (or commands increasing memory usage) are not allowed. Before this patch everything inside a transaction would fail in this conditions.

2) Scripts just calling read-only commands will work against read only
slaves, when the server is out of memory, or when persistence is into an
error condition. Before the patch EVAL always failed in this condition.
2012-03-20 17:32:48 +01:00
quiver 96e9f8d5e3 fix typo of redis.conf 2012-03-10 21:09:34 +09:00
antirez 8562798308 Merge conflicts resolved. 2012-03-09 22:07:45 +01:00
antirez 4d3bbf3590 By default Redis refuses writes with an error if the latest BGSAVE failed (and at least one save point is configured). However people having good monitoring systems may prefer a server that continues to work, since they are notified that there are problems by their monitoring systems. This commit implements the ability to turn the feature on or off via redis.conf and CONFIG SET. 2012-03-07 18:02:26 +01:00
antirez f9ef912c66 more practical maxmemory+slaves hint in redis.conf 2012-02-08 00:20:46 +01:00
antirez cebb7b92ce redis.conf updated with new maxmemory semantics 2012-02-08 00:17:27 +01:00
Pieter Noordhuis d3ea4c86a8 Update default configuration 2012-01-25 13:37:43 -08:00
antirez 3cbce4f45e redis.conf typo fixed in the client-output-buffer-limit documentation 2012-01-24 14:46:23 +01:00
antirez c8a607f2b6 client-output-buffer-limit documented in redis.conf 2012-01-24 11:23:23 +01:00
antirez f7ccc4830b Merge remote-tracking branch 'origin/unstable' into unstable 2012-01-16 16:50:41 +01:00
antirez 4aac3ff247 It is now posible to flush all the previous saving points in redis.conf by using a save directive with a single empty string argument, like it happens for CONFIG SET save. 2012-01-16 16:50:24 +01:00
Kashif Rasul 57c0cf8b85 Fixed some typos in redis.conf. 2011-12-28 22:14:23 +01:00
diegok ce6628dae7 Fixed a config docs typo. 2011-12-22 12:22:23 +01:00
antirez c6f9ee88fa default log level is now notice. 2011-11-30 15:04:40 +01:00
Jérémy Bethmont 92a157eae5 Fixed a typo in comments. 2011-11-21 09:38:14 +08:00
antirez 0b14e44118 redis.conf updated to reflect the new scripting timeout semantics. 2011-11-18 16:29:22 +01:00
antirez aba4adb7dc use timeout 0 by default, as this is a common source of problems. 2011-10-31 15:43:09 +01:00
antirez 85ccd57632 added more clarifications in redis.conf about ther right value to set as replication timeout. 2011-10-31 11:17:21 +01:00
Herbert G. Fischer f15e33a884 fixed typo in comments 2011-10-31 11:13:37 +01:00
antirez 8996bf7720 7c6da73 2011-10-31 11:13:28 +01:00
antirez 58732c23d5 maxclients configuration is now implemented dealing with the actual process rlimits. Setting maxclients to 0 no longer makes sense and is now invalid, the new default is 10000.
See issue #162 for more information.
2011-10-31 10:49:27 +01:00
antirez 115e3ff39e If a Lua script executes for more time than the max time specified in the configuration Redis will log a warning, and will start accepting queries (re-entering the event loop), returning -SLOWSCRIPT error for all the commands but SHUTDOWN that remains callable. 2011-10-27 14:49:10 +02:00
Nathan Florea 8523876503 Added a config directive for a Unix socket mask
Added a configuration directive to allow a user to specify the
permissions to be granted to the Unix socket file.  I followed
the format Pieter and Salvatore discusses in issue #85 (
https://github.com/antirez/redis/issues/85).
2011-10-10 11:21:15 -07:00
antirez 07c152a7bd cluster config file entries added to the example configuration file 2011-09-28 15:55:52 +02:00
antirez 0681c5ad84 master branch merged into scripting. 2011-07-12 12:39:16 +02:00
antirez 208092ad70 Fixed typo in redis.conf related to slow log parameters 2011-07-03 15:49:49 +02:00
antirez de32c37c06 More redis.conf self-documentation. Now even queries that took exactly server.slow_log_slower_than are logged, as this is not exact but is more intuitive for people, and a value of 0 will force every query to be logged. 2011-06-30 15:54:05 +02:00
antirez 35a6044140 slow log configuration implemented 2011-06-30 15:47:15 +02:00
antirez 994ed2bc55 unstable merge conflicts resolved 2011-06-25 12:29:24 +02:00
antirez c9d0c3623a diskstore removed 2011-06-25 12:22:03 +02:00
antirez 0d1650f8a9 Updated to unstable 2011-06-14 18:06:39 +02:00
antirez b333e23997 automatic AOF rewrite first implementation. Still to be tested. 2011-06-10 12:39:23 +02:00
antirez eeffcf380f Lua scripts max execution time 2011-05-25 12:32:48 +02:00
Pieter Noordhuis 3ea204e103 Configurable thresholds for encoded sorted sets 2011-03-09 14:01:57 +01:00
antirez 68d6345ddf If port zero is specified, Redis will not listen for TCP connections 2011-02-07 12:52:01 +01:00
antirez b8cfcea424 default hash encoding settings also fixed in redis.conf 2011-01-15 22:31:07 +01:00
Pieter Noordhuis a2b33f2f93 Remove glueoutputbuf from redis.conf 2011-01-05 10:42:37 +01:00
antirez aa81e4d5f4 minor changes to doc and comments 2010-12-31 18:23:31 +01:00
antirez 6a246b1e7e special encoding limits redefined, and all the config options for special encodings added in the example redis.conf file 2010-12-14 18:23:52 +01:00
Jonah H. Harris e1a586ee69 syslog support 2010-12-09 11:10:21 -05:00
antirez 5402c4262e added noeviction policy to redis maxmemory. ZSCORE removed from the list of commands that can't be called when we are low on memory, this command was added in the past for a stupid error. 2010-11-08 16:12:16 +01:00
antirez 4ebfc45528 config option to select if when replication link with master a slave should or not serve stale data 2010-11-04 19:59:21 +01:00
antirez 8d3e063a0a added support for command renaming/suppression in redis.conf 2010-11-03 12:14:36 +01:00
antirez 0a546fc017 Merge remote branch 'pietern/unixsocket' 2010-11-02 23:47:52 +01:00
antirez a36879293d maxmemory-samples implemented in CONFIG command and configuration file 2010-10-15 11:57:38 +02:00
antirez 165346ca29 implemented different algorithms for maxmemory 2010-10-14 21:22:21 +02:00
Pieter Noordhuis 893819801d Remove disabling TCP with port -1 2010-10-13 17:18:58 +02:00
Pieter Noordhuis 5d10923f7b Rename variable sockpath to unixsocket 2010-10-13 17:17:56 +02:00
Pieter Noordhuis a5639e7dd9 Change initialization to allow listening on both a port and socket 2010-08-03 13:33:12 +02:00
antirez d5d23dabd7 redis.conf new features the new option, a minor typo preventing the compilation fixed 2010-05-28 10:48:04 +02:00
antirez 9682a58fca conflicts resolved 2010-05-13 14:24:41 +02:00
antirez 1b67773229 CONFIG now can change appendfsync policy at run time 2010-05-10 20:56:54 +02:00
Pieter Noordhuis f3b52411db make append only filename configurable 2010-05-07 11:55:12 +02:00
antirez a0e7e5f516 swap file name pid expansion removed. Not suited for mission critical software... 2010-05-07 09:36:37 +02:00
antirez 029245feac clarified a few messages in redis.conf 2010-05-06 18:04:51 +02:00
antirez 723240057a new units for bytes specification 2010-04-22 15:09:07 +02:00
antirez 8ca3e9d10b Active rehashing 2010-04-15 18:07:57 +02:00
antirez bdcb92f273 shareobjects feautres killed - no gains most of the time, but VM complexities 2010-04-09 17:13:39 +02:00
antirez 4005fef124 Now PUBLISH commands are replicated to slaves 2010-04-02 16:42:15 +02:00
Jeremy Zawodny b3f83f1272 support for include directive in config parser 2010-03-19 22:24:17 -07:00
antirez cbba7dd7c9 HSET fixes, now the new pointer is stored back in the object pointer field 2010-03-07 23:41:48 +01:00
antirez 5921aa36ed Bug #169 fixed (BLOP/BRPOP interrupted connections are not cleared from the queue) 2010-02-27 12:26:08 +01:00
antirez ce8330208a Saner VM defaults for redis.conf 2010-02-10 15:59:09 +01:00
antirez 6766f45ef2 multi bulk requests in redis-benchmark, default fsync policy changed to everysec, added a prefix character for DEBUG logs 2010-02-06 13:39:07 +01:00
antirez 054e426dbd support for named VM swap file. Fixed a few important interaction issues between the background saving processes and IO threads 2010-01-15 13:14:23 -05:00
antirez 72e9fd40b6 support for blocking VM in config file 2010-01-12 15:23:52 -05:00
antirez 92f8e88204 non-blocking VM data structures, just a start 2010-01-09 12:46:52 -05:00
antirez c9e5c23d5b vm-enabled set to no by default in redis.conf 2010-01-06 21:05:03 -05:00
antirez 38aba9a121 a new default redis.conf 2010-01-06 21:03:16 -05:00
antirez 7d98e08c0a VM stats in INFO command 2010-01-06 20:14:27 -05:00
antirez f870935d3e Introduced a new log verbosity level, so now DEBUG is really for debugging. Refactored a bit maxmemory. When virtual memory is short in RAM free the objects freelist as well as swapping things out. 2010-01-06 09:15:17 -05:00
antirez e7546c6393 BGREWRITEAOF now works with swapping on 2010-01-05 19:15:15 -05:00
antirez 4ef8de8ad7 basic VM mostly working! 2010-01-05 12:46:59 -05:00
antirez a35ddf129c more object-level VM primitives 2010-01-05 07:19:09 -05:00
antirez b055378971 LZF compression re-enabled by default, but with INIT_HTAB set to 0 to avoid the very costly memset initialization. Note that with this option set valgrind will output some false positive about lzf_c.c 2009-12-16 15:48:57 -05:00
antirez 121f70cfae lzf compression switched off by default now, with config file option to enable it in redis.conf 2009-12-16 11:28:41 -05:00
antirez 49b99ab43e Changed the reply of BGSAVE and BGREWRITEAOF from +OK to a more meaningful message that makes the user aware of an operation that just started and is not yet finished. 2009-12-13 16:52:43 +01:00
antirez 3f477979b3 TODO list modified. What's planned for 1.4 is now written in the stone ;) 2009-12-12 19:42:42 +01:00
antirez 4e141d5a21 append only mode is now able to translate EXPIRE into EXPIREAT transparently 2009-10-30 17:20:24 +01:00
antirez 0154acdc57 appendfsync is now set to NO by default 2009-10-30 16:35:16 +01:00
antirez 48f0308ad3 support for appendonly mode no, always, everysec 2009-10-30 13:48:53 +01:00
antirez 44b38ef432 Initial implementation of append-only mode. Loading still not implemented. 2009-10-30 01:04:17 +01:00
antirez e52c65b90a shareobjectspoolsize implemented in reds.conf, in order to control the pool size when object sharing is on 2009-06-03 16:01:32 +02:00
antirez 144d479b7c minor fix for Solaris boxes 2009-05-28 18:25:22 +02:00
antirez 3fd78bcd45 maxmemory implemented 2009-05-27 22:53:20 +02:00
antirez 285add5558 maxclients implemented, see redis.conf for details 2009-05-25 23:29:18 +02:00
Aman Gupta 0150db364d Allow timeout=0 config to disable client timeouts 2009-05-19 22:36:11 -07:00
antirez b8b553c84f ability to specify a different file name for the DB 2009-04-27 18:10:00 +02:00
antirez 290deb8b8c TODO changes, minor change to default redis.conf 2009-04-08 13:46:26 +02:00
antirez f2aa84bd63 Lua client added thanks to Daniele Alessandri 2009-03-26 17:23:51 +01:00
Brian Hammond abcb223ec0 Adds AUTH command.
$ make
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  adlist.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  ae.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  anet.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  dict.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  redis.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  sds.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  zmalloc.c
cc -o redis-server -O2 -Wall -W -DSDS_ABORT_ON_OOM -g adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o

Hint: To run the test-redis.tcl script is a good idea.
Launch the redis server with ./redis-server, then in another
terminal window enter this directory and run 'make test'.

cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  benchmark.c
cc -o redis-benchmark -O2 -Wall -W -DSDS_ABORT_ON_OOM -g ae.o anet.o benchmark.o sds.o adlist.o zmalloc.o
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  redis-cli.c
cc -o redis-cli -O2 -Wall -W -DSDS_ABORT_ON_OOM -g anet.o sds.o adlist.o redis-cli.o zmalloc.o

$ tail -1 redis.conf

$ ./redis-server redis.conf &
[1] 52494
$ - Server started, Redis version 0.08
- DB loaded from disk
- The server is now ready to accept connections on port 6379
. 0 clients connected (0 slaves), 1932 bytes in use

$ make test
tclsh test-redis.tcl
DEL all keys to start with a clean DB                                  . Accepted 127.0.0.1:54490
PASSED
SET and GET an item                                                    PASSED
DEL against a single item                                              PASSED
KEYS with pattern                                                      PASSED
KEYS to get all keys                                                   PASSED
DBSIZE                                                                 PASSED
DEL all keys                                                           PASSED
Very big payload in GET/SET                                            PASSED
SET 10000 numeric keys and access all them in reverse order            . DB 0: 10001 keys in 16384 slots HT.
. 1 clients connected (0 slaves), 4885707 bytes in use
PASSED
DBSIZE should be 10001 now                                             PASSED
INCR against non existing key                                          PASSED
INCR against key created by incr itself                                PASSED
INCR against key originally set with SET                               PASSED
SETNX target key missing                                               PASSED
SETNX target key exists                                                PASSED
EXISTS                                                                 PASSED
Zero length value in key. SET/GET/EXISTS                               PASSED
Commands pipelining                                                    PASSED
Non existing command                                                   PASSED
Basic LPUSH, RPUSH, LLENGTH, LINDEX                                    PASSED
DEL a list                                                             PASSED
Create a long list and check every single element with LINDEX          PASSED
Test elements with LINDEX in random access                             PASSED
LLEN against non-list value error                                      PASSED
LINDEX against non-list value error                                    PASSED
LPUSH against non-list value error                                     PASSED
RPUSH against non-list value error                                     PASSED
RENAME basic usage                                                     PASSED
RENAME source key should no longer exist                               PASSED
RENAME against already existing key                                    PASSED
RENAMENX basic usage                                                   PASSED
RENAMENX against already existing key                                  PASSED
RENAMENX against already existing key (2)                              PASSED
RENAME against non existing source key                                 PASSED
RENAME where source and dest key is the same                           PASSED
DEL all keys again (DB 0)                                              PASSED
DEL all keys again (DB 1)                                              PASSED
MOVE basic usage                                                       PASSED
MOVE against key existing in the target DB                             PASSED
SET/GET keys in different DBs                                          PASSED
Basic LPOP/RPOP                                                        PASSED
LPOP/RPOP against empty list                                           PASSED
LPOP against non list value                                            PASSED
Mass LPUSH/LPOP                                                        PASSED
LRANGE basics                                                          PASSED
LRANGE inverted indexes                                                PASSED
LRANGE out of range indexes including the full list                    PASSED
LRANGE against non existing key                                        PASSED
LTRIM basics                                                           PASSED
LSET                                                                   PASSED
LSET out of range index                                                PASSED
LSET against non existing key                                          PASSED
LSET against non list value                                            PASSED
SADD, SCARD, SISMEMBER, SMEMBERS basics                                PASSED
SADD adding the same element multiple times                            PASSED
SADD against non set                                                   PASSED
SREM basics                                                            PASSED
Mass SADD and SINTER with two sets                                     PASSED
SINTERSTORE with two sets                                              PASSED
SINTER against three sets                                              PASSED
SINTERSTORE with three sets                                            PASSED
SAVE - make sure there are all the types as values                     - DB saved on disk
PASSED
Create a random list                                                   . DB 0: 6057 keys in 16384 slots HT.
. DB 1: 3 keys in 16 slots HT.
. 1 clients connected (0 slaves), 1045147 bytes in use
PASSED
SORT with BY against the newly created list                            PASSED
SORT direct, numeric, against the newly created list                   PASSED
SORT decreasing sort                                                   PASSED
SORT speed, sorting 10000 elements list using BY, 100 times
  Average time to sort: 5.28 milliseconds PASSED
SORT speed, sorting 10000 elements list directly, 100 times
  Average time to sort: 1.53 milliseconds PASSED
SORT speed, pseudo-sorting 10000 elements list, BY <const>, 100 times
  Average time to sort: 0.47 milliseconds PASSED
SORT regression for issue #19, sorting floats                          - DB saved on disk
PASSED
LREM, remove all the occurrences                                       - DB saved on disk
PASSED
LREM, remove the first occurrence                                      PASSED
LREM, remove non existing element                                      PASSED
LREM, starting from tail with negative count                           - DB saved on disk
PASSED
LREM, starting from tail with negative count (2)                       PASSED
MGET                                                                   - DB saved on disk
PASSED
MGET against non existing key                                          PASSED
MGET against non-string key                                            PASSED
FLUSHALL                                                               - DB saved on disk
PASSED

79 tests, 79 passed, 0 failed
. Client closed connection
. 0 clients connected (0 slaves), 1347660 bytes in use

$ kill -15 %1
[1]+  Terminated              ./redis-server redis.conf

$ vim redis.conf

$ tail -1 redis.conf
requirepass foobared

$ ./redis-server redis.conf &
[1] 52518
$ - Server started, Redis version 0.08
- DB loaded from disk
- The server is now ready to accept connections on port 6379
. 0 clients connected (0 slaves), 1945 bytes in use

$ make test
tclsh test-redis.tcl
. Accepted 127.0.0.1:54492
DEL all keys to start with a clean DB

ERR operation not permitted

    while executing
"::redis::redis_read_reply $fd"
    (procedure "::redis::__dispatch__" line 13)
    invoked from within
"$r keys *"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code"
    (procedure "test" line 4)
    invoked from within
"test {DEL all keys to start with a clean DB} {
        foreach key [$r keys *] {$r del $key}
        $r dbsize
    } {0}"
    (procedure "main" line 13)
    invoked from within
"main 127.0.0.1 6379"
    invoked from within
"if {[llength $argv] == 0} {
    main 127.0.0.1 6379
} elseif {[llength $argv] == 1 && [lindex $argv 0] eq {stress}} {
    stress
} else {
    main [li..."
    (file "test-redis.tcl" line 630)
. Client closed connection
make: *** [test] Error 1
. 0 clients connected (0 slaves), 2041 bytes in use
. 0 clients connected (0 slaves), 2041 bytes in use

$ kill -15 %1
[1]+  Terminated              ./redis-server redis.conf

$ vim test-redis.tcl

$ git diff test-redis.tcl
2009-03-25 23:03:56 -04:00
antirez 10c43610de Nasty bug of the new DB format fixed, objects sharing implemented 2009-03-25 21:00:48 +01:00
Luc Heinrich ed329fcf25 Allow to specify the pid file from the config file. 2009-03-23 12:31:33 +01:00
antirez ed9b544e10 first commit 2009-03-22 10:30:00 +01:00