Redict https://redict.io/ Recent content on Redict Hugo en-us Wed, 08 Oct 2025 00:00:00 +0000 Redis benchmark https://redict.io/docs/usage/optimization/benchmarks/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/optimization/benchmarks/ <p>Redis includes the <code>redis-benchmark</code> utility that simulates running commands done by N clients while at the same time sending M total queries. The utility provides a default set of tests, or you can supply a custom set of tests.</p> <p>The following options are supported:</p> <pre><code>Usage: redis-benchmark [-h &lt;host&gt;] [-p &lt;port&gt;] [-c &lt;clients&gt;] [-n &lt;requests]&gt; [-k &lt;boolean&gt;] -h &lt;hostname&gt; Server hostname (default 127.0.0.1) -p &lt;port&gt; Server port (default 6379) -s &lt;socket&gt; Server socket (overrides host and port) -a &lt;password&gt; Password for Redis Auth -c &lt;clients&gt; Number of parallel connections (default 50) -n &lt;requests&gt; Total number of requests (default 100000) -d &lt;size&gt; Data size of SET/GET value in bytes (default 3) --dbnum &lt;db&gt; SELECT the specified db number (default 0) -k &lt;boolean&gt; 1=keep alive 0=reconnect (default 1) -r &lt;keyspacelen&gt; Use random keys for SET/GET/INCR, random values for SADD Using this option the benchmark will expand the string __rand_int__ inside an argument with a 12 digits number in the specified range from 0 to keyspacelen-1. The substitution changes every time a command is executed. Default tests use this to hit random keys in the specified range. -P &lt;numreq&gt; Pipeline &lt;numreq&gt; requests. Default 1 (no pipeline). -q Quiet. Just show query/sec values --csv Output in CSV format -l Loop. Run the tests forever -t &lt;tests&gt; Only run the comma separated list of tests. The test names are the same as the ones produced as output. -I Idle mode. Just open N idle connections and wait. </code></pre> <p>You need to have a running Redis instance before launching the benchmark. You can run the benchmarking utility like so:</p> Community Redict modules https://redict.io/docs/modules/community/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/modules/community/ <h1 id="community-modules-for-redict"> Community Modules for Redict <a class="anchor" href="#community-modules-for-redict">#</a> </h1> <p>Redict Modules allow you to extend the functionality of Redict with native code. For details on writing new modules, see <a href="https://redict.io/docs/modules/">Introduction to Redict Modules</a>.</p> <blockquote class="book-hint info"> <p><strong>Note</strong>: Redict is broadly compatible with Redis® Modules* compatible with Redis® versions 7.2.4 and earlier in source and binary form. See <a href="https://redict.io/docs/redis-compat/">Compatibility with Redis®</a> for details.</p> </blockquote> Executing Lua scripts https://redict.io/docs/scripting/eval-intro/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/scripting/eval-intro/ <h1 id="executing-lua-scripts-in-redict"> Executing Lua scripts in Redict <a class="anchor" href="#executing-lua-scripts-in-redict">#</a> </h1> <p>Redict lets users upload and execute Lua scripts on the server. Scripts can employ programmatic control structures and use most of the <a href="https://redict.io/docs/commands">commands</a> while executing to access the database. Because scripts execute in the server, reading and writing data from scripts is very efficient.</p> <p>Redict guarantees the script&rsquo;s atomic execution. While executing the script, all server activities are blocked during its entire runtime. These semantics mean that all of the script&rsquo;s effects either have yet to happen or had already happened.</p> Migrating packages https://redict.io/docs/redis-compat/package/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/redis-compat/package/ <h1 id="migrating-your-distribution-to-redict"> Migrating your distribution to Redict <a class="anchor" href="#migrating-your-distribution-to-redict">#</a> </h1> <p>This page is intended for maintainers of downstream Redis® packages in large software distributions which are deprecating their Redis® package due to the license change and looking to provide Redict to their users as a replacement.</p> <h2 id="build-system-changes"> Build system changes <a class="anchor" href="#build-system-changes">#</a> </h2> <p>The build system is largely unchanged from Redis® 7.2.4. Your build scripts can be updated by simply replacing the source tarball with the appropriate <a href="https://codeberg.org/redict/redict/releases">Codeberg release</a>, then replacing &ldquo;redis&rdquo; with &ldquo;redict&rdquo; throughout.</p> Redict modules and blocking commands https://redict.io/docs/modules/blocking-ops/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/modules/blocking-ops/ <h1 id="redict-modules-and-blocking-commands"> Redict modules and blocking commands <a class="anchor" href="#redict-modules-and-blocking-commands">#</a> </h1> <p>Redict has a few blocking commands among the built-in set of commands. One of the most used is <code>BLPOP</code> (or the symmetric <code>BRPOP</code>) which blocks waiting for elements arriving in a list.</p> <p>The interesting fact about blocking commands is that they do not block the whole server, but just the client calling them. Usually the reason to block is that we expect some external event to happen: this can be some change in the Redict data structures like in the <code>BLPOP</code> case, a long computation happening in a thread, to receive some data from the network, and so forth.</p> Migrating containers https://redict.io/docs/redis-compat/containers/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/redis-compat/containers/ <h1 id="migrating-to-redict-containers"> Migrating to Redict containers <a class="anchor" href="#migrating-to-redict-containers">#</a> </h1> <blockquote class="book-hint info"> <p>For complete details on installing and using Redict containers, see <a href="https://redict.io/docs/install/containers/">Usage with containers</a>.</p> </blockquote> <p>Redict differs from Redis® container in that the &ldquo;latest&rdquo; image and images based on it (e.g. &ldquo;7.3.1&rdquo;) refer to images based on &ldquo;scratch&rdquo; rather than Debian. Debian- and Alpine-based containers are available and broadly compatible with Redis® containers, but you may wish to consider the opportunity to migrate to a scratch container if you do not depend on any Debian- or Alpine-specific features being available.</p> Modules API for native types https://redict.io/docs/modules/native-types/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/modules/native-types/ <h1 id="modules-api-for-native-types"> Modules API for native types <a class="anchor" href="#modules-api-for-native-types">#</a> </h1> <p>Redict modules can access Redict built-in data structures both at high level, by calling Redict commands, and at low level, by manipulating the data structures directly.</p> <p>By using these capabilities in order to build new abstractions on top of existing Redict data structures, or by using strings DMA in order to encode modules data structures into Redict strings, it is possible to create modules that <em>feel like</em> they are exporting new data types. However, for more complex problems, this is not enough, and the implementation of new data structures inside the module is needed.</p> Using Lua functions https://redict.io/docs/scripting/functions-intro/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/scripting/functions-intro/ <h1 id="redict-functions"> Redict Functions <a class="anchor" href="#redict-functions">#</a> </h1> <p>Redict Functions is an API for managing code to be executed on the server. They are an evolutionary step from ephemeral scripting.</p> <p>Functions provide the same core functionality as scripts but are first-class software artifacts of the database. Redict manages functions as an integral part of the database and ensures their availability via data persistence and replication. Because functions are part of the database and therefore declared before use, applications aren&rsquo;t required to load them during runtime nor risk aborted transactions. An application that uses functions depends only on their APIs rather than on the embedded script logic in the database.</p> Debugging Lua scripts https://redict.io/docs/scripting/debugging/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/scripting/debugging/ <h2 id="debugging-lua-scripts-in-redict"> Debugging Lua scripts in Redict <a class="anchor" href="#debugging-lua-scripts-in-redict">#</a> </h2> <p>Redict includes a complete Lua debugger, that can be used in order to make the task of writing complex Redict scripts much simpler.</p> <blockquote class="book-hint danger"> <p><strong>Note</strong>: Please make sure to avoid debugging Lua scripts using your Redict production server. Use a development server instead. Also note that using the synchronous debugging mode (which is NOT the default) results in the Redict server blocking for all the time the debugging session lasts.</p> API reference https://redict.io/docs/scripting/api/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/scripting/api/ <h1 id="redict-lua-api-reference"> Redict Lua API reference <a class="anchor" href="#redict-lua-api-reference">#</a> </h1> <p>Redict includes an embedded <a href="https://www.lua.org/">Lua 5.1</a> interpreter. The interpreter runs user-defined <a href="https://redict.io/docs/scripting/eval-intro">ephemeral scripts</a> and <a href="https://redict.io/docs/scripting/functions-intro">functions</a>. Scripts run in a sandboxed context and can only access specific Lua packages. This page describes the packages and APIs available inside the execution&rsquo;s context.</p> <h2 id="sandbox-context"> Sandbox context <a class="anchor" href="#sandbox-context">#</a> </h2> <p>The sandboxed Lua context attempts to prevent accidental misuse and reduce potential threats from the server&rsquo;s environment.</p> <p>Scripts should never try to access the Redict server&rsquo;s underlying host systems. That includes the file system, network, and any other attempt to perform a system call other than those supported by the API.</p> Community resources https://redict.io/docs/community/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/community/ <h1 id="engaging-with-the-community"> Engaging with the community <a class="anchor" href="#engaging-with-the-community">#</a> </h1> <p>There are many ways to engage with the Redict community. Note that the Redict project has adopted the <a href="https://www.contributor-covenant.org/version/2/1/code_of_conduct/">Contributor Covenant Code of Conduct</a>.</p> <h2 id="repository-and-issue-tracker"> Repository and issue tracker <a class="anchor" href="#repository-and-issue-tracker">#</a> </h2> <p>The Redict project is hosted on <a href="https://codeberg.org/redict">Codeberg</a>. The code, documentation, and website have individual repositories with their own issue trackers.</p> <p>No contributor license agreement (CLA) or contribution assignment agreement (CAA) is required for contributing to any part of the Redict project.</p> About the license https://redict.io/docs/license/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/license/ <h1 id="about-the-license"> About the license <a class="anchor" href="#about-the-license">#</a> </h1> <p>Redict is distributed using the <a href="https://www.gnu.org/licenses/lgpl-3.0.en.html">Lesser GNU General Public License</a>, aka LGPL-3.0-only, and is based on the Redis®<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> OSS 7.2.4 3-Clause BSD licensed source code.</p> <p>LGPL is a copyleft license. The following is no substitute for the advice of a lawyer, particularly in more complex scenarios, but it suffices to summarize the basic functions of this license for those unfamiliar with the concept.</p> <blockquote class="book-hint info"> <p><strong>Tip:</strong> Commercial and non-commercial users of Redict are not required to publish or otherwise &ldquo;open source&rdquo; the source code of Redict, including any private modifications they make to the source code, nor are they required to publish the source code of any software they use in combination with Redict.</p> Redict 7.3.6 is now available https://redict.io/posts/2025-10-08-redict-7.3.6-release/ Wed, 08 Oct 2025 00:00:00 +0000 https://redict.io/posts/2025-10-08-redict-7.3.6-release/ <p>Redict 7.3.6 is now available and includes important security updates. Deployments which allow authenticated, untrusted users access to the Redict database are asked to upgrade urgently.</p> <p>You may download the release <a href="https://codeberg.org/redict/redict/releases/tag/7.3.6">on Codeberg</a>, or update your official <a href="https://redict.io/docs/install/containers/">container images</a> via registry.redict.io.</p> <p>Redict 7.3.6 includes fixes for the following security vulnerabilities:</p> <ul> <li><a href="https://www.cve.org/CVERecord?id=CVE-2025-49844">CVE-2025-49844</a></li> <li><a href="https://www.cve.org/CVERecord?id=CVE-2025-46817">CVE-2025-46817</a></li> <li><a href="https://www.cve.org/CVERecord?id=CVE-2025-46818">CVE-2025-46818</a></li> <li><a href="https://www.cve.org/CVERecord?id=CVE-2025-46819">CVE-2025-46819</a></li> </ul> <p>No other changes are included in this release.</p> <p>The SHA-256 checksum of the Redict 7.3.6 release tarball is <code>3d6aedad01f8137beeb2aabc74c128b4eec9a2d0d4433892b855fb2f4e6f39f2</code>.</p> Redict 7.3.5 is now available https://redict.io/posts/2025-07-14-redict-7.3.5-release/ Mon, 14 Jul 2025 00:00:00 +0000 https://redict.io/posts/2025-07-14-redict-7.3.5-release/ <p>Redict 7.3.5 is now available and includes security updates of moderate importance. Deployments which allow authenticated, untrusted users access to the Redict database are asked to upgrade urgently.</p> <p>You may download the release <a href="https://codeberg.org/redict/redict/releases/tag/7.3.5">on Codeberg</a>, or update your official <a href="https://redict.io/docs/install/containers/">container images</a> via registry.redict.io.</p> <p>Redict 7.3.5 includes fixes for the following security vulnerabilities:</p> <ul> <li><a href="https://www.cve.org/CVERecord?id=CVE-2025-32023">CVE-2025-32023</a></li> </ul> <p>No other changes are included in this release.</p> <p>The SHA-256 checksum of the Redict 7.3.5 release tarball is <code>1528db77c3539190ebe1fe3963347e02ac8095aff75a19b3373cddcf3f920405</code>.</p> Redict 7.3.4 is now available https://redict.io/posts/2025-07-11-redict-7.3.4-release/ Fri, 11 Jul 2025 00:00:00 +0000 https://redict.io/posts/2025-07-11-redict-7.3.4-release/ <p>Redict 7.3.4 is now available and includes minor security updates. You may download the release <a href="https://codeberg.org/redict/redict/releases/tag/7.3.4">on Codeberg</a>, or update your official <a href="https://redict.io/docs/install/containers/">container images</a> via registry.redict.io.</p> <p>Redict 7.3.4 includes fixes for the following security vulnerabilities:</p> <ul> <li><a href="https://www.cve.org/CVERecord?id=CVE-2025-48367">CVE-2025-48367</a></li> </ul> <p>No other changes are included in this release.</p> <p>The SHA-256 checksum of the Redict 7.3.4 release tarball is <code>6c7e60b8b10a46f6fce8ccaaf1d6bf9d0db796a4d6169422c34dedbf8a4cb680</code>.</p> Redict 7.3.3 is now available for urgent deployment https://redict.io/posts/2025-05-05-redict-7.3.3-released/ Mon, 05 May 2025 00:00:00 +0000 https://redict.io/posts/2025-05-05-redict-7.3.3-released/ <p>Redict 7.3.3 is now available and includes important security updates. You may download the release <a href="https://codeberg.org/redict/redict/releases/tag/7.3.3">on Codeberg</a>, or update your official <a href="https://redict.io/docs/install/containers/">container images</a> via registry.redict.io.</p> <p>Redict 7.3.3 includes fixes for the following security vulnerabilities:</p> <ul> <li><a href="https://www.cve.org/CVERecord?id=CVE-2025-21605">CVE-2025-21605</a></li> </ul> <p>No other changes are included in this release.</p> <p>The SHA-256 checksum of the Redict 7.3.3 release tarball is <code>5f96a35620f134ff8d3e91fe9b63ef2f45d343b12b94790ba61cdf2178516b26</code>.</p> Redict 7.3.2 is now available for urgent deployment https://redict.io/posts/2025-01-08-redict-7.3.2-released/ Wed, 08 Jan 2025 00:00:00 +0000 https://redict.io/posts/2025-01-08-redict-7.3.2-released/ <p>Redict 7.3.2 is now available and includes important security updates. You may download the release <a href="https://codeberg.org/redict/redict/releases/tag/7.3.2">on Codeberg</a>, or update your official <a href="https://redict.io/docs/install/containers/">container images</a> via registry.redict.io.</p> <p>Redict 7.3.2 includes fixes for the following security vulnerabilities:</p> <ul> <li><a href="https://www.cve.org/CVERecord?id=CVE-2024-46981">CVE-2024-46981</a></li> <li><a href="https://www.cve.org/CVERecord?id=CVE-2024-51741">CVE-2024-51741</a></li> </ul> <p>No other changes are included in this release.</p> <p>The SHA-256 checksum of the Redict 7.3.2 release tarball is <code>c00ddb7d9eea879b3effc3dd7d1a8cff954fb472915ab9002ec56068c3af2a73</code>.</p> Redict 7.3.1 is now available for urgent deployment https://redict.io/posts/2024-10-01-redict-7.3.1-released/ Tue, 01 Oct 2024 00:00:00 +0000 https://redict.io/posts/2024-10-01-redict-7.3.1-released/ <p>Redict 7.3.1 is now available and includes important security updates. You may download the release <a href="https://codeberg.org/redict/redict/releases/tag/7.3.1">on Codeberg</a>, or update your official <a href="https://redict.io/docs/install/containers/">container images</a> via registry.redict.io.</p> <p>Redict 7.3.1 includes fixes for the following security vulnerabilities:</p> <ul> <li><a href="https://www.cve.org/CVERecord?id=CVE-2024-31449">CVE-2024-31449</a></li> <li><a href="https://www.cve.org/CVERecord?id=CVE-2024-31227">CVE-2024-31227</a></li> <li><a href="https://www.cve.org/CVERecord?id=CVE-2024-31228">CVE-2024-31228</a></li> </ul> <p>No other changes are included in this release.</p> <p>The SHA-256 checksum of the Redict 7.3.1 release tarball is <code>6dbe80d28503a9252048ab81856efcfec109cdf3f924e840411c30237cf8f634</code>.</p> Early notice for Redict 7.3.1 security release https://redict.io/posts/2024-09-16-redict-7.3.1-early-notice/ Mon, 16 Sep 2024 00:00:00 +0000 https://redict.io/posts/2024-09-16-redict-7.3.1-early-notice/ <p>Please be advised that Redict version 7.3.1 is scheduled for release on October 1st and includes changes which address the following vulnerabilities (currently under embargo):</p> <ul> <li>CVE-2024-31449</li> <li>CVE-2024-31227</li> <li>CVE-2024-31228</li> </ul> <p>Users are encouraged to upgrade their Redict installation urgently once the release is available on October 1st.</p> Redict 7.3.0 is now available https://redict.io/posts/2024-04-03-redict-7.3.0-released/ Wed, 03 Apr 2024 00:00:00 +0000 https://redict.io/posts/2024-04-03-redict-7.3.0-released/ <p>The Redict community is pleased to announce the release of Redict 7.3.0, the first stable version of our copyleft fork of Redis® OSS 7.2.4.<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> You can download the release <a href="https://codeberg.org/redict/redict/releases/tag/7.3.0">on Codeberg</a>, or download one of our official <a href="https://redict.io/docs/install/containers/">container images</a> from registry.redict.io.</p> <p>We have written comprehensive documentation detailing our <a href="https://redict.io/docs/redis-compat/">compatibility with Redis® OSS 7.2.4</a>, which also provides detailed documentation for various migration scenarios, such as for users of the official Redis® containers on Docker Hub, downstream package maintainers, and so on.</p> Redict release candidate 7.3.0-rc1 is now available: call for testing https://redict.io/posts/2024-03-26-redict-release-candidate-7.3.0-rc1/ Tue, 26 Mar 2024 00:00:00 +0000 https://redict.io/posts/2024-03-26-redict-release-candidate-7.3.0-rc1/ <p>The initial release candidate for Redict&rsquo;s first general release, 7.3.0-rc1, is now available for download and testing. You can find the release on Codeberg:</p> <p><strong>Redict 7.3.0-rc1</strong></p> <ul> <li><a href="https://codeberg.org/redict/redict/releases/tag/7.3.0-rc1">Release notes</a></li> <li><a href="https://codeberg.org/redict/redict/archive/7.3.0-rc1.tar.gz">Download .tar.gz</a></li> <li><a href="https://codeberg.org/redict/redict/src/tag/7.3.0-rc1">Browse source code</a></li> </ul> <p>Update: 7.3.0-rc2 is now available, with two minor changes from rc1:</p> <p><strong>Redict 7.3.0-rc2</strong></p> <ul> <li><a href="https://codeberg.org/redict/redict/releases/tag/7.3.0-rc2">Release notes</a></li> <li><a href="https://codeberg.org/redict/redict/archive/7.3.0-rc2.tar.gz">Download .tar.gz</a></li> <li><a href="https://codeberg.org/redict/redict/src/tag/7.3.0-rc2">Browse source code</a></li> </ul> <blockquote class="book-hint info"> <p><strong>First time here?</strong> Redict is an independent fork of Redis®* OSS 7.2.4 licensed under the Lesser GNU General Public license (LGPL-3.0-only). Redict is not affiliated with Redis®. See <a href="https://redict.io/posts/2024-03-22-redict-is-an-independent-fork/">the announcement</a> for more details.</p> Redict is an independent, copyleft fork of Redis® https://redict.io/posts/2024-03-22-redict-is-an-independent-fork/ Fri, 22 Mar 2024 00:00:00 +0000 https://redict.io/posts/2024-03-22-redict-is-an-independent-fork/ <p>Like many of you, I was disappointed when I learned that Redis®<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> was changing to <a href="https://github.com/redis/redis/pull/13157">a non-free licensing model</a>. This is a betrayal of the free software community, but perhaps not an entirely surprising one. Forks are likely to start appearing in the coming days, and today, I would like to offer <a href="https://redict.io/">Redict</a> to you as a possible future home for your needs, and present its trade-offs as compared to the other forks you&rsquo;re likely to be choosing from soon.</p> ACL https://redict.io/docs/commands/acl/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/acl/ ACL https://redict.io/docs/usage/security/acl/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/security/acl/ <h1 id="redict-access-control-list"> Redict Access Control List <a class="anchor" href="#redict-access-control-list">#</a> </h1> <p>The Redict ACL, short for Access Control List, is the feature that allows certain connections to be limited in terms of the commands that can be executed and the keys that can be accessed. The way it works is that, after connecting, a client is required to provide a username and a valid password to authenticate. If authentication succeeded, the connection is associated with a given user and the limits the user has. Redict can be configured so that new connections are already authenticated with a &ldquo;default&rdquo; user (this is the default configuration). Configuring the default user has, as a side effect, the ability to provide only a specific subset of functionalities to connections that are not explicitly authenticated.</p> ACL CAT https://redict.io/docs/commands/acl-cat/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/acl-cat/ ACL DELUSER https://redict.io/docs/commands/acl-deluser/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/acl-deluser/ ACL DRYRUN https://redict.io/docs/commands/acl-dryrun/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/acl-dryrun/ ACL GENPASS https://redict.io/docs/commands/acl-genpass/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/acl-genpass/ ACL GETUSER https://redict.io/docs/commands/acl-getuser/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/acl-getuser/ ACL HELP https://redict.io/docs/commands/acl-help/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/acl-help/ ACL LIST https://redict.io/docs/commands/acl-list/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/acl-list/ ACL LOAD https://redict.io/docs/commands/acl-load/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/acl-load/ ACL LOG https://redict.io/docs/commands/acl-log/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/acl-log/ ACL SAVE https://redict.io/docs/commands/acl-save/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/acl-save/ ACL SETUSER https://redict.io/docs/commands/acl-setuser/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/acl-setuser/ ACL USERS https://redict.io/docs/commands/acl-users/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/acl-users/ ACL WHOAMI https://redict.io/docs/commands/acl-whoami/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/acl-whoami/ API reference https://redict.io/docs/modules/api/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/modules/api/ <!-- This file is generated from module.c using utils/generate-module-api-doc.rb --> <h1 id="modules-api-reference"> Modules API reference <a class="anchor" href="#modules-api-reference">#</a> </h1> <p><span id="section-heap-allocation-raw-functions"></span></p> <h2 id="heap-allocation-raw-functions"> Heap allocation raw functions <a class="anchor" href="#heap-allocation-raw-functions">#</a> </h2> <p>Memory allocated with these functions are taken into account by Redict key eviction algorithms and are reported in Redict memory usage information.</p> <p><span id="RedictModule_Alloc"></span></p> <h3 id="redictmodule_alloc"> <code>RedictModule_Alloc</code> <a class="anchor" href="#redictmodule_alloc">#</a> </h3> <pre><code>void *RedictModule_Alloc(size_t bytes); </code></pre> <p><strong>Available since:</strong> Redict 7.3.0</p> <p>Use like <code>malloc()</code>. Memory allocated with this function is reported in Redict INFO memory, used for keys eviction according to maxmemory settings and in general is taken into account as memory allocated by Redict. You should avoid using <code>malloc()</code>. This function panics if unable to allocate enough memory.</p> APPEND https://redict.io/docs/commands/append/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/append/ ASKING https://redict.io/docs/commands/asking/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/asking/ AUTH https://redict.io/docs/commands/auth/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/auth/ BGREWRITEAOF https://redict.io/docs/commands/bgrewriteaof/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/bgrewriteaof/ BGSAVE https://redict.io/docs/commands/bgsave/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/bgsave/ BITCOUNT https://redict.io/docs/commands/bitcount/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/bitcount/ BITFIELD https://redict.io/docs/commands/bitfield/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/bitfield/ BITFIELD_RO https://redict.io/docs/commands/bitfield_ro/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/bitfield_ro/ Redict bitfields https://redict.io/docs/data-types/bitfields/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/data-types/bitfields/ <h1 id="introduction-to-redict-bitfields"> Introduction to Redict Bitfields <a class="anchor" href="#introduction-to-redict-bitfields">#</a> </h1> <p>Redict bitfields let you set, increment, and get integer values of arbitrary bit length. For example, you can operate on anything from unsigned 1-bit integers to signed 63-bit integers.</p> <p>These values are stored using binary-encoded Redict strings. Bitfields support atomic read, write and increment operations, making them a good choice for managing counters and similar numerical values.</p> <h2 id="basic-commands"> Basic commands <a class="anchor" href="#basic-commands">#</a> </h2> <ul> <li><code>BITFIELD</code> atomically sets, increments and reads one or more values.</li> <li><code>BITFIELD_RO</code> is a read-only variant of <code>BITFIELD</code>.</li> </ul> <h2 id="example"> Example <a class="anchor" href="#example">#</a> </h2> <p>Suppose you want to maintain two metrics for various bicycles: the current price and the number of owners over time. You can represent these counters with a 32-bit wide bitfield per for each bike.</p> Redict bitmaps https://redict.io/docs/data-types/bitmaps/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/data-types/bitmaps/ <h1 id="introduction-to-redict-bitmaps"> Introduction to Redict Bitmaps <a class="anchor" href="#introduction-to-redict-bitmaps">#</a> </h1> <p>Bitmaps are not an actual data type, but a set of bit-oriented operations defined on the String type which is treated like a bit vector. Since strings are binary safe blobs and their maximum length is 512 MB, they are suitable to set up to 2^32 different bits.</p> <p>You can perform bitwise operations on one or more strings. Some examples of bitmap use cases include:</p> BITOP https://redict.io/docs/commands/bitop/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/bitop/ BITPOS https://redict.io/docs/commands/bitpos/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/bitpos/ BLMOVE https://redict.io/docs/commands/blmove/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/blmove/ BLMPOP https://redict.io/docs/commands/blmpop/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/blmpop/ BLPOP https://redict.io/docs/commands/blpop/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/blpop/ BRPOP https://redict.io/docs/commands/brpop/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/brpop/ BRPOPLPUSH https://redict.io/docs/commands/brpoplpush/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/brpoplpush/ Bulk Loading https://redict.io/docs/usage/bulk-loading/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/bulk-loading/ <h1 id="writing-data-in-bulk-using-the-redict-protocol"> Writing Data in Bulk Using the Redict Protocol <a class="anchor" href="#writing-data-in-bulk-using-the-redict-protocol">#</a> </h1> <p>Bulk loading is the process of loading Redict with a large amount of pre-existing data. This document describes how to bulk-load data in Redict quickly and efficiently.</p> <h2 id="bulk-loading-using-the-redict-cli"> Bulk loading using the redict-cli <a class="anchor" href="#bulk-loading-using-the-redict-cli">#</a> </h2> <p>Using a normal Redict client to perform bulk loading is not a good idea for a few reasons: the naive approach of sending one command after the other is slow due to the round-trip time for every command. It is possible to use pipelining, but for bulk loading of many records, new commands need to be written while replies are read.</p> BZMPOP https://redict.io/docs/commands/bzmpop/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/bzmpop/ BZPOPMAX https://redict.io/docs/commands/bzpopmax/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/bzpopmax/ BZPOPMIN https://redict.io/docs/commands/bzpopmin/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/bzpopmin/ CLIENT https://redict.io/docs/commands/client/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client/ CLIENT CACHING https://redict.io/docs/commands/client-caching/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-caching/ CLIENT GETNAME https://redict.io/docs/commands/client-getname/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-getname/ CLIENT GETREDIR https://redict.io/docs/commands/client-getredir/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-getredir/ CLIENT HELP https://redict.io/docs/commands/client-help/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-help/ CLIENT ID https://redict.io/docs/commands/client-id/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-id/ CLIENT INFO https://redict.io/docs/commands/client-info/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-info/ CLIENT KILL https://redict.io/docs/commands/client-kill/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-kill/ CLIENT LIST https://redict.io/docs/commands/client-list/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-list/ CLIENT NO-EVICT https://redict.io/docs/commands/client-no-evict/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-no-evict/ CLIENT NO-TOUCH https://redict.io/docs/commands/client-no-touch/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-no-touch/ CLIENT PAUSE https://redict.io/docs/commands/client-pause/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-pause/ CLIENT REPLY https://redict.io/docs/commands/client-reply/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-reply/ CLIENT SETINFO https://redict.io/docs/commands/client-setinfo/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-setinfo/ CLIENT SETNAME https://redict.io/docs/commands/client-setname/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-setname/ CLIENT TRACKING https://redict.io/docs/commands/client-tracking/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-tracking/ CLIENT TRACKINGINFO https://redict.io/docs/commands/client-trackinginfo/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-trackinginfo/ CLIENT UNBLOCK https://redict.io/docs/commands/client-unblock/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-unblock/ CLIENT UNPAUSE https://redict.io/docs/commands/client-unpause/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/client-unpause/ Client-side caching in Redict https://redict.io/docs/usage/clients/client-side-caching/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/clients/client-side-caching/ <h1 id="server-assisted-client-side-caching-in-redict"> Server-assisted, client-side caching in Redict <a class="anchor" href="#server-assisted-client-side-caching-in-redict">#</a> </h1> <p>Client-side caching is a technique used to create high performance services. It exploits the memory available on application servers, servers that are usually distinct computers compared to the database nodes, to store some subset of the database information directly in the application side.</p> <p>Normally when data is required, the application servers ask the database about such information, like in the following diagram:</p> <pre><code>+-------------+ +----------+ | | ------- GET user:1234 -------&gt; | | | Application | | Database | | | &lt;---- username = Alice ------- | | +-------------+ +----------+ </code></pre> <p>When client-side caching is used, the application will store the reply of popular queries directly inside the application memory, so that it can reuse such replies later, without contacting the database again:</p> Redict Cluster https://redict.io/docs/usage/scaling/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/scaling/ <h1 id="horizontal-scaling-with-redict-cluster"> Horizontal Scaling with Redict Cluster <a class="anchor" href="#horizontal-scaling-with-redict-cluster">#</a> </h1> <p>Redict scales horizontally with a deployment topology called Redict Cluster. This topic will teach you how to set up, test, and operate Redict Cluster in production. You will learn about the availability and consistency characteristics of Redict Cluster from the end user&rsquo;s point of view.</p> <p>If you plan to run a production Redict Cluster deployment or want to understand better how Redict Cluster works internally, consult the <a href="https://codeberg.org/redict/redict.io/wiki/cluster-spec">Redict Cluster specification</a>.</p> CLUSTER https://redict.io/docs/commands/cluster/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster/ CLUSTER ADDSLOTS https://redict.io/docs/commands/cluster-addslots/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-addslots/ CLUSTER ADDSLOTSRANGE https://redict.io/docs/commands/cluster-addslotsrange/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-addslotsrange/ CLUSTER BUMPEPOCH https://redict.io/docs/commands/cluster-bumpepoch/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-bumpepoch/ CLUSTER COUNT-FAILURE-REPORTS https://redict.io/docs/commands/cluster-count-failure-reports/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-count-failure-reports/ CLUSTER COUNTKEYSINSLOT https://redict.io/docs/commands/cluster-countkeysinslot/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-countkeysinslot/ CLUSTER DELSLOTS https://redict.io/docs/commands/cluster-delslots/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-delslots/ CLUSTER DELSLOTSRANGE https://redict.io/docs/commands/cluster-delslotsrange/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-delslotsrange/ CLUSTER FAILOVER https://redict.io/docs/commands/cluster-failover/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-failover/ CLUSTER FLUSHSLOTS https://redict.io/docs/commands/cluster-flushslots/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-flushslots/ CLUSTER FORGET https://redict.io/docs/commands/cluster-forget/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-forget/ CLUSTER GETKEYSINSLOT https://redict.io/docs/commands/cluster-getkeysinslot/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-getkeysinslot/ CLUSTER HELP https://redict.io/docs/commands/cluster-help/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-help/ CLUSTER INFO https://redict.io/docs/commands/cluster-info/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-info/ CLUSTER KEYSLOT https://redict.io/docs/commands/cluster-keyslot/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-keyslot/ CLUSTER LINKS https://redict.io/docs/commands/cluster-links/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-links/ CLUSTER MEET https://redict.io/docs/commands/cluster-meet/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-meet/ CLUSTER MYID https://redict.io/docs/commands/cluster-myid/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-myid/ CLUSTER MYSHARDID https://redict.io/docs/commands/cluster-myshardid/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-myshardid/ CLUSTER NODES https://redict.io/docs/commands/cluster-nodes/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-nodes/ CLUSTER REPLICAS https://redict.io/docs/commands/cluster-replicas/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-replicas/ CLUSTER REPLICATE https://redict.io/docs/commands/cluster-replicate/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-replicate/ CLUSTER RESET https://redict.io/docs/commands/cluster-reset/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-reset/ CLUSTER SAVECONFIG https://redict.io/docs/commands/cluster-saveconfig/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-saveconfig/ CLUSTER SET-CONFIG-EPOCH https://redict.io/docs/commands/cluster-set-config-epoch/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-set-config-epoch/ CLUSTER SETSLOT https://redict.io/docs/commands/cluster-setslot/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-setslot/ CLUSTER SHARDS https://redict.io/docs/commands/cluster-shards/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-shards/ CLUSTER SLAVES https://redict.io/docs/commands/cluster-slaves/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-slaves/ CLUSTER SLOTS https://redict.io/docs/commands/cluster-slots/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/cluster-slots/ COMMAND https://redict.io/docs/commands/command/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/command/ Redict Command Arguments https://redict.io/docs/usage/command-arguments/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/command-arguments/ <h1 id="how-redict-commands-expose-their-documentation-programmatically"> How Redict commands expose their documentation programmatically <a class="anchor" href="#how-redict-commands-expose-their-documentation-programmatically">#</a> </h1> <p>The <code>COMMAND DOCS</code> command returns documentation-focused information about available Redis commands. The map reply that the command returns includes the <em>arguments</em> key. This key stores an array that describes the command&rsquo;s arguments.</p> <p>Every element in the <em>arguments</em> array is a map with the following fields:</p> <ul> <li><strong>name:</strong> the argument&rsquo;s name, always present. The name of an argument is given for identification purposes alone. It isn&rsquo;t displayed during the command&rsquo;s syntax rendering. The same name can appear more than once in the entire argument tree, but it is unique compared to other sibling arguments&rsquo; names. This allows obtaining a unique identifier for each argument (the concatenation of all names in the path from the root to any argument).</li> <li><strong>display_text:</strong> the argument&rsquo;s display string, present in arguments that have a displayable representation (all arguments that aren&rsquo;t oneof/block). This is the string used in the command&rsquo;s syntax rendering.</li> <li><strong>type:</strong> the argument&rsquo;s type, always present. An argument must have one of the following types: <ul> <li><strong>string:</strong> a string argument.</li> <li><strong>integer:</strong> an integer argument.</li> <li><strong>double:</strong> a double-precision argument.</li> <li><strong>key:</strong> a string that represents the name of a key.</li> <li><strong>pattern:</strong> a string that represents a glob-like pattern.</li> <li><strong>unix-time:</strong> an integer that represents a Unix timestamp.</li> <li><strong>pure-token:</strong> an argument is a token, meaning a reserved keyword, which may or may not be provided. Not to be confused with free-text user input.</li> <li><strong>oneof</strong>: the argument is a container for nested arguments. This type enables choice among several nested arguments (see the <code>XADD</code> example below).</li> <li><strong>block:</strong> the argument is a container for nested arguments. This type enables grouping arguments and applying a property (such as <em>optional</em>) to all (see the <code>XADD</code> example below).</li> </ul> </li> <li><strong>key_spec_index:</strong> this value is available for every argument of the <em>key</em> type. It is a 0-based index of the specification in the command&rsquo;s <a href="https://redict.io/docs/usage/clients/client-side-caching/">key specifications</a> that corresponds to the argument.</li> <li><strong>token</strong>: a constant literal that precedes the argument (user input) itself.</li> <li><strong>summary:</strong> a short description of the argument.</li> <li><strong>since:</strong> the debut Redis version of the argument (or for module commands, the module version).</li> <li><strong>deprecated_since:</strong> the Redis version that deprecated the command (or for module commands, the module version).</li> <li><strong>flags:</strong> an array of argument flags. Possible flags are: <ul> <li><strong>optional</strong>: denotes that the argument is optional (for example, the <em>GET</em> clause of the <code>SET</code> command).</li> <li><strong>multiple</strong>: denotes that the argument may be repeated (such as the <em>key</em> argument of <code>DEL</code>).</li> <li><strong>multiple-token:</strong> denotes the possible repetition of the argument with its preceding token (see <code>SORT</code>&rsquo;s <code>GET pattern</code> clause).</li> </ul> </li> <li><strong>value:</strong> the argument&rsquo;s value. For arguments types other than <em>oneof</em> and <em>block</em>, this is a string that describes the value in the command&rsquo;s syntax. For the <em>oneof</em> and <em>block</em> types, this is an array of nested arguments, each being a map as described in this section.</li> </ul> <h2 id="example"> Example <a class="anchor" href="#example">#</a> </h2> <p>The trimming clause of <code>XADD</code>, i.e., <code>[MAXLEN|MINID [=|~] threshold [LIMIT count]]</code>, is represented at the top-level as <em>block</em>-typed argument.</p> COMMAND COUNT https://redict.io/docs/commands/command-count/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/command-count/ COMMAND DOCS https://redict.io/docs/commands/command-docs/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/command-docs/ COMMAND GETKEYS https://redict.io/docs/commands/command-getkeys/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/command-getkeys/ COMMAND GETKEYSANDFLAGS https://redict.io/docs/commands/command-getkeysandflags/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/command-getkeysandflags/ COMMAND HELP https://redict.io/docs/commands/command-help/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/command-help/ COMMAND INFO https://redict.io/docs/commands/command-info/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/command-info/ Command key specifications https://redict.io/docs/usage/clients/key-specs/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/clients/key-specs/ <h1 id="what-are-command-key-specification-and-how-to-use-them-in-your-client"> What are command key specification and how to use them in your client <a class="anchor" href="#what-are-command-key-specification-and-how-to-use-them-in-your-client">#</a> </h1> <p>Many of the commands in Redict accept key names as input arguments. The 9th element in the reply of <code>COMMAND</code> (and <code>COMMAND INFO</code>) is an array that consists of the command&rsquo;s key specifications.</p> <p>A <em>key specification</em> describes a rule for extracting the names of one or more keys from the arguments of a given command. Key specifications provide a robust and flexible mechanism to extract key names for all commands.</p> COMMAND LIST https://redict.io/docs/commands/command-list/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/command-list/ Redict command tips https://redict.io/docs/usage/command-tips/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/command-tips/ <h1 id="command-tips"> Command Tips <a class="anchor" href="#command-tips">#</a> </h1> <p>Command tips are an array of strings. These provide Redict clients with additional information about the command. The information can instruct Redict Cluster clients as to how the command should be executed and its output processed in a clustered deployment.</p> <p>Unlike the command&rsquo;s flags (see the 3rd element of <code>COMMAND</code>&rsquo;s reply), which are strictly internal to the server&rsquo;s operation, tips don&rsquo;t serve any purpose other than being reported to clients.</p> CONFIG https://redict.io/docs/commands/config/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/config/ CONFIG GET https://redict.io/docs/commands/config-get/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/config-get/ CONFIG HELP https://redict.io/docs/commands/config-help/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/config-help/ CONFIG RESETSTAT https://redict.io/docs/commands/config-resetstat/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/config-resetstat/ CONFIG REWRITE https://redict.io/docs/commands/config-rewrite/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/config-rewrite/ CONFIG SET https://redict.io/docs/commands/config-set/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/config-set/ Redict configuration https://redict.io/docs/usage/config/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/config/ <h1 id="configuration"> Configuration <a class="anchor" href="#configuration">#</a> </h1> <p>Redict is able to start without a configuration file using a built-in default configuration, however this setup is only recommended for testing and development purposes.</p> <p>The proper way to configure Redict is by providing a Redict configuration file, usually called <code>redict.conf</code>.</p> <p>The <code>redict.conf</code> file contains a number of directives that have a very simple format:</p> <pre><code>keyword argument1 argument2 ... argumentN </code></pre> <p>This is an example of a configuration directive:</p> COPY https://redict.io/docs/commands/copy/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/copy/ Redict CPU profiling https://redict.io/docs/usage/optimization/cpu-profiling/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/optimization/cpu-profiling/ <h1 id="performance-engineering-guide"> Performance Engineering Guide <a class="anchor" href="#performance-engineering-guide">#</a> </h1> <h2 id="filling-the-performance-checklist"> Filling the performance checklist <a class="anchor" href="#filling-the-performance-checklist">#</a> </h2> <p>Redict is developed with a great emphasis on performance. We do our best with every release to make sure you&rsquo;ll experience a very stable and fast product.</p> <p>Nevertheless, if you&rsquo;re finding room to improve the efficiency of Redict or are pursuing a performance regression investigation you will need a concise methodical way of monitoring and analyzing Redict performance.</p> <p>To do so you can rely on different methodologies (some more suited than other depending on the class of issues/analysis we intend to make). A curated list of methodologies and their steps are enumerated by Brendan Greg at the <a href="http://www.brendangregg.com/methodology.html">following link</a>.</p> DBSIZE https://redict.io/docs/commands/dbsize/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/dbsize/ DEBUG https://redict.io/docs/commands/debug/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/debug/ Debugging https://redict.io/docs/usage/debugging/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/debugging/ <h1 id="debugging"> Debugging <a class="anchor" href="#debugging">#</a> </h1> <p>Redict is developed with an emphasis on stability. We do our best with every release to make sure you&rsquo;ll experience a stable product with no crashes. However, if you ever need to debug the Redict process itself, read on.</p> <p>When Redict crashes, it produces a detailed report of what happened. However, sometimes looking at the crash report is not enough, nor is it possible for the Redict core team to reproduce the issue independently. In this scenario, we need help from the user who can reproduce the issue.</p> DECR https://redict.io/docs/commands/decr/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/decr/ DECRBY https://redict.io/docs/commands/decrby/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/decrby/ DEL https://redict.io/docs/commands/del/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/del/ DISCARD https://redict.io/docs/commands/discard/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/discard/ Distributed Locks https://redict.io/docs/usage/distributed-locks/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/distributed-locks/ <h1 id="a-distributed-lock-pattern-with-redict"> A Distributed Lock Pattern with Redict <a class="anchor" href="#a-distributed-lock-pattern-with-redict">#</a> </h1> <p>Distributed locks are a very useful primitive in many environments where different processes must operate with shared resources in a mutually exclusive way.</p> <p>There are a number of libraries and blog posts describing how to implement a DLM (Distributed Lock Manager) with Redict, but every library uses a different approach, and many use a simple approach with lower guarantees compared to what can be achieved with slightly more complex designs.</p> DUMP https://redict.io/docs/commands/dump/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/dump/ ECHO https://redict.io/docs/commands/echo/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/echo/ EVAL https://redict.io/docs/commands/eval/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/eval/ EVAL_RO https://redict.io/docs/commands/eval_ro/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/eval_ro/ EVALSHA https://redict.io/docs/commands/evalsha/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/evalsha/ EVALSHA_RO https://redict.io/docs/commands/evalsha_ro/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/evalsha_ro/ EXEC https://redict.io/docs/commands/exec/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/exec/ EXISTS https://redict.io/docs/commands/exists/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/exists/ EXPIRE https://redict.io/docs/commands/expire/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/expire/ EXPIREAT https://redict.io/docs/commands/expireat/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/expireat/ EXPIRETIME https://redict.io/docs/commands/expiretime/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/expiretime/ FAILOVER https://redict.io/docs/commands/failover/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/failover/ Redict FAQ https://redict.io/docs/usage/faq/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/faq/ <h1 id="faq"> FAQ <a class="anchor" href="#faq">#</a> </h1> <h2 id="how-is-redict-different-from-other-key-value-stores"> How is Redict different from other key-value stores? <a class="anchor" href="#how-is-redict-different-from-other-key-value-stores">#</a> </h2> <ul> <li>Redict has a different evolution path in the key-value DBs where values can contain more complex data types, with atomic operations defined on those data types. Redict data types are closely related to fundamental data structures and are exposed to the programmer as such, without additional abstraction layers.</li> <li>Redict is an in-memory but persistent on disk database, so it represents a different trade off where very high write and read speed is achieved with the limitation of data sets that can&rsquo;t be larger than memory. Another advantage of in-memory databases is that the memory representation of complex data structures is much simpler to manipulate compared to the same data structures on disk, so Redict can do a lot with little internal complexity. At the same time the two on-disk storage formats (RDB and AOF) don&rsquo;t need to be suitable for random access, so they are compact and always generated in an append-only fashion (Even the AOF log rotation is an append-only operation, since the new version is generated from the copy of data in memory). However this design also involves different challenges compared to traditional on-disk stores. Being the main data representation on memory, Redict operations must be carefully handled to make sure there is always an updated version of the data set on disk.</li> </ul> <h2 id="whats-the-redict-memory-footprint"> What&rsquo;s the Redict memory footprint? <a class="anchor" href="#whats-the-redict-memory-footprint">#</a> </h2> <p>To give you a few examples (all obtained using 64-bit instances):</p> FCALL https://redict.io/docs/commands/fcall/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/fcall/ FCALL_RO https://redict.io/docs/commands/fcall_ro/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/fcall_ro/ FLUSHALL https://redict.io/docs/commands/flushall/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/flushall/ FLUSHDB https://redict.io/docs/commands/flushdb/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/flushdb/ FUNCTION https://redict.io/docs/commands/function/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/function/ FUNCTION DELETE https://redict.io/docs/commands/function-delete/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/function-delete/ FUNCTION DUMP https://redict.io/docs/commands/function-dump/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/function-dump/ FUNCTION FLUSH https://redict.io/docs/commands/function-flush/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/function-flush/ FUNCTION HELP https://redict.io/docs/commands/function-help/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/function-help/ FUNCTION KILL https://redict.io/docs/commands/function-kill/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/function-kill/ FUNCTION LIST https://redict.io/docs/commands/function-list/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/function-list/ FUNCTION LOAD https://redict.io/docs/commands/function-load/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/function-load/ FUNCTION RESTORE https://redict.io/docs/commands/function-restore/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/function-restore/ FUNCTION STATS https://redict.io/docs/commands/function-stats/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/function-stats/ GEOADD https://redict.io/docs/commands/geoadd/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/geoadd/ GEODIST https://redict.io/docs/commands/geodist/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/geodist/ GEOHASH https://redict.io/docs/commands/geohash/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/geohash/ GEOPOS https://redict.io/docs/commands/geopos/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/geopos/ GEORADIUS https://redict.io/docs/commands/georadius/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/georadius/ GEORADIUS_RO https://redict.io/docs/commands/georadius_ro/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/georadius_ro/ GEORADIUSBYMEMBER https://redict.io/docs/commands/georadiusbymember/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/georadiusbymember/ GEORADIUSBYMEMBER_RO https://redict.io/docs/commands/georadiusbymember_ro/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/georadiusbymember_ro/ GEOSEARCH https://redict.io/docs/commands/geosearch/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/geosearch/ GEOSEARCHSTORE https://redict.io/docs/commands/geosearchstore/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/geosearchstore/ Redict geospatial https://redict.io/docs/data-types/geospatial/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/data-types/geospatial/ <h1 id="introduction-to-redict-geospatial"> Introduction to Redict Geospatial <a class="anchor" href="#introduction-to-redict-geospatial">#</a> </h1> <p>Redict geospatial indexes let you store coordinates and search for them. This data structure is useful for finding nearby points within a given radius or bounding box.</p> <h2 id="basic-commands"> Basic commands <a class="anchor" href="#basic-commands">#</a> </h2> <ul> <li><code>GEOADD</code> adds a location to a given geospatial index (note that longitude comes before latitude with this command).</li> <li><code>GEOSEARCH</code> returns locations with a given radius or a bounding box.</li> </ul> <p>See the <a href="https://redict.io/docs/commands/#geospatial">complete list of geospatial index commands</a>.</p> GET https://redict.io/docs/commands/get/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/get/ GETBIT https://redict.io/docs/commands/getbit/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/getbit/ GETDEL https://redict.io/docs/commands/getdel/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/getdel/ GETEX https://redict.io/docs/commands/getex/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/getex/ GETRANGE https://redict.io/docs/commands/getrange/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/getrange/ GETSET https://redict.io/docs/commands/getset/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/getset/ Redict hashes https://redict.io/docs/data-types/hashes/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/data-types/hashes/ <h1 id="introduction-to-redict-hashes"> Introduction to Redict Hashes <a class="anchor" href="#introduction-to-redict-hashes">#</a> </h1> <p>Redict hashes are record types structured as collections of field-value pairs. You can use hashes to represent basic objects and to store groupings of counters, among other things.</p> <pre tabindex="0"><code>&gt; HSET bike:1 model Deimos brand Ergonom type &#39;Enduro bikes&#39; price 4972 (integer) 4 &gt; HGET bike:1 model &#34;Deimos&#34; &gt; HGET bike:1 price &#34;4972&#34; &gt; HGETALL bike:1 1) &#34;model&#34; 2) &#34;Deimos&#34; 3) &#34;brand&#34; 4) &#34;Ergonom&#34; 5) &#34;type&#34; 6) &#34;Enduro bikes&#34; 7) &#34;price&#34; 8) &#34;4972&#34; </code></pre><p>While hashes are handy to represent <em>objects</em>, actually the number of fields you can put inside a hash has no practical limits (other than available memory), so you can use hashes in many different ways inside your application.</p> HDEL https://redict.io/docs/commands/hdel/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hdel/ HELLO https://redict.io/docs/commands/hello/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hello/ HEXISTS https://redict.io/docs/commands/hexists/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hexists/ HGET https://redict.io/docs/commands/hget/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hget/ HGETALL https://redict.io/docs/commands/hgetall/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hgetall/ HINCRBY https://redict.io/docs/commands/hincrby/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hincrby/ HINCRBYFLOAT https://redict.io/docs/commands/hincrbyfloat/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hincrbyfloat/ HKEYS https://redict.io/docs/commands/hkeys/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hkeys/ HLEN https://redict.io/docs/commands/hlen/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hlen/ HMGET https://redict.io/docs/commands/hmget/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hmget/ HMSET https://redict.io/docs/commands/hmset/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hmset/ HRANDFIELD https://redict.io/docs/commands/hrandfield/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hrandfield/ HSCAN https://redict.io/docs/commands/hscan/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hscan/ HSET https://redict.io/docs/commands/hset/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hset/ HSETNX https://redict.io/docs/commands/hsetnx/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hsetnx/ HSTRLEN https://redict.io/docs/commands/hstrlen/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hstrlen/ HVALS https://redict.io/docs/commands/hvals/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/hvals/ Redict HyperLogLog https://redict.io/docs/data-types/hyperloglogs/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/data-types/hyperloglogs/ <h1 id="introduction-to-redict-hyperloglogs"> Introduction to Redict HyperLogLogs <a class="anchor" href="#introduction-to-redict-hyperloglogs">#</a> </h1> <p>HyperLogLog is a probabilistic data structure that estimates the cardinality of a set. As a probabilistic data structure, HyperLogLog trades perfect accuracy for efficient space utilization.</p> <p>The Redict HyperLogLog implementation uses up to 12 KB and provides a standard error of 0.81%.</p> <p>Counting unique items usually requires an amount of memory proportional to the number of items you want to count, because you need to remember the elements you have already seen in the past in order to avoid counting them multiple times. However, a set of algorithms exist that trade memory for precision: they return an estimated measure with a standard error, which, in the case of the Redict implementation for HyperLogLog, is less than 1%. The magic of this algorithm is that you no longer need to use an amount of memory proportional to the number of items counted, and instead can use a constant amount of memory; 12k bytes in the worst case, or a lot less if your HyperLogLog (We&rsquo;ll just call them HLL from now) has seen very few elements.</p> INCR https://redict.io/docs/commands/incr/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/incr/ INCRBY https://redict.io/docs/commands/incrby/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/incrby/ INCRBYFLOAT https://redict.io/docs/commands/incrbyfloat/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/incrbyfloat/ INFO https://redict.io/docs/commands/info/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/info/ Key Eviction https://redict.io/docs/usage/eviction/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/eviction/ <h1 id="overview-of-redict-key-eviction-policies"> Overview of Redict key eviction policies <a class="anchor" href="#overview-of-redict-key-eviction-policies">#</a> </h1> <p>When Redict is used as a cache, it is often convenient to let it automatically evict old data as you add new data. This behavior is well known in the developer community, since it is the default behavior for the popular <em>memcached</em> system.</p> <p>This page covers the more general topic of the Redict <code>maxmemory</code> directive used to limit the memory usage to a fixed amount. It also extensively covers the LRU eviction algorithm used by Redict, which is actually an approximation of the exact LRU.</p> KEYS https://redict.io/docs/commands/keys/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/keys/ Managing Keys in Redict https://redict.io/docs/usage/keyspace/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/keyspace/ <h1 id="managing-keys-in-redict"> Managing Keys in Redict <a class="anchor" href="#managing-keys-in-redict">#</a> </h1> <p>Redict keys are binary safe; this means that you can use any binary sequence as a key, from a string like &ldquo;foo&rdquo; to the content of a JPEG file. The empty string is also a valid key.</p> <p>A few other rules about keys:</p> <ul> <li>Very long keys are not a good idea. For instance a key of 1024 bytes is a bad idea not only memory-wise, but also because the lookup of the key in the dataset may require several costly key-comparisons. Even when the task at hand is to match the existence of a large value, hashing it (for example with SHA1) is a better idea, especially from the perspective of memory and bandwidth.</li> <li>Very short keys are often not a good idea. There is little point in writing &ldquo;u1000flw&rdquo; as a key if you can instead write &ldquo;user:1000:followers&rdquo;. The latter is more readable and the added space is minor compared to the space used by the key object itself and the value object. While short keys will obviously consume a bit less memory, your job is to find the right balance.</li> <li>Try to stick with a schema. For instance &ldquo;object-type:id&rdquo; is a good idea, as in &ldquo;user:1000&rdquo;. Dots or dashes are often used for multi-word fields, as in &ldquo;comment:4321:reply.to&rdquo; or &ldquo;comment:4321:reply-to&rdquo;.</li> <li>The maximum allowed key size is 512 MB.</li> </ul> <h2 id="altering-and-querying-the-key-space"> Altering and querying the key space <a class="anchor" href="#altering-and-querying-the-key-space">#</a> </h2> <p>There are commands that are not defined on particular types, but are useful in order to interact with the space of keys, and thus, can be used with keys of any type.</p> Redict keyspace notifications https://redict.io/docs/usage/clients/keyspace-notifications/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/clients/keyspace-notifications/ <h1 id="monitor-changes-to-redict-keys-and-values-in-real-time"> Monitor changes to Redict keys and values in real time <a class="anchor" href="#monitor-changes-to-redict-keys-and-values-in-real-time">#</a> </h1> <p>Keyspace notifications allow clients to subscribe to Pub/Sub channels in order to receive events affecting the Redict data set in some way.</p> <p>Examples of events that can be received are:</p> <ul> <li>All the commands affecting a given key.</li> <li>All the keys receiving an LPUSH operation.</li> <li>All the keys expiring in the database 0.</li> </ul> <p>Note: Redict Pub/Sub is <em>fire and forget</em> that is, if your Pub/Sub client disconnects, and reconnects later, all the events delivered during the time the client was disconnected are lost.</p> LASTSAVE https://redict.io/docs/commands/lastsave/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/lastsave/ LATENCY https://redict.io/docs/commands/latency/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/latency/ Latency diagnosis https://redict.io/docs/usage/optimization/latency/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/optimization/latency/ <h1 id="diagnosing-latency-issues"> Diagnosing latency issues <a class="anchor" href="#diagnosing-latency-issues">#</a> </h1> <p>This document will help you understand what the problem could be if you are experiencing latency problems with Redict.</p> <p>In this context <em>latency</em> is the maximum delay between the time a client issues a command and the time the reply to the command is received by the client. Usually Redict processing time is extremely low, in the sub microsecond range, but there are certain conditions leading to higher latency figures.</p> LATENCY DOCTOR https://redict.io/docs/commands/latency-doctor/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/latency-doctor/ LATENCY GRAPH https://redict.io/docs/commands/latency-graph/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/latency-graph/ LATENCY HELP https://redict.io/docs/commands/latency-help/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/latency-help/ LATENCY HISTOGRAM https://redict.io/docs/commands/latency-histogram/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/latency-histogram/ LATENCY HISTORY https://redict.io/docs/commands/latency-history/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/latency-history/ LATENCY LATEST https://redict.io/docs/commands/latency-latest/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/latency-latest/ Redict latency monitoring https://redict.io/docs/usage/optimization/latency-monitor/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/optimization/latency-monitor/ <h1 id="latency-monitoring"> Latency Monitoring <a class="anchor" href="#latency-monitoring">#</a> </h1> <p>Redict is often used for demanding use cases, where it serves a large number of queries per second per instance, but also has strict latency requirements for the average response time and the worst-case latency.</p> <p>While Redict is an in-memory system, it deals with the operating system in different ways, for example, in the context of persisting to disk. Moreover Redict implements a rich set of commands. Certain commands are fast and run in constant or logarithmic time. Other commands are slower O(N) commands that can cause latency spikes.</p> LATENCY RESET https://redict.io/docs/commands/latency-reset/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/latency-reset/ LCS https://redict.io/docs/commands/lcs/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/lcs/ LINDEX https://redict.io/docs/commands/lindex/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/lindex/ LINSERT https://redict.io/docs/commands/linsert/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/linsert/ Redict lists https://redict.io/docs/data-types/lists/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/data-types/lists/ <h1 id="introduction-to-redict-lists"> Introduction to Redict Lists <a class="anchor" href="#introduction-to-redict-lists">#</a> </h1> <p>Redict lists are linked lists of string values. Redict lists are frequently used to:</p> <ul> <li>Implement stacks and queues.</li> <li>Build queue management for background worker systems.</li> </ul> <h2 id="basic-commands"> Basic commands <a class="anchor" href="#basic-commands">#</a> </h2> <ul> <li><code>LPUSH</code> adds a new element to the head of a list; <code>RPUSH</code> adds to the tail.</li> <li><code>LPOP</code> removes and returns an element from the head of a list; <code>RPOP</code> does the same but from the tails of a list.</li> <li><code>LLEN</code> returns the length of a list.</li> <li><code>LMOVE</code> atomically moves elements from one list to another.</li> <li><code>LTRIM</code> reduces a list to the specified range of elements.</li> </ul> <h3 id="blocking-commands"> Blocking commands <a class="anchor" href="#blocking-commands">#</a> </h3> <p>Lists support several blocking commands. For example:</p> LLEN https://redict.io/docs/commands/llen/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/llen/ LMOVE https://redict.io/docs/commands/lmove/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/lmove/ LMPOP https://redict.io/docs/commands/lmpop/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/lmpop/ LOLWUT https://redict.io/docs/commands/lolwut/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/lolwut/ LPOP https://redict.io/docs/commands/lpop/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/lpop/ LPOS https://redict.io/docs/commands/lpos/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/lpos/ LPUSH https://redict.io/docs/commands/lpush/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/lpush/ LPUSHX https://redict.io/docs/commands/lpushx/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/lpushx/ LRANGE https://redict.io/docs/commands/lrange/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/lrange/ LREM https://redict.io/docs/commands/lrem/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/lrem/ LSET https://redict.io/docs/commands/lset/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/lset/ LTRIM https://redict.io/docs/commands/ltrim/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/ltrim/ MEMORY https://redict.io/docs/commands/memory/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/memory/ MEMORY DOCTOR https://redict.io/docs/commands/memory-doctor/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/memory-doctor/ MEMORY HELP https://redict.io/docs/commands/memory-help/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/memory-help/ MEMORY MALLOC-STATS https://redict.io/docs/commands/memory-malloc-stats/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/memory-malloc-stats/ Memory optimization https://redict.io/docs/usage/optimization/memory-optimization/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/optimization/memory-optimization/ <h1 id="strategies-for-optimizing-memory-usage-in-redict"> Strategies for Optimizing Memory Usage in Redict <a class="anchor" href="#strategies-for-optimizing-memory-usage-in-redict">#</a> </h1> <h2 id="special-encoding-of-small-aggregate-data-types"> Special encoding of small aggregate data types <a class="anchor" href="#special-encoding-of-small-aggregate-data-types">#</a> </h2> <p>Many data types are optimized to use less space up to a certain size. Hashes, Lists, Sets composed of just integers, and Sorted Sets, when smaller than a given number of elements, and up to a maximum element size, are encoded in a very memory-efficient way that uses <em>up to 10 times less memory</em> (with 5 times less memory used being the average saving).</p> MEMORY PURGE https://redict.io/docs/commands/memory-purge/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/memory-purge/ MEMORY STATS https://redict.io/docs/commands/memory-stats/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/memory-stats/ MEMORY USAGE https://redict.io/docs/commands/memory-usage/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/memory-usage/ MGET https://redict.io/docs/commands/mget/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/mget/ Example: Microblogging https://redict.io/docs/usage/microblogging/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/microblogging/ <h1 id="example-microblogging"> Example: Microblogging <a class="anchor" href="#example-microblogging">#</a> </h1> <p>This article describes the design and implementation of a <a href="https://github.com/antirez/retwis">very simple Microblogging Platform</a> written using PHP with Redict as the only database. The programming community has traditionally considered key-value stores as a special purpose database that couldn&rsquo;t be used as a drop-in replacement for a relational database for the development of web applications. This article will try to show that Redict data structures on top of a key-value layer are an effective data model to implement many kinds of applications.</p> MIGRATE https://redict.io/docs/commands/migrate/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/migrate/ Migrating Lua scripts https://redict.io/docs/redis-compat/lua/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/redis-compat/lua/ <h1 id="migrating-lua-scripts"> Migrating Lua scripts <a class="anchor" href="#migrating-lua-scripts">#</a> </h1> <p>Redict is backwards-compatible with the Lua API used by Redis®<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> OSS 7.2.4, and all Lua scripts targetting this version of Redis® will work with Redict without changes.</p> <p>If you wish to update your Lua scripts to remove references to Redis®, you may simply substitute the &ldquo;redis&rdquo; global for &ldquo;redict&rdquo;, for instance by changing &ldquo;redis.call&rdquo; to &ldquo;redict.call&rdquo;.</p> <blockquote class="book-hint warning"> <p><strong>Warning</strong>: Changing &ldquo;redis&rdquo; to &ldquo;redict&rdquo; in your Lua scripts will change the SHA-1 checksum of your script, which in turn will affect the hash you use with the <a href="https://redict.io/docs/commands/evalsha">EVALSHA</a> and <a href="https://redict.io/docs/commands/evalsha_ro">EVALSHA_RO</a> commands.</p> Migrating Redis® Modules https://redict.io/docs/redis-compat/modules/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/redis-compat/modules/ <h1 id="migrating-redis-modules-to-the-redict-api"> Migrating Redis® Modules to the Redict API <a class="anchor" href="#migrating-redis-modules-to-the-redict-api">#</a> </h1> <p>Redict is binary compatible with Redis® Modules targetting Redis® OSS versions 7.2.4 and earlier. Modules built against <code>redismodule.h</code> may be loaded as a shared object via the <code>loadmodule</code> config option and <code>--loadmodule</code> command-line argument to <code>redict-server</code> in the same manner with which they are used with <code>redis-server</code>, without changes to the module source code.</p> <p>If you are the maintainer of a Redis® Module and wish to migrate your module to target the Redict API instead, the following changes are required:</p> Migrating to hiredict https://redict.io/docs/redis-compat/hiredict/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/redis-compat/hiredict/ <h1 id="compatibility-with-hiredis"> Compatibility with Hiredis <a class="anchor" href="#compatibility-with-hiredis">#</a> </h1> <p><a href="https://codeberg.org/redict/hiredict">Hiredict</a> includes shim headers, that define the old symbols as the new ones, and also a shim pkg-config file adjusted to include shims and link with hiredict.</p> <p>Build systems utilizing pkg-config need just rebuild to link against hiredict, the shim will make sure the right symbols are used.</p> <p>Build systems that manually look for hiredis, may need to change the library name, as we don&rsquo;t provide libhiredis, so calls to find_library need to be adjusted to look for <code>hiredict</code> instead.</p> MODULE https://redict.io/docs/commands/module/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/module/ MODULE HELP https://redict.io/docs/commands/module-help/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/module-help/ MODULE LIST https://redict.io/docs/commands/module-list/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/module-list/ MODULE LOAD https://redict.io/docs/commands/module-load/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/module-load/ MODULE LOADEX https://redict.io/docs/commands/module-loadex/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/module-loadex/ MODULE UNLOAD https://redict.io/docs/commands/module-unload/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/module-unload/ MONITOR https://redict.io/docs/commands/monitor/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/monitor/ MOVE https://redict.io/docs/commands/move/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/move/ MSET https://redict.io/docs/commands/mset/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/mset/ MSETNX https://redict.io/docs/commands/msetnx/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/msetnx/ MULTI https://redict.io/docs/commands/multi/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/multi/ OBJECT https://redict.io/docs/commands/object/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/object/ OBJECT ENCODING https://redict.io/docs/commands/object-encoding/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/object-encoding/ OBJECT FREQ https://redict.io/docs/commands/object-freq/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/object-freq/ OBJECT HELP https://redict.io/docs/commands/object-help/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/object-help/ OBJECT IDLETIME https://redict.io/docs/commands/object-idletime/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/object-idletime/ OBJECT REFCOUNT https://redict.io/docs/commands/object-refcount/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/object-refcount/ PERSIST https://redict.io/docs/commands/persist/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/persist/ Redict persistence https://redict.io/docs/usage/persistence/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/persistence/ <h1 id="how-redict-writes-data-to-disk"> How Redict Writes Data to Disk <a class="anchor" href="#how-redict-writes-data-to-disk">#</a> </h1> <p>Persistence refers to the writing of data to durable storage, such as a solid-state disk (SSD). Redict provides a range of persistence options. These include:</p> <ul> <li><strong>RDB</strong> (Redict Database): RDB persistence performs point-in-time snapshots of your dataset at specified intervals.</li> <li><strong>AOF</strong> (Append Only File): AOF persistence logs every write operation received by the server. These operations can then be replayed again at server startup, reconstructing the original dataset. Commands are logged using the same format as the Redict protocol itself.</li> <li><strong>No persistence</strong>: You can disable persistence completely. This is sometimes used when caching.</li> <li><strong>RDB + AOF</strong>: You can also combine both AOF and RDB in the same instance.</li> </ul> <p>To learn more about how to evaluate your Redict persistence strategy, read on.</p> PEXPIRE https://redict.io/docs/commands/pexpire/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pexpire/ PEXPIREAT https://redict.io/docs/commands/pexpireat/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pexpireat/ PEXPIRETIME https://redict.io/docs/commands/pexpiretime/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pexpiretime/ PFADD https://redict.io/docs/commands/pfadd/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pfadd/ PFCOUNT https://redict.io/docs/commands/pfcount/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pfcount/ PFDEBUG https://redict.io/docs/commands/pfdebug/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pfdebug/ PFMERGE https://redict.io/docs/commands/pfmerge/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pfmerge/ PFSELFTEST https://redict.io/docs/commands/pfselftest/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pfselftest/ PING https://redict.io/docs/commands/ping/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/ping/ Redict Pipelining https://redict.io/docs/usage/pipelining/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/pipelining/ <h1 id="redict-pipelining"> Redict Pipelining <a class="anchor" href="#redict-pipelining">#</a> </h1> <p>Redict pipelining is a technique for improving performance by issuing multiple commands at once without waiting for the response to each individual command. Pipelining is supported by most Redict clients. This document describes the problem that pipelining is designed to solve and how pipelining works in Redict.</p> <h2 id="requestresponse-protocols-and-round-trip-time-rtt"> Request/Response protocols and round-trip time (RTT) <a class="anchor" href="#requestresponse-protocols-and-round-trip-time-rtt">#</a> </h2> <p>Redict is a TCP server using the client-server model and what is called a <em>Request/Response</em> protocol.</p> PSETEX https://redict.io/docs/commands/psetex/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/psetex/ PSUBSCRIBE https://redict.io/docs/commands/psubscribe/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/psubscribe/ PSYNC https://redict.io/docs/commands/psync/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/psync/ PTTL https://redict.io/docs/commands/pttl/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pttl/ Redict Pub/Sub https://redict.io/docs/usage/pubsub/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/pubsub/ <h1 id="how-to-use-pubsub-channels-in-redict"> How to Use Pub/Sub Channels in Redict <a class="anchor" href="#how-to-use-pubsub-channels-in-redict">#</a> </h1> <p><code>SUBSCRIBE</code>, <code>UNSUBSCRIBE</code> and <code>PUBLISH</code> implement the <a href="http://en.wikipedia.org/wiki/Publish/subscribe">Publish/Subscribe messaging paradigm</a> where (citing Wikipedia) senders (publishers) are not programmed to send their messages to specific receivers (subscribers). Rather, published messages are characterized into channels, without knowledge of what (if any) subscribers there may be. Subscribers express interest in one or more channels and only receive messages that are of interest, without knowledge of what (if any) publishers there are. This decoupling of publishers and subscribers allows for greater scalability and a more dynamic network topology.</p> PUBLISH https://redict.io/docs/commands/publish/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/publish/ PUBSUB https://redict.io/docs/commands/pubsub/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pubsub/ PUBSUB CHANNELS https://redict.io/docs/commands/pubsub-channels/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pubsub-channels/ PUBSUB HELP https://redict.io/docs/commands/pubsub-help/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pubsub-help/ PUBSUB NUMPAT https://redict.io/docs/commands/pubsub-numpat/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pubsub-numpat/ PUBSUB NUMSUB https://redict.io/docs/commands/pubsub-numsub/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pubsub-numsub/ PUBSUB SHARDCHANNELS https://redict.io/docs/commands/pubsub-shardchannels/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pubsub-shardchannels/ PUBSUB SHARDNUMSUB https://redict.io/docs/commands/pubsub-shardnumsub/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/pubsub-shardnumsub/ PUNSUBSCRIBE https://redict.io/docs/commands/punsubscribe/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/punsubscribe/ QUIT https://redict.io/docs/commands/quit/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/quit/ RANDOMKEY https://redict.io/docs/commands/randomkey/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/randomkey/ READONLY https://redict.io/docs/commands/readonly/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/readonly/ READWRITE https://redict.io/docs/commands/readwrite/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/readwrite/ RENAME https://redict.io/docs/commands/rename/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/rename/ RENAMENX https://redict.io/docs/commands/renamenx/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/renamenx/ REPLCONF https://redict.io/docs/commands/replconf/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/replconf/ REPLICAOF https://redict.io/docs/commands/replicaof/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/replicaof/ Redict replication https://redict.io/docs/usage/replication/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/replication/ <h1 id="how-redict-supports-high-availability-and-failover-with-replication"> How Redict supports high availability and failover with replication <a class="anchor" href="#how-redict-supports-high-availability-and-failover-with-replication">#</a> </h1> <p>At the base of Redict replication (excluding the high availability features provided as an additional layer by Redict Cluster or Redict Sentinel) there is a <em>leader follower</em> (master-replica) replication that is simple to use and configure. It allows replica Redict instances to be exact copies of master instances. The replica will automatically reconnect to the master every time the link breaks, and will attempt to be an exact copy of it <em>regardless</em> of what happens to the master.</p> RESET https://redict.io/docs/commands/reset/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/reset/ RESTORE https://redict.io/docs/commands/restore/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/restore/ RESTORE-ASKING https://redict.io/docs/commands/restore-asking/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/restore-asking/ ROLE https://redict.io/docs/commands/role/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/role/ RPOP https://redict.io/docs/commands/rpop/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/rpop/ RPOPLPUSH https://redict.io/docs/commands/rpoplpush/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/rpoplpush/ RPUSH https://redict.io/docs/commands/rpush/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/rpush/ RPUSHX https://redict.io/docs/commands/rpushx/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/rpushx/ SADD https://redict.io/docs/commands/sadd/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/sadd/ SAVE https://redict.io/docs/commands/save/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/save/ SCAN https://redict.io/docs/commands/scan/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/scan/ SCARD https://redict.io/docs/commands/scard/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/scard/ SCRIPT https://redict.io/docs/commands/script/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/script/ SCRIPT DEBUG https://redict.io/docs/commands/script-debug/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/script-debug/ SCRIPT EXISTS https://redict.io/docs/commands/script-exists/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/script-exists/ SCRIPT FLUSH https://redict.io/docs/commands/script-flush/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/script-flush/ SCRIPT HELP https://redict.io/docs/commands/script-help/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/script-help/ SCRIPT KILL https://redict.io/docs/commands/script-kill/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/script-kill/ SCRIPT LOAD https://redict.io/docs/commands/script-load/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/script-load/ SDIFF https://redict.io/docs/commands/sdiff/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/sdiff/ SDIFFSTORE https://redict.io/docs/commands/sdiffstore/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/sdiffstore/ SELECT https://redict.io/docs/commands/select/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/select/ High availability with Redict Sentinel https://redict.io/docs/usage/sentinel/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/sentinel/ <p>Redict Sentinel provides high availability for Redict when not using <a href="https://redict.io/docs/usage/scaling">Redict Cluster</a>.</p> <p>Redict Sentinel also provides other collateral tasks such as monitoring, notifications and acts as a configuration provider for clients.</p> <p>This is the full list of Sentinel capabilities at a macroscopic level (i.e. the <em>big picture</em>):</p> <ul> <li><strong>Monitoring</strong>. Sentinel constantly checks if your master and replica instances are working as expected.</li> <li><strong>Notification</strong>. Sentinel can notify the system administrator, or other computer programs, via an API, that something is wrong with one of the monitored Redict instances.</li> <li><strong>Automatic failover</strong>. If a master is not working as expected, Sentinel can start a failover process where a replica is promoted to master, the other additional replicas are reconfigured to use the new master, and the applications using the Redict server are informed about the new address to use when connecting.</li> <li><strong>Configuration provider</strong>. Sentinel acts as a source of authority for clients service discovery: clients connect to Sentinels in order to ask for the address of the current Redict master responsible for a given service. If a failover occurs, Sentinels will report the new address.</li> </ul> <h2 id="sentinel-as-a-distributed-system"> Sentinel as a distributed system <a class="anchor" href="#sentinel-as-a-distributed-system">#</a> </h2> <p>Redict Sentinel is a distributed system:</p> Sentinel client spec https://redict.io/docs/usage/clients/sentinel-clients/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/clients/sentinel-clients/ <h1 id="how-to-build-clients-for-redict-sentinel"> How to build clients for Redict Sentinel <a class="anchor" href="#how-to-build-clients-for-redict-sentinel">#</a> </h1> <p>Redict Sentinel is a monitoring solution for Redict instances that handles automatic failover of Redict masters and service discovery (who is the current master for a given group of instances?). Since Sentinel is both responsible for reconfiguring instances during failovers, and providing configurations to clients connecting to Redict masters or replicas, clients are required to have explicit support for Redict Sentinel.</p> SET https://redict.io/docs/commands/set/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/set/ SETBIT https://redict.io/docs/commands/setbit/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/setbit/ SETEX https://redict.io/docs/commands/setex/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/setex/ SETNX https://redict.io/docs/commands/setnx/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/setnx/ SETRANGE https://redict.io/docs/commands/setrange/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/setrange/ Redict sets https://redict.io/docs/data-types/sets/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/data-types/sets/ <h1 id="introduction-to-redict-sets"> Introduction to Redict Sets <a class="anchor" href="#introduction-to-redict-sets">#</a> </h1> <p>A Redict set is an unordered collection of unique strings (members). You can use Redict sets to efficiently:</p> <ul> <li>Track unique items (e.g., track all unique IP addresses accessing a given blog post).</li> <li>Represent relations (e.g., the set of all users with a given role).</li> <li>Perform common set operations such as intersection, unions, and differences.</li> </ul> <h2 id="basic-commands"> Basic commands <a class="anchor" href="#basic-commands">#</a> </h2> <ul> <li><code>SADD</code> adds a new member to a set.</li> <li><code>SREM</code> removes the specified member from the set.</li> <li><code>SISMEMBER</code> tests a string for set membership.</li> <li><code>SINTER</code> returns the set of members that two or more sets have in common (i.e., the intersection).</li> <li><code>SCARD</code> returns the size (a.k.a. cardinality) of a set.</li> </ul> <p>See the <a href="https://redict.io/docs/commands/#set">complete list of set commands</a>.</p> Setup Tips https://redict.io/docs/usage/admin/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/admin/ <h1 id="redict-setup-tips"> Redict Setup Tips <a class="anchor" href="#redict-setup-tips">#</a> </h1> <h2 id="linux"> Linux <a class="anchor" href="#linux">#</a> </h2> <ul> <li>Deploy Redict using the Linux operating system. Redict is also tested on OS X, and from time to time on FreeBSD and OpenBSD systems. However, Linux is where most of the stress testing is performed, and where most production deployments are run.</li> <li>Set the Linux kernel overcommit memory setting to 1. Add <code>vm.overcommit_memory = 1</code> to <code>/etc/sysctl.conf</code>. Then, reboot or run the command <code>sysctl vm.overcommit_memory=1</code> to activate the setting. See <a href="https://redict.io/docs/usage/faq/#background-saving-fails-with-a-fork-error-on-linux">FAQ: Background saving fails with a fork() error on Linux?</a> for details.</li> <li>To ensure the Linux kernel feature Transparent Huge Pages does not impact Redict memory usage and latency, run the command: <code>echo never &gt; /sys/kernel/mm/transparent_hugepage/enabled</code> to disable it. See <a href="https://redict.io/docs/usage/optimization/latency/#latency-induced-by-transparent-huge-pages">Latency Diagnosis - Latency induced by transparent huge pages</a> for additional context.</li> </ul> <h2 id="memory"> Memory <a class="anchor" href="#memory">#</a> </h2> <ul> <li>Ensured that swap is enabled and that your swap file size is equal to amount of memory on your system. If Linux does not have swap set up, and your Redict instance accidentally consumes too much memory, Redict can crash when it is out of memory, or the Linux kernel OOM killer can kill the Redict process. When swapping is enabled, you can detect latency spikes and act on them.</li> <li>Set an explicit <code>maxmemory</code> option limit in your instance to make sure that it will report errors instead of failing when the system memory limit is near to be reached. Note that <code>maxmemory</code> should be set by calculating the overhead for Redict, other than data, and the fragmentation overhead. So if you think you have 10 GB of free memory, set it to 8 or 9.</li> <li>If you are using Redict in a write-heavy application, while saving an RDB file on disk or rewriting the AOF log, Redict can use up to 2 times the memory normally used. The additional memory used is proportional to the number of memory pages modified by writes during the saving process, so it is often proportional to the number of keys (or aggregate types items) touched during this time. Make sure to size your memory accordingly.</li> <li>See the <code>LATENCY DOCTOR</code> and <code>MEMORY DOCTOR</code> commands to assist in troubleshooting.</li> </ul> <h2 id="imaging"> Imaging <a class="anchor" href="#imaging">#</a> </h2> <ul> <li>When running under daemontools, use <code>daemonize no</code>.</li> </ul> <h2 id="replication"> Replication <a class="anchor" href="#replication">#</a> </h2> <ul> <li>Set up a non-trivial replication backlog in proportion to the amount of memory Redict is using. The backlog allows replicas to sync with the primary (master) instance much more easily.</li> <li>If you use replication, Redict performs RDB saves even if persistence is disabled. (This does not apply to diskless replication.) If you don&rsquo;t have disk usage on the master, enable diskless replication.</li> <li>If you are using replication, ensure that either your master has persistence enabled, or that it does not automatically restart on crashes. Replicas will try to maintain an exact copy of the master, so if a master restarts with an empty data set, replicas will be wiped as well.</li> </ul> <h2 id="security"> Security <a class="anchor" href="#security">#</a> </h2> <ul> <li>By default, Redict does not require any authentication and listens to all the network interfaces. This is a big security issue if you leave Redict exposed on the internet or other places where attackers can reach it. See for example <a href="http://antirez.com/news/96">this attack</a> to see how dangerous it can be. Please check our <a href="https://redict.io/docs/usage/security/">security page</a> for information about how to secure Redict.</li> </ul> <h2 id="running-redict-on-ec2"> Running Redict on EC2 <a class="anchor" href="#running-redict-on-ec2">#</a> </h2> <ul> <li>Use HVM based instances, not PV based instances.</li> <li>Do not use old instance families. For example, use m3.medium with HVM instead of m1.medium with PV.</li> <li>The use of Redict persistence with EC2 EBS volumes needs to be handled with care because sometimes EBS volumes have high latency characteristics.</li> <li>You may want to try the new diskless replication if you have issues when replicas are synchronizing with the master.</li> </ul> <h2 id="upgrading-or-restarting-a-redict-instance-without-downtime"> Upgrading or restarting a Redict instance without downtime <a class="anchor" href="#upgrading-or-restarting-a-redict-instance-without-downtime">#</a> </h2> <p>Redict is designed to be a long-running process in your server. You can modify many configuration options without a restart using the <code>CONFIG SET</code> command. You can also switch from AOF to RDB snapshots persistence, or the other way around, without restarting Redict. Check the output of the <code>CONFIG GET *</code> command for more information.</p> SHUTDOWN https://redict.io/docs/commands/shutdown/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/shutdown/ Redict signal handling https://redict.io/docs/usage/signals/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/signals/ <h1 id="how-redict-handles-common-unix-signals"> How Redict Handles Common Unix Signals <a class="anchor" href="#how-redict-handles-common-unix-signals">#</a> </h1> <p>This document provides information about how Redict reacts to different POSIX signals such as <code>SIGTERM</code> and <code>SIGSEGV</code>.</p> <h2 id="sigterm-and-sigint"> SIGTERM and SIGINT <a class="anchor" href="#sigterm-and-sigint">#</a> </h2> <p>The <code>SIGTERM</code> and <code>SIGINT</code> signals tell Redict to shut down gracefully. When the server receives this signal, it does not immediately exit. Instead, it schedules a shutdown similar to the one performed by the <code>SHUTDOWN</code> command. The scheduled shutdown starts as soon as possible, specifically as long as the current command in execution terminates (if any), with a possible additional delay of 0.1 seconds or less.</p> SINTER https://redict.io/docs/commands/sinter/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/sinter/ SINTERCARD https://redict.io/docs/commands/sintercard/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/sintercard/ SINTERSTORE https://redict.io/docs/commands/sinterstore/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/sinterstore/ SISMEMBER https://redict.io/docs/commands/sismember/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/sismember/ SLAVEOF https://redict.io/docs/commands/slaveof/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/slaveof/ SLOWLOG https://redict.io/docs/commands/slowlog/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/slowlog/ SLOWLOG GET https://redict.io/docs/commands/slowlog-get/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/slowlog-get/ SLOWLOG HELP https://redict.io/docs/commands/slowlog-help/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/slowlog-help/ SLOWLOG LEN https://redict.io/docs/commands/slowlog-len/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/slowlog-len/ SLOWLOG RESET https://redict.io/docs/commands/slowlog-reset/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/slowlog-reset/ SMEMBERS https://redict.io/docs/commands/smembers/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/smembers/ SMISMEMBER https://redict.io/docs/commands/smismember/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/smismember/ SMOVE https://redict.io/docs/commands/smove/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/smove/ SORT https://redict.io/docs/commands/sort/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/sort/ SORT_RO https://redict.io/docs/commands/sort_ro/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/sort_ro/ Redict sorted sets https://redict.io/docs/data-types/sorted-sets/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/data-types/sorted-sets/ <h1 id="introduction-to-redict-sorted-sets"> Introduction to Redict Sorted Sets <a class="anchor" href="#introduction-to-redict-sorted-sets">#</a> </h1> <p>A Redict sorted set is a collection of unique strings (members) ordered by an associated score. When more than one string has the same score, the strings are ordered lexicographically. Some use cases for sorted sets include:</p> <ul> <li>Leaderboards. For example, you can use sorted sets to easily maintain ordered lists of the highest scores in a massive online game.</li> <li>Rate limiters. In particular, you can use a sorted set to build a sliding-window rate limiter to prevent excessive API requests.</li> </ul> <p>You can think of sorted sets as a mix between a Set and a Hash. Like sets, sorted sets are composed of unique, non-repeating string elements, so in some sense a sorted set is a set as well.</p> SPOP https://redict.io/docs/commands/spop/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/spop/ SPUBLISH https://redict.io/docs/commands/spublish/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/spublish/ SRANDMEMBER https://redict.io/docs/commands/srandmember/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/srandmember/ SREM https://redict.io/docs/commands/srem/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/srem/ SSCAN https://redict.io/docs/commands/sscan/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/sscan/ SSUBSCRIBE https://redict.io/docs/commands/ssubscribe/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/ssubscribe/ Redict Streams https://redict.io/docs/data-types/streams/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/data-types/streams/ <h1 id="introduction-to-redict-streams"> Introduction to Redict Streams <a class="anchor" href="#introduction-to-redict-streams">#</a> </h1> <p>A Redict stream is a data structure that acts like an append-only log but also implements several operations to overcome some of the limits of a typical append-only log. These include random access in O(1) time and complex consumption strategies, such as consumer groups. You can use streams to record and simultaneously syndicate events in real time. Examples of Redict stream use cases include:</p> Redict Strings https://redict.io/docs/data-types/strings/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/data-types/strings/ <h1 id="introduction-to-redict-strings"> Introduction to Redict Strings <a class="anchor" href="#introduction-to-redict-strings">#</a> </h1> <p>Redict strings store sequences of bytes, including text, serialized objects, and binary arrays. As such, strings are the simplest type of value you can associate with a Redict key. They&rsquo;re often used for caching, but they support additional functionality that lets you implement counters and perform bitwise operations, too.</p> <p>Since Redict keys are strings, when we use the string type as a value too, we are mapping a string to another string. The string data type is useful for a number of use cases, like caching HTML fragments or pages.</p> STRLEN https://redict.io/docs/commands/strlen/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/strlen/ SUBSCRIBE https://redict.io/docs/commands/subscribe/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/subscribe/ SUBSTR https://redict.io/docs/commands/substr/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/substr/ SUNION https://redict.io/docs/commands/sunion/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/sunion/ SUNIONSTORE https://redict.io/docs/commands/sunionstore/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/sunionstore/ SUNSUBSCRIBE https://redict.io/docs/commands/sunsubscribe/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/sunsubscribe/ SWAPDB https://redict.io/docs/commands/swapdb/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/swapdb/ SYNC https://redict.io/docs/commands/sync/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/sync/ TIME https://redict.io/docs/commands/time/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/time/ TLS https://redict.io/docs/usage/security/encryption/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/security/encryption/ <h1 id="redict-tls-support"> Redict TLS Support <a class="anchor" href="#redict-tls-support">#</a> </h1> <p>SSL/TLS is supported by Redict as an optional feature that needs to be enabled at compile time.</p> <h2 id="getting-started"> Getting Started <a class="anchor" href="#getting-started">#</a> </h2> <h3 id="building"> Building <a class="anchor" href="#building">#</a> </h3> <p>To build with TLS support you&rsquo;ll need OpenSSL development libraries (e.g. <code>libssl-dev</code> on Debian/Ubuntu).</p> <p>Build Redict with the following command:</p> <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-sh" data-lang="sh"><span style="display:flex;"><span>make BUILD_TLS<span style="color:#f92672">=</span>yes </span></span></code></pre></div><h3 id="tests"> Tests <a class="anchor" href="#tests">#</a> </h3> <p>To run Redict test suite with TLS, you&rsquo;ll need TLS support for TCL (i.e. <code>tcl-tls</code> package on Debian/Ubuntu).</p> TOUCH https://redict.io/docs/commands/touch/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/touch/ Redict Transactions https://redict.io/docs/usage/transactions/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/transactions/ <h1 id="how-transactions-work-in-redict"> How Transactions Work in Redict <a class="anchor" href="#how-transactions-work-in-redict">#</a> </h1> <p>Redict Transactions allow the execution of a group of commands in a single step, they are centered around the commands <code>MULTI</code>, <code>EXEC</code>, <code>DISCARD</code> and <code>WATCH</code>. Redict Transactions make two important guarantees:</p> <ul> <li> <p>All the commands in a transaction are serialized and executed sequentially. A request sent by another client will never be served <strong>in the middle</strong> of the execution of a Redict Transaction. This guarantees that the commands are executed as a single isolated operation.</p> Troubleshooting Redict https://redict.io/docs/usage/troubleshooting/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/usage/troubleshooting/ <h1 id="troubleshooting"> Troubleshooting <a class="anchor" href="#troubleshooting">#</a> </h1> <p>This page tries to help you with what to do if you have issues with Redict. Part of the Redict project is helping people that are experiencing problems because we don&rsquo;t like to leave people alone with their issues.</p> <ul> <li>If you have <strong>latency problems</strong> with Redict, that in some way appears to be idle for some time, read our <a href="https://redict.io/docs/usage/optimization/latency/">Redis latency troubleshooting guide</a>.</li> <li>Redis stable releases are usually very reliable, however in the rare event you are <strong>experiencing crashes</strong> the developers can help a lot more if you provide debugging information. Please read our <a href="https://redict.io/docs/usage/debugging/">Debugging Redis guide</a>.</li> <li>We have a long history of users experiencing crashes with Redis that actually turned out to be servers with <strong>broken RAM</strong>. Please test your RAM using <strong>redict-server &ndash;test-memory</strong> in case Redis is not stable in your system. Redis built-in memory test is fast and reasonably reliable, but if you can you should reboot your server and use <a href="http://memtest86.com">memtest86</a>.</li> </ul> <p>For every other problem please drop a message in our Chat. See <a href="https://redict.io/docs/community/">Community resources</a> for details.</p> TTL https://redict.io/docs/commands/ttl/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/ttl/ TYPE https://redict.io/docs/commands/type/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/type/ UNLINK https://redict.io/docs/commands/unlink/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/unlink/ UNSUBSCRIBE https://redict.io/docs/commands/unsubscribe/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/unsubscribe/ UNWATCH https://redict.io/docs/commands/unwatch/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/unwatch/ Usage with containers https://redict.io/docs/install/containers/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/install/containers/ <h1 id="redict-containers"> Redict containers <a class="anchor" href="#redict-containers">#</a> </h1> <p>We provide official containers for Redict from our container registry at <code>registry.redict.io</code>. The source code for our container images is available <a href="https://codeberg.org/redict/redict-containers">on Codeberg</a>.</p> <h2 id="quickstart"> Quickstart <a class="anchor" href="#quickstart">#</a> </h2> <p>To start a Redict server:</p> <pre tabindex="0"><code>$ docker run --name redict -d -p 6379:6379 registry.redict.io/redict </code></pre><p>This will start a Redict server running on the default port on your local system. To interact with the running server with the <code>redict-cli</code> tool:</p> <pre tabindex="0"><code>$ docker exec -it redict /bin/redict-cli </code></pre><h2 id="available-containers"> Available containers <a class="anchor" href="#available-containers">#</a> </h2> <p>The default redict (and redict:latest) containers are scratch containers which only contain the Redict executables and the supporting files necessary to run them. If you need a more complete container, with a shell and other supporting tools, choose Alpine or Debian as your base.</p> WAIT https://redict.io/docs/commands/wait/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/wait/ WAITAOF https://redict.io/docs/commands/waitaof/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/waitaof/ WATCH https://redict.io/docs/commands/watch/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/watch/ XACK https://redict.io/docs/commands/xack/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xack/ XADD https://redict.io/docs/commands/xadd/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xadd/ XAUTOCLAIM https://redict.io/docs/commands/xautoclaim/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xautoclaim/ XCLAIM https://redict.io/docs/commands/xclaim/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xclaim/ XDEL https://redict.io/docs/commands/xdel/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xdel/ XGROUP https://redict.io/docs/commands/xgroup/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xgroup/ XGROUP CREATE https://redict.io/docs/commands/xgroup-create/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xgroup-create/ XGROUP CREATECONSUMER https://redict.io/docs/commands/xgroup-createconsumer/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xgroup-createconsumer/ XGROUP DELCONSUMER https://redict.io/docs/commands/xgroup-delconsumer/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xgroup-delconsumer/ XGROUP DESTROY https://redict.io/docs/commands/xgroup-destroy/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xgroup-destroy/ XGROUP HELP https://redict.io/docs/commands/xgroup-help/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xgroup-help/ XGROUP SETID https://redict.io/docs/commands/xgroup-setid/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xgroup-setid/ XINFO https://redict.io/docs/commands/xinfo/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xinfo/ XINFO CONSUMERS https://redict.io/docs/commands/xinfo-consumers/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xinfo-consumers/ XINFO GROUPS https://redict.io/docs/commands/xinfo-groups/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xinfo-groups/ XINFO HELP https://redict.io/docs/commands/xinfo-help/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xinfo-help/ XINFO STREAM https://redict.io/docs/commands/xinfo-stream/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xinfo-stream/ XLEN https://redict.io/docs/commands/xlen/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xlen/ XPENDING https://redict.io/docs/commands/xpending/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xpending/ XRANGE https://redict.io/docs/commands/xrange/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xrange/ XREAD https://redict.io/docs/commands/xread/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xread/ XREADGROUP https://redict.io/docs/commands/xreadgroup/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xreadgroup/ XREVRANGE https://redict.io/docs/commands/xrevrange/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xrevrange/ XSETID https://redict.io/docs/commands/xsetid/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xsetid/ XTRIM https://redict.io/docs/commands/xtrim/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/xtrim/ ZADD https://redict.io/docs/commands/zadd/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zadd/ ZCARD https://redict.io/docs/commands/zcard/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zcard/ ZCOUNT https://redict.io/docs/commands/zcount/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zcount/ ZDIFF https://redict.io/docs/commands/zdiff/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zdiff/ ZDIFFSTORE https://redict.io/docs/commands/zdiffstore/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zdiffstore/ ZINCRBY https://redict.io/docs/commands/zincrby/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zincrby/ ZINTER https://redict.io/docs/commands/zinter/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zinter/ ZINTERCARD https://redict.io/docs/commands/zintercard/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zintercard/ ZINTERSTORE https://redict.io/docs/commands/zinterstore/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zinterstore/ ZLEXCOUNT https://redict.io/docs/commands/zlexcount/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zlexcount/ ZMPOP https://redict.io/docs/commands/zmpop/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zmpop/ ZMSCORE https://redict.io/docs/commands/zmscore/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zmscore/ ZPOPMAX https://redict.io/docs/commands/zpopmax/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zpopmax/ ZPOPMIN https://redict.io/docs/commands/zpopmin/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zpopmin/ ZRANDMEMBER https://redict.io/docs/commands/zrandmember/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zrandmember/ ZRANGE https://redict.io/docs/commands/zrange/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zrange/ ZRANGEBYLEX https://redict.io/docs/commands/zrangebylex/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zrangebylex/ ZRANGEBYSCORE https://redict.io/docs/commands/zrangebyscore/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zrangebyscore/ ZRANGESTORE https://redict.io/docs/commands/zrangestore/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zrangestore/ ZRANK https://redict.io/docs/commands/zrank/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zrank/ ZREM https://redict.io/docs/commands/zrem/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zrem/ ZREMRANGEBYLEX https://redict.io/docs/commands/zremrangebylex/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zremrangebylex/ ZREMRANGEBYRANK https://redict.io/docs/commands/zremrangebyrank/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zremrangebyrank/ ZREMRANGEBYSCORE https://redict.io/docs/commands/zremrangebyscore/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zremrangebyscore/ ZREVRANGE https://redict.io/docs/commands/zrevrange/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zrevrange/ ZREVRANGEBYLEX https://redict.io/docs/commands/zrevrangebylex/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zrevrangebylex/ ZREVRANGEBYSCORE https://redict.io/docs/commands/zrevrangebyscore/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zrevrangebyscore/ ZREVRANK https://redict.io/docs/commands/zrevrank/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zrevrank/ ZSCAN https://redict.io/docs/commands/zscan/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zscan/ ZSCORE https://redict.io/docs/commands/zscore/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zscore/ ZUNION https://redict.io/docs/commands/zunion/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zunion/ ZUNIONSTORE https://redict.io/docs/commands/zunionstore/ Mon, 01 Jan 0001 00:00:00 +0000 https://redict.io/docs/commands/zunionstore/