url
stringlengths
38
157
content
stringlengths
72
15.1M
https://redis.io/docs/latest/operate/kubernetes/release-notes/6-4-2-releases/6-4-2-8-oct24/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise for Kubernetes release notes 6.4.2-8 (Oct 2024) </h1> <p class="text-lg -mt-5 mb-10"> The Redis Enterprise K8s 6.4.2-8 release supports Redis Enterprise Software 6.4.2. </p> <h2 id="overview"> Overview </h2> <p> This is a maintenance release of Redis Enterprise for Kubernetes version 6.4.2-8 and includes an updated Redis Enterprise image. </p> <h2 id="new-in-this-release"> New in this release </h2> <h3 id="feature-enhancements"> Feature enhancements </h3> <ul> <li> New Redis Enterprise software version 6.4.2-115 </li> </ul> <h2 id="upgrade-considerations"> Upgrade considerations </h2> <p> Be aware the following changes included in this release affect the upgrade process. Please read carefully before upgrading to 6.4.2-8. </p> <ul> <li> <p> <strong> Upgrade path to versions 7.2.4-2 or later </strong> </p> <p> Upgrading from this versions 7.2.4-2 or 7.2.4-7 is not possible using the OpenShift Operator Lifecycle Manager (OLM). OLM users will need to skip to version 7.2.4-10 to upgrade from this release version. </p> </li> <li> <p> <strong> ValidatingWebhookConfiguration </strong> </p> <p> This release uses a new <code> ValidatingWebhookConfiguration </code> resource to replace the <code> redb-admission </code> webhook resource. To use releases 6.4.2-4 or later, delete the old webhook resource and apply the new file. See <a href="/docs/latest/operate/kubernetes/upgrade/upgrade-redis-cluster/#reapply-webhook"> upgrade Redis cluster </a> for instructions. </p> </li> <li> <p> <strong> OpenShift SCC </strong> </p> <p> This release includes a new SCC ( <code> redis-enterprise-scc-v2 </code> ) that you need to bind to your service account before upgrading. OpenShift clusters running version 6.2.12 or earlier upgrading to version 6.2.18 or later might get stuck if you skip this step. See <a href="/docs/latest/operate/kubernetes/upgrade/upgrade-redis-cluster/#before-upgrading"> upgrade a Redis Enterprise cluster (REC) </a> for more info. </p> </li> </ul> <h2 id="compatibility"> Compatibility </h2> <p> See <a href="/docs/latest/operate/kubernetes/release-notes/6-4-2-releases/6-4-2-8/#compatibility"> 6.4.2-8 (July 2023) release notes </a> . </p> <h3 id="images"> Images </h3> <ul> <li> <strong> Redis Enterprise </strong> : <code> redislabs/redis:6.4.2-115 </code> </li> <li> <strong> Operator </strong> : <code> redislabs/operator:6.4.2-8 </code> </li> <li> <strong> Services Rigger </strong> : <code> redislabs/k8s-controller:6.4.2-8. </code> </li> </ul> <h4 id="openshift-images"> OpenShift images </h4> <ul> <li> <strong> Redis Enterprise </strong> : <code> registry.connect.redhat.com/redislabs/redis-enterprise:6.4.2-115.rhel8-openshift </code> (or <code> redislabs/redis-enterprise:6.4.2-115.rhel7-openshift </code> if upgrading from RHEL 7) </li> <li> <strong> Operator </strong> : <code> registry.connect.redhat.com/redislabs/redis-enterprise-operator:6.4.2-8 </code> </li> <li> <strong> Services Rigger </strong> : <code> registry.connect.redhat.com/redislabs/services-manager:6.4.2-8 </code> </li> </ul> <h4 id="olm-bundle"> OLM bundle </h4> <ul> <li> <strong> Redis Enterprise operator bundle </strong> : <code> v6.4.2-8.11 </code> </li> </ul> <p> The OLM version v6.4.2-8.11 replaces the earlier v6.4.2-8.10 release for the same Redis software version, providing only upgrade path fixes. </p> <h2 id="known-limitations"> Known limitations </h2> <p> See <a href="/docs/latest/operate/kubernetes/release-notes/6-4-2-releases/6-4-2-8/#known-limitations"> 6.4.2-8 (July 2023) release notes </a> . </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/kubernetes/release-notes/6-4-2-releases/6-4-2-8-oct24/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/release-notes/rs-7-4-2-releases/rs-7-4-2-216/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise Software release notes 7.4.2-216 (July 2024) </h1> <p class="text-lg -mt-5 mb-10"> region_name field for new AWS S3 regions. Bug fixes. </p> <p> This is a maintenance release for ​ <a href="https://redis.com/redis-enterprise-software/download-center/software/"> ​Redis Enterprise Software version 7.4.2 </a> . </p> <h2 id="highlights"> Highlights </h2> <p> This version offers: </p> <ul> <li> <p> <code> region_name </code> field for new AWS S3 regions </p> </li> <li> <p> Bug fixes </p> </li> </ul> <h2 id="new-in-this-release"> New in this release </h2> <h3 id="enhancements"> Enhancements </h3> <ul> <li> Added the <code> region_name </code> field in the REST API to import, export, and back up data in new AWS S3 regions. </li> </ul> <h4 id="redis-module-feature-sets"> Redis module feature sets </h4> <p> Redis Enterprise comes packaged with several modules. As of version 7.4.2, Redis Enterprise includes two feature sets, compatible with different Redis database versions. </p> <p> Bundled Redis modules compatible with Redis database version 7.2: </p> <ul> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-2.8-release-notes/"> RediSearch 2.8.13 </a> </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisjson/redisjson-2.6-release-notes/"> RedisJSON 2.6.10 </a> </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redistimeseries/redistimeseries-1.10-release-notes/"> RedisTimeSeries 1.10.12 </a> </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisbloom/redisbloom-2.6-release-notes/"> RedisBloom 2.6.12 </a> </p> </li> <li> <p> <a href="https://github.com/RedisGears/RedisGears/releases/tag/v2.0.20-m21"> RedisGears 2.0.20 preview </a> </p> </li> </ul> <p> Bundled Redis modules compatible with Redis database versions 6.0 and 6.2: </p> <ul> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-2.6-release-notes/"> RediSearch 2.6.18 </a> </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisjson/redisjson-2.4-release-notes/"> RedisJSON 2.4.9 </a> </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redistimeseries/redistimeseries-1.8-release-notes/"> RedisTimeSeries 1.8.13 </a> </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisbloom/redisbloom-2.4-release-notes/"> RedisBloom 2.4.9 </a> </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisgraph/redisgraph-2.10-release-notes/"> RedisGraph v2.10.15 </a> </p> </li> </ul> <h3 id="resolved-issues"> Resolved issues </h3> <ul> <li> <p> RS124753: Fixed a bug with databases created using a recovery plan with replication enabled where shards did not write persistence files. </p> </li> <li> <p> RS126290: Allow editing an existing Replica Of source's proxy certificate in the Cluster Manager UI. </p> </li> <li> <p> RS126476: Fixed unexpected database audit connection errors in the DMC proxy log. </p> </li> <li> <p> RS126382: Log info when a node fails to join the cluster. </p> </li> <li> <p> RS126655: Fixed database RAM limit display issue in the Cluster Manager UI. </p> </li> <li> <p> RS125930: Fixed a bug where the cluster rejected certificate chains with unknown extensions due to a cryptography bug. </p> </li> <li> <p> RS118231: Fixed output of <code> rladmin tune db </code> when updating buffer limits fails due to unreachable shards. </p> </li> <li> <p> RS128091: Fixed a bug in <code> XREADGROUP </code> on CRDB that prevented it from resetting the idle time of a consumer in <code> XINFO </code> . </p> </li> </ul> <h2 id="version-changes"> Version changes </h2> <h3 id="product-lifecycle-updates"> Product lifecycle updates </h3> <p> After August 31, 2024, Redis Enterprise Software versions 6.2.4 and 6.2.8 will not be included in <a href="/docs/latest/operate/rs/installing-upgrading/upgrading/upgrade-cluster/#supported-upgrade-paths"> supported upgrade paths </a> for Redis Enterprise Software versions beyond 7.4.x. Redis Enterprise Software versions 6.2.10, 6.2.12 and 6.2.18 continue to be part of the upgrade path. The next major Redis Enterprise Software release will still bundle Redis database version 6.2 and allow database upgrades from Redis database version 6.2 to 7.x. </p> <p> See the <a href="/docs/latest/operate/rs/installing-upgrading/product-lifecycle/"> Redis Enterprise Software product lifecycle </a> for more information about release numbers. </p> <h3 id="supported-platforms"> Supported platforms </h3> <p> The following table provides a snapshot of supported platforms as of this Redis Enterprise Software release. See the <a href="/docs/latest/operate/rs/references/supported-platforms/"> supported platforms reference </a> for more details about operating system compatibility. </p> <p> <span title="Check mark icon"> ✅ </span> Supported – The platform is supported for this version of Redis Enterprise Software and Redis Stack modules. </p> <p> <span class="font-serif" title="Warning icon"> ⚠️ </span> Deprecation warning – The platform is still supported for this version of Redis Enterprise Software, but support will be removed in a future release. </p> <table> <thead> <tr> <th> Redis Enterprise <br/> major versions </th> <th style="text-align:center"> 7.4 </th> <th style="text-align:center"> 7.2 </th> <th style="text-align:center"> 6.4 </th> <th style="text-align:center"> 6.2 </th> </tr> </thead> <tbody> <tr> <td> <strong> Release date </strong> </td> <td style="text-align:center"> Feb 2024 </td> <td style="text-align:center"> Aug 2023 </td> <td style="text-align:center"> Feb 2023 </td> <td style="text-align:center"> Aug 2021 </td> </tr> <tr> <td> <a href="/docs/latest/operate/rs/installing-upgrading/product-lifecycle/#endoflife-schedule"> <strong> End-of-life date </strong> </a> </td> <td style="text-align:center"> Determined after <br/> next major release </td> <td style="text-align:center"> July 2025 </td> <td style="text-align:center"> Feb 2025 </td> <td style="text-align:center"> Aug 2024 </td> </tr> <tr> <td> <strong> Platforms </strong> </td> <td style="text-align:center"> </td> <td style="text-align:center"> </td> <td style="text-align:center"> </td> <td style="text-align:center"> </td> </tr> <tr> <td> RHEL 9 &amp; <br/> compatible distros <sup> <a href="#table-note-1"> 1 </a> </sup> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> – </td> <td style="text-align:center"> – </td> <td style="text-align:center"> – </td> </tr> <tr> <td> RHEL 8 &amp; <br/> compatible distros <sup> <a href="#table-note-1"> 1 </a> </sup> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> RHEL 7 &amp; <br/> compatible distros <sup> <a href="#table-note-1"> 1 </a> </sup> </td> <td style="text-align:center"> – </td> <td style="text-align:center"> <span class="font-serif" title="Deprecated"> ⚠️ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> Ubuntu 20.04 <sup> <a href="#table-note-2"> 2 </a> </sup> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> – </td> </tr> <tr> <td> Ubuntu 18.04 <sup> <a href="#table-note-2"> 2 </a> </sup> </td> <td style="text-align:center"> <span class="font-serif" title="Deprecated"> ⚠️ </span> </td> <td style="text-align:center"> <span class="font-serif" title="Deprecated"> ⚠️ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> Ubuntu 16.04 <sup> <a href="#table-note-2"> 2 </a> </sup> </td> <td style="text-align:center"> – </td> <td style="text-align:center"> <span class="font-serif" title="Deprecated"> ⚠️ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> Amazon Linux 2 </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> – </td> </tr> <tr> <td> Amazon Linux 1 </td> <td style="text-align:center"> – </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> Kubernetes <sup> <a href="#table-note-3"> 3 </a> </sup> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> Docker <sup> <a href="#table-note-4"> 4 </a> </sup> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> <td style="text-align:center"> <span title="Supported"> ✅ </span> </td> </tr> </tbody> </table> <ol> <li> <p> <a name="table-note-1" style="display: block; height: 80px; margin-top: -80px;"> </a> The RHEL-compatible distributions CentOS, CentOS Stream, Alma, and Rocky are supported if they have full RHEL compatibility. Oracle Linux running the Red Hat Compatible Kernel (RHCK) is supported, but the Unbreakable Enterprise Kernel (UEK) is not supported. </p> </li> <li> <p> <a name="table-note-2" style="display: block; height: 80px; margin-top: -80px;"> </a> The server version of Ubuntu is recommended for production installations. The desktop version is only recommended for development deployments. </p> </li> <li> <p> <a name="table-note-3" style="display: block; height: 80px; margin-top: -80px;"> </a> See the <a href="/docs/latest/operate/kubernetes/reference/supported_k8s_distributions/"> Redis Enterprise for Kubernetes documentation </a> for details about support per version and Kubernetes distribution. </p> </li> <li> <p> <a name="table-note-4" style="display: block; height: 80px; margin-top: -80px;"> </a> <a href="/docs/latest/operate/rs/installing-upgrading/quickstarts/docker-quickstart/"> Docker images </a> of Redis Enterprise Software are certified for development and testing only. </p> </li> </ol> <h2 id="downloads"> Downloads </h2> <p> The following table shows the SHA256 checksums for the available packages: </p> <table> <thead> <tr> <th> Package </th> <th> SHA256 checksum (7.4.2-216 July release) </th> </tr> </thead> <tbody> <tr> <td> Ubuntu 18 </td> <td> <span class="break-all"> d20e3cc11bf97d8feb20e3c24e9530b2aae28bf7450dd498674d44014f3fa079 </span> </td> </tr> <tr> <td> Ubuntu 20 </td> <td> <span class="break-all"> 724ef7cbd78612252a246ff66a43c3bdf8aa0102086df8c25e825edce9dcb01f </span> </td> </tr> <tr> <td> Red Hat Enterprise Linux (RHEL) 8 </td> <td> <span class="break-all"> 1d8e0d16ff802c6a87fc1f9290ae4c27e71f170e1573349d179d9ef042accec2 </span> </td> </tr> <tr> <td> Red Hat Enterprise Linux (RHEL) 9 </td> <td> <span class="break-all"> 7717999ebebd7dd4d66db7cbd92b0439f95dadeddee1990da8c9bf7cdec84b71 </span> </td> </tr> <tr> <td> Amazon Linux 2 </td> <td> <span class="break-all"> 99b57ab72bbbcacdf9363d5b8eddfeaf6a23930a97cb6724334c4742810fcf5f </span> </td> </tr> </tbody> </table> <h2 id="security"> Security </h2> <p> <strong> Source available Redis security fixes compatibility </strong> </p> <p> As part of Redis's commitment to security, Redis Enterprise Software implements the latest <a href="https://github.com/redis/redis/releases"> security fixes </a> from <a href="https://github.com/redis/redis"> source available Redis </a> . Redis Enterprise has already included the fixes for the relevant CVEs. </p> <p> Some CVEs announced for Redis do not affect Redis Enterprise due to different or additional functionality in Redis Enterprise. </p> <p> Redis Enterprise 7.4.2 supports Redis 7.2, 6.2, and 6.0. Below is the list of Redis CVEs fixed by version. </p> <p> Redis 7.2.x: </p> <ul> <li> <p> (CVE-2024-31449) An authenticated user may use a specially crafted Lua script to trigger a stack buffer overflow in the bit library, which may potentially lead to remote code execution. </p> </li> <li> <p> (CVE-2024-31228) An authenticated user can trigger a denial-of-service by using specially crafted, long string match patterns on supported commands such as <code> KEYS </code> , <code> SCAN </code> , <code> PSUBSCRIBE </code> , <code> FUNCTION LIST </code> , <code> COMMAND LIST </code> , and ACL definitions. Matching of extremely long patterns may result in unbounded recursion, leading to stack overflow and process crashes. </p> </li> <li> <p> (CVE-2023-41056) In some cases, Redis may incorrectly handle resizing of memory buffers, which can result in incorrect accounting of buffer sizes and lead to heap overflow and potential remote code execution. </p> </li> <li> <p> (CVE-2023-41053) Redis does not correctly identify keys accessed by <code> SORT_RO </code> and, as a result, may grant users executing this command access to keys that are not explicitly authorized by the ACL configuration. (Redis 7.2.1) </p> </li> </ul> <p> Redis 7.0.x: </p> <ul> <li> <p> (CVE-2024-31449) An authenticated user may use a specially crafted Lua script to trigger a stack buffer overflow in the bit library, which may potentially lead to remote code execution. </p> </li> <li> <p> (CVE-2024-31228) An authenticated user can trigger a denial-of-service by using specially crafted, long string match patterns on supported commands such as <code> KEYS </code> , <code> SCAN </code> , <code> PSUBSCRIBE </code> , <code> FUNCTION LIST </code> , <code> COMMAND LIST </code> , and ACL definitions. Matching of extremely long patterns may result in unbounded recursion, leading to stack overflow and process crashes. </p> </li> <li> <p> (CVE-2023-41056) In some cases, Redis may incorrectly handle resizing of memory buffers, which can result in incorrect accounting of buffer sizes and lead to heap overflow and potential remote code execution. </p> </li> <li> <p> (CVE-2023-41053) Redis does not correctly identify keys accessed by <code> SORT_RO </code> and, as a result, may grant users executing this command access to keys that are not explicitly authorized by the ACL configuration. (Redis 7.0.13) </p> </li> <li> <p> (CVE-2023-36824) Extracting key names from a command and a list of arguments may, in some cases, trigger a heap overflow and result in reading random heap memory, heap corruption, and potentially remote code execution. Specifically: using <code> COMMAND GETKEYS* </code> and validation of key names in ACL rules. (Redis 7.0.12) </p> </li> <li> <p> (CVE-2023-28856) Authenticated users can use the <code> HINCRBYFLOAT </code> command to create an invalid hash field that will crash Redis on access. (Redis 7.0.11) </p> </li> <li> <p> (CVE-2023-28425) A specially crafted <code> MSETNX </code> command can lead to assertion and denial-of-service. (Redis 7.0.10) </p> </li> <li> <p> (CVE-2023-25155) Specially crafted <code> SRANDMEMBER </code> , <code> ZRANDMEMBER </code> , and <code> HRANDFIELD </code> commands can trigger an integer overflow, resulting in a runtime assertion and termination of the Redis server process. (Redis 7.0.9) </p> </li> <li> <p> (CVE-2023-22458) Integer overflow in the Redis <code> HRANDFIELD </code> and <code> ZRANDMEMBER </code> commands can lead to denial-of-service. (Redis 7.0.8) </p> </li> <li> <p> (CVE-2022-36021) String matching commands (like <code> SCAN </code> or <code> KEYS </code> ) with a specially crafted pattern to trigger a denial-of-service attack on Redis can cause it to hang and consume 100% CPU time. (Redis 7.0.9) </p> </li> <li> <p> (CVE-2022-35977) Integer overflow in the Redis <code> SETRANGE </code> and <code> SORT </code> / <code> SORT_RO </code> commands can drive Redis to OOM panic. (Redis 7.0.8) </p> </li> <li> <p> (CVE-2022-35951) Executing an <code> XAUTOCLAIM </code> command on a stream key in a specific state, with a specially crafted <code> COUNT </code> argument, may cause an integer overflow, a subsequent heap overflow, and potentially lead to remote code execution. The problem affects Redis versions 7.0.0 or newer. (Redis 7.0.5) </p> </li> <li> <p> (CVE-2022-31144) A specially crafted <code> XAUTOCLAIM </code> command on a stream key in a specific state may result in heap overflow and potentially remote code execution. The problem affects Redis versions 7.0.0 or newer. (Redis 7.0.4) </p> </li> <li> <p> (CVE-2022-24834) A specially crafted Lua script executing in Redis can trigger a heap overflow in the cjson and cmsgpack libraries, and result in heap corruption and potentially remote code execution. The problem exists in all versions of Redis with Lua scripting support, starting from 2.6, and affects only authenticated and authorized users. (Redis 7.0.12) </p> </li> <li> <p> (CVE-2022-24736) An attacker attempting to load a specially crafted Lua script can cause NULL pointer dereference which will result in a crash of the <code> redis-server </code> process. This issue affects all versions of Redis. (Redis 7.0.0) </p> </li> <li> <p> (CVE-2022-24735) By exploiting weaknesses in the Lua script execution environment, an attacker with access to Redis can inject Lua code that will execute with the (potentially higher) privileges of another Redis user. (Redis 7.0.0) </p> </li> </ul> <p> Redis 6.2.x: </p> <ul> <li> <p> (CVE-2024-31449) An authenticated user may use a specially crafted Lua script to trigger a stack buffer overflow in the bit library, which may potentially lead to remote code execution. </p> </li> <li> <p> (CVE-2024-31228) An authenticated user can trigger a denial-of-service by using specially crafted, long string match patterns on supported commands such as <code> KEYS </code> , <code> SCAN </code> , <code> PSUBSCRIBE </code> , <code> FUNCTION LIST </code> , <code> COMMAND LIST </code> , and ACL definitions. Matching of extremely long patterns may result in unbounded recursion, leading to stack overflow and process crashes. </p> </li> <li> <p> (CVE-2023-45145) The wrong order of listen(2) and chmod(2) calls creates a race condition that can be used by another process to bypass desired Unix socket permissions on startup. (Redis 6.2.14) </p> </li> <li> <p> (CVE-2023-28856) Authenticated users can use the <code> HINCRBYFLOAT </code> command to create an invalid hash field that will crash Redis on access. (Redis 6.2.12) </p> </li> <li> <p> (CVE-2023-25155) Specially crafted <code> SRANDMEMBER </code> , <code> ZRANDMEMBER </code> , and <code> HRANDFIELD </code> commands can trigger an integer overflow, resulting in a runtime assertion and termination of the Redis server process. (Redis 6.2.11) </p> </li> <li> <p> (CVE-2023-22458) Integer overflow in the Redis <code> HRANDFIELD </code> and <code> ZRANDMEMBER </code> commands can lead to denial-of-service. (Redis 6.2.9) </p> </li> <li> <p> (CVE-2022-36021) String matching commands (like <code> SCAN </code> or <code> KEYS </code> ) with a specially crafted pattern to trigger a denial-of-service attack on Redis can cause it to hang and consume 100% CPU time. (Redis 6.2.11) </p> </li> <li> <p> (CVE-2022-35977) Integer overflow in the Redis <code> SETRANGE </code> and <code> SORT </code> / <code> SORT_RO </code> commands can drive Redis to OOM panic. (Redis 6.2.9) </p> </li> <li> <p> (CVE-2022-24834) A specially crafted Lua script executing in Redis can trigger a heap overflow in the cjson and cmsgpack libraries, and result in heap corruption and potentially remote code execution. The problem exists in all versions of Redis with Lua scripting support, starting from 2.6, and affects only authenticated and authorized users. (Redis 6.2.13) </p> </li> <li> <p> (CVE-2022-24736) An attacker attempting to load a specially crafted Lua script can cause NULL pointer dereference which will result in a crash of the <code> redis-server </code> process. This issue affects all versions of Redis. (Redis 6.2.7) </p> </li> <li> <p> (CVE-2022-24735) By exploiting weaknesses in the Lua script execution environment, an attacker with access to Redis can inject Lua code that will execute with the (potentially higher) privileges of another Redis user. (Redis 6.2.7) </p> </li> <li> <p> (CVE-2021-41099) Integer to heap buffer overflow can occur while handling certain string commands and network payloads, when <code> proto-max-bulk-len </code> is manually configured to a non-default, very large value. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32762) Integer to heap buffer overflow issue in <code> redis-cli </code> and <code> redis-sentinel </code> parsing large multi-bulk replies on some older and less common platforms. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32761) An integer overflow bug in Redis version 2.2 or newer can be exploited using the <code> BITFIELD </code> command to corrupt the heap and potentially result in remote code execution. (Redis 6.2.5) </p> </li> <li> <p> (CVE-2021-32687) Integer to heap buffer overflow with intsets, when <code> set-max-intset-entries </code> is manually configured to a non-default, very large value. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32675) Denial Of Service when processing RESP request payloads with a large number of elements on many connections. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32672) Random heap reading issue with Lua Debugger. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32628) Integer to heap buffer overflow can occur while handling ziplist-encoded data types, when configuring a large, non-default value for <code> hash-max-ziplist-entries </code> , <code> hash-max-ziplist-value </code> , <code> zset-max-ziplist-entries </code> or <code> zset-max-ziplist-value </code> . (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32627) Integer to heap buffer overflow issue with streams, when configuring a non-default, large value for <code> proto-max-bulk-len </code> and <code> client-query-buffer-limit </code> . (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32626) Specially crafted Lua scripts may result with Heap buffer overflow. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32625) An integer overflow bug in Redis version 6.0 or newer can be exploited using the STRALGO LCS command to corrupt the heap and potentially result with remote code execution. This is a result of an incomplete fix by CVE-2021-29477. (Redis 6.2.4) </p> </li> <li> <p> (CVE-2021-29478) An integer overflow bug in Redis 6.2 could be exploited to corrupt the heap and potentially result with remote code execution. The vulnerability involves changing the default set-max-intset-entries configuration value, creating a large set key that consists of integer values and using the COPY command to duplicate it. The integer overflow bug exists in all versions of Redis starting with 2.6, where it could result with a corrupted RDB or DUMP payload, but not exploited through COPY (which did not exist before 6.2). (Redis 6.2.3) </p> </li> <li> <p> (CVE-2021-29477) An integer overflow bug in Redis version 6.0 or newer could be exploited using the STRALGO LCS command to corrupt the heap and potentially result in remote code execution. The integer overflow bug exists in all versions of Redis starting with 6.0. (Redis 6.2.3) </p> </li> </ul> <p> Redis 6.0.x: </p> <ul> <li> <p> (CVE-2022-24834) A specially crafted Lua script executing in Redis can trigger a heap overflow in the cjson and cmsgpack libraries, and result in heap corruption and potentially remote code execution. The problem exists in all versions of Redis with Lua scripting support, starting from 2.6, and affects only authenticated and authorized users. (Redis 6.0.20) </p> </li> <li> <p> (CVE-2023-28856) Authenticated users can use the <code> HINCRBYFLOAT </code> command to create an invalid hash field that will crash Redis on access. (Redis 6.0.19) </p> </li> <li> <p> (CVE-2023-25155) Specially crafted <code> SRANDMEMBER </code> , <code> ZRANDMEMBER </code> , and <code> HRANDFIELD </code> commands can trigger an integer overflow, resulting in a runtime assertion and termination of the Redis server process. (Redis 6.0.18) </p> </li> <li> <p> (CVE-2022-36021) String matching commands (like <code> SCAN </code> or <code> KEYS </code> ) with a specially crafted pattern to trigger a denial-of-service attack on Redis can cause it to hang and consume 100% CPU time. (Redis 6.0.18) </p> </li> <li> <p> (CVE-2022-35977) Integer overflow in the Redis <code> SETRANGE </code> and <code> SORT </code> / <code> SORT_RO </code> commands can drive Redis to OOM panic. (Redis 6.0.17) </p> </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/release-notes/rs-7-4-2-releases/rs-7-4-2-216/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/databases/connect/supported-clients-browsers/.html
<section class="prose w-full py-12 max-w-none"> <h1> Supported connection clients </h1> <p class="text-lg -mt-5 mb-10"> Info about Redis client libraries and supported clients when using the discovery service. </p> <p> You can connect to Redis Enterprise Software databases programmatically using client libraries. </p> <h2 id="redis-client-libraries"> Redis client libraries </h2> <p> To connect an application to a Redis database hosted by Redis Enterprise Software, use a <a href="/docs/latest/develop/clients/"> client library </a> appropriate for your programming language. </p> <p> You can also use the <code> redis-cli </code> utility to connect to a database from the command line. </p> <p> For examples of each approach, see the <a href="/docs/latest/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart/"> Redis Enterprise Software quickstart </a> . </p> <p> Note: You cannot use client libraries to configure Redis Enterprise Software. Instead, use: </p> <ul> <li> The Redis Enterprise Software <a href="/docs/latest/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart/"> Cluster Manager UI </a> </li> <li> The <a href="/docs/latest/operate/rs/references/rest-api/"> REST API </a> </li> <li> Command-line utilities, such as <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/"> <code> rladmin </code> </a> </li> </ul> <h3 id="discovery-service"> Discovery service </h3> <p> We recommend the following clients when using a <a href="/docs/latest/operate/rs/databases/durability-ha/discovery-service/"> discovery service </a> based on the Redis Sentinel API: </p> <ul> <li> <a href="/docs/latest/develop/clients/redis-py/"> redis-py </a> (Python client) </li> <li> <a href="/docs/latest/develop/clients/dotnet/"> NRedisStack </a> (.NET client) </li> <li> <a href="/docs/latest/develop/clients/jedis/"> Jedis </a> (synchronous Java client) </li> <li> <a href="/docs/latest/develop/clients/lettuce/"> Lettuce </a> (asynchronous Java client) </li> <li> <a href="/docs/latest/develop/clients/go/"> go-redis </a> (Go client) </li> <li> <a href="https://github.com/redis/hiredis"> Hiredis </a> (C client) </li> </ul> <p> If you need to use another client, you can use <a href="https://github.com/RedisLabs/sentinel_tunnel"> Sentinel Tunnel </a> to discover the current Redis master with Sentinel and create a TCP tunnel between a local port on the client and the master. </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/databases/connect/supported-clients-browsers/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/crdb/.html
<section class="prose w-full py-12 max-w-none"> <h1> CRDB object </h1> <p class="text-lg -mt-5 mb-10"> An object that represents an Active-Active database </p> <p> An object that represents an Active-Active database. </p> <table> <thead> <tr> <th> Name </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> guid </td> <td> string </td> <td> The global unique ID of the Active-Active database </td> </tr> <tr> <td> causal_consistency </td> <td> boolean </td> <td> Enables causal consistency across CRDT instances </td> </tr> <tr> <td> default_db_config </td> <td> <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/crdb/database_config/"> CRDB database_config </a> object </td> <td> Default database configuration </td> </tr> <tr> <td> encryption </td> <td> boolean </td> <td> Encrypt communication </td> </tr> <tr> <td> featureset_version </td> <td> integer </td> <td> Active-Active database active FeatureSet version </td> </tr> <tr> <td> instances </td> <td> array of <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/crdb/instance_info/"> CRDB instance_info </a> objects </td> <td> </td> </tr> <tr> <td> local_databases </td> <td> <pre><code>[{ "bdb_uid": string, "id": integer }, ...] </code></pre> </td> <td> Mapping of instance IDs for local databases to local BDB IDs </td> </tr> <tr> <td> name </td> <td> string </td> <td> Name of Active-Active database </td> </tr> <tr> <td> protocol_version </td> <td> integer </td> <td> Active-Active database active protocol version </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/crdb/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/oss_and_stack/reference/cluster-spec/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis cluster specification </h1> <p class="text-lg -mt-5 mb-10"> Detailed specification for Redis cluster </p> <p> Welcome to the <strong> Redis Cluster Specification </strong> . Here you'll find information about the algorithms and design rationales of Redis Cluster. This document is a work in progress as it is continuously synchronized with the actual implementation of Redis. </p> <h2 id="main-properties-and-rationales-of-the-design"> Main properties and rationales of the design </h2> <h3 id="redis-cluster-goals"> Redis Cluster goals </h3> <p> Redis Cluster is a distributed implementation of Redis with the following goals in order of importance in the design: </p> <ul> <li> High performance and linear scalability up to 1000 nodes. There are no proxies, asynchronous replication is used, and no merge operations are performed on values. </li> <li> Acceptable degree of write safety: the system tries (in a best-effort way) to retain all the writes originating from clients connected with the majority of the master nodes. Usually there are small windows where acknowledged writes can be lost. Windows to lose acknowledged writes are larger when clients are in a minority partition. </li> <li> Availability: Redis Cluster is able to survive partitions where the majority of the master nodes are reachable and there is at least one reachable replica for every master node that is no longer reachable. Moreover using <em> replicas migration </em> , masters no longer replicated by any replica will receive one from a master which is covered by multiple replicas. </li> </ul> <p> What is described in this document is implemented in Redis 3.0 or greater. </p> <h3 id="implemented-subset"> Implemented subset </h3> <p> Redis Cluster implements all the single key commands available in the non-distributed version of Redis. Commands performing complex multi-key operations like set unions and intersections are implemented for cases where all of the keys involved in the operation hash to the same slot. </p> <p> Redis Cluster implements a concept called <strong> hash tags </strong> that can be used to force certain keys to be stored in the same hash slot. However, during manual resharding, multi-key operations may become unavailable for some time while single-key operations are always available. </p> <p> Redis Cluster does not support multiple databases like the standalone version of Redis. We only support database <code> 0 </code> ; the <a href="/commands/select"> <code> SELECT </code> </a> command is not allowed. </p> <h2 id="client-and-server-roles-in-the-redis-cluster-protocol"> Client and Server roles in the Redis cluster protocol </h2> <p> In Redis Cluster, nodes are responsible for holding the data, and taking the state of the cluster, including mapping keys to the right nodes. Cluster nodes are also able to auto-discover other nodes, detect non-working nodes, and promote replica nodes to master when needed in order to continue to operate when a failure occurs. </p> <p> To perform their tasks all the cluster nodes are connected using a TCP bus and a binary protocol, called the <strong> Redis Cluster Bus </strong> . Every node is connected to every other node in the cluster using the cluster bus. Nodes use a gossip protocol to propagate information about the cluster in order to discover new nodes, to send ping packets to make sure all the other nodes are working properly, and to send cluster messages needed to signal specific conditions. The cluster bus is also used in order to propagate Pub/Sub messages across the cluster and to orchestrate manual failovers when requested by users (manual failovers are failovers which are not initiated by the Redis Cluster failure detector, but by the system administrator directly). </p> <p> Since cluster nodes are not able to proxy requests, clients may be redirected to other nodes using redirection errors <code> -MOVED </code> and <code> -ASK </code> . The client is in theory free to send requests to all the nodes in the cluster, getting redirected if needed, so the client is not required to hold the state of the cluster. However clients that are able to cache the map between keys and nodes can improve the performance in a sensible way. </p> <h3 id="write-safety"> Write safety </h3> <p> Redis Cluster uses asynchronous replication between nodes, and <strong> last failover wins </strong> implicit merge function. This means that the last elected master dataset eventually replaces all the other replicas. There is always a window of time when it is possible to lose writes during partitions. However these windows are very different in the case of a client that is connected to the majority of masters, and a client that is connected to the minority of masters. </p> <p> Redis Cluster tries harder to retain writes that are performed by clients connected to the majority of masters, compared to writes performed in the minority side. The following are examples of scenarios that lead to loss of acknowledged writes received in the majority partitions during failures: </p> <ol> <li> <p> A write may reach a master, but while the master may be able to reply to the client, the write may not be propagated to replicas via the asynchronous replication used between master and replica nodes. If the master dies without the write reaching the replicas, the write is lost forever if the master is unreachable for a long enough period that one of its replicas is promoted. This is usually hard to observe in the case of a total, sudden failure of a master node since masters try to reply to clients (with the acknowledge of the write) and replicas (propagating the write) at about the same time. However it is a real world failure mode. </p> </li> <li> <p> Another theoretically possible failure mode where writes are lost is the following: </p> </li> </ol> <ul> <li> A master is unreachable because of a partition. </li> <li> It gets failed over by one of its replicas. </li> <li> After some time it may be reachable again. </li> <li> A client with an out-of-date routing table may write to the old master before it is converted into a replica (of the new master) by the cluster. </li> </ul> <p> The second failure mode is unlikely to happen because master nodes unable to communicate with the majority of the other masters for enough time to be failed over will no longer accept writes, and when the partition is fixed writes are still refused for a small amount of time to allow other nodes to inform about configuration changes. This failure mode also requires that the client's routing table has not yet been updated. </p> <p> Writes targeting the minority side of a partition have a larger window in which to get lost. For example, Redis Cluster loses a non-trivial number of writes on partitions where there is a minority of masters and at least one or more clients, since all the writes sent to the masters may potentially get lost if the masters are failed over in the majority side. </p> <p> Specifically, for a master to be failed over it must be unreachable by the majority of masters for at least <code> NODE_TIMEOUT </code> , so if the partition is fixed before that time, no writes are lost. When the partition lasts for more than <code> NODE_TIMEOUT </code> , all the writes performed in the minority side up to that point may be lost. However the minority side of a Redis Cluster will start refusing writes as soon as <code> NODE_TIMEOUT </code> time has elapsed without contact with the majority, so there is a maximum window after which the minority becomes no longer available. Hence, no writes are accepted or lost after that time. </p> <h3 id="availability"> Availability </h3> <p> Redis Cluster is not available in the minority side of the partition. In the majority side of the partition assuming that there are at least the majority of masters and a replica for every unreachable master, the cluster becomes available again after <code> NODE_TIMEOUT </code> time plus a few more seconds required for a replica to get elected and failover its master (failovers are usually executed in a matter of 1 or 2 seconds). </p> <p> This means that Redis Cluster is designed to survive failures of a few nodes in the cluster, but it is not a suitable solution for applications that require availability in the event of large net splits. </p> <p> In the example of a cluster composed of N master nodes where every node has a single replica, the majority side of the cluster will remain available as long as a single node is partitioned away, and will remain available with a probability of <code> 1-(1/(N*2-1)) </code> when two nodes are partitioned away (after the first node fails we are left with <code> N*2-1 </code> nodes in total, and the probability of the only master without a replica to fail is <code> 1/(N*2-1)) </code> . </p> <p> For example, in a cluster with 5 nodes and a single replica per node, there is a <code> 1/(5*2-1) = 11.11% </code> probability that after two nodes are partitioned away from the majority, the cluster will no longer be available. </p> <p> Thanks to a Redis Cluster feature called <strong> replicas migration </strong> the Cluster availability is improved in many real world scenarios by the fact that replicas migrate to orphaned masters (masters no longer having replicas). So at every successful failure event, the cluster may reconfigure the replicas layout in order to better resist the next failure. </p> <h3 id="performance"> Performance </h3> <p> In Redis Cluster nodes don't proxy commands to the right node in charge for a given key, but instead they redirect clients to the right nodes serving a given portion of the key space. </p> <p> Eventually clients obtain an up-to-date representation of the cluster and which node serves which subset of keys, so during normal operations clients directly contact the right nodes in order to send a given command. </p> <p> Because of the use of asynchronous replication, nodes do not wait for other nodes' acknowledgment of writes (if not explicitly requested using the <a href="/commands/wait"> <code> WAIT </code> </a> command). </p> <p> Also, because multi-key commands are only limited to <em> near </em> keys, data is never moved between nodes except when resharding. </p> <p> Normal operations are handled exactly as in the case of a single Redis instance. This means that in a Redis Cluster with N master nodes you can expect the same performance as a single Redis instance multiplied by N as the design scales linearly. At the same time the query is usually performed in a single round trip, since clients usually retain persistent connections with the nodes, so latency figures are also the same as the single standalone Redis node case. </p> <p> Very high performance and scalability while preserving weak but reasonable forms of data safety and availability is the main goal of Redis Cluster. </p> <h3 id="why-merge-operations-are-avoided"> Why merge operations are avoided </h3> <p> The Redis Cluster design avoids conflicting versions of the same key-value pair in multiple nodes as in the case of the Redis data model this is not always desirable. Values in Redis are often very large; it is common to see lists or sorted sets with millions of elements. Also data types are semantically complex. Transferring and merging these kind of values can be a major bottleneck and/or may require the non-trivial involvement of application-side logic, additional memory to store meta-data, and so forth. </p> <p> There are no strict technological limits here. CRDTs or synchronously replicated state machines can model complex data types similar to Redis. However, the actual run time behavior of such systems would not be similar to Redis Cluster. Redis Cluster was designed in order to cover the exact use cases of the non-clustered Redis version. </p> <h2 id="overview-of-redis-cluster-main-components"> Overview of Redis Cluster main components </h2> <h3 id="key-distribution-model"> Key distribution model </h3> <p> The cluster's key space is split into 16384 slots, effectively setting an upper limit for the cluster size of 16384 master nodes (however, the suggested max size of nodes is on the order of ~ 1000 nodes). </p> <p> Each master node in a cluster handles a subset of the 16384 hash slots. The cluster is <strong> stable </strong> when there is no cluster reconfiguration in progress (i.e. where hash slots are being moved from one node to another). When the cluster is stable, a single hash slot will be served by a single node (however the serving node can have one or more replicas that will replace it in the case of net splits or failures, and that can be used in order to scale read operations where reading stale data is acceptable). </p> <p> The base algorithm used to map keys to hash slots is the following (read the next paragraph for the hash tag exception to this rule): </p> <pre><code>HASH_SLOT = CRC16(key) mod 16384 </code></pre> <p> The CRC16 is specified as follows: </p> <ul> <li> Name: XMODEM (also known as ZMODEM or CRC-16/ACORN) </li> <li> Width: 16 bit </li> <li> Poly: 1021 (That is actually x^16 + x^12 + x^5 + 1) </li> <li> Initialization: 0000 </li> <li> Reflect Input byte: False </li> <li> Reflect Output CRC: False </li> <li> Xor constant to output CRC: 0000 </li> <li> Output for "123456789": 31C3 </li> </ul> <p> 14 out of 16 CRC16 output bits are used (this is why there is a modulo 16384 operation in the formula above). </p> <p> In our tests CRC16 behaved remarkably well in distributing different kinds of keys evenly across the 16384 slots. </p> <p> <strong> Note </strong> : A reference implementation of the CRC16 algorithm used is available in the Appendix A of this document. </p> <h3 id="hash-tags"> Hash tags </h3> <p> There is an exception for the computation of the hash slot that is used in order to implement <strong> hash tags </strong> . Hash tags are a way to ensure that multiple keys are allocated in the same hash slot. This is used in order to implement multi-key operations in Redis Cluster. </p> <p> To implement hash tags, the hash slot for a key is computed in a slightly different way in certain conditions. If the key contains a "{...}" pattern only the substring between <code> { </code> and <code> } </code> is hashed in order to obtain the hash slot. However since it is possible that there are multiple occurrences of <code> { </code> or <code> } </code> the algorithm is well specified by the following rules: </p> <ul> <li> IF the key contains a <code> { </code> character. </li> <li> AND IF there is a <code> } </code> character to the right of <code> { </code> . </li> <li> AND IF there are one or more characters between the first occurrence of <code> { </code> and the first occurrence of <code> } </code> . </li> </ul> <p> Then instead of hashing the key, only what is between the first occurrence of <code> { </code> and the following first occurrence of <code> } </code> is hashed. </p> <p> Examples: </p> <ul> <li> The two keys <code> {user1000}.following </code> and <code> {user1000}.followers </code> will hash to the same hash slot since only the substring <code> user1000 </code> will be hashed in order to compute the hash slot. </li> <li> For the key <code> foo{}{bar} </code> the whole key will be hashed as usually since the first occurrence of <code> { </code> is followed by <code> } </code> on the right without characters in the middle. </li> <li> For the key <code> foo{{bar}}zap </code> the substring <code> {bar </code> will be hashed, because it is the substring between the first occurrence of <code> { </code> and the first occurrence of <code> } </code> on its right. </li> <li> For the key <code> foo{bar}{zap} </code> the substring <code> bar </code> will be hashed, since the algorithm stops at the first valid or invalid (without bytes inside) match of <code> { </code> and <code> } </code> . </li> <li> What follows from the algorithm is that if the key starts with <code> {} </code> , it is guaranteed to be hashed as a whole. This is useful when using binary data as key names. </li> </ul> <h4 id="glob-style-patterns"> Glob-style patterns </h4> <p> Commands accepting a glob-style pattern, including <a href="/commands/keys"> <code> KEYS </code> </a> , <a href="/commands/scan"> <code> SCAN </code> </a> and <a href="/commands/sort"> <code> SORT </code> </a> , are optimized for patterns that imply a single slot. This means that if all keys that can match a pattern must belong to a specific slot, only this slot is searched for keys matching the pattern. The pattern slot optimization is introduced in Redis 8.0. </p> <p> The optimization kicks in when the pattern meets the following conditions: </p> <ul> <li> the pattern contains a hashtag, </li> <li> there are no wildcards or escape characters before the hashtag, and </li> <li> the hashtag within curly braces doesn't contain any wildcards or escape characters. </li> </ul> <p> For example, <code> SCAN 0 MATCH {abc}* </code> can successfully recognize the hashtag and scans only the slot corresponding to <code> abc </code> . However, the patterns <code> *{abc} </code> , <code> {a*c} </code> , or <code> {a\*bc} </code> cannot recognize the hashtag, so all slots need to be scanned. </p> <h4 id="hash-slot-example-code"> Hash slot example code </h4> <p> Adding the hash tags exception, the following is an implementation of the <code> HASH_SLOT </code> function in Ruby and C language. </p> <p> Ruby example code: </p> <pre><code>def HASH_SLOT(key) s = key.index "{" if s e = key.index "}",s+1 if e &amp;&amp; e != s+1 key = key[s+1..e-1] end end crc16(key) % 16384 end </code></pre> <p> C example code: </p> <pre><code>unsigned int HASH_SLOT(char *key, int keylen) { int s, e; /* start-end indexes of { and } */ /* Search the first occurrence of '{'. */ for (s = 0; s &lt; keylen; s++) if (key[s] == '{') break; /* No '{' ? Hash the whole key. This is the base case. */ if (s == keylen) return crc16(key,keylen) &amp; 16383; /* '{' found? Check if we have the corresponding '}'. */ for (e = s+1; e &lt; keylen; e++) if (key[e] == '}') break; /* No '}' or nothing between {} ? Hash the whole key. */ if (e == keylen || e == s+1) return crc16(key,keylen) &amp; 16383; /* If we are here there is both a { and a } on its right. Hash * what is in the middle between { and }. */ return crc16(key+s+1,e-s-1) &amp; 16383; } </code></pre> <h3 id="cluster-node-attributes"> Cluster node attributes </h3> <p> Every node has a unique name in the cluster. The node name is the hex representation of a 160 bit random number, obtained the first time a node is started (usually using /dev/urandom). The node will save its ID in the node configuration file, and will use the same ID forever, or at least as long as the node configuration file is not deleted by the system administrator, or a <em> hard reset </em> is requested via the <a href="/commands/cluster-reset"> <code> CLUSTER RESET </code> </a> command. </p> <p> The node ID is used to identify every node across the whole cluster. It is possible for a given node to change its IP address without any need to also change the node ID. The cluster is also able to detect the change in IP/port and reconfigure using the gossip protocol running over the cluster bus. </p> <p> The node ID is not the only information associated with each node, but is the only one that is always globally consistent. Every node has also the following set of information associated. Some information is about the cluster configuration detail of this specific node, and is eventually consistent across the cluster. Some other information, like the last time a node was pinged, is instead local to each node. </p> <p> Every node maintains the following information about other nodes that it is aware of in the cluster: The node ID, IP and port of the node, a set of flags, what is the master of the node if it is flagged as <code> replica </code> , last time the node was pinged and the last time the pong was received, the current <em> configuration epoch </em> of the node (explained later in this specification), the link state and finally the set of hash slots served. </p> <p> A detailed <a href="/docs/latest/commands/cluster-nodes/"> explanation of all the node fields </a> is described in the <a href="/commands/cluster-nodes"> <code> CLUSTER NODES </code> </a> documentation. </p> <p> The <a href="/commands/cluster-nodes"> <code> CLUSTER NODES </code> </a> command can be sent to any node in the cluster and provides the state of the cluster and the information for each node according to the local view the queried node has of the cluster. </p> <p> The following is sample output of the <a href="/commands/cluster-nodes"> <code> CLUSTER NODES </code> </a> command sent to a master node in a small cluster of three nodes. </p> <pre><code>$ redis-cli cluster nodes d1861060fe6a534d42d8a19aeb36600e18785e04 127.0.0.1:6379 myself - 0 1318428930 1 connected 0-1364 3886e65cc906bfd9b1f7e7bde468726a052d1dae 127.0.0.1:6380 master - 1318428930 1318428931 2 connected 1365-2729 d289c575dcbc4bdd2931585fd4339089e461a27d 127.0.0.1:6381 master - 1318428931 1318428931 3 connected 2730-4095 </code></pre> <p> In the above listing the different fields are in order: node id, address:port, flags, last ping sent, last pong received, configuration epoch, link state, slots. Details about the above fields will be covered as soon as we talk of specific parts of Redis Cluster. </p> <h3 id="the-cluster-bus"> The cluster bus </h3> <p> Every Redis Cluster node has an additional TCP port for receiving incoming connections from other Redis Cluster nodes. This port will be derived by adding 10000 to the data port or it can be specified with the cluster-port config. </p> <p> Example 1: </p> <p> If a Redis node is listening for client connections on port 6379, and you do not add cluster-port parameter in redis.conf, the Cluster bus port 16379 will be opened. </p> <p> Example 2: </p> <p> If a Redis node is listening for client connections on port 6379, and you set cluster-port 20000 in redis.conf, the Cluster bus port 20000 will be opened. </p> <p> Node-to-node communication happens exclusively using the Cluster bus and the Cluster bus protocol: a binary protocol composed of frames of different types and sizes. The Cluster bus binary protocol is not publicly documented since it is not intended for external software devices to talk with Redis Cluster nodes using this protocol. However you can obtain more details about the Cluster bus protocol by reading the <code> cluster.h </code> and <code> cluster.c </code> files in the Redis Cluster source code. </p> <h3 id="cluster-topology"> Cluster topology </h3> <p> Redis Cluster is a full mesh where every node is connected with every other node using a TCP connection. </p> <p> In a cluster of N nodes, every node has N-1 outgoing TCP connections, and N-1 incoming connections. </p> <p> These TCP connections are kept alive all the time and are not created on demand. When a node expects a pong reply in response to a ping in the cluster bus, before waiting long enough to mark the node as unreachable, it will try to refresh the connection with the node by reconnecting from scratch. </p> <p> While Redis Cluster nodes form a full mesh, <strong> nodes use a gossip protocol and a configuration update mechanism in order to avoid exchanging too many messages between nodes during normal conditions </strong> , so the number of messages exchanged is not exponential. </p> <h3 id="node-handshake"> Node handshake </h3> <p> Nodes always accept connections on the cluster bus port, and even reply to pings when received, even if the pinging node is not trusted. However, all other packets will be discarded by the receiving node if the sending node is not considered part of the cluster. </p> <p> A node will accept another node as part of the cluster only in two ways: </p> <ul> <li> <p> If a node presents itself with a <code> MEET </code> message ( <a href="/commands/cluster-meet"> <code> CLUSTER MEET </code> </a> command). A meet message is exactly like a <a href="/commands/ping"> <code> PING </code> </a> message, but forces the receiver to accept the node as part of the cluster. Nodes will send <code> MEET </code> messages to other nodes <strong> only if </strong> the system administrator requests this via the following command: </p> <p> CLUSTER MEET ip port </p> </li> <li> <p> A node will also register another node as part of the cluster if a node that is already trusted will gossip about this other node. So if A knows B, and B knows C, eventually B will send gossip messages to A about C. When this happens, A will register C as part of the network, and will try to connect with C. </p> </li> </ul> <p> This means that as long as we join nodes in any connected graph, they'll eventually form a fully connected graph automatically. This means that the cluster is able to auto-discover other nodes, but only if there is a trusted relationship that was forced by the system administrator. </p> <p> This mechanism makes the cluster more robust but prevents different Redis clusters from accidentally mixing after change of IP addresses or other network related events. </p> <h2 id="redirection-and-resharding"> Redirection and resharding </h2> <h3 id="moved-redirection"> MOVED Redirection </h3> <p> A Redis client is free to send queries to every node in the cluster, including replica nodes. The node will analyze the query, and if it is acceptable (that is, only a single key is mentioned in the query, or the multiple keys mentioned are all to the same hash slot) it will lookup what node is responsible for the hash slot where the key or keys belong. </p> <p> If the hash slot is served by the node, the query is simply processed, otherwise the node will check its internal hash slot to node map, and will reply to the client with a MOVED error, like in the following example: </p> <pre><code>GET x -MOVED 3999 127.0.0.1:6381 </code></pre> <p> The error includes the hash slot of the key (3999) and the endpoint:port of the instance that can serve the query. The client needs to reissue the query to the specified node's endpoint address and port. The endpoint can be either an IP address, a hostname, or it can be empty (e.g. <code> -MOVED 3999 :6380 </code> ). An empty endpoint indicates that the server node has an unknown endpoint, and the client should send the next request to the same endpoint as the current request but with the provided port. </p> <p> Note that even if the client waits a long time before reissuing the query, and in the meantime the cluster configuration changed, the destination node will reply again with a MOVED error if the hash slot 3999 is now served by another node. The same happens if the contacted node had no updated information. </p> <p> So while from the point of view of the cluster nodes are identified by IDs we try to simplify our interface with the client just exposing a map between hash slots and Redis nodes identified by endpoint:port pairs. </p> <p> The client is not required to, but should try to memorize that hash slot 3999 is served by 127.0.0.1:6381. This way once a new command needs to be issued it can compute the hash slot of the target key and have a greater chance of choosing the right node. </p> <p> An alternative is to just refresh the whole client-side cluster layout using the <a href="/commands/cluster-shards"> <code> CLUSTER SHARDS </code> </a> , or the deprecated <a href="/commands/cluster-slots"> <code> CLUSTER SLOTS </code> </a> , command when a MOVED redirection is received. When a redirection is encountered, it is likely multiple slots were reconfigured rather than just one, so updating the client configuration as soon as possible is often the best strategy. </p> <p> Note that when the Cluster is stable (no ongoing changes in the configuration), eventually all the clients will obtain a map of hash slots -&gt; nodes, making the cluster efficient, with clients directly addressing the right nodes without redirections, proxies or other single point of failure entities. </p> <p> A client <strong> must be also able to handle -ASK redirections </strong> that are described later in this document, otherwise it is not a complete Redis Cluster client. </p> <h3 id="live-reconfiguration"> Live reconfiguration </h3> <p> Redis Cluster supports the ability to add and remove nodes while the cluster is running. Adding or removing a node is abstracted into the same operation: moving a hash slot from one node to another. This means that the same basic mechanism can be used in order to rebalance the cluster, add or remove nodes, and so forth. </p> <ul> <li> To add a new node to the cluster an empty node is added to the cluster and some set of hash slots are moved from existing nodes to the new node. </li> <li> To remove a node from the cluster the hash slots assigned to that node are moved to other existing nodes. </li> <li> To rebalance the cluster a given set of hash slots are moved between nodes. </li> </ul> <p> The core of the implementation is the ability to move hash slots around. From a practical point of view a hash slot is just a set of keys, so what Redis Cluster really does during <em> resharding </em> is to move keys from an instance to another instance. Moving a hash slot means moving all the keys that happen to hash into this hash slot. </p> <p> To understand how this works we need to show the <a href="/commands/cluster"> <code> CLUSTER </code> </a> subcommands that are used to manipulate the slots translation table in a Redis Cluster node. </p> <p> The following subcommands are available (among others not useful in this case): </p> <ul> <li> <a href="/commands/cluster-addslots"> <code> CLUSTER ADDSLOTS </code> </a> slot1 [slot2] ... [slotN] </li> <li> <a href="/commands/cluster-delslots"> <code> CLUSTER DELSLOTS </code> </a> slot1 [slot2] ... [slotN] </li> <li> <a href="/commands/cluster-addslotsrange"> <code> CLUSTER ADDSLOTSRANGE </code> </a> start-slot1 end-slot1 [start-slot2 end-slot2] ... [start-slotN end-slotN] </li> <li> <a href="/commands/cluster-delslotsrange"> <code> CLUSTER DELSLOTSRANGE </code> </a> start-slot1 end-slot1 [start-slot2 end-slot2] ... [start-slotN end-slotN] </li> <li> <a href="/commands/cluster-setslot"> <code> CLUSTER SETSLOT </code> </a> slot NODE node </li> <li> <a href="/commands/cluster-setslot"> <code> CLUSTER SETSLOT </code> </a> slot MIGRATING node </li> <li> <a href="/commands/cluster-setslot"> <code> CLUSTER SETSLOT </code> </a> slot IMPORTING node </li> </ul> <p> The first four commands, <code> ADDSLOTS </code> , <code> DELSLOTS </code> , <code> ADDSLOTSRANGE </code> and <code> DELSLOTSRANGE </code> , are simply used to assign (or remove) slots to a Redis node. Assigning a slot means to tell a given master node that it will be in charge of storing and serving content for the specified hash slot. </p> <p> After the hash slots are assigned they will propagate across the cluster using the gossip protocol, as specified later in the <em> configuration propagation </em> section. </p> <p> The <code> ADDSLOTS </code> and <code> ADDSLOTSRANGE </code> commands are usually used when a new cluster is created from scratch to assign each master node a subset of all the 16384 hash slots available. </p> <p> The <code> DELSLOTS </code> and <code> DELSLOTSRANGE </code> are mainly used for manual modification of a cluster configuration or for debugging tasks: in practice it is rarely used. </p> <p> The <code> SETSLOT </code> subcommand is used to assign a slot to a specific node ID if the <code> SETSLOT &lt;slot&gt; NODE </code> form is used. Otherwise the slot can be set in the two special states <code> MIGRATING </code> and <code> IMPORTING </code> . Those two special states are used in order to migrate a hash slot from one node to another. </p> <ul> <li> When a slot is set as MIGRATING, the node will accept all queries that are about this hash slot, but only if the key in question exists, otherwise the query is forwarded using a <code> -ASK </code> redirection to the node that is target of the migration. </li> <li> When a slot is set as IMPORTING, the node will accept all queries that are about this hash slot, but only if the request is preceded by an <a href="/commands/asking"> <code> ASKING </code> </a> command. If the <a href="/commands/asking"> <code> ASKING </code> </a> command was not given by the client, the query is redirected to the real hash slot owner via a <code> -MOVED </code> redirection error, as would happen normally. </li> </ul> <p> Let's make this clearer with an example of hash slot migration. Assume that we have two Redis master nodes, called A and B. We want to move hash slot 8 from A to B, so we issue commands like this: </p> <ul> <li> We send B: CLUSTER SETSLOT 8 IMPORTING A </li> <li> We send A: CLUSTER SETSLOT 8 MIGRATING B </li> </ul> <p> All the other nodes will continue to point clients to node "A" every time they are queried with a key that belongs to hash slot 8, so what happens is that: </p> <ul> <li> All queries about existing keys are processed by "A". </li> <li> All queries about non-existing keys in A are processed by "B", because "A" will redirect clients to "B". </li> </ul> <p> This way we no longer create new keys in "A". In the meantime, <code> redis-cli </code> used during reshardings and Redis Cluster configuration will migrate existing keys in hash slot 8 from A to B. This is performed using the following command: </p> <pre><code>CLUSTER GETKEYSINSLOT slot count </code></pre> <p> The above command will return <code> count </code> keys in the specified hash slot. For keys returned, <code> redis-cli </code> sends node "A" a <a href="/commands/migrate"> <code> MIGRATE </code> </a> command, that will migrate the specified keys from A to B in an atomic way (both instances are locked for the time (usually very small time) needed to migrate keys so there are no race conditions). This is how <a href="/commands/migrate"> <code> MIGRATE </code> </a> works: </p> <pre><code>MIGRATE target_host target_port "" target_database id timeout KEYS key1 key2 ... </code></pre> <p> <a href="/commands/migrate"> <code> MIGRATE </code> </a> will connect to the target instance, send a serialized version of the key, and once an OK code is received, the old key from its own dataset will be deleted. From the point of view of an external client a key exists either in A or B at any given time. </p> <p> In Redis Cluster there is no need to specify a database other than 0, but <a href="/commands/migrate"> <code> MIGRATE </code> </a> is a general command that can be used for other tasks not involving Redis Cluster. <a href="/commands/migrate"> <code> MIGRATE </code> </a> is optimized to be as fast as possible even when moving complex keys such as long lists, but in Redis Cluster reconfiguring the cluster where big keys are present is not considered a wise procedure if there are latency constraints in the application using the database. </p> <p> When the migration process is finally finished, the <code> SETSLOT &lt;slot&gt; NODE &lt;node-id&gt; </code> command is sent to the two nodes involved in the migration in order to set the slots to their normal state again. The same command is usually sent to all other nodes to avoid waiting for the natural propagation of the new configuration across the cluster. </p> <h3 id="ask-redirection"> ASK redirection </h3> <p> In the previous section, we briefly talked about ASK redirection. Why can't we simply use MOVED redirection? Because while MOVED means that we think the hash slot is permanently served by a different node and the next queries should be tried against the specified node. ASK means to send only the next query to the specified node. </p> <p> This is needed because the next query about hash slot 8 can be about a key that is still in A, so we always want the client to try A and then B if needed. Since this happens only for one hash slot out of 16384 available, the performance hit on the cluster is acceptable. </p> <p> We need to force that client behavior, so to make sure that clients will only try node B after A was tried, node B will only accept queries of a slot that is set as IMPORTING if the client sends the ASKING command before sending the query. </p> <p> Basically the ASKING command sets a one-time flag on the client that forces a node to serve a query about an IMPORTING slot. </p> <p> The full semantics of ASK redirection from the point of view of the client is as follows: </p> <ul> <li> If ASK redirection is received, send only the query that was redirected to the specified node but continue sending subsequent queries to the old node. </li> <li> Start the redirected query with the ASKING command. </li> <li> Don't yet update local client tables to map hash slot 8 to B. </li> </ul> <p> Once hash slot 8 migration is completed, A will send a MOVED message and the client may permanently map hash slot 8 to the new endpoint and port pair. Note that if a buggy client performs the map earlier this is not a problem since it will not send the ASKING command before issuing the query, so B will redirect the client to A using a MOVED redirection error. </p> <p> Slots migration is explained in similar terms but with different wording (for the sake of redundancy in the documentation) in the <a href="/commands/cluster-setslot"> <code> CLUSTER SETSLOT </code> </a> command documentation. </p> <h3 id="client-connections-and-redirection-handling"> Client connections and redirection handling </h3> <p> To be efficient, Redis Cluster clients maintain a map of the current slot configuration. However, this configuration is not <em> required </em> to be up to date. When contacting the wrong node results in a redirection, the client can update its internal slot map accordingly. </p> <p> Clients usually need to fetch a complete list of slots and mapped node addresses in two different situations: </p> <ul> <li> At startup, to populate the initial slots configuration </li> <li> When the client receives a <code> MOVED </code> redirection </li> </ul> <p> Note that a client may handle the <code> MOVED </code> redirection by updating just the moved slot in its table; however this is usually not efficient because often the configuration of multiple slots will be modified at once. For example, if a replica is promoted to master, all of the slots served by the old master will be remapped). It is much simpler to react to a <code> MOVED </code> redirection by fetching the full map of slots to nodes from scratch. </p> <p> Client can issue a <a href="/commands/cluster-slots"> <code> CLUSTER SLOTS </code> </a> command to retrieve an array of slot ranges and the associated master and replica nodes serving the specified ranges. </p> <p> The following is an example of output of <a href="/commands/cluster-slots"> <code> CLUSTER SLOTS </code> </a> : </p> <pre tabindex="0"><code>127.0.0.1:7000&gt; cluster slots 1) 1) (integer) 5461 2) (integer) 10922 3) 1) "127.0.0.1" 2) (integer) 7001 4) 1) "127.0.0.1" 2) (integer) 7004 2) 1) (integer) 0 2) (integer) 5460 3) 1) "127.0.0.1" 2) (integer) 7000 4) 1) "127.0.0.1" 2) (integer) 7003 3) 1) (integer) 10923 2) (integer) 16383 3) 1) "127.0.0.1" 2) (integer) 7002 4) 1) "127.0.0.1" 2) (integer) 7005 </code></pre> <p> The first two sub-elements of every element of the returned array are the start and end slots of the range. The additional elements represent address-port pairs. The first address-port pair is the master serving the slot, and the additional address-port pairs are the replicas serving the same slot. Replicas will be listed only when not in an error condition (i.e., when their FAIL flag is not set). </p> <p> The first element in the output above says that slots from 5461 to 10922 (start and end included) are served by 127.0.0.1:7001, and it is possible to scale read-only load contacting the replica at 127.0.0.1:7004. </p> <p> <a href="/commands/cluster-slots"> <code> CLUSTER SLOTS </code> </a> is not guaranteed to return ranges that cover the full 16384 slots if the cluster is misconfigured, so clients should initialize the slots configuration map filling the target nodes with NULL objects, and report an error if the user tries to execute commands about keys that belong to unassigned slots. </p> <p> Before returning an error to the caller when a slot is found to be unassigned, the client should try to fetch the slots configuration again to check if the cluster is now configured properly. </p> <h3 id="multi-keys-operations"> Multi-keys operations </h3> <p> Using hash tags, clients are free to use multi-key operations. For example the following operation is valid: </p> <pre><code>MSET {user:1000}.name Angela {user:1000}.surname White </code></pre> <p> Multi-key operations may become unavailable when a resharding of the hash slot the keys belong to is in progress. </p> <p> More specifically, even during a resharding the multi-key operations targeting keys that all exist and all still hash to the same slot (either the source or destination node) are still available. </p> <p> Operations on keys that don't exist or are - during the resharding - split between the source and destination nodes, will generate a <code> -TRYAGAIN </code> error. The client can try the operation after some time, or report back the error. </p> <p> As soon as migration of the specified hash slot has terminated, all multi-key operations are available again for that hash slot. </p> <h3 id="scaling-reads-using-replica-nodes"> Scaling reads using replica nodes </h3> <p> Normally replica nodes will redirect clients to the authoritative master for the hash slot involved in a given command, however clients can use replicas in order to scale reads using the <a href="/commands/readonly"> <code> READONLY </code> </a> command. </p> <p> <a href="/commands/readonly"> <code> READONLY </code> </a> tells a Redis Cluster replica node that the client is ok reading possibly stale data and is not interested in running write queries. </p> <p> When the connection is in readonly mode, the cluster will send a redirection to the client only if the operation involves keys not served by the replica's master node. This may happen because: </p> <ol> <li> The client sent a command about hash slots never served by the master of this replica. </li> <li> The cluster was reconfigured (for example resharded) and the replica is no longer able to serve commands for a given hash slot. </li> </ol> <p> When this happens the client should update its hash slot map as explained in the previous sections. </p> <p> The readonly state of the connection can be cleared using the <a href="/commands/readwrite"> <code> READWRITE </code> </a> command. </p> <h2 id="fault-tolerance"> Fault Tolerance </h2> <h3 id="heartbeat-and-gossip-messages"> Heartbeat and gossip messages </h3> <p> Redis Cluster nodes continuously exchange ping and pong packets. Those two kinds of packets have the same structure, and both carry important configuration information. The only actual difference is the message type field. We'll refer to the sum of ping and pong packets as <em> heartbeat packets </em> . </p> <p> Usually nodes send ping packets that will trigger the receivers to reply with pong packets. However this is not necessarily true. It is possible for nodes to just send pong packets to send information to other nodes about their configuration, without triggering a reply. This is useful, for example, in order to broadcast a new configuration as soon as possible. </p> <p> Usually a node will ping a few random nodes every second so that the total number of ping packets sent (and pong packets received) by each node is a constant amount regardless of the number of nodes in the cluster. </p> <p> However every node makes sure to ping every other node that hasn't sent a ping or received a pong for longer than half the <code> NODE_TIMEOUT </code> time. Before <code> NODE_TIMEOUT </code> has elapsed, nodes also try to reconnect the TCP link with another node to make sure nodes are not believed to be unreachable only because there is a problem in the current TCP connection. </p> <p> The number of messages globally exchanged can be sizable if <code> NODE_TIMEOUT </code> is set to a small figure and the number of nodes (N) is very large, since every node will try to ping every other node for which they don't have fresh information every half the <code> NODE_TIMEOUT </code> time. </p> <p> For example in a 100 node cluster with a node timeout set to 60 seconds, every node will try to send 99 pings every 30 seconds, with a total amount of pings of 3.3 per second. Multiplied by 100 nodes, this is 330 pings per second in the total cluster. </p> <p> There are ways to lower the number of messages, however there have been no reported issues with the bandwidth currently used by Redis Cluster failure detection, so for now the obvious and direct design is used. Note that even in the above example, the 330 packets per second exchanged are evenly divided among 100 different nodes, so the traffic each node receives is acceptable. </p> <h3 id="heartbeat-packet-content"> Heartbeat packet content </h3> <p> Ping and pong packets contain a header that is common to all types of packets (for instance packets to request a failover vote), and a special gossip section that is specific to Ping and Pong packets. </p> <p> The common header has the following information: </p> <ul> <li> Node ID, a 160 bit pseudorandom string that is assigned the first time a node is created and remains the same for all the life of a Redis Cluster node. </li> <li> The <code> currentEpoch </code> and <code> configEpoch </code> fields of the sending node that are used to mount the distributed algorithms used by Redis Cluster (this is explained in detail in the next sections). If the node is a replica the <code> configEpoch </code> is the last known <code> configEpoch </code> of its master. </li> <li> The node flags, indicating if the node is a replica, a master, and other single-bit node information. </li> <li> A bitmap of the hash slots served by the sending node, or if the node is a replica, a bitmap of the slots served by its master. </li> <li> The sender TCP base port that is the port used by Redis to accept client commands. </li> <li> The cluster port that is the port used by Redis for node-to-node communication. </li> <li> The state of the cluster from the point of view of the sender (down or ok). </li> <li> The master node ID of the sending node, if it is a replica. </li> </ul> <p> Ping and pong packets also contain a gossip section. This section offers to the receiver a view of what the sender node thinks about other nodes in the cluster. The gossip section only contains information about a few random nodes among the set of nodes known to the sender. The number of nodes mentioned in a gossip section is proportional to the cluster size. </p> <p> For every node added in the gossip section the following fields are reported: </p> <ul> <li> Node ID. </li> <li> IP and port of the node. </li> <li> Node flags. </li> </ul> <p> Gossip sections allow receiving nodes to get information about the state of other nodes from the point of view of the sender. This is useful both for failure detection and to discover other nodes in the cluster. </p> <h3 id="failure-detection"> Failure detection </h3> <p> Redis Cluster failure detection is used to recognize when a master or replica node is no longer reachable by the majority of nodes and then respond by promoting a replica to the role of master. When replica promotion is not possible the cluster is put in an error state to stop receiving queries from clients. </p> <p> As already mentioned, every node takes a list of flags associated with other known nodes. There are two flags that are used for failure detection that are called <code> PFAIL </code> and <code> FAIL </code> . <code> PFAIL </code> means <em> Possible failure </em> , and is a non-acknowledged failure type. <code> FAIL </code> means that a node is failing and that this condition was confirmed by a majority of masters within a fixed amount of time. </p> <p> <strong> PFAIL flag: </strong> </p> <p> A node flags another node with the <code> PFAIL </code> flag when the node is not reachable for more than <code> NODE_TIMEOUT </code> time. Both master and replica nodes can flag another node as <code> PFAIL </code> , regardless of its type. </p> <p> The concept of non-reachability for a Redis Cluster node is that we have an <strong> active ping </strong> (a ping that we sent for which we have yet to get a reply) pending for longer than <code> NODE_TIMEOUT </code> . For this mechanism to work the <code> NODE_TIMEOUT </code> must be large compared to the network round trip time. In order to add reliability during normal operations, nodes will try to reconnect with other nodes in the cluster as soon as half of the <code> NODE_TIMEOUT </code> has elapsed without a reply to a ping. This mechanism ensures that connections are kept alive so broken connections usually won't result in false failure reports between nodes. </p> <p> <strong> FAIL flag: </strong> </p> <p> The <code> PFAIL </code> flag alone is just local information every node has about other nodes, but it is not sufficient to trigger a replica promotion. For a node to be considered down the <code> PFAIL </code> condition needs to be escalated to a <code> FAIL </code> condition. </p> <p> As outlined in the node heartbeats section of this document, every node sends gossip messages to every other node including the state of a few random known nodes. Every node eventually receives a set of node flags for every other node. This way every node has a mechanism to signal other nodes about failure conditions they have detected. </p> <p> A <code> PFAIL </code> condition is escalated to a <code> FAIL </code> condition when the following set of conditions are met: </p> <ul> <li> Some node, that we'll call A, has another node B flagged as <code> PFAIL </code> . </li> <li> Node A collected, via gossip sections, information about the state of B from the point of view of the majority of masters in the cluster. </li> <li> The majority of masters signaled the <code> PFAIL </code> or <code> FAIL </code> condition within <code> NODE_TIMEOUT * FAIL_REPORT_VALIDITY_MULT </code> time. (The validity factor is set to 2 in the current implementation, so this is just two times the <code> NODE_TIMEOUT </code> time). </li> </ul> <p> If all the above conditions are true, Node A will: </p> <ul> <li> Mark the node as <code> FAIL </code> . </li> <li> Send a <code> FAIL </code> message (as opposed to a <code> FAIL </code> condition within a heartbeat message) to all the reachable nodes. </li> </ul> <p> The <code> FAIL </code> message will force every receiving node to mark the node in <code> FAIL </code> state, whether or not it already flagged the node in <code> PFAIL </code> state. </p> <p> Note that <em> the FAIL flag is mostly one way </em> . That is, a node can go from <code> PFAIL </code> to <code> FAIL </code> , but a <code> FAIL </code> flag can only be cleared in the following situations: </p> <ul> <li> The node is already reachable and is a replica. In this case the <code> FAIL </code> flag can be cleared as replicas are not failed over. </li> <li> The node is already reachable and is a master not serving any slot. In this case the <code> FAIL </code> flag can be cleared as masters without slots do not really participate in the cluster and are waiting to be configured in order to join the cluster. </li> <li> The node is already reachable and is a master, but a long time (N times the <code> NODE_TIMEOUT </code> ) has elapsed without any detectable replica promotion. It's better for it to rejoin the cluster and continue in this case. </li> </ul> <p> It is useful to note that while the <code> PFAIL </code> -&gt; <code> FAIL </code> transition uses a form of agreement, the agreement used is weak: </p> <ol> <li> Nodes collect views of other nodes over some time period, so even if the majority of master nodes need to "agree", actually this is just state that we collected from different nodes at different times and we are not sure, nor we require, that at a given moment the majority of masters agreed. However we discard failure reports which are old, so the failure was signaled by the majority of masters within a window of time. </li> <li> While every node detecting the <code> FAIL </code> condition will force that condition on other nodes in the cluster using the <code> FAIL </code> message, there is no way to ensure the message will reach all the nodes. For instance a node may detect the <code> FAIL </code> condition and because of a partition will not be able to reach any other node. </li> </ol> <p> However the Redis Cluster failure detection has a liveness requirement: eventually all the nodes should agree about the state of a given node. There are two cases that can originate from split brain conditions. Either some minority of nodes believe the node is in <code> FAIL </code> state, or a minority of nodes believe the node is not in <code> FAIL </code> state. In both the cases eventually the cluster will have a single view of the state of a given node: </p> <p> <strong> Case 1 </strong> : If a majority of masters have flagged a node as <code> FAIL </code> , because of failure detection and the <em> chain effect </em> it generates, every other node will eventually flag the master as <code> FAIL </code> , since in the specified window of time enough failures will be reported. </p> <p> <strong> Case 2 </strong> : When only a minority of masters have flagged a node as <code> FAIL </code> , the replica promotion will not happen (as it uses a more formal algorithm that makes sure everybody knows about the promotion eventually) and every node will clear the <code> FAIL </code> state as per the <code> FAIL </code> state clearing rules above (i.e. no promotion after N times the <code> NODE_TIMEOUT </code> has elapsed). </p> <p> <strong> The <code> FAIL </code> flag is only used as a trigger to run the safe part of the algorithm </strong> for the replica promotion. In theory a replica may act independently and start a replica promotion when its master is not reachable, and wait for the masters to refuse to provide the acknowledgment if the master is actually reachable by the majority. However the added complexity of the <code> PFAIL -&gt; FAIL </code> state, the weak agreement, and the <code> FAIL </code> message forcing the propagation of the state in the shortest amount of time in the reachable part of the cluster, have practical advantages. Because of these mechanisms, usually all the nodes will stop accepting writes at about the same time if the cluster is in an error state. This is a desirable feature from the point of view of applications using Redis Cluster. Also erroneous election attempts initiated by replicas that can't reach its master due to local problems (the master is otherwise reachable by the majority of other master nodes) are avoided. </p> <h2 id="configuration-handling-propagation-and-failovers"> Configuration handling, propagation, and failovers </h2> <h3 id="cluster-current-epoch"> Cluster current epoch </h3> <p> Redis Cluster uses a concept similar to the Raft algorithm "term". In Redis Cluster the term is called epoch instead, and it is used in order to give incremental versioning to events. When multiple nodes provide conflicting information, it becomes possible for another node to understand which state is the most up to date. </p> <p> The <code> currentEpoch </code> is a 64 bit unsigned number. </p> <p> At node creation every Redis Cluster node, both replicas and master nodes, set the <code> currentEpoch </code> to 0. </p> <p> Every time a packet is received from another node, if the epoch of the sender (part of the cluster bus messages header) is greater than the local node epoch, the <code> currentEpoch </code> is updated to the sender epoch. </p> <p> Because of these semantics, eventually all the nodes will agree to the greatest <code> currentEpoch </code> in the cluster. </p> <p> This information is used when the state of the cluster is changed and a node seeks agreement in order to perform some action. </p> <p> Currently this happens only during replica promotion, as described in the next section. Basically the epoch is a logical clock for the cluster and dictates that given information wins over one with a smaller epoch. </p> <h3 id="configuration-epoch"> Configuration epoch </h3> <p> Every master always advertises its <code> configEpoch </code> in ping and pong packets along with a bitmap advertising the set of slots it serves. </p> <p> The <code> configEpoch </code> is set to zero in masters when a new node is created. </p> <p> A new <code> configEpoch </code> is created during replica election. replicas trying to replace failing masters increment their epoch and try to get authorization from a majority of masters. When a replica is authorized, a new unique <code> configEpoch </code> is created and the replica turns into a master using the new <code> configEpoch </code> . </p> <p> As explained in the next sections the <code> configEpoch </code> helps to resolve conflicts when different nodes claim divergent configurations (a condition that may happen because of network partitions and node failures). </p> <p> replica nodes also advertise the <code> configEpoch </code> field in ping and pong packets, but in the case of replicas the field represents the <code> configEpoch </code> of its master as of the last time they exchanged packets. This allows other instances to detect when a replica has an old configuration that needs to be updated (master nodes will not grant votes to replicas with an old configuration). </p> <p> Every time the <code> configEpoch </code> changes for some known node, it is permanently stored in the nodes.conf file by all the nodes that receive this information. The same also happens for the <code> currentEpoch </code> value. These two variables are guaranteed to be saved and <code> fsync-ed </code> to disk when updated before a node continues its operations. </p> <p> The <code> configEpoch </code> values generated using a simple algorithm during failovers are guaranteed to be new, incremental, and unique. </p> <h3 id="replica-election-and-promotion"> Replica election and promotion </h3> <p> Replica election and promotion is handled by replica nodes, with the help of master nodes that vote for the replica to promote. A replica election happens when a master is in <code> FAIL </code> state from the point of view of at least one of its replicas that has the prerequisites in order to become a master. </p> <p> In order for a replica to promote itself to master, it needs to start an election and win it. All the replicas for a given master can start an election if the master is in <code> FAIL </code> state, however only one replica will win the election and promote itself to master. </p> <p> A replica starts an election when the following conditions are met: </p> <ul> <li> The replica's master is in <code> FAIL </code> state. </li> <li> The master was serving a non-zero number of slots. </li> <li> The replica replication link was disconnected from the master for no longer than a given amount of time, in order to ensure the promoted replica's data is reasonably fresh. This time is user configurable. </li> </ul> <p> In order to be elected, the first step for a replica is to increment its <code> currentEpoch </code> counter, and request votes from master instances. </p> <p> Votes are requested by the replica by broadcasting a <code> FAILOVER_AUTH_REQUEST </code> packet to every master node of the cluster. Then it waits for a maximum time of two times the <code> NODE_TIMEOUT </code> for replies to arrive (but always for at least 2 seconds). </p> <p> Once a master has voted for a given replica, replying positively with a <code> FAILOVER_AUTH_ACK </code> , it can no longer vote for another replica of the same master for a period of <code> NODE_TIMEOUT * 2 </code> . In this period it will not be able to reply to other authorization requests for the same master. This is not needed to guarantee safety, but useful for preventing multiple replicas from getting elected (even if with a different <code> configEpoch </code> ) at around the same time, which is usually not wanted. </p> <p> A replica discards any <code> AUTH_ACK </code> replies with an epoch that is less than the <code> currentEpoch </code> at the time the vote request was sent. This ensures it doesn't count votes intended for a previous election. </p> <p> Once the replica receives ACKs from the majority of masters, it wins the election. Otherwise if the majority is not reached within the period of two times <code> NODE_TIMEOUT </code> (but always at least 2 seconds), the election is aborted and a new one will be tried again after <code> NODE_TIMEOUT * 4 </code> (and always at least 4 seconds). </p> <h3 id="replica-rank"> Replica rank </h3> <p> As soon as a master is in <code> FAIL </code> state, a replica waits a short period of time before trying to get elected. That delay is computed as follows: </p> <pre><code>DELAY = 500 milliseconds + random delay between 0 and 500 milliseconds + REPLICA_RANK * 1000 milliseconds. </code></pre> <p> The fixed delay ensures that we wait for the <code> FAIL </code> state to propagate across the cluster, otherwise the replica may try to get elected while the masters are still unaware of the <code> FAIL </code> state, refusing to grant their vote. </p> <p> The random delay is used to desynchronize replicas so they're unlikely to start an election at the same time. </p> <p> The <code> REPLICA_RANK </code> is the rank of this replica regarding the amount of replication data it has processed from the master. Replicas exchange messages when the master is failing in order to establish a (best effort) rank: the replica with the most updated replication offset is at rank 0, the second most updated at rank 1, and so forth. In this way the most updated replicas try to get elected before others. </p> <p> Rank order is not strictly enforced; if a replica of higher rank fails to be elected, the others will try shortly. </p> <p> Once a replica wins the election, it obtains a new unique and incremental <code> configEpoch </code> which is higher than that of any other existing master. It starts advertising itself as master in ping and pong packets, providing the set of served slots with a <code> configEpoch </code> that will win over the past ones. </p> <p> In order to speedup the reconfiguration of other nodes, a pong packet is broadcast to all the nodes of the cluster. Currently unreachable nodes will eventually be reconfigured when they receive a ping or pong packet from another node or will receive an <code> UPDATE </code> packet from another node if the information it publishes via heartbeat packets are detected to be out of date. </p> <p> The other nodes will detect that there is a new master serving the same slots served by the old master but with a greater <code> configEpoch </code> , and will upgrade their configuration. Replicas of the old master (or the failed over master if it rejoins the cluster) will not just upgrade the configuration but will also reconfigure to replicate from the new master. How nodes rejoining the cluster are configured is explained in the next sections. </p> <h3 id="masters-reply-to-replica-vote-request"> Masters reply to replica vote request </h3> <p> In the previous section, we discussed how replicas try to get elected. This section explains what happens from the point of view of a master that is requested to vote for a given replica. </p> <p> Masters receive requests for votes in form of <code> FAILOVER_AUTH_REQUEST </code> requests from replicas. </p> <p> For a vote to be granted the following conditions need to be met: </p> <ol> <li> A master only votes a single time for a given epoch, and refuses to vote for older epochs: every master has a lastVoteEpoch field and will refuse to vote again as long as the <code> currentEpoch </code> in the auth request packet is not greater than the lastVoteEpoch. When a master replies positively to a vote request, the lastVoteEpoch is updated accordingly, and safely stored on disk. </li> <li> A master votes for a replica only if the replica's master is flagged as <code> FAIL </code> . </li> <li> Auth requests with a <code> currentEpoch </code> that is less than the master <code> currentEpoch </code> are ignored. Because of this the master reply will always have the same <code> currentEpoch </code> as the auth request. If the same replica asks again to be voted, incrementing the <code> currentEpoch </code> , it is guaranteed that an old delayed reply from the master can not be accepted for the new vote. </li> </ol> <p> Example of the issue caused by not using rule number 3: </p> <p> Master <code> currentEpoch </code> is 5, lastVoteEpoch is 1 (this may happen after a few failed elections) </p> <ul> <li> Replica <code> currentEpoch </code> is 3. </li> <li> Replica tries to be elected with epoch 4 (3+1), master replies with an ok with <code> currentEpoch </code> 5, however the reply is delayed. </li> <li> Replica will try to be elected again, at a later time, with epoch 5 (4+1), the delayed reply reaches the replica with <code> currentEpoch </code> 5, and is accepted as valid. </li> </ul> <ol start="4"> <li> Masters don't vote for a replica of the same master before <code> NODE_TIMEOUT * 2 </code> has elapsed if a replica of that master was already voted for. This is not strictly required as it is not possible for two replicas to win the election in the same epoch. However, in practical terms it ensures that when a replica is elected it has plenty of time to inform the other replicas and avoid the possibility that another replica will win a new election, performing an unnecessary second failover. </li> <li> Masters make no effort to select the best replica in any way. If the replica's master is in <code> FAIL </code> state and the master did not vote in the current term, a positive vote is granted. The best replica is the most likely to start an election and win it before the other replicas, since it will usually be able to start the voting process earlier because of its <em> higher rank </em> as explained in the previous section. </li> <li> When a master refuses to vote for a given replica there is no negative response, the request is simply ignored. </li> <li> Masters don't vote for replicas sending a <code> configEpoch </code> that is less than any <code> configEpoch </code> in the master table for the slots claimed by the replica. Remember that the replica sends the <code> configEpoch </code> of its master, and the bitmap of the slots served by its master. This means that the replica requesting the vote must have a configuration for the slots it wants to failover that is newer or equal the one of the master granting the vote. </li> </ol> <h3 id="practical-example-of-configuration-epoch-usefulness-during-partitions"> Practical example of configuration epoch usefulness during partitions </h3> <p> This section illustrates how the epoch concept is used to make the replica promotion process more resistant to partitions. </p> <ul> <li> A master is no longer reachable indefinitely. The master has three replicas A, B, C. </li> <li> Replica A wins the election and is promoted to master. </li> <li> A network partition makes A not available for the majority of the cluster. </li> <li> Replica B wins the election and is promoted as master. </li> <li> A partition makes B not available for the majority of the cluster. </li> <li> The previous partition is fixed, and A is available again. </li> </ul> <p> At this point B is down and A is available again with a role of master (actually <code> UPDATE </code> messages would reconfigure it promptly, but here we assume all <code> UPDATE </code> messages were lost). At the same time, replica C will try to get elected in order to fail over B. This is what happens: </p> <ol> <li> C will try to get elected and will succeed, since for the majority of masters its master is actually down. It will obtain a new incremental <code> configEpoch </code> . </li> <li> A will not be able to claim to be the master for its hash slots, because the other nodes already have the same hash slots associated with a higher configuration epoch (the one of B) compared to the one published by A. </li> <li> So, all the nodes will upgrade their table to assign the hash slots to C, and the cluster will continue its operations. </li> </ol> <p> As you'll see in the next sections, a stale node rejoining a cluster will usually get notified as soon as possible about the configuration change because as soon as it pings any other node, the receiver will detect it has stale information and will send an <code> UPDATE </code> message. </p> <h3 id="hash-slots-configuration-propagation"> Hash slots configuration propagation </h3> <p> An important part of Redis Cluster is the mechanism used to propagate the information about which cluster node is serving a given set of hash slots. This is vital to both the startup of a fresh cluster and the ability to upgrade the configuration after a replica was promoted to serve the slots of its failing master. </p> <p> The same mechanism allows nodes partitioned away for an indefinite amount of time to rejoin the cluster in a sensible way. </p> <p> There are two ways hash slot configurations are propagated: </p> <ol> <li> Heartbeat messages. The sender of a ping or pong packet always adds information about the set of hash slots it (or its master, if it is a replica) serves. </li> <li> <code> UPDATE </code> messages. Since in every heartbeat packet there is information about the sender <code> configEpoch </code> and set of hash slots served, if a receiver of a heartbeat packet finds the sender information is stale, it will send a packet with new information, forcing the stale node to update its info. </li> </ol> <p> The receiver of a heartbeat or <code> UPDATE </code> message uses certain simple rules in order to update its table mapping hash slots to nodes. When a new Redis Cluster node is created, its local hash slot table is simply initialized to <code> NULL </code> entries so that each hash slot is not bound or linked to any node. This looks similar to the following: </p> <pre tabindex="0"><code>0 -&gt; NULL 1 -&gt; NULL 2 -&gt; NULL ... 16383 -&gt; NULL </code></pre> <p> The first rule followed by a node in order to update its hash slot table is the following: </p> <p> <strong> Rule 1 </strong> : If a hash slot is unassigned (set to <code> NULL </code> ), and a known node claims it, I'll modify my hash slot table and associate the claimed hash slots to it. </p> <p> So if we receive a heartbeat from node A claiming to serve hash slots 1 and 2 with a configuration epoch value of 3, the table will be modified to: </p> <pre tabindex="0"><code>0 -&gt; NULL 1 -&gt; A [3] 2 -&gt; A [3] ... 16383 -&gt; NULL </code></pre> <p> When a new cluster is created, a system administrator needs to manually assign (using the <a href="/commands/cluster-addslots"> <code> CLUSTER ADDSLOTS </code> </a> command, via the redis-cli command line tool, or by any other means) the slots served by each master node only to the node itself, and the information will rapidly propagate across the cluster. </p> <p> However this rule is not enough. We know that hash slot mapping can change during two events: </p> <ol> <li> A replica replaces its master during a failover. </li> <li> A slot is resharded from a node to a different one. </li> </ol> <p> For now let's focus on failovers. When a replica fails over its master, it obtains a configuration epoch which is guaranteed to be greater than the one of its master (and more generally greater than any other configuration epoch generated previously). For example node B, which is a replica of A, may failover A with configuration epoch of 4. It will start to send heartbeat packets (the first time mass-broadcasting cluster-wide) and because of the following second rule, receivers will update their hash slot tables: </p> <p> <strong> Rule 2 </strong> : If a hash slot is already assigned, and a known node is advertising it using a <code> configEpoch </code> that is greater than the <code> configEpoch </code> of the master currently associated with the slot, I'll rebind the hash slot to the new node. </p> <p> So after receiving messages from B that claim to serve hash slots 1 and 2 with configuration epoch of 4, the receivers will update their table in the following way: </p> <pre tabindex="0"><code>0 -&gt; NULL 1 -&gt; B [4] 2 -&gt; B [4] ... 16383 -&gt; NULL </code></pre> <p> Liveness property: because of the second rule, eventually all nodes in the cluster will agree that the owner of a slot is the one with the greatest <code> configEpoch </code> among the nodes advertising it. </p> <p> This mechanism in Redis Cluster is called <strong> last failover wins </strong> . </p> <p> The same happens during resharding. When a node importing a hash slot completes the import operation, its configuration epoch is incremented to make sure the change will be propagated throughout the cluster. </p> <h3 id="update-messages-a-closer-look"> UPDATE messages, a closer look </h3> <p> With the previous section in mind, it is easier to see how update messages work. Node A may rejoin the cluster after some time. It will send heartbeat packets where it claims it serves hash slots 1 and 2 with configuration epoch of 3. All the receivers with updated information will instead see that the same hash slots are associated with node B having a higher configuration epoch. Because of this they'll send an <code> UPDATE </code> message to A with the new configuration for the slots. A will update its configuration because of the <strong> rule 2 </strong> above. </p> <h3 id="how-nodes-rejoin-the-cluster"> How nodes rejoin the cluster </h3> <p> The same basic mechanism is used when a node rejoins a cluster. Continuing with the example above, node A will be notified that hash slots 1 and 2 are now served by B. Assuming that these two were the only hash slots served by A, the count of hash slots served by A will drop to 0! So A will <strong> reconfigure to be a replica of the new master </strong> . </p> <p> The actual rule followed is a bit more complex than this. In general it may happen that A rejoins after a lot of time, in the meantime it may happen that hash slots originally served by A are served by multiple nodes, for example hash slot 1 may be served by B, and hash slot 2 by C. </p> <p> So the actual <em> Redis Cluster node role switch rule </em> is: <strong> A master node will change its configuration to replicate (be a replica of) the node that stole its last hash slot </strong> . </p> <p> During reconfiguration, eventually the number of served hash slots will drop to zero, and the node will reconfigure accordingly. Note that in the base case this just means that the old master will be a replica of the replica that replaced it after a failover. However in the general form the rule covers all possible cases. </p> <p> Replicas do exactly the same: they reconfigure to replicate the node that stole the last hash slot of its former master. </p> <h3 id="replica-migration"> Replica migration </h3> <p> Redis Cluster implements a concept called <em> replica migration </em> in order to improve the availability of the system. The idea is that in a cluster with a master-replica setup, if the map between replicas and masters is fixed availability is limited over time if multiple independent failures of single nodes happen. </p> <p> For example in a cluster where every master has a single replica, the cluster can continue operations as long as either the master or the replica fail, but not if both fail the same time. However there is a class of failures that are the independent failures of single nodes caused by hardware or software issues that can accumulate over time. For example: </p> <ul> <li> Master A has a single replica A1. </li> <li> Master A fails. A1 is promoted as new master. </li> <li> Three hours later A1 fails in an independent manner (unrelated to the failure of A). No other replica is available for promotion since node A is still down. The cluster cannot continue normal operations. </li> </ul> <p> If the map between masters and replicas is fixed, the only way to make the cluster more resistant to the above scenario is to add replicas to every master, however this is costly as it requires more instances of Redis to be executed, more memory, and so forth. </p> <p> An alternative is to create an asymmetry in the cluster, and let the cluster layout automatically change over time. For example the cluster may have three masters A, B, C. A and B have a single replica each, A1 and B1. However the master C is different and has two replicas: C1 and C2. </p> <p> Replica migration is the process of automatic reconfiguration of a replica in order to <em> migrate </em> to a master that has no longer coverage (no working replicas). With replica migration the scenario mentioned above turns into the following: </p> <ul> <li> Master A fails. A1 is promoted. </li> <li> C2 migrates as replica of A1, that is otherwise not backed by any replica. </li> <li> Three hours later A1 fails as well. </li> <li> C2 is promoted as new master to replace A1. </li> <li> The cluster can continue the operations. </li> </ul> <h3 id="replica-migration-algorithm"> Replica migration algorithm </h3> <p> The migration algorithm does not use any form of agreement since the replica layout in a Redis Cluster is not part of the cluster configuration that needs to be consistent and/or versioned with config epochs. Instead it uses an algorithm to avoid mass-migration of replicas when a master is not backed. The algorithm guarantees that eventually (once the cluster configuration is stable) every master will be backed by at least one replica. </p> <p> This is how the algorithm works. To start we need to define what is a <em> good replica </em> in this context: a good replica is a replica not in <code> FAIL </code> state from the point of view of a given node. </p> <p> The execution of the algorithm is triggered in every replica that detects that there is at least a single master without good replicas. However among all the replicas detecting this condition, only a subset should act. This subset is actually often a single replica unless different replicas have in a given moment a slightly different view of the failure state of other nodes. </p> <p> The <em> acting replica </em> is the replica among the masters with the maximum number of attached replicas, that is not in FAIL state and has the smallest node ID. </p> <p> So for example if there are 10 masters with 1 replica each, and 2 masters with 5 replicas each, the replica that will try to migrate is - among the 2 masters having 5 replicas - the one with the lowest node ID. Given that no agreement is used, it is possible that when the cluster configuration is not stable, a race condition occurs where multiple replicas believe themselves to be the non-failing replica with the lower node ID (it is unlikely for this to happen in practice). If this happens, the result is multiple replicas migrating to the same master, which is harmless. If the race happens in a way that will leave the ceding master without replicas, as soon as the cluster is stable again the algorithm will be re-executed again and will migrate a replica back to the original master. </p> <p> Eventually every master will be backed by at least one replica. However, the normal behavior is that a single replica migrates from a master with multiple replicas to an orphaned master. </p> <p> The algorithm is controlled by a user-configurable parameter called <code> cluster-migration-barrier </code> : the number of good replicas a master must be left with before a replica can migrate away. For example, if this parameter is set to 2, a replica can try to migrate only if its master remains with two working replicas. </p> <h3 id="configepoch-conflicts-resolution-algorithm"> configEpoch conflicts resolution algorithm </h3> <p> When new <code> configEpoch </code> values are created via replica promotion during failovers, they are guaranteed to be unique. </p> <p> However there are two distinct events where new configEpoch values are created in an unsafe way, just incrementing the local <code> currentEpoch </code> of the local node and hoping there are no conflicts at the same time. Both the events are system-administrator triggered: </p> <ol> <li> <a href="/commands/cluster-failover"> <code> CLUSTER FAILOVER </code> </a> command with <code> TAKEOVER </code> option is able to manually promote a replica node into a master <em> without the majority of masters being available </em> . This is useful, for example, in multi data center setups. </li> <li> Migration of slots for cluster rebalancing also generates new configuration epochs inside the local node without agreement for performance reasons. </li> </ol> <p> Specifically, during manual resharding, when a hash slot is migrated from a node A to a node B, the resharding program will force B to upgrade its configuration to an epoch which is the greatest found in the cluster, plus 1 (unless the node is already the one with the greatest configuration epoch), without requiring agreement from other nodes. Usually a real world resharding involves moving several hundred hash slots (especially in small clusters). Requiring an agreement to generate new configuration epochs during resharding, for each hash slot moved, is inefficient. Moreover it requires a fsync in each of the cluster nodes every time in order to store the new configuration. Because of the way it is performed instead, we only need a new config epoch when the first hash slot is moved, making it much more efficient in production environments. </p> <p> However because of the two cases above, it is possible (though unlikely) to end with multiple nodes having the same configuration epoch. A resharding operation performed by the system administrator, and a failover happening at the same time (plus a lot of bad luck) could cause <code> currentEpoch </code> collisions if they are not propagated fast enough. </p> <p> Moreover, software bugs and filesystem corruptions can also contribute to multiple nodes having the same configuration epoch. </p> <p> When masters serving different hash slots have the same <code> configEpoch </code> , there are no issues. It is more important that replicas failing over a master have unique configuration epochs. </p> <p> That said, manual interventions or resharding may change the cluster configuration in different ways. The Redis Cluster main liveness property requires that slot configurations always converge, so under every circumstance we really want all the master nodes to have a different <code> configEpoch </code> . </p> <p> In order to enforce this, <strong> a conflict resolution algorithm </strong> is used in the event that two nodes end up with the same <code> configEpoch </code> . </p> <ul> <li> IF a master node detects another master node is advertising itself with the same <code> configEpoch </code> . </li> <li> AND IF the node has a lexicographically smaller Node ID compared to the other node claiming the same <code> configEpoch </code> . </li> <li> THEN it increments its <code> currentEpoch </code> by 1, and uses it as the new <code> configEpoch </code> . </li> </ul> <p> If there are any set of nodes with the same <code> configEpoch </code> , all the nodes but the one with the greatest Node ID will move forward, guaranteeing that, eventually, every node will pick a unique configEpoch regardless of what happened. </p> <p> This mechanism also guarantees that after a fresh cluster is created, all nodes start with a different <code> configEpoch </code> (even if this is not actually used) since <code> redis-cli </code> makes sure to use <a href="/commands/cluster-set-config-epoch"> <code> CLUSTER SET-CONFIG-EPOCH </code> </a> at startup. However if for some reason a node is left misconfigured, it will update its configuration to a different configuration epoch automatically. </p> <h3 id="node-resets"> Node resets </h3> <p> Nodes can be software reset (without restarting them) in order to be reused in a different role or in a different cluster. This is useful in normal operations, in testing, and in cloud environments where a given node can be reprovisioned to join a different set of nodes to enlarge or create a new cluster. </p> <p> In Redis Cluster nodes are reset using the <a href="/commands/cluster-reset"> <code> CLUSTER RESET </code> </a> command. The command is provided in two variants: </p> <ul> <li> <code> CLUSTER RESET SOFT </code> </li> <li> <code> CLUSTER RESET HARD </code> </li> </ul> <p> The command must be sent directly to the node to reset. If no reset type is provided, a soft reset is performed. </p> <p> The following is a list of operations performed by a reset: </p> <ol> <li> Soft and hard reset: If the node is a replica, it is turned into a master, and its dataset is discarded. If the node is a master and contains keys the reset operation is aborted. </li> <li> Soft and hard reset: All the slots are released, and the manual failover state is reset. </li> <li> Soft and hard reset: All the other nodes in the nodes table are removed, so the node no longer knows any other node. </li> <li> Hard reset only: <code> currentEpoch </code> , <code> configEpoch </code> , and <code> lastVoteEpoch </code> are set to 0. </li> <li> Hard reset only: the Node ID is changed to a new random ID. </li> </ol> <p> Master nodes with non-empty data sets can't be reset (since normally you want to reshard data to the other nodes). However, under special conditions when this is appropriate (e.g. when a cluster is totally destroyed with the intent of creating a new one), <a href="/commands/flushall"> <code> FLUSHALL </code> </a> must be executed before proceeding with the reset. </p> <h3 id="removing-nodes-from-a-cluster"> Removing nodes from a cluster </h3> <p> It is possible to practically remove a node from an existing cluster by resharding all its data to other nodes (if it is a master node) and shutting it down. However, the other nodes will still remember its node ID and address, and will attempt to connect with it. </p> <p> For this reason, when a node is removed we want to also remove its entry from all the other nodes tables. This is accomplished by using the <code> CLUSTER FORGET &lt;node-id&gt; </code> command. </p> <p> The command does two things: </p> <ol> <li> It removes the node with the specified node ID from the nodes table. </li> <li> It sets a 60 second ban which prevents a node with the same node ID from being re-added. </li> </ol> <p> The second operation is needed because Redis Cluster uses gossip in order to auto-discover nodes, so removing the node X from node A, could result in node B gossiping about node X to A again. Because of the 60 second ban, the Redis Cluster administration tools have 60 seconds in order to remove the node from all the nodes, preventing the re-addition of the node due to auto discovery. </p> <p> Further information is available in the <a href="/commands/cluster-forget"> <code> CLUSTER FORGET </code> </a> documentation. </p> <h2 id="publishsubscribe"> Publish/Subscribe </h2> <p> In a Redis Cluster, clients can subscribe to every node, and can also publish to every other node. The cluster will make sure that published messages are forwarded as needed. </p> <p> The clients can send SUBSCRIBE to any node and can also send PUBLISH to any node. It will simply broadcast each published message to all other nodes. </p> <p> Redis 7.0 and later features sharded pub/sub, in which shard channels are assigned to slots by the same algorithm used to assign keys to slots. A shard message must be sent to a node that owns the slot the shard channel is hashed to. The cluster makes sure the published shard messages are forwarded to all nodes in the shard, so clients can subscribe to a shard channel by connecting to either the master responsible for the slot, or to any of its replicas. </p> <h2 id="appendix"> Appendix </h2> <h3 id="appendix-a-crc16-reference-implementation-in-ansi-c"> Appendix A: CRC16 reference implementation in ANSI C </h3> <pre><code>/* * Copyright 2001-2010 Georges Menie (www.menie.org) * Copyright 2010 Salvatore Sanfilippo (adapted to Redis coding style) * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the University of California, Berkeley nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* CRC16 implementation according to CCITT standards. * * Note by @antirez: this is actually the XMODEM CRC 16 algorithm, using the * following parameters: * * Name : "XMODEM", also known as "ZMODEM", "CRC-16/ACORN" * Width : 16 bit * Poly : 1021 (That is actually x^16 + x^12 + x^5 + 1) * Initialization : 0000 * Reflect Input byte : False * Reflect Output CRC : False * Xor constant to output CRC : 0000 * Output for "123456789" : 31C3 */ static const uint16_t crc16tab[256]= { 0x0000,0x1021,0x2042,0x3063,0x4084,0x50a5,0x60c6,0x70e7, 0x8108,0x9129,0xa14a,0xb16b,0xc18c,0xd1ad,0xe1ce,0xf1ef, 0x1231,0x0210,0x3273,0x2252,0x52b5,0x4294,0x72f7,0x62d6, 0x9339,0x8318,0xb37b,0xa35a,0xd3bd,0xc39c,0xf3ff,0xe3de, 0x2462,0x3443,0x0420,0x1401,0x64e6,0x74c7,0x44a4,0x5485, 0xa56a,0xb54b,0x8528,0x9509,0xe5ee,0xf5cf,0xc5ac,0xd58d, 0x3653,0x2672,0x1611,0x0630,0x76d7,0x66f6,0x5695,0x46b4, 0xb75b,0xa77a,0x9719,0x8738,0xf7df,0xe7fe,0xd79d,0xc7bc, 0x48c4,0x58e5,0x6886,0x78a7,0x0840,0x1861,0x2802,0x3823, 0xc9cc,0xd9ed,0xe98e,0xf9af,0x8948,0x9969,0xa90a,0xb92b, 0x5af5,0x4ad4,0x7ab7,0x6a96,0x1a71,0x0a50,0x3a33,0x2a12, 0xdbfd,0xcbdc,0xfbbf,0xeb9e,0x9b79,0x8b58,0xbb3b,0xab1a, 0x6ca6,0x7c87,0x4ce4,0x5cc5,0x2c22,0x3c03,0x0c60,0x1c41, 0xedae,0xfd8f,0xcdec,0xddcd,0xad2a,0xbd0b,0x8d68,0x9d49, 0x7e97,0x6eb6,0x5ed5,0x4ef4,0x3e13,0x2e32,0x1e51,0x0e70, 0xff9f,0xefbe,0xdfdd,0xcffc,0xbf1b,0xaf3a,0x9f59,0x8f78, 0x9188,0x81a9,0xb1ca,0xa1eb,0xd10c,0xc12d,0xf14e,0xe16f, 0x1080,0x00a1,0x30c2,0x20e3,0x5004,0x4025,0x7046,0x6067, 0x83b9,0x9398,0xa3fb,0xb3da,0xc33d,0xd31c,0xe37f,0xf35e, 0x02b1,0x1290,0x22f3,0x32d2,0x4235,0x5214,0x6277,0x7256, 0xb5ea,0xa5cb,0x95a8,0x8589,0xf56e,0xe54f,0xd52c,0xc50d, 0x34e2,0x24c3,0x14a0,0x0481,0x7466,0x6447,0x5424,0x4405, 0xa7db,0xb7fa,0x8799,0x97b8,0xe75f,0xf77e,0xc71d,0xd73c, 0x26d3,0x36f2,0x0691,0x16b0,0x6657,0x7676,0x4615,0x5634, 0xd94c,0xc96d,0xf90e,0xe92f,0x99c8,0x89e9,0xb98a,0xa9ab, 0x5844,0x4865,0x7806,0x6827,0x18c0,0x08e1,0x3882,0x28a3, 0xcb7d,0xdb5c,0xeb3f,0xfb1e,0x8bf9,0x9bd8,0xabbb,0xbb9a, 0x4a75,0x5a54,0x6a37,0x7a16,0x0af1,0x1ad0,0x2ab3,0x3a92, 0xfd2e,0xed0f,0xdd6c,0xcd4d,0xbdaa,0xad8b,0x9de8,0x8dc9, 0x7c26,0x6c07,0x5c64,0x4c45,0x3ca2,0x2c83,0x1ce0,0x0cc1, 0xef1f,0xff3e,0xcf5d,0xdf7c,0xaf9b,0xbfba,0x8fd9,0x9ff8, 0x6e17,0x7e36,0x4e55,0x5e74,0x2e93,0x3eb2,0x0ed1,0x1ef0 }; uint16_t crc16(const char *buf, int len) { int counter; uint16_t crc = 0; for (counter = 0; counter &lt; len; counter++) crc = (crc&lt;&lt;8) ^ crc16tab[((crc&gt;&gt;8) ^ *buf++)&amp;0x00FF]; return crc; } </code></pre> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/oss_and_stack/reference/cluster-spec/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/cf.insertnx/.html
<section class="prose w-full py-12"> <h1 class="command-name"> CF.INSERTNX </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">CF.INSERTNX key [CAPACITY capacity] [NOCREATE] ITEMS item [item ...]</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available in: </dt> <dd class="m-0"> <a href="/docs/stack"> Redis Stack </a> / <a href="/docs/data-types/probabilistic"> Bloom 1.0.0 </a> </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(n * (k + i)), where n is the number of items, k is the number of sub-filters and i is maxIterations </dd> </dl> <p> Adds one or more items to a cuckoo filter if they did not exist previously, allowing the filter to be created with a custom capacity if it does not exist yet. </p> <p> This command is similar to <a href="/docs/latest/commands/cf.addnx/"> <code> CF.ADDNX </code> </a> , except that more than one item can be added and capacity can be specified. </p> <p> <note> <b> Notes: </b> </note> </p> <ul> <li> This command is slower than <a href="/docs/latest/commands/cf.insert/"> <code> CF.INSERT </code> </a> because it first checks whether each item exists. </li> <li> Since <a href="/docs/latest/commands/cf.exists/"> <code> CF.EXISTS </code> </a> can result in false positive, <code> CF.INSERTNX </code> may not add an item because it is supposedly already exist, which may be wrong. </li> </ul> <h2 id="required-arguments"> Required arguments </h2> <details open=""> <summary> <code> key </code> </summary> <p> is key name for a cuckoo filter to add items to. </p> <p> If <code> key </code> does not exist - a new cuckoo filter is created. </p> </details> <details open=""> <summary> <code> ITEMS item... </code> </summary> <p> One or more items to add. </p> </details> <h2 id="optional-arguments"> Optional arguments </h2> <details open=""> <summary> <code> CAPACITY capacity </code> </summary> <p> Specifies the desired capacity of the new filter, if this filter does not exist yet. </p> <p> If the filter already exists, then this parameter is ignored. </p> <p> If the filter does not exist yet and this parameter is <em> not </em> specified, then the filter is created with the module-level default capacity which is 1024. </p> <p> See <a href="/docs/latest/commands/cf.reserve/"> <code> CF.RESERVE </code> </a> for more information on cuckoo filter capacities. </p> </details> <details open=""> <summary> <code> NOCREATE </code> </summary> <p> If specified, prevents automatic filter creation if the filter does not exist (Instead, an error is returned). </p> <p> This option is mutually exclusive with <code> CAPACITY </code> . </p> </details> <h2 id="return-value"> Return value </h2> <p> Returns one of these replies: </p> <ul> <li> <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> of <a href="/docs/latest/develop/reference/protocol-spec/#integers"> Integer reply </a> , where <code> 0 </code> means that the item's fingerprint already exists in the filter, <code> 1 </code> means that the item has been successfully added to the filter, and <code> -1 </code> means that the item was not added because the filter is full. </li> <li> [] on error (invalid arguments, wrong key type, etc.) and also when <code> NOCREATE </code> is specified and <code> key </code> does not exist. </li> </ul> <h3 id="complexity"> Complexity </h3> <p> O(n + i), where n is the number of <code> sub-filters </code> and i is <code> maxIterations </code> . Adding items requires up to 2 memory accesses per <code> sub-filter </code> . But as the filter fills up, both locations for an item might be full. The filter attempts to <code> Cuckoo </code> swap items up to <code> maxIterations </code> times. </p> <h2 id="examples"> Examples </h2> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">redis&gt; CF.INSERTNX cf CAPACITY <span class="m">1000</span> ITEMS item1 item2 </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1</span></span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">redis&gt; CF.INSERTNX cf CAPACITY <span class="m">1000</span> ITEMS item1 item2 item3 </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">0</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">0</span> </span></span><span class="line"><span class="cl">3<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1</span></span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">redis&gt; CF.INSERTNX cf_new CAPACITY <span class="m">1000</span> NOCREATE ITEMS item1 item2 </span></span><span class="line"><span class="cl"><span class="o">(</span>error<span class="o">)</span> ERR not found</span></span></code></pre> </div> <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/cf.insertnx/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/develop/clients/om-clients/.html
<section class="prose w-full py-12 max-w-none"> <h1> Object-Mapper libraries </h1> <p class="text-lg -mt-5 mb-10"> Object-Mapper libraries for Redis Stack </p> <p> Redis OM (pronounced <em> REDiss OHM </em> ) is a library that provides object mapping for Redis. With the help of Redis OM, you can map Redis data types, specifically Hashes and JSON documents, to objects of your preferred programming language or framework. Redis OM relies on Redis Stack's JSON, query, and search features, allowing you to query and search for objects. </p> <p> You can use Redis OM with the following four programming languages: </p> <ul> <li> <a href="/docs/latest/integrate/redisom-for-python/"> Python </a> </li> <li> <a href="/docs/latest/integrate/redisom-for-net/"> C#/.NET </a> </li> <li> <a href="/docs/latest/integrate/redisom-for-node-js/"> Node.js </a> </li> <li> <a href="/docs/latest/integrate/redisom-for-java/"> Java/Spring </a> </li> </ul> <nav> </nav> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/develop/clients/om-clients/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/kubernetes/security/.html
<section class="prose w-full py-12 max-w-none"> <h1> Security </h1> <p class="text-lg -mt-5 mb-10"> Security settings and configuration for Redis Enterprise for Kubernetes </p> <p> This section contains security settings and configuration for Redis Enterprise for Kubernetes. </p> <nav> <a href="/docs/latest/operate/kubernetes/security/manage-rec-credentials/"> Manage Redis Enterprise cluster (REC) credentials </a> <br/> <br/> <a href="/docs/latest/operate/kubernetes/security/manage-rec-certificates/"> Manage Redis Enterprise cluster (REC) certificates </a> <p> Install your own certificates to be used by the Redis Enterprise cluster's operator. </p> <a href="/docs/latest/operate/kubernetes/security/add-client-certificates/"> Add client certificates </a> <p> Add client certificates to your REDB custom resource. </p> <a href="/docs/latest/operate/kubernetes/security/ldap/"> Enable LDAP authentication </a> <p> Enable LDAP authentication for Redis Enterprise for Kubernetes. </p> <a href="/docs/latest/operate/kubernetes/security/internode-encryption/"> Enable internode encryption </a> <p> Enable encryption for communication between REC nodes in your K8s cluster. </p> </nav> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/kubernetes/security/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/shard/loading/.html
<section class="prose w-full py-12 max-w-none"> <h1> Loading object </h1> <p class="text-lg -mt-5 mb-10"> Documents the loading object used with Redis Enterprise Software REST API calls. </p> <table> <thead> <tr> <th> Name </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> progress </td> <td> number, (range: 0-100) </td> <td> Percentage of bytes already loaded </td> </tr> <tr> <td> status </td> <td> 'in_progress' <br/> 'idle' </td> <td> Status of the load of a dump file (read-only) </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/shard/loading/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/kubernetes/release-notes/7-4-2-releases/7-4-2-2/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise for Kubernetes 7.4.2-2 (Feb 2024) release notes </h1> <p class="text-lg -mt-5 mb-10"> The primary purpose of this release is to support Redis Enterprise 7.4.2 </p> <h2 id="highlights"> Highlights </h2> <p> The primary purpose of this release is to support <a href="/docs/latest/operate/rs/release-notes/rs-7-4-2-releases/rs-7-4-2-54/"> Redis Enterprise 7.4.2 </a> , which is a major update to Redis Enterprise Software. As such, we have limited the scope of changes to focus on supporting RS 7.4 changes, in addition to implementing a few enhancements and major fixes. </p> <h2 id="new-in-this-release"> New in this release </h2> <h3 id="enhancements"> Enhancements </h3> <ul> <li> Added RESP3 support in K8s APIs (RED-94601) </li> <li> Added to <a href="#supported-distributions"> supported distributions </a> </li> <li> Added support for Redis Enterprise Software 7.4.2 </li> <li> Enhanced resilience of operators to misconfigured REDB namespaces (RED-113908) </li> <li> Both the operator and services rigger are now based on UBI9 (RED-116083) </li> </ul> <h3 id="resolved-issues"> Resolved issues </h3> <ul> <li> Fixed the operator to prevent reconciliation of non-REDB custom resources in observed namespaces. This eliminates the need for unnecessary permission rules. (RED-87790) </li> <li> Fixed excessive updates to ingresses and services. (RED-109289) </li> <li> Fixed update issues in rigger after the upgrade in multi-namespace environments. (RED-111732) </li> <li> Fixed Active-Active sharding configuration by adding a new field. (RED-112909) </li> <li> Fixed operator CVE. (RED-115157) </li> <li> Fixed a race condition that could have rarely caused the cluster upgrade to break. (RED-118940) </li> </ul> <h3 id="api-changes"> API changes </h3> <table> <thead> <tr> <th> <strong> CRD </strong> </th> <th> <strong> Field </strong> </th> <th> <strong> Change </strong> </th> <th> <strong> Description </strong> </th> </tr> </thead> <tbody> <tr> <td> REC </td> <td> resp3Default </td> <td> Add </td> <td> Boolean controlling whether Resp3 should be enabled by default </td> </tr> <tr> <td> REDB </td> <td> resp3 </td> <td> Add </td> <td> Controls resp3 for specific REDBs </td> </tr> </tbody> </table> <h2 id="version-changes"> Version changes </h2> <p> For a list of fixes related to CVEs, see the <a href="/docs/latest/operate/rs/release-notes/rs-7-4-2-releases/rs-7-4-2-54/#security"> Redis Enterprise 7.4.2-54 release notes </a> . </p> <h3 id="breaking-changes"> Breaking changes </h3> <p> The following changes included in this release affect the upgrade process. Please read carefully before upgrading. </p> <h4 id="upgrade-operating-system"> Upgrade operating system </h4> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Warning: </div> If your databases use modules, you need to update all nodes in the cluster to Redis Enterprise 7.2.4 or later before upgrading your operating system. See <a href="/docs/latest/operate/rs/installing-upgrading/upgrading/upgrade-os/"> Upgrade a cluster's operating system </a> in the Redis Enterprise Software documentation for more details. </div> </div> <h4 id="terminationgraceperiodseconds"> terminationGracePeriodSeconds </h4> <p> The configurable <code> terminationGracePeriodSeconds </code> REC field was added in version 7.2.4-12 to replace the hard-coded timeout of 15 minutes for a node to be stopped or drained (RED-111471). </p> <h4 id="validatingwebhookconfiguration"> ValidatingWebhookConfiguration </h4> <p> Versions 6.4.2-4 and later include a new <code> ValidatingWebhookConfiguration </code> resource to replace the <code> redb-admission </code> webhook resource. To use releases 6.4.2-4 or later, delete the old webhook resource and apply the new file. See <a href="/docs/latest/operate/kubernetes/upgrade/upgrade-redis-cluster/#reapply-webhook"> upgrade Redis cluster </a> for instructions. </p> <h4 id="openshift-scc"> OpenShift SCC </h4> <p> Versions 6.4.2-6 and later include a new SCC ( <code> redis-enterprise-scc-v2 </code> ) that you need to bind to your service account before upgrading. OpenShift clusters running version 6.2.12 or earlier upgrading to version 6.2.18 or later might get stuck if you skip this step. See <a href="/docs/latest/operate/kubernetes/upgrade/upgrade-redis-cluster/#before-upgrading"> upgrade a Redis Enterprise cluster (REC) </a> for instructions. </p> <h3 id="deprecations"> Deprecations </h3> <ul> <li> Redis Software for Kubernetes no longer supports the RHEL7 operating system. Migrate to RHEL8 to use this version. </li> </ul> <h3 id="supported-distributions"> Supported distributions </h3> <p> See the <a href="/docs/latest/operate/kubernetes/release-notes/7-4-2-releases/"> 7.4.2 releases </a> page for the list of supported distributions. </p> <h2 id="downloads"> Downloads </h2> <ul> <li> <strong> Redis Enterprise </strong> : <code> redislabs/redis:7.4.2-54 </code> </li> <li> <strong> Operator </strong> : <code> redislabs/operator:7.4.2-2 </code> </li> <li> <strong> Services Rigger </strong> : <code> redislabs/k8s-controller:7.4.2-2 </code> </li> </ul> <h4 id="openshift-images"> OpenShift images </h4> <ul> <li> <strong> Redis Enterprise </strong> : <code> registry.connect.redhat.com/redislabs/redis-enterprise:7.4.2-54.rhel8-openshift </code> </li> <li> <strong> Operator </strong> : <code> registry.connect.redhat.com/redislabs/redis-enterprise-operator:7.4.2-2 </code> </li> <li> <strong> Services Rigger </strong> : <code> registry.connect.redhat.com/redislabs/services-manager:7.4.2-2 </code> </li> </ul> <h4 id="olm-bundle"> OLM bundle </h4> <p> <strong> Redis Enterprise operator bundle </strong> : <code> v7.4.2-2 </code> </p> <h2 id="known-limitations"> Known limitations </h2> <p> See the <a href="/docs/latest/operate/kubernetes/release-notes/7-4-2-releases/"> 7.4.2 releases </a> page for the list of known limitations. </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/kubernetes/release-notes/7-4-2-releases/7-4-2-2/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/mset/.html
<section class="prose w-full py-12"> <h1 class="command-name"> MSET </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">MSET key value [key value ...]</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 1.0.1 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(N) where N is the number of keys to set. </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @write </code> <span class="mr-1 last:hidden"> , </span> <code> @string </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Sets the given keys to their respective values. <code> MSET </code> replaces existing values with new values, just as regular <a href="/docs/latest/commands/set/"> <code> SET </code> </a> . See <a href="/docs/latest/commands/msetnx/"> <code> MSETNX </code> </a> if you don't want to overwrite existing values. </p> <p> <code> MSET </code> is atomic, so all given keys are set at once. It is not possible for clients to see that some of the keys were updated while others are unchanged. </p> <h2 id="examples"> Examples </h2> <div class="bg-slate-900 border-b border-slate-700 rounded-t-xl px-4 py-3 w-full flex"> <svg class="shrink-0 h-[1.0625rem] w-[1.0625rem] fill-slate-50" fill="currentColor" viewbox="0 0 20 20"> <path d="M2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10Z"> </path> </svg> <svg class="shrink-0 h-[1.0625rem] w-[1.0625rem] fill-slate-50" fill="currentColor" viewbox="0 0 20 20"> <path d="M10 2.5L18.6603 17.5L1.33975 17.5L10 2.5Z"> </path> </svg> <svg class="shrink-0 h-[1.0625rem] w-[1.0625rem] fill-slate-50" fill="currentColor" viewbox="0 0 20 20"> <path d="M10 2.5L12.0776 7.9322L17.886 8.22949L13.3617 11.8841L14.8738 17.5L10 14.3264L5.1262 17.5L6.63834 11.8841L2.11403 8.22949L7.92238 7.9322L10 2.5Z"> </path> </svg> </div> <form class="redis-cli overflow-y-auto max-h-80"> <pre tabindex="0">redis&gt; MSET key1 "Hello" key2 "World" "OK" redis&gt; GET key1 "Hello" redis&gt; GET key2 "World" </pre> <div class="prompt" style=""> <span> redis&gt; </span> <input autocomplete="off" name="prompt" spellcheck="false" type="text"/> </div> </form> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#simple-strings"> Simple string reply </a> : always <code> OK </code> because <code> MSET </code> can't fail. <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/mset/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/kubernetes/release-notes/7-4-2-releases/7-4-2-03-24/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise for Kubernetes 7.4.2-2 (March 2024) release notes </h1> <p class="text-lg -mt-5 mb-10"> This is a maintenance release supporting Redis Enterprise Software 7.4.2. </p> <h2 id="highlights"> Highlights </h2> <p> The primary purpose of this release is to support <a href="/docs/latest/operate/rs/release-notes/rs-7-4-2-releases/rs-7-4-2-104/"> Redis Enterprise 7.4.2 </a> , which is a maintenance release of Redis Enterprise Software. </p> <h2 id="version-changes"> Version changes </h2> <p> For a list of fixes related to CVEs, see the <a href="/docs/latest/operate/rs/release-notes/rs-7-4-2-releases/rs-7-4-2-104/#security"> Redis Enterprise 7.4.2-104 release notes </a> . </p> <h3 id="breaking-changes"> Breaking changes </h3> <p> The following changes included in this release affect the upgrade process. Please read carefully before upgrading. </p> <h4 id="upgrade-operating-system"> Upgrade operating system </h4> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Warning: </div> If your databases use modules, you need to update all nodes in the cluster to Redis Enterprise 7.2.4 or later before upgrading your operating system. See <a href="/docs/latest/operate/rs/installing-upgrading/upgrading/upgrade-os/"> Upgrade a cluster's operating system </a> in the Redis Enterprise Software documentation for more details. </div> </div> <h4 id="terminationgraceperiodseconds"> terminationGracePeriodSeconds </h4> <p> The configurable <code> terminationGracePeriodSeconds </code> REC field was added in version 7.2.4-12 to replace the hard-coded timeout of 15 minutes for a node to be stopped or drained (RED-111471). </p> <h4 id="validatingwebhookconfiguration"> ValidatingWebhookConfiguration </h4> <p> Versions 6.4.2-4 and later include a new <code> ValidatingWebhookConfiguration </code> resource to replace the <code> redb-admission </code> webhook resource. To use releases 6.4.2-4 or later, delete the old webhook resource and apply the new file. See <a href="/docs/latest/operate/kubernetes/upgrade/upgrade-redis-cluster/#reapply-webhook"> upgrade Redis cluster </a> for instructions. </p> <h4 id="openshift-scc"> OpenShift SCC </h4> <p> Versions 6.4.2-6 and later include a new SCC ( <code> redis-enterprise-scc-v2 </code> ) that you need to bind to your service account before upgrading. OpenShift clusters running version 6.2.12 or earlier upgrading to version 6.2.18 or later might get stuck if you skip this step. See <a href="/docs/latest/operate/kubernetes/upgrade/upgrade-redis-cluster/#before-upgrading"> upgrade a Redis Enterprise cluster (REC) </a> for instructions. </p> <h3 id="deprecations"> Deprecations </h3> <ul> <li> Redis Software for Kubernetes no longer supports the RHEL7 operating system. Migrate to RHEL8 to use this version. </li> </ul> <h3 id="supported-distributions"> Supported distributions </h3> <p> See the <a href="/docs/latest/operate/kubernetes/release-notes/7-4-2-releases/"> 7.4.2 releases </a> page for the list of supported distributions. </p> <h2 id="downloads"> Downloads </h2> <ul> <li> <strong> Redis Enterprise </strong> : <code> redislabs/redis:7.4.2-104 </code> </li> <li> <strong> Operator </strong> : <code> redislabs/operator:7.4.2-2 </code> </li> <li> <strong> Services Rigger </strong> : <code> redislabs/k8s-controller:7.4.2-2 </code> </li> </ul> <h4 id="openshift-images"> OpenShift images </h4> <ul> <li> <strong> Redis Enterprise </strong> : <code> registry.connect.redhat.com/redislabs/redis-enterprise:7.4.2-104.rhel8-openshift </code> </li> <li> <strong> Operator </strong> : <code> registry.connect.redhat.com/redislabs/redis-enterprise-operator:7.4.2-2 </code> </li> <li> <strong> Services Rigger </strong> : <code> registry.connect.redhat.com/redislabs/services-manager:7.4.2-2 </code> </li> </ul> <h4 id="olm-bundle"> OLM bundle </h4> <p> <strong> Redis Enterprise operator bundle </strong> : <code> v7.4.2-2.6 </code> </p> <h2 id="known-limitations"> Known limitations </h2> <p> See the <a href="/docs/latest/operate/kubernetes/release-notes/7-4-2-releases/"> 7.4.2 releases </a> page for the list of known limitations. </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/kubernetes/release-notes/7-4-2-releases/7-4-2-03-24/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-describe-job/.html
<section class="prose w-full py-12"> <h1> redis-di describe-job </h1> <p class="text-lg -mt-5 mb-10"> Describes a transformation engine's job </p> <h2 id="usage"> Usage </h2> <pre tabindex="0"><code>Usage: redis-di describe-job [OPTIONS] JOB_NAME </code></pre> <h2 id="options"> Options </h2> <ul> <li> <p> <code> log_level </code> : </p> <ul> <li> Type: Choice(['DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']) </li> <li> Default: <code> info </code> </li> <li> Usage: <code> --log-level -l </code> </li> </ul> </li> <li> <p> <code> job_name </code> (REQUIRED): </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> job-name </code> </li> </ul> </li> <li> <p> <code> rdi_host </code> (REQUIRED): </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-host </code> </li> </ul> <p> Host/IP of RDI Database </p> </li> <li> <p> <code> rdi_port </code> (REQUIRED): </p> <ul> <li> Type: &lt;IntRange 1&lt;=x&lt;=65535&gt; </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-port </code> </li> </ul> <p> Port of RDI Database </p> </li> <li> <p> <code> rdi_user </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-user </code> </li> </ul> <p> RDI Database Username </p> </li> <li> <p> <code> rdi_password </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-password </code> </li> </ul> <p> RDI Database Password </p> </li> <li> <p> <code> rdi_key </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-key </code> </li> </ul> <p> Private key file to authenticate with </p> </li> <li> <p> <code> rdi_cert </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-cert </code> </li> </ul> <p> Client certificate file to authenticate with </p> </li> <li> <p> <code> rdi_cacert </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-cacert </code> </li> </ul> <p> CA certificate file to verify with </p> </li> <li> <p> <code> rdi_key_password </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-key-password </code> </li> </ul> <p> Password for unlocking an encrypted private key </p> </li> <li> <p> <code> help </code> : </p> <ul> <li> Type: BOOL </li> <li> Default: <code> false </code> </li> <li> Usage: <code> --help </code> </li> </ul> <p> Show this message and exit. </p> </li> </ul> <h2 id="cli-help"> CLI help </h2> <pre tabindex="0"><code>Usage: redis-di describe-job [OPTIONS] JOB_NAME Describes a transformation engine's job Options: -l, --log-level [DEBUG|INFO|WARN|ERROR|CRITICAL] [default: INFO] --rdi-host TEXT Host/IP of RDI Database [required] --rdi-port INTEGER RANGE Port of RDI Database [1&lt;=x&lt;=65535; required] --rdi-user TEXT RDI Database Username --rdi-password TEXT RDI Database Password --rdi-key TEXT Private key file to authenticate with --rdi-cert TEXT Client certificate file to authenticate with --rdi-cacert TEXT CA certificate file to verify with --rdi-key-password TEXT Password for unlocking an encrypted private key --help Show this message and exit. </code></pre> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-describe-job/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/kubernetes/architecture/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise for Kubernetes architecture </h1> <p class="text-lg -mt-5 mb-10"> Overview of the architecture and components of Redis Enterprise for Kubernetes. </p> <p> Redis Enterprise for Kubernetes gives you the speed and durability of <a href="https://redis.io/redis-enterprise/advantages/"> Redis Enterprise </a> , with the flexibility and ease of <a href="https://kubernetes.io/"> Kubernetes (K8s) </a> . Redis Enterprise for Kubernetes uses the Kubernetes operator pattern and custom controllers to bring the best of Redis Enterprise to the Kubernetes platform. </p> <h2 id="lifecycle"> Lifecycle </h2> <p> Kubernetes is a rapidly evolving platform with a short release cycle (around 4 months). This frequent influx of new features, enhancements and bug fixes means Kubernetes distributions move in and out of support quickly. Redis Enterprise is also a fast-moving product, and is compatible and tested only on distributions listed as <a href="/docs/latest/operate/kubernetes/reference/supported_k8s_distributions/"> supported distributions. </a> </p> <p> Each version of Redis Enterprise for Kubernetes is tested to ensure the version of Redis Enterprise works with the <a href="/docs/latest/operate/kubernetes/reference/supported_k8s_distributions/"> supported Kubernetes distributions </a> at the time. Both the Kubernetes version and the Redis Enterprise version must be supported for the operator to function correctly. We encourage you to upgrade Redis Enterprise for Kubernetes frequently, not only to get the benefit of enhancements and bug fixes, but to keep your software supported. </p> <p> Supported platforms are listed in the <a href="/docs/latest/operate/kubernetes/release-notes/"> release notes </a> and in the <a href="/docs/latest/operate/kubernetes/reference/supported_k8s_distributions/"> supported platforms reference. </a> </p> <h2 id="architecture"> Architecture </h2> <p> The image below illustrates the components of a single namespace, three node deployment. </p> <a href="/docs/latest/images/k8s/k8s-arch-v4.png" sdata-lightbox="/images/k8s/k8s-arch-v4.png"> <img src="/docs/latest/images/k8s/k8s-arch-v4.png"/> </a> <h2 id="operator"> Operator </h2> <p> An <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/operator/"> operator </a> is a custom extension of the Kubernetes API designed to manage complex, stateful applications and their components. This operator pattern is commonly used by databases and other applications to extend the cluster's behavior without changing its underlying code. Kubernetes.io/docs has a great explanation of the <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/operator/"> operator pattern </a> . </p> <p> The operator is a deployment that runs within a <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/"> namespace </a> and uses <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#custom-controllers"> controllers </a> to manage <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/"> custom resources (CRs) </a> , ensuring these resources are continuously monitored and maintained. </p> <p> When the operator is installed, the following resources are created: </p> <ul> <li> <a href="https://kubernetes.io/docs/concepts/security/service-accounts/"> service account </a> under which the operator will run </li> <li> set of <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole"> roles </a> to define the privileges necessary for the operator to perform its tasks </li> <li> set of <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding"> role bindings </a> to authorize the service account </li> <li> <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions"> CustomResourceDefinition (CRD) </a> for each Redis Enterprise custom resource </li> <li> the operator deployment </li> </ul> <h2 id="namespace"> Namespace </h2> <p> The Redis Enterprise <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/operator/"> operator </a> is deployed within a <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/"> namespace </a> . Each namespace can host only one operator and one <a href="#redisenterprisecluster-rec"> RedisEnterpriseCluster (REC) </a> . Namespaces create logical boundaries between resources, allowing organization and security. Some resources are limited to a namespace, while others are cluster-wide. </p> <p> Redis Enterprise for Kubernetes also supports <a href="/docs/latest/operate/kubernetes/architecture/deployment-options/"> multi-namespace deployments </a> , meaning the operator can monitor other namespaces (that host applications) for custom resources and apply any changes. </p> <h2 id="custom-resources"> Custom resources </h2> <p> Kubernetes <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/"> custom resources (CRs) </a> are commonly used by databases and other applications to extend the cluster's behavior without changing its underlying code. <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/"> Custom resources (CRs) </a> extend the Kubernetes API, enabling users to manage Redis databases the Kubernetes way. Custom resources are created and managed using YAML configuration files. </p> <p> This <a href="https://kubernetes.io/docs/tasks/manage-kubernetes-objects/declarative-config/"> declarative configuration approach </a> allows you to specify the desired state for your resources, and the operator makes the necessary changes to achieve that state. This simplifies <a href="/docs/latest/operate/kubernetes/deployment/"> installation </a> , <a href="/docs/latest/operate/kubernetes/upgrade/"> upgrades </a> , and <a href="/docs/latest/operate/kubernetes/recommendations/sizing-on-kubernetes/"> scaling </a> both vertically and horizontally. </p> <p> The operator continuously monitors CRs for changes, automatically reconciling any differences between the desired state you specified in your YAML configuration file, and the actual state of your resources. Custom resources can also reside in separate namespaces from the operator managing them, such as in <a href="/docs/latest/operate/kubernetes/re-clusters/multi-namespace/"> multi-namespace installations </a> . </p> <h2 id="custom-resource-definitions"> Custom resource definitions </h2> <p> A <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions"> custom resource definition (CRD) </a> is a cluster-wide resource that specifies which settings can be configured via custom resource files. Any setting not defined by the CRD is not managed by the operator. You can still make changes to these unmanaged settings using standard Redis Enterprise Software methods. </p> <p> For settings managed by the operator, any changes made outside of the CR YAML files (e.g., through the management UI) will be overwritten by the operator. Ensure that all operator-managed settings are updated using the CR YAML files to prevent conflicts. </p> <h2 id="redisenterprisecluster-rec"> RedisEnterpriseCluster REC </h2> <p> A Redis Enterprise cluster is a set of Redis Enterprise nodes pooling resources. Each node is capable of running multiple Redis instances ( <a href="/docs/latest/operate/rs/references/terminology/"> shards </a> ). </p> <a href="/docs/latest/images/k8s/k8s-node-arch.png" sdata-lightbox="/images/k8s/k8s-node-arch.png"> <img src="/docs/latest/images/k8s/k8s-node-arch.png"/> </a> <p> A Redis cluster is created and managed by the <a href="/docs/latest/operate/kubernetes/reference/redis_enterprise_cluster_api/"> RedisEnterpriseCluster (REC) </a> <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/"> custom resource </a> . Changes to the REC configuration file prompt the operator to make changes to the cluster. The REC is required for both standard databases ( <a href="#redisenterprisedatabase-redb"> REDB </a> ) and Active-Active databases ( <a href="#redisenterpriseactiveactivedatabase-reaadb"> REAADB </a> ). </p> <p> See the <a href="/docs/latest/operate/kubernetes/reference/redis_enterprise_cluster_api/"> RedisEnterpriseCluster API Reference </a> for a full list of fields and settings. </p> <h2 id="redisenterprisedatabase-redb"> RedisEnterpriseDatabase REDB </h2> <p> A Redis Enterprise database is a logical entity that manages your entire dataset across multiple Redis instances. A Redis instance is a single-threaded database process ( <a href="/docs/latest/operate/rs/references/terminology/"> commonly referred to as a shard </a> ). </p> <p> Redis databases are created and managed by the <a href="/docs/latest/operate/kubernetes/reference/redis_enterprise_database_api/"> RedisEnterpriseDatabase (REDB) </a> <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/"> custom resource (CR) </a> . Changes to the REDB YAML configuration file prompt the operator to make changes to the database. </p> <p> An operator can manage a database in the same namespace, or a different namespace. See <a href="/docs/latest/operate/kubernetes/architecture/deployment-options/"> "Flexible deployment" </a> options and <a href="/docs/latest/operate/kubernetes/re-clusters/multi-namespace/"> "Manage databases in multiple namespaces" </a> for more information. </p> <p> See the <a href="/docs/latest/operate/kubernetes/reference/redis_enterprise_database_api/"> RedisEnterpriseDatabase (REDB) API Reference </a> for a full list of fields and settings. </p> <h2 id="security"> Security </h2> <p> Redis Enterprise for Kubernetes uses <a href="https://kubernetes.io/docs/concepts/configuration/secret/"> secrets </a> to manage your cluster credentials, cluster certificates, and client certificates. You can configure <a href="/docs/latest/operate/kubernetes/security/ldap/"> LDAP </a> and <a href="/docs/latest/operate/kubernetes/security/internode-encryption/"> internode encryption </a> using the <a href="#redisenterprisecluster-rec"> RedisEnterpriseCluster (REC) </a> spec. </p> <h3 id="rec-credentials"> REC credentials </h3> <p> Redis Enterprise for Kubernetes uses the <a href="/docs/latest/operate/kubernetes/reference/redis_enterprise_cluster_api/"> RedisEnterpriseCluster (REC) </a> <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/"> custom resource </a> to create a Redis Enterprise cluster. During creation it generates random credentials for the operator to use. The credentials are saved in a Kubernetes (K8s) <a href="https://kubernetes.io/docs/concepts/configuration/secret/"> secret </a> . The secret name defaults to the name of the cluster. </p> <p> See <a href="/docs/latest/operate/kubernetes/security/manage-rec-credentials/"> Manage REC credentials </a> for more details. </p> <h3 id="rec-certificates"> REC certificates </h3> <p> By default, Redis Enterprise Software for Kubernetes generates TLS certificates for the cluster during creation. These self-signed certificates are generated on the first node of each Redis Enterprise cluster (REC) and are copied to all other nodes in the cluster. </p> <p> See <a href="/docs/latest/operate/kubernetes/security/manage-rec-certificates/"> Manage REC certificates </a> for more details. </p> <h3 id="client-certificates"> Client certificates </h3> <p> For each client certificate you want to use, you need to create a <a href="https://kubernetes.io/docs/concepts/configuration/secret/"> Kubernetes secret </a> to hold it. You can then reference that secret in your <a href="#redisenterprisedatabase-redb"> Redis Enterprise database (REDB) </a> custom resource. </p> <p> See <a href="/docs/latest/operate/kubernetes/security/add-client-certificates/"> Add client certificates </a> for more details. </p> <h2 id="storage"> Storage </h2> <p> <a href="/docs/latest/operate/rs/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage/"> Persistent storage is mandatory for Redis Enterprise. </a> Redis Enterprise for Kubernetes <a href="https://en.wikipedia.org/wiki/Network-attached_storage"> requires network-attached storage </a> . </p> <p> Redis Enterprise for Kubernetes uses <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims"> PersistentVolumeClaims (PVC) </a> to manage storage resources. The PVC is an abstract representation of the <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes"> PersistentVolume (PV) </a> resources used by your Redis pods. PVCs are created by the Redis Enterprise operator and used by the <a href="#redisenterprisecluster-rec"> RedisEnterpriseCluster (REC) </a> . </p> <p> PVCs are created with a specific size and <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims"> can be expanded </a> , if the underlying <a href="https://kubernetes.io/docs/concepts/storage/storage-classes/"> storage class </a> supports it. </p> <h3 id="auto-tiering"> Auto Tiering </h3> <p> Redis Enterprise Software for Kubernetes supports <a href="/docs/latest/operate/kubernetes/re-clusters/auto-tiering/"> Auto Tiering </a> (previously known as Redis on Flash), which extends your node memory to use both RAM and flash storage. SSDs (solid state drives) can store infrequently used (warm) values while your keys and frequently used (hot) values are still stored in RAM. This improves performance and lowers costs for large datasets. </p> <p> NVMe (non-volatile memory express) SSDs are strongly recommended to achieve the best performance. </p> <h2 id="networking"> Networking </h2> <p> By default, Kubernetes doesn't allow you to access your Redis database from outside your K8s cluster. Redis Enterprise for Kubernetes supports several ways to route external traffic to your <a href="#redisenterprisecluster-rec"> Redis Enterprise cluster (REC) </a> : </p> <ul> <li> Ingress controllers <a href="https://haproxy-ingress.github.io/"> HAProxy </a> and <a href="https://kubernetes.github.io/ingress-nginx/"> NGINX </a> require an <code> ingress </code> API resource. </li> <li> <a href="https://istio.io/latest/docs/setup/getting-started/"> Istio </a> requires <code> Gateway </code> and <code> VirtualService </code> API resources. </li> <li> OpenShift uses <a href="/docs/latest/operate/kubernetes/networking/routes/"> routes </a> to route external traffic. </li> </ul> <p> The <a href="#active-active-databases"> Active-Active databases </a> require one of above routing methods to be configured in the REC with the <a href="/docs/latest/operate/kubernetes/reference/redis_enterprise_cluster_api/#specingressorroutespec"> ingressOrRouteSpec field </a> . </p> <h2 id="services-rigger"> Services Rigger </h2> <p> The services rigger is responsible for creating and updating services related to database objects. It identifies database objects within the cluster and creates services in accordance with <a href="/docs/latest/operate/kubernetes/reference/redis_enterprise_cluster_api/#specservicesriggerspec"> <code> redisEnterpriseCluster.Spec.servicesRiggerSpec </code> setting </a> to allow access to those databases. By default, each database has two services, a <code> cluster_ip </code> Service with the same name as the database and a <code> headless </code> Service with the same name as the database suffixed with <code> -headless </code> . It also creates other types of Services such as Ingress Services or OpenshiftRoutes (defined in <code> redisEnterpriseCluster.Spec.ingressOrRouteSpec </code> ) meant to provide access to REAADB objects. </p> <p> You can view a list of services with the <code> kubectl get services </code> command. </p> <p> Kubernetes is a dynamic environment, with nodes and pods changing as needed. The services rigger monitors the cluster for these changes and updates the database services to ensure reliable communication with the databases. </p> <h2 id="active-active-databases"> Active-Active databases </h2> <p> On Kubernetes, Redis Enterprise <a href="/docs/latest/operate/rs/databases/active-active/"> Active-Active </a> databases provide read and write access to the same dataset from different Kubernetes clusters. Creating an Active-Active database requires routing <a href="/docs/latest/operate/kubernetes/networking/"> network access </a> between two Redis Enterprise clusters residing in different Kubernetes clusters. Without the proper access configured for each cluster, syncing between the databases instances will fail.The admission controller is also required for Active-Active databases on Kubernetes, to validate changes to the custom resources. </p> <p> For more details and installation information, see <a href="/docs/latest/operate/kubernetes/active-active/"> Active-Active databases </a> . For more general information about Active-Active, see the <a href="/docs/latest/operate/rs/databases/active-active/"> Redis Enterprise Software docs </a> . </p> <h2 id="redisenterpriseremotecluster-rerc"> RedisEnterpriseRemoteCluster RERC </h2> <p> The <a href="/docs/latest/operate/kubernetes/reference/redis_enterprise_remote_cluster_api/"> RedisEnterpriseRemoteCluster (RERC) </a> contains details allowing the REC to link to the RedisEnterpriseActiveActiveDatabase (REAADB). The RERC resource is listed in the <a href="#redisenterpriseactiveactivedatabase-reaadb"> REAADB </a> resource to become a participating cluster for the Active-Active database. </p> <p> See the <a href="/docs/latest/operate/kubernetes/reference/redis_enterprise_remote_cluster_api/"> RERC API reference </a> for a full list of fields and settings. </p> <h2 id="redisenterpriseactiveactivedatabase-reaadb"> RedisEnterpriseActiveActiveDatabase REAADB </h2> <p> The RedisEnterpriseActiveActiveDatabase (REAADB) resource creates and manages a database that spans more than one Kubernetes cluster. An REAADB requires <a href="#networking"> external routing </a> , at least two <a href="#redisenterprisecluster-rec"> RECs </a> , and at least two <a href="#redisenterpriseremotecluster-rerc"> RERCs </a> . </p> <p> See the <a href="/docs/latest/operate/kubernetes/reference/redis_enterprise_active_active_database_api/"> REAADB API reference </a> for a full list of fields and settings. </p> <h2 id="metrics"> Metrics </h2> <p> To collect metrics data from your databases and Redis Enterprise cluster (REC), you can <a href="/docs/latest/operate/kubernetes/re-clusters/connect-prometheus-operator/"> connect your Prometheus </a> server to an endpoint exposed on your REC. Redis Enterprise for Kubernetes creates a dedicated service to expose the <code> prometheus </code> port (8070) for data collection. A custom resource called <code> ServiceMonitor </code> allows the <a href="https://github.com/prometheus-operator/prometheus-operator/tree/main/Documentation"> Prometheus operator </a> to connect to this port and collect data from Redis Enterprise. </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/kubernetes/architecture/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/requests/cluster/stats/last/.html
<section class="prose w-full py-12 max-w-none"> <h1> Cluster last stats requests </h1> <p class="text-lg -mt-5 mb-10"> Most recent cluster statistics requests </p> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#get-cluster-stats-last"> GET </a> </td> <td> <code> /v1/cluster/stats/last </code> </td> <td> Get most recent cluster stats </td> </tr> </tbody> </table> <h2 id="get-cluster-stats-last"> Get latest cluster stats </h2> <pre><code>GET /v1/cluster/stats/last </code></pre> <p> Get the most recent cluster statistics. </p> <h4 id="required-permissions"> Required permissions </h4> <table> <thead> <tr> <th> Permission name </th> </tr> </thead> <tbody> <tr> <td> <a href="/docs/latest/operate/rs/7.4/references/rest-api/permissions/#view_cluster_stats"> view_cluster_stats </a> </td> </tr> </tbody> </table> <h3 id="get-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <pre><code>GET /cluster/stats/last?interval=1sec&amp;stime=2015-10-14T06:44:00Z </code></pre> <h4 id="request-headers"> Request headers </h4> <table> <thead> <tr> <th> Key </th> <th> Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> Host </td> <td> cnm.cluster.fqdn </td> <td> Domain name </td> </tr> <tr> <td> Accept </td> <td> application/json </td> <td> Accepted media type </td> </tr> </tbody> </table> <h4 id="query-parameters"> Query parameters </h4> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> interval </td> <td> string </td> <td> Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week. Default: 1sec. (optional) </td> </tr> <tr> <td> stime </td> <td> ISO_8601 </td> <td> Start time from which we want the stats. Should comply with the <a href="https://en.wikipedia.org/wiki/ISO_8601"> ISO_8601 </a> format (optional) </td> </tr> <tr> <td> etime </td> <td> ISO_8601 </td> <td> End time after which we don't want the stats. Should comply with the <a href="https://en.wikipedia.org/wiki/ISO_8601"> ISO_8601 </a> format (optional) </td> </tr> </tbody> </table> <h3 id="get-response"> Response </h3> <p> Returns the most recent <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/statistics/"> statistics </a> for the cluster. </p> <h4 id="example-json-body"> Example JSON body </h4> <div class="highlight"> <pre class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"conns"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cpu_idle"</span><span class="p">:</span> <span class="mf">0.8424999999988358</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cpu_system"</span><span class="p">:</span> <span class="mf">0.01749999999992724</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cpu_user"</span><span class="p">:</span> <span class="mf">0.08374999999978172</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"egress_bytes"</span><span class="p">:</span> <span class="mf">7403.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ephemeral_storage_avail"</span><span class="p">:</span> <span class="mf">151638712320.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ephemeral_storage_free"</span><span class="p">:</span> <span class="mf">162375925760.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"etime"</span><span class="p">:</span> <span class="s2">"2015-10-14T06:44:01Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"free_memory"</span><span class="p">:</span> <span class="mf">5862400000.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ingress_bytes"</span><span class="p">:</span> <span class="mf">7469.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"1sec"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"persistent_storage_avail"</span><span class="p">:</span> <span class="mf">151638712320.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"persistent_storage_free"</span><span class="p">:</span> <span class="mf">162375925760.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"stime"</span><span class="p">:</span> <span class="s2">"2015-10-14T06:44:00Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"total_req"</span><span class="p">:</span> <span class="mf">0.0</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="get-status-codes"> Status codes </h3> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1"> 200 OK </a> </td> <td> No error </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1"> 500 Internal Server Error </a> </td> <td> Internal server error </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/requests/cluster/stats/last/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisbloom/redisbloom-2.8-release-notes/.html
<section class="prose w-full py-12 max-w-none"> <h1> RedisBloom 2.8 release notes </h1> <p class="text-lg -mt-5 mb-10"> RedisBloom 2.8 introduces improvements and bug fixes. </p> <h2 id="requirements"> Requirements </h2> <p> RedisBloom v2.8.2 requires: </p> <ul> <li> Minimum Redis compatibility version (database): 7.4 </li> <li> Minimum Redis Enterprise Software version (cluster): 7.6 (TBD) </li> </ul> <h2 id="v28-ga-v282-july-2024"> v2.8 GA (v2.8.2) (July 2024) </h2> <p> This is the General Availability release of RedisBloom 2.8 </p> <h3 id="headlines"> Headlines: </h3> <p> RedisBloom 2.8 introduces improvements and bug fixes. </p> <h3 id="details"> Details </h3> <ul> <li> <p> Bug fixes </p> <ul> <li> <a href="https://github.com/RedisBloom/RedisBloom/pull/773"> #773 </a> <code> CMS.MERGE </code> : reply with an error on overflow and underflow (MOD-6962) </li> <li> <a href="https://github.com/RedisBloom/RedisBloom/pull/720"> #720 </a> <code> BF </code> crashes on high error rate (MOD-6268) </li> </ul> </li> </ul> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> <ul> <li> The version inside Redis will be 2.8.2 in semantic versioning. Since the version of a module in Redis is numeric, we could not add a GA flag. </li> <li> Minimal Redis version: 7.4 </li> </ul> </div> </div> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisbloom/redisbloom-2.8-release-notes/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/groupscripting.html
<section class="prose w-full py-12"> <h1> Commands </h1> </section>
https://redis.io/docs/latest/operate/kubernetes/release-notes/previous-releases/k8s-6-0-20-4/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise for Kubernetes Release Notes 6.0.20-4 (May 2021) </h1> <p class="text-lg -mt-5 mb-10"> Support for 6.0.20-69, OpenShift 4.7, and K8s 1.20. Hashicorp Vault integration with REC and REDB secrets. </p> <p> The Redis Enterprise K8s <a href="https://github.com/RedisLabs/redis-enterprise-k8s-docs/releases/tag/v6.0.20-4"> 6.0.20-4 </a> release is a <em> major release </em> on top of <a href="https://github.com/RedisLabs/redis-enterprise-k8s-docs/releases/tag/v6.0.8-20"> 6.0.8-20 </a> providing support for the <a href="/docs/latest/operate/rs/release-notes/rs-6-0-20-april-2021/"> Redis Enterprise Software release 6.0.20-69 </a> and includes several enhancements and bug fixes. </p> <h2 id="overview"> Overview </h2> <p> This release of the operator provides: </p> <ul> <li> New features </li> <li> Various bug fixes </li> </ul> <p> To upgrade your deployment to this latest release, see <a href="/docs/latest/operate/kubernetes/upgrade/upgrade-redis-cluster/"> "Upgrade a Redis Enterprise cluster (REC) on Kubernetes" </a> . </p> <h2 id="images"> Images </h2> <p> This release includes the following container images: </p> <ul> <li> <strong> Redis Enterprise </strong> : redislabs/redis:6.0.20-69 or redislabs/redis:6.0.20-69.rhel7-openshift </li> <li> <strong> Operator and Bootstrapper </strong> : redislabs/operator:6.0.20-4 </li> <li> <strong> Services Rigger </strong> : redislabs/k8s-controller:6.0.20-4 or redislabs/services-manager:6.0.20-4 (on the Red Hat registry) </li> </ul> <h2 id="new-features"> New features </h2> <ul> <li> Support for Openshift 4.7 </li> <li> Support for Kubernetes 1.20 </li> </ul> <h2 id="new-preview-features"> New preview features </h2> <ul> <li> Hashicorp Vault integration - REC secret </li> <li> Hashicorp Vault integration - REDB secrets </li> </ul> <h2 id="important-fixes"> Important fixes </h2> <ul> <li> Fixed upgrade issue with custom container repositories specifying port numbers (RED-53192) </li> <li> REDB controller no longer performs reconciliation until Redis Enterprise software version complies with operator (RED-53194) </li> <li> Removed unused node.js package from Services Rigger image (RED-53536) </li> <li> Fixed operator crash on change of uiServiceType (RED-54621) </li> <li> Avoid excessive logging within RS pod (envoy_access.log) (RED-55525) </li> </ul> <h2 id="known-limitations"> Known limitations </h2> <h3 id="openshift-47---v6020-4-cannot-be-deployed-by-olm"> OpenShift 4.7 - v6.0.20-4 cannot be deployed by OLM </h3> <p> 6.0.20-4 does not appear in OLM. Workaround - deploy manually. A future maintenance release will address this. </p> <h3 id="hashicorp-vault-integration---no-support-for-gesher-red-55080"> Hashicorp Vault integration - no support for Gesher (RED-55080) </h3> <p> There is no workaround at this time </p> <h3 id="nodes-down-indefinitely-after-the-redis-enterprise-node-container-of-a-rec-pod-is-restarted-53042"> Nodes down indefinitely after the redis-enterprise-node container of a REC pod is restarted (53042) </h3> <p> In some cases where the Redis Enterprise Cluster container in the Redis Enterprise Cluster(REC) pod is restarted, the REC node remains down. Workaround: restart the pod, while ensuring the majority of REC nodes are available. </p> <h3 id="crashloopbackoff-causes-cluster-recovery-to-be-incomplete--red33713"> CrashLoopBackOff causes cluster recovery to be incomplete (RED33713) </h3> <p> When a pod's status is <code> CrashLoopBackOff </code> and we run the cluster recovery, the process will not complete. The workaround is to delete the crashing pods manually. The recovery process will then continue. </p> <h3 id="long-cluster-names-cause-routes-to-be-rejected--red25871"> Long cluster names cause routes to be rejected (RED25871) </h3> <p> A cluster name longer than 20 characters will result in a rejected route configuration because the host part of the domain name will exceed 63 characters. The workaround is to limit cluster name to 20 characters or fewer. </p> <h3 id="cluster-cr-rec-errors-are-not-reported-after-invalid-updates-red25542"> Cluster CR (REC) errors are not reported after invalid updates (RED25542) </h3> <p> A cluster CR specification error is not reported if two or more invalid CR resources are updated in sequence. </p> <h3 id="an-unreachable-cluster-has-status-running-red32805"> An unreachable cluster has status running (RED32805) </h3> <p> When a cluster is in an unreachable state, the state is still <code> running </code> instead of being reported as an error. </p> <h3 id="readiness-probe-incorrect-on-failures-red39300"> Readiness probe incorrect on failures (RED39300) </h3> <p> STS Readiness probe does not mark a node as "not ready" when running <code> rladmin status </code> on the node fails. </p> <h3 id="role-missing-on-replica-sets-red39002"> Role missing on replica sets (RED39002) </h3> <p> The <code> redis-enterprise-operator </code> role is missing permission on replica sets. </p> <h3 id="private-registries-are-not-supported-on-openshift-311-red38579"> Private registries are not supported on OpenShift 3.11 (RED38579) </h3> <p> Openshift 3.11 does not support DockerHub private registries. This is a known OpenShift issue. </p> <h3 id="internal-dns-and-kubernetes-dns-may-have-conflicts-red37462"> Internal DNS and Kubernetes DNS may have conflicts (RED37462) </h3> <p> DNS conflicts are possible between the cluster mdns_server and the K8s DNS. This only impacts DNS resolution from within cluster nodes for Kubernetes DNS names. </p> <h3 id="5410-negatively-impacts-546-red37233"> 5.4.10 negatively impacts 5.4.6 (RED37233) </h3> <p> Kubernetes-based 5.4.10 deployments seem to negatively impact existing 5.4.6 deployments that share a Kubernetes cluster. </p> <h3 id="node-cpu-usage-is-reported-instead-of-pod-cpu-usage-red36884"> Node CPU usage is reported instead of pod CPU usage (RED36884) </h3> <p> In Kubernetes, the node CPU usage we report on is the usage of the Kubernetes worker node hosting the REC pod. </p> <h3 id="clusters-must-be-named-rec-in-olm-based-deployments-red39825"> Clusters must be named "rec" in OLM-based deployments (RED39825) </h3> <p> In OLM-deployed operators, the deployment of the cluster will fail if the name is not "rec". When the operator is deployed via the OLM, the security context constraints (scc) is bound to a specific service account name (i.e., "rec"). The workaround is to name the cluster "rec". </p> <h3 id="master-pod-label-in-rancher-red42896"> Master pod label in Rancher (RED42896) </h3> <p> The master pod is not always labeled in Rancher. </p> <h3 id="rec-clusters-fail-to-start-on-kubernetes-clusters-with-unsynchronized-clocks-red47254"> REC clusters fail to start on Kubernetes clusters with unsynchronized clocks (RED47254) </h3> <p> When REC clusters are deployed on Kubernetes clusters with unsynchronized clocks, the REC cluster does not start correctly. The fix is to use NTP to synchronize the underlying K8s nodes. </p> <h3 id="deleting-an-openshift-project-with-an-rec-deployed-may-hang-red47192"> Deleting an OpenShift project with an REC deployed may hang (RED47192) </h3> <p> When a REC cluster is deployed in a project (namespace) and has REDB resources, the REDB resources must be deleted first before the REC can be deleted. As such, until the REDB resources are deleted, the project deletion will hang. The fix is to delete the REDB resources first and the REC second. Afterwards, you may delete the project. </p> <h3 id="rec-extralabels-are-not-applied-to-pvcs-on-k8s-versions-115-or-older-red51921"> REC extraLabels are not applied to PVCs on K8s versions 1.15 or older (RED51921) </h3> <p> In K8s 1.15 or older, the PVC labels come from the match selectors and not the PVC templates. As such, these versions can not support PVC labels. If this feature is required, the only fix is to upgrade the K8s cluster to a newer version. </p> <h2 id="compatability-notes"> Compatability Notes </h2> <ul> <li> OpenShift 4.7 and Rancher/kOps 1.20 are now supported </li> <li> OpenShift 4.1, 4.2, 4.3 (previously deprecated) are no longer supported </li> <li> GKE K8s version 1.14 (previously deprecated) is no longer supported </li> <li> kOps (upstream K8s) 1.13, 1.14 (previously deprecated) are no longer supported </li> </ul> <h2 id="deprecation-notice"> Deprecation notice </h2> <ul> <li> OpenShift 4.4 (no longer supported by Red Hat) is deprecated </li> <li> GKE K8s versions 1.15, 1.16 (no longer supported by Google) are deprecated </li> <li> kOps (upstream K8s) 1.15 is deprecated </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/kubernetes/release-notes/previous-releases/k8s-6-0-20-4/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/lettuce/.html
<section class="prose w-full py-12 max-w-none"> <h1> Java client for Redis </h1> <p class="text-lg -mt-5 mb-10"> Learn how to build with Redis and Java </p> <p> Connect your Java application to a Redis database using the Lettuce client library. </p> <p> Refer to the complete <a href="/docs/latest/develop/clients/lettuce/"> Lettuce guide </a> to install, connect, and use Lettuce. </p> <nav> </nav> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/lettuce/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/bootstrap/identity/.html
<section class="prose w-full py-12 max-w-none"> <h1> Identity object </h1> <p class="text-lg -mt-5 mb-10"> Documents the identity object used with Redis Enterprise Software REST API calls. </p> <table> <thead> <tr> <th> Name </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> uid </td> <td> integer </td> <td> Assumed node's UID to join cluster. Used to replace a dead node with a new one. </td> </tr> <tr> <td> accept_servers </td> <td> boolean (default: true) </td> <td> If true, no shards will be created on the node </td> </tr> <tr> <td> addr </td> <td> string </td> <td> Internal IP address of node </td> </tr> <tr> <td> external_addr </td> <td> complex object </td> <td> External IP addresses of node. <code> GET </code> <code> /jsonschema </code> to retrieve the object's structure. </td> </tr> <tr> <td> name </td> <td> string </td> <td> Node's name </td> </tr> <tr> <td> override_rack_id </td> <td> boolean </td> <td> When replacing an existing node in a rack-aware cluster, allows the new node to be located in a different rack </td> </tr> <tr> <td> rack_id </td> <td> string </td> <td> Rack ID, overrides cloud config </td> </tr> <tr> <td> use_internal_ipv6 </td> <td> boolean (default: false) </td> <td> Node uses IPv6 for internal communication </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/bootstrap/identity/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/develop/clients/php/connect/.html
<section class="prose w-full py-12"> <h1> Connect to the server </h1> <p class="text-lg -mt-5 mb-10"> Connect your PHP application to a Redis database </p> <h2 id="basic-connection"> Basic connection </h2> <p> Connect to a locally-running server on the standard port (6379) with the following code: </p> <div class="highlight"> <pre class="chroma"><code class="language-php" data-lang="php"><span class="line"><span class="cl"><span class="o">&lt;?</span><span class="nx">php</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">require</span> <span class="s1">'vendor/autoload.php'</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">use</span> <span class="nx">Predis\Client</span> <span class="k">as</span> <span class="nx">PredisClient</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nv">$r</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PredisClient</span><span class="p">();</span> </span></span></code></pre> </div> <p> Store and retrieve a simple string to test the connection: </p> <div class="highlight"> <pre class="chroma"><code class="language-php" data-lang="php"><span class="line"><span class="cl"><span class="k">echo</span> <span class="nv">$r</span><span class="o">-&gt;</span><span class="na">set</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">,</span> <span class="s1">'bar'</span><span class="p">),</span> <span class="nx">PHP_EOL</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="c1">// &gt;&gt;&gt; OK </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="k">echo</span> <span class="nv">$r</span><span class="o">-&gt;</span><span class="na">get</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">),</span> <span class="nx">PHP_EOL</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="c1">// &gt;&gt;&gt; bar </span></span></span></code></pre> </div> <p> Store and retrieve a <a href="/docs/latest/develop/data-types/hashes/"> hash </a> object: </p> <div class="highlight"> <pre class="chroma"><code class="language-php" data-lang="php"><span class="line"><span class="cl"><span class="nv">$r</span><span class="o">-&gt;</span><span class="na">hset</span><span class="p">(</span><span class="s1">'user-session:123'</span><span class="p">,</span> <span class="s1">'name'</span><span class="p">,</span> <span class="s1">'John'</span><span class="p">);</span> </span></span><span class="line"><span class="cl"><span class="nv">$r</span><span class="o">-&gt;</span><span class="na">hset</span><span class="p">(</span><span class="s1">'user-session:123'</span><span class="p">,</span> <span class="s1">'surname'</span><span class="p">,</span> <span class="s1">'Smith'</span><span class="p">);</span> </span></span><span class="line"><span class="cl"><span class="nv">$r</span><span class="o">-&gt;</span><span class="na">hset</span><span class="p">(</span><span class="s1">'user-session:123'</span><span class="p">,</span> <span class="s1">'company'</span><span class="p">,</span> <span class="s1">'Redis'</span><span class="p">);</span> </span></span><span class="line"><span class="cl"><span class="nv">$r</span><span class="o">-&gt;</span><span class="na">hset</span><span class="p">(</span><span class="s1">'user-session:123'</span><span class="p">,</span> <span class="s1">'age'</span><span class="p">,</span> <span class="mi">29</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">echo</span> <span class="nx">var_export</span><span class="p">(</span><span class="nv">$r</span><span class="o">-&gt;</span><span class="na">hgetall</span><span class="p">(</span><span class="s1">'user-session:123'</span><span class="p">)),</span> <span class="nx">PHP_EOL</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="cm">/* &gt;&gt;&gt; </span></span></span><span class="line"><span class="cl"><span class="cm">array ( </span></span></span><span class="line"><span class="cl"><span class="cm"> 'name' =&gt; 'John', </span></span></span><span class="line"><span class="cl"><span class="cm"> 'surname' =&gt; 'Smith', </span></span></span><span class="line"><span class="cl"><span class="cm"> 'company' =&gt; 'Redis', </span></span></span><span class="line"><span class="cl"><span class="cm"> 'age' =&gt; '29', </span></span></span><span class="line"><span class="cl"><span class="cm">) </span></span></span><span class="line"><span class="cl"><span class="cm">*/</span> </span></span></code></pre> </div> <h2 id="connect-to-a-redis-cluster"> Connect to a Redis cluster </h2> <p> To connect to a Redis cluster, specify one or more of the nodes in the <code> clusterNodes </code> parameter and set <code> 'cluster'=&gt;'redis' </code> in <code> options </code> : </p> <div class="highlight"> <pre class="chroma"><code class="language-php" data-lang="php"><span class="line"><span class="cl"><span class="nv">$clusterNodes</span> <span class="o">=</span> <span class="p">[</span> </span></span><span class="line"><span class="cl"> <span class="s1">'tcp://127.0.0.1:30001'</span><span class="p">,</span> <span class="c1">// Node 1 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="s1">'tcp://127.0.0.1:30002'</span><span class="p">,</span> <span class="c1">// Node 2 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="s1">'tcp://127.0.0.1:30003'</span><span class="p">,</span> <span class="c1">// Node 3 </span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="p">];</span> </span></span><span class="line"><span class="cl"><span class="nv">$options</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'cluster'</span> <span class="o">=&gt;</span> <span class="s1">'redis'</span><span class="p">];</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1">// Create a Predis client for the cluster </span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="nv">$rc</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PredisClient</span><span class="p">(</span><span class="nv">$clusterNodes</span><span class="p">,</span> <span class="nv">$options</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">echo</span> <span class="nv">$rc</span><span class="o">-&gt;</span><span class="na">cluster</span><span class="p">(</span><span class="s1">'nodes'</span><span class="p">),</span> <span class="nx">PHP_EOL</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="cm">/* &gt;&gt;&gt; </span></span></span><span class="line"><span class="cl"><span class="cm">d8773e888e92d015b7c52fc66798fd6815afefec 127.0.0.1:30004@40004 slave cde97d1f7dce13e9253ace5cafd3fb0aa67cda63 0 1730713764217 1 connected </span></span></span><span class="line"><span class="cl"><span class="cm">58fe1346de4c425d60db24e9b153926fbde0d174 127.0.0.1:30002@40002 master - 0 1730713763361 2 connected 5461-10922 </span></span></span><span class="line"><span class="cl"><span class="cm">015ecc8148a05377dda22f19921d16efcdd6d678 127.0.0.1:30006@40006 slave c019b75d8b52e83e7e52724eccc716ac553f71d6 0 1730713764218 3 connected </span></span></span><span class="line"><span class="cl"><span class="cm">aca365963a72642e6ae0c9503aabf3be5c260806 127.0.0.1:30005@40005 slave 58fe1346de4c425d60db24e9b153926fbde0d174 0 1730713763363 2 connected </span></span></span><span class="line"><span class="cl"><span class="cm">c019b75d8b52e83e7e52724eccc716ac553f71d6 127.0.0.1:30003@40003 myself,master - 0 1730713764000 3 connected 10923-16383 </span></span></span><span class="line"><span class="cl"><span class="cm">cde97d1f7dce13e9253ace5cafd3fb0aa67cda63 127.0.0.1:30001@40001 master - 0 1730713764113 1 connected 0-5460 </span></span></span><span class="line"><span class="cl"><span class="cm">*/</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">echo</span> <span class="nv">$rc</span><span class="o">-&gt;</span><span class="na">set</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">,</span> <span class="s1">'bar'</span><span class="p">),</span> <span class="nx">PHP_EOL</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="c1">// &gt;&gt;&gt; OK </span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">echo</span> <span class="nv">$rc</span><span class="o">-&gt;</span><span class="na">get</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">),</span> <span class="nx">PHP_EOL</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="c1">// &gt;&gt;&gt; bar </span></span></span></code></pre> </div> <h2 id="connect-to-your-production-redis-with-tls"> Connect to your production Redis with TLS </h2> <p> When you deploy your application, use TLS and follow the <a href="/docs/latest/operate/oss_and_stack/management/security/"> Redis security </a> guidelines. </p> <p> Use the following commands to generate the client certificate and private key: </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">openssl genrsa -out redis_user_private.key <span class="m">2048</span> </span></span><span class="line"><span class="cl">openssl req -new -key redis_user_private.key -out redis_user.csr </span></span><span class="line"><span class="cl">openssl x509 -req -days <span class="m">365</span> -in redis_user.csr -signkey redis_user_private.key -out redis_user.crt </span></span></code></pre> </div> <p> If you have the <a href="https://github.com/redis/redis"> Redis source folder </a> available, you can also generate the certificate and private key with these commands: </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">./utils/gen-test-certs.sh </span></span><span class="line"><span class="cl">./src/redis-server --tls-port <span class="m">6380</span> --port <span class="m">0</span> --tls-cert-file ./tests/tls/redis.crt --tls-key-file ./tests/tls/redis.key --tls-ca-cert-file ./tests/tls/ca.crt </span></span></code></pre> </div> <p> Pass this information during connection using the <code> ssl </code> section of <code> options </code> : </p> <div class="highlight"> <pre class="chroma"><code class="language-php" data-lang="php"><span class="line"><span class="cl"><span class="nv">$options</span> <span class="o">=</span> <span class="p">[</span> </span></span><span class="line"><span class="cl"> <span class="s1">'scheme'</span> <span class="o">=&gt;</span> <span class="s1">'tls'</span><span class="p">,</span> <span class="c1">// Use 'tls' for SSL connections </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="s1">'host'</span> <span class="o">=&gt;</span> <span class="s1">'127.0.0.1'</span><span class="p">,</span> <span class="c1">// Redis server hostname </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="s1">'port'</span> <span class="o">=&gt;</span> <span class="mi">6379</span><span class="p">,</span> <span class="c1">// Redis server port </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="s1">'username'</span> <span class="o">=&gt;</span> <span class="s1">'default'</span><span class="p">,</span> <span class="c1">// Redis username </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="s1">'password'</span> <span class="o">=&gt;</span> <span class="s1">''</span><span class="p">,</span> <span class="c1">// Redis password </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="s1">'options'</span> <span class="o">=&gt;</span> <span class="p">[</span> </span></span><span class="line"><span class="cl"> <span class="s1">'ssl'</span> <span class="o">=&gt;</span> <span class="p">[</span> </span></span><span class="line"><span class="cl"> <span class="s1">'verify_peer'</span> <span class="o">=&gt;</span> <span class="k">true</span><span class="p">,</span> <span class="c1">// Verify the server's SSL certificate </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="s1">'cafile'</span> <span class="o">=&gt;</span> <span class="s1">'./redis_ca.pem'</span><span class="p">,</span> <span class="c1">// Path to CA certificate </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="s1">'local_cert'</span> <span class="o">=&gt;</span> <span class="s1">'./redis_user.crt'</span><span class="p">,</span> <span class="c1">// Path to client certificate </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="s1">'local_pk'</span> <span class="o">=&gt;</span> <span class="s1">'./redis_user_private.key'</span><span class="p">,</span> <span class="c1">// Path to client private key </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="p">],</span> </span></span><span class="line"><span class="cl"> <span class="p">],</span> </span></span><span class="line"><span class="cl"><span class="p">];</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nv">$tlsConnection</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PredisClient</span><span class="p">(</span><span class="nv">$options</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">echo</span> <span class="nv">$tlsConnection</span><span class="o">-&gt;</span><span class="na">set</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">,</span> <span class="s1">'bar'</span><span class="p">),</span> <span class="nx">PHP_EOL</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="c1">// &gt;&gt;&gt; OK </span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">echo</span> <span class="nv">$tlsConnection</span><span class="o">-&gt;</span><span class="na">get</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">),</span> <span class="nx">PHP_EOL</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="c1">// &gt;&gt;&gt; bar </span></span></span></code></pre> </div> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/develop/clients/php/connect/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/ldap_mapping/.html
<section class="prose w-full py-12 max-w-none"> <h1> LDAP mapping object </h1> <p class="text-lg -mt-5 mb-10"> An object that represents a mapping between an LDAP group and roles </p> <p> An API object that represents an <a href="/docs/latest/operate/rs/7.4/security/access-control/ldap/map-ldap-groups-to-roles/"> LDAP mapping </a> between an LDAP group and <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/role/"> roles </a> . </p> <table> <thead> <tr> <th> Name </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> uid </td> <td> integer </td> <td> LDAP mapping's unique ID </td> </tr> <tr> <td> account_id </td> <td> integer </td> <td> SM account ID </td> </tr> <tr> <td> action_uid </td> <td> string </td> <td> Action UID. If it exists, progress can be tracked by the <code> GET </code> <code> /actions/{uid} </code> API (read-only) </td> </tr> <tr> <td> bdbs_email_alerts </td> <td> complex object </td> <td> UIDs of databases that associated email addresses will receive alerts for </td> </tr> <tr> <td> cluster_email_alerts </td> <td> boolean </td> <td> Activate cluster email alerts for an associated email </td> </tr> <tr> <td> dn </td> <td> string </td> <td> An LDAP group's distinguished name </td> </tr> <tr> <td> email </td> <td> string </td> <td> Email address used for alerts (if set) </td> </tr> <tr> <td> email_alerts </td> <td> boolean (default: true) </td> <td> Activate email alerts for an associated email </td> </tr> <tr> <td> name </td> <td> string </td> <td> Role's name </td> </tr> <tr> <td> role_uids </td> <td> array of integers </td> <td> List of role UIDs associated with the LDAP group </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/ldap_mapping/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/develop/interact/search-and-query/administration/design.html
<section class="prose w-full py-12"> <h1> Internal design </h1> <p class="text-lg -mt-5 mb-10"> Details about design choices and implementations </p> <p> Redis Stack implements inverted indexes on top of Redis, but unlike previous implementations of Redis inverted indexes, it uses a custom data encoding that allows more memory and CPU efficient searches, and more advanced search features. </p> <p> This document details some of the design choices and how these features are implemented. </p> <h2 id="intro-redis-string-dma"> Intro: Redis String DMA </h2> <p> The main feature that this module takes advantage of is Redis Modules Strings Direct Memory Access (DMA). </p> <p> This feature is simple, yet very powerful. It allows modules to allocate data on Redis string keys, and then get direct pointers to the data allocated by the keys without copying or serializing. </p> <p> This allows very fast access to huge amounts of memory. From the module's perspective, the string value is exposed simply as <code> char * </code> , meaning it can be cast to any data structure. </p> <p> You simply call <code> RedisModule_StringTruncate </code> to resize a memory chunk to the size needed. Then you call <code> RedisModule_StringDMA </code> to get direct access to the memory in that key. See <a href="https://github.com/RedisLabs/RedisModulesSDK/blob/master/FUNCTIONS.md#redismodule_stringdma"> https://github.com/RedisLabs/RedisModulesSDK/blob/master/FUNCTIONS.md#redismodule_stringdma </a> </p> <p> This API is used in the module mainly to encode inverted indexes, and also for other auxiliary data structures. </p> <p> A generic "Buffer" implementation using DMA strings can be found in <a href="https://github.com/RediSearch/RediSearch/blob/master/src/buffer.c"> buffer.c </a> . It automatically resizes the Redis string it uses as raw memory when the capacity needs to grow. </p> <h2 id="inverted-index-encoding"> Inverted index encoding </h2> <p> An <a href="https://en.wikipedia.org/wiki/Inverted_index"> inverted index </a> is the data structure at the heart of all search engines. The idea is simple. For each word or search term, a list of all the documents it appears in is kept. Other data is kept as well, such as term frequency, and the offsets where a term appeared in the document. Offsets are used for exact match type searches, or for ranking of results. </p> <p> When a search is performed, either a single index is traversed, or the intersection or union of two or more indexes is traversed. Classic Redis implementations of search engines use sorted sets as inverted indexes. This works but has significant memory overhead, and it also does not allow for encoding of offsets, as explained above. </p> <p> Redis Stack uses string DMA (see above) to efficiently encode inverted indexes. It combines <a href="https://en.wikipedia.org/wiki/Delta_encoding"> delta encoding </a> and <a href="https://developers.google.com/protocol-buffers/docs/encoding#varints"> varint encoding </a> to encode entries, minimizing space used for indexes, while keeping decompression and traversal efficient. </p> <p> For each hit (document/word entry), the following items are encoded: </p> <ul> <li> The document ID as a delta from the previous document. </li> <li> The term frequency, factored by the document's rank (see below). </li> <li> Flags, that can be used to filter only specific fields or other user-defined properties. </li> <li> An offset vector of all the document offsets of the word. </li> </ul> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> Document IDs as entered by the user are converted to internal incremental document IDs, that allow delta encoding to be efficient and let the inverted indexes be sorted by document ID. </div> </div> <p> This allows for a single index hit entry to be encoded in as little as 6 bytes. Note: this is the best case. Depending on the number of occurrences of the word in the document, this can get much higher. </p> <p> To optimize searches, two additional auxiliary data structures are kept in different DMA string keys: </p> <ol> <li> <strong> Skip index </strong> : a table of the index offset of 1/50th of the index entries. This allows faster lookup when intersecting inverted indexes, as the entire list doesn't need to be traversed. </li> <li> <strong> Score index </strong> : In simple single-word searches, there is no real need to traverse all the results, just the top N results the user is interested in. So an auxiliary index of the top 20 or so entries is stored for each term, which are used when applicable. </li> </ol> <h2 id="document-and-result-ranking"> Document and result ranking </h2> <p> Each document entered to the engine has a <a href="https://en.wikipedia.org/wiki/Tf%E2%80%93idf"> TF-IDF </a> scoring of each word to rank the results. </p> <p> As an optimization, each inverted index hit is encoded with <code> TF * Document_rank </code> as its score, and only IDF is applied during searches. This may change in the future. </p> <p> On top of that, in the case of intersection queries, the minimal distance between the terms in the query is factored into the ranking. The closest the terms are to each other, the better the result. </p> <p> When searching, priority queue of the top N results requested is maintained, which are eventually returned, sorted by rank. </p> <h2 id="index-ppecs-and-field-weights"> Index ppecs and field weights </h2> <p> When creating an "index" using <a href="/docs/latest/commands/ft.create/"> <code> FT.CREATE </code> </a> , the user specifies the fields to be indexed and their respective weights. This can be used to give some document fields, like a title, more weight in ranking results. </p> <p> For example: </p> <pre tabindex="0"><code>FT.CREATE my_index title 10.0 body 1.0 url 2.0 </code></pre> <p> will create an index on fields named title, body, and url, with scores of 10, 1, and 2 respectively. </p> <p> When documents are indexed, the weights are taken from the saved <em> index Spec </em> that is stored in a special Redis key, and only fields that appear in this spec are indexed. </p> <h2 id="query-execution-engine"> Query execution engine </h2> <p> A chained-iterator based approach is used as part of query execution, which is similar to <a href="https://wiki.python.org/moin/Generators"> Python generators </a> in concept. </p> <p> Iterators that yield index hits are chained together. Those can be: </p> <ol> <li> <strong> Read Iterators </strong> , reading hits one by one from an inverted index. For example, <code> hello </code> . </li> <li> <strong> Intersect Iterators </strong> , aggregating two or more iterators, yielding only their intersection points. For example, <code> hello AND world </code> . </li> <li> <strong> Exact Intersect Iterators </strong> - same as above, but yielding results only if the intersection is an exact phrase. For example, <code> hello NEAR world </code> . </li> <li> <strong> Union Iterators </strong> - combining two or more iterators, and yielding a union of their hits. For example, <code> hello OR world </code> . </li> </ol> <p> These are combined based on the query as an execution plan that is evaluated lazily. For example: </p> <pre tabindex="0"><code>hello ==&gt; read("hello") hello world ==&gt; intersect( read("hello"), read("world") ) "hello world" ==&gt; exact_intersect( read("hello"), read("world") ) "hello world" foo ==&gt; intersect( exact_intersect( read("hello"), read("world") ), read("foo") ) </code></pre> <p> All these iterators are lazily evaluated, entry by entry, with constant memory overhead. </p> <p> The root iterator is read by the query execution engine and filtered for the top N results contained in it. </p> <h2 id="numeric-filters"> Numeric filters </h2> <p> It's possible to define a field in the index schema as <code> NUMERIC </code> , meaning you will be able to limit search results only to those where the given value falls within a specific range. Filtering is done by adding <code> FILTER </code> predicates (more than one is supported) to your query. For example: </p> <pre tabindex="0"><code>FT.SEARCH products "hd tv" FILTER price 100 (300 </code></pre> <p> The filter syntax follows the ZRANGEBYSCORE semantics of Redis, meaning <code> -inf </code> and <code> +inf </code> are supported, and prepending <code> ( </code> to a number means an exclusive range. </p> <p> As of release 0.6, the implementation uses a multi-level range tree, saving ranges at multiple resolutions to allow efficient range scanning. Adding numeric filters can accelerate slow queries if the numeric range is small relative to the entire span of the filtered field. For example, a filter on dates focusing on a few days out of years of data can speed a heavy query by an order of magnitude. </p> <h2 id="auto-complete-and-fuzzy-suggestions"> Auto-complete and fuzzy suggestions </h2> <p> Another important feature for searching and querying is auto-completion or suggestion. It allows you to create dictionaries of weighted terms, and then query them for completion suggestions to a given user prefix. For example, if you put the term “lcd tv” into a dictionary, sending the prefix “lc” will return it as a result. The dictionary is modeled as a compressed trie (prefix tree) with weights, that is traversed to find the top suffixes of a prefix. </p> <p> Redis Stack also allows for fuzzy suggestions, meaning you can get suggestions to user prefixes even if the user has a typo in the prefix. This is enabled using a Levenshtein automaton, allowing efficient searching of a dictionary for all terms within a maximal Levenshtein distance of a term or prefix. Suggestions are weighted based on both their original score and their distance from a prefix typed by the user. Only suggestions where the prefix is up to one Levenshtein distance away from the typed prefix are supported for performance reasons. </p> <p> However, since searching for fuzzy prefixes, especially very short ones, will traverse an enormous amount of suggestions (in fact, fuzzy suggestions for any single letter will traverse the entire dictionary!), it is recommended that you use this feature carefully, and only when considering the performance penalty it incurs. Since Redis is single threaded, blocking it for any amount of time means no other queries can be processed at that time. </p> <p> To support unicode fuzzy matching, 16-bit runes are used inside the trie and not bytes. This increases memory consumption if the text is purely ASCII, but allows completion with the same level of support to all modern languages. This is done in the following manner: </p> <ol> <li> Assume all input to <code> FT.SUG* </code> commands is valid UTF-8. </li> <li> Input strings are converted to 32-bit Unicode, optionally normalizing, case-folding, and removing accents on the way. If the conversion fails it's because the input is not valid UTF-8. </li> <li> The 32-bit runes are trimmed to 16-bit runes using the lower 16 bits. These can be used for insertion, deletion, and search. </li> <li> The output of searches is converted back to UTF-8. </li> </ol> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/develop/interact/search-and-query/administration/design/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/amazon-bedrock/create-agent/.html
<section class="prose w-full py-12 max-w-none"> <h1> Create a Bedrock agent </h1> <p class="text-lg -mt-5 mb-10"> Shows how to set up your Agent in Amazon Bedrock. </p> <p> After you have <a href="/docs/latest/integrate/amazon-bedrock/create-knowledge-base/"> created a knowledge base </a> , you can use it to create an agent on Amazon Bedrock. </p> <p> Before you begin this guide, you will need: </p> <ul> <li> <p> An <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html"> AWS IAM Role </a> with <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html"> permissions for the Bedrock agent </a> . </p> </li> <li> <p> A <a href="/docs/latest/integrate/amazon-bedrock/create-knowledge-base/"> Bedrock knowledge base </a> connected to a <a href="/docs/latest/integrate/amazon-bedrock/set-up-redis/"> Redis Cloud vector database </a> . </p> </li> </ul> <h2 id="create-an-agent"> Create an agent </h2> <ol> <li> <p> Sign in to the <a href="https://console.aws.amazon.com/"> AWS console </a> . </p> </li> <li> <p> Use the <strong> Services </strong> menu to locate and select <strong> Machine Learning </strong> &gt; <strong> Amazon Bedrock </strong> . This takes you to the Amazon Bedrock admin panel. </p> </li> <li> <p> Select <strong> Agents </strong> &gt; <strong> Create Agent </strong> to create your knowledge base. </p> <a href="/docs/latest/images/rc/bedrock-aws-button-create-agent.png" sdata-lightbox="/images/rc/bedrock-aws-button-create-agent.png"> <img alt="The Create Agent button." src="/docs/latest/images/rc/bedrock-aws-button-create-agent.png" width="150px"/> </a> </li> <li> <p> In the <strong> Agent name </strong> section, enter a name and description for your agent. </p> </li> <li> <p> Select whether or not you want the agent to be able to ask for additional information in the <strong> User input </strong> section. </p> </li> <li> <p> Select the IAM role for the Bedrock agent in the <strong> IAM Permissions </strong> section. </p> </li> <li> <p> Choose how long you want your idle session timeout to be in the <strong> Idle session timeout </strong> section. Select <strong> Next </strong> to continue. </p> </li> <li> <p> In the <strong> Model details </strong> section, choose which model you want to use and enter the instructions for your agent. Select <strong> Next </strong> to continue. </p> </li> <li> <p> In the <strong> Action groups </strong> section, you may specify any tasks you would like the agent to perform. Select <strong> Next </strong> to continue. </p> </li> <li> <p> Select the <a href="#create-a-knowledge-base"> knowledge base </a> you created and summarize the information in the knowledge base in the <strong> Knowledge base instructions for Agent </strong> form. Select <strong> Add another knowledge base </strong> if you would like to add multiple knowledge bases. </p> <a href="/docs/latest/images/rc/bedrock-aws-button-add-knowledge-base.png" sdata-lightbox="/images/rc/bedrock-aws-button-add-knowledge-base.png"> <img alt="The Add another knowledge base button." src="/docs/latest/images/rc/bedrock-aws-button-add-knowledge-base.png" width="400px"/> </a> <p> Select <strong> Next </strong> to continue. </p> </li> <li> <p> Review your agent before you create it. Select <strong> Create Agent </strong> to finish creation. </p> <a href="/docs/latest/images/rc/bedrock-aws-button-create-agent.png" sdata-lightbox="/images/rc/bedrock-aws-button-create-agent.png"> <img alt="The Create Agent button." src="/docs/latest/images/rc/bedrock-aws-button-create-agent.png" width="150px"/> </a> </li> </ol> <p> Amazon Bedrock will create your agent and link it to your knowledge base. This will take some time. </p> <p> Your agent will have a status of <strong> Ready </strong> when it is ready to be tested. </p> <a href="/docs/latest/images/rc/bedrock-aws-status-agent-ready.png" sdata-lightbox="/images/rc/bedrock-aws-status-agent-ready.png"> <img alt="A Bedrock agent with a Ready status." src="/docs/latest/images/rc/bedrock-aws-status-agent-ready.png" width="75%"/> </a> <p> Select the name of your agent to view the versions and draft aliases of your agent. You can also test your agent by entering prompts in the <strong> Enter your message here </strong> field. </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/amazon-bedrock/create-agent/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/security/access-control/create-users/.html
<section class="prose w-full py-12 max-w-none"> <h1> Create users </h1> <p class="text-lg -mt-5 mb-10"> Create users and assign access control roles. </p> <h2 id="prerequisites"> Prerequisites </h2> <p> Before you create other users: </p> <ol> <li> <p> Review the <a href="/docs/latest/operate/rs/7.4/security/access-control/"> access control overview </a> to learn how to use role-based access control (RBAC) to manage users' cluster access and database access. </p> </li> <li> <p> Create roles you can assign to users. See <a href="/docs/latest/operate/rs/7.4/security/access-control/create-cluster-roles/"> Create roles with cluster access only </a> , <a href="/docs/latest/operate/rs/7.4/security/access-control/create-db-roles/"> Create roles with database access only </a> , or <a href="/docs/latest/operate/rs/7.4/security/access-control/create-combined-roles/"> Create roles with combined access </a> for instructions. </p> </li> </ol> <h2 id="add-users"> Add users </h2> <p> To add a user to the cluster: </p> <ol> <li> <p> From the <strong> Access Control &gt; Users </strong> tab in the Cluster Manager UI, select <strong> + Add user </strong> . </p> <a href="/docs/latest/images/rs/access-control-user-panel.png" sdata-lightbox="/images/rs/access-control-user-panel.png"> <img alt="Add role with name" src="/docs/latest/images/rs/access-control-user-panel.png"/> </a> </li> <li> <p> Enter the name, email, and password of the new user. </p> <a href="/docs/latest/images/rs/access-control-user-add.png" sdata-lightbox="/images/rs/access-control-user-add.png"> <img alt="Add role with name" src="/docs/latest/images/rs/access-control-user-add.png"/> </a> </li> <li> <p> Assign a <strong> Role </strong> to the user to grant permissions for cluster management and data access. </p> <a href="/docs/latest/images/rs/access-control-user-role-select.png" sdata-lightbox="/images/rs/access-control-user-role-select.png"> <img alt="Add role to user." src="/docs/latest/images/rs/access-control-user-role-select.png" width="300px"/> </a> </li> <li> <p> Select the <strong> Alerts </strong> the user should receive by email: </p> <ul> <li> <p> <strong> Receive alerts for databases </strong> - The alerts that are enabled for the selected databases will be sent to the user. Choose <strong> All databases </strong> or <strong> Customize </strong> to select the individual databases to send alerts for. </p> </li> <li> <p> <strong> Receive cluster alerts </strong> - The alerts that are enabled for the cluster in <strong> Cluster &gt; Alerts Settings </strong> are sent to the user. </p> </li> </ul> </li> <li> <p> Select <strong> Save </strong> . </p> </li> </ol> <h2 id="assign-roles-to-users"> Assign roles to users </h2> <p> Assign a role, associated with specific databases and access control lists (ACLs), to a user to grant database access: </p> <ol> <li> <p> From the <strong> Access Control &gt; Users </strong> tab in the Cluster Manager UI, you can: </p> <ul> <li> <p> Point to an existing user and select <a href="/docs/latest/images/rs/buttons/edit-button.png#no-click" sdata-lightbox="/images/rs/buttons/edit-button.png#no-click"> <img alt="The Edit button" class="inline" src="/docs/latest/images/rs/buttons/edit-button.png#no-click" width="25px"/> </a> to edit the user. </p> </li> <li> <p> Select <strong> + Add user </strong> to <a href="/docs/latest/operate/rs/7.4/security/access-control/create-users/"> create a new user </a> . </p> </li> </ul> </li> <li> <p> Select a role to assign to the user. </p> <a href="/docs/latest/images/rs/access-control-user-role-select.png" sdata-lightbox="/images/rs/access-control-user-role-select.png"> <img alt="Add role to user." src="/docs/latest/images/rs/access-control-user-role-select.png" width="300px"/> </a> </li> <li> <p> Select <strong> Save </strong> . </p> </li> </ol> <h2 id="next-steps"> Next steps </h2> <p> Depending on the type of the user's assigned role (cluster management role or data access role), the user can now: </p> <ul> <li> <p> <a href="/docs/latest/operate/rs/7.4/databases/connect/"> Connect to a database </a> associated with the role and run limited Redis commands, depending on the role's Redis ACLs. </p> </li> <li> <p> Sign in to the Redis Enterprise Software Cluster Manager UI. </p> </li> <li> <p> Make a <a href="/docs/latest/operate/rs/7.4/references/rest-api/"> REST API </a> request. </p> </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/security/access-control/create-users/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/references/rest-api/requests/suffix/.html
<section class="prose w-full py-12 max-w-none"> <h1> Suffix requests </h1> <p class="text-lg -mt-5 mb-10"> DNS suffix requests </p> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#get-suffix"> GET </a> </td> <td> <code> /v1/suffix/{name} </code> </td> <td> Get a single DNS suffix </td> </tr> </tbody> </table> <h2 id="get-suffix"> Get suffix </h2> <pre><code>GET /v1/suffix/{string: name} </code></pre> <p> Get a single DNS suffix. </p> <h3 id="get-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <pre><code>GET /suffix/cluster.fqdn </code></pre> <h4 id="request-headers"> Request headers </h4> <table> <thead> <tr> <th> Key </th> <th> Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> Host </td> <td> cnm.cluster.fqdn </td> <td> Domain name </td> </tr> <tr> <td> Accept </td> <td> application/json </td> <td> Accepted media type </td> </tr> </tbody> </table> <h4 id="url-parameters"> URL parameters </h4> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> name </td> <td> string </td> <td> The unique name of the suffix requested. </td> </tr> </tbody> </table> <h3 id="get-response"> Response </h3> <p> Returns a <a href="/docs/latest/operate/rs/references/rest-api/objects/suffix/"> suffix object </a> . </p> <h4 id="example-json-body"> Example JSON body </h4> <div class="highlight"> <pre class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"name"</span><span class="p">:</span> <span class="s2">"cluster.fqdn"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"// additional fields..."</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="get-status-codes"> Status codes </h3> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1"> 200 OK </a> </td> <td> No error </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5"> 404 Not Found </a> </td> <td> Suffix name does not exist </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/references/rest-api/requests/suffix/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/fcall/.html
<section class="prose w-full py-12"> <h1 class="command-name"> FCALL </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">FCALL function numkeys [key [key ...]] [arg [arg ...]]</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 7.0.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> Depends on the function that is executed. </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> <code> @scripting </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Invoke a function. </p> <p> Functions are loaded to the server with the <a href="/docs/latest/commands/function-load/"> <code> FUNCTION LOAD </code> </a> command. The first argument is the name of a loaded function. </p> <p> The second argument is the number of input key name arguments, followed by all the keys accessed by the function. In Lua, these names of input keys are available to the function as a table that is the callback's first argument. </p> <p> <strong> Important: </strong> To ensure the correct execution of functions, both in standalone and clustered deployments, all names of keys that a function accesses must be explicitly provided as input key arguments. The function <strong> should only </strong> access keys whose names are given as input arguments. Functions <strong> should never </strong> access keys with programmatically-generated names or based on the contents of data structures stored in the database. </p> <p> Any additional input argument <strong> should not </strong> represent names of keys. These are regular arguments and are passed in a Lua table as the callback's second argument. </p> <p> For more information please refer to the <a href="/docs/latest/develop/interact/programmability/"> Redis Programmability </a> and <a href="/docs/latest/develop/interact/programmability/functions-intro/"> Introduction to Redis Functions </a> pages. </p> <h2 id="examples"> Examples </h2> <p> The following example will create a library named <code> mylib </code> with a single function, <code> myfunc </code> , that returns the first argument it gets. </p> <pre tabindex="0"><code>redis&gt; FUNCTION LOAD "#!lua name=mylib \n redis.register_function('myfunc', function(keys, args) return args[1] end)" "mylib" redis&gt; FCALL myfunc 0 hello "hello" </code></pre> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> The return value depends on the function that was executed. <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/fcall/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/oss_and_stack/reference/internals/internals-sds/.html
<section class="prose w-full py-12 max-w-none"> <h1> String internals </h1> <p class="text-lg -mt-5 mb-10"> Guide to the original implementation of Redis strings </p> <p> <strong> Note: this document was written by the creator of Redis, Salvatore Sanfilippo, early in the development of Redis (c. 2010). Virtual Memory has been deprecated since Redis 2.6, so this documentation is here only for historical interest. </strong> </p> <p> The implementation of Redis strings is contained in <code> sds.c </code> ( <code> sds </code> stands for Simple Dynamic Strings). The implementation is available as a standalone library at <a href="https://github.com/antirez/sds"> https://github.com/antirez/sds </a> . </p> <p> The C structure <code> sdshdr </code> declared in <code> sds.h </code> represents a Redis string: </p> <pre><code>struct sdshdr { long len; long free; char buf[]; }; </code></pre> <p> The <code> buf </code> character array stores the actual string. </p> <p> The <code> len </code> field stores the length of <code> buf </code> . This makes obtaining the length of a Redis string an O(1) operation. </p> <p> The <code> free </code> field stores the number of additional bytes available for use. </p> <p> Together the <code> len </code> and <code> free </code> field can be thought of as holding the metadata of the <code> buf </code> character array. </p> <h2 id="creating-redis-strings"> Creating Redis Strings </h2> <p> A new data type named <code> sds </code> is defined in <code> sds.h </code> to be a synonym for a character pointer: </p> <pre><code>typedef char *sds; </code></pre> <p> <code> sdsnewlen </code> function defined in <code> sds.c </code> creates a new Redis String: </p> <pre><code>sds sdsnewlen(const void *init, size_t initlen) { struct sdshdr *sh; sh = zmalloc(sizeof(struct sdshdr)+initlen+1); #ifdef SDS_ABORT_ON_OOM if (sh == NULL) sdsOomAbort(); #else if (sh == NULL) return NULL; #endif sh-&gt;len = initlen; sh-&gt;free = 0; if (initlen) { if (init) memcpy(sh-&gt;buf, init, initlen); else memset(sh-&gt;buf,0,initlen); } sh-&gt;buf[initlen] = '\0'; return (char*)sh-&gt;buf; } </code></pre> <p> Remember a Redis string is a variable of type <code> struct sdshdr </code> . But <code> sdsnewlen </code> returns a character pointer!! </p> <p> That's a trick and needs some explanation. </p> <p> Suppose I create a Redis string using <code> sdsnewlen </code> like below: </p> <pre><code>sdsnewlen("redis", 5); </code></pre> <p> This creates a new variable of type <code> struct sdshdr </code> allocating memory for <code> len </code> and <code> free </code> fields as well as for the <code> buf </code> character array. </p> <pre><code>sh = zmalloc(sizeof(struct sdshdr)+initlen+1); // initlen is length of init argument. </code></pre> <p> After <code> sdsnewlen </code> successfully creates a Redis string the result is something like: </p> <pre><code>----------- |5|0|redis| ----------- ^ ^ sh sh-&gt;buf </code></pre> <p> <code> sdsnewlen </code> returns <code> sh-&gt;buf </code> to the caller. </p> <p> What do you do if you need to free the Redis string pointed by <code> sh </code> ? </p> <p> You want the pointer <code> sh </code> but you only have the pointer <code> sh-&gt;buf </code> . </p> <p> Can you get the pointer <code> sh </code> from <code> sh-&gt;buf </code> ? </p> <p> Yes. Pointer arithmetic. Notice from the above ASCII art that if you subtract the size of two longs from <code> sh-&gt;buf </code> you get the pointer <code> sh </code> . </p> <p> The <code> sizeof </code> two longs happens to be the size of <code> struct sdshdr </code> . </p> <p> Look at <code> sdslen </code> function and see this trick at work: </p> <pre><code>size_t sdslen(const sds s) { struct sdshdr *sh = (void*) (s-(sizeof(struct sdshdr))); return sh-&gt;len; } </code></pre> <p> Knowing this trick you could easily go through the rest of the functions in <code> sds.c </code> . </p> <p> The Redis string implementation is hidden behind an interface that accepts only character pointers. The users of Redis strings need not care about how it's implemented and can treat Redis strings as a character pointer. </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/oss_and_stack/reference/internals/internals-sds/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/references/compatibility/commands/data-types/.html
<section class="prose w-full py-12 max-w-none"> <h1> Data type commands compatibility </h1> <p class="text-lg -mt-5 mb-10"> Data type commands compatibility (bitmaps, geospatial indices, hashes, HyperLogLogs, lists, sets, sorted sets, streams, strings). </p> <p> The following tables show which Redis Community Edition data type commands are compatible with standard and Active-Active databases in Redis Enterprise Software and Redis Cloud. </p> <h2 id="bitmap-commands"> Bitmap commands </h2> <table> <thead> <tr> <th style="text-align:left"> <span style="min-width: 10em; display: table-cell"> Command </span> </th> <th style="text-align:left"> Redis <br/> Enterprise </th> <th style="text-align:left"> Redis <br/> Cloud </th> <th style="text-align:left"> <span style="min-width: 9em; display: table-cell"> Notes </span> </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/bitcount/"> BITCOUNT </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/bitfield/"> BITFIELD </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/bitfield_ro/"> BITFIELD_RO </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/bitop/"> BITOP </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/bitpos/"> BITPOS </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/getbit/"> GETBIT </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/setbit/"> SETBIT </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> </tbody> </table> <h2 id="geospatial-indices-commands"> Geospatial indices commands </h2> <table> <thead> <tr> <th style="text-align:left"> <span style="min-width: 10em; display: table-cell"> Command </span> </th> <th style="text-align:left"> Redis <br/> Enterprise </th> <th style="text-align:left"> Redis <br/> Cloud </th> <th style="text-align:left"> <span style="min-width: 9em; display: table-cell"> Notes </span> </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/geoadd/"> GEOADD </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/geodist/"> GEODIST </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/geohash/"> GEOHASH </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/geopos/"> GEOPOS </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/georadius/"> GEORADIUS </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> Deprecated as of Redis v6.2.0. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/georadius_ro/"> GEORADIUS_RO </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> Deprecated as of Redis v6.2.0. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/georadiusbymember/"> GEORADIUSBYMEMBER </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> Deprecated as of Redis v6.2.0. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/georadiusbymember_ro/"> GEORADIUSBYMEMBER_RO </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> Deprecated as of Redis v6.2.0. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/geosearch/"> GEOSEARCH </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/geosearchstore/"> GEOSEARCHSTORE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> </tbody> </table> <h2 id="hash-commands"> Hash commands </h2> <table> <thead> <tr> <th style="text-align:left"> <span style="min-width: 10em; display: table-cell"> Command </span> </th> <th style="text-align:left"> Redis <br/> Enterprise </th> <th style="text-align:left"> Redis <br/> Cloud </th> <th style="text-align:left"> <span style="min-width: 9em; display: table-cell"> Notes </span> </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hdel/"> HDEL </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hexists/"> HEXISTS </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hexpire/"> HEXPIRE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hexpireat/"> HEXPIREAT </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hexpiretime/"> HEXPIRETIME </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hget/"> HGET </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hgetall/"> HGETALL </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hincrby/"> HINCRBY </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hincrbyfloat/"> HINCRBYFLOAT </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hkeys/"> HKEYS </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hlen/"> HLEN </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hmget/"> HMGET </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hmset/"> HMSET </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> Deprecated as of Redis v4.0.0. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hpersist/"> HPERSIST </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hpexpire/"> HPEXPIRE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hpexpireat/"> HPEXPIREAT </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hpexpiretime/"> HPEXPIRETIME </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hpttl/"> HPTTL </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hrandfield/"> HRANDFIELD </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hscan/"> HSCAN </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hset/"> HSET </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hsetnx/"> HSETNX </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hstrlen/"> HSTRLEN </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/httl/"> HTTL </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/hvals/"> HVALS </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> </tbody> </table> <h2 id="hyperloglog-commands"> HyperLogLog commands </h2> <table> <thead> <tr> <th style="text-align:left"> <span style="min-width: 10em; display: table-cell"> Command </span> </th> <th style="text-align:left"> Redis <br/> Enterprise </th> <th style="text-align:left"> Redis <br/> Cloud </th> <th style="text-align:left"> <span style="min-width: 9em; display: table-cell"> Notes </span> </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/pfadd/"> PFADD </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/pfcount/"> PFCOUNT </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/pfdebug/"> PFDEBUG </a> </td> <td style="text-align:left"> <span title="Not supported"> ❌ Standard </span> <br/> <span title="Not supported"> <nobr> ❌ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Not supported"> ❌ Standard </span> <br/> <span title="Not supported"> <nobr> ❌ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/pfmerge/"> PFMERGE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/pfselftest/"> PFSELFTEST </a> </td> <td style="text-align:left"> <span title="Not supported"> ❌ Standard </span> <br/> <span title="Not supported"> <nobr> ❌ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Not supported"> ❌ Standard </span> <br/> <span title="Not supported"> <nobr> ❌ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> </tbody> </table> <h2 id="list-commands"> List commands </h2> <table> <thead> <tr> <th style="text-align:left"> <span style="min-width: 10em; display: table-cell"> Command </span> </th> <th style="text-align:left"> Redis <br/> Enterprise </th> <th style="text-align:left"> Redis <br/> Cloud </th> <th style="text-align:left"> <span style="min-width: 9em; display: table-cell"> Notes </span> </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/blmove/"> BLMOVE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/blmpop/"> BLMPOP </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/blpop/"> BLPOP </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/brpop/"> BRPOP </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/brpoplpush/"> BRPOPLPUSH </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> Deprecated as of Redis v6.2.0. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/lindex/"> LINDEX </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/linsert/"> LINSERT </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/llen/"> LLEN </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/lmove/"> LMOVE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/lmpop/"> LMPOP </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/lpop/"> LPOP </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/lpos/"> LPOS </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/lpush/"> LPUSH </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/lpushx/"> LPUSHX </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/lrange/"> LRANGE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/lrem/"> LREM </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/lset/"> LSET </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/ltrim/"> LTRIM </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/rpop/"> RPOP </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/rpoplpush/"> RPOPLPUSH </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> Deprecated as of Redis v6.2.0. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/rpush/"> RPUSH </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/rpushx/"> RPUSHX </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> </tbody> </table> <h2 id="set-commands"> Set commands </h2> <table> <thead> <tr> <th style="text-align:left"> <span style="min-width: 10em; display: table-cell"> Command </span> </th> <th style="text-align:left"> Redis <br/> Enterprise </th> <th style="text-align:left"> Redis <br/> Cloud </th> <th style="text-align:left"> <span style="min-width: 9em; display: table-cell"> Notes </span> </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/sadd/"> SADD </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/scard/"> SCARD </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/sdiff/"> SDIFF </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/sdiffstore/"> SDIFFSTORE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/sinter/"> SINTER </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/sintercard/"> SINTERCARD </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/sinterstore/"> SINTERSTORE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/sismember/"> SISMEMBER </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/smembers/"> SMEMBERS </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/sismember/"> SMISMEMBER </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/smove/"> SMOVE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/spop/"> SPOP </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/srandmember/"> SRANDMEMBER </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/srem/"> SREM </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/sscan/"> SSCAN </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/sunion/"> SUNION </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/sunionstore/"> SUNIONSTORE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> </tbody> </table> <h2 id="sorted-set-commands"> Sorted set commands </h2> <table> <thead> <tr> <th style="text-align:left"> <span style="min-width: 10em; display: table-cell"> Command </span> </th> <th style="text-align:left"> Redis <br/> Enterprise </th> <th style="text-align:left"> Redis <br/> Cloud </th> <th style="text-align:left"> <span style="min-width: 9em; display: table-cell"> Notes </span> </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/bzmpop/"> BZMPOP </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/bzpopmax/"> BZPOPMAX </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/bzpopmin/"> BZPOPMIN </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zadd/"> ZADD </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zcard/"> ZCARD </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zcount/"> ZCOUNT </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zdiff/"> ZDIFF </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zdiffstore/"> ZDIFFSTORE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zincrby/"> ZINCRBY </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zinter/"> ZINTER </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zintercard/"> ZINTERCARD </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zinterstore/"> ZINTERSTORE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zlexcount/"> ZLEXCOUNT </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zmpop/"> ZMPOP </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zmscore/"> ZMSCORE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zpopmax/"> ZPOPMAX </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zpopmin/"> ZPOPMIN </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zrandmember/"> ZRANDMEMBER </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zrange/"> ZRANGE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zrangebylex/"> ZRANGEBYLEX </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> Deprecated as of Redis v6.2.0. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zrangebyscore/"> ZRANGEBYSCORE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> Deprecated as of Redis v6.2.0. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zrangestore/"> ZRANGESTORE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zrank/"> ZRANK </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zrem/"> ZREM </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zremrangebylex/"> ZREMRANGEBYLEX </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zremrangebyrank/"> ZREMRANGEBYRANK </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zremrangebyscore/"> ZREMRANGEBYSCORE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zrevrange/"> ZREVRANGE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> Deprecated as of Redis v6.2.0. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zrevrangebylex/"> ZREVRANGEBYLEX </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> Deprecated as of Redis v6.2.0. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zrevrangebyscore/"> ZREVRANGEBYSCORE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> Deprecated as of Redis v6.2.0. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zrevrank/"> ZREVRANK </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zscan/"> ZSCAN </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zscore/"> ZSCORE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zunion/"> ZUNION </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/zunionstore/"> ZUNIONSTORE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> </tbody> </table> <h2 id="stream-commands"> Stream commands </h2> <table> <thead> <tr> <th style="text-align:left"> <span style="min-width: 10em; display: table-cell"> Command </span> </th> <th style="text-align:left"> Redis <br/> Enterprise </th> <th style="text-align:left"> Redis <br/> Cloud </th> <th style="text-align:left"> <span style="min-width: 9em; display: table-cell"> Notes </span> </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/xack/"> XACK </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/xadd/"> XADD </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/xautoclaim/"> XAUTOCLAIM </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/xclaim/"> XCLAIM </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/xdel/"> XDEL </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/xgroup/"> XGROUP </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/xinfo/"> XINFO </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/xlen/"> XLEN </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/xpending/"> XPENDING </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/xrange/"> XRANGE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/xread/"> XREAD </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/xreadgroup/"> XREADGROUP </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/xrevrange/"> XREVRANGE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/xsetid/"> XSETID </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/xtrim/"> XTRIM </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> </tbody> </table> <h2 id="string-commands"> String commands </h2> <table> <thead> <tr> <th style="text-align:left"> <span style="min-width: 10em; display: table-cell"> Command </span> </th> <th style="text-align:left"> Redis <br/> Enterprise </th> <th style="text-align:left"> Redis <br/> Cloud </th> <th style="text-align:left"> <span style="min-width: 9em; display: table-cell"> Notes </span> </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/append/"> APPEND </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/decr/"> DECR </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/decrby/"> DECRBY </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/get/"> GET </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/getdel/"> GETDEL </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/getex/"> GETEX </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active* </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active* </nobr> </span> </td> <td style="text-align:left"> *Not supported for HyperLogLog. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/getrange/"> GETRANGE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/getset/"> GETSET </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> Deprecated as of Redis v6.2.0. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/incr/"> INCR </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/incrby/"> INCRBY </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/incrbyfloat/"> INCRBYFLOAT </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/lcs/"> LCS </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/mget/"> MGET </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/mset/"> MSET </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/msetnx/"> MSETNX </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/psetex/"> PSETEX </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/set/"> SET </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/setex/"> SETEX </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/setnx/"> SETNX </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/setrange/"> SETRANGE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> STRALGO </td> <td style="text-align:left"> <span title="Not supported"> ❌ Standard </span> <br/> <span title="Not supported"> <nobr> ❌ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Not supported"> ❌ Standard </span> <br/> <span title="Not supported"> <nobr> ❌ Active-Active </nobr> </span> </td> <td style="text-align:left"> Deprecated as of Redis v7.0.0. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/strlen/"> STRLEN </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/substr/"> SUBSTR </a> </td> <td style="text-align:left"> <span title="Not supported"> ❌ Standard </span> <br/> <span title="Not supported"> <nobr> ❌ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Not supported"> ❌ Standard </span> <br/> <span title="Not supported"> <nobr> ❌ Active-Active </nobr> </span> </td> <td style="text-align:left"> Deprecated as of Redis v2.0.0. </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/references/compatibility/commands/data-types/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/replconf/.html
<section class="prose w-full py-12"> <h1 class="command-name"> REPLCONF </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">REPLCONF</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 3.0.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(1) </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @admin </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> <code> @dangerous </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> The <code> REPLCONF </code> command is an internal command. It is used by a Redis master to configure a connected replica. </p> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#simple-strings"> Simple string reply </a> : <code> OK </code> . <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/replconf/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/databases/connect/test-client-connectivity/.html
<section class="prose w-full py-12 max-w-none"> <h1> Test client connection </h1> <p> In various scenarios, such as after creating a new cluster or upgrading the cluster, you should verify clients can connect to the database. </p> <p> To test client connectivity: </p> <ol> <li> <p> After you <a href="/docs/latest/operate/rs/7.4/databases/create/"> create a Redis database </a> , copy the database endpoint, which contains the cluster name (FQDN). </p> <p> To view and copy endpoints for a database in the cluster, see the database’s <strong> Configuration &gt; General </strong> section in the Cluster Manager UI: </p> <a href="/docs/latest/images/rs/screenshots/databases/config-general-endpoints.png" sdata-lightbox="/images/rs/screenshots/databases/config-general-endpoints.png"> <img alt="View public and private endpoints from the General section of the database's Configuration screen." src="/docs/latest/images/rs/screenshots/databases/config-general-endpoints.png" width="75%"/> </a> </li> <li> <p> Try to connect to the database endpoint from your client of choice, and run database commands. </p> </li> <li> <p> If the database does not respond, try to connect to the database endpoint using the IP address rather than the FQDN. If you succeed, then DNS is not properly configured. For additional details, see <a href="/docs/latest/operate/rs/7.4/networking/cluster-dns/"> Configure cluster DNS </a> . </p> </li> </ol> <p> If any issues occur when testing database connections, <a href="https://redis.com/company/support/"> contact support </a> . </p> <h2 id="test-database-connections"> Test database connections </h2> <p> After you create a Redis database, you can connect to your database and store data using one of the following methods: </p> <ul> <li> <p> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/redis-cli/"> <code> redis-cli </code> </a> , the built-in command-line tool </p> </li> <li> <p> <a href="https://redis.com/redis-enterprise/redis-insight/"> Redis Insight </a> , a free Redis GUI that is available for macOS, Windows, and Linux </p> </li> <li> <p> An application using a Redis client library, such as <a href="https://github.com/redis/redis-py"> <code> redis-py </code> </a> for Python. See the <a href="/docs/latest/develop/clients/"> client list </a> to view all Redis clients by language. </p> </li> </ul> <h3 id="connect-with-redis-cli"> Connect with redis-cli </h3> <p> Connect to your database with <code> redis-cli </code> (located in the <code> /opt/redislabs/bin </code> directory), then store and retrieve a key: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ redis-cli -h &lt;endpoint&gt; -p &lt;port&gt; </span></span><span class="line"><span class="cl">127.0.0.1:16653&gt; <span class="nb">set</span> key1 <span class="m">123</span> </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">127.0.0.1:16653&gt; get key1 </span></span><span class="line"><span class="cl"><span class="s2">"123"</span> </span></span></code></pre> </div> <p> For more <code> redis-cli </code> connection examples, see the <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/redis-cli/"> <code> redis-cli </code> reference </a> . </p> <h3 id="connect-with-redis-insight"> Connect with Redis Insight </h3> <p> Redis Insight is a free Redis GUI that is available for macOS, Windows, and Linux. </p> <ol> <li> <p> <a href="/docs/latest/develop/tools/insight/"> Install Redis Insight </a> . </p> </li> <li> <p> Open Redis Insight and select <strong> Add Redis Database </strong> . </p> </li> <li> <p> Enter the host and port in the <strong> Host </strong> and <strong> Port </strong> fields. </p> </li> <li> <p> Select <strong> Use TLS </strong> if <a href="/docs/latest/operate/rs/7.4/security/encryption/tls/"> TLS </a> is set up. </p> </li> <li> <p> Select <strong> Add Redis Database </strong> to connect to the database. </p> </li> </ol> <p> See the <a href="/docs/latest/develop/tools/insight/"> Redis Insight documentation </a> for more information. </p> <h3 id="connect-with-python"> Connect with Python </h3> <p> Python applications can connect to the database using the <code> redis-py </code> client library. For installation instructions, see the <a href="https://github.com/redis/redis-py#readme"> <code> redis-py </code> README </a> on GitHub. </p> <ol> <li> <p> From the command line, create a new file called <code> redis_test.py </code> : </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">vi redis_test.py </span></span></code></pre> </div> </li> <li> <p> Paste the following code in <code> redis_test.py </code> , and replace <code> &lt;host&gt; </code> and <code> &lt;port&gt; </code> with your database's endpoint details: </p> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">redis</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># Connect to the database</span> </span></span><span class="line"><span class="cl"><span class="n">r</span> <span class="o">=</span> <span class="n">redis</span><span class="o">.</span><span class="n">Redis</span><span class="p">(</span><span class="n">host</span><span class="o">=</span><span class="s1">'&lt;host&gt;'</span><span class="p">,</span> <span class="n">port</span><span class="o">=&lt;</span><span class="n">port</span><span class="o">&gt;</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># Store a key</span> </span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">"set key1 123"</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s1">'key1'</span><span class="p">,</span> <span class="s1">'123'</span><span class="p">))</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># Retrieve the key</span> </span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">"get key1"</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'key1'</span><span class="p">))</span> </span></span></code></pre> </div> </li> <li> <p> Run the application: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">python redis_test.py </span></span></code></pre> </div> </li> <li> <p> If the application successfully connects to your database, it outputs: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl"><span class="nb">set</span> key1 <span class="m">123</span> </span></span><span class="line"><span class="cl">True </span></span><span class="line"><span class="cl">get key1 </span></span><span class="line"><span class="cl"><span class="m">123</span> </span></span></code></pre> </div> </li> </ol> <h3 id="connect-with-discovery-service"> Connect with discovery service </h3> <p> You can also connect a Python application to the database using the discovery service, which complies with the Redis Sentinel API. </p> <p> In the IP-based connection method, you only need the database name, not the port number. The following example uses the discovery service that listens on port 8001 on all nodes of the cluster to discover the endpoint for the database named "db1". </p> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">redis.sentinel</span> <span class="kn">import</span> <span class="n">Sentinel</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># with IP based connections, a list of known node IP addresses is constructed</span> </span></span><span class="line"><span class="cl"><span class="c1"># to allow connection even if any one of the nodes in the list is unavailable.</span> </span></span><span class="line"><span class="cl"><span class="n">sentinel_list</span> <span class="o">=</span> <span class="p">[</span> </span></span><span class="line"><span class="cl"><span class="p">(</span><span class="s1">'10.0.0.44'</span><span class="p">,</span> <span class="mi">8001</span><span class="p">),</span> </span></span><span class="line"><span class="cl"><span class="p">(</span><span class="s1">'10.0.0.45'</span><span class="p">,</span> <span class="mi">8001</span><span class="p">),</span> </span></span><span class="line"><span class="cl"><span class="p">(</span><span class="s1">'10.0.0.46'</span><span class="p">,</span> <span class="mi">8001</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">]</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># change this to the db name you want to connect</span> </span></span><span class="line"><span class="cl"><span class="n">db_name</span> <span class="o">=</span> <span class="s1">'db1'</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">sentinel</span> <span class="o">=</span> <span class="n">Sentinel</span><span class="p">(</span><span class="n">sentinel_list</span><span class="p">,</span> <span class="n">socket_timeout</span><span class="o">=</span><span class="mf">0.1</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="n">r</span> <span class="o">=</span> <span class="n">sentinel</span><span class="o">.</span><span class="n">master_for</span><span class="p">(</span><span class="n">db_name</span><span class="p">,</span> <span class="n">socket_timeout</span><span class="o">=</span><span class="mf">0.1</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># set key "foo" to value "bar"</span> </span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">,</span> <span class="s1">'bar'</span><span class="p">))</span> </span></span><span class="line"><span class="cl"><span class="c1"># set value for key "foo"</span> </span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">))</span> </span></span></code></pre> </div> <p> For more <code> redis-py </code> connection examples, see the <a href="https://redis-py.readthedocs.io/en/stable/examples/connection_examples.html"> <code> redis-py </code> developer documentation </a> . </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/databases/connect/test-client-connectivity/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/develop/tools/insight/release-notes/v.2.24.0/.html
<section class="prose w-full py-12"> <h1> RedisInsight v2.24.0, April 2023 </h1> <p class="text-lg -mt-5 mb-10"> RedisInsight v2.24 </p> <h2 id="224-april-2023"> 2.24 (April 2023) </h2> <p> This is the General Availability (GA) release of RedisInsight 2.24. </p> <h3 id="highlights"> Highlights </h3> <ul> <li> Bulk data upload: Upload the list of Redis commands from a text file using the new bulk action in the Browser tool. Use the bulk data upload with custom RedisInsight tutorials to quickly load your sample dataset. </li> <li> Support for images in custom tutorials: showcase your Redis expertise with your team and the wider community by building shareable RedisInsight tutorials. </li> <li> JSON formatter support for the <a href="https://redis.io/commands/json.get/"> JSON.GET </a> , <a href="https://redis.io/commands/json.mget/"> JSON.MGET </a> , and <a href="https://redis.io/commands/get/"> GET </a> command output in Workbench. </li> <li> Added Brotli and PHP GZcompress to the list of supported decompression formats to view your data in a human-readable format. </li> </ul> <h3 id="details"> Details </h3> <p> <strong> Features and improvements </strong> </p> <ul> <li> <a href="https://github.com/RedisInsight/RedisInsight/pull/1930"> #1930 </a> , <a href="https://github.com/RedisInsight/RedisInsight/pull/1961"> #1961 </a> Upload the list of Redis commands from a text file using the new bulk action in the Browser tool. Use the bulk data upload with custom RedisInsight tutorials to quickly load your sample dataset. </li> <li> <a href="https://github.com/RedisInsight/RedisInsight/pull/1936"> #1936 </a> , <a href="https://github.com/RedisInsight/RedisInsight/pull/1939"> #1939 </a> Added support for images in custom tutorials, available in Workbench. Showcase your Redis expertise with your team and the wider community by building shareable tutorials. Use markdown syntax described in our <a href="https://github.com/RedisInsight/Tutorials"> instructions </a> to build tutorials. </li> <li> <a href="https://github.com/RedisInsight/RedisInsight/pull/1946"> #1946 </a> See the output of <a href="https://redis.io/commands/json.get/"> JSON.GET </a> , <a href="https://redis.io/commands/json.mget/"> JSON.MGET </a> , and <a href="https://redis.io/commands/get/"> GET </a> formatted as JSON in Workbench. </li> <li> <a href="https://github.com/RedisInsight/RedisInsight/pull/1876"> #1876 </a> Ability to directly delete a key in the Browser list of keys without having to view its values. </li> <li> <a href="https://github.com/RedisInsight/RedisInsight/pull/1889"> #1889 </a> , <a href="https://github.com/RedisInsight/RedisInsight/pull/1900"> #1900 </a> Added Brotli and PHP GZcompress to the list of supported decompression formats to view your data in a human-readable format. Decompression format is configurable when adding a database connection. </li> <li> <a href="https://github.com/RedisInsight/RedisInsight/pull/1886"> #1886 </a> Enhanced command syntax in CLI, Workbench, and Command Helper to align with <a href="https://redis.io/commands/"> command documentation </a> . </li> <li> <a href="https://github.com/RedisInsight/RedisInsight/pull/1975"> #1975 </a> <a href="https://github.com/RedisInsight/RedisInsight/issues/1902"> Renamed </a> the "Display On System Tray" to "Show in Menu Bar" on macOS. </li> </ul> <p> <strong> Bugs </strong> </p> <ul> <li> <a href="https://github.com/RedisInsight/RedisInsight/pull/1990"> #1990 </a> Keep the previously specified SNI parameters when a database connection is edited. </li> <li> <a href="https://github.com/RedisInsight/RedisInsight/pull/1999"> #1999 </a> Keep the previously set database index when a database connection is edited. </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/develop/tools/insight/release-notes/v.2.24.0/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/databases/durability-ha/discovery-service/.html
<section class="prose w-full py-12 max-w-none"> <h1> Discovery service </h1> <p> The Discovery Service provides an IP-based connection management service used when connecting to Redis Enterprise Software databases. When used in conjunction with Redis Enterprise Software's other high availability features, the Discovery Service assists an application scope with topology changes such as adding, removing of nodes, node failovers and so on. It does this by providing your application with the ability to easily discover which node hosts the database endpoint. The API used for discovery service is compliant with the Redis Sentinel API. </p> <p> Discovery Service is an alternative for applications that do not want to depend on DNS name resolution for their connectivity. Discovery Service and DNS based connectivity are not mutually exclusive. They can be used side by side in a given cluster where some clients can use Discovery Service based connection while others can use DNS name resolution when connecting to databases. </p> <h2 id="how-discovery-service-works"> How discovery service works </h2> <p> The Discovery Service is available for querying on each node of the cluster, listening on port 8001. To employ it, your application utilizes a <a href="/docs/latest/operate/rs/databases/connect/supported-clients-browsers/"> Redis Sentinel enabled client library </a> to connect to the Discovery Service and request the endpoint for the given database. The Discovery Service replies with the database's endpoint for that database. In case of a node failure, the Discovery Service is updated by the cluster manager with the new endpoint and clients unable to connect to the database endpoint due to the failover, can re-query the discovery service for the new endpoint for the database. </p> <p> The Discovery Service can return either the internal or external endpoint for a database. If you query the discovery service for the endpoint of a database named "db1", the Discovery Service returns the external endpoint information by default. If only an internal endpoint exists with no external endpoint the default behavior is to return the internal endpoint. The "@internal" is added to the end of the database name to explicitly ask for the internal endpoint. to query the internal endpoint explicitly with database name "db1", you can pass in the database name as "db1@internal". </p> <p> If you'd like to examine the metadata returned from Redis Enterprise Software Discovery Service you can connect to port 8001 with redis-cli utility and execute "SENTINEL masters". Following is a sample output from one of the nodes of a Redis Enterprise Software cluster: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ ./redis-cli -p <span class="m">8001</span> </span></span><span class="line"><span class="cl">127.0.0.1:8001&gt; SENTINEL masters </span></span><span class="line"><span class="cl">1<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"name"</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="s2">"db1@internal"</span> </span></span><span class="line"><span class="cl">3<span class="o">)</span> <span class="s2">"ip"</span> </span></span><span class="line"><span class="cl">4<span class="o">)</span> <span class="s2">"10.0.0.45"</span> </span></span><span class="line"><span class="cl">5<span class="o">)</span> <span class="s2">"port"</span> </span></span><span class="line"><span class="cl">6<span class="o">)</span> <span class="s2">"12000"</span> </span></span><span class="line"><span class="cl">7<span class="o">)</span> <span class="s2">"flags"</span> </span></span><span class="line"><span class="cl">8<span class="o">)</span> <span class="s2">"master,disconnected"</span> </span></span><span class="line"><span class="cl">9<span class="o">)</span> <span class="s2">"num-other-sentinels"</span> </span></span><span class="line"><span class="cl">10<span class="o">)</span> <span class="s2">"0"</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"name"</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="s2">"db1"</span> </span></span><span class="line"><span class="cl">3<span class="o">)</span> <span class="s2">"ip"</span> </span></span><span class="line"><span class="cl">4<span class="o">)</span> <span class="s2">"10.0.0.45"</span> </span></span><span class="line"><span class="cl">5<span class="o">)</span> <span class="s2">"port"</span> </span></span><span class="line"><span class="cl">6<span class="o">)</span> <span class="s2">"12000"</span> </span></span><span class="line"><span class="cl">7<span class="o">)</span> <span class="s2">"flags"</span> </span></span><span class="line"><span class="cl">8<span class="o">)</span> <span class="s2">"master,disconnected"</span> </span></span><span class="line"><span class="cl">9<span class="o">)</span> <span class="s2">"num-other-sentinels"</span> </span></span><span class="line"><span class="cl">10<span class="o">)</span> <span class="s2">"0"</span> </span></span></code></pre> </div> <p> It is important to note that, the Discovery Service is not a full implementation of the <a href="/docs/latest/operate/oss_and_stack/management/sentinel/"> Redis Sentinel protocol </a> . There are aspects of the protocol that are not applicable or would be duplication with existing technology in Redis Enterprise Software. The Discovery Service implements only the parts required to provide applications with easy High Availability, be compatible with the protocol, and not rely on DNS to derive which node in the cluster to communicate with. </p> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> To use Redis Sentinel, every database name must be unique across the cluster. </div> </div> <h2 id="redis-client-support"> Redis client support </h2> <p> We recommend these clients that are tested for use with the <a href="/docs/latest/operate/rs/databases/durability-ha/discovery-service/"> Discovery Service </a> that uses the Redis Sentinel API: </p> <ul> <li> <a href="https://github.com/andymccurdy/redis-py"> Redis-py </a> (Python redis client) </li> <li> <a href="https://github.com/redis/hiredis"> HiRedis </a> (C redis client) </li> <li> <a href="https://github.com/xetorthio/jedis"> Jedis </a> (Java redis client) </li> <li> <a href="https://github.com/luin/ioredis"> Ioredis </a> (NodeJS redis client) </li> </ul> <p> If you need to use another client, consider using <a href="https://github.com/RedisLabs/sentinel_tunnel"> Sentinel Tunnel </a> to discover the current Redis master with Sentinel and create a TCP tunnel between a local port on the client and the master. </p> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> Redis Sentinel API can return endpoints for both master and replica endpoints. Discovery Service only supports master endpoints and does not support returning replica endpoints for a database. </div> </div> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/databases/durability-ha/discovery-service/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/clusters/logging/.html
<section class="prose w-full py-12 max-w-none"> <h1> Logging events </h1> <p class="text-lg -mt-5 mb-10"> Management actions performed with Redis Enterprise are logged to make sure system management tasks are appropriately performed or monitored by administrators and for compliance with regulatory standards. </p> <p> Management actions performed with Redis Enterprise are logged to make sure system management tasks are appropriately performed or monitored by administrators and for compliance with regulatory standards. </p> <p> Log entries contain the following information: </p> <ol> <li> Who performed the action? </li> <li> What exactly was the performed action? </li> <li> When was the action performed? </li> <li> Did the action succeed or not? </li> </ol> <p> To get the list of logged events, you can use the REST API or the <strong> Logs </strong> screen in the UI. The <strong> Logs </strong> screen displays the system and user events regarding alerts, notifications, and configuration. </p> <a href="/docs/latest/images/rs/screenshots/cluster/cluster-logs.png" sdata-lightbox="/images/rs/screenshots/cluster/cluster-logs.png"> <img alt="Logs screen in the new Cluster Manager UI." src="/docs/latest/images/rs/screenshots/cluster/cluster-logs.png"/> </a> <p> You can use the <strong> Logs </strong> screen to review what actions a user has performed, such as editing a database's configuration. </p> <ul> <li> <a href="/docs/latest/operate/rs/clusters/logging/redis-slow-log/"> Redis slow log </a> </li> <li> <a href="/docs/latest/operate/rs/clusters/logging/rsyslog-logging/"> rsyslog logging </a> </li> </ul> <h2 id="view-logs-in-the-ui"> View logs in the UI </h2> <p> Redis Enterprise provides log files for auditing cluster management actions and troubleshooting. You can view these logs in the UI and on the host operating system. </p> <p> To view event logs in the new Cluster Manager UI, go to <strong> Cluster &gt; Logs </strong> . </p> <h2 id="view-logs-on-the-server"> View logs on the server </h2> <p> Server logs can be found by default in the directory <code> /var/opt/redislabs/log/ </code> . </p> <p> These log files are used by the Redis support team to troubleshoot issues. The logs you will most frequently interact with is 'event_log.log'. This log file is where logs of configuration actions within Redis are stored and is useful to determine events that occur within Redis Enterprise. </p> <h2 id="configure-log-timestamps"> Configure log timestamps </h2> <p> Redis Enterprise allows you to configure log timestamps. To configure log timestamps in the new Cluster Manager UI: </p> <ol> <li> <p> Go to <strong> Cluster &gt; Configuration &gt; General </strong> . </p> </li> <li> <p> Change the <strong> Time zone </strong> for the logs based on your location. </p> </li> </ol> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/clusters/logging/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/ft.explain/.html
<section class="prose w-full py-12"> <h1 class="command-name"> FT.EXPLAIN </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">FT.EXPLAIN index query [DIALECT dialect] </pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available in: </dt> <dd class="m-0"> <a href="/docs/stack"> Redis Stack </a> / <a href="/docs/interact/search-and-query"> Search 1.0.0 </a> </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(1) </dd> </dl> <p> Return the execution plan for a complex query </p> <p> <a href="#examples"> Examples </a> </p> <h2 id="required-arguments"> Required arguments </h2> <details open=""> <summary> <code> index </code> </summary> <p> is index name. You must first create the index using <a href="/docs/latest/commands/ft.create/"> <code> FT.CREATE </code> </a> . </p> </details> <details open=""> <summary> <code> query </code> </summary> <p> is query string, as if sent to FT.SEARCH`. </p> </details> <h2 id="optional-arguments"> Optional arguments </h2> <details open=""> <summary> <code> DIALECT {dialect_version} </code> </summary> <p> is dialect version under which to execute the query. If not specified, the query executes under the default dialect version set during module initial loading or via <a href="/docs/latest/commands/ft.config-set/"> <code> FT.CONFIG SET </code> </a> command. </p> </details> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Notes: </div> <ul> <li> In the returned response, a <code> + </code> on a term is an indication of stemming. </li> <li> Use <code> redis-cli --raw </code> to properly read line-breaks in the returned response. </li> </ul> </div> </div> <h2 id="return"> Return </h2> <p> FT.EXPLAIN returns a string representing the execution plan. </p> <h2 id="examples"> Examples </h2> <details open=""> <summary> <b> Return the execution plan for a complex query </b> </summary> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ redis-cli --raw </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; FT.EXPLAIN rd <span class="s2">"(foo bar)|(hello world) @date:[100 200]|@date:[500 +inf]"</span> </span></span><span class="line"><span class="cl">INTERSECT <span class="o">{</span> </span></span><span class="line"><span class="cl"> UNION <span class="o">{</span> </span></span><span class="line"><span class="cl"> INTERSECT <span class="o">{</span> </span></span><span class="line"><span class="cl"> foo </span></span><span class="line"><span class="cl"> bar </span></span><span class="line"><span class="cl"> <span class="o">}</span> </span></span><span class="line"><span class="cl"> INTERSECT <span class="o">{</span> </span></span><span class="line"><span class="cl"> hello </span></span><span class="line"><span class="cl"> world </span></span><span class="line"><span class="cl"> <span class="o">}</span> </span></span><span class="line"><span class="cl"> <span class="o">}</span> </span></span><span class="line"><span class="cl"> UNION <span class="o">{</span> </span></span><span class="line"><span class="cl"> NUMERIC <span class="o">{</span>100.000000 &lt;<span class="o">=</span> x &lt;<span class="o">=</span> 200.000000<span class="o">}</span> </span></span><span class="line"><span class="cl"> NUMERIC <span class="o">{</span>500.000000 &lt;<span class="o">=</span> x &lt;<span class="o">=</span> inf<span class="o">}</span> </span></span><span class="line"><span class="cl"> <span class="o">}</span> </span></span><span class="line"><span class="cl"><span class="o">}</span></span></span></code></pre> </div> </details> <h2 id="see-also"> See also </h2> <p> <a href="/docs/latest/commands/ft.create/"> <code> FT.CREATE </code> </a> | <a href="/docs/latest/commands/ft.search/"> <code> FT.SEARCH </code> </a> | <a href="/docs/latest/commands/ft.config-set/"> <code> FT.CONFIG SET </code> </a> </p> <h2 id="related-topics"> Related topics </h2> <p> <a href="/docs/latest/develop/interact/search-and-query/"> RediSearch </a> </p> <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/ft.explain/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/clusters/logging/rsyslog-logging/.html
<section class="prose w-full py-12 max-w-none"> <h1> rsyslog logging </h1> <p class="text-lg -mt-5 mb-10"> This document explains the structure of Redis Enterprise Software log entries in <code> rsyslog </code> and how to use these log entries to identify events. </p> <h2 id="log-concepts"> Log concepts </h2> <p> Redis Enterprise Software logs information from a variety of components in response to actions and events that occur within the cluster. </p> <p> In some cases, a single action, such as removing a node from the cluster, may actually consist of several events. These actions may generate multiple log entries. </p> <p> All log entries displayed in the Cluster Manager UI are also written to <code> syslog </code> . You can configure <code> rsyslog </code> to monitor <code> syslog </code> . Enabled alerts are logged to <code> syslog </code> and appear with other log entries. </p> <p> You can also <a href="/docs/latest/operate/rs/clusters/logging/log-security/"> manage your logs </a> with a remote logging server and log rotation. </p> <h3 id="types-of-log-entries"> Types of log entries </h3> <p> Log entries are categorized into events and alerts. Both types of entries appear in the logs, but alert log entries also include a boolean <code> "state" </code> parameter that indicates whether the alert is enabled or disabled. </p> <p> Log entries include information about the specific event that occurred. See the log entry tables for <a href="/docs/latest/operate/rs/clusters/logging/alerts-events/"> alerts and events </a> for more details. </p> <h3 id="severity"> Severity </h3> <p> You can also configure <code> rsyslog </code> to add other information, such as the event severity. </p> <p> Since <code> rsyslog </code> entries do not include severity by default, you can follow these steps to enable it: </p> <ol> <li> <p> Add the following line to <code> /etc/rsyslog.conf </code> : </p> <pre tabindex="0"><code>$template TraditionalFormatWithPRI,"%pri-text%: %timegenerated% %HOSTNAME% %syslogtag%%msg:::drop-last-lf%\n" </code></pre> </li> <li> <p> Modify <code> $ActionFileDefaultTemplate </code> to use your new template <code> $ActionFileDefaultTemplateTraditionalFormatWithPRI </code> </p> </li> <li> <p> Save these changes and restart <code> rsyslog </code> to apply them </p> </li> </ol> <p> You can see the log entries for alerts and events in the <code> /var/log/messages </code> file. </p> <p> <strong> Command components: </strong> </p> <ul> <li> <code> %pri­text% </code> ­adds the severity </li> <li> <code> %timegenerated% </code> ­adds the timestamp </li> <li> <code> %HOSTNAME% </code> ­adds the machine name </li> <li> <code> %syslogtag% </code> adds ­the Redis Enterprise Software message. See the <a href="#log-entry-structure"> log entry structure </a> section for more details. </li> <li> <code> %msg:::drop­last­lf%n </code> ­removes duplicated log entries </li> </ul> <h2 id="log-entry-structure"> Log entry structure </h2> <p> The log entries have the following basic structure: </p> <pre><code>event_log[&lt;process id&gt;]:{&lt;list of key-value pairs in any order&gt;} </code></pre> <ul> <li> <strong> event_log </strong> :­ Plain static text is always shown at the beginning of the entry. </li> <li> <strong> process id­ </strong> : The ID of the logging process </li> <li> <strong> list of key-value pairs in any order </strong> :­ A list of key-value pairs that describe the specific event. They can appear in any order. Some key­-value pairs are always shown, and some appear depending on the specific event. <ul> <li> <strong> Key-­value pairs that always appear: </strong> <ul> <li> <code> "type" </code> : A unique code­ name for the logged event. For the list of codenames, see the <a href="/docs/latest/operate/rs/clusters/logging/alerts-events/"> logged alerts and events </a> tables. </li> <li> <code> "object" </code> : Defines the object type and ID (if relevant) of the object this event relates to, such as cluster, node with ID, BDB with ID, etc. Has the format of <nobr> <code> &lt;object type&gt;[:&lt;id&gt;] </code> </nobr> . </li> <li> <code> "time" </code> : Unix epoch time but can be ignored in this context. </li> </ul> </li> <li> <strong> Key-­value pairs that might appear depending on the specific entry: </strong> <ul> <li> <code> "state" </code> : A boolean where <code> true </code> means the alert is enabled, and <code> false </code> means the alert is disabled. This is only relevant for alert log entries. </li> <li> <code> "global_threshold" </code> : The value of a threshold for alerts related to cluster or node objects. </li> <li> <code> "threshold" </code> : The value of a threshold for alerts related to a BDB object </li> </ul> </li> </ul> </li> </ul> <h2 id="log-entry-samples"> Log entry samples </h2> <p> This section provides examples of log entries that include the <a href="#severity"> <code> rsyslog </code> configuration </a> to add the severity, timestamp, and machine name. </p> <h3 id="ephemeral-storage-passed-threshold"> Ephemeral storage passed threshold </h3> <h4 id="alert-on-log-entry-sample"> "Alert on" log entry sample </h4> <pre tabindex="0"><code>daemon.warning: Jun 14 14:49:20 node1 event_log[3464]: { "storage_util": 90.061643120001, "global_threshold": "70", "object": "node:1", "state": true, "time": 1434282560, "type": "ephemeral_storage" } </code></pre> <p> In this example, the storage utilization on node 1 reached the value of ~90%, which triggered the alert for "Ephemeral storage has reached 70% of its capacity." </p> <p> <strong> Log entry components: </strong> </p> <ul> <li> <code> daemon.warning </code> -­ Severity of entry is <code> warning </code> </li> <li> <code> Jun 14 14:49:20 </code> -­ The timestamp of the event </li> <li> <code> node1 </code> :­ Machine name </li> <li> <code> event_log </code> -­ Static text that always appears </li> <li> <code> [3464]­ </code> - Process ID </li> <li> <code> "storage_util":90.061643120001 </code> - Current ephemeral storage utilization </li> <li> <code> "global_threshold":"70" </code> - The user-configured threshold above which the alert is raised </li> <li> <code> "object":"node:1" </code> ­ - The object related to this alert </li> <li> <code> "state":true­ </code> - Current state of the alert </li> <li> <code> "time":1434282560­ </code> - Can be ignored </li> <li> <code> "type":"ephemeral_storage" </code> - The code name of this specific event. See <a href="/docs/latest/operate/rs/clusters/logging/alerts-events/"> logged alerts and events </a> for more details. </li> </ul> <h4 id="alert-off-log-entry-sample"> "Alert off" log entry sample </h4> <pre tabindex="0"><code>daemon.info: Jun 14 14:51:35 node1 event_log[3464]: { "storage_util":60.051723520008, "global_threshold": "70", "object": "node:1", "state":false, "time": 1434283480, "type": "ephemeral_storage" } </code></pre> <p> This log entry is an example of when the alert for the node with ID 1 "Ephemeral storage has reached 70% of its capacity" has been turned off as result of storage utilization reaching the value of ~60%. </p> <p> <strong> Log entry components </strong> : </p> <ul> <li> <code> daemon.info </code> -­ Severity of entry is <code> info </code> </li> <li> <code> Jun 14 14:51:35 </code> -­ The timestamp of the event </li> <li> <code> node1 </code> -­ Machine name </li> <li> <code> event_log </code> -­ Static text that always appears </li> <li> <code> [3464] </code> -­ Process ID </li> <li> <code> "storage_util":60.051723520008­ </code> - Current ephemeral storage utilization </li> <li> <code> "global_threshold":"70" </code> - The user configured threshold above which the alert is raised (70% in this case) </li> <li> <code> "object":"node:1" </code> -­ The object related to this alert </li> <li> <code> "state":false­ </code> - Current state of the alert </li> <li> <code> "time":1434283480­ </code> - Can be ignored </li> <li> <code> "type":"ephemeral_storage" </code> -­ The code name identifier of this specific event. See <a href="/docs/latest/operate/rs/clusters/logging/alerts-events/"> logged alerts and events </a> for more details. </li> </ul> <h3 id="odd-number-of-nodes-with-a-minimum-of-three-nodes-alert"> Odd number of nodes with a minimum of three nodes alert </h3> <h4 id="alert-on-log-entry-sample-1"> "Alert on" log entry sample </h4> <pre tabindex="0"><code>daemon.warning: Jun 14 15:25:00 node1 event_log[8310]: { "object":"cluster", "state": true, "time": 1434284700, "node_count": 1, "type":"even_node_count" } </code></pre> <p> This log entry is an example of when the alert for "True high availability requires an odd number of nodes with a minimum of three nodes" has been turned on as result of the cluster having only one node. </p> <p> <strong> Log entry components: </strong> </p> <ul> <li> <code> daemon.warning­ </code> - Severity of entry is warning </li> <li> <code> Jun 14 15:25:00 </code> - The timestamp of the event </li> <li> <code> node1­ </code> - Machine name </li> <li> <code> event_log </code> -­ Static text that always appears </li> <li> <code> [8310]­ </code> - Process ID </li> <li> <code> "object":"cluster"­ </code> - The object related to this alert </li> <li> <code> "state":true </code> -­ Current state of the alert </li> <li> <code> "time":1434284700­ </code> - Can be ignored </li> <li> <code> "node_count":1­ </code> - The number of nodes in the cluster </li> <li> <code> "type":"even_node_count"­ </code> - The code name identifier of this specific event. See <a href="/docs/latest/operate/rs/clusters/logging/alerts-events/"> logged alerts and events </a> for more details. </li> </ul> <h4 id="alert-off-log-entry-sample-1"> "Alert off" log entry sample </h4> <pre tabindex="0"><code>daemon.warning: Jun 14 15:30:40 node1 event_log[8310]: { "object":"cluster", "state": false, "time": 1434285200, "node_count": 3, "type":"even_node_count" } </code></pre> <p> This log entry is an example of when the alert for "True high availability requires an odd number of nodes with a minimum of three nodes" has been turned off as result of the cluster having 3 nodes. </p> <p> <strong> Log entry components: </strong> </p> <ul> <li> <code> daemon.warning </code> - Severity of entry is warning </li> <li> <code> Jun 14 15:30:40 </code> -­ The timestamp of the event </li> <li> <code> node1­ </code> - Machine name </li> <li> <code> event_log­ </code> - Static text that always appears </li> <li> <code> [8310] </code> -­ Process ID </li> <li> <code> "object":"cluster" </code> -­ The object related to this alert </li> <li> <code> "state":false­ </code> - Current state of the alert </li> <li> <code> "time":1434285200­ </code> - Can be ignored </li> <li> <code> "node_count":3­ </code> - The number of nodes in the cluster </li> <li> <code> "type":"even_node_count" </code> -­ The code name of this specific event. See <a href="/docs/latest/operate/rs/clusters/logging/alerts-events/"> logged alerts and events </a> for more details. </li> </ul> <h3 id="node-has-insufficient-disk-space-for-aof-rewrite"> Node has insufficient disk space for AOF rewrite </h3> <h4 id="alert-on-log-entry-sample-2"> "Alert on" log entry sample </h4> <pre tabindex="0"><code>daemon.err: Jun 15 13:51:23 node1 event_log[34252]: { "used": 23457188, "missing": 604602126, "object": "node:1", "free": 9867264, "needed":637926578, "state": true, "time": 1434365483, "disk": 705667072, "type":"insufficient_disk_aofrw" } </code></pre> <p> This log entry is an example of when the alert for "Node has insufficient disk space for AOF rewrite" has been turned on as result of not having enough persistent storage disk space for AOF rewrite purposes. It is missing 604602126 bytes. </p> <p> <strong> Log entry components: </strong> </p> <ul> <li> <code> daemon.err </code> ­ - Severity of entry is error </li> <li> <code> Jun 15 13:51:23 </code> - The timestamp of the event </li> <li> <code> node1­ </code> - Machine name </li> <li> <code> event_log </code> -­ Static text that always appears </li> <li> <code> [34252] </code> -­ Process ID </li> <li> <code> "used":23457188­ </code> - The amount of disk space in bytes currently used for AOF files </li> <li> <code> "missing":604602126­ </code> - The amount of disk space in bytes that is currently missing for AOF rewrite purposes </li> <li> <code> "object":"node:1″ </code> -­ The object related to this alert </li> <li> <code> "free":9867264­ </code> - The amount of disk space in bytes that is currently free </li> <li> <code> "needed":637926578­ </code> - The amount of total disk space in bytes that is needed for AOF rewrite purposes </li> <li> <code> "state":true­ </code> - Current state of the alert </li> <li> <code> "time":1434365483 </code> -­ Can be ignored </li> <li> <code> "disk":705667072­ </code> - The total size in bytes of the persistent storage </li> <li> <code> "type":"insufficient_disk_aofrw"­ </code> - The code name of this specific event. See <a href="/docs/latest/operate/rs/clusters/logging/alerts-events/"> logged alerts and events </a> for more details. </li> </ul> <h4 id="alert-off-log-entry-sample-2"> "Alert off" log entry sample </h4> <pre tabindex="0"><code>daemon.info: Jun 15 13:51:11 node1 event_log[34252]: { "used": 0, "missing":-21614592, "object": "node:1", "free": 21614592, "needed": 0, "state":false, "time": 1434365471, "disk": 705667072, "type":"insufficient_disk_aofrw" } </code></pre> <p> <strong> Log entry components: </strong> </p> <ul> <li> <code> daemon.info­ </code> - Severity of entry is info </li> <li> <code> Jun 15 13:51:11 </code> - The timestamp of the event </li> <li> <code> node1­ </code> - Machine name </li> <li> <code> event_log </code> -­ Static text that always appears </li> <li> <code> [34252]­ </code> - Process ID </li> <li> <code> "used":0­ </code> - The amount of disk space in bytes currently used for AOF files </li> <li> <code> "missing":‐21614592­ </code> - The amount of disk space in bytes that is currently missing for AOF rewrite purposes. In this case, it is not missing because the number is negative. </li> <li> <code> "object":"node:1″ </code> -­ The object related to this alert </li> <li> <code> "free":21614592 </code> -­ The amount of disk space in bytes that is currently free </li> <li> <code> "needed":0­ </code> - The amount of total disk space in bytes that is needed for AOF rewrite purposes. In this case, no space is needed. </li> <li> <code> "state":false­ </code> - Current state of the alert </li> <li> <code> "time":1434365471­ </code> - Can be ignored </li> <li> <code> "disk":705667072­ </code> - The total size in bytes of the persistent storage </li> <li> <code> "type":"insufficient_disk_aofrw" </code> ­ - The code name of this specific event. See <a href="/docs/latest/operate/rs/clusters/logging/alerts-events/"> logged alerts and events </a> for more details. </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/clusters/logging/rsyslog-logging/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/cluster-reset/.html
<section class="prose w-full py-12"> <h1 class="command-name"> CLUSTER RESET </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">CLUSTER RESET [HARD | SOFT]</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 3.0.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(N) where N is the number of known nodes. The command may execute a FLUSHALL as a side effect. </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @admin </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> <code> @dangerous </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Reset a Redis Cluster node, in a more or less drastic way depending on the reset type, that can be <strong> hard </strong> or <strong> soft </strong> . Note that this command <strong> does not work for masters if they hold one or more keys </strong> , in that case to completely reset a master node keys must be removed first, e.g. by using <a href="/docs/latest/commands/flushall/"> <code> FLUSHALL </code> </a> first, and then <code> CLUSTER RESET </code> . </p> <p> Effects on the node: </p> <ol> <li> All the other nodes in the cluster are forgotten. </li> <li> All the assigned / open slots are reset, so the slots-to-nodes mapping is totally cleared. </li> <li> If the node is a replica it is turned into an (empty) master. Its dataset is flushed, so at the end the node will be an empty master. </li> <li> <strong> Hard reset only </strong> : a new Node ID is generated. </li> <li> <strong> Hard reset only </strong> : <code> currentEpoch </code> and <code> configEpoch </code> vars are set to 0. </li> <li> The new configuration is persisted on disk in the node cluster configuration file. </li> </ol> <p> This command is mainly useful to re-provision a Redis Cluster node in order to be used in the context of a new, different cluster. The command is also extensively used by the Redis Cluster testing framework in order to reset the state of the cluster every time a new test unit is executed. </p> <p> If no reset type is specified, the default is <strong> soft </strong> . </p> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#simple-strings"> Simple string reply </a> : <code> OK </code> if the command was successful. Otherwise an error is returned. <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/cluster-reset/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/write-behind/installation/install-redis-gears/.html
<section class="prose w-full py-12 max-w-none"> <h1> Install RedisGears for Redis Data Integration </h1> <p class="text-lg -mt-5 mb-10"> Install and set up RedisGears for a Write-behind deployment </p> <p> Write-behind requires that <a href="https://redis.com/modules/redis-gears"> RedisGears </a> module with the <a href="https://docs.redis.com/latest/modules/redisgears/python/"> Python plugin </a> is installed on the Redis Enterprise cluster. </p> <p> The Python plugin can be installed explicitly or alongside with the <a href="https://docs.redis.com/latest/modules/redisgears/jvm/"> JVM plugin </a> if the latter is needed on the cluster for other purposes. </p> <p> Use the <a href="/docs/latest/integrate/write-behind/reference/cli/redis-di-create/"> <code> redis-di create </code> </a> command in Write-behind CLI to install RedisGears. </p> <h2 id="download-redisgears"> Download RedisGears </h2> <p> Download RedisGears based on the Linux distribution of where Redis Enterprise is installed. </p> <h3 id="ubuntu-2004"> Ubuntu 20.04 </h3> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">curl -s --tlsv1.3 https://redismodules.s3.amazonaws.com/redisgears/redisgears.Linux-ubuntu20.04-x86_64.1.2.6-withdeps.zip -o /tmp/redis-gears.zip </span></span></code></pre> </div> <h3 id="ubuntu-1804"> Ubuntu 18.04 </h3> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">curl -s --tlsv1.3 https://redismodules.s3.amazonaws.com/redisgears/redisgears.Linux-ubuntu18.04-x86_64.1.2.6-withdeps.zip -o /tmp/redis-gears.zip </span></span></code></pre> </div> <h3 id="rhel8"> RHEL8 </h3> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">curl -s https://redismodules.s3.amazonaws.com/redisgears/redisgears.Linux-rhel8-x86_64.1.2.6-withdeps.zip -o /tmp/redis-gears.zip </span></span></code></pre> </div> <h3 id="rhel7"> RHEL7 </h3> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">curl -s https://redismodules.s3.amazonaws.com/redisgears/redisgears.Linux-rhel7-x86_64.1.2.6-withdeps.zip -o /tmp/redis-gears.zip </span></span></code></pre> </div> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/write-behind/installation/install-redis-gears/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rc/cloud-integrations/aws-cloud-accounts/subscription-whitelist/.html
<section class="prose w-full py-12 max-w-none"> <h1> Configure subscription CIDR allow list </h1> <p class="text-lg -mt-5 mb-10"> The CIDR allow list permits traffic between a range of IP addresses and the Redis Cloud VPC. </p> <div class="banner-article rounded-md"> <p> Self-managed AWS accounts are deprecated, so this article has been archived. </p> </div> <p> The <a href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing"> CIDR </a> <a href="https://en.wikipedia.org/wiki/Whitelist"> allow list </a> lets you restrict traffic to your Redis Cloud database. When you configure an allow list, only the <a href="https://en.wikipedia.org/wiki/IP_address"> IP addresses </a> defined in the list can connect to the database. Traffic from all other IP addresses is blocked. </p> <p> If you use a <a href="/docs/latest/operate/rc/cloud-integrations/aws-cloud-accounts/"> self-managed, external cloud account </a> to host your Redis Cloud deployment, you can configure a subscription-wide allow list to restrict traffic to all databases associated with the subscription. </p> <p> The subscription CIDR allow list defines a range of IP addresses and <a href="https://docs.aws.amazon.com/managedservices/latest/userguide/about-security-groups.html"> AWS security groups </a> that control inbound and outbound traffic to the Redis Cloud <a href="https://en.wikipedia.org/wiki/Virtual_private_cloud"> VPC </a> . When you add security groups to the allow list, you can also use the same security groups to manage access to your application. </p> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> The subscription-level allow list is available for Redis Cloud deployments hosted on a self-managed, external AWS account. If you do not have a self-managed account, you can configure a <a href="/docs/latest/operate/rc/security/cidr-whitelist/"> CIDR allow list </a> for each database. </div> </div> <h2 id="allow-ip-address-or-security-group"> Allow IP address or security group </h2> <p> To add IP addresses or <a href="https://docs.aws.amazon.com/managedservices/latest/userguide/about-security-groups.html"> AWS security groups </a> to a subscription's allow list: </p> <ol> <li> <p> From the <a href="https://cloud.redis.io/"> Redis Cloud console </a> menu, select <strong> Subscriptions </strong> and then select your subscription from the list. </p> </li> <li> <p> Select <strong> Connectivity &gt; Allow List </strong> . </p> </li> <li> <p> If the allow list is empty, select <strong> Add allow list </strong> . </p> </li> <li> <p> Select an entry <strong> Type </strong> from the list: </p> <a href="/docs/latest/images/rc/subscription-connectivity-allow-list-type-dropdown.png" sdata-lightbox="/images/rc/subscription-connectivity-allow-list-type-dropdown.png"> <img alt="Select the type of entry to add to the allow list from the Type list." src="/docs/latest/images/rc/subscription-connectivity-allow-list-type-dropdown.png"/> </a> </li> <li> <p> In the <strong> Value </strong> box, enter one of these options: </p> <ul> <li> <p> An IP address in CIDR format </p> </li> <li> <p> The AWS security group ID </p> </li> </ul> </li> <li> <p> Select check to add the entry to the allow list. </p> </li> <li> <p> To allow additional IP addresses or security groups: </p> <ol> <li> <p> Select <strong> Add entry </strong> . </p> </li> <li> <p> Select the new entry's <strong> Type </strong> , enter the <strong> Value </strong> , and select check to add it to the allow list. </p> <a href="/docs/latest/images/rc/subscription-connectivity-allow-list-add-entry.png" sdata-lightbox="/images/rc/subscription-connectivity-allow-list-add-entry.png"> <img alt="Define the new entry and select the Submit entry button to add it to the allow list." src="/docs/latest/images/rc/subscription-connectivity-allow-list-add-entry.png"/> </a> </li> </ol> </li> <li> <p> Select <strong> Apply all changes </strong> to apply the allow list updates. </p> </li> </ol> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rc/cloud-integrations/aws-cloud-accounts/subscription-whitelist/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/oss_and_stack/management/optimization/cpu-profiling/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis CPU profiling </h1> <p class="text-lg -mt-5 mb-10"> Performance engineering guide for on-CPU profiling and tracing </p> <h2 id="filling-the-performance-checklist"> Filling the performance checklist </h2> <p> Redis is developed with a great emphasis on performance. We do our best with every release to make sure you'll experience a very stable and fast product. </p> <p> Nevertheless, if you're finding room to improve the efficiency of Redis or are pursuing a performance regression investigation you will need a concise methodical way of monitoring and analyzing Redis 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> <p> We recommend the Utilization Saturation and Errors (USE) Method for answering the question of what is your bottleneck. Check the following mapping between system resource, metric, and tools for a practical deep dive: <a href="http://www.brendangregg.com/USEmethod/use-rosetta.html"> USE method </a> . </p> <h3 id="ensuring-the-cpu-is-your-bottleneck"> Ensuring the CPU is your bottleneck </h3> <p> This guide assumes you've followed one of the above methodologies to perform a complete check of system health, and identified the bottleneck being the CPU. <strong> If you have identified that most of the time is spent blocked on I/O, locks, timers, paging/swapping, etc., this guide is not for you </strong> . </p> <h3 id="build-prerequisites"> Build Prerequisites </h3> <p> For a proper On-CPU analysis, Redis (and any dynamically loaded library like Redis Modules) requires stack traces to be available to tracers, which you may need to fix first. </p> <p> By default, Redis is compiled with the <code> -O2 </code> switch (which we intent to keep during profiling). This means that compiler optimizations are enabled. Many compilers omit the frame pointer as a runtime optimization (saving a register), thus breaking frame pointer-based stack walking. This makes the Redis executable faster, but at the same time it makes Redis (like any other program) harder to trace, potentially wrongfully pinpointing on-CPU time to the last available frame pointer of a call stack that can get a lot deeper (but impossible to trace). </p> <p> It's important that you ensure that: </p> <ul> <li> debug information is present: compile option <code> -g </code> </li> <li> frame pointer register is present: <code> -fno-omit-frame-pointer </code> </li> <li> we still run with optimizations to get an accurate representation of production run times, meaning we will keep: <code> -O2 </code> </li> </ul> <p> You can do it as follows within redis main repo: </p> <pre><code>$ make REDIS_CFLAGS="-g -fno-omit-frame-pointer" </code></pre> <h2 id="a-set-of-instruments-to-identify-performance-regressions-andor-potential-on-cpu-performance-improvements"> A set of instruments to identify performance regressions and/or potential <strong> on-CPU performance </strong> improvements </h2> <p> This document focuses specifically on <strong> on-CPU </strong> resource bottlenecks analysis, meaning we're interested in understanding where threads are spending CPU cycles while running on-CPU and, as importantly, whether those cycles are effectively being used for computation or stalled waiting (not blocked!) for memory I/O, and cache misses, etc. </p> <p> For that we will rely on toolkits (perf, bcc tools), and hardware specific PMCs (Performance Monitoring Counters), to proceed with: </p> <ul> <li> <p> Hotspot analysis (perf or bcc tools): to profile code execution and determine which functions are consuming the most time and thus are targets for optimization. We'll present two options to collect, report, and visualize hotspots either with perf or bcc/BPF tracing tools. </p> </li> <li> <p> Call counts analysis: to count events including function calls, enabling us to correlate several calls/components at once, relying on bcc/BPF tracing tools. </p> </li> <li> <p> Hardware event sampling: crucial for understanding CPU behavior, including memory I/O, stall cycles, and cache misses. </p> </li> </ul> <h3 id="tool-prerequisites"> Tool prerequisites </h3> <p> The following steps rely on Linux perf_events (aka <a href="https://man7.org/linux/man-pages/man1/perf.1.html"> "perf" </a> ), <a href="https://github.com/iovisor/bcc"> bcc/BPF tracing tools </a> , and Brendan Greg’s <a href="https://github.com/brendangregg/FlameGraph"> FlameGraph repo </a> . </p> <p> We assume beforehand you have: </p> <ul> <li> Installed the perf tool on your system. Most Linux distributions will likely package this as a package related to the kernel. More information about the perf tool can be found at perf <a href="https://perf.wiki.kernel.org/"> wiki </a> . </li> <li> Followed the install <a href="https://github.com/iovisor/bcc/blob/master/INSTALL.md#installing-bcc"> bcc/BPF </a> instructions to install bcc toolkit on your machine. </li> <li> Cloned Brendan Greg’s <a href="https://github.com/brendangregg/FlameGraph"> FlameGraph repo </a> and made accessible the <code> difffolded.pl </code> and <code> flamegraph.pl </code> files, to generated the collapsed stack traces and Flame Graphs. </li> </ul> <h2 id="hotspot-analysis-with-perf-or-ebpf-stack-traces-sampling"> Hotspot analysis with perf or eBPF (stack traces sampling) </h2> <p> Profiling CPU usage by sampling stack traces at a timed interval is a fast and easy way to identify performance-critical code sections (hotspots). </p> <h3 id="sampling-stack-traces-using-perf"> Sampling stack traces using perf </h3> <p> To profile both user- and kernel-level stacks of redis-server for a specific length of time, for example 60 seconds, at a sampling frequency of 999 samples per second: </p> <pre><code>$ perf record -g --pid $(pgrep redis-server) -F 999 -- sleep 60 </code></pre> <h4 id="displaying-the-recorded-profile-information-using-perf-report"> Displaying the recorded profile information using perf report </h4> <p> By default perf record will generate a perf.data file in the current working directory. </p> <p> You can then report with a call-graph output (call chain, stack backtrace), with a minimum call graph inclusion threshold of 0.5%, with: </p> <pre><code>$ perf report -g "graph,0.5,caller" </code></pre> <p> See the <a href="https://man7.org/linux/man-pages/man1/perf-report.1.html"> perf report </a> documentation for advanced filtering, sorting and aggregation capabilities. </p> <h4 id="visualizing-the-recorded-profile-information-using-flame-graphs"> Visualizing the recorded profile information using Flame Graphs </h4> <p> <a href="http://www.brendangregg.com/flamegraphs.html"> Flame graphs </a> allow for a quick and accurate visualization of frequent code-paths. They can be generated using Brendan Greg's open source programs on <a href="https://github.com/brendangregg/FlameGraph"> github </a> , which create interactive SVGs from folded stack files. </p> <p> Specifically, for perf we need to convert the generated perf.data into the captured stacks, and fold each of them into single lines. You can then render the on-CPU flame graph with: </p> <pre><code>$ perf script &gt; redis.perf.stacks $ stackcollapse-perf.pl redis.perf.stacks &gt; redis.folded.stacks $ flamegraph.pl redis.folded.stacks &gt; redis.svg </code></pre> <p> By default, perf script will generate a perf.data file in the current working directory. See the <a href="https://linux.die.net/man/1/perf-script"> perf script </a> documentation for advanced usage. </p> <p> See <a href="https://github.com/brendangregg/FlameGraph#options"> FlameGraph usage options </a> for more advanced stack trace visualizations (like the differential one). </p> <h4 id="archiving-and-sharing-recorded-profile-information"> Archiving and sharing recorded profile information </h4> <p> So that analysis of the perf.data contents can be possible on a machine other than the one on which collection happened, you need to export along with the perf.data file all object files with build-ids found in the record data file. This can be easily done with the help of <a href="https://github.com/torvalds/linux/blob/master/tools/perf/perf-archive.sh"> perf-archive.sh </a> script: </p> <pre><code>$ perf-archive.sh perf.data </code></pre> <p> Now please run: </p> <pre><code>$ tar xvf perf.data.tar.bz2 -C ~/.debug </code></pre> <p> on the machine where you need to run <code> perf report </code> . </p> <h3 id="sampling-stack-traces-using-bccbpfs-profile"> Sampling stack traces using bcc/BPF's profile </h3> <p> Similarly to perf, as of Linux kernel 4.9, BPF-optimized profiling is now fully available with the promise of lower overhead on CPU (as stack traces are frequency counted in kernel context) and disk I/O resources during profiling. </p> <p> Apart from that, and relying solely on bcc/BPF's profile tool, we have also removed the perf.data and intermediate steps if stack traces analysis is our main goal. You can use bcc's profile tool to output folded format directly, for flame graph generation: </p> <pre><code>$ /usr/share/bcc/tools/profile -F 999 -f --pid $(pgrep redis-server) --duration 60 &gt; redis.folded.stacks </code></pre> <p> In that manner, we've remove any preprocessing and can render the on-CPU flame graph with a single command: </p> <pre><code>$ flamegraph.pl redis.folded.stacks &gt; redis.svg </code></pre> <h3 id="visualizing-the-recorded-profile-information-using-flame-graphs-1"> Visualizing the recorded profile information using Flame Graphs </h3> <h2 id="call-counts-analysis-with-bccbpf"> Call counts analysis with bcc/BPF </h2> <p> A function may consume significant CPU cycles either because its code is slow or because it's frequently called. To answer at what rate functions are being called, you can rely upon call counts analysis using BCC's <code> funccount </code> tool: </p> <pre><code>$ /usr/share/bcc/tools/funccount 'redis-server:(call*|*Read*|*Write*)' --pid $(pgrep redis-server) --duration 60 Tracing 64 functions for "redis-server:(call*|*Read*|*Write*)"... Hit Ctrl-C to end. FUNC COUNT call 334 handleClientsWithPendingWrites 388 clientInstallWriteHandler 388 postponeClientRead 514 handleClientsWithPendingReadsUsingThreads 735 handleClientsWithPendingWritesUsingThreads 735 prepareClientToWrite 1442 Detaching... </code></pre> <p> The above output shows that, while tracing, the Redis's call() function was called 334 times, handleClientsWithPendingWrites() 388 times, etc. </p> <h2 id="hardware-event-counting-with-performance-monitoring-counters-pmcs"> Hardware event counting with Performance Monitoring Counters (PMCs) </h2> <p> Many modern processors contain a performance monitoring unit (PMU) exposing Performance Monitoring Counters (PMCs). PMCs are crucial for understanding CPU behavior, including memory I/O, stall cycles, and cache misses, and provide low-level CPU performance statistics that aren't available anywhere else. </p> <p> The design and functionality of a PMU is CPU-specific and you should assess your CPU supported counters and features by using <code> perf list </code> . </p> <p> To calculate the number of instructions per cycle, the number of micro ops executed, the number of cycles during which no micro ops were dispatched, the number stalled cycles on memory, including a per memory type stalls, for the duration of 60s, specifically for redis process: </p> <pre><code>$ perf stat -e "cpu-clock,cpu-cycles,instructions,uops_executed.core,uops_executed.stall_cycles,cache-references,cache-misses,cycle_activity.stalls_total,cycle_activity.stalls_mem_any,cycle_activity.stalls_l3_miss,cycle_activity.stalls_l2_miss,cycle_activity.stalls_l1d_miss" --pid $(pgrep redis-server) -- sleep 60 Performance counter stats for process id '3038': 60046.411437 cpu-clock (msec) # 1.001 CPUs utilized 168991975443 cpu-cycles # 2.814 GHz (36.40%) 388248178431 instructions # 2.30 insn per cycle (45.50%) 443134227322 uops_executed.core # 7379.862 M/sec (45.51%) 30317116399 uops_executed.stall_cycles # 504.895 M/sec (45.51%) 670821512 cache-references # 11.172 M/sec (45.52%) 23727619 cache-misses # 3.537 % of all cache refs (45.43%) 30278479141 cycle_activity.stalls_total # 504.251 M/sec (36.33%) 19981138777 cycle_activity.stalls_mem_any # 332.762 M/sec (36.33%) 725708324 cycle_activity.stalls_l3_miss # 12.086 M/sec (36.33%) 8487905659 cycle_activity.stalls_l2_miss # 141.356 M/sec (36.32%) 10011909368 cycle_activity.stalls_l1d_miss # 166.736 M/sec (36.31%) 60.002765665 seconds time elapsed </code></pre> <p> It's important to know that there are two very different ways in which PMCs can be used (counting and sampling), and we've focused solely on PMCs counting for the sake of this analysis. Brendan Greg clearly explains it on the following <a href="http://www.brendangregg.com/blog/2017-05-04/the-pmcs-of-ec2.html"> link </a> . </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/oss_and_stack/management/optimization/cpu-profiling/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/databases/import-export/export-data/.html
<section class="prose w-full py-12 max-w-none"> <h1> Export data from a database </h1> <p class="text-lg -mt-5 mb-10"> You can export data to import it into a new database or to make a backup. This article shows how to do so. </p> <p> You can export the data from a specific database at any time. The following destinations are supported: </p> <ul> <li> FTP server </li> <li> SFTP server </li> <li> Amazon AWS S3 </li> <li> Local mount point </li> <li> Azure Blob Storage </li> <li> Google Cloud Storage </li> </ul> <p> If you export a database configured for database clustering, export files are created for each shard. </p> <h2 id="storage-space-requirements"> Storage space requirements </h2> <p> Before exporting data, verify that you have enough space available in the storage destination and on the local storage associated with the node hosting the database. </p> <p> Export is a two-step process: a temporary copy of the data is saved to the local storage of the node and then copied to the storage destination. (The temporary file is removed after the copy operation.) </p> <p> Export fails when there isn't enough space for either step. </p> <h2 id="export-database-data"> Export database data </h2> <p> To export data from a database using the Cluster Manager UI: </p> <ol> <li> <p> On the <strong> Databases </strong> screen, select the database from the list, then select <strong> Configuration </strong> . </p> </li> <li> <p> Click <a href="/docs/latest/images/rs/buttons/button-toggle-actions-vertical.png#no-click" sdata-lightbox="/images/rs/buttons/button-toggle-actions-vertical.png#no-click"> <img alt="Toggle actions button" class="inline" src="/docs/latest/images/rs/buttons/button-toggle-actions-vertical.png#no-click" width="22px"/> </a> to open a list of additional actions. </p> </li> <li> <p> Select <strong> Export </strong> . </p> </li> <li> <p> Select the tab that corresponds to your storage location type and enter the location details. </p> <p> See <a href="#supported-storage-locations"> Supported storage locations </a> for more information about each storage location type. </p> </li> <li> <p> Select <strong> Export </strong> . </p> </li> </ol> <h2 id="supported-storage-locations"> Supported storage locations </h2> <p> Data can be exported to a local mount point, transferred to <a href="https://en.wikipedia.org/wiki/Uniform_Resource_Identifier"> a URI </a> using FTP/SFTP, or stored on cloud provider storage. </p> <p> When saved to a local mount point or a cloud provider, export locations need to be available to <a href="/docs/latest/operate/rs/7.4/installing-upgrading/install/customize-user-and-group/"> the group and user </a> running Redis Enterprise Software, <code> redislabs:redislabs </code> by default. </p> <p> Redis Enterprise Software needs the ability to view permissions and update objects in the storage location. Implementation details vary according to the provider and your configuration. To learn more, consult the provider's documentation. </p> <p> The following sections provide general guidelines. Because provider features change frequently, use your provider's documentation for the latest info. </p> <h3 id="ftp-server"> FTP server </h3> <p> Before exporting data to an FTP server, verify that: </p> <ul> <li> Your Redis Enterprise cluster can connect and authenticate to the FTP server. </li> <li> The user specified in the FTP server location has permission to read and write files to the server. </li> </ul> <p> To export data to an FTP server, set <strong> Path </strong> using the following syntax: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl"><span class="o">[</span>protocol<span class="o">]</span>://<span class="o">[</span>username<span class="o">]</span>:<span class="o">[</span>password<span class="o">]</span>@<span class="o">[</span>host<span class="o">]</span>:<span class="o">[</span>port<span class="o">]</span>/<span class="o">[</span>path<span class="o">]</span>/ </span></span></code></pre> </div> <p> Where: </p> <ul> <li> <em> protocol </em> : the server's protocol, can be either <code> ftp </code> or <code> ftps </code> . </li> <li> <em> username </em> : your username, if needed. </li> <li> <em> password </em> : your password, if needed. </li> <li> <em> hostname </em> : the hostname or IP address of the server. </li> <li> <em> port </em> : the port number of the server, if needed. </li> <li> <em> path </em> : the export destination path, if needed. </li> </ul> <p> Example: <code> ftp://username:[email protected]/home/exports/ </code> </p> <h3 id="local-mount-point"> Local mount point </h3> <p> Before exporting data to a local mount point, verify that: </p> <ul> <li> The node can connect to the server hosting the mount point. </li> <li> The <code> redislabs:redislabs </code> user has permission to read and write files to the local mount point and to the destination server. </li> <li> The export location has enough disk space for your exported data. </li> </ul> <p> To export to a local mount point: </p> <ol> <li> <p> On each node in the cluster, create the mount point: </p> <ol> <li> <p> Connect to the node's terminal. </p> </li> <li> <p> Mount the remote storage to a local mount point. </p> <p> For example: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">sudo mount -t nfs 192.168.10.204:/DataVolume/Public /mnt/Public </span></span></code></pre> </div> </li> </ol> </li> <li> <p> In the path for the export location, enter the mount point. </p> <p> For example: <code> /mnt/Public </code> </p> </li> </ol> <h3 id="sftp-server"> SFTP server </h3> <p> Before exporting data to an SFTP server, make sure that: </p> <ul> <li> <p> Your Redis Enterprise cluster can connect and authenticate to the SFTP server. </p> </li> <li> <p> The user specified in the SFTP server location has permission to read and write files to the server. </p> </li> <li> <p> The SSH private keys are specified correctly. You can use the key generated by the cluster or specify a custom key. </p> <p> To use the cluster auto generated key: </p> <ol> <li> <p> Go to <strong> Cluster &gt; Security &gt; Certificates </strong> . </p> </li> <li> <p> Expand <strong> Cluster SSH Public Key </strong> . </p> </li> <li> <p> Download or copy the cluster SSH public key to the appropriate location on the SFTP server. </p> <p> Use the server documentation to determine the appropriate location for the SSH public key. </p> </li> </ol> </li> </ul> <p> To export data to an SFTP server, enter the SFTP server location in the format: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">sftp://<span class="o">[</span>username<span class="o">]</span>:<span class="o">[</span>password<span class="o">]</span>@<span class="o">[</span>host<span class="o">]</span>:<span class="o">[</span>port<span class="o">]</span>/<span class="o">[</span>path<span class="o">]</span>/ </span></span></code></pre> </div> <p> Where: </p> <ul> <li> <em> username </em> : your username, if needed. </li> <li> <em> password </em> : your password, if needed. </li> <li> <em> hostname </em> : the hostname or IP address of the server. </li> <li> <em> port </em> : the port number of the server, if needed. </li> <li> <em> path </em> : the export destination path, if needed. </li> </ul> <p> For example: <code> sftp://username:[email protected]/home/exports/ </code> </p> <h3 id="aws-simple-storage-service"> AWS Simple Storage Service </h3> <p> To export data to an <a href="https://aws.amazon.com/"> Amazon Web Services </a> (AWS) Simple Storage Service (S3) bucket: </p> <ol> <li> <p> Sign in to the <a href="https://console.aws.amazon.com/"> AWS console </a> . </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html"> Create an S3 bucket </a> if you do not already have one. </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_console"> Create an IAM User </a> with permission to add objects to the bucket. </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey"> Create an access key </a> for that user if you do not already have one. </p> </li> <li> <p> In the Redis Enterprise Software Cluster Manager UI, when you enter the export location details: </p> <ul> <li> <p> Select <strong> AWS S3 </strong> . </p> </li> <li> <p> In the <strong> Path </strong> field, enter the path of your bucket. </p> </li> <li> <p> In the <strong> Access key ID </strong> field, enter the access key ID. </p> </li> <li> <p> In the <strong> Secret access key </strong> field, enter the secret access key. </p> </li> </ul> </li> </ol> <p> You can also connect to a storage service that uses the S3 protocol but is not hosted by Amazon AWS. The storage service must have a valid SSL certificate. To connect to an S3-compatible storage location, run <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/config/"> <code> rladmin cluster config </code> </a> : </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster config s3_url &lt;URL&gt; </span></span></code></pre> </div> <p> Replace <code> &lt;URL&gt; </code> with the hostname or IP address of the S3-compatible storage location. </p> <h3 id="google-cloud-storage"> Google Cloud Storage </h3> <p> To export to a <a href="https://developers.google.com/console/"> Google Cloud </a> storage bucket: </p> <ol> <li> <p> Sign in to the Google Cloud console. </p> </li> <li> <p> <a href="https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating"> Create a JSON service account key </a> if you do not already have one. </p> </li> <li> <p> <a href="https://cloud.google.com/storage/docs/creating-buckets#create_a_new_bucket"> Create a bucket </a> if you do not already have one. </p> </li> <li> <p> <a href="https://cloud.google.com/storage/docs/access-control/using-iam-permissions#bucket-add"> Add a principal </a> to your bucket: </p> <ul> <li> <p> In the <strong> New principals </strong> field, add the <code> client_email </code> from the service account key. </p> </li> <li> <p> Select "Storage Legacy Bucket Writer" from the <strong> Role </strong> list. </p> </li> </ul> </li> <li> <p> In the Redis Enterprise Software Cluster Manager UI, when you enter the export location details: </p> <ul> <li> <p> Select <strong> Google Cloud Storage </strong> . </p> </li> <li> <p> In the <strong> Path </strong> field, enter the path of your bucket. </p> </li> <li> <p> In the <strong> Client ID </strong> field, enter the <code> client_id </code> from the service account key. </p> </li> <li> <p> In the <strong> Client Email </strong> field, enter the <code> client_email </code> from the service account key. </p> </li> <li> <p> In the <strong> Private Key ID </strong> field, enter the <code> private_key_id </code> from the service account key. </p> </li> <li> <p> In the <strong> Private key </strong> field, enter the <code> private_key </code> from the service account key. Replace <code> \n </code> with new lines. </p> </li> </ul> </li> </ol> <h3 id="azure-blob-storage"> Azure Blob Storage </h3> <p> To export to Microsoft Azure Blob Storage, sign in to the Azure portal and then: </p> <ol> <li> <p> <a href="https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create"> Create an Azure Storage account </a> if you do not already have one. </p> </li> <li> <p> <a href="https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container"> Create a container </a> if you do not already have one. </p> </li> <li> <p> <a href="https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage"> Manage storage account access keys </a> to find the storage account name and account keys. </p> </li> <li> <p> In the Redis Enterprise Software Cluster Manager UI, when you enter the export location details: </p> <ul> <li> <p> Select <strong> Azure Blob Storage </strong> . </p> </li> <li> <p> In the <strong> Path </strong> field, enter the path of your bucket. </p> </li> <li> <p> In the <strong> Account name </strong> field, enter your storage account name. </p> </li> <li> <p> In the <strong> Account key </strong> field, enter the storage account key. </p> </li> </ul> </li> </ol> <p> To learn more, see <a href="https://docs.microsoft.com/en-us/azure/storage/common/storage-auth"> Authorizing access to data in Azure Storage </a> . </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/databases/import-export/export-data/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/node/addr/.html
<section class="prose w-full py-12 max-w-none"> <h1> rladmin node addr set </h1> <p class="text-lg -mt-5 mb-10"> Sets a node's internal IP address. </p> <p> Sets the internal IP address of a node. You can only set the internal IP address when the node is down. See <a href="/docs/latest/operate/rs/networking/multi-ip-ipv6/#change-internal-ip-address"> Change internal IP address </a> for detailed instructions. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin node &lt;ID&gt; addr <span class="nb">set</span> &lt;IP address&gt; </span></span></code></pre> </div> <h3 id="parameters"> Parameters </h3> <table> <thead> <tr> <th> Parameter </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> node </td> <td> integer </td> <td> Sets the internal IP address of the specified node </td> </tr> <tr> <td> addr </td> <td> IP address </td> <td> Sets the node's internal IP address to the specified IP address </td> </tr> </tbody> </table> <h3 id="returns"> Returns </h3> <p> Returns <code> Updated successfully </code> if the IP address was set. Otherwise, it returns an error. </p> <p> Use <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/status/#status-nodes"> <code> rladmin status nodes </code> </a> to verify the internal IP address was changed. </p> <h3 id="example"> Example </h3> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ rladmin status nodes </span></span><span class="line"><span class="cl">CLUSTER NODES: </span></span><span class="line"><span class="cl">NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS </span></span><span class="line"><span class="cl">*node:1 master 192.0.2.2 3d99db1fdf4b 5/100 <span class="m">6</span> 16.06GB/19.54GB 12.46GB/16.02GB 6.2.12-37 OK </span></span><span class="line"><span class="cl">node:2 slave 192.0.2.3 fc7a3d332458 0/100 <span class="m">6</span> -/19.54GB -/16.02GB 6.2.12-37 DOWN, last seen 33s ago </span></span><span class="line"><span class="cl">node:3 slave 192.0.2.4 b87cc06c830f 5/120 <span class="m">6</span> 16.06GB/19.54GB 12.46GB/16.02GB 6.2.12-37 OK </span></span><span class="line"><span class="cl">$ rladmin node <span class="m">2</span> addr <span class="nb">set</span> 192.0.2.5 </span></span><span class="line"><span class="cl">Updated successfully. </span></span><span class="line"><span class="cl">$ rladmin status nodes </span></span><span class="line"><span class="cl">CLUSTER NODES: </span></span><span class="line"><span class="cl">NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS </span></span><span class="line"><span class="cl">*node:1 master 192.0.2.2 3d99db1fdf4b 5/100 <span class="m">6</span> 14.78GB/19.54GB 11.18GB/16.02GB 6.2.12-37 OK </span></span><span class="line"><span class="cl">node:2 slave 192.0.2.5 fc7a3d332458 0/100 <span class="m">6</span> 14.78GB/19.54GB 11.26GB/16.02GB 6.2.12-37 OK </span></span><span class="line"><span class="cl">node:3 slave 192.0.2.4 b87cc06c830f 5/120 <span class="m">6</span> 14.78GB/19.54GB 11.18GB/16.02GB 6.2.12-37 OK </span></span></code></pre> </div> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/node/addr/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/groupconnection.html
<section class="prose w-full py-12"> <h1> Commands </h1> </section>
https://redis.io/docs/latest/commands/bgsave/.html
<section class="prose w-full py-12"> <h1 class="command-name"> BGSAVE </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">BGSAVE [SCHEDULE]</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 1.0.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(1) </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @admin </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> <code> @dangerous </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Save the DB in background. </p> <p> Normally the OK code is immediately returned. Redis forks, the parent continues to serve the clients, the child saves the DB on disk then exits. </p> <p> An error is returned if there is already a background save running or if there is another non-background-save process running, specifically an in-progress AOF rewrite. </p> <p> If <code> BGSAVE SCHEDULE </code> is used, the command will immediately return <code> OK </code> when an AOF rewrite is in progress and schedule the background save to run at the next opportunity. </p> <p> A client may be able to check if the operation succeeded using the <a href="/docs/latest/commands/lastsave/"> <code> LASTSAVE </code> </a> command. </p> <p> See the <a href="/docs/latest/operate/oss_and_stack/management/persistence/"> persistence documentation </a> for detailed information. </p> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <p> One of the following: </p> <ul> <li> <a href="../../develop/reference/protocol-spec#simple-strings"> Simple string reply </a> : <code> Background saving started </code> . </li> <li> <a href="../../develop/reference/protocol-spec#simple-strings"> Simple string reply </a> : <code> Background saving scheduled </code> . </li> </ul> <br/> <h2> History </h2> <ul> <li> Starting with Redis version 3.2.2: Added the <code> SCHEDULE </code> option. </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/bgsave/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/jwt_authorize/.html
<section class="prose w-full py-12 max-w-none"> <h1> JWT authorize object </h1> <p class="text-lg -mt-5 mb-10"> An object for user authentication or a JW token refresh request </p> <p> An API object for user authentication or a JW token refresh request. </p> <table> <thead> <tr> <th> Name </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> password </td> <td> string </td> <td> The user’s password (required) </td> </tr> <tr> <td> ttl </td> <td> integer (range: 1-86400) (default: 300) </td> <td> Time to live - The amount of time in seconds the token will be valid </td> </tr> <tr> <td> username </td> <td> string </td> <td> The user’s username (required) </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/jwt_authorize/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/release-notes/rs-7-2-4-releases/rs-7-2-4-72/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise Software release notes 7.2.4-72 (October 2023) </h1> <p class="text-lg -mt-5 mb-10"> New Cluster Manager UI enhancements - database upgrade configuration, database defaults, user lockout parameters, and TLS configuration improvements. </p> <p> This is a maintenance release for ​ <a href="https://redis.com/redis-enterprise-software/download-center/software/"> ​Redis Enterprise Software version 7.2.4 </a> . </p> <h2 id="highlights"> Highlights </h2> <p> This version offers: </p> <ul> <li> New Cluster Manager UI enhancements </li> </ul> <h2 id="new-in-this-release"> New in this release </h2> <h3 id="enhancements"> Enhancements </h3> <ul> <li> <p> New Cluster Manager UI enhancements: </p> <ul> <li> <p> <a href="/docs/latest/operate/rs/databases/configure/db-upgrade/"> Database upgrade configuration </a> - cluster-wide policies that affect default database upgrades </p> </li> <li> <p> <a href="/docs/latest/operate/rs/databases/configure/db-defaults/"> Database defaults </a> - cluster-wide policies that determine default settings when creating new databases </p> </li> <li> <p> <a href="/docs/latest/operate/rs/security/access-control/manage-users/login-lockout/"> User lockout parameters </a> - locks user accounts after excessive failed login attempts </p> </li> <li> <p> <a href="/docs/latest/operate/rs/security/encryption/tls/enable-tls/"> TLS configuration </a> improvements </p> </li> </ul> </li> </ul> <h4 id="redis-modules"> Redis modules </h4> <p> Redis Enterprise Software version 7.2.4-72 includes the following Redis Stack modules (no changes since <a href="/docs/latest/operate/rs/release-notes/rs-7-2-4-releases/rs-7-2-4-52/"> Redis Enterprise Software version 7.2.4-52 </a> : </p> <ul> <li> <p> <a href="https://github.com/RediSearch/RediSearch/releases/tag/v2.8.4"> RediSearch 2.8.4 </a> </p> </li> <li> <p> <a href="https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.6"> RedisJSON 2.6.6 </a> </p> </li> <li> <p> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.4"> RedisTimeSeries 1.10.4 </a> </p> </li> <li> <p> <a href="https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.3"> RedisBloom 2.6.3 </a> </p> </li> <li> <p> <a href="https://github.com/RedisGears/RedisGears/releases/tag/v2.0.11-m12"> RedisGears 2.0.11 </a> </p> </li> </ul> <h3 id="resolved-issues"> Resolved issues </h3> <ul> <li> <p> RS107463 - Fixed "user with that email already exists" error for API requests that create a user with <code> email </code> set to an empty string. </p> </li> <li> <p> RS109810 - Added missing information for <code> sys_info </code> files in 7.2.4 cluster support packages. </p> </li> <li> <p> RS108515 - Added missing license fields to support packages. </p> </li> <li> <p> RS102497 - Removed ICMP communication from installation, upgrade, and <code> rladmin status </code> . </p> </li> </ul> <h2 id="version-changes"> Version changes </h2> <h3 id="supported-platforms"> Supported platforms </h3> <p> The following table provides a snapshot of supported platforms as of this Redis Enterprise Software release. See the <a href="/docs/latest/operate/rs/references/supported-platforms/"> supported platforms reference </a> for more details about operating system compatibility. </p> <p> <span title="Check mark icon"> ✅ </span> Supported – The platform is supported for this version of Redis Enterprise Software. </p> <p> <span title="Warning icon"> ⚠️ </span> Deprecated – The platform is still supported for this version of Redis Enterprise Software, but support will be removed in a future release. </p> <p> <span title="X icon"> ❌ </span> End of life – Platform support ended in this version of Redis Enterprise Software. </p> <table> <thead> <tr> <th> Redis Enterprise </th> <th> 7.2.4 </th> <th> 6.4.2 </th> <th> 6.2.18 </th> <th> 6.2.12 </th> <th> 6.2.10 </th> <th> 6.2.8 </th> <th> 6.2.4 </th> </tr> </thead> <tbody> <tr> <td> <strong> Release date </strong> </td> <td> Aug <br/> 2023 </td> <td> Feb <br/> 2023 </td> <td> Sept <br/> 2022 </td> <td> Aug <br/> 2022 </td> <td> Feb <br/> 2022 </td> <td> Oct <br/> 2021 </td> <td> Aug <br/> 2021 </td> </tr> <tr> <td> <a href="/docs/latest/operate/rs/installing-upgrading/product-lifecycle/#endoflife-schedule"> <strong> End-of-life date </strong> </a> </td> <td> – </td> <td> Feb <br/> 2025 </td> <td> Aug <br/> 2024 </td> <td> Aug <br/> 2024 </td> <td> Aug <br/> 2024 </td> <td> Aug <br/> 2024 </td> <td> Aug <br/> 2024 </td> </tr> <tr> <td> <strong> Ubuntu </strong> <sup> <a href="#table-note-1"> 1 </a> </sup> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> 20.04 </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> <sup> <a href="#table-note-6"> 6 </a> </sup> </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> </tr> <tr> <td> 18.04 </td> <td> <span title="Deprecated"> ⚠️ </span> </td> <td> <span title="Supported"> <span title="Supported"> ✅ </span> </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> 16.04 </td> <td> <span title="End of life"> ❌ </span> </td> <td> <span title="Deprecated"> ⚠️ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> <strong> RHEL &amp; CentOS </strong> <sup> <a href="#table-note-2"> 2 </a> </sup> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> 8.8 </td> <td> <span title="Supported"> ✅ </span> </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> </tr> <tr> <td> 8.7 </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> </tr> <tr> <td> 8.5-8.6 </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> – </td> <td> – </td> </tr> <tr> <td> 8.0-8.4 </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> – </td> </tr> <tr> <td> 7.0-7.9 </td> <td> <span title="Deprecated"> ⚠️ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> <strong> Oracle Linux </strong> <sup> <a href="#table-note-3"> 3 </a> </sup> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> 8 </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> – </td> <td> – </td> </tr> <tr> <td> 7 </td> <td> <span title="Deprecated"> ⚠️ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> <strong> Rocky Linux </strong> <sup> <a href="#table-note-3"> 3 </a> </sup> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> 8 </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> </tr> <tr> <td> <strong> Amazon Linux </strong> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> 2 </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> <sup> <a href="#table-note-7"> 7 </a> </sup> </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> </tr> <tr> <td> 1 </td> <td> <span title="Deprecated"> ⚠️ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> <strong> Docker </strong> <sup> <a href="#table-note-4"> 4 </a> </sup> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> <strong> Kubernetes </strong> <sup> <a href="#table-note-5"> 5 </a> </sup> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> </tr> </tbody> </table> <ol> <li> <p> <a name="table-note-1" style="display: block; height: 80px; margin-top: -80px;"> </a> The server version of Ubuntu is recommended for production installations. The desktop version is only recommended for development deployments. </p> </li> <li> <p> <a name="table-note-2" style="display: block; height: 80px; margin-top: -80px;"> </a> RHEL and CentOS deployments require OpenSSL 1.0.2 and <a href="/docs/latest/operate/rs/installing-upgrading/configuring/centos-rhel-firewall/"> firewall configuration </a> . </p> </li> <li> <p> <a name="table-note-3" style="display: block; height: 80px; margin-top: -80px;"> </a> Based on the corresponding RHEL version. </p> </li> <li> <p> <a name="table-note-4" style="display: block; height: 80px; margin-top: -80px;"> </a> <a href="/docs/latest/operate/rs/installing-upgrading/quickstarts/docker-quickstart/"> Docker images </a> of Redis Enterprise Software are certified for development and testing only. </p> </li> <li> <p> <a name="table-note-5" style="display: block; height: 80px; margin-top: -80px;"> </a> See the <a href="/docs/latest/operate/kubernetes/"> Redis Enterprise for Kubernetes documentation </a> . </p> </li> <li> <p> <a name="table-note-6" style="display: block; height: 80px; margin-top: -80px;"> </a> Ubuntu 20.04 support was added in Redis Enterprise Software <a href="/docs/latest/operate/rs/release-notes/rs-6-4-2-releases/rs-6-4-2-43/"> 6.4.2-43 </a> . </p> </li> <li> <p> <a name="table-note-7" style="display: block; height: 80px; margin-top: -80px;"> </a> A release candidate for Amazon Linux 2 support was added in Redis Enterprise Software <a href="/docs/latest/operate/rs/release-notes/rs-6-4-2-releases/rs-6-4-2-61/"> 6.4.2-61 </a> . Official support for Amazon Linux 2 was added in Redis Enterprise Software <a href="/docs/latest/operate/rs/release-notes/rs-6-4-2-releases/rs-6-4-2-69/"> 6.4.2-69 </a> . </p> </li> </ol> <h2 id="downloads"> Downloads </h2> <p> The following table shows the MD5 checksums for the available packages: </p> <table> <thead> <tr> <th> Package </th> <th> MD5 checksum (7.2.4-72 October release) </th> </tr> </thead> <tbody> <tr> <td> Ubuntu 18 </td> <td> 8a26e0983daa266d39e1f45248f5be3b </td> </tr> <tr> <td> Ubuntu 20 </td> <td> dccab4ee04daffa2354e1faa3fbd14d2 </td> </tr> <tr> <td> RedHat Enterprise Linux (RHEL) 7 <br/> Oracle Enterprise Linux (OL) 7 </td> <td> 79ded85fd19cb675b363ed7be3543082 </td> </tr> <tr> <td> RedHat Enterprise Linux (RHEL) 8 <br/> Oracle Enterprise Linux (OL) 8 <br/> Rocky Enterprise Linux </td> <td> 0b5681f346761e4ff38efc266608857f </td> </tr> <tr> <td> Amazon Linux 2 </td> <td> b5cc186da8b84329e9838339a8736397 </td> </tr> </tbody> </table> <h2 id="known-issues"> Known issues </h2> <ul> <li> <p> RS110481 - Importing a database mid-upgrade fails when the master node has the new version. </p> <p> As a workaround, either finish the upgrade before retrying the import, or move the master node to an old node, then perform the upgrade. </p> </li> </ul> <h2 id="security"> Security </h2> <h4 id="open-source-redis-security-fixes-compatibility"> Open source Redis security fixes compatibility </h4> <p> As part of Redis's commitment to security, Redis Enterprise Software implements the latest <a href="https://github.com/redis/redis/releases"> security fixes </a> available with <a href="https://github.com/redis/redis"> open source Redis </a> . Redis Enterprise has already included the fixes for the relevant CVEs. </p> <p> Some CVEs announced for open source Redis do not affect Redis Enterprise due to different or additional functionality available in Redis Enterprise that is not available in open source Redis. </p> <p> Redis Enterprise 7.2.4-64 supports open source Redis 7.2, 6.2, and 6.0. Below is the list of open source Redis CVEs fixed by version. </p> <p> Redis 7.2.x: </p> <ul> <li> <p> (CVE-2023-41056) In some cases, Redis may incorrectly handle resizing of memory buffers, which can result in incorrect accounting of buffer sizes and lead to heap overflow and potential remote code execution. </p> </li> <li> <p> (CVE-2023-41053) Redis does not correctly identify keys accessed by <code> SORT_RO </code> and, as a result, may grant users executing this command access to keys that are not explicitly authorized by the ACL configuration. (Redis 7.2.1) </p> </li> </ul> <p> Redis 7.0.x: </p> <ul> <li> <p> (CVE-2023-41056) In some cases, Redis may incorrectly handle resizing of memory buffers, which can result in incorrect accounting of buffer sizes and lead to heap overflow and potential remote code execution. </p> </li> <li> <p> (CVE-2023-41053) Redis does not correctly identify keys accessed by <code> SORT_RO </code> and, as a result, may grant users executing this command access to keys that are not explicitly authorized by the ACL configuration. (Redis 7.0.13) </p> </li> <li> <p> (CVE-2023-36824) Extracting key names from a command and a list of arguments may, in some cases, trigger a heap overflow and result in reading random heap memory, heap corruption, and potentially remote code execution. Specifically: using <code> COMMAND GETKEYS* </code> and validation of key names in ACL rules. (Redis 7.0.12) </p> </li> <li> <p> (CVE-2023-28856) Authenticated users can use the <code> HINCRBYFLOAT </code> command to create an invalid hash field that will crash Redis on access. (Redis 7.0.11) </p> </li> <li> <p> (CVE-2023-28425) Specially crafted <code> MSETNX </code> command can lead to assertion and denial-of-service. (Redis 7.0.10) </p> </li> <li> <p> (CVE-2023-25155) Specially crafted <code> SRANDMEMBER </code> , <code> ZRANDMEMBER </code> , and <code> HRANDFIELD </code> commands can trigger an integer overflow, resulting in a runtime assertion and termination of the Redis server process. (Redis 7.0.9) </p> </li> <li> <p> (CVE-2023-22458) Integer overflow in the Redis <code> HRANDFIELD </code> and <code> ZRANDMEMBER </code> commands can lead to denial-of-service. (Redis 7.0.8) </p> </li> <li> <p> (CVE-2022-36021) String matching commands (like <code> SCAN </code> or <code> KEYS </code> ) with a specially crafted pattern to trigger a denial-of-service attack on Redis, causing it to hang and consume 100% CPU time. (Redis 7.0.9) </p> </li> <li> <p> (CVE-2022-35977) Integer overflow in the Redis <code> SETRANGE </code> and <code> SORT </code> / <code> SORT_RO </code> commands can drive Redis to OOM panic. (Redis 7.0.8) </p> </li> <li> <p> (CVE-2022-35951) Executing an <code> XAUTOCLAIM </code> command on a stream key in a specific state, with a specially crafted <code> COUNT </code> argument, may cause an integer overflow, a subsequent heap overflow, and potentially lead to remote code execution. The problem affects Redis versions 7.0.0 or newer. (Redis 7.0.5) </p> </li> <li> <p> (CVE-2022-31144) A specially crafted <code> XAUTOCLAIM </code> command on a stream key in a specific state may result in heap overflow and potentially remote code execution. The problem affects Redis versions 7.0.0 or newer. (Redis 7.0.4) </p> </li> <li> <p> (CVE-2022-24834) A specially crafted Lua script executing in Redis can trigger a heap overflow in the cjson and cmsgpack libraries, and result in heap corruption and potentially remote code execution. The problem exists in all versions of Redis with Lua scripting support, starting from 2.6, and affects only authenticated and authorized users. (Redis 7.0.12) </p> </li> <li> <p> (CVE-2022-24736) An attacker attempting to load a specially crafted Lua script can cause NULL pointer dereference which will result in a crash of the <code> redis-server </code> process. This issue affects all versions of Redis. (Redis 7.0.0) </p> </li> <li> <p> (CVE-2022-24735) By exploiting weaknesses in the Lua script execution environment, an attacker with access to Redis can inject Lua code that will execute with the (potentially higher) privileges of another Redis user. (Redis 7.0.0) </p> </li> </ul> <p> Redis 6.2.x: </p> <ul> <li> <p> (CVE-2023-28856) Authenticated users can use the <code> HINCRBYFLOAT </code> command to create an invalid hash field that will crash Redis on access. (Redis 6.2.12) </p> </li> <li> <p> (CVE-2023-25155) Specially crafted <code> SRANDMEMBER </code> , <code> ZRANDMEMBER </code> , and <code> HRANDFIELD </code> commands can trigger an integer overflow, resulting in a runtime assertion and termination of the Redis server process. (Redis 6.2.11) </p> </li> <li> <p> (CVE-2023-22458) Integer overflow in the Redis <code> HRANDFIELD </code> and <code> ZRANDMEMBER </code> commands can lead to denial-of-service. (Redis 6.2.9) </p> </li> <li> <p> (CVE-2022-36021) String matching commands (like <code> SCAN </code> or <code> KEYS </code> ) with a specially crafted pattern to trigger a denial-of-service attack on Redis, causing it to hang and consume 100% CPU time. (Redis 6.2.11) </p> </li> <li> <p> (CVE-2022-35977) Integer overflow in the Redis <code> SETRANGE </code> and <code> SORT </code> / <code> SORT_RO </code> commands can drive Redis to OOM panic. (Redis 6.2.9) </p> </li> <li> <p> (CVE-2022-24834) A specially crafted Lua script executing in Redis can trigger a heap overflow in the cjson and cmsgpack libraries, and result in heap corruption and potentially remote code execution. The problem exists in all versions of Redis with Lua scripting support, starting from 2.6, and affects only authenticated and authorized users. (Redis 6.2.13) </p> </li> <li> <p> (CVE-2022-24736) An attacker attempting to load a specially crafted Lua script can cause NULL pointer dereference which will result in a crash of the <code> redis-server </code> process. This issue affects all versions of Redis. (Redis 6.2.7) </p> </li> <li> <p> (CVE-2022-24735) By exploiting weaknesses in the Lua script execution environment, an attacker with access to Redis can inject Lua code that will execute with the (potentially higher) privileges of another Redis user. (Redis 6.2.7) </p> </li> <li> <p> (CVE-2021-41099) Integer to heap buffer overflow handling certain string commands and network payloads, when <code> proto-max-bulk-len </code> is manually configured to a non-default, very large value. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32762) Integer to heap buffer overflow issue in <code> redis-cli </code> and <code> redis-sentinel </code> parsing large multi-bulk replies on some older and less common platforms. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32761) An integer overflow bug in Redis version 2.2 or newer can be exploited using the <code> BITFIELD </code> command to corrupt the heap and potentially result with remote code execution. (Redis 6.2.5) </p> </li> <li> <p> (CVE-2021-32687) Integer to heap buffer overflow with intsets, when <code> set-max-intset-entries </code> is manually configured to a non-default, very large value. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32675) Denial Of Service when processing RESP request payloads with a large number of elements on many connections. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32672) Random heap reading issue with Lua Debugger. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32628) Integer to heap buffer overflow handling ziplist-encoded data types, when configuring a large, non-default value for <code> hash-max-ziplist-entries </code> , <code> hash-max-ziplist-value </code> , <code> zset-max-ziplist-entries </code> or <code> zset-max-ziplist-value </code> . (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32627) Integer to heap buffer overflow issue with streams, when configuring a non-default, large value for <code> proto-max-bulk-len </code> and <code> client-query-buffer-limit </code> . (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32626) Specially crafted Lua scripts may result with Heap buffer overflow. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32625) An integer overflow bug in Redis version 6.0 or newer can be exploited using the STRALGO LCS command to corrupt the heap and potentially result with remote code execution. This is a result of an incomplete fix by CVE-2021-29477. (Redis 6.2.4) </p> </li> <li> <p> (CVE-2021-29478) An integer overflow bug in Redis 6.2 could be exploited to corrupt the heap and potentially result with remote code execution. The vulnerability involves changing the default set-max-intset-entries configuration value, creating a large set key that consists of integer values and using the COPY command to duplicate it. The integer overflow bug exists in all versions of Redis starting with 2.6, where it could result with a corrupted RDB or DUMP payload, but not exploited through COPY (which did not exist before 6.2). (Redis 6.2.3) </p> </li> <li> <p> (CVE-2021-29477) An integer overflow bug in Redis version 6.0 or newer could be exploited using the STRALGO LCS command to corrupt the heap and potentially result in remote code execution. The integer overflow bug exists in all versions of Redis starting with 6.0. (Redis 6.2.3) </p> </li> </ul> <p> Redis 6.0.x: </p> <ul> <li> <p> (CVE-2022-24834) A specially crafted Lua script executing in Redis can trigger a heap overflow in the cjson and cmsgpack libraries, and result in heap corruption and potentially remote code execution. The problem exists in all versions of Redis with Lua scripting support, starting from 2.6, and affects only authenticated and authorized users. (Redis 6.0.20) </p> </li> <li> <p> (CVE-2023-28856) Authenticated users can use the <code> HINCRBYFLOAT </code> command to create an invalid hash field that will crash Redis on access. (Redis 6.0.19) </p> </li> <li> <p> (CVE-2023-25155) Specially crafted <code> SRANDMEMBER </code> , <code> ZRANDMEMBER </code> , and <code> HRANDFIELD </code> commands can trigger an integer overflow, resulting in a runtime assertion and termination of the Redis server process. (Redis 6.0.18) </p> </li> <li> <p> (CVE-2022-36021) String matching commands (like <code> SCAN </code> or <code> KEYS </code> ) with a specially crafted pattern to trigger a denial-of-service attack on Redis, causing it to hang and consume 100% CPU time. (Redis 6.0.18) </p> </li> <li> <p> (CVE-2022-35977) Integer overflow in the Redis <code> SETRANGE </code> and <code> SORT </code> / <code> SORT_RO </code> commands can drive Redis to OOM panic. (Redis 6.0.17) </p> </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/release-notes/rs-7-2-4-releases/rs-7-2-4-72/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/ts.mrevrange/.html
<section class="prose w-full py-12"> <h1 class="command-name"> TS.MREVRANGE </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">TS.MREVRANGE fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS ts...] [FILTER_BY_VALUE min max] [WITHLABELS | &lt;SELECTED_LABELS label...&gt;] [COUNT count] [[ALIGN align] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]] FILTER filterExpr... [GROUPBY label REDUCE reducer] </pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available in: </dt> <dd class="m-0"> <a href="/docs/stack"> Redis Stack </a> / <a href="/docs/data-types/timeseries"> TimeSeries 1.4.0 </a> </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(n/m+k) where n = Number of data points, m = Chunk size (data points per chunk), k = Number of data points that are in the requested ranges </dd> </dl> <p> Query a range across multiple time series by filters in the reverse direction </p> <p> <a href="#examples"> Examples </a> </p> <h2 id="required-arguments"> Required arguments </h2> <details open=""> <summary> <code> fromTimestamp </code> </summary> <p> is the start timestamp for the range query (integer Unix timestamp in milliseconds) or <code> - </code> to denote the timestamp of the earliest sample among all the time series that passes <code> FILTER filterExpr... </code> . </p> </details> <details open=""> <summary> <code> toTimestamp </code> </summary> <p> is the end timestamp for the range query (integer Unix timestamp in milliseconds) or <code> + </code> to denote the timestamp of the latest sample among all the time series that passes <code> FILTER filterExpr... </code> . </p> </details> <details open=""> <summary> <code> FILTER filterExpr... </code> </summary> <p> filters time series based on their labels and label values. Each filter expression has one of the following syntaxes: </p> <ul> <li> <code> label!= </code> - the time series has a label named <code> label </code> </li> <li> <code> label=value </code> - the time series has a label named <code> label </code> with a value equal to <code> value </code> </li> <li> <code> label=(value1,value2,...) </code> - the time series has a label named <code> label </code> with a value equal to one of the values in the list </li> <li> <code> label= </code> - the time series does not have a label named <code> label </code> </li> <li> <code> label!=value </code> - the time series does not have a label named <code> label </code> with a value equal to <code> value </code> </li> <li> <code> label!=(value1,value2,...) </code> - the time series does not have a label named <code> label </code> with a value equal to any of the values in the list </li> </ul> <p> <note> <b> Notes: </b> </note> </p> <ul> <li> At least one filter expression with a syntax <code> label=value </code> or <code> label=(value1,value2,...) </code> is required. </li> <li> Filter expressions are conjunctive. For example, the filter <code> type=temperature room=study </code> means that a time series is a temperature time series of a study room. </li> <li> Whitespaces are unallowed in a filter expression except between quotes or double quotes in values - e.g., <code> x="y y" </code> or <code> x='(y y,z z)' </code> . </li> </ul> </details> <h2 id="optional-arguments"> Optional arguments </h2> <details open=""> <summary> <code> LATEST </code> (since RedisTimeSeries v1.8) </summary> <p> is used when a time series is a compaction. With <code> LATEST </code> , TS.MREVRANGE also reports the compacted value of the latest (possibly partial) bucket, given that this bucket's start time falls within <code> [fromTimestamp, toTimestamp] </code> . Without <code> LATEST </code> , TS.MREVRANGE does not report the latest (possibly partial) bucket. When a time series is not a compaction, <code> LATEST </code> is ignored. </p> <p> The data in the latest bucket of a compaction is possibly partial. A bucket is <em> closed </em> and compacted only upon the arrival of a new sample that <em> opens </em> a new <em> latest </em> bucket. There are cases, however, when the compacted value of the latest (possibly partial) bucket is also required. In such a case, use <code> LATEST </code> . </p> </details> <details open=""> <summary> <code> FILTER_BY_TS ts... </code> (since RedisTimeSeries v1.6) </summary> <p> filters samples by a list of specific timestamps. A sample passes the filter if its exact timestamp is specified and falls within <code> [fromTimestamp, toTimestamp] </code> . </p> <p> When used together with <code> AGGREGATION </code> : samples are filtered before being aggregated. </p> </details> <details open=""> <summary> <code> FILTER_BY_VALUE min max </code> (since RedisTimeSeries v1.6) </summary> <p> filters samples by minimum and maximum values. </p> <p> When used together with <code> AGGREGATION </code> : samples are filtered before being aggregated. </p> </details> <details open=""> <summary> <code> WITHLABELS </code> </summary> <p> includes in the reply all label-value pairs representing metadata labels of the time series. If <code> WITHLABELS </code> or <code> SELECTED_LABELS </code> are not specified, by default, an empty list is reported as label-value pairs. </p> </details> <details open=""> <summary> <code> SELECTED_LABELS label... </code> (since RedisTimeSeries v1.6) </summary> <p> returns a subset of the label-value pairs that represent metadata labels of the time series. Use when a large number of labels exists per series, but only the values of some of the labels are required. If <code> WITHLABELS </code> or <code> SELECTED_LABELS </code> are not specified, by default, an empty list is reported as label-value pairs. </p> </details> <details open=""> <summary> <code> COUNT count </code> </summary> <p> When used without <code> AGGREGATION </code> : limits the number of reported samples per time series. </p> <p> When used together with <code> AGGREGATION </code> : limits the number of reported buckets. </p> </details> <details open=""> <summary> <code> ALIGN align </code> (since RedisTimeSeries v1.6) </summary> <p> is a time bucket alignment control for <code> AGGREGATION </code> . It controls the time bucket timestamps by changing the reference timestamp on which a bucket is defined. </p> <p> Values include: </p> <ul> <li> <code> start </code> or <code> - </code> : The reference timestamp will be the query start interval time ( <code> fromTimestamp </code> ) which can't be <code> - </code> </li> <li> <code> end </code> or <code> + </code> : The reference timestamp will be the query end interval time ( <code> toTimestamp </code> ) which can't be <code> + </code> </li> <li> A specific timestamp: align the reference timestamp to a specific time </li> </ul> <p> <note> <b> Note: </b> When not provided, alignment is set to <code> 0 </code> . </note> </p> </details> <details open=""> <summary> <code> AGGREGATION aggregator bucketDuration </code> </summary> <p> per time series, aggregates samples into time buckets, where: </p> <ul> <li> <p> <code> aggregator </code> takes one of the following aggregation types: </p> <table> <thead> <tr> <th> <code> aggregator </code> </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <code> avg </code> </td> <td> Arithmetic mean of all values </td> </tr> <tr> <td> <code> sum </code> </td> <td> Sum of all values </td> </tr> <tr> <td> <code> min </code> </td> <td> Minimum value </td> </tr> <tr> <td> <code> max </code> </td> <td> Maximum value </td> </tr> <tr> <td> <code> range </code> </td> <td> Difference between maximum value and minimum value </td> </tr> <tr> <td> <code> count </code> </td> <td> Number of values </td> </tr> <tr> <td> <code> first </code> </td> <td> Value with lowest timestamp in the bucket </td> </tr> <tr> <td> <code> last </code> </td> <td> Value with highest timestamp in the bucket </td> </tr> <tr> <td> <code> std.p </code> </td> <td> Population standard deviation of the values </td> </tr> <tr> <td> <code> std.s </code> </td> <td> Sample standard deviation of the values </td> </tr> <tr> <td> <code> var.p </code> </td> <td> Population variance of the values </td> </tr> <tr> <td> <code> var.s </code> </td> <td> Sample variance of the values </td> </tr> <tr> <td> <code> twa </code> </td> <td> Time-weighted average over the bucket's timeframe (since RedisTimeSeries v1.8) </td> </tr> </tbody> </table> </li> <li> <p> <code> bucketDuration </code> is duration of each bucket, in milliseconds. </p> </li> </ul> <p> Without <code> ALIGN </code> , bucket start times are multiples of <code> bucketDuration </code> . </p> <p> With <code> ALIGN align </code> , bucket start times are multiples of <code> bucketDuration </code> with remainder <code> align % bucketDuration </code> . </p> <p> The first bucket start time is less than or equal to <code> fromTimestamp </code> . </p> </details> <details open=""> <summary> <code> [BUCKETTIMESTAMP bt] </code> (since RedisTimeSeries v1.8) </summary> <p> controls how bucket timestamps are reported. </p> <table> <thead> <tr> <th> <code> bt </code> </th> <th> Timestamp reported for each bucket </th> </tr> </thead> <tbody> <tr> <td> <code> - </code> or <code> start </code> </td> <td> the bucket's start time (default) </td> </tr> <tr> <td> <code> + </code> or <code> end </code> </td> <td> the bucket's end time </td> </tr> <tr> <td> <code> ~ </code> or <code> mid </code> </td> <td> the bucket's mid time (rounded down if not an integer) </td> </tr> </tbody> </table> </details> <details open=""> <summary> <code> [EMPTY] </code> (since RedisTimeSeries v1.8) </summary> <p> is a flag, which, when specified, reports aggregations also for empty buckets. </p> <table> <thead> <tr> <th> <code> aggregator </code> </th> <th> Value reported for each empty bucket </th> </tr> </thead> <tbody> <tr> <td> <code> sum </code> , <code> count </code> </td> <td> <code> 0 </code> </td> </tr> <tr> <td> <code> last </code> </td> <td> The value of the last sample before the bucket's start. <code> NaN </code> when no such sample. </td> </tr> <tr> <td> <code> twa </code> </td> <td> Average value over the bucket's timeframe based on linear interpolation of the last sample before the bucket's start and the first sample after the bucket's end. <code> NaN </code> when no such samples. </td> </tr> <tr> <td> <code> min </code> , <code> max </code> , <code> range </code> , <code> avg </code> , <code> first </code> , <code> std.p </code> , <code> std.s </code> </td> <td> <code> NaN </code> </td> </tr> </tbody> </table> <p> Regardless of the values of <code> fromTimestamp </code> and <code> toTimestamp </code> , no data is reported for buckets that end before the earliest sample or begin after the latest sample in the time series. </p> </details> <details open=""> <summary> <code> GROUPBY label REDUCE reducer </code> (since RedisTimeSeries v1.6) </summary> <p> splits time series into groups, each group contains time series that share the same value for the provided label name, then aggregates results in each group. </p> <p> When combined with <code> AGGREGATION </code> the <code> GROUPBY </code> / <code> REDUCE </code> is applied post aggregation stage. </p> <ul> <li> <p> <code> label </code> is label name. A group is created for all time series that share the same value for this label. </p> </li> <li> <p> <code> reducer </code> is an aggregation type used to aggregate the results in each group. </p> <table> <thead> <tr> <th> <code> reducer </code> </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <code> avg </code> </td> <td> Arithmetic mean of all non-NaN values (since RedisTimeSeries v1.8) </td> </tr> <tr> <td> <code> sum </code> </td> <td> Sum of all non-NaN values </td> </tr> <tr> <td> <code> min </code> </td> <td> Minimum non-NaN value </td> </tr> <tr> <td> <code> max </code> </td> <td> Maximum non-NaN value </td> </tr> <tr> <td> <code> range </code> </td> <td> Difference between maximum non-NaN value and minimum non-NaN value (since RedisTimeSeries v1.8) </td> </tr> <tr> <td> <code> count </code> </td> <td> Number of non-NaN values (since RedisTimeSeries v1.8) </td> </tr> <tr> <td> <code> std.p </code> </td> <td> Population standard deviation of all non-NaN values (since RedisTimeSeries v1.8) </td> </tr> <tr> <td> <code> std.s </code> </td> <td> Sample standard deviation of all non-NaN values (since RedisTimeSeries v1.8) </td> </tr> <tr> <td> <code> var.p </code> </td> <td> Population variance of all non-NaN values (since RedisTimeSeries v1.8) </td> </tr> <tr> <td> <code> var.s </code> </td> <td> Sample variance of all non-NaN values (since RedisTimeSeries v1.8) </td> </tr> </tbody> </table> </li> </ul> <p> <note> <b> Notes: </b> </note> </p> <ul> <li> The produced time series is named <code> &lt;label&gt;=&lt;value&gt; </code> </li> <li> The produced time series contains two labels with these label array structures: <ul> <li> <code> __reducer__ </code> , the reducer used (e.g., <code> "count" </code> ) </li> <li> <code> __source__ </code> , the list of time series keys used to compute the grouped series (e.g., <code> "key1,key2,key3" </code> ) </li> </ul> </li> </ul> </details> <p> <note> <b> Note: </b> An <code> MREVRANGE </code> command cannot be part of a transaction when running on a Redis cluster. </note> </p> <h2 id="return-value"> Return value </h2> <p> If <code> GROUPBY label REDUCE reducer </code> is not specified: </p> <ul> <li> <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> : for each time series matching the specified filters, the following is reported: <ul> <li> bulk-string-reply: The time series key name </li> <li> <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> : label-value pairs ( <a href="/docs/latest/develop/reference/protocol-spec/#bulk-strings"> Bulk string reply </a> , <a href="/docs/latest/develop/reference/protocol-spec/#bulk-strings"> Bulk string reply </a> ) <ul> <li> By default, an empty list is reported </li> <li> If <code> WITHLABELS </code> is specified, all labels associated with this time series are reported </li> <li> If <code> SELECTED_LABELS label... </code> is specified, the selected labels are reported </li> </ul> </li> <li> <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> : timestamp-value pairs ( <a href="/docs/latest/develop/reference/protocol-spec/#integers"> Integer reply </a> , <a href="/docs/latest/develop/reference/protocol-spec/#simple-strings"> Simple string reply </a> (double)): all samples/aggregations matching the range </li> </ul> </li> </ul> <p> If <code> GROUPBY label REDUCE reducer </code> is specified: </p> <ul> <li> <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> : for each group of time series matching the specified filters, the following is reported: <ul> <li> bulk-string-reply with the format <code> label=value </code> where <code> label </code> is the <code> GROUPBY </code> label argument </li> <li> <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> : a single pair ( <a href="/docs/latest/develop/reference/protocol-spec/#bulk-strings"> Bulk string reply </a> , <a href="/docs/latest/develop/reference/protocol-spec/#bulk-strings"> Bulk string reply </a> ): the <code> GROUPBY </code> label argument and value </li> <li> <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> : a single pair ( <a href="/docs/latest/develop/reference/protocol-spec/#bulk-strings"> Bulk string reply </a> , <a href="/docs/latest/develop/reference/protocol-spec/#bulk-strings"> Bulk string reply </a> ): the string <code> __reducer__ </code> and the reducer argument </li> <li> <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> : a single pair ( <a href="/docs/latest/develop/reference/protocol-spec/#bulk-strings"> Bulk string reply </a> , <a href="/docs/latest/develop/reference/protocol-spec/#bulk-strings"> Bulk string reply </a> ): the string <code> __source__ </code> and the time series key names separated by <code> , </code> </li> <li> <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> : timestamp-value pairs ( <a href="/docs/latest/develop/reference/protocol-spec/#integers"> Integer reply </a> , <a href="/docs/latest/develop/reference/protocol-spec/#simple-strings"> Simple string reply </a> (double)): all samples/aggregations matching the range </li> </ul> </li> </ul> <h2 id="examples"> Examples </h2> <details open=""> <summary> <b> Retrieve maximum stock price per timestamp </b> </summary> <p> Create two stocks and add their prices at three different timestamps. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.CREATE stock:A LABELS <span class="nb">type</span> stock name A </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.CREATE stock:B LABELS <span class="nb">type</span> stock name B </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MADD stock:A <span class="m">1000</span> <span class="m">100</span> stock:A <span class="m">1010</span> <span class="m">110</span> stock:A <span class="m">1020</span> <span class="m">120</span> </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1000</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1010</span> </span></span><span class="line"><span class="cl">3<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1020</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MADD stock:B <span class="m">1000</span> <span class="m">120</span> stock:B <span class="m">1010</span> <span class="m">110</span> stock:B <span class="m">1020</span> <span class="m">100</span> </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1000</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1010</span> </span></span><span class="line"><span class="cl">3<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1020</span></span></span></code></pre> </div> <p> You can now retrieve the maximum stock price per timestamp. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MREVRANGE - + WITHLABELS FILTER <span class="nv">type</span><span class="o">=</span>stock GROUPBY <span class="nb">type</span> REDUCE max </span></span><span class="line"><span class="cl">1<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"type=stock"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"type"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"stock"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"__reducer__"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"max"</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"__source__"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"stock:A,stock:B"</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1020</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">120</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1010</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">110</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1000</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">120</span></span></span></code></pre> </div> <p> The <code> FILTER type=stock </code> clause returns a single time series representing stock prices. The <code> GROUPBY type REDUCE max </code> clause splits the time series into groups with identical type values, and then, for each timestamp, aggregates all series that share the same type value using the max aggregator. </p> </details> <details open=""> <summary> <b> Calculate average stock price and retrieve maximum average </b> </summary> <p> Create two stocks and add their prices at nine different timestamps. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.CREATE stock:A LABELS <span class="nb">type</span> stock name A </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.CREATE stock:B LABELS <span class="nb">type</span> stock name B </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MADD stock:A <span class="m">1000</span> <span class="m">100</span> stock:A <span class="m">1010</span> <span class="m">110</span> stock:A <span class="m">1020</span> <span class="m">120</span> </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1000</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1010</span> </span></span><span class="line"><span class="cl">3<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1020</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MADD stock:B <span class="m">1000</span> <span class="m">120</span> stock:B <span class="m">1010</span> <span class="m">110</span> stock:B <span class="m">1020</span> <span class="m">100</span> </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1000</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1010</span> </span></span><span class="line"><span class="cl">3<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1020</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MADD stock:A <span class="m">2000</span> <span class="m">200</span> stock:A <span class="m">2010</span> <span class="m">210</span> stock:A <span class="m">2020</span> <span class="m">220</span> </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">2000</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">2010</span> </span></span><span class="line"><span class="cl">3<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">2020</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MADD stock:B <span class="m">2000</span> <span class="m">220</span> stock:B <span class="m">2010</span> <span class="m">210</span> stock:B <span class="m">2020</span> <span class="m">200</span> </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">2000</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">2010</span> </span></span><span class="line"><span class="cl">3<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">2020</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MADD stock:A <span class="m">3000</span> <span class="m">300</span> stock:A <span class="m">3010</span> <span class="m">310</span> stock:A <span class="m">3020</span> <span class="m">320</span> </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">3000</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">3010</span> </span></span><span class="line"><span class="cl">3<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">3020</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MADD stock:B <span class="m">3000</span> <span class="m">320</span> stock:B <span class="m">3010</span> <span class="m">310</span> stock:B <span class="m">3020</span> <span class="m">300</span> </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">3000</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">3010</span> </span></span><span class="line"><span class="cl">3<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">3020</span></span></span></code></pre> </div> <p> Now, for each stock, calculate the average stock price per a 1000-millisecond timeframe, and then retrieve the stock with the maximum average for that timeframe in reverse direction. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MREVRANGE - + WITHLABELS AGGREGATION avg <span class="m">1000</span> FILTER <span class="nv">type</span><span class="o">=</span>stock GROUPBY <span class="nb">type</span> REDUCE max </span></span><span class="line"><span class="cl">1<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"type=stock"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"type"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"stock"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"__reducer__"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"max"</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"__source__"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"stock:A,stock:B"</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">3000</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">310</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">2000</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">210</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1000</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">110</span></span></span></code></pre> </div> </details> <details open=""> <summary> <b> Group query results </b> </summary> <p> Query all time series with the metric label equal to <code> cpu </code> , then group the time series by the value of their <code> metric_name </code> label value and for each group return the maximum value and the time series keys ( <em> source </em> ) with that value. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.ADD ts1 <span class="m">1548149180000</span> <span class="m">90</span> labels metric cpu metric_name system </span></span><span class="line"><span class="cl"><span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149180000</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.ADD ts1 <span class="m">1548149185000</span> <span class="m">45</span> </span></span><span class="line"><span class="cl"><span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149185000</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.ADD ts2 <span class="m">1548149180000</span> <span class="m">99</span> labels metric cpu metric_name user </span></span><span class="line"><span class="cl"><span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149180000</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MREVRANGE - + WITHLABELS FILTER <span class="nv">metric</span><span class="o">=</span>cpu GROUPBY metric_name REDUCE max </span></span><span class="line"><span class="cl">1<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"metric_name=system"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"metric_name"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"system"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"__reducer__"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"max"</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"__source__"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"ts1"</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149185000</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">45</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149180000</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">90</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"metric_name=user"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"metric_name"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"user"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"__reducer__"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"max"</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"__source__"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"ts2"</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149180000</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">99</span></span></span></code></pre> </div> </details> <details open=""> <summary> <b> Filter query by value </b> </summary> <p> Query all time series with the metric label equal to <code> cpu </code> , then filter values larger or equal to 90.0 and smaller or equal to 100.0. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.ADD ts1 <span class="m">1548149180000</span> <span class="m">90</span> labels metric cpu metric_name system </span></span><span class="line"><span class="cl"><span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149180000</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.ADD ts1 <span class="m">1548149185000</span> <span class="m">45</span> </span></span><span class="line"><span class="cl"><span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149185000</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.ADD ts2 <span class="m">1548149180000</span> <span class="m">99</span> labels metric cpu metric_name user </span></span><span class="line"><span class="cl"><span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149180000</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MREVRANGE - + FILTER_BY_VALUE <span class="m">90</span> <span class="m">100</span> WITHLABELS FILTER <span class="nv">metric</span><span class="o">=</span>cpu </span></span><span class="line"><span class="cl">1<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"ts1"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"metric"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"cpu"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"metric_name"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"system"</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149180000</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">90</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"ts2"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"metric"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"cpu"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"metric_name"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="s2">"user"</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149180000</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">99</span></span></span></code></pre> </div> </details> <details open=""> <summary> <b> Query using a label </b> </summary> <p> Query all time series with the metric label equal to <code> cpu </code> , but only return the team label. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.ADD ts1 <span class="m">1548149180000</span> <span class="m">90</span> labels metric cpu metric_name system team NY </span></span><span class="line"><span class="cl"><span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149180000</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.ADD ts1 <span class="m">1548149185000</span> <span class="m">45</span> </span></span><span class="line"><span class="cl"><span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149185000</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.ADD ts2 <span class="m">1548149180000</span> <span class="m">99</span> labels metric cpu metric_name user team SF </span></span><span class="line"><span class="cl"><span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149180000</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MREVRANGE - + SELECTED_LABELS team FILTER <span class="nv">metric</span><span class="o">=</span>cpu </span></span><span class="line"><span class="cl">1<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"ts1"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"team"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="o">(</span>nil<span class="o">)</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149185000</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">45</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149180000</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">90</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"ts2"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="s2">"team"</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="o">(</span>nil<span class="o">)</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> 1<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1548149180000</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">99</span></span></span></code></pre> </div> </details> <h2 id="see-also"> See also </h2> <p> <a href="/docs/latest/commands/ts.mrange/"> <code> TS.MRANGE </code> </a> | <a href="/docs/latest/commands/ts.range/"> <code> TS.RANGE </code> </a> | <a href="/docs/latest/commands/ts.revrange/"> <code> TS.REVRANGE </code> </a> </p> <h2 id="related-topics"> Related topics </h2> <p> <a href="/docs/latest/develop/data-types/timeseries/"> RedisTimeSeries </a> </p> <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/ts.mrevrange/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rc/changelog/2023/june-2023/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Cloud changelog (June 2023) </h1> <p class="text-lg -mt-5 mb-10"> New features, enhancements, and other changes added to Redis Cloud during June 2023. </p> <p> This changelog lists new features, enhancements, and other changes added to Redis Cloud during June 2023. </p> <h2 id="new-features"> New features </h2> <h3 id="redis-72-fixed-opt-in"> Redis 7.2 fixed opt-in </h3> <p> You can opt in to Redis 7.2 on <a href="/docs/latest/operate/rc/databases/create-database/create-essentials-database/"> Fixed subscriptions </a> in selected regions in AWS and GCP. Redis 7.2 introduces several changes to existing Redis commands; see the <a href="#redis-72-breaking-changes"> list of breaking changes </a> for more details. </p> <h3 id="export-database-list-to-csv-includes-active-active"> Export database list to CSV includes Active-Active </h3> <p> Your Active-Active databases will now appear in the database list when you export it to a CSV file. To support this, we added a "Region" column to differentiate between Active-Active databases with the same name. </p> <p> To export your database list to a CSV file, select <strong> Export all </strong> on the <strong> Databases </strong> screen. </p> <h2 id="breaking-changes"> Breaking changes </h2> <h3 id="redis-72-breaking-changes"> Redis 7.2 breaking changes </h3> <p> When new major versions of open source Redis change existing commands, upgrading your database to a new version can potentially break some functionality. Before you upgrade, make sure to read the provided list of breaking changes that affect Redis Enterprise and update any applications that connect to your database to handle these changes. </p> <p> Confirm your Redis database version ( <code> redis_version </code> ) using the admin console or run the following <a href="/docs/latest/commands/info/"> <code> INFO </code> </a> command via <a href="/docs/latest/operate/rs/references/cli-utilities/redis-cli/"> <code> redis-cli </code> </a> : </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ redis-cli -p &lt;port&gt; INFO </span></span><span class="line"><span class="cl"><span class="s2">"# Server </span></span></span><span class="line"><span class="cl"><span class="s2">redis_version:7.0.8 </span></span></span><span class="line"><span class="cl"><span class="s2">..."</span> </span></span></code></pre> </div> <h4 id="breaking-changes-from-version-70"> Breaking changes from version 7.0 </h4> <p> Upgrading to Redis version 7.2 from version 7.0 introduces the following potentially breaking changes to Redis Enterprise: </p> <h5 id="programmability"> Programmability </h5> <ul> <li> <p> Time sampling is now frozen during command execution and scripts ( <a href="https://github.com/redis/redis/pull/10300"> #10300 </a> ). While a command or script is running, the keys used by the command or script will not expire. This breaks any script that uses a loop to wait for a key to expire. </p> </li> <li> <p> Blocked commands in scripts now work the same way as when they are used in <a href="/docs/latest/develop/interact/transactions/"> transactions </a> ( <a href="https://github.com/redis/redis/pull/11568"> #11568 </a> ). </p> </li> </ul> <h5 id="error-handling"> Error handling </h5> <ul> <li> <p> A blocked stream command that is released when a key no longer exists returns a different error code ( <a href="https://github.com/redis/redis/pull/11012"> #11012 </a> ). </p> <ul> <li> For newly unblocked streams, lists, and zsets, the old implementation returned <code> UNBLOCKED </code> when the stream key was deleted or overwritten with a different type. Now, errors will be the same as if the command was processed after the effect. </li> </ul> </li> <li> <p> ACL errors have been unified across Redis. ( <a href="https://github.com/redis/redis/pull/11160"> #11160 </a> ) </p> <ul> <li> When using <a href="/docs/latest/develop/reference/modules/modules-api-ref/#redismodule_call"> RedisModule_Call </a> module API function, ACL errors return <code> -NOPERM </code> instead of <code> -ERR </code> </li> </ul> </li> <li> <p> <a href="/docs/latest/commands/xreadgroup/"> <code> XREADGROUP </code> </a> and <a href="/docs/latest/commands/xautoclaim/"> <code> XAUTOCLAIM </code> </a> create a consumer regardless of whether it was able to perform reading or claiming ( <a href="https://github.com/redis/redis/pull/11012"> #11012 </a> ). </p> </li> <li> <p> Any float that is Not a Number will return <code> nan </code> ( <a href="https://github.com/redis/redis/pull/11597"> #11597 </a> ). </p> </li> </ul> <h5 id="acls"> ACLs </h5> <ul> <li> When a blocked client is being unblocked, checks for ACLs and OOM condition checks are now re-evaluated ( <a href="https://github.com/redis/redis/pull/11012"> #11012 </a> ). <ul> <li> If the ACL rules have changed since the command was executed, the command might fail after the client is unblocked. </li> </ul> </li> </ul> <h5 id="command-introspection-stats-and-configuration"> Command introspection, stats, and configuration </h5> <ul> <li> <p> When running <a href="/docs/latest/commands/xinfo-consumers/"> <code> XINFO CONSUMERS </code> </a> , the <code> idle </code> time now shows the number of milliseconds that have passed since the last attempted interaction, and the <code> inactive </code> time shows the number of milliseconds since the last successful interaction ( <a href="https://github.com/redis/redis/pull/11099"> #11099 </a> ) </p> <ul> <li> Previously, <code> idle </code> time showed the number of milliseconds that passed since the last successful interaction and there was no <code> inactive </code> time. </li> </ul> </li> <li> <p> Command stats are only updated when the command executes ( <a href="https://github.com/redis/redis/pull/11012"> #11012 </a> ). </p> <ul> <li> Previously, the command stats were updated even if a command was blocked. The command stats are now updated only if and when the command is executed. </li> </ul> </li> </ul> <h4 id="breaking-changes-from-version-62"> Breaking changes from version 6.2 </h4> <p> Upgrading to open source Redis version 7.2 from version 6.2 introduces the following potentially breaking changes to Redis Enterprise. </p> <p> All <a href="#breaking-changes-from-version-70"> breaking changes from version 7.0 </a> also apply to Redis version 6.2. </p> <h5 id="programmability-1"> Programmability </h5> <ul> <li> <p> Lua scripts no longer have access to the <code> print() </code> function ( <a href="https://github.com/redis/redis/pull/10651"> #10651 </a> ) - The <code> print </code> function was removed from Lua because it can potentially cause the Redis processes to get stuck (if no one reads from stdout). Users should use redis.log. An alternative is to override the <code> print </code> implementation and print the message to the log file. </p> </li> <li> <p> Block <a href="/docs/latest/commands/pfcount/"> <code> PFCOUNT </code> </a> and <a href="/docs/latest/commands/publish/"> <code> PUBLISH </code> </a> in read-only scripts (*_RO commands, <code> no-writes </code> ) ( <a href="https://github.com/redis/redis/pull/10744"> #10744 </a> ) - Consider <code> PFCOUNT </code> and <code> PUBLISH </code> as write commands in scripts, in addition to <code> EVAL </code> ; meaning: </p> <ul> <li> They can never be used in scripts with shebang ( <code> #! </code> ) and no <code> no-writes </code> flag </li> <li> They are blocked in <code> EVAL_RO </code> and <code> _RO </code> variants, (even in scripts without shebang ( <code> #! </code> ) flags) </li> <li> Allow <code> no-write </code> scripts in EVAL (not just in EVAL_RO), even during <code> CLIENT PAUSE WRITE </code> </li> </ul> </li> <li> <p> Hide the <code> may_replicate </code> flag from the <a href="/docs/latest/commands/command/"> <code> COMMAND </code> </a> command response ( <a href="https://github.com/redis/redis/pull/10744"> #10744 </a> ) - As part of the change to treat <code> may_replicate </code> commands <code> PFCOUNT </code> and <code> PUBLISH </code> as write commands in scripts, in addition to <code> EVAL </code> , the <code> may_replicate </code> flag has been removed from the <code> COMMAND </code> response. </p> </li> </ul> <h5 id="error-handling-1"> Error handling </h5> <ul> <li> <p> Rephrased some error responses about invalid commands or arguments ( <a href="https://github.com/redis/redis/pull/10612"> #10612 </a> ) - </p> <ul> <li> Error response for unknown command introduced a case change ( <code> Unknown </code> to <code> unknown </code> ) </li> <li> Errors for module commands extended to cover subcommands, updated syntax to match Redis Server syntax </li> <li> Arity errors for module commands introduce a case change ( <code> Wrong </code> to <code> wrong </code> ); will consider full command name </li> </ul> </li> <li> <p> Corrected error codes returned from <a href="/docs/latest/commands/eval/"> <code> EVAL </code> </a> scripts ( <a href="https://github.com/redis/redis/pull/10218"> #10218 </a> , <a href="https://github.com/redis/redis/pull/10329"> #10329 </a> ). </p> <p> These examples show changes in behavior: </p> <div class="highlight"> <pre class="chroma"><code class="language-diff" data-lang="diff"><span class="line"><span class="cl"> 1: config set maxmemory 1 </span></span><span class="line"><span class="cl"> 2: +OK </span></span><span class="line"><span class="cl"> 3: eval "return redis.call('set','x','y')" 0 </span></span><span class="line"><span class="cl"><span class="gd">- 4: -ERR Error running script (call to 71e6319f97b0fe8bdfa1c5df3ce4489946dda479): @user_script:1: @user_script: 1: -OOM command not allowed when used memory &gt; 'maxmemory'. </span></span></span><span class="line"><span class="cl"><span class="gd"></span><span class="gi">+ 4: -ERR Error running script (call to 71e6319f97b0fe8bdfa1c5df3ce4489946dda479): @user_script:1: OOM command not allowed when used memory &gt; 'maxmemory'. </span></span></span><span class="line"><span class="cl"><span class="gi"></span> 5: eval "return redis.pcall('set','x','y')" 0 </span></span><span class="line"><span class="cl"><span class="gd">- 6: -@user_script: 1: -OOM command not allowed when used memory &gt; 'maxmemory'. </span></span></span><span class="line"><span class="cl"><span class="gd"></span><span class="gi">+ 6: -OOM command not allowed when used memory &gt; 'maxmemory'. </span></span></span><span class="line"><span class="cl"><span class="gi"></span> 7: eval "return redis.call('select',99)" 0 </span></span><span class="line"><span class="cl"> 8: -ERR Error running script (call to 4ad5abfc50bbccb484223905f9a16f09cd043ba8): @user_script:1: ERR DB index is out of range </span></span><span class="line"><span class="cl"> 9: eval "return redis.pcall('select',99)" 0 </span></span><span class="line"><span class="cl"> 10: -ERR DB index is out of range </span></span><span class="line"><span class="cl"> 11: eval_ro "return redis.call('set','x','y')" 0 </span></span><span class="line"><span class="cl"><span class="gd">-12: -ERR Error running script (call to 71e6319f97b0fe8bdfa1c5df3ce4489946dda479): @user_script:1: @user_script: 1: Write commands are not allowed from read-only scripts. </span></span></span><span class="line"><span class="cl"><span class="gd"></span><span class="gi">+12: -ERR Error running script (call to 71e6319f97b0fe8bdfa1c5df3ce4489946dda479): @user_script:1: ERR Write commands are not allowed from read-only scripts. </span></span></span><span class="line"><span class="cl"><span class="gi"></span> 13: eval_ro "return redis.pcall('set','x','y')" 0 </span></span><span class="line"><span class="cl"><span class="gd">-14: -@user_script: 1: Write commands are not allowed from read-only scripts. </span></span></span><span class="line"><span class="cl"><span class="gd"></span><span class="gi">+14: -ERR Write commands are not allowed from read-only scripts. </span></span></span></code></pre> </div> </li> <li> <p> <a href="/docs/latest/commands/zpopmin/"> <code> ZPOPMIN </code> </a> / <a href="/docs/latest/commands/zpopmax/"> <code> ZPOPMAX </code> </a> used to produce wrong replies when count is 0 with non-zset <a href="https://github.com/redis/redis/pull/9711"> #9711 </a> ): </p> <ul> <li> <code> ZPOPMIN </code> / <code> ZPOPMAX </code> used to produce an <code> (empty array) </code> when <code> key </code> was not a sorted set and the optional <code> count </code> argument was set to <code> 0 </code> and now produces a <code> WRONGTYPE </code> error response instead. </li> <li> The optional <code> count </code> argument must be positive. A negative value produces a <code> value is out of range </code> error. </li> </ul> <p> These examples show changes in behavior: </p> <div class="highlight"> <pre class="chroma"><code class="language-diff" data-lang="diff"><span class="line"><span class="cl"> 1: zadd myzset 1 "one" </span></span><span class="line"><span class="cl"> 2: (integer) 1 </span></span><span class="line"><span class="cl"> 3: zadd myzset 2 "two" </span></span><span class="line"><span class="cl"> 4: (integer) 1 </span></span><span class="line"><span class="cl"> 5: zadd myzset 3 "three" </span></span><span class="line"><span class="cl"> 6: (integer) 1 </span></span><span class="line"><span class="cl"> 7: zpopmin myzset -1 </span></span><span class="line"><span class="cl"><span class="gd">- 8: (empty array) </span></span></span><span class="line"><span class="cl"><span class="gd"></span><span class="gi">+ 8: (error) ERR value is out of range, must be positive </span></span></span><span class="line"><span class="cl"><span class="gi"></span> 9: 127.0.0.1:6379&gt; set foo bar </span></span><span class="line"><span class="cl"> 10: OK </span></span><span class="line"><span class="cl"> 11: zpopmin foo 0 </span></span><span class="line"><span class="cl"><span class="gd">-12: (empty array) </span></span></span><span class="line"><span class="cl"><span class="gd"></span><span class="gi">+12: (error) WRONGTYPE Operation against a key holding the wrong kind of value </span></span></span></code></pre> </div> </li> <li> <p> <a href="/docs/latest/commands/lpop/"> <code> LPOP </code> </a> / <a href="/docs/latest/commands/rpop/"> <code> RPOP </code> </a> with count against a nonexistent list returns a null array instead of <code> (nil) </code> ( <a href="https://github.com/redis/redis/pull/10095"> #10095 </a> ). This change was backported to 6.2. </p> </li> <li> <p> <a href="/docs/latest/commands/lpop/"> <code> LPOP </code> </a> / <a href="/docs/latest/commands/rpop/"> <code> RPOP </code> </a> used to produce <code> (nil) </code> when count is 0, now produces a null array ( <a href="https://github.com/redis/redis/pull/9692"> #9692 </a> ). This change was backported to 6.2. </p> </li> <li> <p> <a href="/docs/latest/commands/xclaim/"> <code> XCLAIM </code> </a> / <a href="/docs/latest/commands/xautoclaim/"> <code> XAUTOCLAIM </code> </a> skips deleted entries instead of replying with <code> nil </code> and deletes them from the pending entry list ( <a href="https://github.com/redis/redis/pull/10227"> #10227 </a> ) - <code> XCLAIM </code> / <code> XAUTOCLAIM </code> now behaves in the following way: </p> <ul> <li> If you try to claim a deleted entry, it is deleted from the pending entry list (PEL) where it is found (as well as the group PEL). Therefore, such an entry is not claimed, just cleared from PEL (because it doesn't exist in the stream anyway). </li> <li> Because deleted entries are not claimed, <code> X[AUTO]CLAIM </code> does not return "nil" instead of an entry. </li> <li> Added an array of all the deleted stream IDs to <code> XAUTOCLAIM </code> response. </li> </ul> </li> </ul> <h5 id="acls-1"> ACLs </h5> <ul> <li> <p> <a href="/docs/latest/commands/acl-getuser/"> <code> ACL GETUSER </code> </a> reply now uses ACL syntax for <code> keys </code> and <code> channels </code> ( <a href="https://github.com/redis/redis/pull/9974"> #9974 </a> ). <code> ACL GETUSER </code> now uses the ACL DSL (Domain Specific Language) for keys and channels. </p> <p> These examples show changes in behavior: </p> <div class="highlight"> <pre class="chroma"><code class="language-diff" data-lang="diff"><span class="line"><span class="cl"> 1: acl setuser foo off resetchannels &amp;channel1 -@all +get </span></span><span class="line"><span class="cl"> 2: OK </span></span><span class="line"><span class="cl"> 3: acl getuser foo </span></span><span class="line"><span class="cl"> 4: 1) "flags" </span></span><span class="line"><span class="cl"> 5: 2) 1) "off" </span></span><span class="line"><span class="cl"> 6: 3) "passwords" </span></span><span class="line"><span class="cl"> 7: 4) (empty array) </span></span><span class="line"><span class="cl"> 8: 5) "commands" </span></span><span class="line"><span class="cl"> 9: 6) "-@all +get" </span></span><span class="line"><span class="cl"> 10: 7) "keys" </span></span><span class="line"><span class="cl"><span class="gd">-11: 8) (empty array) </span></span></span><span class="line"><span class="cl"><span class="gd"></span><span class="gi">+11: 8) "" </span></span></span><span class="line"><span class="cl"><span class="gi"></span> 12: 9)"channels" </span></span><span class="line"><span class="cl"><span class="gd">-13 10) 1) "channel1" </span></span></span><span class="line"><span class="cl"><span class="gd"></span><span class="gi">+13 10) "&amp;channel1" </span></span></span></code></pre> </div> </li> <li> <p> <a href="/docs/latest/commands/sort/"> <code> SORT </code> </a> / <a href="/docs/latest/commands/sort_ro/"> <code> SORT_RO </code> </a> commands reject key access patterns in <code> GET </code> and <code> BY </code> if the ACL doesn't grant the command full keyspace access ( <a href="https://github.com/redis/redis/pull/10340"> #10340 </a> ) - The <code> sort </code> and <code> sort_ro </code> commands can access external keys via <code> GET </code> and <code> BY </code> . In order to make sure the user cannot violate the authorization ACL rules, Redis 7 will reject external keys access patterns unless ACL allows <code> SORT </code> full access to all keys. For backwards compatibility, <code> SORT </code> with <code> GET </code> / <code> BY </code> keeps working, but if ACL has restrictions to certain keys, the use of these features will result in a permission denied error. </p> <p> These examples show changes in behavior: </p> <pre tabindex="0"><code>USER FOO (+sort ~* ~mylist) #FOO&gt; sort mylist by w* get v* - is O.K since ~* provides full key access </code></pre> <pre tabindex="0"><code>USER FOO (+sort %R~* ~mylist) #FOO&gt; sort mylist by w* get v* - is O.K since %R~* provides full key READ access** </code></pre> <pre tabindex="0"><code>USER FOO (+sort %W~* ~mylist) #FOO&gt; sort mylist by w* get v* - will now fail since $W~* only provides full key WRITE access </code></pre> <pre tabindex="0"><code>USER FOO (+sort ~v* ~mylist) #FOO&gt; sort mylist by w* get v* - will now fail since ~v* only provides partial key access </code></pre> </li> <li> <p> Fix ACL category for <a href="/docs/latest/commands/select/"> <code> SELECT </code> </a> , [ <code> WAIT </code> ](/docs/latest/commands/wait/, [ <code> ROLE </code> ](/docs/latest/commands/role/, [ <code> LASTSAVE </code> ](/docs/latest/commands/lastsave/, [ <code> READONLY </code> ](/docs/latest/commands/readonly/, [ <code> READWRITE </code> ](/docs/latest/commands/readwrite/, <a href="/docs/latest/commands/asking/"> <code> ASKING </code> </a> ( <a href="https://github.com/redis/redis/pull/9208"> #9208 </a> ): </p> <ul> <li> <code> SELECT </code> and <code> WAIT </code> have been recategorized from <code> @keyspace </code> to <code> @connection </code> </li> <li> <code> ROLE </code> , <code> LASTSAVE </code> have been categorized as <code> @admin </code> and <code> @dangerous </code> </li> <li> <code> ASKING </code> , <code> READONLY </code> , <code> READWRITE </code> have also been assigned the <code> @connection </code> category and removed from <code> @keyspace </code> </li> <li> Command categories are explained in <a href="/docs/latest/operate/oss_and_stack/management/security/acl/#command-categories"> ACL documentation </a> </li> </ul> </li> </ul> <h5 id="command-introspection-stats-and-configuration-1"> Command introspection, stats, and configuration </h5> <ul> <li> <p> <a href="/docs/latest/commands/command/"> <code> COMMAND </code> </a> reply drops <code> random </code> and <code> sort-for-scripts </code> flags, which are now part of <a href="/docs/latest/develop/reference/command-tips/"> command tips </a> ( <a href="https://github.com/redis/redis/pull/10104"> #10104 </a> ) - The <code> random </code> flag was replaced with the <code> nondeterministic_output </code> tip; the <code> sort-for-scripts </code> flag was replaced by the <code> nondeterministic_output_order </code> tip </p> </li> <li> <p> <a href="/docs/latest/commands/info/"> <code> INFO </code> </a> <code> commandstats </code> now shows the stats per sub-command ( <a href="https://github.com/redis/redis/pull/9504"> #9504 </a> ) For example, while previous versions would provide a single entry for all command usage, in Redis 7, each sub command is reported separately: </p> <ul> <li> <p> Redis 6.2: </p> <pre tabindex="0"><code>cmdstat_acl:calls=4,usec=279,usec_per_call=69.75,rejected_calls=0,failed_calls=2 </code></pre> </li> <li> <p> Redis 7: </p> <pre tabindex="0"><code>cmdstat_acl|list:calls=1,usec=4994,usec_per_call=4994.00,rejected_calls=0,failed_calls=0 cmdstat_acl|setuser:calls=2,usec=16409,usec_per_call=8204.50,rejected_calls=0,failed_calls=0 cmdstat_acl|deluser:calls=1,usec=774,usec_per_call=774.00,rejected_calls=0,failed_calls=0 cmdstat_acl|getuser:calls=1,usec=6044,usec_per_call=6044.00,rejected_calls=0,failed_calls=0 </code></pre> </li> </ul> </li> <li> <p> <a href="/docs/latest/commands/config-rewrite/"> <code> CONFIG REWRITE </code> </a> , [ <code> CONFIG RESETSTAT </code> ](/docs/latest/commands/config-resetstat/, and most [ <code> CONFIG SET </code> ](/docs/latest/commands/config-set/commands are now allowed during loading ( <a href="https://github.com/redis/redis/pull/9878"> #9878 </a> ) </p> </li> </ul> <h3 id="known-limitations"> Known limitations </h3> <p> There are two known limitations for the version of Redis 7.2 that is packaged with Redis Enterprise. </p> <ul> <li> <p> Using <a href="/docs/latest/commands/xreadgroup/"> <code> XREADGROUP BLOCK </code> </a> with <code> &gt; </code> to return all new streams will cause the Redis database to freeze until the shard is restarted ( <a href="https://github.com/redis/redis/pull/12301"> #12031 </a> ) </p> </li> <li> <p> Because a rejected command does not record the duration for command stats, an error will appear after it is reprocessed that will cause the Redis database to freeze until the shard is restarted ( <a href="https://github.com/redis/redis/pull/12247"> #12247 </a> ) </p> </li> </ul> <h3 id="migration-guides-for-certain-clients"> Migration guides for certain clients </h3> <p> If you are using <a href="https://redis.uptrace.dev/"> Go-Redis </a> v9 or <a href="https://redis.github.io/lettuce/"> Lettuce </a> v6+, which by default switch to the RESP3 protocol, and you are running Redis Stack commands, please make sure the protocol version is pinned to RESP2 prior to upgrading to Redis version 7.2. </p> <h4 id="go-redis"> Go-Redis </h4> <p> For applications using Go-Redis v9 and later, ensure that you have Go-Redis v9.0.5 or newer and pin the protocol version as shown below: </p> <div class="highlight"> <pre class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="nx">client</span> <span class="o">:=</span> <span class="nx">redis</span><span class="p">.</span><span class="nf">NewClient</span><span class="p">(</span><span class="o">&amp;</span><span class="nx">redis</span><span class="p">.</span><span class="nx">Options</span><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nx">Addr</span><span class="p">:</span> <span class="s">"&lt;database_endpoint&gt;"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nx">Protocol</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span> <span class="c1">// Pin the protocol version </span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="p">})</span> </span></span></code></pre> </div> <p> No actions are required for applications using Go-Redis v8 or earlier. </p> <h4 id="lettuce"> Lettuce </h4> <p> To pin the protocol version, use the snippet below: </p> <div class="highlight"> <pre class="chroma"><code class="language-java" data-lang="java"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">io.lettuce.core.*</span><span class="o">;</span> </span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">io.lettuce.core.api.*</span><span class="o">;</span> </span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">io.lettuce.core.protocol.ProtocolVersion</span><span class="o">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1">// ... </span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="n">RedisClient</span> <span class="n">client</span> <span class="o">=</span> <span class="n">RedisClient</span><span class="o">.</span><span class="na">create</span><span class="o">(</span><span class="s">"&lt;database_endpoint&gt;"</span><span class="o">);</span> </span></span><span class="line"><span class="cl"><span class="n">client</span><span class="o">.</span><span class="na">setOptions</span><span class="o">(</span><span class="n">ClientOptions</span><span class="o">.</span><span class="na">builder</span><span class="o">()</span> </span></span><span class="line"><span class="cl"> <span class="o">.</span><span class="na">protocolVersion</span><span class="o">(</span><span class="n">ProtocolVersion</span><span class="o">.</span><span class="na">RESP2</span><span class="o">)</span> <span class="c1">// Pin the protocol version </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="o">.</span><span class="na">build</span><span class="o">());</span> </span></span><span class="line"><span class="cl"><span class="c1">// ... </span></span></span></code></pre> </div> <p> If you are using <a href="https://github.com/redis-developer/lettucemod/"> LettuceMod </a> , you need to upgrade to <a href="https://github.com/redis-developer/lettucemod/releases/tag/v3.6.0"> v3.6.0 </a> . </p> <h2 id="deprecations"> Deprecations </h2> <ul> <li> <a href="/docs/latest/commands/cluster-slots/"> <code> CLUSTER SLOTS </code> </a> is deprecated as of Redis 7.0 </li> <li> <a href="/docs/latest/commands/quit/"> <code> QUIT </code> </a> is deprecated as of Redis 7.2 </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rc/changelog/2023/june-2023/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/cluster-meet/.html
<section class="prose w-full py-12"> <h1 class="command-name"> CLUSTER MEET </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">CLUSTER MEET ip port [cluster-bus-port]</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 3.0.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(1) </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @admin </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> <code> @dangerous </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> <code> CLUSTER MEET </code> is used in order to connect different Redis nodes with cluster support enabled, into a working cluster. </p> <p> The basic idea is that nodes by default don't trust each other, and are considered unknown, so that it is unlikely that different cluster nodes will mix into a single one because of system administration errors or network addresses modifications. </p> <p> So in order for a given node to accept another one into the list of nodes composing a Redis Cluster, there are only two ways: </p> <ol> <li> The system administrator sends a <code> CLUSTER MEET </code> command to force a node to meet another one. </li> <li> An already known node sends a list of nodes in the gossip section that we are not aware of. If the receiving node trusts the sending node as a known node, it will process the gossip section and send a handshake to the nodes that are still not known. </li> </ol> <p> Note that Redis Cluster needs to form a full mesh (each node is connected with each other node), but in order to create a cluster, there is no need to send all the <code> CLUSTER MEET </code> commands needed to form the full mesh. What matter is to send enough <code> CLUSTER MEET </code> messages so that each node can reach each other node through a <em> chain of known nodes </em> . Thanks to the exchange of gossip information in heartbeat packets, the missing links will be created. </p> <p> So, if we link node A with node B via <code> CLUSTER MEET </code> , and B with C, A and C will find their ways to handshake and create a link. </p> <p> Another example: if we imagine a cluster formed of the following four nodes called A, B, C and D, we may send just the following set of commands to A: </p> <ol> <li> <code> CLUSTER MEET B-ip B-port </code> </li> <li> <code> CLUSTER MEET C-ip C-port </code> </li> <li> <code> CLUSTER MEET D-ip D-port </code> </li> </ol> <p> As a side effect of <code> A </code> knowing and being known by all the other nodes, it will send gossip sections in the heartbeat packets that will allow each other node to create a link with each other one, forming a full mesh in a matter of seconds, even if the cluster is large. </p> <p> Moreover <code> CLUSTER MEET </code> does not need to be reciprocal. If I send the command to A in order to join B, I don't need to also send it to B in order to join A. </p> <p> If the optional <code> cluster_bus_port </code> argument is not provided, the default of port + 10000 will be used. </p> <h2 id="implementation-details-meet-and-ping-packets"> Implementation details: MEET and PING packets </h2> <p> When a given node receives a <code> CLUSTER MEET </code> message, the node specified in the command still does not know the node we sent the command to. So in order for the node to force the receiver to accept it as a trusted node, it sends a <code> MEET </code> packet instead of a <a href="/docs/latest/commands/ping/"> <code> PING </code> </a> packet. The two packets have exactly the same format, but the former forces the receiver to acknowledge the node as trusted. </p> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#simple-strings"> Simple string reply </a> : <code> OK </code> if the command was successful. If the address or port specified are invalid an error is returned. <br/> <h2> History </h2> <ul> <li> Starting with Redis version 4.0.0: Added the optional <code> cluster_bus_port </code> argument. </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/cluster-meet/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/requests/bdbs/actions/import_reset_status/.html
<section class="prose w-full py-12 max-w-none"> <h1> Import reset status database action requests </h1> <p class="text-lg -mt-5 mb-10"> Reset database import status requests </p> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#put-bdbs-actions-import-reset-status"> PUT </a> </td> <td> <code> /v1/bdbs/{uid}/actions/import_reset_status </code> </td> <td> Reset database import status </td> </tr> </tbody> </table> <h2 id="put-bdbs-actions-import-reset-status"> Reset database import status </h2> <pre><code>PUT /v1/bdbs/{int: uid}/actions/import_reset_status </code></pre> <p> Reset the database’s <code> import_status </code> to idle if a backup is not in progress and clears the value of the <code> import_failure_reason </code> field. </p> <h3 id="permissions"> Permissions </h3> <table> <thead> <tr> <th> Permission name </th> <th> Roles </th> </tr> </thead> <tbody> <tr> <td> <a href="/docs/latest/operate/rs/7.4/references/rest-api/permissions/#reset_bdb_current_import_status"> reset_bdb_current_import_status </a> </td> <td> admin <br/> cluster_member <br/> db_member </td> </tr> </tbody> </table> <h3 id="put-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">PUT /bdbs/1/actions/import_reset_status </span></span></code></pre> </div> <h4 id="headers"> Headers </h4> <table> <thead> <tr> <th> Key </th> <th> Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> Host </td> <td> cnm.cluster.fqdn </td> <td> Domain name </td> </tr> <tr> <td> Accept </td> <td> application/json </td> <td> Accepted media type </td> </tr> </tbody> </table> <h4 id="url-parameters"> URL parameters </h4> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> uid </td> <td> integer </td> <td> The unique ID of the database </td> </tr> </tbody> </table> <h3 id="put-response"> Response </h3> <p> Returns a status code. </p> <h3 id="put-status-codes"> Status codes </h3> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1"> 200 OK </a> </td> <td> The request is accepted and is being processed. </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5"> 404 Not Found </a> </td> <td> Attempting to perform an action on a nonexistent database. </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7"> 406 Not Acceptable </a> </td> <td> Not all the modules loaded to the database support 'backup_restore' capability </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10"> 409 Conflict </a> </td> <td> Database is currently busy with another action. In this context, this is a temporary condition and the request should be reattempted later. </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/requests/bdbs/actions/import_reset_status/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/networking/port-configurations/.html
<section class="prose w-full py-12 max-w-none"> <h1> Network port configurations </h1> <p class="text-lg -mt-5 mb-10"> This document describes the various network port ranges and their uses. </p> <p> All Redis Enterprise Software deployments span multiple physical/virtual nodes. You'll need to keep several ports open between these nodes. This document describes the various port ranges and their uses. </p> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> Whenever you create a new database, you must verify that the ports assigned to the new database's endpoints are open. The cluster will not perform this verification for you. </div> </div> <h2 id="ports-and-port-ranges-used-by-redis-enterprise-software"> Ports and port ranges used by Redis Enterprise Software </h2> <p> Redis Enterprise Software's port usage falls into three general categories: </p> <ul> <li> Internal: For traffic between or within cluster nodes </li> <li> External: For traffic from client applications or external monitoring resources </li> <li> Active-Active: For traffic to and from clusters hosting Active-Active databases </li> </ul> <table> <thead> <tr> <th> Protocol </th> <th> Port </th> <th> Configurable </th> <th> Connection source </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> TCP </td> <td> 8001 </td> <td> <span title="Not configurable"> ❌ No </span> </td> <td> Internal, External </td> <td> Traffic from application to Redis Enterprise Software <a href="/docs/latest/operate/rs/7.4/databases/durability-ha/discovery-service/"> Discovery Service </a> </td> </tr> <tr> <td> TCP </td> <td> 8000, 8070, 8071, 9090, 9125 </td> <td> <span title="Not configurable"> ❌ No </span> </td> <td> Internal, External </td> <td> Metrics exported and managed by the web proxy </td> </tr> <tr> <td> TCP </td> <td> 8443 </td> <td> <span title="Configurable"> ✅ Yes </span> </td> <td> Internal, External </td> <td> Secure (HTTPS) access to the management web UI </td> </tr> <tr> <td> TCP </td> <td> 9081 </td> <td> <span title="Configurable"> ✅ Yes </span> </td> <td> Internal </td> <td> CRDB coordinator for Active-Active management (internal) </td> </tr> <tr> <td> TCP </td> <td> 9443 (Recommended), 8080 </td> <td> <span title="Configurable"> ✅ Yes </span> </td> <td> Internal, External, Active-Active </td> <td> REST API traffic, including cluster management and node bootstrap </td> </tr> <tr> <td> TCP </td> <td> 10050 </td> <td> <span title="Not configurable"> ❌ No </span> </td> <td> Internal </td> <td> Zabbix monitoring </td> </tr> <tr> <td> TCP </td> <td> 10000-10049, 10051-19999 </td> <td> <span title="Configurable"> ✅ Yes </span> </td> <td> Internal, External, Active-Active </td> <td> Database traffic </td> </tr> <tr> <td> UDP </td> <td> 53, 5353 </td> <td> <span title="Not configurable"> ❌ No </span> </td> <td> Internal, External </td> <td> DNS/mDNS traffic </td> </tr> <tr> <td> ICMP </td> <td> * </td> <td> <span title="Not configurable"> ❌ No </span> </td> <td> Internal </td> <td> Connectivity checking between nodes </td> </tr> <tr> <td> TCP </td> <td> 1968 </td> <td> <span title="Not configurable"> ❌ No </span> </td> <td> Internal </td> <td> Proxy traffic </td> </tr> <tr> <td> TCP </td> <td> 3333-3345, 36379, 36380 </td> <td> <span title="Not configurable"> ❌ No </span> </td> <td> Internal </td> <td> Internode communication </td> </tr> <tr> <td> TCP </td> <td> 20000-29999 </td> <td> <span title="Not configurable"> ❌ No </span> </td> <td> Internal </td> <td> Database shard traffic </td> </tr> <tr> <td> TCP </td> <td> 8002, 8004, 8006 </td> <td> <span title="Configurable"> ✅ Yes </span> </td> <td> Internal </td> <td> Default system health monitoring (envoy admin, envoy management server, gossip envoy admin) </td> </tr> <tr> <td> TCP </td> <td> 8444, 9080 </td> <td> <span title="Not configurable"> ❌ No </span> </td> <td> Internal </td> <td> Traffic between web proxy and cnm_http/cm </td> </tr> </tbody> </table> <h2 id="change-port-configuration"> Change port configuration </h2> <h3 id="reserve-ports"> Reserve ports </h3> <p> Redis Enterprise Software reserves some ports by default ( <code> system_reserved_ports </code> ). To reserve other ports or port ranges and prevent the cluster from assigning them to database endpoints, configure <code> reserved_ports </code> using one of the following methods: </p> <ul> <li> <p> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/config/"> rladmin cluster config </a> </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster config reserved_ports &lt;list of ports/port ranges&gt; </span></span></code></pre> </div> <p> For example: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster config reserved_ports <span class="m">11000</span> 13000-13010 </span></span></code></pre> </div> </li> <li> <p> <a href="/docs/latest/operate/rs/7.4/references/rest-api/requests/cluster/#put-cluster"> Update cluster settings </a> REST API request </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">PUT /v1/cluster </span></span><span class="line"><span class="cl"><span class="o">{</span> <span class="s2">"reserved_ports"</span>: <span class="o">[</span><span class="s2">"list of ports/port ranges"</span><span class="o">]</span> <span class="o">}</span> </span></span></code></pre> </div> <p> For example: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">PUT /v1/cluster </span></span><span class="line"><span class="cl"><span class="o">{</span> <span class="s2">"reserved_ports"</span>: <span class="o">[</span><span class="s2">"11000"</span>, <span class="s2">"13000-13010"</span><span class="o">]</span> <span class="o">}</span> </span></span></code></pre> </div> </li> </ul> <h3 id="change-the-cluster-manager-ui-port"> Change the Cluster Manager UI port </h3> <p> The Redis Enterprise Software Cluster Manager UI uses port 8443, by default. You can change this to a custom port as long as the new port is not in use by another process. </p> <p> To change this port, run: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster config cm_port &lt;new-port&gt; </span></span></code></pre> </div> <p> After changing the Redis Enterprise Software web UI port, you must connect any new node added to the cluster to the UI with the custom port number: <code> https://newnode.mycluster.example.com: </code> <strong> <code> &lt;nonstandard-port-number&gt; </code> </strong> </p> <h3 id="change-the-envoy--ports"> Change the envoy ports </h3> <p> For system health monitoring, Redis uses the following ports by default: </p> <ul> <li> <p> Port 8002 for envoy admin </p> </li> <li> <p> Port 8004 for envoy management server </p> </li> <li> <p> Port 8006 for gossip envoy admin </p> </li> </ul> <p> You can change each envoy port to a custom port using the <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/config/"> <code> rladmin cluster config </code> </a> command as long as the new port is not in use by another process. When you change <code> envoy_admin_port </code> , expect a restart of envoy. </p> <p> To change the envoy admin port, run: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ rladmin cluster config envoy_admin_port &lt;new-port&gt; </span></span><span class="line"><span class="cl">Updating envoy_admin_port... restarting now </span></span></code></pre> </div> <p> To change the envoy management server port, run: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ rladmin cluster config envoy_mgmt_server_port &lt;new-port&gt; </span></span><span class="line"><span class="cl">Cluster configured successfully </span></span></code></pre> </div> <p> To change the gossip envoy admin port, run: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ rladmin cluster config gossip_envoy_admin_port &lt;new-port&gt; </span></span><span class="line"><span class="cl">Cluster configured successfully </span></span></code></pre> </div> <h3 id="change-the-rest-api-port"> Change the REST API port </h3> <p> For the REST API, Redis Enterprise Software uses port 9443 (secure) and port 8080 (not secure), by default. You can change this to a custom port as long as the new port is not in use by another process. </p> <p> To change these ports, run: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster config cnm_http_port &lt;new-port&gt; </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster config cnm_https_port &lt;new-port&gt; </span></span></code></pre> </div> <h3 id="ubuntu-conflicts-with-port-53"> Ubuntu conflicts with port 53 </h3> <p> If port 53 is in use, the installation fails. This can occur in default installations of Ubuntu 18.04 and 20.04 in which <code> systemd-resolved </code> (DNS server) is running. </p> <p> To prevent this issue, change the system configuration to make this port available before installation. </p> <ol> <li> <p> Edit <code> /etc/systemd/resolved.conf </code> : </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">sudo vi /etc/systemd/resolved.conf </span></span></code></pre> </div> </li> <li> <p> Add <code> DNSStubListener=no </code> as the last line in the file and save the file. </p> </li> <li> <p> Rename the current <code> /etc/resolv.conf </code> file: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">sudo mv /etc/resolv.conf /etc/resolv.conf.orig </span></span></code></pre> </div> </li> <li> <p> Create a symbolic link for <code> /etc/resolv.conf </code> : </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf </span></span></code></pre> </div> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> You might encounter a temporary name resolution error ( <code> sudo: unable to resolve host {hostname}: Temporary failure in name resolution </code> ), which should be fixed when you restart <code> systemd-resolved </code> in the next step. </div> </div> </li> <li> <p> Restart the DNS service: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">sudo service systemd-resolved restart </span></span></code></pre> </div> </li> </ol> <h3 id="update-sysctlconf-to-avoid-port-collisions"> Update <code> sysctl.conf </code> to avoid port collisions </h3> <p> To avoid port collision, update <code> /etc/sysctl.conf </code> to include: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">net.ipv4.ip_local_port_range <span class="o">=</span> <span class="m">30000</span> <span class="m">65535</span> </span></span></code></pre> </div> <h2 id="configure-https"> Configure HTTPS </h2> <h3 id="require-https-for-api-endpoints"> Require HTTPS for API endpoints </h3> <p> By default, the Redis Enterprise Software API supports communication over HTTP and HTTPS. However, you can turn off HTTP support to ensure that API requests are encrypted. </p> <p> Before you turn off HTTP support, make sure you migrate any scripts or proxy configurations that use HTTP to the encrypted API endpoint to prevent broken connections. </p> <p> To turn off HTTP support for API endpoints, run: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster config http_support disabled </span></span></code></pre> </div> <p> After you turn off HTTP support, traffic sent to the unencrypted API endpoint is blocked. </p> <h3 id="http-to-https-redirection"> HTTP to HTTPS redirection </h3> <p> Starting with version 6.0.12, you cannot use automatic HTTP to HTTPS redirection. To poll metrics from the <code> metrics_exporter </code> or to access the Cluster Manager UI, use HTTPS in your request. HTTP requests won't be automatically redirected to HTTPS for those services. </p> <h2 id="nodes-on-different-vlans"> Nodes on different VLANs </h2> <p> Nodes in the same cluster must reside on the same VLAN. If you can't host the nodes on the same VLAN, then you must open <a href="/docs/latest/operate/rs/7.4/networking/port-configurations/"> all ports </a> between them. </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/networking/port-configurations/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/client-unblock/.html
<section class="prose w-full py-12"> <h1 class="command-name"> CLIENT UNBLOCK </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">CLIENT UNBLOCK client-id [TIMEOUT | ERROR]</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 5.0.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(log N) where N is the number of client connections </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @admin </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> <code> @dangerous </code> <span class="mr-1 last:hidden"> , </span> <code> @connection </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> This command can unblock, from a different connection, a client blocked in a blocking operation, such as for instance <a href="/docs/latest/commands/brpop/"> <code> BRPOP </code> </a> or <a href="/docs/latest/commands/xread/"> <code> XREAD </code> </a> or <a href="/docs/latest/commands/wait/"> <code> WAIT </code> </a> . </p> <p> By default the client is unblocked as if the timeout of the command was reached, however if an additional (and optional) argument is passed, it is possible to specify the unblocking behavior, that can be <strong> TIMEOUT </strong> (the default) or <strong> ERROR </strong> . If <strong> ERROR </strong> is specified, the behavior is to unblock the client returning as error the fact that the client was force-unblocked. Specifically the client will receive the following error: </p> <pre><code>-UNBLOCKED client unblocked via CLIENT UNBLOCK </code></pre> <p> Note: of course as usually it is not guaranteed that the error text remains the same, however the error code will remain <code> -UNBLOCKED </code> . </p> <p> This command is useful especially when we are monitoring many keys with a limited number of connections. For instance we may want to monitor multiple streams with <a href="/docs/latest/commands/xread/"> <code> XREAD </code> </a> without using more than N connections. However at some point the consumer process is informed that there is one more stream key to monitor. In order to avoid using more connections, the best behavior would be to stop the blocking command from one of the connections in the pool, add the new key, and issue the blocking command again. </p> <p> To obtain this behavior the following pattern is used. The process uses an additional <em> control connection </em> in order to send the <code> CLIENT UNBLOCK </code> command if needed. In the meantime, before running the blocking operation on the other connections, the process runs <a href="/docs/latest/commands/client-id/"> <code> CLIENT ID </code> </a> in order to get the ID associated with that connection. When a new key should be added, or when a key should no longer be monitored, the relevant connection blocking command is aborted by sending <code> CLIENT UNBLOCK </code> in the control connection. The blocking command will return and can be finally reissued. </p> <p> This example shows the application in the context of Redis streams, however the pattern is a general one and can be applied to other cases. </p> <h2 id="examples"> Examples </h2> <pre tabindex="0"><code>Connection A (blocking connection): &gt; CLIENT ID 2934 &gt; BRPOP key1 key2 key3 0 (client is blocked) ... Now we want to add a new key ... Connection B (control connection): &gt; CLIENT UNBLOCK 2934 1 Connection A (blocking connection): ... BRPOP reply with timeout ... NULL &gt; BRPOP key1 key2 key3 key4 0 (client is blocked again) </code></pre> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <p> One of the following: </p> <ul> <li> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : <code> 1 </code> if the client was unblocked successfully. </li> <li> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : <code> 0 </code> if the client wasn't unblocked. </li> </ul> <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/client-unblock/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/deprecated-features/graph/config/.html
<section class="prose w-full py-12 max-w-none"> <h1> Graph configuration compatibility with Redis Enterprise </h1> <p class="text-lg -mt-5 mb-10"> Graph configuration settings supported by Redis Enterprise. </p> <div class="banner-article rounded-md"> <p> Redis, Inc. has announced the end of life of RedisGraph. We will carry out the process gradually and in accordance with our commitment to our customers. See <a href="https://redis.io/blog/redisgraph-eol/"> details </a> . </p> </div> <p> You cannot use <code> GRAPH.CONFIG SET </code> to configure RedisGraph in <a href="/docs/latest/operate/rs/"> Redis Enterprise Software </a> or <a href="/docs/latest/operate/rc/"> Redis Cloud </a> . Instead, use one of the following methods. </p> <p> For Redis Cloud: </p> <ul> <li> <p> <em> Flexible or Annual <a href="/docs/latest/operate/rc/subscriptions/"> subscriptions </a> </em> : contact <a href="https://redis.com/company/support/"> support </a> to request a configuration change. </p> </li> <li> <p> <em> Free or Fixed subscriptions </em> : you cannot change RedisGraph configuration. </p> </li> </ul> <p> For Redis Enterprise Software, use either: </p> <ul> <li> <p> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/tune/#tune-db"> <code> rladmin tune db </code> </a> : </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ rladmin tune db db:&lt;ID<span class="p">|</span>name&gt; module_name graph <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span> module_config_params <span class="s2">"setting-name setting-value"</span> </span></span></code></pre> </div> </li> <li> <p> <a href="/docs/latest/operate/rs/references/rest-api/requests/modules/config/"> Configure module </a> REST API request: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">POST /v1/modules/config/bdb/&lt;ID&gt; </span></span><span class="line"><span class="cl"><span class="o">{</span> </span></span><span class="line"><span class="cl"> <span class="s2">"modules"</span>: <span class="o">[</span> </span></span><span class="line"><span class="cl"> <span class="o">{</span> </span></span><span class="line"><span class="cl"> <span class="s2">"module_name"</span>: <span class="s2">"graph"</span>, </span></span><span class="line"><span class="cl"> <span class="s2">"module_args"</span>: <span class="s2">"setting-name setting-value"</span> </span></span><span class="line"><span class="cl"> <span class="o">}</span> </span></span><span class="line"><span class="cl"> <span class="o">]</span> </span></span><span class="line"><span class="cl"><span class="o">}</span> </span></span></code></pre> </div> </li> </ul> <table> <thead> <tr> <th style="text-align:left"> Setting </th> <th style="text-align:left"> Redis <br/> Enterprise </th> <th style="text-align:left"> Redis <br/> Cloud </th> <th style="text-align:left"> Notes </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/configuration.md#cache_size"> CACHE_SIZE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Supported </span> <br/> <span> <br/> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Flexible &amp; Annual </span> <br/> <span title="Not supported"> <nobr> ❌ Free &amp; Fixed </nobr> </span> </td> <td style="text-align:left"> Default: 25 </td> </tr> <tr> <td style="text-align:left"> <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/configuration.md#max_queued_queries"> MAX_QUEUED_QUERIES </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Supported </span> <br/> <span> <br/> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Flexible &amp; Annual </span> <br/> <span title="Not supported"> <nobr> ❌ Free &amp; Fixed </nobr> </span> </td> <td style="text-align:left"> Default: 25 </td> </tr> <tr> <td style="text-align:left"> <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/configuration.md#node_creation_buffer"> NODE_CREATION_BUFFER </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Supported </span> <br/> <span> <br/> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Flexible &amp; Annual </span> <br/> <span title="Not supported"> <nobr> ❌ Free &amp; Fixed </nobr> </span> </td> <td style="text-align:left"> Default: 16384 </td> </tr> <tr> <td style="text-align:left"> <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/configuration.md#omp_thread_count"> OMP_THREAD_COUNT </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Supported </span> <br/> <span> <br/> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Flexible &amp; Annual* </span> <br/> <span title="Not supported"> <nobr> ❌ Free &amp; Fixed </nobr> </span> </td> <td style="text-align:left"> * Updates automatically when you change your plan. <br/> <br/> Redis Enterprise default: Set by plan <br/> <br/> Redis Cloud defaults: <br/> • Flexible &amp; Annual: Set by plan <br/> • Free &amp; Fixed: 1 <br/> </td> </tr> <tr> <td style="text-align:left"> <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/configuration.md#query_mem_capacity"> QUERY_MEM_CAPACITY </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Supported </span> <br/> <span> <br/> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Flexible &amp; Annual </span> <br/> <span title="Not supported"> <nobr> ❌ Free &amp; Fixed </nobr> </span> </td> <td style="text-align:left"> Default: 100000000 </td> </tr> <tr> <td style="text-align:left"> <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/configuration.md#resultset_size"> RESULTSET_SIZE </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Supported </span> <br/> <span> <br/> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Flexible &amp; Annual </span> <br/> <span title="Not supported"> <nobr> ❌ Free &amp; Fixed </nobr> </span> </td> <td style="text-align:left"> Default: 10000 </td> </tr> <tr> <td style="text-align:left"> <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/configuration.md#thread_count"> THREAD_COUNT </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Supported </span> <br/> <span> <br/> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Flexible &amp; Annual* </span> <br/> <span title="Not supported"> <nobr> ❌ Free &amp; Fixed </nobr> </span> </td> <td style="text-align:left"> * Updates automatically when you change your plan. <br/> <br/> Redis Enterprise default: Set by plan <br/> <br/> Redis Cloud defaults: <br/> • Flexible &amp; Annual: Set by plan <br/> • Free &amp; Fixed: 1 <br/> </td> </tr> <tr> <td style="text-align:left"> <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/configuration.md#timeout"> TIMEOUT </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Supported </span> <br/> <span> <br/> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Flexible &amp; Annual </span> <br/> <span title="Not supported"> <nobr> ❌ Free &amp; Fixed </nobr> </span> </td> <td style="text-align:left"> Default: 100 </td> </tr> <tr> <td style="text-align:left"> <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/configuration.md#vkey_max_entity_count"> VKEY_MAX_ENTITY_COUNT </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Supported </span> <br/> <span> <br/> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Flexible &amp; Annual </span> <br/> <span title="Not supported"> <nobr> ❌ Free &amp; Fixed </nobr> </span> </td> <td style="text-align:left"> Default: 100000 </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/deprecated-features/graph/config/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rc/changelog/2023/february-2023/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Cloud changelog (February 2023) </h1> <p class="text-lg -mt-5 mb-10"> New features, enhancements, and other changes added to Redis Cloud during February 2023. </p> <p> This changelog lists new features, enhancements, and other changes added to Redis Cloud during February 2023. </p> <h2 id="new-features-and-enhancements"> New features and enhancements </h2> <ul> <li> <p> <a href="/docs/latest/operate/rc/security/private-service-connect/"> Private Service Connect </a> </p> </li> <li> <p> Additional enhancements </p> </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rc/changelog/2023/february-2023/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/write-behind/reference/cli/redis-di-reset/.html
<section class="prose w-full py-12 max-w-none"> <h1> redis-di reset </h1> <p class="text-lg -mt-5 mb-10"> Resets the pipeline into initial full sync mode </p> <h2 id="usage"> Usage </h2> <pre tabindex="0"><code>Usage: redis-di reset [OPTIONS] </code></pre> <h2 id="options"> Options </h2> <ul> <li> <p> <code> loglevel </code> : </p> <ul> <li> Type: Choice(['DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']) </li> <li> Default: <code> info </code> </li> <li> Usage: <code> --loglevel -log-level </code> </li> </ul> </li> <li> <p> <code> rdi_host </code> (REQUIRED): </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-host </code> </li> </ul> <p> Host/IP of Write-behind Database </p> </li> <li> <p> <code> rdi_port </code> (REQUIRED): </p> <ul> <li> Type: &lt;IntRange 1000&lt;=x&lt;=65535&gt; </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-port </code> </li> </ul> <p> Port of Write-behind Database </p> </li> <li> <p> <code> rdi_password </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-password </code> </li> </ul> <p> Write-behind Database Password </p> </li> <li> <p> <code> rdi_key </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-key </code> </li> </ul> <p> Private key file to authenticate with </p> </li> <li> <p> <code> rdi_cert </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-cert </code> </li> </ul> <p> Client certificate file to authenticate with </p> </li> <li> <p> <code> rdi_cacert </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-cacert </code> </li> </ul> <p> CA certificate file to verify with </p> </li> <li> <p> <code> rdi_key_password </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-key-password </code> </li> </ul> <p> Password for unlocking an encrypted private key </p> </li> <li> <p> <code> force </code> : </p> <ul> <li> Type: BOOL </li> <li> Default: <code> false </code> </li> <li> Usage: <code> --force -f </code> </li> </ul> <p> Force operation. skips verification prompts </p> </li> <li> <p> <code> help </code> : </p> <ul> <li> Type: BOOL </li> <li> Default: <code> false </code> </li> <li> Usage: <code> --help </code> </li> </ul> <p> Show this message and exit. </p> </li> </ul> <h2 id="cli-help"> CLI help </h2> <pre tabindex="0"><code>Usage: redis-di reset [OPTIONS] Resets the pipeline into initial full sync mode Options: -log-level, --loglevel [DEBUG|INFO|WARN|ERROR|CRITICAL] [default: INFO] --rdi-host TEXT Host/IP of Write-behind Database [required] --rdi-port INTEGER RANGE Port of Write-behind Database [1000&lt;=x&lt;=65535; required] --rdi-password TEXT Write-behind Database Password --rdi-key TEXT Private key file to authenticate with --rdi-cert TEXT Client certificate file to authenticate with --rdi-cacert TEXT CA certificate file to verify with --rdi-key-password TEXT Password for unlocking an encrypted private key -f, --force Force operation. skips verification prompts --help Show this message and exit. </code></pre> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/write-behind/reference/cli/redis-di-reset/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/references/rest-api/encryption/.html
<section class="prose w-full py-12 max-w-none"> <h1> Encrypt REST API requests </h1> <h2 id="require-https-for-api-endpoints"> Require HTTPS for API endpoints </h2> <p> By default, the Redis Enterprise Software API supports communication over HTTP and HTTPS. However, you can turn off support for HTTP to ensure that API requests are encrypted. </p> <p> Before you turn off HTTP support, be sure to migrate any scripts or proxy configurations that use HTTP to the encrypted API endpoint to prevent broken connections. </p> <p> To turn off HTTP support for API endpoints, run: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster config http_support disabled </span></span></code></pre> </div> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/references/rest-api/encryption/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/cms.query/.html
<section class="prose w-full py-12"> <h1 class="command-name"> CMS.QUERY </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">CMS.QUERY key item [item ...]</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available in: </dt> <dd class="m-0"> <a href="/docs/stack"> Redis Stack </a> / <a href="/docs/data-types/probabilistic"> Bloom 2.0.0 </a> </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(n) where n is the number of items </dd> </dl> <p> Returns the count for one or more items in a sketch. </p> <h3 id="parameters"> Parameters: </h3> <ul> <li> <strong> key </strong> : The name of the sketch. </li> <li> <strong> item </strong> : One or more items for which to return the count. </li> </ul> <h2 id="return"> Return </h2> <p> Count of one or more items </p> <p> <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> of <a href="/docs/latest/develop/reference/protocol-spec/#integers"> Integer reply </a> with a min-count of each of the items in the sketch. </p> <h2 id="examples"> Examples </h2> <pre tabindex="0"><code>redis&gt; CMS.QUERY test foo bar 1) (integer) 10 2) (integer) 42 </code></pre> <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/cms.query/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/function-restore/.html
<section class="prose w-full py-12"> <h1 class="command-name"> FUNCTION RESTORE </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">FUNCTION RESTORE serialized-value [FLUSH | APPEND | REPLACE]</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 7.0.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(N) where N is the number of functions on the payload </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @write </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> <code> @scripting </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Restore libraries from the serialized payload. </p> <p> You can use the optional <em> policy </em> argument to provide a policy for handling existing libraries. The following policies are allowed: </p> <ul> <li> <strong> APPEND: </strong> appends the restored libraries to the existing libraries and aborts on collision. This is the default policy. </li> <li> <strong> FLUSH: </strong> deletes all existing libraries before restoring the payload. </li> <li> <strong> REPLACE: </strong> appends the restored libraries to the existing libraries, replacing any existing ones in case of name collisions. Note that this policy doesn't prevent function name collisions, only libraries. </li> </ul> <p> For more information please refer to <a href="/docs/latest/develop/interact/programmability/functions-intro/"> Introduction to Redis Functions </a> . </p> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#simple-strings"> Simple string reply </a> : <code> OK </code> . <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/function-restore/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/develop/clients/go/.html
<section class="prose w-full py-12 max-w-none"> <h1> go-redis guide (Go) </h1> <p class="text-lg -mt-5 mb-10"> Connect your Go application to a Redis database </p> <p> <a href="https://github.com/redis/go-redis"> <code> go-redis </code> </a> is the <a href="https://go.dev/"> Go </a> client for Redis. The sections below explain how to install <code> go-redis </code> and connect your application to a Redis database. </p> <p> <code> go-redis </code> requires a running Redis or <a href="/docs/latest/operate/oss_and_stack/install/install-stack/"> Redis Stack </a> server. See <a href="/docs/latest/operate/oss_and_stack/install/"> Getting started </a> for Redis installation instructions. </p> <h2 id="install"> Install </h2> <p> <code> go-redis </code> supports the last two Go versions. You can only use it from within a Go module, so you must initialize a Go module before you start, or add your code to an existing module: </p> <pre tabindex="0"><code>go mod init github.com/my/repo </code></pre> <p> Use the <code> go get </code> command to install <code> go-redis/v9 </code> : </p> <pre tabindex="0"><code>go get github.com/redis/go-redis/v9 </code></pre> <h2 id="connect"> Connect </h2> <p> The following example shows the simplest way to connect to a Redis server: </p> <div class="highlight"> <pre class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kn">import</span> <span class="p">(</span> </span></span><span class="line"><span class="cl"> <span class="s">"context"</span> </span></span><span class="line"><span class="cl"> <span class="s">"fmt"</span> </span></span><span class="line"><span class="cl"> <span class="s">"github.com/redis/go-redis/v9"</span> </span></span><span class="line"><span class="cl"><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="kd">func</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nx">client</span> <span class="o">:=</span> <span class="nx">redis</span><span class="p">.</span><span class="nf">NewClient</span><span class="p">(</span><span class="o">&amp;</span><span class="nx">redis</span><span class="p">.</span><span class="nx">Options</span><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nx">Addr</span><span class="p">:</span> <span class="s">"localhost:6379"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nx">Password</span><span class="p">:</span> <span class="s">""</span><span class="p">,</span> <span class="c1">// No password set </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="nx">DB</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="c1">// Use default DB </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="nx">Protocol</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span> <span class="c1">// Connection protocol </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="p">})</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <p> You can also connect using a connection string: </p> <div class="highlight"> <pre class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="nx">opt</span><span class="p">,</span> <span class="nx">err</span> <span class="o">:=</span> <span class="nx">redis</span><span class="p">.</span><span class="nf">ParseURL</span><span class="p">(</span><span class="s">"redis://&lt;user&gt;:&lt;pass&gt;@localhost:6379/&lt;db&gt;"</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="nx">err</span> <span class="o">!=</span> <span class="kc">nil</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nb">panic</span><span class="p">(</span><span class="nx">err</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">client</span> <span class="o">:=</span> <span class="nx">redis</span><span class="p">.</span><span class="nf">NewClient</span><span class="p">(</span><span class="nx">opt</span><span class="p">)</span> </span></span></code></pre> </div> <p> After connecting, you can test the connection by storing and retrieving a simple <a href="/docs/latest/develop/data-types/strings/"> string </a> : </p> <div class="highlight"> <pre class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="nx">ctx</span> <span class="o">:=</span> <span class="nx">context</span><span class="p">.</span><span class="nf">Background</span><span class="p">()</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">err</span> <span class="o">:=</span> <span class="nx">client</span><span class="p">.</span><span class="nf">Set</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"foo"</span><span class="p">,</span> <span class="s">"bar"</span><span class="p">,</span> <span class="mi">0</span><span class="p">).</span><span class="nf">Err</span><span class="p">()</span> </span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="nx">err</span> <span class="o">!=</span> <span class="kc">nil</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nb">panic</span><span class="p">(</span><span class="nx">err</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">val</span><span class="p">,</span> <span class="nx">err</span> <span class="o">:=</span> <span class="nx">client</span><span class="p">.</span><span class="nf">Get</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"foo"</span><span class="p">).</span><span class="nf">Result</span><span class="p">()</span> </span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="nx">err</span> <span class="o">!=</span> <span class="kc">nil</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nb">panic</span><span class="p">(</span><span class="nx">err</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="nx">fmt</span><span class="p">.</span><span class="nf">Println</span><span class="p">(</span><span class="s">"foo"</span><span class="p">,</span> <span class="nx">val</span><span class="p">)</span> </span></span></code></pre> </div> <p> You can also easily store and retrieve a <a href="/docs/latest/develop/data-types/hashes/"> hash </a> : </p> <div class="highlight"> <pre class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="nx">hashFields</span> <span class="o">:=</span> <span class="p">[]</span><span class="kt">string</span><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="s">"model"</span><span class="p">,</span> <span class="s">"Deimos"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="s">"brand"</span><span class="p">,</span> <span class="s">"Ergonom"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="s">"type"</span><span class="p">,</span> <span class="s">"Enduro bikes"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="s">"price"</span><span class="p">,</span> <span class="s">"4972"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">res1</span><span class="p">,</span> <span class="nx">err</span> <span class="o">:=</span> <span class="nx">rdb</span><span class="p">.</span><span class="nf">HSet</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"bike:1"</span><span class="p">,</span> <span class="nx">hashFields</span><span class="p">).</span><span class="nf">Result</span><span class="p">()</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="nx">err</span> <span class="o">!=</span> <span class="kc">nil</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nb">panic</span><span class="p">(</span><span class="nx">err</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">fmt</span><span class="p">.</span><span class="nf">Println</span><span class="p">(</span><span class="nx">res1</span><span class="p">)</span> <span class="c1">// &gt;&gt;&gt; 4 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="nx">res2</span><span class="p">,</span> <span class="nx">err</span> <span class="o">:=</span> <span class="nx">rdb</span><span class="p">.</span><span class="nf">HGet</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"bike:1"</span><span class="p">,</span> <span class="s">"model"</span><span class="p">).</span><span class="nf">Result</span><span class="p">()</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="nx">err</span> <span class="o">!=</span> <span class="kc">nil</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nb">panic</span><span class="p">(</span><span class="nx">err</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">fmt</span><span class="p">.</span><span class="nf">Println</span><span class="p">(</span><span class="nx">res2</span><span class="p">)</span> <span class="c1">// &gt;&gt;&gt; Deimos </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="nx">res3</span><span class="p">,</span> <span class="nx">err</span> <span class="o">:=</span> <span class="nx">rdb</span><span class="p">.</span><span class="nf">HGet</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"bike:1"</span><span class="p">,</span> <span class="s">"price"</span><span class="p">).</span><span class="nf">Result</span><span class="p">()</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="nx">err</span> <span class="o">!=</span> <span class="kc">nil</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nb">panic</span><span class="p">(</span><span class="nx">err</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">fmt</span><span class="p">.</span><span class="nf">Println</span><span class="p">(</span><span class="nx">res3</span><span class="p">)</span> <span class="c1">// &gt;&gt;&gt; 4972 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="nx">res4</span><span class="p">,</span> <span class="nx">err</span> <span class="o">:=</span> <span class="nx">rdb</span><span class="p">.</span><span class="nf">HGetAll</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"bike:1"</span><span class="p">).</span><span class="nf">Result</span><span class="p">()</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="nx">err</span> <span class="o">!=</span> <span class="kc">nil</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nb">panic</span><span class="p">(</span><span class="nx">err</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">fmt</span><span class="p">.</span><span class="nf">Println</span><span class="p">(</span><span class="nx">res4</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1">// &gt;&gt;&gt; map[brand:Ergonom model:Deimos price:4972 type:Enduro bikes] </span></span></span></code></pre> </div> <p> Use <a href="https://stackoverflow.com/questions/10858787/what-are-the-uses-for-struct-tags-in-go"> struct tags </a> of the form <code> redis:"&lt;field-name&gt;" </code> with the <code> Scan() </code> method to parse fields from a hash directly into corresponding struct fields: </p> <div class="highlight"> <pre class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kd">type</span> <span class="nx">BikeInfo</span> <span class="kd">struct</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nx">Model</span> <span class="kt">string</span> <span class="s">`redis:"model"`</span> </span></span><span class="line"><span class="cl"> <span class="nx">Brand</span> <span class="kt">string</span> <span class="s">`redis:"brand"`</span> </span></span><span class="line"><span class="cl"> <span class="nx">Type</span> <span class="kt">string</span> <span class="s">`redis:"type"`</span> </span></span><span class="line"><span class="cl"> <span class="nx">Price</span> <span class="kt">int</span> <span class="s">`redis:"price"`</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="kd">var</span> <span class="nx">res4a</span> <span class="nx">BikeInfo</span> </span></span><span class="line"><span class="cl"><span class="nx">err</span> <span class="p">=</span> <span class="nx">rdb</span><span class="p">.</span><span class="nf">HGetAll</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"bike:1"</span><span class="p">).</span><span class="nf">Scan</span><span class="p">(</span><span class="o">&amp;</span><span class="nx">res4a</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="nx">err</span> <span class="o">!=</span> <span class="kc">nil</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nb">panic</span><span class="p">(</span><span class="nx">err</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">fmt</span><span class="p">.</span><span class="nf">Printf</span><span class="p">(</span><span class="s">"Model: %v, Brand: %v, Type: %v, Price: $%v\n"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nx">res4a</span><span class="p">.</span><span class="nx">Model</span><span class="p">,</span> <span class="nx">res4a</span><span class="p">.</span><span class="nx">Brand</span><span class="p">,</span> <span class="nx">res4a</span><span class="p">.</span><span class="nx">Type</span><span class="p">,</span> <span class="nx">res4a</span><span class="p">.</span><span class="nx">Price</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1">// &gt;&gt;&gt; Model: Deimos, Brand: Ergonom, Type: Enduro bikes, Price: $4972 </span></span></span></code></pre> </div> <h2 id="observability"> Observability </h2> <p> <code> go-redis </code> supports <a href="https://opentelemetry.io/"> OpenTelemetry </a> instrumentation. to monitor performance and trace the execution of Redis commands. For example, the following code instruments Redis commands to collect traces, logs, and metrics: </p> <div class="highlight"> <pre class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kn">import</span> <span class="p">(</span> </span></span><span class="line"><span class="cl"> <span class="s">"github.com/redis/go-redis/v9"</span> </span></span><span class="line"><span class="cl"> <span class="s">"github.com/redis/go-redis/extra/redisotel/v9"</span> </span></span><span class="line"><span class="cl"><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">rdb</span> <span class="o">:=</span> <span class="nx">redis</span><span class="p">.</span><span class="nf">NewClient</span><span class="p">(</span><span class="o">&amp;</span><span class="nx">redis</span><span class="p">.</span><span class="nx">Options</span><span class="p">{</span><span class="o">...</span><span class="p">})</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1">// Enable tracing instrumentation. </span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">if</span> <span class="nx">err</span> <span class="o">:=</span> <span class="nx">redisotel</span><span class="p">.</span><span class="nf">InstrumentTracing</span><span class="p">(</span><span class="nx">rdb</span><span class="p">);</span> <span class="nx">err</span> <span class="o">!=</span> <span class="kc">nil</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nb">panic</span><span class="p">(</span><span class="nx">err</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1">// Enable metrics instrumentation. </span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">if</span> <span class="nx">err</span> <span class="o">:=</span> <span class="nx">redisotel</span><span class="p">.</span><span class="nf">InstrumentMetrics</span><span class="p">(</span><span class="nx">rdb</span><span class="p">);</span> <span class="nx">err</span> <span class="o">!=</span> <span class="kc">nil</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nb">panic</span><span class="p">(</span><span class="nx">err</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <p> See the <code> go-redis </code> <a href="https://github.com/redis/go-redis/blob/master/example/otel/README.md"> GitHub repo </a> . for more OpenTelemetry examples. </p> <h2 id="more-information"> More information </h2> <p> See the other pages in this section for more information and examples. Further examples are available at the <a href="https://redis.uptrace.dev/guide/"> <code> go-redis </code> </a> website and the <a href="https://github.com/redis/go-redis"> GitHub repository </a> . </p> <nav> <a href="/docs/latest/develop/clients/go/connect/"> Connect to the server </a> <p> Connect your Go application to a Redis database </p> <a href="/docs/latest/develop/clients/go/queryjson/"> Example - Index and query JSON documents </a> <p> Learn how to use the Redis query engine with JSON </p> </nav> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/develop/clients/go/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/networking/cluster-dns/.html
<section class="prose w-full py-12 max-w-none"> <h1> Configure cluster DNS </h1> <p class="text-lg -mt-5 mb-10"> Configure DNS to communicate between nodes in your cluster. </p> <p> By default, Redis Enterprise Software deployments use DNS to communicate between nodes. You can also use the <a href="/docs/latest/operate/rs/databases/durability-ha/discovery-service/"> Discovery Service </a> , which uses IP addresses to connect and complies with the <a href="/docs/latest/operate/oss_and_stack/management/sentinel/"> Redis Sentinel API </a> supported by Redis Community Edition. </p> <p> Each node in a Redis Enterprise cluster includes a small DNS server to manage internal functions, such as high availability, automatic failover, automatic migration, and so on. Nodes should only run the DNS server included with the software. Running additional DNS servers can lead to unexpected behavior. </p> <h2 id="cluster-name-and-connection-management"> Cluster name and connection management </h2> <p> Whether you're administering Redis Enterprise Software or accessing databases, there are two ways to connect: </p> <ul> <li> <p> URL-based connections - URL-based connections use DNS to resolve the fully qualified cluster domain name (FQDN). This means that DNS records might need to be updated when topology changes, such as adding (or removing) nodes from the cluster. </p> <p> Because apps and other client connections rely on the URL (rather than the address), they do not need to be modified when topology changes. </p> </li> <li> <p> IP-based connections - IP-based connections do not require DNS setup, as they rely on the underlying TCP/IP addresses. As long as topology changes do not change the address of the cluster nodes, no configuration changes are needed, DNS or otherwise. </p> <p> However, changes to IP addresses (or changes to IP address access) impact all connections to the node, including apps and clients. IP address changes can therefore be unpredictable or time-consuming. </p> </li> </ul> <h2 id="url-based-connections"> URL-based connections </h2> <p> The fully qualified domain name (FQDN) is the unique cluster identifier that enables clients to connect to the different components of Redis Enterprise Software. The FQDN is a crucial component of the high-availability mechanism because it's used internally to enable and implement automatic and transparent failover of nodes, databases, shards, and endpoints. </p> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> Setting the cluster's FQDN is a one-time operation, one that cannot be changed after being set. </div> </div> <p> The FQDN must always comply with the IETF's <a href="https://datatracker.ietf.org/doc/html/rfc952"> RFC 952 </a> standard and section 2.1 of the <a href="https://datatracker.ietf.org/doc/html/rfc1123"> RFC 1123 </a> standard. </p> <h2 id="identify-the-cluster"> Identify the cluster </h2> <p> To identify the cluster, either use DNS to define a fully qualified domain name or use the IP addresses of each node. </p> <h3 id="define-domain-using-dns"> Define domain using DNS </h3> <p> Use DNS if you: </p> <ul> <li> have your own domain </li> <li> want to integrate the cluster into that domain </li> <li> can access and update the DNS records for that domain </li> </ul> <ol> <li> <p> Make sure that the cluster and at least one node (preferably all nodes) in the cluster are correctly configured in the DNS with the appropriate NS entries. </p> <p> For example: </p> <ul> <li> Your domain is: <code> mydomain.com </code> </li> <li> You would like to name the Redis Enterprise Software cluster <code> mycluster </code> </li> <li> You have three nodes in the cluster: <ul> <li> node1 (IP address 1.1.1.1) </li> <li> node2 (2.2.2.2) </li> <li> node3 (3.3.3.3) </li> </ul> </li> </ul> </li> <li> <p> In the FQDN field, enter the value <code> mycluster.mydomain.com </code> and add the following records in the DNS table for <code> mydomain.com </code> : </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">mycluster.mydomain.com NS node1.mycluster.mydomain.com </span></span><span class="line"><span class="cl"> node2.mycluster.mydomain.com </span></span><span class="line"><span class="cl"> node3.mycluster.mydomain.com </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">node1.mycluster.mydomain.com A 1.1.1.1 </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">node2.mycluster.mydomain.com A 2.2.2.2 </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">node3.mycluster.mydomain.com A 3.3.3.3 </span></span></code></pre> </div> </li> </ol> <h3 id="zeroconfiguration-using-mdns-development-option-only"> Zero-configuration using mDNS </h3> <p> Development and test environments can use <a href="https://en.wikipedia.org/wiki/Multicast_DNS"> Multicast DNS </a> (mDNS), a zero-configuration service designed for small networks. Production environments should <em> not </em> use mDNS. </p> <p> mDNS is a standard protocol that provides DNS-like name resolution and service discovery capabilities to machines on local networks with minimal to no configuration. </p> <p> Before adopting mDNS, verify that it's supported by each client you wish to use to connect to your Redis databases. Also make sure that your network infrastructure permits mDNS/multi-casting between clients and cluster nodes. </p> <p> Configuring the cluster to support mDNS requires you to assign the cluster a <code> .local </code> name. </p> <p> For example, if you want to name the Redis Enterprise Software cluster <code> rediscluster </code> , specify the FQDN name as <code> rediscluster.local </code> . </p> <p> When using the DNS or mDNS option, failover can be done transparently and the DNS is updated automatically to point to the IP address of the new primary node. </p> <h2 id="ip-based-connections"> IP-based connections </h2> <p> When you use the IP-based connection option, the FQDN does not need to have any special format because clients use IP addresses instead of hostnames to access the databases so you are free to choose whatever name you want. Using the IP-based connection option does not require any DNS configuration either. </p> <p> To administer the cluster you do need to know the IP address of at least one of the nodes in the cluster. Once you have the IP address, you can simply connect to port number 8443 (for example: <a href="https://10.0.0.12:8443"> https://10.0.0.12:8443 </a> ). However, as the topology of the cluster changes and node with the given IP address is removed, you need to remember the IP address of another node participating in this cluster to connect to the Cluster Manager UI and manage the cluster. </p> <p> Applications connecting to Redis Software databases have the same constraints. When using the IP-based connection method, you can use the <a href="/docs/latest/operate/rs/databases/durability-ha/discovery-service/"> Discovery Service </a> to discover the database endpoint for a given database name as long as you have an IP address for at least one of the nodes in the cluster. The API used for discovery service is compliant with the Redis Sentinel API. </p> <p> To test your connection, try pinging the service. For help, see <a href="/docs/latest/operate/rs/databases/connect/test-client-connectivity/"> Connect to your database </a> . </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/networking/cluster-dns/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/kubernetes/release-notes/k8s-6-2-10-4-2022-03-copy/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise for Kubernetes Release Notes 6.2.10-4 (March 2022) </h1> <p class="text-lg -mt-5 mb-10"> Added support for RS 6.2.10 as well as feature improvements and bug fixes. </p> <h2 id="overview"> Overview </h2> <p> The Redis Enterprise K8s 6.2.10-4 supports the Redis Enterprise Software release 6.2.10 and includes feature improvements and bug fixes. </p> <p> The key new features, bug fixes, and known limitations are described below. </p> <h2 id="images"> Images </h2> <p> This release includes the following container images: </p> <ul> <li> <strong> Redis Enterprise </strong> : <code> redislabs/redis:6.2.10-90 </code> or <code> redislabs/redis:6.2.10-90.rhel7-openshift </code> </li> <li> <strong> Operator </strong> : <code> redislabs/operator:6.2.10-4 </code> </li> <li> <strong> Services Rigger </strong> : <code> redislabs/k8s-controller:6.2.10-4 </code> or <code> redislabs/services-manager:6.2.10-4 </code> (on the Red Hat registry) </li> </ul> <h2 id="feature-improvements"> Feature improvements </h2> <ul> <li> REDB status - bundled Redis versions for cluster shown in status (RED-44074) </li> <li> OLM (OperatorHub) - example REC contains image references to Red Hat servers (RED-44439) </li> <li> REDB status - added information about database backups (RED-45577) </li> <li> Added dedicated metrics exporter service (service name ending in -prom). Using the service is recommended for gathering Prometheus data about the cluster. Using the service with the UI service is not recommended (RED-61807) </li> <li> REDB - added support for shard_placement </li> <li> RS 6.2.10 support (RED-69142) </li> <li> REDB - control autoUpgrade (RED-71157) </li> </ul> <h2 id="fixed-bugs"> Fixed bugs </h2> <ul> <li> <p> Cluster no longer refuses wrong sized volume to create clusters (error shown instead) (RED-61284) </p> </li> <li> <p> Resolved high CPU usage when many pods are running within the namespace (RED-69682) </p> </li> <li> <p> TKGI - support 1.11/1.12 (RED-70579) </p> </li> <li> <p> Fixed rack awareness label in documentation (RED-70622) </p> </li> <li> <p> Fixed crash in admission container when admission service is missing (RED-70678) </p> </li> <li> <p> Services rigger deployment generation no longer increases without changes (RED-70835) </p> </li> </ul> <h2 id="known-limitations"> Known limitations </h2> <h3 id="large-clusters"> Large clusters </h3> <p> On clusters with more than 9 REC nodes, a Kubernetes upgrade can render the Redis cluster unresponsive in some cases. A fix is available in the 6.4.2-5 release. Upgrade your operator version to 6.4.2-5 or later before upgrading your Kubernetes cluster. (RED-93025) </p> <h3 id="long-cluster-names-cause-routes-to-be-rejected--red-25871"> Long cluster names cause routes to be rejected (RED-25871) </h3> <p> A cluster name longer than 20 characters will result in a rejected route configuration because the host part of the domain name will exceed 63 characters. The workaround is to limit cluster name to 20 characters or less. </p> <h3 id="cluster-cr-rec-errors-are-not-reported-after-invalid-updates-red-25542"> Cluster CR (REC) errors are not reported after invalid updates (RED-25542) </h3> <p> A cluster CR specification error is not reported if two or more invalid CR resources are updated in sequence. </p> <h3 id="an-unreachable-cluster-has-status-running-red-32805"> An unreachable cluster has status running (RED-32805) </h3> <p> When a cluster is in an unreachable state, the state is still <code> running </code> instead of being reported as an error. </p> <h3 id="readiness-probe-incorrect-on-failures-red-39300"> Readiness probe incorrect on failures (RED-39300) </h3> <p> STS Readiness probe does not mark a node as "not ready" when running <code> rladmin status </code> on node failure. </p> <h3 id="role-missing-on-replica-sets-red-39002"> Role missing on replica sets (RED-39002) </h3> <p> The <code> redis-enterprise-operator </code> role is missing permission on replica sets. </p> <h3 id="private-registries-are-not-supported-on-openshift-311-red-38579"> Private registries are not supported on OpenShift 3.11 (RED-38579) </h3> <p> OpenShift 3.11 does not support DockerHub private registries. This is a known OpenShift issue. </p> <h3 id="internal-dns-and-kubernetes-dns-may-have-conflicts-red-37462"> Internal DNS and Kubernetes DNS may have conflicts (RED-37462) </h3> <p> DNS conflicts are possible between the cluster <code> mdns_server </code> and the K8s DNS. This only impacts DNS resolution from within cluster nodes for Kubernetes DNS names. </p> <h3 id="5410-negatively-impacts-546-red-37233"> 5.4.10 negatively impacts 5.4.6 (RED-37233) </h3> <p> Kubernetes-based 5.4.10 deployments seem to negatively impact existing 5.4.6 deployments that share a Kubernetes cluster. </p> <h3 id="node-cpu-usage-is-reported-instead-of-pod-cpu-usage-red-36884"> Node CPU usage is reported instead of pod CPU usage (RED-36884) </h3> <p> In Kubernetes, the node CPU usage we report on is the usage of the Kubernetes worker node hosting the REC pod. </p> <h3 id="clusters-must-be-named-rec-in-olm-based-deployments-red-39825"> Clusters must be named "rec" in OLM-based deployments (RED-39825) </h3> <p> In OLM-deployed operators, the deployment of the cluster will fail if the name is not "rec". When the operator is deployed via the OLM, the security context constraints (scc) are bound to a specific service account name (i.e., "rec"). The workaround is to name the cluster "rec". </p> <h3 id="rec-clusters-fail-to-start-on-kubernetes-clusters-with-unsynchronized-clocks-red-47254"> REC clusters fail to start on Kubernetes clusters with unsynchronized clocks (RED-47254) </h3> <p> When REC clusters are deployed on Kubernetes clusters with unsynchronized clocks, the REC cluster does not start correctly. The fix is to use NTP to synchronize the underlying K8s nodes. </p> <h3 id="deleting-an-openshift-project-with-an-rec-deployed-may-hang-red-47192"> Deleting an OpenShift project with an REC deployed may hang (RED-47192) </h3> <p> When a REC cluster is deployed in a project (namespace) and has REDB resources, the REDB resources must be deleted first before the REC can be deleted. As such, until the REDB resources are deleted, the project deletion will hang. The fix is to delete the REDB resources first and the REC second. Afterwards, you may delete the project. </p> <h3 id="rec-extralabels-are-not-applied-to-pvcs-on-k8s-versions-115-or-older-red-51921"> REC extraLabels are not applied to PVCs on K8s versions 1.15 or older (RED-51921) </h3> <p> In K8s 1.15 or older, the PVC labels come from the match selectors and not the PVC templates. As such, these versions cannot support PVC labels. If this feature is required, the only fix is to upgrade the K8s cluster to a newer version. </p> <h3 id="hashicorp-vault-integration---no-support-for-gesher-red-55080"> Hashicorp Vault integration - no support for Gesher (RED-55080) </h3> <p> There is no workaround at this time. </p> <h3 id="rec-might-report-error-states-on-initial-startup-red-61707"> REC might report error states on initial startup (RED-61707) </h3> <p> There is no workaround at this time except to ignore the errors. </p> <h3 id="pvc-size-issues-when-using-decimal-value-in-spec-red-62132"> PVC size issues when using decimal value in spec (RED-62132) </h3> <p> The workaround for this issue is to make sure you use integer values for the PVC size. </p> <h3 id="following-old-revision-of-quick-start-guide-causes-issues-creating-an-redb-due-to-unrecognized-memory-field-name-red-69515"> Following old revision of quick start guide causes issues creating an REDB due to unrecognized memory field name (RED-69515) </h3> <p> The workaround is to use the newer (current) revision of the quick start document available online. </p> <h3 id="autoupgrade-set-to-true-by-operator-might-cause-unexpected-bdb-upgrades-when-redisupgradepolicy-is-set-to-true-red-72351"> <code> autoUpgrade </code> set to true by operator might cause unexpected bdb upgrades when <code> redisUpgradePolicy </code> is set to true (RED-72351) </h3> <p> Contact support if your deployment is impacted. </p> <h2 id="compatibility-notes"> Compatibility Notes </h2> <p> See <a href="/docs/latest/operate/kubernetes/reference/supported_k8s_distributions/"> Supported Kubernetes distributions </a> for the full list of supported distributions. </p> <h3 id="now-supported"> Now supported </h3> <ul> <li> TKGI 1.11 (K8s 1.20) is supported </li> <li> Rancher version 2.6 is supported </li> </ul> <h3 id="deprecated"> Deprecated </h3> <ul> <li> Rancher version 2.5 support is deprecated </li> </ul> <h3 id="no-longer-supported"> No longer supported </h3> <ul> <li> Rancher version 2.5 / K8s 1.17 (previously deprecated) is no longer supported (not supported by SUSE) </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/kubernetes/release-notes/k8s-6-2-10-4-2022-03-copy/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/.html
<section class="prose w-full py-12 max-w-none"> <h1> rladmin cluster </h1> <p class="text-lg -mt-5 mb-10"> Manage cluster. </p> <p> Manages cluster configuration and administration. Most <code> rladmin cluster </code> commands are only for clusters that are already configured, while a few others are only for new clusters that have not been configured. </p> <h2 id="commands-for-configured-clusters"> Commands for configured clusters </h2> <table> <thead> <tr> <th style="text-align:left"> Command </th> <th style="text-align:left"> Description </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/certificate/"> certificate </a> </td> <td style="text-align:left"> Sets the cluster certificate. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/config/"> config </a> </td> <td style="text-align:left"> Updates the cluster's configuration. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/debug_info/"> debug_info </a> </td> <td style="text-align:left"> Creates a support package. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/master/"> master </a> </td> <td style="text-align:left"> Identifies or changes the cluster's master node. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/ocsp/"> ocsp </a> </td> <td style="text-align:left"> Manages OCSP. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/reset_password/"> reset_password </a> </td> <td style="text-align:left"> Changes the password for a given email. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/running_actions/"> running_actions </a> </td> <td style="text-align:left"> Lists all active tasks. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/stats_archiver/"> stats_archiver </a> </td> <td style="text-align:left"> Enables/deactivates the stats archiver. </td> </tr> </tbody> </table> <h2 id="commands-for-non-configured-clusters"> Commands for non-configured clusters </h2> <table> <thead> <tr> <th style="text-align:left"> Command </th> <th style="text-align:left"> Description </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/create/"> create </a> </td> <td style="text-align:left"> Creates a new cluster. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/join/"> join </a> </td> <td style="text-align:left"> Adds a node to an existing cluster. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/recover/"> recover </a> </td> <td style="text-align:left"> Recovers a cluster from a backup file. </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/write-behind/reference/data-transformation-block-types/map/.html
<section class="prose w-full py-12 max-w-none"> <h1> map </h1> <p class="text-lg -mt-5 mb-10"> Map a record into a new output based on expressions </p> <p> Map a record into a new output based on expressions </p> <p> <strong> Properties </strong> </p> <table> <thead> <tr> <th> Name </th> <th> Type </th> <th> Description </th> <th> Required </th> </tr> </thead> <tbody> <tr> <td> <a href="#expression"> <strong> expression </strong> </a> </td> <td> <code> object </code> , <code> string </code> </td> <td> Expression <br/> </td> <td> yes </td> </tr> <tr> <td> <strong> language </strong> </td> <td> <code> string </code> </td> <td> Language <br/> Enum: <code> "jmespath" </code> , <code> "sql" </code> <br/> </td> <td> yes </td> </tr> </tbody> </table> <p> <strong> Additional Properties: </strong> not allowed </p> <p> <strong> Example </strong> </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">source</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">server_name</span><span class="p">:</span><span class="w"> </span><span class="l">redislabs</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">schema</span><span class="p">:</span><span class="w"> </span><span class="l">dbo</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">table</span><span class="p">:</span><span class="w"> </span><span class="l">emp</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">transform</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">uses</span><span class="p">:</span><span class="w"> </span><span class="l">map</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">with</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">expression</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">first_name</span><span class="p">:</span><span class="w"> </span><span class="l">first_name</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">last_name</span><span class="p">:</span><span class="w"> </span><span class="l">last_name</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">greeting</span><span class="p">:</span><span class="w"> </span><span class="p">&gt;-</span><span class="sd"> </span></span></span><span class="line"><span class="cl"><span class="sd"> 'Hello ' || CASE WHEN gender = 'F' THEN 'Ms.' WHEN gender = 'M' THEN 'Mr.' </span></span></span><span class="line"><span class="cl"><span class="sd"> ELSE 'N/A' END || ' ' || full_name</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">country</span><span class="p">:</span><span class="w"> </span><span class="l">country</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">full_name</span><span class="p">:</span><span class="w"> </span><span class="l">full_name</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">language</span><span class="p">:</span><span class="w"> </span><span class="l">sql</span><span class="w"> </span></span></span></code></pre> </div> <p> <strong> Example </strong> </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">source</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">table</span><span class="p">:</span><span class="w"> </span><span class="l">customer</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">transform</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">uses</span><span class="p">:</span><span class="w"> </span><span class="l">map</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">with</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">expression</span><span class="p">:</span><span class="w"> </span><span class="p">|</span><span class="sd"> </span></span></span><span class="line"><span class="cl"><span class="sd"> { </span></span></span><span class="line"><span class="cl"><span class="sd"> "CustomerId": customer_id, </span></span></span><span class="line"><span class="cl"><span class="sd"> "FirstName": first_name, </span></span></span><span class="line"><span class="cl"><span class="sd"> "LastName": last_name, </span></span></span><span class="line"><span class="cl"><span class="sd"> "Company": company, </span></span></span><span class="line"><span class="cl"><span class="sd"> "Location": </span></span></span><span class="line"><span class="cl"><span class="sd"> { </span></span></span><span class="line"><span class="cl"><span class="sd"> "Street": address, </span></span></span><span class="line"><span class="cl"><span class="sd"> "City": city, </span></span></span><span class="line"><span class="cl"><span class="sd"> "State": state, </span></span></span><span class="line"><span class="cl"><span class="sd"> "Country": country, </span></span></span><span class="line"><span class="cl"><span class="sd"> "PostalCode": postal_code </span></span></span><span class="line"><span class="cl"><span class="sd"> }, </span></span></span><span class="line"><span class="cl"><span class="sd"> "Phone": phone, </span></span></span><span class="line"><span class="cl"><span class="sd"> "Fax": fax, </span></span></span><span class="line"><span class="cl"><span class="sd"> "Email": email </span></span></span><span class="line"><span class="cl"><span class="sd"> }</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">language</span><span class="p">:</span><span class="w"> </span><span class="l">jmespath</span><span class="w"> </span></span></span></code></pre> </div> <p> <a name="expression"> </a> </p> <h2 id="expression-object"> expression: object </h2> <p> Expression </p> <p> <strong> No properties. </strong> </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/write-behind/reference/data-transformation-block-types/map/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/redisvl/user-guide/vectorizers/.html
<section class="prose w-full py-12 max-w-none"> <h1> Vectorizers </h1> <p class="text-lg -mt-5 mb-10"> Supported vectorizers </p> <p> In this document, you will learn how to use RedisVL to create embeddings using the built-in text embedding vectorizers. RedisVL supports: </p> <ol> <li> OpenAI </li> <li> HuggingFace </li> <li> Vertex AI </li> <li> Cohere </li> </ol> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> This document is a converted form of <a href="https://github.com/RedisVentures/redisvl/blob/main/docs/user_guide/vectorizers_04.ipynb"> this Jupyter notebook </a> . </div> </div> <p> Before beginning, be sure of the following: </p> <ol> <li> You have installed RedisVL and have that environment activated. </li> <li> You have a running Redis instance with the Redis Query Engine capability. </li> </ol> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="c1"># import necessary modules</span> </span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">os</span> </span></span></code></pre> </div> <h2 id="create-text-embeddings"> Create text embeddings </h2> <p> This example will show how to create an embedding from three simple sentences with a number of different text vectorizers in RedisVL. </p> <ul> <li> "That is a happy dog" </li> <li> "That is a happy person" </li> <li> "Today is a nice day" </li> </ul> <h3 id="openai"> OpenAI </h3> <p> The <code> OpenAITextVectorizer </code> makes it easy to use RedisVL with the embedding models from OpenAI. For this you will need to install <code> openai </code> . </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install openai </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">getpass</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># setup the API Key</span> </span></span><span class="line"><span class="cl"><span class="n">api_key</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"OPENAI_API_KEY"</span><span class="p">)</span> <span class="ow">or</span> <span class="n">getpass</span><span class="o">.</span><span class="n">getpass</span><span class="p">(</span><span class="s2">"Enter your OpenAI API key: "</span><span class="p">)</span> </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">redisvl.utils.vectorize</span> <span class="kn">import</span> <span class="n">OpenAITextVectorizer</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># create a vectorizer</span> </span></span><span class="line"><span class="cl"><span class="n">oai</span> <span class="o">=</span> <span class="n">OpenAITextVectorizer</span><span class="p">(</span> </span></span><span class="line"><span class="cl"> <span class="n">model</span><span class="o">=</span><span class="s2">"text-embedding-ada-002"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="n">api_config</span><span class="o">=</span><span class="p">{</span><span class="s2">"api_key"</span><span class="p">:</span> <span class="n">api_key</span><span class="p">},</span> </span></span><span class="line"><span class="cl"><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">test</span> <span class="o">=</span> <span class="n">oai</span><span class="o">.</span><span class="n">embed</span><span class="p">(</span><span class="s2">"This is a test sentence."</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">"Vector dimensions: "</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">test</span><span class="p">))</span> </span></span><span class="line"><span class="cl"><span class="n">test</span><span class="p">[:</span><span class="mi">10</span><span class="p">]</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">Vector</span> <span class="n">dimensions</span><span class="p">:</span> <span class="mi">1536</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="p">[</span><span class="o">-</span><span class="mf">0.001025049015879631</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.0030993607360869646</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="mf">0.0024536605924367905</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.004484387580305338</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.010331203229725361</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="mf">0.012700922787189484</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.005368996877223253</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.0029411641880869865</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.0070833307690918446</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.03386051580309868</span><span class="p">]</span> </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="c1"># Create many embeddings at once</span> </span></span><span class="line"><span class="cl"><span class="n">sentences</span> <span class="o">=</span> <span class="p">[</span> </span></span><span class="line"><span class="cl"> <span class="s2">"That is a happy dog"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="s2">"That is a happy person"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="s2">"Today is a sunny day"</span> </span></span><span class="line"><span class="cl"><span class="p">]</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">embeddings</span> <span class="o">=</span> <span class="n">oai</span><span class="o">.</span><span class="n">embed_many</span><span class="p">(</span><span class="n">sentences</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="n">embeddings</span><span class="p">[</span><span class="mi">0</span><span class="p">][:</span><span class="mi">10</span><span class="p">]</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="p">[</span><span class="o">-</span><span class="mf">0.01747742109000683</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">5.228330701356754e-05</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="mf">0.0013870716793462634</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.025637786835432053</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.01985435001552105</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="mf">0.016117358580231667</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.0037306349258869886</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="mf">0.0008945261361077428</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="mf">0.006577865686267614</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.025091219693422318</span><span class="p">]</span> </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="c1"># openai also supports asyncronous requests, which you can use to speed up the vectorization process.</span> </span></span><span class="line"><span class="cl"><span class="n">embeddings</span> <span class="o">=</span> <span class="k">await</span> <span class="n">oai</span><span class="o">.</span><span class="n">aembed_many</span><span class="p">(</span><span class="n">sentences</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">"Number of Embeddings:"</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">embeddings</span><span class="p">))</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">Number</span> <span class="n">of</span> <span class="n">Embeddings</span><span class="p">:</span> <span class="mi">3</span> </span></span></code></pre> </div> <h3 id="huggingface"> Huggingface </h3> <p> <a href="https://huggingface.co/models"> Huggingface </a> is a popular natural language processing (NLP) platform that has a number of pre-trained models you can use off the shelf. RedisVL supports using Huggingface "Sentence Transformers" to create embeddings from text. To use Huggingface, you will need to install the <code> sentence-transformers </code> library. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install sentence-transformers </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">[</span><span class="s2">"TOKENIZERS_PARALLELISM"</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"false"</span> </span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">redisvl.utils.vectorize</span> <span class="kn">import</span> <span class="n">HFTextVectorizer</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># create a vectorizer</span> </span></span><span class="line"><span class="cl"><span class="c1"># choose your model from the huggingface website</span> </span></span><span class="line"><span class="cl"><span class="n">hf</span> <span class="o">=</span> <span class="n">HFTextVectorizer</span><span class="p">(</span><span class="n">model</span><span class="o">=</span><span class="s2">"sentence-transformers/all-mpnet-base-v2"</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># embed a sentence</span> </span></span><span class="line"><span class="cl"><span class="n">test</span> <span class="o">=</span> <span class="n">hf</span><span class="o">.</span><span class="n">embed</span><span class="p">(</span><span class="s2">"This is a test sentence."</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="n">test</span><span class="p">[:</span><span class="mi">10</span><span class="p">]</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="p">[</span><span class="mf">0.00037810884532518685</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.05080341175198555</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.03514723479747772</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.02325104922056198</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.044158220291137695</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="mf">0.020487844944000244</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="mf">0.0014617963461205363</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="mf">0.031261757016181946</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="mf">0.05605152249336243</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="mf">0.018815357238054276</span><span class="p">]</span> </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="c1"># You can also create many embeddings at once</span> </span></span><span class="line"><span class="cl"><span class="n">embeddings</span> <span class="o">=</span> <span class="n">hf</span><span class="o">.</span><span class="n">embed_many</span><span class="p">(</span><span class="n">sentences</span><span class="p">,</span> <span class="n">as_buffer</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> </span></span></code></pre> </div> <h3 id="vertexai"> VertexAI </h3> <p> <a href="https://cloud.google.com/vertex-ai/docs/generative-ai/embeddings/get-text-embeddings"> VertexAI </a> is GCP's fully-featured AI platform, which includes a number of pre-trained LLMs. RedisVL supports using VertexAI to create embeddings from these models. To use VertexAI, you will first need to install the <code> google-cloud-aiplatform </code> library. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install google-cloud-aiplatform&gt;<span class="o">=</span>1.26 </span></span></code></pre> </div> <p> Then you need to gain access to a <a href="https://cloud.google.com/gcp?hl=en"> Google Cloud Project </a> and provide <a href="https://cloud.google.com/docs/authentication/application-default-credentials"> access to credentials </a> . This is accomplished by setting the <code> GOOGLE_APPLICATION_CREDENTIALS </code> environment variable to the path of a JSON key file downloaded from your service account on GCP. </p> <p> Finally, you need to find your <a href="https://support.google.com/googleapi/answer/7014113?hl=en"> project ID </a> and <a href="https://cloud.google.com/vertex-ai/docs/general/locations"> geographic region for VertexAI </a> . </p> <p> Make sure the following env vars are set: </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nv">GOOGLE_APPLICATION_CREDENTIALS</span><span class="o">=</span>&lt;path to your gcp JSON creds&gt; </span></span><span class="line"><span class="cl"><span class="nv">GCP_PROJECT_ID</span><span class="o">=</span>&lt;your gcp project id&gt; </span></span><span class="line"><span class="cl"><span class="nv">GCP_LOCATION</span><span class="o">=</span>&lt;your gcp geo region <span class="k">for</span> vertex ai&gt; </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">redisvl.utils.vectorize</span> <span class="kn">import</span> <span class="n">VertexAITextVectorizer</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># create a vectorizer</span> </span></span><span class="line"><span class="cl"><span class="n">vtx</span> <span class="o">=</span> <span class="n">VertexAITextVectorizer</span><span class="p">(</span><span class="n">api_config</span><span class="o">=</span><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="s2">"project_id"</span><span class="p">:</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"GCP_PROJECT_ID"</span><span class="p">)</span> <span class="ow">or</span> <span class="n">getpass</span><span class="o">.</span><span class="n">getpass</span><span class="p">(</span><span class="s2">"Enter your GCP Project ID: "</span><span class="p">),</span> </span></span><span class="line"><span class="cl"> <span class="s2">"location"</span><span class="p">:</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"GCP_LOCATION"</span><span class="p">)</span> <span class="ow">or</span> <span class="n">getpass</span><span class="o">.</span><span class="n">getpass</span><span class="p">(</span><span class="s2">"Enter your GCP Location: "</span><span class="p">),</span> </span></span><span class="line"><span class="cl"> <span class="s2">"google_application_credentials"</span><span class="p">:</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"GOOGLE_APPLICATION_CREDENTIALS"</span><span class="p">)</span> <span class="ow">or</span> <span class="n">getpass</span><span class="o">.</span><span class="n">getpass</span><span class="p">(</span><span class="s2">"Enter your Google App Credentials path: "</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">})</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># embed a sentence</span> </span></span><span class="line"><span class="cl"><span class="n">test</span> <span class="o">=</span> <span class="n">vtx</span><span class="o">.</span><span class="n">embed</span><span class="p">(</span><span class="s2">"This is a test sentence."</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="n">test</span><span class="p">[:</span><span class="mi">10</span><span class="p">]</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="p">[</span><span class="mf">0.04373306408524513</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.05040992051362991</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.011946038343012333</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.043528858572244644</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="mf">0.021510830149054527</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="mf">0.028604144230484962</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="mf">0.014770914800465107</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.01610461436212063</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="o">-</span><span class="mf">0.0036560404114425182</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="mf">0.013746795244514942</span><span class="p">]</span> </span></span></code></pre> </div> <h3 id="cohere"> Cohere </h3> <p> <a href="https://dashboard.cohere.ai/"> Cohere </a> allows you to implement language AI in your product. The <code> CohereTextVectorizer </code> makes it simple to use RedisVL with the embedding models at Cohere. For this, you will need to install <code> cohere </code> . </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install cohere </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">getpass</span> </span></span><span class="line"><span class="cl"><span class="c1"># set up the API Key</span> </span></span><span class="line"><span class="cl"><span class="n">api_key</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"COHERE_API_KEY"</span><span class="p">)</span> <span class="ow">or</span> <span class="n">getpass</span><span class="o">.</span><span class="n">getpass</span><span class="p">(</span><span class="s2">"Enter your Cohere API key: "</span><span class="p">)</span> </span></span></code></pre> </div> <p> Special attention needs to be paid to the <code> input_type </code> parameter for each <code> embed </code> call. For example, for embedding queries, you should set <code> input_type='search_query' </code> . For embedding documents, set <code> input_type='search_document' </code> . See more information <a href="https://docs.cohere.com/reference/embed"> here </a> . </p> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">redisvl.utils.vectorize</span> <span class="kn">import</span> <span class="n">CohereTextVectorizer</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># create a vectorizer</span> </span></span><span class="line"><span class="cl"><span class="n">co</span> <span class="o">=</span> <span class="n">CohereTextVectorizer</span><span class="p">(</span> </span></span><span class="line"><span class="cl"> <span class="n">model</span><span class="o">=</span><span class="s2">"embed-english-v3.0"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="n">api_config</span><span class="o">=</span><span class="p">{</span><span class="s2">"api_key"</span><span class="p">:</span> <span class="n">api_key</span><span class="p">},</span> </span></span><span class="line"><span class="cl"><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># embed a search query</span> </span></span><span class="line"><span class="cl"><span class="n">test</span> <span class="o">=</span> <span class="n">co</span><span class="o">.</span><span class="n">embed</span><span class="p">(</span><span class="s2">"This is a test sentence."</span><span class="p">,</span> <span class="n">input_type</span><span class="o">=</span><span class="s1">'search_query'</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">"Vector dimensions: "</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">test</span><span class="p">))</span> </span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="n">test</span><span class="p">[:</span><span class="mi">10</span><span class="p">])</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># embed a document</span> </span></span><span class="line"><span class="cl"><span class="n">test</span> <span class="o">=</span> <span class="n">co</span><span class="o">.</span><span class="n">embed</span><span class="p">(</span><span class="s2">"This is a test sentence."</span><span class="p">,</span> <span class="n">input_type</span><span class="o">=</span><span class="s1">'search_document'</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">"Vector dimensions: "</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">test</span><span class="p">))</span> </span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="n">test</span><span class="p">[:</span><span class="mi">10</span><span class="p">])</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">Vector</span> <span class="n">dimensions</span><span class="p">:</span> <span class="mi">1024</span> </span></span><span class="line"><span class="cl"><span class="p">[</span><span class="o">-</span><span class="mf">0.010856628</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.019683838</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.0062179565</span><span class="p">,</span> <span class="mf">0.003545761</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.047943115</span><span class="p">,</span> <span class="mf">0.0009365082</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.005924225</span><span class="p">,</span> <span class="mf">0.016174316</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.03289795</span><span class="p">,</span> <span class="mf">0.049194336</span><span class="p">]</span> </span></span><span class="line"><span class="cl"><span class="n">Vector</span> <span class="n">dimensions</span><span class="p">:</span> <span class="mi">1024</span> </span></span><span class="line"><span class="cl"><span class="p">[</span><span class="o">-</span><span class="mf">0.009712219</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.016036987</span><span class="p">,</span> <span class="mf">2.8073788e-05</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.022491455</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.041259766</span><span class="p">,</span> <span class="mf">0.002281189</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.033294678</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.00057029724</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.026260376</span><span class="p">,</span> <span class="mf">0.0579834</span><span class="p">]</span> </span></span></code></pre> </div> <p> Learn more about using RedisVL and Cohere together through <a href="https://docs.cohere.com/docs/redis-and-cohere"> this dedicated user guide </a> . </p> <h2 id="search-with-provider-embeddings"> Search with provider embeddings </h2> <p> Now that you've created your embeddings, you can use them to search for similar sentences. You will use the same three sentences from above and search for similar sentences. </p> <p> First, create the schema for your index. </p> <p> Here's what the schema for the example looks like in YAML for the HuggingFace vectorizer: </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="s1">'0.1.0'</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">index</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">vectorizers</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">prefix</span><span class="p">:</span><span class="w"> </span><span class="l">doc</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">storage_type</span><span class="p">:</span><span class="w"> </span><span class="l">hash</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">fields</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">sentence</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">text</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">embedding</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">vector</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">attrs</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">dims</span><span class="p">:</span><span class="w"> </span><span class="m">768</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">algorithm</span><span class="p">:</span><span class="w"> </span><span class="l">flat</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">distance_metric</span><span class="p">:</span><span class="w"> </span><span class="l">cosine</span><span class="w"> </span></span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">redisvl.index</span> <span class="kn">import</span> <span class="n">SearchIndex</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># construct a search index from the schema</span> </span></span><span class="line"><span class="cl"><span class="n">index</span> <span class="o">=</span> <span class="n">SearchIndex</span><span class="o">.</span><span class="n">from_yaml</span><span class="p">(</span><span class="s2">"./schema.yaml"</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># connect to local redis instance</span> </span></span><span class="line"><span class="cl"><span class="n">index</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="s2">"redis://localhost:6379"</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># create the index (no data yet)</span> </span></span><span class="line"><span class="cl"><span class="n">index</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="n">overwrite</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="c1"># use the CLI to see the created index</span> </span></span><span class="line"><span class="cl"><span class="err">!</span><span class="n">rvl</span> <span class="n">index</span> <span class="n">listall</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="mi">22</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">27</span> <span class="p">[</span><span class="n">RedisVL</span><span class="p">]</span> <span class="n">INFO</span> <span class="n">Indices</span><span class="p">:</span> </span></span><span class="line"><span class="cl"><span class="mi">22</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">27</span> <span class="p">[</span><span class="n">RedisVL</span><span class="p">]</span> <span class="n">INFO</span> <span class="mf">1.</span> <span class="n">vectorizers</span> </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="c1"># load expects an iterable of dictionaries where</span> </span></span><span class="line"><span class="cl"><span class="c1"># the vector is stored as a bytes buffer</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">data</span> <span class="o">=</span> <span class="p">[{</span><span class="s2">"text"</span><span class="p">:</span> <span class="n">t</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="s2">"embedding"</span><span class="p">:</span> <span class="n">v</span><span class="p">}</span> </span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">t</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">sentences</span><span class="p">,</span> <span class="n">embeddings</span><span class="p">)]</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">index</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">data</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s1">'doc:17c401b679ce43cb82f3ab2280ad02f2'</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="s1">'doc:3fc0502bec434b17a3f06e20824b2e59'</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="s1">'doc:199f17b0e5d24dcaa1fd4fb41558150c'</span><span class="p">]</span> </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">redisvl.query</span> <span class="kn">import</span> <span class="n">VectorQuery</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># use the HuggingFace vectorizer again to create a query embedding</span> </span></span><span class="line"><span class="cl"><span class="n">query_embedding</span> <span class="o">=</span> <span class="n">hf</span><span class="o">.</span><span class="n">embed</span><span class="p">(</span><span class="s2">"That is a happy cat"</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">query</span> <span class="o">=</span> <span class="n">VectorQuery</span><span class="p">(</span> </span></span><span class="line"><span class="cl"> <span class="n">vector</span><span class="o">=</span><span class="n">query_embedding</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="n">vector_field_name</span><span class="o">=</span><span class="s2">"embedding"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="n">return_fields</span><span class="o">=</span><span class="p">[</span><span class="s2">"text"</span><span class="p">],</span> </span></span><span class="line"><span class="cl"> <span class="n">num_results</span><span class="o">=</span><span class="mi">3</span> </span></span><span class="line"><span class="cl"><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">results</span> <span class="o">=</span> <span class="n">index</span><span class="o">.</span><span class="n">query</span><span class="p">(</span><span class="n">query</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="k">for</span> <span class="n">doc</span> <span class="ow">in</span> <span class="n">results</span><span class="p">:</span> </span></span><span class="line"><span class="cl"> <span class="nb">print</span><span class="p">(</span><span class="n">doc</span><span class="p">[</span><span class="s2">"text"</span><span class="p">],</span> <span class="n">doc</span><span class="p">[</span><span class="s2">"vector_distance"</span><span class="p">])</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">That</span> <span class="ow">is</span> <span class="n">a</span> <span class="n">happy</span> <span class="n">dog</span> <span class="mf">0.160862326622</span> </span></span><span class="line"><span class="cl"><span class="n">That</span> <span class="ow">is</span> <span class="n">a</span> <span class="n">happy</span> <span class="n">person</span> <span class="mf">0.273598492146</span> </span></span><span class="line"><span class="cl"><span class="n">Today</span> <span class="ow">is</span> <span class="n">a</span> <span class="n">sunny</span> <span class="n">day</span> <span class="mf">0.744559407234</span> </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="c1"># cleanup</span> </span></span><span class="line"><span class="cl"><span class="n">index</span><span class="o">.</span><span class="n">delete</span><span class="p">()</span> </span></span></code></pre> </div> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/redisvl/user-guide/vectorizers/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/references/rest-api/requests/debuginfo/all/bdb/.html
<section class="prose w-full py-12 max-w-none"> <h1> All nodes database debug info requests </h1> <p class="text-lg -mt-5 mb-10"> Documents the Redis Enterprise Software REST API debuginfo/all/bdb requests. </p> <div class="banner-article rounded-md" style="background-color: "> <p> This REST API path is deprecated as of Redis Enterprise Software version 7.4.2. Use the new path <a href="/docs/latest/operate/rs/references/rest-api/requests/bdbs/debuginfo/"> <code> /v1/bdbs/debuginfo </code> </a> instead. </p> </div> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#get-all-debuginfo-bdb"> GET </a> </td> <td> <code> /v1/debuginfo/all/bdb/{bdb_uid} </code> </td> <td> Get debug info for a database from all nodes </td> </tr> </tbody> </table> <h2 id="get-all-debuginfo-bdb"> Get database debug info for all nodes </h2> <pre><code>GET /v1/debuginfo/all/bdb/{int: bdb_uid} </code></pre> <p> Downloads a tar file that contains debug info for the specified database ( <code> bdb_uid </code> ) from all nodes. </p> <h4 id="required-permissions"> Required permissions </h4> <table> <thead> <tr> <th> Permission name </th> </tr> </thead> <tbody> <tr> <td> <a href="/docs/latest/operate/rs/references/rest-api/permissions/#view_debugging_info"> view_debugging_info </a> </td> </tr> </tbody> </table> <h3 id="get-all-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <pre><code>GET /debuginfo/all/bdb/1 </code></pre> <h3 id="get-all-response"> Response </h3> <p> Downloads the debug info in a tar file called <code> filename.tar.gz </code> . Extract the files from the tar file to access the debug info. </p> <h4 id="response-headers"> Response headers </h4> <table> <thead> <tr> <th> Key </th> <th> Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> Content-Type </td> <td> application/x-gzip </td> <td> Media type of request/response body </td> </tr> <tr> <td> Content-Length </td> <td> 653350 </td> <td> Length of the response body in octets </td> </tr> <tr> <td> Content-Disposition </td> <td> attachment; filename=debuginfo.tar.gz </td> <td> Display response in browser </td> </tr> </tbody> </table> <h3 id="get-all-status-codes"> Status codes </h3> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1"> 200 OK </a> </td> <td> Success. </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1"> 500 Internal Server Error </a> </td> <td> Failed to get debug info. </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/references/rest-api/requests/debuginfo/all/bdb/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/oss_and_stack/management/optimization/latency.html
<section class="prose w-full py-12 max-w-none"> <h1> Diagnosing latency issues </h1> <p class="text-lg -mt-5 mb-10"> Finding the causes of slow responses </p> <p> This document will help you understand what the problem could be if you are experiencing latency problems with Redis. </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 Redis processing time is extremely low, in the sub microsecond range, but there are certain conditions leading to higher latency figures. </p> <h2 id="ive-little-time-give-me-the-checklist"> I've little time, give me the checklist </h2> <p> The following documentation is very important in order to run Redis in a low latency fashion. However I understand that we are busy people, so let's start with a quick checklist. If you fail following these steps, please return here to read the full documentation. </p> <ol> <li> Make sure you are not running slow commands that are blocking the server. Use the Redis <a href="/commands/slowlog"> Slow Log feature </a> to check this. </li> <li> For EC2 users, make sure you use HVM based modern EC2 instances, like m3.medium. Otherwise fork() is too slow. </li> <li> Transparent huge pages must be disabled from your kernel. Use <code> echo never &gt; /sys/kernel/mm/transparent_hugepage/enabled </code> to disable them, and restart your Redis process. </li> <li> If you are using a virtual machine, it is possible that you have an intrinsic latency that has nothing to do with Redis. Check the minimum latency you can expect from your runtime environment using <code> ./redis-cli --intrinsic-latency 100 </code> . Note: you need to run this command in <em> the server </em> not in the client. </li> <li> Enable and use the <a href="/docs/latest/operate/oss_and_stack/management/optimization/latency-monitor"> Latency monitor </a> feature of Redis in order to get a human readable description of the latency events and causes in your Redis instance. </li> </ol> <p> In general, use the following table for durability VS latency/performance tradeoffs, ordered from stronger safety to better latency. </p> <ol> <li> AOF + fsync always: this is very slow, you should use it only if you know what you are doing. </li> <li> AOF + fsync every second: this is a good compromise. </li> <li> AOF + fsync every second + no-appendfsync-on-rewrite option set to yes: this is as the above, but avoids to fsync during rewrites to lower the disk pressure. </li> <li> AOF + fsync never. Fsyncing is up to the kernel in this setup, even less disk pressure and risk of latency spikes. </li> <li> RDB. Here you have a vast spectrum of tradeoffs depending on the save triggers you configure. </li> </ol> <p> And now for people with 15 minutes to spend, the details... </p> <h2 id="measuring-latency"> Measuring latency </h2> <p> If you are experiencing latency problems, you probably know how to measure it in the context of your application, or maybe your latency problem is very evident even macroscopically. However redis-cli can be used to measure the latency of a Redis server in milliseconds, just try: </p> <pre><code>redis-cli --latency -h `host` -p `port` </code></pre> <h2 id="using-the-internal-redis-latency-monitoring-subsystem"> Using the internal Redis latency monitoring subsystem </h2> <p> Since Redis 2.8.13, Redis provides latency monitoring capabilities that are able to sample different execution paths to understand where the server is blocking. This makes debugging of the problems illustrated in this documentation much simpler, so we suggest enabling latency monitoring ASAP. Please refer to the <a href="/docs/latest/operate/oss_and_stack/management/optimization/latency-monitor"> Latency monitor documentation </a> . </p> <p> While the latency monitoring sampling and reporting capabilities will make it simpler to understand the source of latency in your Redis system, it is still advised that you read this documentation extensively to better understand the topic of Redis and latency spikes. </p> <h2 id="latency-baseline"> Latency baseline </h2> <p> There is a kind of latency that is inherently part of the environment where you run Redis, that is the latency provided by your operating system kernel and, if you are using virtualization, by the hypervisor you are using. </p> <p> While this latency can't be removed it is important to study it because it is the baseline, or in other words, you won't be able to achieve a Redis latency that is better than the latency that every process running in your environment will experience because of the kernel or hypervisor implementation or setup. </p> <p> We call this kind of latency <strong> intrinsic latency </strong> , and <code> redis-cli </code> starting from Redis version 2.8.7 is able to measure it. This is an example run under Linux 3.11.0 running on an entry level server. </p> <p> Note: the argument <code> 100 </code> is the number of seconds the test will be executed. The more time we run the test, the more likely we'll be able to spot latency spikes. 100 seconds is usually appropriate, however you may want to perform a few runs at different times. Please note that the test is CPU intensive and will likely saturate a single core in your system. </p> <pre><code>$ ./redis-cli --intrinsic-latency 100 Max latency so far: 1 microseconds. Max latency so far: 16 microseconds. Max latency so far: 50 microseconds. Max latency so far: 53 microseconds. Max latency so far: 83 microseconds. Max latency so far: 115 microseconds. </code></pre> <p> Note: redis-cli in this special case needs to <strong> run in the server </strong> where you run or plan to run Redis, not in the client. In this special mode redis-cli does not connect to a Redis server at all: it will just try to measure the largest time the kernel does not provide CPU time to run to the redis-cli process itself. </p> <p> In the above example, the intrinsic latency of the system is just 0.115 milliseconds (or 115 microseconds), which is a good news, however keep in mind that the intrinsic latency may change over time depending on the load of the system. </p> <p> Virtualized environments will not show so good numbers, especially with high load or if there are noisy neighbors. The following is a run on a Linode 4096 instance running Redis and Apache: </p> <pre><code>$ ./redis-cli --intrinsic-latency 100 Max latency so far: 573 microseconds. Max latency so far: 695 microseconds. Max latency so far: 919 microseconds. Max latency so far: 1606 microseconds. Max latency so far: 3191 microseconds. Max latency so far: 9243 microseconds. Max latency so far: 9671 microseconds. </code></pre> <p> Here we have an intrinsic latency of 9.7 milliseconds: this means that we can't ask better than that to Redis. However other runs at different times in different virtualization environments with higher load or with noisy neighbors can easily show even worse values. We were able to measure up to 40 milliseconds in systems otherwise apparently running normally. </p> <h2 id="latency-induced-by-network-and-communication"> Latency induced by network and communication </h2> <p> Clients connect to Redis using a TCP/IP connection or a Unix domain connection. The typical latency of a 1 Gbit/s network is about 200 us, while the latency with a Unix domain socket can be as low as 30 us. It actually depends on your network and system hardware. On top of the communication itself, the system adds some more latency (due to thread scheduling, CPU caches, NUMA placement, etc ...). System induced latencies are significantly higher on a virtualized environment than on a physical machine. </p> <p> The consequence is even if Redis processes most commands in sub microsecond range, a client performing many roundtrips to the server will have to pay for these network and system related latencies. </p> <p> An efficient client will therefore try to limit the number of roundtrips by pipelining several commands together. This is fully supported by the servers and most clients. Aggregated commands like MSET/MGET can be also used for that purpose. Starting with Redis 2.4, a number of commands also support variadic parameters for all data types. </p> <p> Here are some guidelines: </p> <ul> <li> If you can afford it, prefer a physical machine over a VM to host the server. </li> <li> Do not systematically connect/disconnect to the server (especially true for web based applications). Keep your connections as long lived as possible. </li> <li> If your client is on the same host than the server, use Unix domain sockets. </li> <li> Prefer to use aggregated commands (MSET/MGET), or commands with variadic parameters (if possible) over pipelining. </li> <li> Prefer to use pipelining (if possible) over sequence of roundtrips. </li> <li> Redis supports Lua server-side scripting to cover cases that are not suitable for raw pipelining (for instance when the result of a command is an input for the following commands). </li> </ul> <p> On Linux, some people can achieve better latencies by playing with process placement (taskset), cgroups, real-time priorities (chrt), NUMA configuration (numactl), or by using a low-latency kernel. Please note vanilla Redis is not really suitable to be bound on a <strong> single </strong> CPU core. Redis can fork background tasks that can be extremely CPU consuming like <a href="/commands/bgsave"> <code> BGSAVE </code> </a> or <a href="/commands/bgrewriteaof"> <code> BGREWRITEAOF </code> </a> . These tasks must <strong> never </strong> run on the same core as the main event loop. </p> <p> In most situations, these kind of system level optimizations are not needed. Only do them if you require them, and if you are familiar with them. </p> <h2 id="single-threaded-nature-of-redis"> Single threaded nature of Redis </h2> <p> Redis uses a <em> mostly </em> single threaded design. This means that a single process serves all the client requests, using a technique called <strong> multiplexing </strong> . This means that Redis can serve a single request in every given moment, so all the requests are served sequentially. This is very similar to how Node.js works as well. However, both products are not often perceived as being slow. This is caused in part by the small amount of time to complete a single request, but primarily because these products are designed to not block on system calls, such as reading data from or writing data to a socket. </p> <p> I said that Redis is <em> mostly </em> single threaded since actually from Redis 2.4 we use threads in Redis in order to perform some slow I/O operations in the background, mainly related to disk I/O, but this does not change the fact that Redis serves all the requests using a single thread. </p> <h2 id="latency-generated-by-slow-commands"> Latency generated by slow commands </h2> <p> A consequence of being single thread is that when a request is slow to serve all the other clients will wait for this request to be served. When executing normal commands, like <a href="/commands/get"> <code> GET </code> </a> or <a href="/commands/set"> <code> SET </code> </a> or <a href="/commands/lpush"> <code> LPUSH </code> </a> this is not a problem at all since these commands are executed in constant (and very small) time. However there are commands operating on many elements, like <a href="/commands/sort"> <code> SORT </code> </a> , <a href="/commands/lrem"> <code> LREM </code> </a> , <a href="/commands/sunion"> <code> SUNION </code> </a> and others. For instance taking the intersection of two big sets can take a considerable amount of time. </p> <p> The algorithmic complexity of all commands is documented. A good practice is to systematically check it when using commands you are not familiar with. </p> <p> If you have latency concerns you should either not use slow commands against values composed of many elements, or you should run a replica using Redis replication where you run all your slow queries. </p> <p> It is possible to monitor slow commands using the Redis <a href="/commands/slowlog"> Slow Log feature </a> . </p> <p> Additionally, you can use your favorite per-process monitoring program (top, htop, prstat, etc ...) to quickly check the CPU consumption of the main Redis process. If it is high while the traffic is not, it is usually a sign that slow commands are used. </p> <p> <strong> IMPORTANT NOTE </strong> : a VERY common source of latency generated by the execution of slow commands is the use of the <a href="/commands/keys"> <code> KEYS </code> </a> command in production environments. <a href="/commands/keys"> <code> KEYS </code> </a> , as documented in the Redis documentation, should only be used for debugging purposes. Since Redis 2.8 a new commands were introduced in order to iterate the key space and other large collections incrementally, please check the <a href="/commands/scan"> <code> SCAN </code> </a> , <a href="/commands/sscan"> <code> SSCAN </code> </a> , <a href="/commands/hscan"> <code> HSCAN </code> </a> and <a href="/commands/zscan"> <code> ZSCAN </code> </a> commands for more information. </p> <h2 id="latency-generated-by-fork"> Latency generated by fork </h2> <p> In order to generate the RDB file in background, or to rewrite the Append Only File if AOF persistence is enabled, Redis has to fork background processes. The fork operation (running in the main thread) can induce latency by itself. </p> <p> Forking is an expensive operation on most Unix-like systems, since it involves copying a good number of objects linked to the process. This is especially true for the page table associated to the virtual memory mechanism. </p> <p> For instance on a Linux/AMD64 system, the memory is divided in 4 kB pages. To convert virtual addresses to physical addresses, each process stores a page table (actually represented as a tree) containing at least a pointer per page of the address space of the process. So a large 24 GB Redis instance requires a page table of 24 GB / 4 kB * 8 = 48 MB. </p> <p> When a background save is performed, this instance will have to be forked, which will involve allocating and copying 48 MB of memory. It takes time and CPU, especially on virtual machines where allocation and initialization of a large memory chunk can be expensive. </p> <h2 id="fork-time-in-different-systems"> Fork time in different systems </h2> <p> Modern hardware is pretty fast at copying the page table, but Xen is not. The problem with Xen is not virtualization-specific, but Xen-specific. For instance using VMware or Virtual Box does not result into slow fork time. The following is a table that compares fork time for different Redis instance size. Data is obtained performing a BGSAVE and looking at the <code> latest_fork_usec </code> filed in the <a href="/commands/info"> <code> INFO </code> </a> command output. </p> <p> However the good news is that <strong> new types of EC2 HVM based instances are much better with fork times </strong> , almost on par with physical servers, so for example using m3.medium (or better) instances will provide good results. </p> <ul> <li> <strong> Linux beefy VM on VMware </strong> 6.0GB RSS forked in 77 milliseconds (12.8 milliseconds per GB). </li> <li> <strong> Linux running on physical machine (Unknown HW) </strong> 6.1GB RSS forked in 80 milliseconds (13.1 milliseconds per GB) </li> <li> <strong> Linux running on physical machine (Xeon @ 2.27Ghz) </strong> 6.9GB RSS forked into 62 milliseconds (9 milliseconds per GB). </li> <li> <strong> Linux VM on 6sync (KVM) </strong> 360 MB RSS forked in 8.2 milliseconds (23.3 milliseconds per GB). </li> <li> <strong> Linux VM on EC2, old instance types (Xen) </strong> 6.1GB RSS forked in 1460 milliseconds (239.3 milliseconds per GB). </li> <li> <strong> Linux VM on EC2, new instance types (Xen) </strong> 1GB RSS forked in 10 milliseconds (10 milliseconds per GB). </li> <li> <strong> Linux VM on Linode (Xen) </strong> 0.9GBRSS forked into 382 milliseconds (424 milliseconds per GB). </li> </ul> <p> As you can see certain VMs running on Xen have a performance hit that is between one order to two orders of magnitude. For EC2 users the suggestion is simple: use modern HVM based instances. </p> <h2 id="latency-induced-by-transparent-huge-pages"> Latency induced by transparent huge pages </h2> <p> Unfortunately when a Linux kernel has transparent huge pages enabled, Redis incurs to a big latency penalty after the <code> fork </code> call is used in order to persist on disk. Huge pages are the cause of the following issue: </p> <ol> <li> Fork is called, two processes with shared huge pages are created. </li> <li> In a busy instance, a few event loops runs will cause commands to target a few thousand of pages, causing the copy on write of almost the whole process memory. </li> <li> This will result in big latency and big memory usage. </li> </ol> <p> Make sure to <strong> disable transparent huge pages </strong> using the following command: </p> <pre><code>echo never &gt; /sys/kernel/mm/transparent_hugepage/enabled </code></pre> <h2 id="latency-induced-by-swapping-operating-system-paging"> Latency induced by swapping (operating system paging) </h2> <p> Linux (and many other modern operating systems) is able to relocate memory pages from the memory to the disk, and vice versa, in order to use the system memory efficiently. </p> <p> If a Redis page is moved by the kernel from the memory to the swap file, when the data stored in this memory page is used by Redis (for example accessing a key stored into this memory page) the kernel will stop the Redis process in order to move the page back into the main memory. This is a slow operation involving random I/Os (compared to accessing a page that is already in memory) and will result into anomalous latency experienced by Redis clients. </p> <p> The kernel relocates Redis memory pages on disk mainly because of three reasons: </p> <ul> <li> The system is under memory pressure since the running processes are demanding more physical memory than the amount that is available. The simplest instance of this problem is simply Redis using more memory than is available. </li> <li> The Redis instance data set, or part of the data set, is mostly completely idle (never accessed by clients), so the kernel could swap idle memory pages on disk. This problem is very rare since even a moderately slow instance will touch all the memory pages often, forcing the kernel to retain all the pages in memory. </li> <li> Some processes are generating massive read or write I/Os on the system. Because files are generally cached, it tends to put pressure on the kernel to increase the filesystem cache, and therefore generate swapping activity. Please note it includes Redis RDB and/or AOF background threads which can produce large files. </li> </ul> <p> Fortunately Linux offers good tools to investigate the problem, so the simplest thing to do is when latency due to swapping is suspected is just to check if this is the case. </p> <p> The first thing to do is to checking the amount of Redis memory that is swapped on disk. In order to do so you need to obtain the Redis instance pid: </p> <pre><code>$ redis-cli info | grep process_id process_id:5454 </code></pre> <p> Now enter the /proc file system directory for this process: </p> <pre><code>$ cd /proc/5454 </code></pre> <p> Here you'll find a file called <strong> smaps </strong> that describes the memory layout of the Redis process (assuming you are using Linux 2.6.16 or newer). This file contains very detailed information about our process memory maps, and one field called <strong> Swap </strong> is exactly what we are looking for. However there is not just a single swap field since the smaps file contains the different memory maps of our Redis process (The memory layout of a process is more complex than a simple linear array of pages). </p> <p> Since we are interested in all the memory swapped by our process the first thing to do is to grep for the Swap field across all the file: </p> <pre><code>$ cat smaps | grep 'Swap:' Swap: 0 kB Swap: 0 kB Swap: 0 kB Swap: 0 kB Swap: 0 kB Swap: 12 kB Swap: 156 kB Swap: 8 kB Swap: 0 kB Swap: 0 kB Swap: 0 kB Swap: 0 kB Swap: 0 kB Swap: 0 kB Swap: 0 kB Swap: 0 kB Swap: 0 kB Swap: 4 kB Swap: 0 kB Swap: 0 kB Swap: 4 kB Swap: 0 kB Swap: 0 kB Swap: 4 kB Swap: 4 kB Swap: 0 kB Swap: 0 kB Swap: 0 kB Swap: 0 kB Swap: 0 kB </code></pre> <p> If everything is 0 kB, or if there are sporadic 4k entries, everything is perfectly normal. Actually in our example instance (the one of a real web site running Redis and serving hundreds of users every second) there are a few entries that show more swapped pages. To investigate if this is a serious problem or not we change our command in order to also print the size of the memory map: </p> <pre><code>$ cat smaps | egrep '^(Swap|Size)' Size: 316 kB Swap: 0 kB Size: 4 kB Swap: 0 kB Size: 8 kB Swap: 0 kB Size: 40 kB Swap: 0 kB Size: 132 kB Swap: 0 kB Size: 720896 kB Swap: 12 kB Size: 4096 kB Swap: 156 kB Size: 4096 kB Swap: 8 kB Size: 4096 kB Swap: 0 kB Size: 4 kB Swap: 0 kB Size: 1272 kB Swap: 0 kB Size: 8 kB Swap: 0 kB Size: 4 kB Swap: 0 kB Size: 16 kB Swap: 0 kB Size: 84 kB Swap: 0 kB Size: 4 kB Swap: 0 kB Size: 4 kB Swap: 0 kB Size: 8 kB Swap: 4 kB Size: 8 kB Swap: 0 kB Size: 4 kB Swap: 0 kB Size: 4 kB Swap: 4 kB Size: 144 kB Swap: 0 kB Size: 4 kB Swap: 0 kB Size: 4 kB Swap: 4 kB Size: 12 kB Swap: 4 kB Size: 108 kB Swap: 0 kB Size: 4 kB Swap: 0 kB Size: 4 kB Swap: 0 kB Size: 272 kB Swap: 0 kB Size: 4 kB Swap: 0 kB </code></pre> <p> As you can see from the output, there is a map of 720896 kB (with just 12 kB swapped) and 156 kB more swapped in another map: basically a very small amount of our memory is swapped so this is not going to create any problem at all. </p> <p> If instead a non trivial amount of the process memory is swapped on disk your latency problems are likely related to swapping. If this is the case with your Redis instance you can further verify it using the <strong> vmstat </strong> command: </p> <pre><code>$ vmstat 1 procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 0 0 3980 697932 147180 1406456 0 0 2 2 2 0 4 4 91 0 0 0 3980 697428 147180 1406580 0 0 0 0 19088 16104 9 6 84 0 0 0 3980 697296 147180 1406616 0 0 0 28 18936 16193 7 6 87 0 0 0 3980 697048 147180 1406640 0 0 0 0 18613 15987 6 6 88 0 2 0 3980 696924 147180 1406656 0 0 0 0 18744 16299 6 5 88 0 0 0 3980 697048 147180 1406688 0 0 0 4 18520 15974 6 6 88 0 ^C </code></pre> <p> The interesting part of the output for our needs are the two columns <strong> si </strong> and <strong> so </strong> , that counts the amount of memory swapped from/to the swap file. If you see non zero counts in those two columns then there is swapping activity in your system. </p> <p> Finally, the <strong> iostat </strong> command can be used to check the global I/O activity of the system. </p> <pre><code>$ iostat -xk 1 avg-cpu: %user %nice %system %iowait %steal %idle 13.55 0.04 2.92 0.53 0.00 82.95 Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util sda 0.77 0.00 0.01 0.00 0.40 0.00 73.65 0.00 3.62 2.58 0.00 sdb 1.27 4.75 0.82 3.54 38.00 32.32 32.19 0.11 24.80 4.24 1.85 </code></pre> <p> If your latency problem is due to Redis memory being swapped on disk you need to lower the memory pressure in your system, either adding more RAM if Redis is using more memory than the available, or avoiding running other memory hungry processes in the same system. </p> <h2 id="latency-due-to-aof-and-disk-io"> Latency due to AOF and disk I/O </h2> <p> Another source of latency is due to the Append Only File support on Redis. The AOF basically uses two system calls to accomplish its work. One is write(2) that is used in order to write data to the append only file, and the other one is fdatasync(2) that is used in order to flush the kernel file buffer on disk in order to ensure the durability level specified by the user. </p> <p> Both the write(2) and fdatasync(2) calls can be source of latency. For instance write(2) can block both when there is a system wide sync in progress, or when the output buffers are full and the kernel requires to flush on disk in order to accept new writes. </p> <p> The fdatasync(2) call is a worse source of latency as with many combinations of kernels and file systems used it can take from a few milliseconds to a few seconds to complete, especially in the case of some other process doing I/O. For this reason when possible Redis does the fdatasync(2) call in a different thread since Redis 2.4. </p> <p> We'll see how configuration can affect the amount and source of latency when using the AOF file. </p> <p> The AOF can be configured to perform a fsync on disk in three different ways using the <strong> appendfsync </strong> configuration option (this setting can be modified at runtime using the <strong> CONFIG SET </strong> command). </p> <ul> <li> <p> When appendfsync is set to the value of <strong> no </strong> Redis performs no fsync. In this configuration the only source of latency can be write(2). When this happens usually there is no solution since simply the disk can't cope with the speed at which Redis is receiving data, however this is uncommon if the disk is not seriously slowed down by other processes doing I/O. </p> </li> <li> <p> When appendfsync is set to the value of <strong> everysec </strong> Redis performs a fsync every second. It uses a different thread, and if the fsync is still in progress Redis uses a buffer to delay the write(2) call up to two seconds (since write would block on Linux if a fsync is in progress against the same file). However if the fsync is taking too long Redis will eventually perform the write(2) call even if the fsync is still in progress, and this can be a source of latency. </p> </li> <li> <p> When appendfsync is set to the value of <strong> always </strong> a fsync is performed at every write operation before replying back to the client with an OK code (actually Redis will try to cluster many commands executed at the same time into a single fsync). In this mode performances are very low in general and it is strongly recommended to use a fast disk and a file system implementation that can perform the fsync in short time. </p> </li> </ul> <p> Most Redis users will use either the <strong> no </strong> or <strong> everysec </strong> setting for the appendfsync configuration directive. The suggestion for minimum latency is to avoid other processes doing I/O in the same system. Using an SSD disk can help as well, but usually even non SSD disks perform well with the append only file if the disk is spare as Redis writes to the append only file without performing any seek. </p> <p> If you want to investigate your latency issues related to the append only file you can use the strace command under Linux: </p> <pre><code>sudo strace -p $(pidof redis-server) -T -e trace=fdatasync </code></pre> <p> The above command will show all the fdatasync(2) system calls performed by Redis in the main thread. With the above command you'll not see the fdatasync system calls performed by the background thread when the appendfsync config option is set to <strong> everysec </strong> . In order to do so just add the -f switch to strace. </p> <p> If you wish you can also see both fdatasync and write system calls with the following command: </p> <pre><code>sudo strace -p $(pidof redis-server) -T -e trace=fdatasync,write </code></pre> <p> However since write(2) is also used in order to write data to the client sockets this will likely show too many things unrelated to disk I/O. Apparently there is no way to tell strace to just show slow system calls so I use the following command: </p> <pre><code>sudo strace -f -p $(pidof redis-server) -T -e trace=fdatasync,write 2&gt;&amp;1 | grep -v '0.0' | grep -v unfinished </code></pre> <h2 id="latency-generated-by-expires"> Latency generated by expires </h2> <p> Redis evict expired keys in two ways: </p> <ul> <li> One <em> lazy </em> way expires a key when it is requested by a command, but it is found to be already expired. </li> <li> One <em> active </em> way expires a few keys every 100 milliseconds. </li> </ul> <p> The active expiring is designed to be adaptive. An expire cycle is started every 100 milliseconds (10 times per second), and will do the following: </p> <ul> <li> Sample <code> ACTIVE_EXPIRE_CYCLE_LOOKUPS_PER_LOOP </code> keys, evicting all the keys already expired. </li> <li> If the more than 25% of the keys were found expired, repeat. </li> </ul> <p> Given that <code> ACTIVE_EXPIRE_CYCLE_LOOKUPS_PER_LOOP </code> is set to 20 by default, and the process is performed ten times per second, usually just 200 keys per second are actively expired. This is enough to clean the DB fast enough even when already expired keys are not accessed for a long time, so that the <em> lazy </em> algorithm does not help. At the same time expiring just 200 keys per second has no effects in the latency a Redis instance. </p> <p> However the algorithm is adaptive and will loop if it finds more than 25% of keys already expired in the set of sampled keys. But given that we run the algorithm ten times per second, this means that the unlucky event of more than 25% of the keys in our random sample are expiring at least <em> in the same second </em> . </p> <p> Basically this means that <strong> if the database has many, many keys expiring in the same second, and these make up at least 25% of the current population of keys with an expire set </strong> , Redis can block in order to get the percentage of keys already expired below 25%. </p> <p> This approach is needed in order to avoid using too much memory for keys that are already expired, and usually is absolutely harmless since it's strange that a big number of keys are going to expire in the same exact second, but it is not impossible that the user used <a href="/commands/expireat"> <code> EXPIREAT </code> </a> extensively with the same Unix time. </p> <p> In short: be aware that many keys expiring at the same moment can be a source of latency. </p> <h2 id="redis-software-watchdog"> Redis software watchdog </h2> <p> Redis 2.6 introduces the <em> Redis Software Watchdog </em> that is a debugging tool designed to track those latency problems that for one reason or the other escaped an analysis using normal tools. </p> <p> The software watchdog is an experimental feature. While it is designed to be used in production environments care should be taken to backup the database before proceeding as it could possibly have unexpected interactions with the normal execution of the Redis server. </p> <p> It is important to use it only as <em> last resort </em> when there is no way to track the issue by other means. </p> <p> This is how this feature works: </p> <ul> <li> The user enables the software watchdog using the <a href="/commands/config-set"> <code> CONFIG SET </code> </a> command. </li> <li> Redis starts monitoring itself constantly. </li> <li> If Redis detects that the server is blocked into some operation that is not returning fast enough, and that may be the source of the latency issue, a low level report about where the server is blocked is dumped on the log file. </li> <li> The user contacts the developers writing a message in the Redis Google Group, including the watchdog report in the message. </li> </ul> <p> Note that this feature cannot be enabled using the redis.conf file, because it is designed to be enabled only in already running instances and only for debugging purposes. </p> <p> To enable the feature just use the following: </p> <pre><code>CONFIG SET watchdog-period 500 </code></pre> <p> The period is specified in milliseconds. In the above example I specified to log latency issues only if the server detects a delay of 500 milliseconds or greater. The minimum configurable period is 200 milliseconds. </p> <p> When you are done with the software watchdog you can turn it off setting the <code> watchdog-period </code> parameter to 0. <strong> Important: </strong> remember to do this because keeping the instance with the watchdog turned on for a longer time than needed is generally not a good idea. </p> <p> The following is an example of what you'll see printed in the log file once the software watchdog detects a delay longer than the configured one: </p> <pre><code>[8547 | signal handler] (1333114359) --- WATCHDOG TIMER EXPIRED --- /lib/libc.so.6(nanosleep+0x2d) [0x7f16b5c2d39d] /lib/libpthread.so.0(+0xf8f0) [0x7f16b5f158f0] /lib/libc.so.6(nanosleep+0x2d) [0x7f16b5c2d39d] /lib/libc.so.6(usleep+0x34) [0x7f16b5c62844] ./redis-server(debugCommand+0x3e1) [0x43ab41] ./redis-server(call+0x5d) [0x415a9d] ./redis-server(processCommand+0x375) [0x415fc5] ./redis-server(processInputBuffer+0x4f) [0x4203cf] ./redis-server(readQueryFromClient+0xa0) [0x4204e0] ./redis-server(aeProcessEvents+0x128) [0x411b48] ./redis-server(aeMain+0x2b) [0x411dbb] ./redis-server(main+0x2b6) [0x418556] /lib/libc.so.6(__libc_start_main+0xfd) [0x7f16b5ba1c4d] ./redis-server() [0x411099] ------ </code></pre> <p> Note: in the example the <strong> DEBUG SLEEP </strong> command was used in order to block the server. The stack trace is different if the server blocks in a different context. </p> <p> If you happen to collect multiple watchdog stack traces you are encouraged to send everything to the Redis Google Group: the more traces we obtain, the simpler it will be to understand what the problem with your instance is. </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/oss_and_stack/management/optimization/latency/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/ts.get/.html
<section class="prose w-full py-12"> <h1 class="command-name"> TS.GET </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">TS.GET key [LATEST] </pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available in: </dt> <dd class="m-0"> <a href="/docs/stack"> Redis Stack </a> / <a href="/docs/data-types/timeseries"> TimeSeries 1.0.0 </a> </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(1) </dd> </dl> <p> Get the sample with the highest timestamp from a given time series </p> <p> <a href="#examples"> Examples </a> </p> <h2 id="required-arguments"> Required arguments </h2> <details open=""> <summary> <code> key </code> </summary> <p> is key name for the time series. </p> </details> <h2 id="optional-arguments"> Optional arguments </h2> <details open=""> <summary> <code> LATEST </code> (since RedisTimeSeries v1.8) </summary> <p> is used when a time series is a compaction. With <code> LATEST </code> , TS.GET reports the compacted value of the latest (possibly partial) bucket. Without <code> LATEST </code> , TS.GET does not report the latest (possibly partial) bucket. When a time series is not a compaction, <code> LATEST </code> is ignored. </p> <p> The data in the latest bucket of a compaction is possibly partial. A bucket is <em> closed </em> and compacted only upon arrival of a new sample that <em> opens </em> a new <em> latest </em> bucket. There are cases, however, when the compacted value of the latest (possibly partial) bucket is also required. In such a case, use <code> LATEST </code> . </p> </details> <h2 id="return-value"> Return value </h2> <p> Returns one of these replies: </p> <ul> <li> <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> of a single ( <a href="/docs/latest/develop/reference/protocol-spec/#integers"> Integer reply </a> , <a href="/docs/latest/develop/reference/protocol-spec/#simple-strings"> Simple string reply </a> ) pair representing (timestamp, value(double)) of the sample with the highest timestamp </li> <li> An empty <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> - when the time series is empty </li> <li> [] (invalid arguments, wrong key type, key does not exist, etc.) </li> </ul> <h2 id="examples"> Examples </h2> <details open=""> <summary> <b> Get latest measured temperature for a city </b> </summary> <p> Create a time series to store the temperatures measured in Tel Aviv and add four measurements for Sun Jan 01 2023 </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.CREATE temp:TLV LABELS <span class="nb">type</span> temp location TLV </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MADD temp:TLV <span class="m">1672534800</span> <span class="m">12</span> temp:TLV <span class="m">1672556400</span> <span class="m">16</span> temp:TLV <span class="m">1672578000</span> <span class="m">21</span> temp:TLV <span class="m">1672599600</span> <span class="m">14</span></span></span></code></pre> </div> <p> Next, get the latest measured temperature (the temperature with the highest timestamp) </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.GET temp:TLV </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1672599600</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="m">14</span></span></span></code></pre> </div> </details> <details open=""> <summary> <b> Get latest maximal daily temperature for a city </b> </summary> <p> Create a time series to store the temperatures measured in Jerusalem </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.CREATE temp:JLM LABELS <span class="nb">type</span> temp location JLM </span></span><span class="line"><span class="cl">OK</span></span></code></pre> </div> <p> Next, create a compacted time series named <em> dailyAvgTemp:JLM </em> containing one compacted sample per 24 hours: the maximum of all measurements taken from midnight to next midnight. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.CREATE dailyMaxTemp:JLM LABELS <span class="nb">type</span> temp location JLM </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.CREATERULE temp:JLM dailyMaxTemp:JLM AGGREGATION max <span class="m">86400000</span> </span></span><span class="line"><span class="cl">OK</span></span></code></pre> </div> <p> Add four measurements for Sun Jan 01 2023 and three measurements for Mon Jan 02 2023 </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MADD temp:JLM <span class="m">1672534800000</span> <span class="m">12</span> temp:JLM <span class="m">1672556400000</span> <span class="m">16</span> temp:JLM <span class="m">1672578000000</span> <span class="m">21</span> temp:JLM <span class="m">1672599600000</span> <span class="m">14</span> </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1672534800000</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1672556400000</span> </span></span><span class="line"><span class="cl">3<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1672578000000</span> </span></span><span class="line"><span class="cl">4<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1672599600000</span> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MADD temp:JLM <span class="m">1672621200000</span> <span class="m">11</span> temp:JLM <span class="m">1672642800000</span> <span class="m">21</span> temp:JLM <span class="m">1672664400000</span> <span class="m">26</span> </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1672621200000</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1672642800000</span> </span></span><span class="line"><span class="cl">3<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1672664400000</span></span></span></code></pre> </div> <p> Next, get the latest maximum daily temperature; do not report the latest, possibly partial, bucket </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.GET dailyMaxTemp:JLM </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1672531200000</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="m">21</span></span></span></code></pre> </div> <p> Get the latest maximum daily temperature (the temperature with the highest timestamp); report the latest, possibly partial, bucket </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.GET dailyMaxTemp:JLM LATEST </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1672617600000</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="m">26</span></span></span></code></pre> </div> </details> <h2 id="see-also"> See also </h2> <p> <a href="/docs/latest/commands/ts.mget/"> <code> TS.MGET </code> </a> </p> <h2 id="related-topics"> Related topics </h2> <p> <a href="/docs/latest/develop/data-types/timeseries/"> RedisTimeSeries </a> </p> <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/ts.get/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/bootstrap/paths/.html
<section class="prose w-full py-12 max-w-none"> <h1> Paths object </h1> <p class="text-lg -mt-5 mb-10"> Documents the paths object used with Redis Enterprise Software REST API calls. </p> <table> <thead> <tr> <th> Name </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> bigstore_path </td> <td> string </td> <td> Bigredis storage path </td> </tr> <tr> <td> ccs_persistent_path </td> <td> string </td> <td> Persistent storage path of CCS </td> </tr> <tr> <td> ephemeral_path </td> <td> string </td> <td> Ephemeral storage path </td> </tr> <tr> <td> persistent_path </td> <td> string </td> <td> Persistent storage path </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/bootstrap/paths/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/kubernetes/release-notes/6-4-2-releases/6-4-2-5/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise for Kubernetes release notes 6.4.2-5 (April 2023) </h1> <p class="text-lg -mt-5 mb-10"> The Redis Enterprise K8s 6.4.2-5 is a maintenance release for version 6.4.2-4. </p> <h2 id="overview"> Overview </h2> <p> This is a maintenance release of Redis Enterprise for Kubernetes 6.4.2-4 that adds supports for Redis Enterprise 6.4.2-61. </p> <p> New images and fixes are listed below. Refer to <a href="/docs/latest/operate/kubernetes/release-notes/6-4-2-releases/k8s-6-4-2-4/"> 6.2.4-4 (March 2023) </a> for compatibility notes and known limitations. </p> <h2 id="images"> Images </h2> <ul> <li> <strong> Redis Enterprise </strong> : <code> redislabs/redis:6.4.2-61 </code> </li> <li> <strong> Operator </strong> : <code> redislabs/operator:6.4.2-5 </code> </li> <li> <strong> Services Rigger </strong> : <code> redislabs/k8s-controller:6.4.2-5 </code> </li> </ul> <h3 id="openshift-images"> OpenShift images </h3> <ul> <li> <strong> Redis Enterprise </strong> : <code> registry.connect.redhat.com/redislabs/redis-enterprise:6.4.2-61.rhel8-openshift </code> (or <code> redislabs/redis-enterprise:6.4.2-61.rhel7-openshift </code> if upgrading from RHEL 7) </li> <li> <strong> Operator </strong> : <code> registry.connect.redhat.com/redislabs/redis-enterprise-operator:6.4.2-5 </code> </li> <li> <strong> Services Rigger </strong> : <code> registry.connect.redhat.com/redislabs/services-manager:6.4.2-5 </code> </li> </ul> <h3 id="openshift-olm-bundles"> OpenShift OLM bundles </h3> <ul> <li> Redis Enterprise operator bundle version: <code> v6.4.2-5.0 </code> </li> </ul> <h2 id="feature-enhancements"> Feature enhancements </h2> <ul> <li> Upgraded to support Redis Enterprise 6.4.2-61 </li> </ul> <h2 id="bug-fixes"> Bug fixes </h2> <ul> <li> Fixed bug that can cause Redis cluster to become unresponsive during a Kubernetes upgrade on clusters with more than 9 REC nodes. (RED-93025) </li> </ul> <h2 id="compatibility-notes"> Compatibility notes </h2> <p> See <a href="/docs/latest/operate/kubernetes/release-notes/6-4-2-releases/k8s-6-4-2-4/"> Redis Enterprise for Kubernetes release notes 6.4.2-4 (March 2023) </a> . </p> <h2 id="before-upgrading"> Before upgrading </h2> <p> Be aware the following changes included in this release affect the upgrade process. Please read carefully before upgrading, </p> <ul> <li> <p> <strong> Supported upgrade paths </strong> </p> <p> If you are using a version earlier than 6.2.10-45, you cannot upgrade directly to this release. You must upgrade to 6.2.10-45 before you can upgrade to versions 6.2.18 or later. </p> </li> <li> <p> <strong> ValidatingWebhookConfiguration </strong> </p> <p> This release uses a new <code> ValidatingWebhookConfiguration </code> resource to replace the <code> redb-admission </code> webhook resource. To use releases 6.4.2-4 or later, delete the old webhook resource and apply the new file. See <a href="/docs/latest/operate/kubernetes/upgrade/upgrade-redis-cluster/#reapply-webhook"> upgrade Redis cluster </a> for instructions. </p> </li> </ul> <h2 id="known-limitations"> Known limitations </h2> <p> See <a href="/docs/latest/operate/kubernetes/release-notes/6-4-2-releases/k8s-6-4-2-4/"> Redis Enterprise for Kubernetes release notes 6.4.2-4 (March 2023) </a> . </p> <h2 id="security"> Security </h2> <p> For a list of fixes related to CVEs, see the <a href="/docs/latest/operate/rs/release-notes/rs-6-4-2-releases/rs-6-4-2-61/"> Redis Enterprise 6.4.2-61 release notes </a> . </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/kubernetes/release-notes/6-4-2-releases/6-4-2-5/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/jvm/classes/gearsbuilder/filter/.html
<section class="prose w-full py-12 max-w-none"> <h1> Filter </h1> <p class="text-lg -mt-5 mb-10"> Filters out records in the pipe based on a given condition. </p> <div class="highlight"> <pre class="chroma"><code class="language-java" data-lang="java"><span class="line"><span class="cl"><span class="kd">public</span> <span class="n">GearsBuilder</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="n">filter</span><span class="err">​</span><span class="o">(</span> </span></span><span class="line"><span class="cl"> <span class="n">gears</span><span class="o">.</span><span class="na">operations</span><span class="o">.</span><span class="na">FilterOperation</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="n">filter</span><span class="o">)</span> </span></span></code></pre> </div> <p> Filters out records in the pipe based on a given condition. </p> <p> The filter operation should contain a conditional statement and return a boolean for each record: </p> <ul> <li> If <code> true </code> , the record will continue through the pipe. </li> <li> If <code> false </code> , it filters out the record. </li> </ul> <h2 id="parameters"> Parameters </h2> <table> <thead> <tr> <th> Name </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> filter </td> <td> FilterOperation <t> </t> </td> <td> A function that checks a condition for each record in the pipe. Returns a boolean. </td> </tr> </tbody> </table> <h2 id="returns"> Returns </h2> <p> Returns a GearsBuilder object with the same template type as the input builder. </p> <h2 id="example"> Example </h2> <p> Get all records that contain the substring "person:": </p> <div class="highlight"> <pre class="chroma"><code class="language-java" data-lang="java"><span class="line"><span class="cl"><span class="n">GearsBuilder</span><span class="o">.</span><span class="na">CreateGearsBuilder</span><span class="o">(</span><span class="n">reader</span><span class="o">).</span> </span></span><span class="line"><span class="cl"> <span class="n">filter</span><span class="o">(</span><span class="n">r</span><span class="o">-&gt;{</span> </span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="n">r</span><span class="o">.</span><span class="na">getKey</span><span class="o">().</span><span class="na">contains</span><span class="o">(</span><span class="s">"person:"</span><span class="o">);</span> </span></span><span class="line"><span class="cl"><span class="o">});</span> </span></span></code></pre> </div> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/jvm/classes/gearsbuilder/filter/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/requests/bdbs/peer_stats/.html
<section class="prose w-full py-12 max-w-none"> <h1> CRDB peer stats requests </h1> <p class="text-lg -mt-5 mb-10"> Active-Active peer instance statistics requests </p> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#get-all-bdbs-peer_stats"> GET </a> </td> <td> <code> /v1/bdbs/{bdb_uid}/peer_stats </code> </td> <td> Get stats for all CRDB peer instances </td> </tr> <tr> <td> <a href="#get-bdbs-peer_stats"> GET </a> </td> <td> <code> /v1/bdbs/{bdb_uid}/peer_stats/{uid} </code> </td> <td> Get stats for a specific CRDB peer instance </td> </tr> </tbody> </table> <h2 id="get-all-bdbs-peer_stats"> Get all CRDB peer stats </h2> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /v1/bdbs/<span class="o">{</span>bdb_uid<span class="o">}</span>/peer_stats </span></span></code></pre> </div> <p> Get statistics for all peer instances of a local CRDB instance. </p> <h3 id="permissions"> Permissions </h3> <table> <thead> <tr> <th> Permission name </th> <th> Roles </th> </tr> </thead> <tbody> <tr> <td> <a href="/docs/latest/operate/rs/7.4/references/rest-api/permissions/#view_bdb_stats"> view_bdb_stats </a> </td> <td> admin <br/> cluster_member <br/> cluster_viewer <br/> db_member <br/> db_viewer </td> </tr> </tbody> </table> <h3 id="get-all-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /bdbs/1/peer_stats?interval<span class="o">=</span>5min </span></span></code></pre> </div> <h4 id="headers"> Headers </h4> <table> <thead> <tr> <th> Key </th> <th> Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> Host </td> <td> cnm.cluster.fqdn </td> <td> Domain name </td> </tr> <tr> <td> Accept </td> <td> application/json </td> <td> Accepted media type </td> </tr> </tbody> </table> <h4 id="url-parameters"> URL parameters </h4> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> bdb_uid </td> <td> integer </td> <td> The unique ID of the local CRDB instance. </td> </tr> </tbody> </table> <h4 id="query-parameters"> Query parameters </h4> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> interval </td> <td> string </td> <td> Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) </td> </tr> <tr> <td> stime </td> <td> ISO_8601 </td> <td> Start time from which we want the stats. Should comply with the <a href="https://en.wikipedia.org/wiki/ISO_8601"> ISO_8601 </a> format (optional) </td> </tr> <tr> <td> etime </td> <td> ISO_8601 </td> <td> End time after which we don't want the stats. Should comply with the <a href="https://en.wikipedia.org/wiki/ISO_8601"> ISO_8601 </a> format (optional) </td> </tr> </tbody> </table> <h3 id="get-all-response"> Response </h3> <p> Returns <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/statistics/"> statistics </a> for all CRDB peer instances. </p> <h4 id="example-json-body"> Example JSON body </h4> <div class="highlight"> <pre class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span> <span class="nt">"peer_stats"</span><span class="p">:</span> <span class="p">[</span> </span></span><span class="line"><span class="cl"> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"intervals"</span><span class="p">:</span> <span class="p">[</span> </span></span><span class="line"><span class="cl"> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"egress_bytes"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"egress_bytes_decompressed"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"etime"</span><span class="p">:</span> <span class="s2">"2017-10-22T19:30:00Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ingress_bytes"</span><span class="p">:</span> <span class="mi">18528</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ingress_bytes_decompressed"</span><span class="p">:</span> <span class="mi">185992</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"5min"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"local_ingress_lag_time"</span><span class="p">:</span> <span class="mf">0.244</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"pending_local_writes_max"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"pending_local_writes_min"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"stime"</span><span class="p">:</span> <span class="s2">"2017-10-22T19:25:00Z"</span> </span></span><span class="line"><span class="cl"> <span class="p">},</span> </span></span><span class="line"><span class="cl"> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"egress_bytes"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"egress_bytes_decompressed"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"etime"</span><span class="p">:</span> <span class="s2">"2017-10-22T19:35:00Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ingress_bytes"</span><span class="p">:</span> <span class="mi">18</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ingress_bytes_decompressed"</span><span class="p">:</span> <span class="mi">192</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"5min"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"local_ingress_lag_time"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"pending_local_writes_max"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"pending_local_writes_min"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"stime"</span><span class="p">:</span> <span class="s2">"2017-10-22T19:30:00Z"</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><span class="line"><span class="cl"> <span class="p">],</span> </span></span><span class="line"><span class="cl"> <span class="nt">"uid"</span><span class="p">:</span> <span class="s2">"3"</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><span class="line"><span class="cl"> <span class="p">]</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span></code></pre> </div> <h4 id="get-all-status-codes"> Status codes </h4> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1"> 200 OK </a> </td> <td> No error </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5"> 404 Not Found </a> </td> <td> Database does not exist. </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7"> 406 Not Acceptable </a> </td> <td> Database is not a CRDB. </td> </tr> </tbody> </table> <h2 id="get-bdbs-peer_stats"> Get CRDB peer stats </h2> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /v1/bdbs/<span class="o">{</span>bdb_uid<span class="o">}</span>/peer_stats/<span class="o">{</span>int: uid<span class="o">}</span> </span></span></code></pre> </div> <p> Get statistics for a specific CRDB peer instance. </p> <h3 id="permissions-1"> Permissions </h3> <table> <thead> <tr> <th> Permission name </th> <th> Roles </th> </tr> </thead> <tbody> <tr> <td> <a href="/docs/latest/operate/rs/7.4/references/rest-api/permissions/#view_bdb_stats"> view_bdb_stats </a> </td> <td> admin <br/> cluster_member <br/> cluster_viewer <br/> db_member <br/> db_viewer </td> </tr> </tbody> </table> <h3 id="get-request"> Request </h3> <h4 id="example-http-request-1"> Example HTTP request </h4> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /bdbs/1/peer_stats/3?interval<span class="o">=</span>5min </span></span></code></pre> </div> <h4 id="headers-1"> Headers </h4> <table> <thead> <tr> <th> Key </th> <th> Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> Host </td> <td> cnm.cluster.fqdn </td> <td> Domain name </td> </tr> <tr> <td> Accept </td> <td> application/json </td> <td> Accepted media type </td> </tr> </tbody> </table> <h4 id="url-parameters-1"> URL parameters </h4> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> bdb_uid </td> <td> integer </td> <td> The unique ID of the local CRDB instance. </td> </tr> <tr> <td> uid </td> <td> integer </td> <td> The peer instance uid, as specified in the CRDB instance list. </td> </tr> </tbody> </table> <h4 id="query-parameters-1"> Query parameters </h4> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> interval </td> <td> string </td> <td> Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) </td> </tr> <tr> <td> stime </td> <td> ISO_8601 </td> <td> Start time from which we want the stats. Should comply with the <a href="https://en.wikipedia.org/wiki/ISO_8601"> ISO_8601 </a> format (optional) </td> </tr> <tr> <td> etime </td> <td> ISO_8601 </td> <td> End time after which we don't want the stats. Should comply with the <a href="https://en.wikipedia.org/wiki/ISO_8601"> ISO_8601 </a> format (optional) </td> </tr> </tbody> </table> <h3 id="get-response"> Response </h3> <p> Returns <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/statistics/"> statistics </a> for a specific CRDB peer instance. </p> <h4 id="example-json-body-1"> Example JSON body </h4> <div class="highlight"> <pre class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"intervals"</span><span class="p">:</span> <span class="p">[</span> </span></span><span class="line"><span class="cl"> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"egress_bytes"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"egress_bytes_decompressed"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"etime"</span><span class="p">:</span> <span class="s2">"2017-10-22T19:30:00Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ingress_bytes"</span><span class="p">:</span> <span class="mi">18528</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ingress_bytes_decompressed"</span><span class="p">:</span> <span class="mi">185992</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"5min"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"local_ingress_lag_time"</span><span class="p">:</span> <span class="mf">0.244</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"pending_local_writes_max"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"pending_local_writes_min"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"stime"</span><span class="p">:</span> <span class="s2">"2017-10-22T19:25:00Z"</span> </span></span><span class="line"><span class="cl"> <span class="p">},</span> </span></span><span class="line"><span class="cl"> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"egress_bytes"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"egress_bytes_decompressed"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"etime"</span><span class="p">:</span> <span class="s2">"2017-10-22T19:35:00Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ingress_bytes"</span><span class="p">:</span> <span class="mi">18</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ingress_bytes_decompressed"</span><span class="p">:</span> <span class="mi">192</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"5min"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"local_ingress_lag_time"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"pending_local_writes_max"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"pending_local_writes_min"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"stime"</span><span class="p">:</span> <span class="s2">"2017-10-22T19:30:00Z"</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><span class="line"><span class="cl"> <span class="p">],</span> </span></span><span class="line"><span class="cl"> <span class="nt">"uid"</span><span class="p">:</span> <span class="s2">"3"</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="get-status-codes"> Status codes </h3> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1"> 200 OK </a> </td> <td> No error </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5"> 404 Not Found </a> </td> <td> Database or peer does not exist. </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7"> 406 Not Acceptable </a> </td> <td> Database is not a CRDB. </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/requests/bdbs/peer_stats/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rc/changelog/october-2024/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Cloud changelog (October 2024) </h1> <p class="text-lg -mt-5 mb-10"> New features, enhancements, and other changes added to Redis Cloud during October 2024. </p> <h2 id="new-features"> New Features </h2> <h3 id="redis-74-preview-on-redis-cloud-pro"> Redis 7.4 Preview on Redis Cloud Pro </h3> <p> A preview of Redis 7.4 is now available on <a href="/docs/latest/operate/rc/databases/create-database/create-pro-database-new/"> Redis Cloud Pro databases </a> . </p> <p> Redis 7.4 offers hash field expiration and other feature set improvements. For more information on the changes in Redis 7.4, see the <a href="https://redis.io/blog/announcing-redis-community-edition-and-redis-stack-74"> Redis 7.4 release blog post </a> . </p> <h2 id="security-fixes"> Security fixes </h2> <p> Redis Cloud has already been updated with patches for CVE-2024-31449, CVE-2024-31227, and CVE-2024-31228. No further action is required at this time. For more information, see the <a href="https://redis.io/blog/security-advisory-cve-2024-31449-cve-2024-31227-cve-2024-31228/"> Redis blog post </a> about these vulnerabilities. </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rc/changelog/october-2024/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/references/rest-api/quick-start/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise Software REST API quick start </h1> <p class="text-lg -mt-5 mb-10"> Redis Enterprise Software REST API quick start </p> <p> Redis Enterprise Software includes a REST API that allows you to automate certain tasks. This article shows you how to send a request to the Redis Enterprise Software REST API. </p> <h2 id="fundamentals"> Fundamentals </h2> <p> No matter which method you use to send API requests, there are a few common concepts to remember. </p> <table> <thead> <tr> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="/docs/latest/operate/rs/references/rest-api/#authentication"> Authentication </a> </td> <td> Use <a href="https://en.wikipedia.org/wiki/Basic_access_authentication"> Basic Auth </a> with your cluster username (email) and password </td> </tr> <tr> <td> <a href="/docs/latest/operate/rs/references/rest-api/#ports"> Ports </a> </td> <td> All calls are made to port 9443 by default </td> </tr> <tr> <td> <a href="/docs/latest/operate/rs/references/rest-api/#versions"> Versions </a> </td> <td> Specify the version in the request <a href="https://en.wikipedia.org/wiki/Uniform_Resource_Identifier"> URI </a> </td> </tr> <tr> <td> <a href="/docs/latest/operate/rs/references/rest-api/#headers"> Headers </a> </td> <td> <code> Accept </code> and <code> Content-Type </code> should be <code> application/json </code> </td> </tr> <tr> <td> <a href="/docs/latest/operate/rs/references/rest-api/#response-types-and-error-codes"> Response types and error codes </a> </td> <td> A response of <code> 200 OK </code> means success; otherwise, the request failed due to an error </td> </tr> </tbody> </table> <p> For more information, see <a href="/docs/latest/operate/rs/references/rest-api/"> Redis Enterprise Software REST API </a> . </p> <h2 id="curl-example-requests"> cURL example requests </h2> <p> <a href="https://curl.se/"> cURL </a> is a command-line tool that allows you to send HTTP requests from a terminal. </p> <p> You can use the following options to build a cURL request: </p> <table> <thead> <tr> <th> Option </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> -X </td> <td> Method (GET, PUT, PATCH, POST, or DELETE) </td> </tr> <tr> <td> -H </td> <td> Request header, can be specified multiple times </td> </tr> <tr> <td> -u </td> <td> Username and password information </td> </tr> <tr> <td> -d </td> <td> JSON data for PUT or POST requests </td> </tr> <tr> <td> -F </td> <td> Form data for PUT or POST requests, such as for the <a href="/docs/latest/operate/rs/references/rest-api/requests/modules/#post-module"> <code> POST /v1/modules </code> </a> or <a href="/docs/latest/operate/rs/references/rest-api/requests/modules/#post-module-v2"> <code> POST /v2/modules </code> </a> endpoint </td> </tr> <tr> <td> -k </td> <td> Turn off SSL verification </td> </tr> <tr> <td> -i </td> <td> Show headers and status code as well as the response body </td> </tr> </tbody> </table> <p> See the <a href="https://curl.se/docs/"> cURL documentation </a> for more information. </p> <h3 id="get-request"> GET request </h3> <p> Use the following cURL command to get a list of databases with the <a href="/docs/latest/operate/rs/references/rest-api/requests/bdbs/#get-all-bdbs"> GET <code> /v1/bdbs/ </code> </a> endpoint. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ curl -X GET -H <span class="s2">"accept: application/json"</span> <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span> -u <span class="s2">"[username]:[password]"</span> <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span> https://<span class="o">[</span>host<span class="o">][</span>:port<span class="o">]</span>/v1/bdbs -k -i </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">HTTP/1.1 <span class="m">200</span> OK </span></span><span class="line"><span class="cl">server: envoy </span></span><span class="line"><span class="cl">date: Tue, <span class="m">14</span> Jun <span class="m">2022</span> 19:24:30 GMT </span></span><span class="line"><span class="cl">content-type: application/json </span></span><span class="line"><span class="cl">content-length: <span class="m">2833</span> </span></span><span class="line"><span class="cl">cluster-state-id: <span class="m">42</span> </span></span><span class="line"><span class="cl">x-envoy-upstream-service-time: <span class="m">25</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="o">[</span> </span></span><span class="line"><span class="cl"> <span class="o">{</span> </span></span><span class="line"><span class="cl"> ... </span></span><span class="line"><span class="cl"> <span class="s2">"name"</span>: <span class="s2">"tr01"</span>, </span></span><span class="line"><span class="cl"> ... </span></span><span class="line"><span class="cl"> <span class="s2">"uid"</span>: 1, </span></span><span class="line"><span class="cl"> <span class="s2">"version"</span>: <span class="s2">"6.0.16"</span>, </span></span><span class="line"><span class="cl"> <span class="s2">"wait_command"</span>: <span class="nb">true</span> </span></span><span class="line"><span class="cl"> <span class="o">}</span> </span></span><span class="line"><span class="cl"><span class="o">]</span> </span></span></code></pre> </div> <p> In the response body, the <code> uid </code> is the database ID. You can use the database ID to view or update the database using the API. </p> <p> For more information about the fields returned by <a href="/docs/latest/operate/rs/references/rest-api/requests/bdbs/#get-all-bdbs"> GET <code> /v1/bdbs/ </code> </a> , see the <a href="/docs/latest/operate/rs/references/rest-api/objects/bdb/"> <code> bdbs </code> object </a> . </p> <h3 id="put-request"> PUT request </h3> <p> Once you have the database ID, you can use <a href="/docs/latest/operate/rs/references/rest-api/requests/bdbs/#put-bdbs"> PUT <code> /v1/bdbs/ </code> </a> to update the configuration of the database. </p> <p> For example, you can pass the database <code> uid </code> 1 as a URL parameter and use the <code> -d </code> option to specify the new <code> name </code> when you send the request. This changes the database's <code> name </code> from <code> tr01 </code> to <code> database1 </code> : </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ curl -X PUT -H <span class="s2">"accept: application/json"</span> <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span> -H <span class="s2">"content-type: application/json"</span> <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span> -u <span class="s2">"[email protected]:test123"</span> <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span> https://<span class="o">[</span>host<span class="o">]</span>:<span class="o">[</span>port<span class="o">]</span>/v1/bdbs/1 <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span> -d <span class="s1">'{ "name": "database1" }'</span> -k -i </span></span><span class="line"><span class="cl">HTTP/1.1 <span class="m">200</span> OK </span></span><span class="line"><span class="cl">server: envoy </span></span><span class="line"><span class="cl">date: Tue, <span class="m">14</span> Jun <span class="m">2022</span> 20:00:25 GMT </span></span><span class="line"><span class="cl">content-type: application/json </span></span><span class="line"><span class="cl">content-length: <span class="m">2933</span> </span></span><span class="line"><span class="cl">cluster-state-id: <span class="m">43</span> </span></span><span class="line"><span class="cl">x-envoy-upstream-service-time: <span class="m">159</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="o">{</span> </span></span><span class="line"><span class="cl"> ... </span></span><span class="line"><span class="cl"> <span class="s2">"name"</span> : <span class="s2">"database1"</span>, </span></span><span class="line"><span class="cl"> ... </span></span><span class="line"><span class="cl"> <span class="s2">"uid"</span> : 1, </span></span><span class="line"><span class="cl"> <span class="s2">"version"</span> : <span class="s2">"6.0.16"</span>, </span></span><span class="line"><span class="cl"> <span class="s2">"wait_command"</span> : <span class="nb">true</span> </span></span><span class="line"><span class="cl"><span class="o">}</span> </span></span></code></pre> </div> <p> For more information about the fields you can update with <a href="/docs/latest/operate/rs/references/rest-api/requests/bdbs/#put-bdbs"> PUT <code> /v1/bdbs/ </code> </a> , see the <a href="/docs/latest/operate/rs/references/rest-api/objects/bdb/"> <code> bdbs </code> object </a> . </p> <h2 id="client-examples"> Client examples </h2> <p> You can also use client libraries to make API requests in your preferred language. </p> <p> To follow these examples, you need: </p> <ul> <li> A <a href="/docs/latest/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart/"> Redis Enterprise Software </a> node </li> <li> Python 3 and the <a href="https://pypi.org/project/requests/"> requests </a> Python library </li> <li> <a href="https://nodejs.dev/"> node.js </a> and <a href="https://www.npmjs.com/package/node-fetch"> node-fetch </a> </li> </ul> <h3 id="python"> Python </h3> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">json</span> </span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">requests</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># Required connection information - replace with your host, port, username, and password</span> </span></span><span class="line"><span class="cl"><span class="n">host</span> <span class="o">=</span> <span class="s2">"[host]"</span> </span></span><span class="line"><span class="cl"><span class="n">port</span> <span class="o">=</span> <span class="s2">"[port]"</span> </span></span><span class="line"><span class="cl"><span class="n">username</span> <span class="o">=</span> <span class="s2">"[username]"</span> </span></span><span class="line"><span class="cl"><span class="n">password</span> <span class="o">=</span> <span class="s2">"[password]"</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># Get the list of databases using GET /v1/bdbs</span> </span></span><span class="line"><span class="cl"><span class="n">bdbs_uri</span> <span class="o">=</span> <span class="s2">"https://</span><span class="si">{}</span><span class="s2">:</span><span class="si">{}</span><span class="s2">/v1/bdbs"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">host</span><span class="p">,</span> <span class="n">port</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">"GET </span><span class="si">{}</span><span class="s2">"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">bdbs_uri</span><span class="p">))</span> </span></span><span class="line"><span class="cl"><span class="n">get_resp</span> <span class="o">=</span> <span class="n">requests</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">bdbs_uri</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="n">auth</span> <span class="o">=</span> <span class="p">(</span><span class="n">username</span><span class="p">,</span> <span class="n">password</span><span class="p">),</span> </span></span><span class="line"><span class="cl"> <span class="n">headers</span> <span class="o">=</span> <span class="p">{</span> <span class="s2">"accept"</span> <span class="p">:</span> <span class="s2">"application/json"</span> <span class="p">},</span> </span></span><span class="line"><span class="cl"> <span class="n">verify</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">"</span><span class="si">{}</span><span class="s2"> </span><span class="si">{}</span><span class="s2">"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">get_resp</span><span class="o">.</span><span class="n">status_code</span><span class="p">,</span> <span class="n">get_resp</span><span class="o">.</span><span class="n">reason</span><span class="p">))</span> </span></span><span class="line"><span class="cl"><span class="k">for</span> <span class="n">header</span> <span class="ow">in</span> <span class="n">get_resp</span><span class="o">.</span><span class="n">headers</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span> </span></span><span class="line"><span class="cl"> <span class="nb">print</span><span class="p">(</span><span class="s2">"</span><span class="si">{}</span><span class="s2">: </span><span class="si">{}</span><span class="s2">"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">header</span><span class="p">,</span> <span class="n">get_resp</span><span class="o">.</span><span class="n">headers</span><span class="p">[</span><span class="n">header</span><span class="p">]))</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">"</span><span class="se">\n</span><span class="s2">"</span> <span class="o">+</span> <span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">get_resp</span><span class="o">.</span><span class="n">json</span><span class="p">(),</span> <span class="n">indent</span><span class="o">=</span><span class="mi">4</span><span class="p">))</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># Rename all databases using PUT /v1/bdbs</span> </span></span><span class="line"><span class="cl"><span class="k">for</span> <span class="n">bdb</span> <span class="ow">in</span> <span class="n">get_resp</span><span class="o">.</span><span class="n">json</span><span class="p">():</span> </span></span><span class="line"><span class="cl"> <span class="n">uid</span> <span class="o">=</span> <span class="n">bdb</span><span class="p">[</span><span class="s2">"uid"</span><span class="p">]</span> <span class="c1"># Get the database ID from the JSON response</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="n">put_uri</span> <span class="o">=</span> <span class="s2">"</span><span class="si">{}</span><span class="s2">/</span><span class="si">{}</span><span class="s2">"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">bdbs_uri</span><span class="p">,</span> <span class="n">uid</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> <span class="n">new_name</span> <span class="o">=</span> <span class="s2">"database</span><span class="si">{}</span><span class="s2">"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">uid</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> <span class="n">put_data</span> <span class="o">=</span> <span class="p">{</span> <span class="s2">"name"</span> <span class="p">:</span> <span class="n">new_name</span> <span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="nb">print</span><span class="p">(</span><span class="s2">"PUT </span><span class="si">{}</span><span class="s2"> </span><span class="si">{}</span><span class="s2">"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">put_uri</span><span class="p">,</span> <span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">put_data</span><span class="p">)))</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="n">put_resp</span> <span class="o">=</span> <span class="n">requests</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">put_uri</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="n">data</span> <span class="o">=</span> <span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">put_data</span><span class="p">),</span> </span></span><span class="line"><span class="cl"> <span class="n">auth</span> <span class="o">=</span> <span class="p">(</span><span class="n">username</span><span class="p">,</span> <span class="n">password</span><span class="p">),</span> </span></span><span class="line"><span class="cl"> <span class="n">headers</span> <span class="o">=</span> <span class="p">{</span> <span class="s2">"content-type"</span> <span class="p">:</span> <span class="s2">"application/json"</span> <span class="p">},</span> </span></span><span class="line"><span class="cl"> <span class="n">verify</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="nb">print</span><span class="p">(</span><span class="s2">"</span><span class="si">{}</span><span class="s2"> </span><span class="si">{}</span><span class="s2">"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">put_resp</span><span class="o">.</span><span class="n">status_code</span><span class="p">,</span> <span class="n">put_resp</span><span class="o">.</span><span class="n">reason</span><span class="p">))</span> </span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">header</span> <span class="ow">in</span> <span class="n">put_resp</span><span class="o">.</span><span class="n">headers</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span> </span></span><span class="line"><span class="cl"> <span class="nb">print</span><span class="p">(</span><span class="s2">"</span><span class="si">{}</span><span class="s2">: </span><span class="si">{}</span><span class="s2">"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">header</span><span class="p">,</span> <span class="n">put_resp</span><span class="o">.</span><span class="n">headers</span><span class="p">[</span><span class="n">header</span><span class="p">]))</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="nb">print</span><span class="p">(</span><span class="s2">"</span><span class="se">\n</span><span class="s2">"</span> <span class="o">+</span> <span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">put_resp</span><span class="o">.</span><span class="n">json</span><span class="p">(),</span> <span class="n">indent</span><span class="o">=</span><span class="mi">4</span><span class="p">))</span> </span></span></code></pre> </div> <p> See the <a href="https://requests.readthedocs.io/en/latest/"> Python requests library documentation </a> for more information. </p> <h4 id="output"> Output </h4> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ python rs_api.py </span></span><span class="line"><span class="cl">python rs_api.py </span></span><span class="line"><span class="cl">GET https://<span class="o">[</span>host<span class="o">]</span>:<span class="o">[</span>port<span class="o">]</span>/v1/bdbs </span></span><span class="line"><span class="cl">InsecureRequestWarning: Unverified HTTPS request is being made to host <span class="s1">'[host]'</span>. </span></span><span class="line"><span class="cl">Adding certificate verification is strongly advised. </span></span><span class="line"><span class="cl">See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings </span></span><span class="line"><span class="cl"> warnings.warn<span class="o">(</span> </span></span><span class="line"><span class="cl"><span class="m">200</span> OK </span></span><span class="line"><span class="cl">server: envoy </span></span><span class="line"><span class="cl">date: Wed, <span class="m">15</span> Jun <span class="m">2022</span> 15:49:43 GMT </span></span><span class="line"><span class="cl">content-type: application/json </span></span><span class="line"><span class="cl">content-length: <span class="m">2832</span> </span></span><span class="line"><span class="cl">cluster-state-id: <span class="m">89</span> </span></span><span class="line"><span class="cl">x-envoy-upstream-service-time: <span class="m">27</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="o">[</span> </span></span><span class="line"><span class="cl"> <span class="o">{</span> </span></span><span class="line"><span class="cl"> ... </span></span><span class="line"><span class="cl"> <span class="s2">"name"</span>: <span class="s2">"tr01"</span>, </span></span><span class="line"><span class="cl"> ... </span></span><span class="line"><span class="cl"> <span class="s2">"uid"</span>: 1, </span></span><span class="line"><span class="cl"> <span class="s2">"version"</span>: <span class="s2">"6.0.16"</span>, </span></span><span class="line"><span class="cl"> <span class="s2">"wait_command"</span>: <span class="nb">true</span> </span></span><span class="line"><span class="cl"> <span class="o">}</span> </span></span><span class="line"><span class="cl"><span class="o">]</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">PUT https://<span class="o">[</span>host<span class="o">]</span>:<span class="o">[</span>port<span class="o">]</span>/v1/bdbs/1 <span class="o">{</span><span class="s2">"name"</span>: <span class="s2">"database1"</span><span class="o">}</span> </span></span><span class="line"><span class="cl">InsecureRequestWarning: Unverified HTTPS request is being made to host <span class="s1">'[host]'</span>. </span></span><span class="line"><span class="cl">Adding certificate verification is strongly advised. </span></span><span class="line"><span class="cl">See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings </span></span><span class="line"><span class="cl"> warnings.warn<span class="o">(</span> </span></span><span class="line"><span class="cl"><span class="m">200</span> OK </span></span><span class="line"><span class="cl">server: envoy </span></span><span class="line"><span class="cl">date: Wed, <span class="m">15</span> Jun <span class="m">2022</span> 15:49:43 GMT </span></span><span class="line"><span class="cl">content-type: application/json </span></span><span class="line"><span class="cl">content-length: <span class="m">2933</span> </span></span><span class="line"><span class="cl">cluster-state-id: <span class="m">90</span> </span></span><span class="line"><span class="cl">x-envoy-upstream-service-time: <span class="m">128</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="o">{</span> </span></span><span class="line"><span class="cl"> ... </span></span><span class="line"><span class="cl"> <span class="s2">"name"</span> : <span class="s2">"database1"</span>, </span></span><span class="line"><span class="cl"> ... </span></span><span class="line"><span class="cl"> <span class="s2">"uid"</span> : 1, </span></span><span class="line"><span class="cl"> <span class="s2">"version"</span> : <span class="s2">"6.0.16"</span>, </span></span><span class="line"><span class="cl"> <span class="s2">"wait_command"</span> : <span class="nb">true</span> </span></span><span class="line"><span class="cl"><span class="o">}</span> </span></span></code></pre> </div> <h3 id="nodejs"> node.js </h3> <div class="highlight"> <pre class="chroma"><code class="language-js" data-lang="js"><span class="line"><span class="cl"><span class="kr">import</span> <span class="nx">fetch</span><span class="p">,</span> <span class="p">{</span> <span class="nx">Headers</span> <span class="p">}</span> <span class="nx">from</span> <span class="s1">'node-fetch'</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="kr">import</span> <span class="o">*</span> <span class="nx">as</span> <span class="nx">https</span> <span class="nx">from</span> <span class="s1">'https'</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">HOST</span> <span class="o">=</span> <span class="s1">'[host]'</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">PORT</span> <span class="o">=</span> <span class="s1">'[port]'</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">USERNAME</span> <span class="o">=</span> <span class="s1">'[username]'</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">PASSWORD</span> <span class="o">=</span> <span class="s1">'[password]'</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1">// Get the list of databases using GET /v1/bdbs </span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="kr">const</span> <span class="nx">BDBS_URI</span> <span class="o">=</span> <span class="sb">`https://</span><span class="si">${</span><span class="nx">HOST</span><span class="si">}</span><span class="sb">:</span><span class="si">${</span><span class="nx">PORT</span><span class="si">}</span><span class="sb">/v1/bdbs`</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">USER_CREDENTIALS</span> <span class="o">=</span> <span class="nx">Buffer</span><span class="p">.</span><span class="nx">from</span><span class="p">(</span><span class="sb">`</span><span class="si">${</span><span class="nx">USERNAME</span><span class="si">}</span><span class="sb">:</span><span class="si">${</span><span class="nx">PASSWORD</span><span class="si">}</span><span class="sb">`</span><span class="p">).</span><span class="nx">toString</span><span class="p">(</span><span class="s1">'base64'</span><span class="p">);</span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">AUTH_HEADER</span> <span class="o">=</span> <span class="sb">`Basic </span><span class="si">${</span><span class="nx">USER_CREDENTIALS</span><span class="si">}</span><span class="sb">`</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`GET </span><span class="si">${</span><span class="nx">BDBS_URI</span><span class="si">}</span><span class="sb">`</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">HTTPS_AGENT</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">https</span><span class="p">.</span><span class="nx">Agent</span><span class="p">({</span> </span></span><span class="line"><span class="cl"> <span class="nx">rejectUnauthorized</span><span class="o">:</span> <span class="kc">false</span> </span></span><span class="line"><span class="cl"><span class="p">});</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">response</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">fetch</span><span class="p">(</span><span class="nx">BDBS_URI</span><span class="p">,</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nx">method</span><span class="o">:</span> <span class="s1">'GET'</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nx">headers</span><span class="o">:</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="s1">'Accept'</span><span class="o">:</span> <span class="s1">'application/json'</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="s1">'Authorization'</span><span class="o">:</span> <span class="nx">AUTH_HEADER</span> </span></span><span class="line"><span class="cl"> <span class="p">},</span> </span></span><span class="line"><span class="cl"> <span class="nx">agent</span><span class="o">:</span> <span class="nx">HTTPS_AGENT</span> </span></span><span class="line"><span class="cl"><span class="p">});</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">responseObject</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">response</span><span class="p">.</span><span class="nx">json</span><span class="p">();</span> </span></span><span class="line"><span class="cl"><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="si">${</span><span class="nx">response</span><span class="p">.</span><span class="nx">status</span><span class="si">}</span><span class="sb">: </span><span class="si">${</span><span class="nx">response</span><span class="p">.</span><span class="nx">statusText</span><span class="si">}</span><span class="sb">`</span><span class="p">);</span> </span></span><span class="line"><span class="cl"><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">responseObject</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1">// Rename all databases using PUT /v1/bdbs </span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">for</span> <span class="p">(</span><span class="kr">const</span> <span class="nx">database</span> <span class="k">of</span> <span class="nx">responseObject</span><span class="p">)</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="kr">const</span> <span class="nx">DATABASE_URI</span> <span class="o">=</span> <span class="sb">`</span><span class="si">${</span><span class="nx">BDBS_URI</span><span class="si">}</span><span class="sb">/</span><span class="si">${</span><span class="nx">database</span><span class="p">.</span><span class="nx">uid</span><span class="si">}</span><span class="sb">`</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="kr">const</span> <span class="nx">new_name</span> <span class="o">=</span> <span class="sb">`database</span><span class="si">${</span><span class="nx">database</span><span class="p">.</span><span class="nx">uid</span><span class="si">}</span><span class="sb">`</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`PUT </span><span class="si">${</span><span class="nx">DATABASE_URI</span><span class="si">}</span><span class="sb">`</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="kr">const</span> <span class="nx">response</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">fetch</span><span class="p">(</span><span class="nx">DATABASE_URI</span><span class="p">,</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nx">method</span><span class="o">:</span> <span class="s1">'PUT'</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nx">headers</span><span class="o">:</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="s1">'Authorization'</span><span class="o">:</span> <span class="nx">AUTH_HEADER</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="s1">'Content-Type'</span><span class="o">:</span> <span class="s1">'application/json'</span> </span></span><span class="line"><span class="cl"> <span class="p">},</span> </span></span><span class="line"><span class="cl"> <span class="nx">body</span><span class="o">:</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">({</span> </span></span><span class="line"><span class="cl"> <span class="s1">'name'</span><span class="o">:</span> <span class="nx">new_name</span> </span></span><span class="line"><span class="cl"> <span class="p">}),</span> </span></span><span class="line"><span class="cl"> <span class="nx">agent</span><span class="o">:</span> <span class="nx">HTTPS_AGENT</span> </span></span><span class="line"><span class="cl"> <span class="p">});</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="si">${</span><span class="nx">response</span><span class="p">.</span><span class="nx">status</span><span class="si">}</span><span class="sb">: </span><span class="si">${</span><span class="nx">response</span><span class="p">.</span><span class="nx">statusText</span><span class="si">}</span><span class="sb">`</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="kr">await</span><span class="p">(</span><span class="nx">response</span><span class="p">.</span><span class="nx">json</span><span class="p">()));</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <p> See the <a href="https://www.npmjs.com/package/node-fetch"> node-fetch documentation </a> for more info. </p> <h4 id="output-1"> Output </h4> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ node rs_api.js </span></span><span class="line"><span class="cl">GET https://<span class="o">[</span>host<span class="o">]</span>:<span class="o">[</span>port<span class="o">]</span>/v1/bdbs </span></span><span class="line"><span class="cl">200: OK </span></span><span class="line"><span class="cl"><span class="o">[</span> </span></span><span class="line"><span class="cl"> <span class="o">{</span> </span></span><span class="line"><span class="cl"> ... </span></span><span class="line"><span class="cl"> <span class="s2">"name"</span>: <span class="s2">"tr01"</span>, </span></span><span class="line"><span class="cl"> ... </span></span><span class="line"><span class="cl"> <span class="s2">"slave_ha"</span> : false, </span></span><span class="line"><span class="cl"> ... </span></span><span class="line"><span class="cl"> <span class="s2">"uid"</span>: 1, </span></span><span class="line"><span class="cl"> <span class="s2">"version"</span>: <span class="s2">"6.0.16"</span>, </span></span><span class="line"><span class="cl"> <span class="s2">"wait_command"</span>: <span class="nb">true</span> </span></span><span class="line"><span class="cl"> <span class="o">}</span> </span></span><span class="line"><span class="cl"><span class="o">]</span> </span></span><span class="line"><span class="cl">PUT https://<span class="o">[</span>host<span class="o">]</span>:<span class="o">[</span>port<span class="o">]</span>/v1/bdbs/1 </span></span><span class="line"><span class="cl">200: OK </span></span><span class="line"><span class="cl"><span class="o">{</span> </span></span><span class="line"><span class="cl"> ... </span></span><span class="line"><span class="cl"> <span class="s2">"name"</span> : <span class="s2">"tr01"</span>, </span></span><span class="line"><span class="cl"> ... </span></span><span class="line"><span class="cl"> <span class="s2">"slave_ha"</span> : true, </span></span><span class="line"><span class="cl"> ... </span></span><span class="line"><span class="cl"> <span class="s2">"uid"</span> : 1, </span></span><span class="line"><span class="cl"> <span class="s2">"version"</span> : <span class="s2">"6.0.16"</span>, </span></span><span class="line"><span class="cl"> <span class="s2">"wait_command"</span> : <span class="nb">true</span> </span></span><span class="line"><span class="cl"><span class="o">}</span> </span></span></code></pre> </div> <h2 id="more-info"> More info </h2> <ul> <li> <a href="/docs/latest/operate/rs/references/rest-api/"> Redis Enterprise Software REST API </a> </li> <li> <a href="/docs/latest/operate/rs/references/rest-api/requests/"> Redis Enterprise Software REST API requests </a> </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/references/rest-api/quick-start/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/chinese.html
<section class="prose w-full py-12"> <h1> Chinese support </h1> <p class="text-lg -mt-5 mb-10"> Chinese support for searching and querying in Redis Stack </p> <p> Support for adding documents in Chinese is available starting at version 0.99.0. </p> <p> Chinese support allows Chinese documents to be added and tokenized using segmentation rather than simple tokenization using whitespace and/or punctuation. </p> <p> Indexing a Chinese document is different than indexing a document in most other languages because of how tokens are extracted. While most languages can have their tokens distinguished by separation characters and whitespace, this is not common in Chinese. </p> <p> Chinese tokenization is done by scanning the input text and checking every character or sequence of characters against a dictionary of predefined terms, and determining the most likely match based on the surrounding terms and characters. </p> <p> Redis Stack makes use of the <a href="https://github.com/lionsoul2014/friso"> Friso </a> Chinese tokenization library for this purpose. This is largely transparent to the user and often no additional configuration is required. </p> <h2 id="example-using-chinese-in-queries"> Example: using chinese in queries </h2> <p> In pseudo-code: </p> <pre tabindex="0"><code>FT.CREATE idx ON HASH SCHEMA txt TEXT HSET docCn txt "Redis支持主从同步。数据可以从主服务器向任意数量的从服务器上同步,从服务器可以是关联其他从服务器的主服务器。这使得Redis可执行单层树复制。从盘可以有意无意的对数据进行写操作。由于完全实现了发布/订阅机制,使得从数据库在任何地方同步树时,可订阅一个频道并接收主服务器完整的消息发布记录。同步对读取操作的可扩展性和数据冗余很有帮助。[8]" FT.SEARCH idx "数据" LANGUAGE chinese HIGHLIGHT SUMMARIZE # Outputs: # &lt;b&gt;数据&lt;/b&gt;?... &lt;b&gt;数据&lt;/b&gt;进行写操作。由于完全实现了发布... &lt;b&gt;数据&lt;/b&gt;冗余很有帮助。[8... </code></pre> <p> Using the Python client: </p> <pre tabindex="0"><code># -*- coding: utf-8 -*- from redisearch.client import Client, Query from redisearch import TextField client = Client('idx') try: client.drop_index() except: pass client.create_index([TextField('txt')]) # Add a document client.add_document('docCn1', txt='Redis支持主从同步。数据可以从主服务器向任意数量的从服务器上同步从服务器可以是关联其他从服务器的主服务器。这使得Redis可执行单层树复制。从盘可以有意无意的对数据进行写操作。由于完全实现了发布/订阅机制,使得从数据库在任何地方同步树时,可订阅一个频道并接收主服务器完整的消息发布记录。同步对读取操作的可扩展性和数据冗余很有帮助。[8]', language='chinese') print client.search(Query('数据').summarize().highlight().language('chinese')).docs[0].txt # Outputs: # &lt;b&gt;数据&lt;/b&gt;?... &lt;b&gt;数据&lt;/b&gt;进行写操作。由于完全实现了发布... &lt;b&gt;数据&lt;/b&gt;冗余很有帮助。[8... </code></pre> <h2 id="using-custom-dictionaries"> Using custom dictionaries </h2> <p> If you wish to use a custom dictionary, you can do so at the module level when loading the module. The <code> FRISOINI </code> setting can point to the location of a <code> friso.ini </code> file that contains the relevant settings and paths to the dictionary files. </p> <p> Note that there is no default <code> friso.ini </code> file location. RediSearch comes with its own <code> friso.ini </code> and dictionary files, which are compiled into the module binary at build-time. </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/chinese/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/zunionstore/.html
<section class="prose w-full py-12"> <h1 class="command-name"> ZUNIONSTORE </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">ZUNIONSTORE destination numkeys key [key ...] [WEIGHTS weight [weight ...]] [AGGREGATE &lt;SUM | MIN | MAX&gt;]</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 2.0.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(N)+O(M log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set. </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @write </code> <span class="mr-1 last:hidden"> , </span> <code> @sortedset </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Computes the union of <code> numkeys </code> sorted sets given by the specified keys, and stores the result in <code> destination </code> . It is mandatory to provide the number of input keys ( <code> numkeys </code> ) before passing the input keys and the other (optional) arguments. </p> <p> By default, the resulting score of an element is the sum of its scores in the sorted sets where it exists. </p> <p> Using the <code> WEIGHTS </code> option, it is possible to specify a multiplication factor for each input sorted set. This means that the score of every element in every input sorted set is multiplied by this factor before being passed to the aggregation function. When <code> WEIGHTS </code> is not given, the multiplication factors default to <code> 1 </code> . </p> <p> With the <code> AGGREGATE </code> option, it is possible to specify how the results of the union are aggregated. This option defaults to <code> SUM </code> , where the score of an element is summed across the inputs where it exists. When this option is set to either <code> MIN </code> or <code> MAX </code> , the resulting set will contain the minimum or maximum score of an element across the inputs where it exists. </p> <p> If <code> destination </code> already exists, it is overwritten. </p> <h2 id="examples"> Examples </h2> <div class="bg-slate-900 border-b border-slate-700 rounded-t-xl px-4 py-3 w-full flex"> <svg class="shrink-0 h-[1.0625rem] w-[1.0625rem] fill-slate-50" fill="currentColor" viewbox="0 0 20 20"> <path d="M2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10Z"> </path> </svg> <svg class="shrink-0 h-[1.0625rem] w-[1.0625rem] fill-slate-50" fill="currentColor" viewbox="0 0 20 20"> <path d="M10 2.5L18.6603 17.5L1.33975 17.5L10 2.5Z"> </path> </svg> <svg class="shrink-0 h-[1.0625rem] w-[1.0625rem] fill-slate-50" fill="currentColor" viewbox="0 0 20 20"> <path d="M10 2.5L12.0776 7.9322L17.886 8.22949L13.3617 11.8841L14.8738 17.5L10 14.3264L5.1262 17.5L6.63834 11.8841L2.11403 8.22949L7.92238 7.9322L10 2.5Z"> </path> </svg> </div> <form class="redis-cli overflow-y-auto max-h-80"> <pre tabindex="0">redis&gt; ZADD zset1 1 "one" (integer) 1 redis&gt; ZADD zset1 2 "two" (integer) 1 redis&gt; ZADD zset2 1 "one" (integer) 1 redis&gt; ZADD zset2 2 "two" (integer) 1 redis&gt; ZADD zset2 3 "three" (integer) 1 redis&gt; ZUNIONSTORE out 2 zset1 zset2 WEIGHTS 2 3 (integer) 3 redis&gt; ZRANGE out 0 -1 WITHSCORES 1) "one" 2) "5" 3) "three" 4) "9" 5) "two" 6) "10" </pre> <div class="prompt" style=""> <span> redis&gt; </span> <input autocomplete="off" name="prompt" spellcheck="false" type="text"/> </div> </form> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : the number of elements in the resulting sorted set. <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/zunionstore/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/bf.mexists.html
<section class="prose w-full py-12"> <h1 class="command-name"> BF.MEXISTS </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">BF.MEXISTS key item [item ...]</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available in: </dt> <dd class="m-0"> <a href="/docs/stack"> Redis Stack </a> / <a href="/docs/data-types/probabilistic"> Bloom 1.0.0 </a> </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(k * n), where k is the number of hash functions and n is the number of items </dd> </dl> <p> Determines whether one or more items were added to a Bloom filter. </p> <p> This command is similar to <a href="/docs/latest/commands/bf.exists/"> <code> BF.EXISTS </code> </a> , except that more than one item can be checked. </p> <h2 id="required-arguments"> Required arguments </h2> <details open=""> <summary> <code> key </code> </summary> <p> is key name for a Bloom filter. </p> </details> <details open=""> <summary> <code> item... </code> </summary> <p> One or more items to check. </p> </details> <h2 id="return-value"> Return value </h2> <p> Returns one of these replies: </p> <ul> <li> <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> of <a href="/docs/latest/develop/reference/protocol-spec/#integers"> Integer reply </a> - where "1" means that, with high probability, <code> item </code> was already added to the filter, and "0" means that <code> key </code> does not exist or that <code> item </code> was definitely not added to the filter. </li> <li> [] on error (invalid arguments, wrong key type, etc.) </li> </ul> <h2 id="examples"> Examples </h2> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">redis&gt; BF.MADD bf item1 item2 </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1</span> </span></span><span class="line"><span class="cl">redis&gt; BF.MEXISTS bf item1 item2 item3 </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1</span> </span></span><span class="line"><span class="cl">3<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">0</span></span></span></code></pre> </div> <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/bf.mexists/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/networking/.html
<section class="prose w-full py-12 max-w-none"> <h1> Manage networks </h1> <p class="text-lg -mt-5 mb-10"> Networking features and considerations for designing your Redis Enterprise Software deployment. </p> <nav> <a href="/docs/latest/operate/rs/networking/configuring-aws-route53-dns-redis-enterprise/"> AWS Route53 DNS management </a> <p> How to configure AWS Route 53 DNS </p> <a href="/docs/latest/operate/rs/7.4/networking/cluster-lba-setup/"> Set up a Redis Enterprise cluster behind a load balancer </a> <p> Set up a Redis Enterprise cluster using a load balancer instead of DNS to direct traffic to cluster nodes. </p> <a href="/docs/latest/operate/rs/7.4/networking/cluster-dns/"> Configure cluster DNS </a> <p> Configure DNS to communicate between nodes in your cluster. </p> <a href="/docs/latest/operate/rs/networking/multi-ip-ipv6/"> Manage IP addresses </a> <p> Information and requirements for using multiple IP addresses or IPv6 addresses with Redis Enterprise Software. </p> <a href="/docs/latest/operate/rs/7.4/networking/mdns/"> Client prerequisites for mDNS </a> <p> Requirements for using the mDNS protocol in development and testing environments. </p> <a href="/docs/latest/operate/rs/7.4/networking/port-configurations/"> Network port configurations </a> <p> This document describes the various network port ranges and their uses. </p> <a href="/docs/latest/operate/rs/7.4/networking/private-public-endpoints/"> Enable private and public database endpoints </a> <p> Describes how to enable public and private endpoints for databases on a cluster. </p> </nav> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/networking/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/db-conns-auditing-config/.html
<section class="prose w-full py-12 max-w-none"> <h1> Database connection auditing configuration object </h1> <p class="text-lg -mt-5 mb-10"> An object for database connection auditing settings </p> <p> Database connection auditing configuration </p> <table> <thead> <tr> <th> Name </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> audit_address </td> <td> string </td> <td> TCP/IP address where one can listen for notifications. </td> </tr> <tr> <td> audit_port </td> <td> integer </td> <td> Port where one can listen for notifications. </td> </tr> <tr> <td> audit_protocol </td> <td> <code> TCP </code> <br/> <code> local </code> </td> <td> Protocol used to process notifications. For production systems, <code> TCP </code> is the only valid value. </td> </tr> <tr> <td> audit_reconnect_interval </td> <td> integer </td> <td> Interval (in seconds) between attempts to reconnect to the listener. Default is 1 second. </td> </tr> <tr> <td> audit_reconnect_max_attempts </td> <td> integer </td> <td> Maximum number of attempts to reconnect. Default is 0 (infinite). </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/db-conns-auditing-config/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/databases/durability-ha/db-availability/.html
<section class="prose w-full py-12 max-w-none"> <h1> Check database availability </h1> <p class="text-lg -mt-5 mb-10"> Verify if a Redis Software database is available to perform read and write operations and can respond to queries from client applications. </p> <p> You can use the <a href="/docs/latest/operate/rs/references/rest-api/requests/bdbs/availability/"> database availability API </a> to verify whether a Redis Software database is available to perform read and write operations and can respond to queries from client applications. Load balancers and automated monitoring tools can use this API to monitor database availability. </p> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> Database availability does not guarantee data availability. </div> </div> <h2 id="check-database-availability-for-monitoring"> Check database availability for monitoring </h2> <p> To monitor database availability, use the following REST API request: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /v1/bdbs/&lt;database_id&gt;/availability </span></span></code></pre> </div> <p> If the OSS Cluster API is enabled, this request verifies all endpoints for this database are available. Otherwise, it verifies the database has at least one available endpoint. </p> <p> Returns the status code 200 OK if the database is available. </p> <p> If the database is unavailable, returns an error status code and a JSON object that contains <a href="/docs/latest/operate/rs/references/rest-api/requests/bdbs/availability/#get-db-error-codes"> <code> error_code </code> and <code> description </code> fields </a> . </p> <h2 id="check-local-database-endpoint-availability-for-load-balancers"> Check local database endpoint availability for load balancers </h2> <p> To check database availability when using a load balancer and the recommended <code> all-nodes </code> proxy policy, use the local database endpoints for each node: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /v1/local/bdbs/&lt;database_id&gt;/endpoint/availability </span></span></code></pre> </div> <p> Returns the status code 200 OK if the local database endpoint is available. </p> <p> If the local database endpoint is unavailable, returns an error status code and a JSON object that contains <a href="/docs/latest/operate/rs/references/rest-api/requests/bdbs/availability/#get-endpoint-error-codes"> <code> error_code </code> and <code> description </code> fields </a> . </p> <h2 id="availability-by-database-status"> Availability by database status </h2> <p> The following table shows the relationship between a database's status and availability. For more details about the database status values, see <a href="/docs/latest/operate/rs/references/rest-api/objects/bdb/status/"> BDB status field </a> . </p> <table> <thead> <tr> <th> Database status </th> <th> Availability </th> </tr> </thead> <tbody> <tr> <td> active </td> <td> <span title="Available"> ✅ </span> Available </td> </tr> <tr> <td> active-change-pending </td> <td> <span title="Available"> ✅ </span> Available </td> </tr> <tr> <td> creation-failed </td> <td> <span title="Not available"> ❌ </span> Not available </td> </tr> <tr> <td> delete-pending </td> <td> <span class="font-serif" title="Availability not guaranteed"> ⚠️ </span> Availability not guaranteed </td> </tr> <tr> <td> import-pending </td> <td> <span title="Available"> ✅ </span> Available </td> </tr> <tr> <td> pending </td> <td> <span title="Available"> ✅ </span> Available </td> </tr> <tr> <td> recovery </td> <td> <span title="Not available"> ❌ </span> Not available </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/databases/durability-ha/db-availability/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/hstrlen/.html
<section class="prose w-full py-12"> <h1 class="command-name"> HSTRLEN </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">HSTRLEN key field</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 3.2.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(1) </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @read </code> <span class="mr-1 last:hidden"> , </span> <code> @hash </code> <span class="mr-1 last:hidden"> , </span> <code> @fast </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Returns the string length of the value associated with <code> field </code> in the hash stored at <code> key </code> . If the <code> key </code> or the <code> field </code> do not exist, 0 is returned. </p> <h2 id="examples"> Examples </h2> <div class="bg-slate-900 border-b border-slate-700 rounded-t-xl px-4 py-3 w-full flex"> <svg class="shrink-0 h-[1.0625rem] w-[1.0625rem] fill-slate-50" fill="currentColor" viewbox="0 0 20 20"> <path d="M2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10Z"> </path> </svg> <svg class="shrink-0 h-[1.0625rem] w-[1.0625rem] fill-slate-50" fill="currentColor" viewbox="0 0 20 20"> <path d="M10 2.5L18.6603 17.5L1.33975 17.5L10 2.5Z"> </path> </svg> <svg class="shrink-0 h-[1.0625rem] w-[1.0625rem] fill-slate-50" fill="currentColor" viewbox="0 0 20 20"> <path d="M10 2.5L12.0776 7.9322L17.886 8.22949L13.3617 11.8841L14.8738 17.5L10 14.3264L5.1262 17.5L6.63834 11.8841L2.11403 8.22949L7.92238 7.9322L10 2.5Z"> </path> </svg> </div> <form class="redis-cli overflow-y-auto max-h-80"> <pre tabindex="0">redis&gt; HSET myhash f1 HelloWorld f2 99 f3 -256 (integer) 3 redis&gt; HSTRLEN myhash f1 (integer) 10 redis&gt; HSTRLEN myhash f2 (integer) 2 redis&gt; HSTRLEN myhash f3 (integer) 4 </pre> <div class="prompt" style=""> <span> redis&gt; </span> <input autocomplete="off" name="prompt" spellcheck="false" type="text"/> </div> </form> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : the string length of the value associated with the <em> field </em> , or zero when the <em> field </em> isn't present in the hash or the <em> key </em> doesn't exist at all. <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/hstrlen/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/release-notes/rs-6-0-may-2020/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise Software Release Notes 6.0 (May 2020) </h1> <p class="text-lg -mt-5 mb-10"> ACL and RBAC improvements for database access. Active-Active databases support Redis Streams. </p> <p> <a href="https://redislabs.com/download-center/#downloads"> Redis Enterprise Software (RS) 6.0 </a> is now available! This new version bundles open-source Redis 6, implements enhanced Access Control List (ACL) capabilities using Role-Based Access Control (RBAC) for database access, and adds the support of Redis Streams on Active-Active databases. </p> <h2 id="version-information"> Version information </h2> <h3 id="upgrade-instructions"> Upgrade instructions </h3> <p> Follow <a href="/docs/latest/operate/rs/installing-upgrading/upgrading/"> these instructions </a> for upgrading to RS 6.0 from RS 5.4.0 and above. For Active-Active deployments, this release requires that you <a href="/docs/latest/operate/rs/installing-upgrading/upgrading/upgrade-active-active/"> upgrade the CRDB featureset version </a> . </p> <h3 id="end-of-life"> End of life </h3> <p> End of Life (EOL) for Redis Enterprise Software 6.0 and previous RS versions, can be found <a href="/docs/latest/operate/rs/installing-upgrading/product-lifecycle/"> here </a> . EOL for Redis Modules can be found <a href="/docs/latest/operate/rs/installing-upgrading/product-lifecycle/"> here </a> . </p> <ul> <li> Support for Red Hat Enterprise Linux 6 and Oracle Linux 6 <a href="/docs/latest/operate/rs/installing-upgrading/install/plan-deployment/supported-platforms/"> operating systems platforms </a> will end on November 30, 2020. </li> <li> Support for Ubuntu 14.04 (Trusty Tahr) <a href="/docs/latest/operate/rs/installing-upgrading/install/plan-deployment/supported-platforms/"> operating systems platforms </a> will end on November 30, 2020. </li> </ul> <h2 id="new-features"> New features </h2> <h3 id="open-source-redis-6"> Open source Redis 6 </h3> <p> RS 6.0 bundles latest open source Redis 6. For more information, check out the <a href="https://redislabs.com/blog/diving-into-redis-6/"> Diving into Redis 6 </a> article. </p> <h3 id="access-control-list-acl"> Access control list (ACL) </h3> <p> Based on OSS Redis 6, RS 6.0 offers the ability to manage and control connections to your databases using users and their data access permissions in terms of commands they can execute and keys they can access. </p> <p> In OSS Redis, the ACLs are managed separately per user for each database. In Redis Enterprise Software, Redis ACLs are managed for the databases at the cluster. For more information, check out the <a href="/docs/latest/operate/rs/security/access-control/create-db-roles/"> Redis Enterprise Software user management documentation </a> . </p> <h3 id="role-based-access-control-rbac"> Role-based access control (RBAC) </h3> <p> RS 6.0 leverages Redis ACLs to implement role-based access control that easily scale and manage data access permissions. Using roles minimizes the overhead involved in managing a cluster with many databases, multiple users, and various access control lists. For more information, check out the <a href="/docs/latest/operate/rs/security/access-control/"> Redis Enterprise Software user management documentation </a> . </p> <h3 id="active-active-support-for-redis-streams"> Active-Active support for Redis Streams </h3> <p> RS 6.0 adds support for Redis streams on Active-Active geo-distributed databases using conflict-free replicated data type (CRDT). You can now use all Redis streams commands including consumer groups on Active-Active databases. To enable it, <a href="/docs/latest/operate/rs/installing-upgrading/upgrading/upgrade-active-active/"> upgrade your Active-Active database </a> featureset version to the latest (featureset version = 2) as part of the upgrade process. For more information, check out <a href="/docs/latest/operate/rs/databases/active-active/develop/data-types/strings/"> Redis Streams on Active Active databases </a> . </p> <h2 id="redis-modules"> Redis modules </h2> <p> The following GA releases of Redis Modules are bundled in RS 6.0: </p> <ul> <li> <a href="https://redislabs.com/redis-enterprise/redis-bloom/"> RedisBloom </a> , version <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisbloom/redisbloom-2.2-release-notes/"> 2.2.2 </a> (updated) </li> <li> <a href="https://redislabs.com/redis-enterprise/redis-graph/"> RedisGraph </a> , version <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisgraph/redisgraph-2.0-release-notes/"> 2.0.11 </a> (updated) </li> <li> <a href="https://redislabs.com/redis-enterprise/redis-json/"> RedisJson </a> , version <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisjson/redisjson-1.0-release-notes/"> 1.0.4 </a> </li> <li> <a href="https://redislabs.com/redis-enterprise/redis-search/"> RediSearch </a> , version <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-1.6-release-notes/"> 1.6.12 </a> (updated) </li> <li> <a href="https://redislabs.com/redis-enterprise/redis-time-series/"> RedisTimeSeries </a> , version <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redistimeseries/redistimeseries-1.2-release-notes/"> 1.2.5 </a> (updated) </li> </ul> <p> To use the updated modules with a database, you must <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module/"> upgrade the module on the database </a> . </p> <h2 id="additional-capabilities"> Additional capabilities </h2> <ul> <li> <p> Added the ability to configure a storage service that uses the S3 protocol. Configuration for <a href="/docs/latest/operate/rs/databases/import-export/schedule-backups/"> backup location </a> and for <a href="/docs/latest/operate/rs/databases/import-export/import-data/"> import </a> and <a href="/docs/latest/operate/rs/databases/import-export/export-data/"> export </a> locations of <a href="/docs/latest/operate/rs/databases/configure/database-persistence/"> RDB files </a> is possible. The storage service must have a valid SSL certificate. To connect to an S3-compatible storage location, run: <code> rladmin cluster config s3_url &lt;url&gt; </code> </p> </li> <li> <p> The crdb-cli tool was updated so it is now displaying the Active-Active database’s featureset version and the protocol version per instance. For example: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ crdb-cli crdb list --verbose </span></span><span class="line"><span class="cl">CRDB-GUID NAME REPL-ID PROTOCOL FEATURESET DB-ID CLUSTER-FQDN </span></span><span class="line"><span class="cl">969122be-... loremipsum1 1 <span class="m">0</span> 0 bdb:1 cluster1.local </span></span><span class="line"><span class="cl">969122be-... loremipsum1 2 <span class="m">0</span> 0 bdb:1 cluster2.local </span></span></code></pre> </div> </li> <li> <p> Added REST API and rladmin commands to modify the timeout for <a href="/docs/latest/operate/rs/security/access-control/manage-users/login-lockout/#session-timeout"> automatically disconnecting an inactive admin console session </a> . </p> <ul> <li> <p> Using the rladmin run: <code> rladmin cluster config cm_session_timeout_minutes &lt;int_value&gt; </code> </p> </li> <li> <p> Using the REST API: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">curl --request PUT <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span>--url https://localhost:9443/v1/cluster <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span>--header <span class="s1">'content-type: application/json'</span> <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span>--data <span class="s1">'{ </span></span></span><span class="line"><span class="cl"><span class="s1"> "cm_session_timeout_minutes": 10 </span></span></span><span class="line"><span class="cl"><span class="s1">}'</span> </span></span></code></pre> </div> </li> </ul> </li> <li> <p> Added <code> no_of_expires </code> metrics for database metrics and for shard metrics. You can access this metric from the REST API: </p> <ul> <li> <code> no_of_expires </code> shows the current number of volatile keys in the database. </li> <li> <code> expired_objects </code> shows the rate of keys expired in DB (expirations/sec). </li> </ul> </li> <li> <p> Added the ability to customize the welcome message on the login page in the admin console console. </p> </li> </ul> <h2 id="important-fixes"> Important fixes </h2> <ul> <li> RS39121, RS35335 - Optimized the XREAD and XREADGROUP commands so when using them in a non blocking fashion (without BLOCK keyword) they use the shared connection instead of a dedicated connection. </li> <li> RS26448 - Fixed ‘ram overhead’ metric calculation for ROF databases using AOF. </li> <li> RS31190 - Fixed a bug that causes databases with OSS Cluster API enabled to override the ‘preferred IP type’ attribute from ‘external’ to ‘internal’ (the default value). </li> <li> RS34009 - Updated the modules loading procedure for clusters with FIPS compliance enabled. </li> <li> RS38233 - Improved the Redis cleanup job handling the persistent directory </li> <li> RS39228 - Fixed a bug in the WAIT command that in some cases was released after a longer period than requested. </li> <li> RS39749 - Fixed a bug that blocked eviction while LUA scripts were in progress. </li> <li> RS43996 - Fixed a bug when aborting an upgrade to RS 6.0. </li> </ul> <h2 id="known-limitations"> Known limitations </h2> <p> -RS81463 - A shard may crash when resharding an Active-Active database with Auto Tiering . Specifically, the shard will crash when volatile keys or Active-Active tombstone keys reside in Flash memory. </p> <h3 id="active-active-databases"> Active-Active databases </h3> <ul> <li> RS51359 - Active-Active databases, using replication and Append Only File (AOF) for <a href="/docs/latest/operate/rs/databases/configure/database-persistence/"> database persistence </a> , are suffering from memory leaks on replica shards, causing them to grow bigger than the master shards. Customers are advised to upgrade to RS 6.0.12 <em> <strong> TBD </strong> </em> . Meanwhile you can use snapshots for database persistence or restart the replica shards <em> <strong> TBD </strong> </em> . </li> </ul> <h3 id="installation-limitations"> Installation limitations </h3> <p> Several Redis Enterprise Software installation reference files are installed to the directory <code> /etc/opt/redislabs/ </code> even if you use <a href="/docs/latest/operate/rs/installing-upgrading/install/customize-install-directories/"> custom installation directories </a> . </p> <p> As a workaround to install Redis Enterprise Software without using any root directories, do the following before installing Redis Enterprise Software: </p> <ol> <li> <p> Create all custom, non-root directories you want to use with Redis Enterprise Software. </p> </li> <li> <p> Mount <code> /etc/opt/redislabs </code> to one of the custom, non-root directories. </p> </li> </ol> <h3 id="upgrade"> Upgrade </h3> <ul> <li> RS 5.4.2 introduced new Active-Active Redis Database capabilities that improve its compatibility with open source Redis. Now the string data-type in Active-Active Redis Database is implicitly and dynamically typed, just like open source Redis. To use the new capabilities on nodes that are upgraded from version RS 5.4.2 or lower, you must upgrade the Active-Active Redis Database protocol. </li> <li> When you upgrade an Active-Active Redis with active AOF from version RS 5.4.2 or lower to version RS 5.4.4 or higher: <ul> <li> If replication is enabled, you must run the BGREWRITEAOF command on all replica shards after the upgrade. </li> <li> If replication is not enabled, you must run the BGREWRITEAOF command on all shards after the upgrade. </li> </ul> </li> <li> Starting from RS 5.4.2, to preserve the current Redis major.minor version during database upgrade you must use the keep_redis_version option instead of keep_current_version. </li> <li> Dynatrace agent installed on the cluster nodes can hamper the working on Envoy process leading to failure of UI and REST API. Prior upgrading we recommend removing Dynatrace completely or try upgrading to newer versions. </li> </ul> <h3 id="redis-commands"> Redis commands </h3> <ul> <li> The capability of disabling specific Redis commands does not work on commands specific to Redis Modules. </li> <li> Starting from RS 5.4.2 and after you upgrade an Active-Active database, TYPE commands for string data-type in Active-Active databases return "string" (OSS Redis standard). </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/release-notes/rs-6-0-may-2020/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/develop/reference/command-arguments/.html
<section class="prose w-full py-12"> <h1> Redis command arguments </h1> <p class="text-lg -mt-5 mb-10"> How Redis commands expose their documentation programmatically </p> <p> The <a href="/docs/latest/commands/command-docs/"> <code> COMMAND DOCS </code> </a> 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'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's name, always present. The name of an argument is given for identification purposes alone. It isn't displayed during the command'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' 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's display string, present in arguments that have a displayable representation (all arguments that aren't oneof/block). This is the string used in the command's syntax rendering. </li> <li> <strong> type: </strong> the argument'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 <a href="/docs/latest/commands/xadd/"> <code> XADD </code> </a> 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 <a href="/docs/latest/commands/xadd/"> <code> XADD </code> </a> 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's <a href="/develop/reference/key-specs.md"> 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 <a href="/docs/latest/commands/set/"> <code> SET </code> </a> command). </li> <li> <strong> multiple </strong> : denotes that the argument may be repeated (such as the <em> key </em> argument of <a href="/docs/latest/commands/del/"> <code> DEL </code> </a> ). </li> <li> <strong> multiple-token: </strong> denotes the possible repetition of the argument with its preceding token (see <a href="/docs/latest/commands/sort/"> <code> SORT </code> </a> 's <code> GET pattern </code> clause). </li> </ul> </li> <li> <strong> value: </strong> the argument'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'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 </h2> <p> The trimming clause of <a href="/docs/latest/commands/xadd/"> <code> XADD </code> </a> , i.e., <code> [MAXLEN|MINID [=|~] threshold [LIMIT count]] </code> , is represented at the top-level as <em> block </em> -typed argument. </p> <p> It consists of four nested arguments: </p> <ol> <li> <strong> trimming strategy: </strong> this nested argument has an <em> oneof </em> type with two nested arguments. Each of the nested arguments, <em> MAXLEN </em> and <em> MINID </em> , is typed as <em> pure-token </em> . </li> <li> <strong> trimming operator: </strong> this nested argument is an optional <em> oneof </em> type with two nested arguments. Each of the nested arguments, <em> = </em> and <em> ~ </em> , is a <em> pure-token </em> . </li> <li> <strong> threshold: </strong> this nested argument is a <em> string </em> . </li> <li> <strong> count: </strong> this nested argument is an optional <em> integer </em> with a <em> token </em> ( <em> LIMIT </em> ). </li> </ol> <p> Here's <a href="/docs/latest/commands/xadd/"> <code> XADD </code> </a> 's arguments array: </p> <pre tabindex="0"><code>1) 1) "name" 2) "key" 3) "type" 4) "key" 5) "value" 6) "key" 2) 1) "name" 2) "nomkstream" 3) "type" 4) "pure-token" 5) "token" 6) "NOMKSTREAM" 7) "since" 8) "6.2" 9) "flags" 10) 1) optional 3) 1) "name" 2) "trim" 3) "type" 4) "block" 5) "flags" 6) 1) optional 7) "value" 8) 1) 1) "name" 2) "strategy" 3) "type" 4) "oneof" 5) "value" 6) 1) 1) "name" 2) "maxlen" 3) "type" 4) "pure-token" 5) "token" 6) "MAXLEN" 2) 1) "name" 2) "minid" 3) "type" 4) "pure-token" 5) "token" 6) "MINID" 7) "since" 8) "6.2" 2) 1) "name" 2) "operator" 3) "type" 4) "oneof" 5) "flags" 6) 1) optional 7) "value" 8) 1) 1) "name" 2) "equal" 3) "type" 4) "pure-token" 5) "token" 6) "=" 2) 1) "name" 2) "approximately" 3) "type" 4) "pure-token" 5) "token" 6) "~" 3) 1) "name" 2) "threshold" 3) "type" 4) "string" 5) "value" 6) "threshold" 4) 1) "name" 2) "count" 3) "type" 4) "integer" 5) "token" 6) "LIMIT" 7) "since" 8) "6.2" 9) "flags" 10) 1) optional 11) "value" 12) "count" 4) 1) "name" 2) "id_or_auto" 3) "type" 4) "oneof" 5) "value" 6) 1) 1) "name" 2) "auto_id" 3) "type" 4) "pure-token" 5) "token" 6) "*" 2) 1) "name" 2) "id" 3) "type" 4) "string" 5) "value" 6) "id" 5) 1) "name" 2) "field_value" 3) "type" 4) "block" 5) "flags" 6) 1) multiple 7) "value" 8) 1) 1) "name" 2) "field" 3) "type" 4) "string" 5) "value" 6) "field" 2) 1) "name" 2) "value" 3) "type" 4) "string" 5) "value" 6) "value" </code></pre> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/develop/reference/command-arguments/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/clusters/logging/redis-slow-log/.html
<section class="prose w-full py-12 max-w-none"> <h1> View Redis slow log </h1> <p> On the <strong> Databases </strong> &gt; <strong> Slowlog </strong> page, you can view Slow Log details for Redis Enterprise Software databases. </p> <p> <a href="http://redis.io/commands/slowlog"> Redis Slow Log </a> is one of the best tools for debugging and tracing your Redis database, especially if you experience high latency and high CPU usage with Redis operations. Because Redis is based on a single threaded architecture, Redis Slow Log can be much more useful than slow log mechanisms of multi-threaded database systems such as MySQL Slow Query Log. </p> <p> Unlike tools that introduce lock overhead (which complicates the debugging process), Redis Slow Log is highly effective at showing the actual processing time of each command. </p> <p> Redis Enterprise Software includes enhancements to the standard Redis Slow Log capabilities that allow you to analyze the execution time complexity of each command. This enhancement can help you better analyze Redis operations, allowing you to compare the differences between execution times of the same command, observe spikes in CPU usage, and more. </p> <p> This is especially useful with complex commands such as <a href="http://redis.io/commands/zunionstore"> ZUNIONSTORE </a> , <a href="http://redis.io/commands/zinterstore"> ZINTERSTORE </a> and <a href="http://redis.io/commands/zrangebyscore"> ZRANGEBYSCORE </a> . </p> <p> The enhanced Redis Enterprise Software Slow Log adds the <strong> Complexity info </strong> field to the output data. </p> <p> View the complexity info data by its respective command in the table below: </p> <table> <thead> <tr> <th> Command </th> <th> Value of interest </th> <th> Complexity </th> </tr> </thead> <tbody> <tr> <td> LINSERT </td> <td> N - list len </td> <td> O(N) </td> </tr> <tr> <td> LREM </td> <td> N - list len </td> <td> O(N) </td> </tr> <tr> <td> LTRIM </td> <td> N - number of removed elements </td> <td> O(N) </td> </tr> <tr> <td> PUBLISH </td> <td> N - number of channel subscribers <br/> M - number of subscribed patterns </td> <td> O(N+M) </td> </tr> <tr> <td> PSUBSCRIBE </td> <td> N - number of patterns client is subscribed to <br/> argc - number of arguments passed to the command </td> <td> O(argc*N) </td> </tr> <tr> <td> PUNSUBSCRIBE </td> <td> N - number of patterns client is subscribed to <br/> M - total number of subscribed patterns <br/> argc - number of arguments passed to the command </td> <td> O(argc*(N+M)) </td> </tr> <tr> <td> SDIFF </td> <td> N - total number of elements in all sets </td> <td> O(N) </td> </tr> <tr> <td> SDIFFSTORE </td> <td> N - total number of elements in all sets </td> <td> O(N) </td> </tr> <tr> <td> SINTER </td> <td> N - number of elements in smallest set <br/> argc - number of arguments passed to the command </td> <td> O(argc*N) </td> </tr> <tr> <td> SINTERSTORE </td> <td> N - number of elements in smallest set <br/> argc - number of arguments passed to the command </td> <td> O(argc*N) </td> </tr> <tr> <td> SMEMBERS </td> <td> N - number of elements in a set </td> <td> O(N) </td> </tr> <tr> <td> SORT </td> <td> N - number of elements in the when no sorting list/set/zset <br/> M - number of elements in result </td> <td> O(N+M*log(M))O(N) </td> </tr> <tr> <td> SUNION </td> <td> N - number of elements in all sets </td> <td> O(N) </td> </tr> <tr> <td> SUNIONSTORE </td> <td> N - number of elements in all sets </td> <td> O(N) </td> </tr> <tr> <td> UNSUBSCRIBE </td> <td> N - total number of clients subscribed to all channels </td> <td> O(N) </td> </tr> <tr> <td> ZADD </td> <td> N - number of elements in the zset </td> <td> O(log(N)) </td> </tr> <tr> <td> ZCOUNT </td> <td> N - number of elements in the zset <br/> M - number of elements between min and max </td> <td> O(log(N)+M) </td> </tr> <tr> <td> ZINCRBY </td> <td> N - number of elements in the zset </td> <td> O(log(N)) </td> </tr> <tr> <td> ZINTERSTORE </td> <td> N – number of elements in the smallest zset <br/> K – number of zsets <br/> M – number of elements in the results set </td> <td> O(N*K)+O(M*log(M)) </td> </tr> <tr> <td> ZRANGE </td> <td> N – number of elements in the zset <br/> M – number of results </td> <td> O(log(N)+M) </td> </tr> <tr> <td> ZRANGEBYSCORE </td> <td> N – number of elements in the zset <br/> M – number of results </td> <td> O(log(N)+M) </td> </tr> <tr> <td> ZRANK </td> <td> N – number of elements in the zset </td> <td> O(log(N)) </td> </tr> <tr> <td> ZREM </td> <td> N – number of elements in the zset <br/> argc – number of arguments passed to the command </td> <td> O(argc*log(N)) </td> </tr> <tr> <td> ZREMRANGEBYRANK </td> <td> N – number of elements in the zset <br/> argc – number of arguments passed to the command </td> <td> O(log(N)+M) </td> </tr> <tr> <td> ZREMRANGEBYSCORE </td> <td> N – number of elements in the zset <br/> M – number of elements removed </td> <td> O(log(N)+M) </td> </tr> <tr> <td> ZREVRANGE </td> <td> N – number of elements in the zset <br/> M – number of results </td> <td> O(log(N)+M) </td> </tr> <tr> <td> ZREVRANK </td> <td> N – number of elements in the zset </td> <td> O(log(N)) </td> </tr> <tr> <td> ZUNIONSTORE </td> <td> N – sum of element counts of all zsets <br/> M – element count of result </td> <td> O(N)+O(M*log(M)) </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/clusters/logging/redis-slow-log/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/release-notes/rs-6-4-2-releases/rs-6-4-2-103/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise Software release notes 6.4.2-103 (October 2023) </h1> <p class="text-lg -mt-5 mb-10"> RHEL 8.8 support. RediSearch v2.6.12. RedisGraph v2.10.12. RedisTimeSeries v1.8.11 Log when CCS schema changes. Bug fixes. </p> <p> This is a maintenance release for ​ <a href="https://redis.com/redis-enterprise-software/download-center/software/"> ​Redis Enterprise Software version 6.4.2 </a> . </p> <h2 id="highlights"> Highlights </h2> <p> This version offers: </p> <ul> <li> <p> RHEL 8.8 support </p> </li> <li> <p> RediSearch v2.6.12, RedisGraph v2.10.12, and RedisTimeSeries v1.8.11 </p> </li> <li> <p> Log when CCS schema changes </p> </li> <li> <p> Bug fixes </p> </li> </ul> <h2 id="new-in-this-release"> New in this release </h2> <h3 id="enhancements"> Enhancements </h3> <ul> <li> <p> RHEL 8.8 support </p> </li> <li> <p> Log when CCS schema changes due to schema upgrade </p> </li> </ul> <h4 id="redis-modules"> Redis modules </h4> <p> Redis Enterprise Software version 6.4.2-103 includes the following Redis Stack modules: </p> <ul> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-2.6-release-notes"> RediSearch v2.6.12 </a> </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisjson/redisjson-2.4-release-notes"> RedisJSON v2.4.7 </a> </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisbloom/redisbloom-2.4-release-notes"> RedisBloom v2.4.5 </a> </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisgraph/redisgraph-2.10-release-notes"> RedisGraph v2.10.12 </a> </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redistimeseries/redistimeseries-1.8-release-notes"> RedisTimeSeries v1.8.11 </a> </p> </li> </ul> <h3 id="resolved-issues"> Resolved issues </h3> <ul> <li> <p> RS109744 - Fixed an issue where node removal sometimes got stuck in a <code> starting </code> state when <code> wait_for_persistence </code> was enabled. </p> </li> <li> <p> RS76441 - For databases created before Redis Enterprise Software v6.0.20, <code> crdt_syncer_auto_oom_unlatch </code> was <code> EMPTY </code> and <code> disabled </code> by default. <code> crdt_syncer_auto_oom_unlatch </code> is now enabled by default for new databases. </p> </li> </ul> <h2 id="version-changes"> Version changes </h2> <h3 id="supported-platforms"> Supported platforms </h3> <p> The following table provides a snapshot of supported platforms as of this Redis Enterprise Software release. See the <a href="/docs/latest/operate/rs/references/supported-platforms/"> supported platforms reference </a> for more details about operating system compatibility. </p> <p> <span title="Check mark icon"> ✅ </span> Supported – The platform is supported for this version of Redis Enterprise Software. </p> <p> <span title="Warning icon"> ⚠️ </span> Deprecated – The platform is still supported for this version of Redis Enterprise Software, but support will be removed in a future release. </p> <p> <span title="X icon"> ❌ </span> End of life – Platform support ended in this version of Redis Enterprise Software. </p> <table> <thead> <tr> <th> Redis Enterprise </th> <th> 7.2.4 </th> <th> 6.4.2 </th> <th> 6.2.18 </th> <th> 6.2.12 </th> <th> 6.2.10 </th> <th> 6.2.8 </th> <th> 6.2.4 </th> </tr> </thead> <tbody> <tr> <td> <strong> Release date </strong> </td> <td> Aug <br/> 2023 </td> <td> Feb <br/> 2023 </td> <td> Sept <br/> 2022 </td> <td> Aug <br/> 2022 </td> <td> Feb <br/> 2022 </td> <td> Oct <br/> 2021 </td> <td> Aug <br/> 2021 </td> </tr> <tr> <td> <a href="/docs/latest/operate/rs/installing-upgrading/product-lifecycle/#endoflife-schedule"> <strong> End-of-life date </strong> </a> </td> <td> – </td> <td> Feb <br/> 2025 </td> <td> Aug <br/> 2024 </td> <td> Aug <br/> 2024 </td> <td> Aug <br/> 2024 </td> <td> Aug <br/> 2024 </td> <td> Aug <br/> 2024 </td> </tr> <tr> <td> <strong> Ubuntu </strong> <sup> <a href="#table-note-1"> 1 </a> </sup> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> 20.04 </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> <sup> <a href="#table-note-6"> 6 </a> </sup> </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> </tr> <tr> <td> 18.04 </td> <td> <span title="Deprecated"> ⚠️ </span> </td> <td> <span title="Supported"> <span title="Supported"> ✅ </span> </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> 16.04 </td> <td> <span title="End of life"> ❌ </span> </td> <td> <span title="Deprecated"> ⚠️ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> <strong> RHEL &amp; CentOS </strong> <sup> <a href="#table-note-2"> 2 </a> </sup> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> 8.8 </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> <sup> <a href="#table-note-8"> 8 </a> </sup> </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> </tr> <tr> <td> 8.7 </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> </tr> <tr> <td> 8.5-8.6 </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> – </td> <td> – </td> </tr> <tr> <td> 8.0-8.4 </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> – </td> </tr> <tr> <td> 7.0-7.9 </td> <td> <span title="Deprecated"> ⚠️ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> <strong> Oracle Linux </strong> <sup> <a href="#table-note-3"> 3 </a> </sup> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> 8 </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> – </td> <td> – </td> </tr> <tr> <td> 7 </td> <td> <span title="Deprecated"> ⚠️ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> <strong> Rocky Linux </strong> <sup> <a href="#table-note-3"> 3 </a> </sup> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> 8 </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> </tr> <tr> <td> <strong> Amazon Linux </strong> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> 2 </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> <sup> <a href="#table-note-7"> 7 </a> </sup> </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> <td> – </td> </tr> <tr> <td> 1 </td> <td> <span title="Deprecated"> ⚠️ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> <strong> Docker </strong> <sup> <a href="#table-note-4"> 4 </a> </sup> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> </tr> <tr> <td> <strong> Kubernetes </strong> <sup> <a href="#table-note-5"> 5 </a> </sup> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> <td> <span title="Supported"> ✅ </span> </td> </tr> </tbody> </table> <ol> <li> <p> <a name="table-note-1" style="display: block; height: 80px; margin-top: -80px;"> </a> The server version of Ubuntu is recommended for production installations. The desktop version is only recommended for development deployments. </p> </li> <li> <p> <a name="table-note-2" style="display: block; height: 80px; margin-top: -80px;"> </a> RHEL and CentOS deployments require OpenSSL 1.0.2 and <a href="/docs/latest/operate/rs/installing-upgrading/configuring/centos-rhel-firewall/"> firewall configuration </a> . </p> </li> <li> <p> <a name="table-note-3" style="display: block; height: 80px; margin-top: -80px;"> </a> Based on the corresponding RHEL version. </p> </li> <li> <p> <a name="table-note-4" style="display: block; height: 80px; margin-top: -80px;"> </a> <a href="/docs/latest/operate/rs/installing-upgrading/quickstarts/docker-quickstart/"> Docker images </a> of Redis Enterprise Software are certified for development and testing only. </p> </li> <li> <p> <a name="table-note-5" style="display: block; height: 80px; margin-top: -80px;"> </a> See the <a href="/docs/latest/operate/kubernetes/"> Redis Enterprise for Kubernetes documentation </a> . </p> </li> <li> <p> <a name="table-note-6" style="display: block; height: 80px; margin-top: -80px;"> </a> Ubuntu 20.04 support was added in Redis Enterprise Software <a href="/docs/latest/operate/rs/release-notes/rs-6-4-2-releases/rs-6-4-2-43/"> 6.4.2-43 </a> . </p> </li> <li> <p> <a name="table-note-7" style="display: block; height: 80px; margin-top: -80px;"> </a> A release candidate for Amazon Linux 2 support was added in Redis Enterprise Software <a href="/docs/latest/operate/rs/release-notes/rs-6-4-2-releases/rs-6-4-2-61/"> 6.4.2-61 </a> . Official support for Amazon Linux 2 was added in Redis Enterprise Software <a href="/docs/latest/operate/rs/release-notes/rs-6-4-2-releases/rs-6-4-2-69/"> 6.4.2-69 </a> . </p> </li> <li> <p> <a name="table-note-8" style="display: block; height: 80px; margin-top: -80px;"> </a> Redis Enterprise Software <a href="/docs/latest/operate/rs/release-notes/rs-6-4-2-releases/rs-6-4-2-103/"> 6.4.2-103 </a> and later supports RHEL 8.8. </p> </li> </ol> <h2 id="downloads"> Downloads </h2> <p> The following table shows the MD5 checksums for the available packages: </p> <table> <thead> <tr> <th> Package </th> <th> MD5 checksum (6.4.2-103 October release) </th> </tr> </thead> <tbody> <tr> <td> Ubuntu 18 </td> <td> 6544fd5d1625ab9da7b0d99f195fe4f1 </td> </tr> <tr> <td> Ubuntu 20 </td> <td> d623c8458a28f09a1e6ae0c0a8650023 </td> </tr> <tr> <td> RedHat Enterprise Linux (RHEL) 7 <br/> Oracle Enterprise Linux (OL) 7 </td> <td> 06cc49ddbf560c516c52ae721c2806cd </td> </tr> <tr> <td> RedHat Enterprise Linux (RHEL) 8 <br/> Oracle Enterprise Linux (OL) 8 <br/> Rocky Enterprise Linux </td> <td> 2d799af5ee03c0a94660a60cd99ea361 </td> </tr> <tr> <td> Amazon Linux 2 </td> <td> f2c5c2b5e879b8fd6792336f757593e2 </td> </tr> </tbody> </table> <h2 id="security"> Security </h2> <h4 id="open-source-redis-security-fixes-compatibility"> Open source Redis security fixes compatibility </h4> <p> As part of Redis's commitment to security, Redis Enterprise Software implements the latest <a href="https://github.com/redis/redis/releases"> security fixes </a> available with <a href="https://github.com/redis/redis"> open source Redis </a> . Redis Enterprise has already included the fixes for the relevant CVEs. </p> <p> Some CVEs announced for open source Redis do not affect Redis Enterprise due to different or additional functionality available in Redis Enterprise that is not available in open source Redis. </p> <p> Redis Enterprise 6.4.2-103 supports open source Redis 6.2 and 6.0. Below is the list of open source Redis CVEs fixed by version. </p> <p> Redis 6.2.x: </p> <ul> <li> <p> (CVE-2023-28856) Authenticated users can use the <code> HINCRBYFLOAT </code> command to create an invalid hash field that will crash Redis on access. (Redis 6.2.12) </p> </li> <li> <p> (CVE-2023-25155) Specially crafted <code> SRANDMEMBER </code> , <code> ZRANDMEMBER </code> , and <code> HRANDFIELD </code> commands can trigger an integer overflow, resulting in a runtime assertion and termination of the Redis server process. (Redis 6.2.11) </p> </li> <li> <p> (CVE-2023-22458) Integer overflow in the Redis <code> HRANDFIELD </code> and <code> ZRANDMEMBER </code> commands can lead to denial-of-service. (Redis 6.2.9) </p> </li> <li> <p> (CVE-2022-36021) String matching commands (like <code> SCAN </code> or <code> KEYS </code> ) with a specially crafted pattern to trigger a denial-of-service attack on Redis, causing it to hang and consume 100% CPU time. (Redis 6.2.11) </p> </li> <li> <p> (CVE-2022-35977) Integer overflow in the Redis <code> SETRANGE </code> and <code> SORT </code> / <code> SORT_RO </code> commands can drive Redis to OOM panic. (Redis 6.2.9) </p> </li> <li> <p> (CVE-2022-24834) A specially crafted Lua script executing in Redis can trigger a heap overflow in the cjson and cmsgpack libraries, and result in heap corruption and potentially remote code execution. The problem exists in all versions of Redis with Lua scripting support, starting from 2.6, and affects only authenticated and authorized users. (Redis 6.2.13) </p> </li> <li> <p> (CVE-2022-24736) An attacker attempting to load a specially crafted Lua script can cause NULL pointer dereference which will result in a crash of the <code> redis-server </code> process. This issue affects all versions of Redis. (Redis 6.2.7) </p> </li> <li> <p> (CVE-2022-24735) By exploiting weaknesses in the Lua script execution environment, an attacker with access to Redis can inject Lua code that will execute with the (potentially higher) privileges of another Redis user. (Redis 6.2.7) </p> </li> <li> <p> (CVE-2021-41099) Integer to heap buffer overflow handling certain string commands and network payloads, when <code> proto-max-bulk-len </code> is manually configured to a non-default, very large value. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32762) Integer to heap buffer overflow issue in <code> redis-cli </code> and <code> redis-sentinel </code> parsing large multi-bulk replies on some older and less common platforms. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32761) An integer overflow bug in Redis version 2.2 or newer can be exploited using the <code> BITFIELD </code> command to corrupt the heap and potentially result with remote code execution. (Redis 6.2.5) </p> </li> <li> <p> (CVE-2021-32687) Integer to heap buffer overflow with intsets, when <code> set-max-intset-entries </code> is manually configured to a non-default, very large value. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32675) Denial Of Service when processing RESP request payloads with a large number of elements on many connections. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32672) Random heap reading issue with Lua Debugger. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32628) Integer to heap buffer overflow handling ziplist-encoded data types, when configuring a large, non-default value for <code> hash-max-ziplist-entries </code> , <code> hash-max-ziplist-value </code> , <code> zset-max-ziplist-entries </code> or <code> zset-max-ziplist-value </code> . (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32627) Integer to heap buffer overflow issue with streams, when configuring a non-default, large value for <code> proto-max-bulk-len </code> and <code> client-query-buffer-limit </code> . (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32626) Specially crafted Lua scripts may result with Heap buffer overflow. (Redis 6.2.6) </p> </li> <li> <p> (CVE-2021-32625) An integer overflow bug in Redis version 6.0 or newer can be exploited using the STRALGO LCS command to corrupt the heap and potentially result with remote code execution. This is a result of an incomplete fix by CVE-2021-29477. (Redis 6.2.4) </p> </li> <li> <p> (CVE-2021-29478) An integer overflow bug in Redis 6.2 could be exploited to corrupt the heap and potentially result with remote code execution. The vulnerability involves changing the default set-max-intset-entries configuration value, creating a large set key that consists of integer values and using the COPY command to duplicate it. The integer overflow bug exists in all versions of Redis starting with 2.6, where it could result with a corrupted RDB or DUMP payload, but not exploited through COPY (which did not exist before 6.2). (Redis 6.2.3) </p> </li> <li> <p> (CVE-2021-29477) An integer overflow bug in Redis version 6.0 or newer could be exploited using the STRALGO LCS command to corrupt the heap and potentially result in remote code execution. The integer overflow bug exists in all versions of Redis starting with 6.0. (Redis 6.2.3) </p> </li> </ul> <p> Redis 6.0.x: </p> <ul> <li> <p> (CVE-2022-24834) A specially crafted Lua script executing in Redis can trigger a heap overflow in the cjson and cmsgpack libraries, and result in heap corruption and potentially remote code execution. The problem exists in all versions of Redis with Lua scripting support, starting from 2.6, and affects only authenticated and authorized users. (Redis 6.0.20) </p> </li> <li> <p> (CVE-2023-28856) Authenticated users can use the <code> HINCRBYFLOAT </code> command to create an invalid hash field that will crash Redis on access. (Redis 6.0.19) </p> </li> <li> <p> (CVE-2023-25155) Specially crafted <code> SRANDMEMBER </code> , <code> ZRANDMEMBER </code> , and <code> HRANDFIELD </code> commands can trigger an integer overflow, resulting in a runtime assertion and termination of the Redis server process. (Redis 6.0.18) </p> </li> <li> <p> (CVE-2022-36021) String matching commands (like <code> SCAN </code> or <code> KEYS </code> ) with a specially crafted pattern to trigger a denial-of-service attack on Redis, causing it to hang and consume 100% CPU time. (Redis 6.0.18) </p> </li> <li> <p> (CVE-2022-35977) Integer overflow in the Redis <code> SETRANGE </code> and <code> SORT </code> / <code> SORT_RO </code> commands can drive Redis to OOM panic. (Redis 6.0.17) </p> </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/release-notes/rs-6-4-2-releases/rs-6-4-2-103/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/cluster-myid/.html
<section class="prose w-full py-12"> <h1 class="command-name"> CLUSTER MYID </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">CLUSTER MYID</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 3.0.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(1) </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Returns the node's id. </p> <p> The <code> CLUSTER MYID </code> command returns the unique, auto-generated identifier that is associated with the connected cluster node. </p> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#bulk-strings"> Bulk string reply </a> : the node ID. <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/cluster-myid/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/databases/delete/.html
<section class="prose w-full py-12 max-w-none"> <h1> Delete databases </h1> <p class="text-lg -mt-5 mb-10"> Delete a database from the Cluster Manager UI. </p> <p> When you delete a database, both the database configuration and data are removed. </p> <p> To delete a database from the Cluster Manager UI: </p> <ol> <li> <p> From the <strong> Databases </strong> list, select the database, then select <strong> Configuration </strong> . </p> </li> <li> <p> Select <a href="/docs/latest/images/rs/icons/delete-icon.png#no-click" sdata-lightbox="/images/rs/icons/delete-icon.png#no-click"> <img alt="Delete button" class="inline" src="/docs/latest/images/rs/icons/delete-icon.png#no-click" width="22px"/> </a> <strong> Delete </strong> . </p> </li> <li> <p> In the <strong> Delete database </strong> dialog, confirm deletion. </p> </li> </ol> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/databases/delete/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-list-jobs/.html
<section class="prose w-full py-12"> <h1> redis-di list-jobs </h1> <p class="text-lg -mt-5 mb-10"> Lists transformation engine's jobs </p> <h2 id="usage"> Usage </h2> <pre tabindex="0"><code>Usage: redis-di list-jobs [OPTIONS] </code></pre> <h2 id="options"> Options </h2> <ul> <li> <p> <code> log_level </code> : </p> <ul> <li> Type: Choice(['DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']) </li> <li> Default: <code> info </code> </li> <li> Usage: <code> --log-level -l </code> </li> </ul> </li> <li> <p> <code> rdi_host </code> (REQUIRED): </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-host </code> </li> </ul> <p> Host/IP of RDI Database </p> </li> <li> <p> <code> rdi_port </code> (REQUIRED): </p> <ul> <li> Type: &lt;IntRange 1&lt;=x&lt;=65535&gt; </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-port </code> </li> </ul> <p> Port of RDI Database </p> </li> <li> <p> <code> rdi_user </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-user </code> </li> </ul> <p> RDI Database Username </p> </li> <li> <p> <code> rdi_password </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-password </code> </li> </ul> <p> RDI Database Password </p> </li> <li> <p> <code> rdi_key </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-key </code> </li> </ul> <p> Private key file to authenticate with </p> </li> <li> <p> <code> rdi_cert </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-cert </code> </li> </ul> <p> Client certificate file to authenticate with </p> </li> <li> <p> <code> rdi_cacert </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-cacert </code> </li> </ul> <p> CA certificate file to verify with </p> </li> <li> <p> <code> rdi_key_password </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-key-password </code> </li> </ul> <p> Password for unlocking an encrypted private key </p> </li> <li> <p> <code> help </code> : </p> <ul> <li> Type: BOOL </li> <li> Default: <code> false </code> </li> <li> Usage: <code> --help </code> </li> </ul> <p> Show this message and exit. </p> </li> </ul> <h2 id="cli-help"> CLI help </h2> <pre tabindex="0"><code>Usage: redis-di list-jobs [OPTIONS] Lists transformation engine's jobs Options: -l, --log-level [DEBUG|INFO|WARN|ERROR|CRITICAL] [default: INFO] --rdi-host TEXT Host/IP of RDI Database [required] --rdi-port INTEGER RANGE Port of RDI Database [1&lt;=x&lt;=65535; required] --rdi-user TEXT RDI Database Username --rdi-password TEXT RDI Database Password --rdi-key TEXT Private key file to authenticate with --rdi-cert TEXT Client certificate file to authenticate with --rdi-cacert TEXT CA certificate file to verify with --rdi-key-password TEXT Password for unlocking an encrypted private key --help Show this message and exit. </code></pre> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-list-jobs/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/redisom-for-net/.html
<section class="prose w-full py-12 max-w-none"> <h1> RedisOM for .NET </h1> <p class="text-lg -mt-5 mb-10"> Learn how to build with Redis Stack and .NET </p> <p> <a href="https://github.com/redis/redis-om-dotnet"> Redis OM .NET </a> is a purpose-built library for handling documents in Redis Stack. In this tutorial, we'll build a simple ASP.NET Core Web-API app for performing CRUD operations on a simple Person &amp; Address model, and we'll accomplish all of this with Redis OM .NET. </p> <h2 id="prerequisites"> Prerequisites </h2> <ul> <li> <a href="https://dotnet.microsoft.com/en-us/download/dotnet/6.0"> .NET 6 SDK </a> </li> <li> Any IDE for writing .NET (Visual Studio, Rider, Visual Studio Code). </li> <li> RediSearch must be installed as part of your Redis Stack configuration. </li> <li> Optional: Docker Desktop for running redis-stack in docker for local testing. </li> </ul> <h2 id="skip-to-the-code"> Skip to the code </h2> <p> If you want to skip this tutorial and just jump straight into code, all the source code is available in <a href="https://github.com/redis-developer/redis-om-dotnet-skeleton-app"> GitHub </a> </p> <h2 id="run-redis-stack"> Run Redis Stack </h2> <p> There are a variety of ways to run Redis Stack. One way is to use the docker image: </p> <pre tabindex="0"><code>docker run -d -p 6379:6379 -p 8001:8001 redis/redis-stack </code></pre> <h2 id="create-the-project"> Create the project </h2> <p> To create the project, just run: </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">dotnet new webapi -n Redis.OM.Skeleton --no-https --kestrelHttpPort <span class="m">5000</span> </span></span></code></pre> </div> <p> Then open the <code> Redis.OM.Skeleton.csproj </code> file in your IDE of choice. </p> <h2 id="configure-the-app"> Configure the app </h2> <p> Add a <code> REDIS_CONNECTION_STRING </code> field to your <code> appsettings.json </code> file to configure the application. Set that connection string to be the URI of your Redis instance. If using the docker command mentioned earlier, your connection string will be <code> redis://localhost:6379 </code> . </p> <h3 id="connection-string-specification"> Connection string specification </h3> <p> The specification for Redis URIs is located <a href="https://www.iana.org/assignments/uri-schemes/prov/redis"> here </a> . You can use <code> :password@host:port </code> or <code> default:password@host:port </code> for connection strings that do not include <code> username </code> . </p> <h2 id="create-the-model"> Create the model </h2> <p> Make sure to add the <code> Redis.OM </code> package to your project. This package makes it easy to create models and query your Redis domain objects. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">dotnet add package Redis.OM </span></span></code></pre> </div> <p> Now it's time to create the <code> Person </code> / <code> Address </code> model that the app will use for storing/retrieving people. Create a new directory called <code> Model </code> and add the files <code> Address.cs </code> and <code> Person.cs </code> to it. In <code> Address.cs </code> , add the following: </p> <div class="highlight"> <pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="k">using</span> <span class="nn">Redis.OM.Modeling</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">namespace</span> <span class="nn">Redis.OM.Skeleton.Model</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">public</span> <span class="k">class</span> <span class="nc">Address</span> </span></span><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"><span class="na"> [Indexed]</span> </span></span><span class="line"><span class="cl"> <span class="k">public</span> <span class="kt">int?</span> <span class="n">StreetNumber</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na"> [Indexed]</span> </span></span><span class="line"><span class="cl"> <span class="k">public</span> <span class="kt">string?</span> <span class="n">Unit</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na"> [Searchable]</span> </span></span><span class="line"><span class="cl"> <span class="k">public</span> <span class="kt">string?</span> <span class="n">StreetName</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na"> [Indexed]</span> </span></span><span class="line"><span class="cl"> <span class="k">public</span> <span class="kt">string?</span> <span class="n">City</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na"> [Indexed]</span> </span></span><span class="line"><span class="cl"> <span class="k">public</span> <span class="kt">string?</span> <span class="n">State</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na"> [Indexed]</span> </span></span><span class="line"><span class="cl"> <span class="k">public</span> <span class="kt">string?</span> <span class="n">PostalCode</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na"> [Indexed]</span> </span></span><span class="line"><span class="cl"> <span class="k">public</span> <span class="kt">string?</span> <span class="n">Country</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na"> [Indexed]</span> </span></span><span class="line"><span class="cl"> <span class="k">public</span> <span class="n">GeoLoc</span> <span class="n">Location</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <p> Here, you'll notice that except <code> StreetName </code> , marked as <code> Searchable </code> , all the fields are decorated with the <code> Indexed </code> attribute. These attributes ( <code> Searchable </code> and <code> Indexed </code> ) tell Redis OM that you want to be able to use those fields in queries when querying your documents in Redis Stack. <code> Address </code> will not be a Document itself, so the top-level class is not decorated with anything; instead, the <code> Address </code> model will be embedded in our <code> Person </code> model. </p> <p> To that end, add the following to <code> Person.cs </code> </p> <div class="highlight"> <pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="k">using</span> <span class="nn">Redis.OM.Modeling</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">namespace</span> <span class="nn">Redis.OM.Skeleton.Model</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na">[Document(StorageType = StorageType.Json, Prefixes = new []</span><span class="p">{</span><span class="s">"Person"</span><span class="p">})]</span> </span></span><span class="line"><span class="cl"><span class="k">public</span> <span class="k">class</span> <span class="nc">Person</span> </span></span><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"><span class="na"> [RedisIdField]</span> <span class="p">[</span><span class="n">Indexed</span><span class="p">]</span><span class="k">public</span> <span class="kt">string?</span> <span class="n">Id</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na"> [Indexed]</span> <span class="k">public</span> <span class="kt">string?</span> <span class="n">FirstName</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na"> [Indexed]</span> <span class="k">public</span> <span class="kt">string?</span> <span class="n">LastName</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na"> [Indexed]</span> <span class="k">public</span> <span class="kt">int</span> <span class="n">Age</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na"> [Searchable]</span> <span class="k">public</span> <span class="kt">string?</span> <span class="n">PersonalStatement</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na"> [Indexed]</span> <span class="k">public</span> <span class="kt">string</span><span class="p">[]</span> <span class="n">Skills</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span> <span class="p">=</span> <span class="n">Array</span><span class="p">.</span><span class="n">Empty</span><span class="p">&lt;</span><span class="kt">string</span><span class="p">&gt;();</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na"> [Indexed(CascadeDepth = 1)]</span> <span class="k">public</span> <span class="n">Address</span><span class="p">?</span> <span class="n">Address</span> <span class="p">{</span> <span class="k">get</span><span class="p">;</span> <span class="k">set</span><span class="p">;</span> <span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <p> There are a few things to take note of here: </p> <ol> <li> <p> <code> [Document(StorageType = StorageType.Json, Prefixes = new []{"Person"})] </code> Indicates that the data type that Redis OM will use to store the document in Redis is JSON and that the prefix for the keys for the Person class will be <code> Person </code> . </p> </li> <li> <p> <code> [Indexed(CascadeDepth = 1)] Address? Address { get; set; } </code> is one of two ways you can index an embedded object with Redis OM. This way instructs the index to cascade to the objects in the object graph, <code> CascadeDepth </code> of 1 means that it will traverse just one level, indexing the object as if it were building the index from scratch. The other method uses the <code> JsonPath </code> property of the individual indexed fields you want to search for. This more surgical approach limits the size of the index. </p> </li> <li> <p> the <code> Id </code> property is marked as a <code> RedisIdField </code> . This denotes the field as one that will be used to generate the document's key name when it's stored in Redis. </p> </li> </ol> <h2 id="create-the-index"> Create the Index </h2> <p> With the model built, the next step is to create the index in Redis. The most correct way to manage this is to spin the index creation out into a Hosted Service, which will run when the app spins up. Create a <code> HostedServices </code> directory and add <code> IndexCreationService.cs </code> to that. In that file, add the following, which will create the index on startup. </p> <div class="highlight"> <pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="k">using</span> <span class="nn">Redis.OM.Skeleton.Model</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">namespace</span> <span class="nn">Redis.OM.Skeleton.HostedServices</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">public</span> <span class="k">class</span> <span class="nc">IndexCreationService</span> <span class="p">:</span> <span class="n">IHostedService</span> </span></span><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">private</span> <span class="k">readonly</span> <span class="n">RedisConnectionProvider</span> <span class="n">_provider</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="k">public</span> <span class="n">IndexCreationService</span><span class="p">(</span><span class="n">RedisConnectionProvider</span> <span class="n">provider</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="n">_provider</span> <span class="p">=</span> <span class="n">provider</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="k">public</span> <span class="k">async</span> <span class="n">Task</span> <span class="n">StartAsync</span><span class="p">(</span><span class="n">CancellationToken</span> <span class="n">cancellationToken</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">await</span> <span class="n">_provider</span><span class="p">.</span><span class="n">Connection</span><span class="p">.</span><span class="n">CreateIndexAsync</span><span class="p">(</span><span class="k">typeof</span><span class="p">(</span><span class="n">Person</span><span class="p">));</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="k">public</span> <span class="n">Task</span> <span class="n">StopAsync</span><span class="p">(</span><span class="n">CancellationToken</span> <span class="n">cancellationToken</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="n">Task</span><span class="p">.</span><span class="n">CompletedTask</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <p> Next, add the following to <code> Program.cs </code> to register the service on startup: </p> <div class="highlight"> <pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="n">builder</span><span class="p">.</span><span class="n">Services</span><span class="p">.</span><span class="n">AddHostedService</span><span class="p">&lt;</span><span class="n">IndexCreationService</span><span class="p">&gt;();</span> </span></span></code></pre> </div> <h2 id="inject-the-redisconnectionprovider"> Inject the RedisConnectionProvider </h2> <p> Redis OM uses the <code> RedisConnectionProvider </code> class to handle connections to Redis and provides the classes you can use to interact with Redis. To use it, simply inject an instance of the RedisConnectionProvider into your app. In your <code> Program.cs </code> file, add: </p> <div class="highlight"> <pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="n">builder</span><span class="p">.</span><span class="n">Services</span><span class="p">.</span><span class="n">AddSingleton</span><span class="p">(</span><span class="k">new</span> <span class="n">RedisConnectionProvider</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">Configuration</span><span class="p">[</span><span class="s">"REDIS_CONNECTION_STRING"</span><span class="p">]));</span> </span></span></code></pre> </div> <p> This will pull your connection string out of the config and initialize the provider. The provider will now be available in your controllers/services to use. </p> <h2 id="create-the-peoplecontroller"> Create the PeopleController </h2> <p> The final puzzle piece is to write the actual API controller for our People API. In the <code> controllers </code> directory, add the file <code> PeopleController.cs </code> , the skeleton of the <code> PeopleController </code> class will be: </p> <div class="highlight"> <pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="k">using</span> <span class="nn">Microsoft.AspNetCore.Mvc</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="k">using</span> <span class="nn">Redis.OM.Searching</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="k">using</span> <span class="nn">Redis.OM.Skeleton.Model</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">namespace</span> <span class="nn">Redis.OM.Skeleton.Controllers</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na">[ApiController]</span> </span></span><span class="line"><span class="cl"><span class="na">[Route("[controller]</span><span class="s">")] </span></span></span><span class="line"><span class="cl"><span class="s"></span><span class="k">public</span> <span class="k">class</span> <span class="nc">PeopleController</span> <span class="p">:</span> <span class="n">ControllerBase</span> </span></span><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="inject-the-redisconnectionprovider-1"> Inject the RedisConnectionProvider </h3> <p> To interact with Redis, inject the RedisConnectionProvider. During this dependency injection, pull out a <code> RedisCollection&lt;Person&gt; </code> instance, which will allow a fluent interface for querying documents in Redis. </p> <div class="highlight"> <pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="k">private</span> <span class="k">readonly</span> <span class="n">RedisCollection</span><span class="p">&lt;</span><span class="n">Person</span><span class="p">&gt;</span> <span class="n">_people</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="k">private</span> <span class="k">readonly</span> <span class="n">RedisConnectionProvider</span> <span class="n">_provider</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="k">public</span> <span class="n">PeopleController</span><span class="p">(</span><span class="n">RedisConnectionProvider</span> <span class="n">provider</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="n">_provider</span> <span class="p">=</span> <span class="n">provider</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="n">_people</span> <span class="p">=</span> <span class="p">(</span><span class="n">RedisCollection</span><span class="p">&lt;</span><span class="n">Person</span><span class="p">&gt;)</span><span class="n">provider</span><span class="p">.</span><span class="n">RedisCollection</span><span class="p">&lt;</span><span class="n">Person</span><span class="p">&gt;();</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="add-route-for-creating-a-person"> Add route for creating a Person </h3> <p> The first route to add to the API is a POST request for creating a person, using the <code> RedisCollection </code> , it's as simple as calling <code> InsertAsync </code> , passing in the person object: </p> <div class="highlight"> <pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="na">[HttpPost]</span> </span></span><span class="line"><span class="cl"><span class="k">public</span> <span class="k">async</span> <span class="n">Task</span><span class="p">&lt;</span><span class="n">Person</span><span class="p">&gt;</span> <span class="n">AddPerson</span><span class="p">([</span><span class="n">FromBody</span><span class="p">]</span> <span class="n">Person</span> <span class="n">person</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">await</span> <span class="n">_people</span><span class="p">.</span><span class="n">InsertAsync</span><span class="p">(</span><span class="n">person</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="n">person</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="add-route-to-filter-by-age"> Add route to filter by age </h3> <p> The first filter route to add to the API will let the user filter by a minimum and maximum age. Using the LINQ interface available to the <code> RedisCollection </code> , this is a simple operation: </p> <div class="highlight"> <pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="na">[HttpGet("filterAge")]</span> </span></span><span class="line"><span class="cl"><span class="k">public</span> <span class="n">IList</span><span class="p">&lt;</span><span class="n">Person</span><span class="p">&gt;</span> <span class="n">FilterByAge</span><span class="p">([</span><span class="n">FromQuery</span><span class="p">]</span> <span class="kt">int</span> <span class="n">minAge</span><span class="p">,</span> <span class="p">[</span><span class="n">FromQuery</span><span class="p">]</span> <span class="kt">int</span> <span class="n">maxAge</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="n">_people</span><span class="p">.</span><span class="n">Where</span><span class="p">(</span><span class="n">x</span> <span class="p">=&gt;</span> <span class="n">x</span><span class="p">.</span><span class="n">Age</span> <span class="p">&gt;=</span> <span class="n">minAge</span> <span class="p">&amp;&amp;</span> <span class="n">x</span><span class="p">.</span><span class="n">Age</span> <span class="p">&lt;=</span> <span class="n">maxAge</span><span class="p">).</span><span class="n">ToList</span><span class="p">();</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="filter-by-geolocation"> Filter by GeoLocation </h3> <p> Redis OM has a <code> GeoLoc </code> data structure, an instance of which is indexed by the <code> Address </code> model, with the <code> RedisCollection </code> , it's possible to find all objects with a radius of particular position using the <code> GeoFilter </code> method along with the field you want to filter: </p> <div class="highlight"> <pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="na">[HttpGet("filterGeo")]</span> </span></span><span class="line"><span class="cl"><span class="k">public</span> <span class="n">IList</span><span class="p">&lt;</span><span class="n">Person</span><span class="p">&gt;</span> <span class="n">FilterByGeo</span><span class="p">([</span><span class="n">FromQuery</span><span class="p">]</span> <span class="kt">double</span> <span class="n">lon</span><span class="p">,</span> <span class="p">[</span><span class="n">FromQuery</span><span class="p">]</span> <span class="kt">double</span> <span class="n">lat</span><span class="p">,</span> <span class="p">[</span><span class="n">FromQuery</span><span class="p">]</span> <span class="kt">double</span> <span class="n">radius</span><span class="p">,</span> <span class="p">[</span><span class="n">FromQuery</span><span class="p">]</span> <span class="kt">string</span> <span class="n">unit</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="n">_people</span><span class="p">.</span><span class="n">GeoFilter</span><span class="p">(</span><span class="n">x</span> <span class="p">=&gt;</span> <span class="n">x</span><span class="p">.</span><span class="n">Address</span><span class="p">!.</span><span class="n">Location</span><span class="p">,</span> <span class="n">lon</span><span class="p">,</span> <span class="n">lat</span><span class="p">,</span> <span class="n">radius</span><span class="p">,</span> <span class="n">Enum</span><span class="p">.</span><span class="n">Parse</span><span class="p">&lt;</span><span class="n">GeoLocDistanceUnit</span><span class="p">&gt;(</span><span class="n">unit</span><span class="p">)).</span><span class="n">ToList</span><span class="p">();</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="filter-by-exact-string"> Filter by exact string </h3> <p> When a string property in your model is marked as <code> Indexed </code> , e.g. <code> FirstName </code> and <code> LastName </code> , Redis OM can perform exact text matches against them. For example, the following two routes filter by <code> PostalCode </code> and name demonstrate exact string matches. </p> <div class="highlight"> <pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="na">[HttpGet("filterName")]</span> </span></span><span class="line"><span class="cl"><span class="k">public</span> <span class="n">IList</span><span class="p">&lt;</span><span class="n">Person</span><span class="p">&gt;</span> <span class="n">FilterByName</span><span class="p">([</span><span class="n">FromQuery</span><span class="p">]</span> <span class="kt">string</span> <span class="n">firstName</span><span class="p">,</span> <span class="p">[</span><span class="n">FromQuery</span><span class="p">]</span> <span class="kt">string</span> <span class="n">lastName</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="n">_people</span><span class="p">.</span><span class="n">Where</span><span class="p">(</span><span class="n">x</span> <span class="p">=&gt;</span> <span class="n">x</span><span class="p">.</span><span class="n">FirstName</span> <span class="p">==</span> <span class="n">firstName</span> <span class="p">&amp;&amp;</span> <span class="n">x</span><span class="p">.</span><span class="n">LastName</span> <span class="p">==</span> <span class="n">lastName</span><span class="p">).</span><span class="n">ToList</span><span class="p">();</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na">[HttpGet("postalCode")]</span> </span></span><span class="line"><span class="cl"><span class="k">public</span> <span class="n">IList</span><span class="p">&lt;</span><span class="n">Person</span><span class="p">&gt;</span> <span class="n">FilterByPostalCode</span><span class="p">([</span><span class="n">FromQuery</span><span class="p">]</span> <span class="kt">string</span> <span class="n">postalCode</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="n">_people</span><span class="p">.</span><span class="n">Where</span><span class="p">(</span><span class="n">x</span> <span class="p">=&gt;</span> <span class="n">x</span><span class="p">.</span><span class="n">Address</span><span class="p">!.</span><span class="n">PostalCode</span> <span class="p">==</span> <span class="n">postalCode</span><span class="p">).</span><span class="n">ToList</span><span class="p">();</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="filter-with-a-full-text-search"> Filter with a full-text search </h3> <p> When a property in the model is marked as <code> Searchable </code> , like <code> StreetAddress </code> and <code> PersonalStatement </code> , you can perform a full-text search, see the filters for the <code> PersonalStatement </code> and <code> StreetAddress </code> : </p> <div class="highlight"> <pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="na">[HttpGet("fullText")]</span> </span></span><span class="line"><span class="cl"><span class="k">public</span> <span class="n">IList</span><span class="p">&lt;</span><span class="n">Person</span><span class="p">&gt;</span> <span class="n">FilterByPersonalStatement</span><span class="p">([</span><span class="n">FromQuery</span><span class="p">]</span> <span class="kt">string</span> <span class="n">text</span><span class="p">){</span> </span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="n">_people</span><span class="p">.</span><span class="n">Where</span><span class="p">(</span><span class="n">x</span> <span class="p">=&gt;</span> <span class="n">x</span><span class="p">.</span><span class="n">PersonalStatement</span> <span class="p">==</span> <span class="n">text</span><span class="p">).</span><span class="n">ToList</span><span class="p">();</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="na"> </span></span></span><span class="line"><span class="cl"><span class="na">[HttpGet("streetName")]</span> </span></span><span class="line"><span class="cl"><span class="k">public</span> <span class="n">IList</span><span class="p">&lt;</span><span class="n">Person</span><span class="p">&gt;</span> <span class="n">FilterByStreetName</span><span class="p">([</span><span class="n">FromQuery</span><span class="p">]</span> <span class="kt">string</span> <span class="n">streetName</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="n">_people</span><span class="p">.</span><span class="n">Where</span><span class="p">(</span><span class="n">x</span> <span class="p">=&gt;</span> <span class="n">x</span><span class="p">.</span><span class="n">Address</span><span class="p">!.</span><span class="n">StreetName</span> <span class="p">==</span> <span class="n">streetName</span><span class="p">).</span><span class="n">ToList</span><span class="p">();</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="filter-by-array-membership"> Filter by array membership </h3> <p> When a string array or list is marked as <code> Indexed </code> , Redis OM can filter all the records containing a given string using the <code> Contains </code> method of the array or list. For example, our <code> Person </code> model has a list of skills you can query by adding the following route. </p> <div class="highlight"> <pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="na">[HttpGet("skill")]</span> </span></span><span class="line"><span class="cl"><span class="k">public</span> <span class="n">IList</span><span class="p">&lt;</span><span class="n">Person</span><span class="p">&gt;</span> <span class="n">FilterBySkill</span><span class="p">([</span><span class="n">FromQuery</span><span class="p">]</span> <span class="kt">string</span> <span class="n">skill</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="n">_people</span><span class="p">.</span><span class="n">Where</span><span class="p">(</span><span class="n">x</span> <span class="p">=&gt;</span> <span class="n">x</span><span class="p">.</span><span class="n">Skills</span><span class="p">.</span><span class="n">Contains</span><span class="p">(</span><span class="n">skill</span><span class="p">)).</span><span class="n">ToList</span><span class="p">();</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="updating-a-person"> Updating a person </h3> <p> Updating a document in Redis Stack with Redis OM can be done by first materializing the person object, making your desired changes, and then calling <code> Save </code> on the collection. The collection is responsible for keeping track of updates made to entities materialized in it; therefore, it will track and apply any updates you make in it. For example, add the following route to update the age of a Person given their Id: </p> <div class="highlight"> <pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="na">[HttpPatch("updateAge/{id}")]</span> </span></span><span class="line"><span class="cl"><span class="k">public</span> <span class="n">IActionResult</span> <span class="n">UpdateAge</span><span class="p">([</span><span class="n">FromRoute</span><span class="p">]</span> <span class="kt">string</span> <span class="n">id</span><span class="p">,</span> <span class="p">[</span><span class="n">FromBody</span><span class="p">]</span> <span class="kt">int</span> <span class="n">newAge</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">foreach</span> <span class="p">(</span><span class="kt">var</span> <span class="n">person</span> <span class="k">in</span> <span class="n">_people</span><span class="p">.</span><span class="n">Where</span><span class="p">(</span><span class="n">x</span> <span class="p">=&gt;</span> <span class="n">x</span><span class="p">.</span><span class="n">Id</span> <span class="p">==</span> <span class="n">id</span><span class="p">))</span> </span></span><span class="line"><span class="cl"> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="n">person</span><span class="p">.</span><span class="n">Age</span> <span class="p">=</span> <span class="n">newAge</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><span class="line"><span class="cl"> <span class="n">_people</span><span class="p">.</span><span class="n">Save</span><span class="p">();</span> </span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="n">Accepted</span><span class="p">();</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="delete-a-person"> Delete a person </h3> <p> Deleting a document from Redis can be done with <code> Unlink </code> . All that's needed is to call Unlink, passing in the key name. Given an id, we can reconstruct the key name using the prefix and the id: </p> <div class="highlight"> <pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="na">[HttpDelete("{id}")]</span> </span></span><span class="line"><span class="cl"><span class="k">public</span> <span class="n">IActionResult</span> <span class="n">DeletePerson</span><span class="p">([</span><span class="n">FromRoute</span><span class="p">]</span> <span class="kt">string</span> <span class="n">id</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="n">_provider</span><span class="p">.</span><span class="n">Connection</span><span class="p">.</span><span class="n">Unlink</span><span class="p">(</span><span class="s">$"Person:{id}"</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="n">NoContent</span><span class="p">();</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h2 id="run-the-app"> Run the app </h2> <p> All that's left to do now is to run the app and test it. You can do so by running <code> dotnet run </code> , the app is now exposed on port 5000, and there should be a swagger UI that you can use to play with the API at http://localhost:5000/swagger. There's a couple of scripts, along with some data files, to insert some people into Redis using the API in the <a href="https://github.com/redis-developer/redis-om-dotnet-skeleton-app/tree/main/data"> GitHub repo </a> </p> <h2 id="viewing-data-in-with-redis-insight"> Viewing data in with Redis Insight </h2> <p> You can either install the Redis Insight GUI or use the Redis Insight GUI running on http://localhost:8001/. </p> <p> You can view the data by following these steps: </p> <ol> <li> Accept the EULA </li> </ol> <p> <img alt="Accept EULA" src="./images/Accept_EULA.png"/> </p> <ol start="2"> <li> Click the Add Redis Database button </li> </ol> <p> <img alt="Add Redis Database Button" src="./images/Add_Redis_Database_button.png"/> </p> <ol start="3"> <li> Enter your hostname and port name for your redis server. If you are using the docker image, this is <code> localhost </code> and <code> 6379 </code> and give your database an alias </li> </ol> <p> <img alt="Configure Redis Insight Database" src="./images/Configure_Redis_Insight_Database.png"/> </p> <ol start="4"> <li> Click <code> Add Redis Database. </code> </li> </ol> <h2 id="resources"> Resources </h2> <p> The source code for this tutorial can be found in <a href="https://github.com/redis-developer/redis-om-dotnet-skeleton-app"> GitHub </a> . </p> <nav> </nav> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/redisom-for-net/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/unsubscribe/.html
<section class="prose w-full py-12"> <h1 class="command-name"> UNSUBSCRIBE </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">UNSUBSCRIBE [channel [channel ...]]</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 2.0.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(N) where N is the number of channels to unsubscribe. </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @pubsub </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Unsubscribes the client from the given channels, or from all of them if none is given. </p> <p> When no channels are specified, the client is unsubscribed from all the previously subscribed channels. In this case, a message for every unsubscribed channel will be sent to the client. </p> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> When successful, this command doesn't return anything. Instead, for each channel, one message with the first element being the string <code> unsubscribe </code> is pushed as a confirmation that the command succeeded. <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/unsubscribe/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/kubernetes/release-notes/k8s-6-2-10-34-2022-05/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise for Kubernetes Release Notes 6.2.10-34 (May 2022) </h1> <p class="text-lg -mt-5 mb-10"> Support for REBD specific upgrade policies, memcached type REDBs, and RHEL8 for OpenShift, as well as feature improvements and bug fixes. </p> <h2 id="overview"> Overview </h2> <p> The Redis Enterprise K8s 6.2.10-34 supports the Redis Enterprise Software release 6.2.10 and includes feature improvements and bug fixes. </p> <p> The key new features, bug fixes, and known limitations are described below. </p> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Warning: </div> <p> <strong> Do not </strong> upgrade to this 6.2.10-34 release if you are an <strong> OpenShift </strong> customer and <strong> also use modules </strong> . Instead, <strong> use the <a href="/docs/latest/operate/kubernetes/release-notes/k8s-6-2-10-45-2022-07/"> 6.2.10-45 </a> </strong> release. </p> <p> There was a change in 6.2.10-34 to a new RHEL 8 base image for the Redis Server image. Due to binary differences in modules between the two operating systems, you cannot directly update RHEL 7 clusters to RHEL 8 when those clusters host databases using modules. </p> <p> Please contact support if you have further questions. </p> </div> </div> <h2 id="images"> Images </h2> <p> This release includes the following container images: </p> <ul> <li> <strong> Redis Enterprise </strong> : <code> redislabs/redis:6.2.10-107 </code> or <code> redislabs/redis:6.2.10-107.rhel8-openshift </code> </li> <li> <strong> Operator </strong> : <code> redislabs/operator:6.2.10-34 </code> </li> <li> <strong> Services Rigger </strong> : <code> redislabs/k8s-controller:6.2.10-34 </code> or <code> redislabs/services-manager:6.2.10-34 </code> (on the Red Hat registry) </li> </ul> <h2 id="new-features"> New features </h2> <ul> <li> Support database upgrade policy (major/latest) for REDB resources (RED-71028) </li> <li> Support for memcached type databases for REDB (RED-70284)(RED-75269) </li> <li> Use RHEL8 base images for OpenShift deployments (RED-72374) </li> </ul> <h2 id="feature-improvements"> Feature improvements </h2> <ul> <li> OpenShift 4.10 support (RED-73966) </li> <li> Allow setting host time zone on running containers (RED-56810) </li> <li> AKS 1.23 support (RED-73965) </li> <li> EKS 1.22 support (RED-73972) </li> </ul> <h2 id="fixed-bugs"> Fixed bugs </h2> <ul> <li> Outdated SCC YAML file (RED-72026) (RED-73341) </li> <li> Admission container startup failure (RED-72081) </li> <li> Admission container restarts due to race condition with config map creation (RED-72268) </li> <li> Incorrect REDB status report during cluster recovery (RED-72944) </li> <li> Invalid REDB spec not always rejected by admission controller (RED-73145) </li> </ul> <h2 id="compatibility-notes"> Compatibility notes </h2> <p> Below is a table showing supported distributions at the time of this release. See <a href="/docs/latest/operate/kubernetes/reference/supported_k8s_distributions/"> Supported Kubernetes distributions </a> for the current list of supported distributions. </p> <table> <thead> <tr> <th style="text-align:left"> <strong> Kubernetes version </strong> </th> <th style="text-align:center"> <strong> 1.19 </strong> </th> <th style="text-align:center"> <strong> 1.20 </strong> </th> <th style="text-align:center"> <strong> 1.21 </strong> </th> <th style="text-align:center"> <strong> 1.22 </strong> </th> <th style="text-align:center"> <strong> 1.23 </strong> </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> Community Kubernetes </td> <td style="text-align:center"> deprecated </td> <td style="text-align:center"> deprecated </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported* </td> </tr> <tr> <td style="text-align:left"> Amazon EKS </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> </td> <td style="text-align:center"> </td> </tr> <tr> <td style="text-align:left"> Azure AKS </td> <td style="text-align:center"> </td> <td style="text-align:center"> </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported* </td> </tr> <tr> <td style="text-align:left"> Google GKE </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> </td> </tr> <tr> <td style="text-align:left"> Rancher 2.6 </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> </td> </tr> <tr> <td style="text-align:left"> <strong> OpenShift version </strong> </td> <td style="text-align:center"> <strong> 4.6 </strong> </td> <td style="text-align:center"> <strong> 4.7 </strong> </td> <td style="text-align:center"> <strong> 4.8 </strong> </td> <td style="text-align:center"> <strong> 4.9 </strong> </td> <td style="text-align:center"> <strong> 4.10 </strong> </td> </tr> <tr> <td style="text-align:left"> </td> <td style="text-align:center"> deprecated </td> <td style="text-align:center"> deprecated </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported* </td> </tr> <tr> <td style="text-align:left"> <strong> VMware TKGI version </strong> </td> <td style="text-align:center"> <strong> 1.10 </strong> </td> <td style="text-align:center"> <strong> 1.11 </strong> </td> <td style="text-align:center"> <strong> 1.12 </strong> </td> <td style="text-align:center"> <strong> 1.13 </strong> </td> <td style="text-align:center"> </td> </tr> <tr> <td style="text-align:left"> </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported </td> <td style="text-align:center"> supported* </td> <td style="text-align:center"> </td> <td style="text-align:center"> </td> </tr> </tbody> </table> <p> * Support added in most recent release </p> <h3 id="now-supported"> Now supported </h3> <ul> <li> OpenShift 4.10 is now supported </li> <li> kOps (Community Kubernetes) 1.23 is now supported </li> <li> AKS 1.23 is now supported </li> <li> EKS 1.22 is now supported </li> </ul> <h3 id="deprecated"> Deprecated </h3> <ul> <li> OpenShift 4.6-4.7 is deprecated </li> <li> kOps (Community Kubernetes) 1.18-1.20 are deprecated </li> <li> GKE 1.19 is deprecated </li> <li> Rancher 2.6 - K8s 1.18 is deprecated </li> <li> AKS 1.20-1.21 are deprecated </li> <li> EKS 1.18-1.19 are deprecated </li> </ul> <h3 id="no-longer-supported"> No longer supported </h3> <ul> <li> Rancher version 2.5 (previously deprecated) is no longer supported (not supported by SUSE) </li> <li> OpenShift version 3.11 (previously deprecated) is no longer supported. </li> </ul> <h2 id="known-limitations"> Known limitations </h2> <h3 id="large-clusters"> Large clusters </h3> <p> On clusters with more than 9 REC nodes, a Kubernetes upgrade can render the Redis cluster unresponsive in some cases. A fix is available in the 6.4.2-5 release. Upgrade your operator version to 6.4.2-5 or later before upgrading your Kubernetes cluster. (RED-93025) </p> <ul> <li> <p> <strong> Warning </strong> Openshift customers using modules cannot use 6.2.10-34 version </p> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Warning: </div> <p> <strong> Do not </strong> upgrade to this 6.2.10-34 release if you are an <strong> OpenShift </strong> customer and <strong> also use modules </strong> . </p> <p> There was a change in 6.2.10-34 to a new RHEL 8 base image for the Redis Server image. Due to binary differences in modules between the two operating systems, you cannot directly update RHEL 7 clusters to RHEL 8 when those clusters host databases using modules. </p> <p> This message will be updated as remediation plans and new steps are available to address this situation. Please contact support if you have further questions. </p> </div> </div> <p> </p> </li> <li> <p> Long cluster names cause routes to be rejected (RED-25871) </p> <p> A cluster name longer than 20 characters will result in a rejected route configuration because the host part of the domain name will exceed 63 characters. The workaround is to limit cluster name to 20 characters or less. </p> </li> <li> <p> Cluster CR (REC) errors are not reported after invalid updates (RED-25542) </p> <p> A cluster CR specification error is not reported if two or more invalid CR resources are updated in sequence. </p> </li> <li> <p> An unreachable cluster has status running (RED-32805) </p> <p> When a cluster is in an unreachable state, the state is still <code> running </code> instead of being reported as an error. </p> </li> <li> <p> Readiness probe incorrect on failures (RED-39300) </p> <p> STS Readiness probe does not mark a node as "not ready" when running <code> rladmin status </code> on node failure. </p> </li> <li> <p> Role missing on replica sets (RED-39002) </p> <p> The <code> redis-enterprise-operator </code> role is missing permission on replica sets. </p> </li> <li> <p> Internal DNS and Kubernetes DNS may have conflicts (RED-37462) </p> <p> DNS conflicts are possible between the cluster <code> mdns_server </code> and the K8s DNS. This only impacts DNS resolution from within cluster nodes for Kubernetes DNS names. </p> </li> <li> <p> 5.4.10 negatively impacts 5.4.6 (RED-37233) </p> <p> Kubernetes-based 5.4.10 deployments seem to negatively impact existing 5.4.6 deployments that share a Kubernetes cluster. </p> </li> <li> <p> Node CPU usage is reported instead of pod CPU usage (RED-36884) </p> <p> In Kubernetes, the node CPU usage we report on is the usage of the Kubernetes worker node hosting the REC pod. </p> </li> <li> <p> Clusters must be named "rec" in OLM-based deployments (RED-39825) </p> <p> In OLM-deployed operators, the deployment of the cluster will fail if the name is not "rec". When the operator is deployed via the OLM, the security context constraints (scc) are bound to a specific service account name (i.e., "rec"). The workaround is to name the cluster "rec". </p> </li> <li> <p> REC clusters fail to start on Kubernetes clusters with unsynchronized clocks (RED-47254) </p> <p> When REC clusters are deployed on Kubernetes clusters with unsynchronized clocks, the REC cluster does not start correctly. The fix is to use NTP to synchronize the underlying K8s nodes. </p> </li> <li> <p> Deleting an OpenShift project with an REC deployed may hang (RED-47192) </p> <p> When a REC cluster is deployed in a project (namespace) and has REDB resources, the REDB resources must be deleted first before the REC can be deleted. As such, until the REDB resources are deleted, the project deletion will hang. The fix is to delete the REDB resources first and the REC second. Afterwards, you may delete the project. </p> </li> <li> <p> REC extraLabels are not applied to PVCs on K8s versions 1.15 or older (RED-51921) </p> <p> In K8s 1.15 or older, the PVC labels come from the match selectors and not the PVC templates. As such, these versions cannot support PVC labels. If this feature is required, the only fix is to upgrade the K8s cluster to a newer version. </p> </li> <li> <p> Hashicorp Vault integration - no support for Gesher (RED-55080) </p> <p> There is no workaround at this time. </p> </li> <li> <p> REC might report error states on initial startup (RED-61707) </p> <p> There is no workaround at this time except to ignore the errors. </p> </li> <li> <p> PVC size issues when using decimal value in spec (RED-62132) </p> <p> The workaround for this issue is to make sure you use integer values for the PVC size. </p> </li> <li> <p> Following old revision of quick start guide causes issues creating an REDB due to unrecognized memory field name (RED-69515) </p> </li> </ul> <p> The workaround is to use the newer (current) revision of the quick start document available online. </p> <ul> <li> <p> <code> autoUpgrade </code> set to true by operator might cause unexpected bdb upgrades when <code> redisUpgradePolicy </code> is set to true (RED-72351) </p> <p> Contact support if your deployment is impacted. </p> </li> <li> <p> Procedure to update credentials might be problematic on OpenShift when accessing the cluster externally using routes (RS issue)(RED-73251)(RED-75329) To workaround this, access the API from within the K8s cluster. </p> </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/kubernetes/release-notes/k8s-6-2-10-34-2022-05/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/redis-data-integration/reference/data-transformation/add_field/.html
<section class="prose w-full py-12 max-w-none"> <h1> add_field </h1> <p class="text-lg -mt-5 mb-10"> Add fields to a record </p> <p> Add fields to a record </p> <p> <strong> Option 1 (alternative): </strong> Add multiple fields </p> <p> <strong> Properties </strong> </p> <table> <thead> <tr> <th> Name </th> <th> Type </th> <th> Description </th> <th> Required </th> </tr> </thead> <tbody> <tr> <td> <a href="#option1fields"> <strong> fields </strong> </a> </td> <td> <code> object[] </code> </td> <td> Fields <br/> </td> <td> yes </td> </tr> </tbody> </table> <p> <strong> Additional Properties: </strong> not allowed </p> <p> <strong> Example </strong> </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">source</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">server_name</span><span class="p">:</span><span class="w"> </span><span class="l">redislabs</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">schema</span><span class="p">:</span><span class="w"> </span><span class="l">dbo</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">table</span><span class="p">:</span><span class="w"> </span><span class="l">emp</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">transform</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">uses</span><span class="p">:</span><span class="w"> </span><span class="l">add_field</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">with</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">fields</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">field</span><span class="p">:</span><span class="w"> </span><span class="l">name.full_name</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">language</span><span class="p">:</span><span class="w"> </span><span class="l">jmespath</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">expression</span><span class="p">:</span><span class="w"> </span><span class="l">concat([name.fname, ' ', name.lname])</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">field</span><span class="p">:</span><span class="w"> </span><span class="l">name.fname_upper</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">language</span><span class="p">:</span><span class="w"> </span><span class="l">jmespath</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">expression</span><span class="p">:</span><span class="w"> </span><span class="l">upper(name.fname)</span><span class="w"> </span></span></span></code></pre> </div> <p> <strong> Option 2 (alternative): </strong> Add one field </p> <p> <strong> Properties </strong> </p> <table> <thead> <tr> <th> Name </th> <th> Type </th> <th> Description </th> <th> Required </th> </tr> </thead> <tbody> <tr> <td> <strong> field </strong> </td> <td> <code> string </code> </td> <td> Field <br/> </td> <td> yes </td> </tr> <tr> <td> <strong> expression </strong> </td> <td> <code> string </code> </td> <td> Expression <br/> </td> <td> yes </td> </tr> <tr> <td> <strong> language </strong> </td> <td> <code> string </code> </td> <td> Language <br/> Enum: <code> "jmespath" </code> , <code> "sql" </code> <br/> </td> <td> yes </td> </tr> </tbody> </table> <p> <strong> Additional Properties: </strong> not allowed </p> <p> <strong> Example </strong> </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">source</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">server_name</span><span class="p">:</span><span class="w"> </span><span class="l">redislabs</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">schema</span><span class="p">:</span><span class="w"> </span><span class="l">dbo</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">table</span><span class="p">:</span><span class="w"> </span><span class="l">emp</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">transform</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">uses</span><span class="p">:</span><span class="w"> </span><span class="l">add_field</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">with</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">field</span><span class="p">:</span><span class="w"> </span><span class="l">country</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">language</span><span class="p">:</span><span class="w"> </span><span class="l">sql</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">expression</span><span class="p">:</span><span class="w"> </span><span class="l">country_code || ' - ' || UPPER(country_name)</span><span class="w"> </span></span></span></code></pre> </div> <p> <a name="option1fields"> </a> </p> <h2 id="option-1-fields-array"> Option 1: fields[]: array </h2> <p> Fields </p> <p> <strong> Items </strong> </p> <p> <strong> Item Properties </strong> </p> <table> <thead> <tr> <th> Name </th> <th> Type </th> <th> Description </th> <th> Required </th> </tr> </thead> <tbody> <tr> <td> <strong> field </strong> </td> <td> <code> string </code> </td> <td> Field <br/> </td> <td> yes </td> </tr> <tr> <td> <strong> expression </strong> </td> <td> <code> string </code> </td> <td> Expression <br/> </td> <td> yes </td> </tr> <tr> <td> <strong> language </strong> </td> <td> <code> string </code> </td> <td> Language <br/> Enum: <code> "jmespath" </code> , <code> "sql" </code> <br/> </td> <td> yes </td> </tr> </tbody> </table> <p> <strong> Item Additional Properties: </strong> not allowed </p> <p> <strong> Example </strong> </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl">- {}<span class="w"> </span></span></span></code></pre> </div> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/redis-data-integration/reference/data-transformation/add_field/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/slaveof/.html
<section class="prose w-full py-12"> <h1 class="command-name"> SLAVEOF <span class="text-base"> (deprecated) </span> </h1> <div class="border-l-8 pl-4"> <p> As of Redis version 5.0.0, this command is regarded as deprecated. </p> <p> It can be replaced by <a href="/docs/latest/commands/replicaof/"> <code> REPLICAOF </code> </a> when migrating or writing new code. </p> </div> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">SLAVEOF &lt;host port | NO ONE&gt;</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 1.0.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(1) </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @admin </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> <code> @dangerous </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> <strong> A note about the word slave used in this man page and command name </strong> : starting with Redis version 5, if not for backward compatibility, the Redis project no longer uses the word slave. Please use the new command <a href="/docs/latest/commands/replicaof/"> <code> REPLICAOF </code> </a> . The command <code> SLAVEOF </code> will continue to work for backward compatibility. </p> <p> The <code> SLAVEOF </code> command can change the replication settings of a replica on the fly. If a Redis server is already acting as replica, the command <code> SLAVEOF </code> NO ONE will turn off the replication, turning the Redis server into a MASTER. In the proper form <code> SLAVEOF </code> hostname port will make the server a replica of another server listening at the specified hostname and port. </p> <p> If a server is already a replica of some master, <code> SLAVEOF </code> hostname port will stop the replication against the old server and start the synchronization against the new one, discarding the old dataset. </p> <p> The form <code> SLAVEOF </code> NO ONE will stop replication, turning the server into a MASTER, but will not discard the replication. So, if the old master stops working, it is possible to turn the replica into a master and set the application to use this new master in read/write. Later when the other Redis server is fixed, it can be reconfigured to work as a replica. </p> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#simple-strings"> Simple string reply </a> : <code> OK </code> . <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/slaveof/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/redis-data-integration/data-pipelines/prepare-dbs/.html
<section class="prose w-full py-12 max-w-none"> <h1> Prepare source databases </h1> <p class="text-lg -mt-5 mb-10"> Enable CDC features in your source databases </p> <p> Each database uses a different mechanism to track changes to its data and generally, these mechanisms are not switched on by default. RDI's Debezium collector uses these mechanisms for change data capture (CDC), so you must prepare your source database before you can use it with RDI. </p> <p> The pages in this section give detailed instructions to get your source database ready for Debezium to use: </p> <nav> <a href="/docs/latest/integrate/redis-data-integration/data-pipelines/prepare-dbs/oracle/"> Prepare Oracle and Oracle RAC for RDI </a> <p> Prepare Oracle and Oracle RAC databases to work with RDI </p> <a href="/docs/latest/integrate/redis-data-integration/data-pipelines/prepare-dbs/my-sql-mariadb/"> Prepare MySQL/MariaDB for RDI </a> <p> Prepare MySQL and MariaDB databases to work with RDI </p> <a href="/docs/latest/integrate/redis-data-integration/data-pipelines/prepare-dbs/postgresql/"> Prepare PostgreSQL for RDI </a> <p> Prepare PostgreSQL databases to work with RDI </p> <a href="/docs/latest/integrate/redis-data-integration/data-pipelines/prepare-dbs/sql-server/"> Prepare SQL Server for RDI </a> <p> Prepare SQL Server databases to work with RDI </p> </nav> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/redis-data-integration/data-pipelines/prepare-dbs/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rc/security/access-control/saml-sso/saml-integration-azure-ad/.html
<section class="prose w-full py-12 max-w-none"> <h1> Microsoft Entra (formerly Azure Active Directory) SAML integration guide </h1> <p class="text-lg -mt-5 mb-10"> This integration guide shows how to set up Microsoft Entra as a SAML single sign on provider for your Redis Cloud account. </p> <p> This guide shows how to configure <a href="https://learn.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-architecture"> Microsoft Entra </a> (formerly Azure Active Directory) as a SAML single sign-on identity provider (IdP) for your Redis Cloud account. </p> <p> To learn more about Redis Cloud support for SAML, see <a href="/docs/latest/operate/rc/security/access-control/saml-sso/"> SAML single sign on </a> . </p> <p> Before completing this guide, you must <a href="/docs/latest/operate/rc/security/access-control/saml-sso/#verify-domain"> verify ownership of any domains </a> you want to associate with your SAML setup. </p> <h2 id="step-1-set-up-your-identity-provider-idp"> Step 1: Set up your identity provider (IdP) </h2> <p> To create the Microsoft Entra SAML Toolkit integration application: </p> <ol> <li> <p> Sign in to your Microsoft Azure account. </p> </li> <li> <p> From the main menu, select <strong> Microsoft Entra ID &gt; Enterprise Applications </strong> . Select <strong> New application </strong> to add a new application. </p> <a href="/docs/latest/images/rc/saml/ad_saml_1.png" sdata-lightbox="/images/rc/saml/ad_saml_1.png"> <img src="/docs/latest/images/rc/saml/ad_saml_1.png"/> </a> </li> <li> <p> Select <strong> Microsoft Entra SAML Toolkit </strong> from the list of apps. </p> <a href="/docs/latest/images/rc/saml/ad_saml_2.png" sdata-lightbox="/images/rc/saml/ad_saml_2.png"> <img src="/docs/latest/images/rc/saml/ad_saml_2.png"/> </a> </li> <li> <p> Name the application <strong> Redis Cloud </strong> and then select <strong> Create </strong> . </p> <a href="/docs/latest/images/rc/saml/ad_saml_3.png" sdata-lightbox="/images/rc/saml/ad_saml_3.png"> <img src="/docs/latest/images/rc/saml/ad_saml_3.png"/> </a> </li> <li> <p> Select <strong> Properties </strong> and upload the Redis logo. </p> <a href="/docs/latest/images/rc/saml/ad_saml_17.png" sdata-lightbox="/images/rc/saml/ad_saml_17.png"> <img src="/docs/latest/images/rc/saml/ad_saml_17.png"/> </a> <p> Select <strong> Save </strong> . </p> </li> <li> <p> Once you've created the application, go to the <strong> Application Overview </strong> and select <strong> Set up single sign on </strong> . </p> <a href="/docs/latest/images/rc/saml/ad_saml_4.png" sdata-lightbox="/images/rc/saml/ad_saml_4.png"> <img src="/docs/latest/images/rc/saml/ad_saml_4.png"/> </a> </li> <li> <p> Select <strong> SAML </strong> as the single sign-on method. </p> <a href="/docs/latest/images/rc/saml/ad_saml_5.png" sdata-lightbox="/images/rc/saml/ad_saml_5.png"> <img src="/docs/latest/images/rc/saml/ad_saml_5.png"/> </a> </li> <li> <p> Go to <strong> Step 1 </strong> in the configuration screen and select <strong> Edit </strong> . </p> <p> Enter some mock data in the required fields. </p> <a href="/docs/latest/images/rc/saml/ad_saml_8.png" sdata-lightbox="/images/rc/saml/ad_saml_8.png"> <img src="/docs/latest/images/rc/saml/ad_saml_8.png"/> </a> <p> Select <strong> Save </strong> to save your changes. </p> </li> <li> <p> Go to <strong> Step 3 </strong> in the configuration screen. </p> <ul> <li> <p> Certificate (Base 64) is required to complete SAML configuration in the Redis Cloud console. Select <strong> Download </strong> to download it. </p> <a href="/docs/latest/images/rc/saml/ad_saml_7.png" sdata-lightbox="/images/rc/saml/ad_saml_7.png"> <img src="/docs/latest/images/rc/saml/ad_saml_7.png"/> </a> </li> </ul> </li> <li> <p> Go to <strong> Step 4 </strong> in the configuration screen, and note down or copy the following information: </p> <ul> <li> <strong> Login URL </strong> is used as the "IdP server URL" in the SAML configuration in admin console. </li> <li> <strong> Microsoft Entra Identifier </strong> is used as the "Issuer (IdP Entity ID)" in the SAML configuration in admin console. </li> </ul> <a href="/docs/latest/images/rc/saml/ad_saml_6.png" sdata-lightbox="/images/rc/saml/ad_saml_6.png"> <img src="/docs/latest/images/rc/saml/ad_saml_6.png"/> </a> </li> </ol> <h2 id="step-2-configure-saml-support-in-redis-cloud"> Step 2: Configure SAML support in Redis Cloud </h2> <p> Now that you have your Entra IdP server ready, configure support for SAML in Redis Cloud. </p> <h3 id="sign-in-to-redis-cloud"> Sign in to Redis Cloud </h3> <p> Sign in to your account on the <a href="https://cloud.redis.io/#/login"> Redis Cloud console </a> . </p> <h3 id="activate-saml-in-access-management"> Activate SAML in access management </h3> <p> To activate SAML, you must have a local user (or social sign-on user) with the <strong> owner </strong> role. If you have the correct permissions, you will see the <strong> Single Sign-On </strong> tab. </p> <ol> <li> <p> Fill in the information you saved previously in the <strong> setup </strong> form. This includes : </p> <ul> <li> <p> <strong> Issuer (IdP Entity ID) </strong> : Microsoft Entra Identifier </p> </li> <li> <p> <strong> IdP server URL </strong> : Login URL </p> </li> <li> <p> <strong> Assertion signing certificate </strong> : Drag-and-drop the certificate file you downloaded to disk in the form text area </p> <a href="/docs/latest/images/rc/saml/sm_saml_1.png" sdata-lightbox="/images/rc/saml/sm_saml_1.png"> <img src="/docs/latest/images/rc/saml/sm_saml_1.png"/> </a> </li> </ul> <p> Once you click the <strong> Enable </strong> button, wait a few seconds for the status to change. </p> </li> <li> <p> You will then be able to <strong> download </strong> the service provider (SP) metadata. Save the file to your local hard disk. </p> <a href="/docs/latest/images/rc/saml/sm_saml_3.png" sdata-lightbox="/images/rc/saml/sm_saml_3.png"> <img src="/docs/latest/images/rc/saml/sm_saml_3.png"/> </a> </li> <li> <p> Open the file in any text editor. Save the following text from the metadata: </p> <ul> <li> <strong> EntityID </strong> : The unique name of the service provider (SP) </li> </ul> <a href="/docs/latest/images/rc/saml/sm_saml_4.png" sdata-lightbox="/images/rc/saml/sm_saml_4.png"> <img src="/docs/latest/images/rc/saml/sm_saml_4.png"/> </a> <ul> <li> <strong> Location </strong> : The location of the assertion consumer service </li> </ul> <a href="/docs/latest/images/rc/saml/sm_saml_5.png" sdata-lightbox="/images/rc/saml/sm_saml_5.png"> <img src="/docs/latest/images/rc/saml/sm_saml_5.png"/> </a> </li> </ol> <h2 id="step-3-finish-saml-configuration-in-microsoft-entra-id"> Step 3: Finish SAML configuration in Microsoft Entra ID </h2> <ol> <li> <p> Go back to Microsoft Entra ID setup and <strong> Edit </strong> the Basic SAML Configuration in <strong> Step 1 </strong> . </p> <p> This is where you entered mock data. Let's now enter the correct data for this step. </p> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> For the <code> EntityID </code> and <code> Location </code> fields below you can directly upload the metadata file using the option at the top of the page. However, you will still need to manually add the <strong> Sign on URL </strong> . </div> </div> <ul> <li> <p> Paste <code> EntityID </code> information in the <code> Identifier (Entity ID) </code> field. </p> </li> <li> <p> Paste <code> Location </code> link in <code> Reply URL (Assertion Consumer Service URL) </code> field. </p> </li> <li> <p> For the <code> Sign on URL </code> field, add URL <code> https://cloud.redis.io/#/login/?idpId= </code> where you need to add the ID from the Reply URL ID, for example, <code> https://cloud.redis.io/#/login/?idpId=0oa5pwatz2JfpfCb91d7 </code> . </p> </li> </ul> <p> Select <strong> Save </strong> . </p> <a href="/docs/latest/images/rc/saml/ad_saml_23.png" sdata-lightbox="/images/rc/saml/ad_saml_23.png"> <img src="/docs/latest/images/rc/saml/ad_saml_23.png"/> </a> </li> <li> <p> Go to step 2, <strong> Attributes &amp; Claims </strong> and select <strong> Edit </strong> . </p> <a href="/docs/latest/images/rc/saml/ad_saml_24.png" sdata-lightbox="/images/rc/saml/ad_saml_24.png"> <img src="/docs/latest/images/rc/saml/ad_saml_24.png"/> </a> </li> <li> <p> Configure these attributes and claims: </p> <ul> <li> <p> Modify Unique User Identifier (Name ID) to <strong> user.mail </strong> </p> </li> <li> <p> Modify additional claims to match SAML assertion as follows: </p> <ul> <li> <p> <strong> Email </strong> : user.mail </p> </li> <li> <p> <strong> FirstName </strong> : user.givenname </p> </li> <li> <p> <strong> LastName </strong> : user.surname </p> </li> <li> <p> <strong> redisAccountMapping </strong> : "&lt;sm_account_id&gt;=owner" </p> <ul> <li> The <code> redisAccountMapping </code> contains Redis Cloud account IDs and user roles pairs. The key-value pair consists of the lowercase role name (owner, member, manager, billing_admin, or viewer) and your <strong> Redis Cloud Account ID </strong> found in the <a href="/docs/latest/operate/rc/accounts/account-settings/"> account settings </a> . </li> </ul> <a href="/docs/latest/images/rc/saml/ad_saml_14.png" sdata-lightbox="/images/rc/saml/ad_saml_14.png"> <img src="/docs/latest/images/rc/saml/ad_saml_14.png"/> </a> </li> </ul> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> <p> Make sure the <strong> Namespace </strong> field is empty when modifying these claims. </p> <a href="/docs/latest/images/rc/saml/ad_saml_namespace_field.png" sdata-lightbox="/images/rc/saml/ad_saml_namespace_field.png"> <img <pre="" src="/docs/latest/images/rc/saml/ad_saml_namespace_field.png"/> <code> /&gt; </code> </a> </div> </div> </li> </ul> </li> <li> <p> To add a user to the application, select <strong> User and Groups &gt; Add user/group </strong> . </p> <a href="/docs/latest/images/rc/saml/ad_saml_15.png" sdata-lightbox="/images/rc/saml/ad_saml_15.png"> <img src="/docs/latest/images/rc/saml/ad_saml_15.png"/> </a> </li> <li> <p> Add the user and select <strong> Assign </strong> . </p> <a href="/docs/latest/images/rc/saml/ad_saml_16.png" sdata-lightbox="/images/rc/saml/ad_saml_16.png"> <img src="/docs/latest/images/rc/saml/ad_saml_16.png"/> </a> </li> </ol> <h2 id="step-4-return-to-redis-cloud-console"> Step 4: Return to Redis Cloud console </h2> <ol> <li> <p> Return to Redis Cloud console and select <strong> Activate </strong> . </p> <a href="/docs/latest/images/rc/saml/sm_saml_8.png" sdata-lightbox="/images/rc/saml/sm_saml_8.png"> <img src="/docs/latest/images/rc/saml/sm_saml_8.png"/> </a> </li> <li> <p> A popup appears, explaining that you must log in with the credentials of a Microsoft Entra user to test the SAML connection. </p> <a href="/docs/latest/images/rc/saml/sm_saml_9.png" sdata-lightbox="/images/rc/saml/sm_saml_9.png"> <img src="/docs/latest/images/rc/saml/sm_saml_9.png"/> </a> </li> <li> <p> The Microsoft login screen will appear. Enter the credentials and click <strong> Sign In </strong> . </p> <a href="/docs/latest/images/rc/saml/ad_saml_19.png" sdata-lightbox="/images/rc/saml/ad_saml_19.png"> <img src="/docs/latest/images/rc/saml/ad_saml_19.png"/> </a> </li> <li> <p> If the test has succeeded, you will see the following screen. Your local account is now considered a SAML account. To log in to Redis Cloud console going forward, select <strong> Sign in with SSO </strong> . </p> <a href="/docs/latest/images/rc/saml/sm_saml_11.png" sdata-lightbox="/images/rc/saml/sm_saml_11.png"> <img src="/docs/latest/images/rc/saml/sm_saml_11.png"/> </a> </li> <li> <p> Enter your SAML email and click <strong> Login </strong> . </p> <a href="/docs/latest/images/rc/saml/ad_saml_21.png" sdata-lightbox="/images/rc/saml/ad_saml_21.png"> <img src="/docs/latest/images/rc/saml/ad_saml_21.png"/> </a> <p> You have successfully configured SAML as an identification provider. </p> </li> </ol> <h2 id="claim-conditions-and-user-groups"> Claim conditions and user groups </h2> <p> If your users are going to be part of different Groups, you can create a Claim Condition for the <code> redisAccountMapping </code> attribute. </p> <a href="/docs/latest/images/rc/saml/ad_saml_20.png" sdata-lightbox="/images/rc/saml/ad_saml_20.png"> <img src="/docs/latest/images/rc/saml/ad_saml_20.png"/> </a> <h2 id="idp-initiated-sso"> IdP initiated SSO </h2> <p> If you correctly set the up the <strong> Sign on URL </strong> , the SAML application appears by default on the user's <strong> My Apps </strong> panel. </p> <a href="/docs/latest/images/rc/saml/ad_saml_25.png" sdata-lightbox="/images/rc/saml/ad_saml_25.png"> <img src="/docs/latest/images/rc/saml/ad_saml_25.png"/> </a> <p> While assigning the user to the app, a notification will appear: </p> <a href="/docs/latest/images/rc/saml/ad_saml_26.png" sdata-lightbox="/images/rc/saml/ad_saml_26.png"> <img src="/docs/latest/images/rc/saml/ad_saml_26.png"/> </a> <p> Therefore, if you sign into <code> https://myapplications.microsoft.com/ </code> , the application will be available. </p> <p> If the app is not available, make sure that the App is registered. It should be done automatically. </p> <a href="/docs/latest/images/rc/saml/ad_saml_27.png" sdata-lightbox="/images/rc/saml/ad_saml_27.png"> <img src="/docs/latest/images/rc/saml/ad_saml_27.png"/> </a> <a href="/docs/latest/images/rc/saml/ad_saml_28.png" sdata-lightbox="/images/rc/saml/ad_saml_28.png"> <img src="/docs/latest/images/rc/saml/ad_saml_28.png"/> </a> <p> You can also access the app directly by using the <strong> User access Url </strong> from App Properties. </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rc/security/access-control/saml-sso/saml-integration-azure-ad/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/ts.madd.html
<section class="prose w-full py-12"> <h1 class="command-name"> TS.MADD </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">TS.MADD {key timestamp value}... </pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available in: </dt> <dd class="m-0"> <a href="/docs/stack"> Redis Stack </a> / <a href="/docs/data-types/timeseries"> TimeSeries 1.0.0 </a> </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(N*M) when N is the amount of series updated and M is the amount of compaction rules or O(N) with no compaction </dd> </dl> <p> Append new samples to one or more time series </p> <p> <a href="#examples"> Examples </a> </p> <h2 id="required-arguments"> Required arguments </h2> <details open=""> <summary> <code> key </code> </summary> <p> is the key name for the time series. </p> </details> <details open=""> <summary> <code> timestamp </code> </summary> <p> is Unix time (integer, in milliseconds) specifying the sample timestamp or <code> * </code> to set the sample timestamp to the Unix time of the server's clock. </p> <p> Unix time is the number of milliseconds that have elapsed since 00:00:00 UTC on 1 January 1970, the Unix epoch, without adjustments made due to leap seconds. </p> </details> <details open=""> <summary> <code> value </code> </summary> <p> is numeric data value of the sample (double). The double number should follow <a href="https://tools.ietf.org/html/rfc7159"> RFC 7159 </a> (a JSON standard). The parser rejects overly large values that would not fit in binary64. It does not accept NaN or infinite values. </p> </details> <p> <note> <b> Notes: </b> </note> </p> <ul> <li> If <code> timestamp </code> is older than the retention period compared to the maximum existing timestamp, the sample is discarded and an error is returned. </li> <li> Explicitly adding samples to a compacted time series (using <a href="/docs/latest/commands/ts.add/"> <code> TS.ADD </code> </a> , <code> TS.MADD </code> , <a href="/docs/latest/commands/ts.incrby/"> <code> TS.INCRBY </code> </a> , or <a href="/docs/latest/commands/ts.decrby/"> <code> TS.DECRBY </code> </a> ) may result in inconsistencies between the raw and the compacted data. The compaction process may override such samples. </li> <li> <code> ignoreMaxTimeDiff </code> and <code> ignoreMaxValDiff </code> cannot be specified as is the case with <code> TS.ADD </code> . However, the same logic still applies based on the values of the per-key configuration parameters. See the <a href="/docs/latest/commands/ts.add/"> <code> TS.ADD </code> </a> command page for more information. </li> </ul> <h2 id="return-value"> Return value </h2> <p> Returns one of these replies: </p> <ul> <li> <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> , where each element is an <a href="/docs/latest/develop/reference/protocol-spec/#integers"> Integer reply </a> representing the timestamp of a upserted sample or an [] (when duplication policy is <code> BLOCK </code> , or when <code> timestamp </code> is older than the retention period compared to the maximum existing timestamp). For each element that is ignored (see <code> IGNORE </code> in <a href="/docs/latest/commands/ts.create/"> <code> TS.CREATE </code> </a> ), the reply element value will be the largest timestamp in the time series. </li> <li> [] (invalid arguments, wrong key type, etc.) </li> </ul> <h2 id="complexity"> Complexity </h2> <p> If a compaction rule exits on a time series, TS.MADD performance might be reduced. The complexity of TS.MADD is always <code> O(N*M) </code> , where <code> N </code> is the amount of series updated and <code> M </code> is the number of compaction rules or <code> O(N) </code> with no compaction. </p> <h2 id="examples"> Examples </h2> <details open=""> <summary> <b> Add stock prices at different timestamps </b> </summary> <p> Create two stocks and add their prices at three different timestamps. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.CREATE stock:A LABELS <span class="nb">type</span> stock name A </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.CREATE stock:B LABELS <span class="nb">type</span> stock name B </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; TS.MADD stock:A <span class="m">1000</span> <span class="m">100</span> stock:A <span class="m">1010</span> <span class="m">110</span> stock:A <span class="m">1020</span> <span class="m">120</span> stock:B <span class="m">1000</span> <span class="m">120</span> stock:B <span class="m">1010</span> <span class="m">110</span> stock:B <span class="m">1020</span> <span class="m">100</span> </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1000</span> </span></span><span class="line"><span class="cl">2<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1010</span> </span></span><span class="line"><span class="cl">3<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1020</span> </span></span><span class="line"><span class="cl">4<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1000</span> </span></span><span class="line"><span class="cl">5<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1010</span> </span></span><span class="line"><span class="cl">6<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1020</span></span></span></code></pre> </div> </details> <h2 id="see-also"> See also </h2> <p> <a href="/docs/latest/commands/ts.mrange/"> <code> TS.MRANGE </code> </a> | <a href="/docs/latest/commands/ts.range/"> <code> TS.RANGE </code> </a> | <a href="/docs/latest/commands/ts.mrevrange/"> <code> TS.MREVRANGE </code> </a> | <a href="/docs/latest/commands/ts.revrange/"> <code> TS.REVRANGE </code> </a> </p> <h2 id="related-topics"> Related topics </h2> <p> <a href="/docs/latest/develop/data-types/timeseries/"> RedisTimeSeries </a> </p> <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/ts.madd/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/services_configuration/crdb_worker/.html
<section class="prose w-full py-12 max-w-none"> <h1> CRDB worker object </h1> <p class="text-lg -mt-5 mb-10"> Documents the crdb_worker object used with Redis Enterprise Software REST API calls. </p> <table> <thead> <tr> <th> Name </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> operating_mode </td> <td> 'disabled' <br/> 'enabled' </td> <td> Enable/disable the CRDB worker processes </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/objects/services_configuration/crdb_worker/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/installing-upgrading/install/prepare-install/.html
<section class="prose w-full py-12 max-w-none"> <h1> Prepare to install Redis Enterprise Software </h1> <p class="text-lg -mt-5 mb-10"> Prepare to install Redis Enterprise Software. </p> <p> Before you install Redis Enterprise Software: </p> <ul> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/install/prepare-install/download-install-package/"> Download an installation package </a> . </p> </li> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/install/manage-installation-questions/"> View installation questions </a> and optionally prepare answers before installation. </p> </li> <li> <p> Review the <a href="/docs/latest/operate/rs/security/"> security considerations </a> for your deployment. </p> </li> <li> <p> Check that you have root-level access to each node, either directly or with <code> sudo </code> . </p> </li> <li> <p> Check that all <a href="/docs/latest/operate/rs/installing-upgrading/install/prepare-install/port-availability/"> required ports are available </a> . </p> </li> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/configuring/linux-swap/"> Turn off Linux swap </a> on all cluster nodes. </p> </li> <li> <p> If you require the <code> redislabs </code> UID (user ID) and GID (group ID) numbers to be the same on all the nodes, create the <code> redislabs </code> user and group with the required numbers on each node. </p> </li> <li> <p> If you want to use Auto Tiering for your databases, see <a href="/docs/latest/operate/rs/installing-upgrading/install/install-on-linux/#auto-tiering-installation"> Auto Tiering installation </a> . </p> </li> </ul> <h2 id="next-steps"> Next steps </h2> <ul> <li> <p> View <a href="/docs/latest/operate/rs/installing-upgrading/install/install-script/"> installation script options </a> before starting the installation. </p> </li> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/install/"> Install Redis Enterprise Software </a> . </p> </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/installing-upgrading/install/prepare-install/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/cluster-shards/.html
<section class="prose w-full py-12"> <h1 class="command-name"> CLUSTER SHARDS </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">CLUSTER SHARDS</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 7.0.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(N) where N is the total number of cluster nodes </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> <code> CLUSTER SHARDS </code> returns details about the shards of the cluster. A shard is defined as a collection of nodes that serve the same set of slots and that replicate from each other. A shard may only have a single master at a given time, but may have multiple or no replicas. It is possible for a shard to not be serving any slots while still having replicas. </p> <p> This command replaces the <a href="/docs/latest/commands/cluster-slots/"> <code> CLUSTER SLOTS </code> </a> command, by providing a more efficient and extensible representation of the cluster. </p> <p> The command is suitable to be used by Redis Cluster client libraries in order to understand the topology of the cluster. A client should issue this command on startup in order to retrieve the map associating cluster <em> hash slots </em> with actual node information. This map should be used to direct commands to the node that is likely serving the slot associated with a given command. In the event the command is sent to the wrong node, in that it received a '-MOVED' redirect, this command can then be used to update the topology of the cluster. </p> <p> The command returns an array of shards, with each shard containing two fields, 'slots' and 'nodes'. </p> <p> The 'slots' field is a list of slot ranges served by this shard, stored as pair of integers representing the inclusive start and end slots of the ranges. For example, if a node owns the slots 1, 2, 3, 5, 7, 8 and 9, the slots ranges would be stored as [1-3], [5-5], [7-9]. The slots field would therefore be represented by the following list of integers. </p> <pre tabindex="0"><code>1) 1) "slots" 2) 1) (integer) 1 2) (integer) 3 3) (integer) 5 4) (integer) 5 5) (integer) 7 6) (integer) 9 </code></pre> <p> The 'nodes' field contains a list of all nodes within the shard. Each individual node is a map of attributes that describe the node. Some attributes are optional and more attributes may be added in the future. The current list of attributes: </p> <ul> <li> id: The unique node id for this particular node. </li> <li> endpoint: The preferred endpoint to reach the node, see below for more information about the possible values of this field. </li> <li> ip: The IP address to send requests to for this node. </li> <li> hostname (optional): The announced hostname to send requests to for this node. </li> <li> port (optional): The TCP (non-TLS) port of the node. At least one of port or tls-port will be present. </li> <li> tls-port (optional): The TLS port of the node. At least one of port or tls-port will be present. </li> <li> role: The replication role of this node. </li> <li> replication-offset: The replication offset of this node. This information can be used to send commands to the most up to date replicas. </li> <li> health: Either <code> online </code> , <code> failed </code> , or <code> loading </code> . This information should be used to determine which nodes should be sent traffic. The <code> loading </code> health state should be used to know that a node is not currently eligible to serve traffic, but may be eligible in the future. </li> </ul> <p> The endpoint, along with the port, defines the location that clients should use to send requests for a given slot. A NULL value for the endpoint indicates the node has an unknown endpoint and the client should connect to the same endpoint it used to send the <code> CLUSTER SHARDS </code> command but with the port returned from the command. This unknown endpoint configuration is useful when the Redis nodes are behind a load balancer that Redis doesn't know the endpoint of. Which endpoint is set is determined by the <code> cluster-preferred-endpoint-type </code> config. An empty string <code> "" </code> is another abnormal value of the endpoint field, as well as for the ip field, which is returned if the node doesn't know its own IP address. This can happen in a cluster that consists of only one node or the node has not yet been joined with the rest of the cluster. The value <code> ? </code> is displayed if the node is incorrectly configured to use announced hostnames but no hostname is configured using <code> cluster-announce-hostname </code> . Clients may treat the empty string in the same way as NULL, that is the same endpoint it used to send the current command to, while <code> "?" </code> should be treated as an unknown node, not necessarily the same node as the one serving the current command. </p> <h2 id="examples"> Examples </h2> <pre tabindex="0"><code>&gt; CLUSTER SHARDS 1) 1) "slots" 2) 1) (integer) 0 2) (integer) 5460 3) "nodes" 4) 1) 1) "id" 2) "e10b7051d6bf2d5febd39a2be297bbaea6084111" 3) "port" 4) (integer) 30001 5) "ip" 6) "127.0.0.1" 7) "endpoint" 8) "127.0.0.1" 9) "role" 10) "master" 11) "replication-offset" 12) (integer) 72156 13) "health" 14) "online" 2) 1) "id" 2) "1901f5962d865341e81c85f9f596b1e7160c35ce" 3) "port" 4) (integer) 30006 5) "ip" 6) "127.0.0.1" 7) "endpoint" 8) "127.0.0.1" 9) "role" 10) "replica" 11) "replication-offset" 12) (integer) 72156 13) "health" 14) "online" 2) 1) "slots" 2) 1) (integer) 10923 2) (integer) 16383 3) "nodes" 4) 1) 1) "id" 2) "fd20502fe1b32fc32c15b69b0a9537551f162f1f" 3) "port" 4) (integer) 30003 5) "ip" 6) "127.0.0.1" 7) "endpoint" 8) "127.0.0.1" 9) "role" 10) "master" 11) "replication-offset" 12) (integer) 72156 13) "health" 14) "online" 2) 1) "id" 2) "6daa25c08025a0c7e4cc0d1ab255949ce6cee902" 3) "port" 4) (integer) 30005 5) "ip" 6) "127.0.0.1" 7) "endpoint" 8) "127.0.0.1" 9) "role" 10) "replica" 11) "replication-offset" 12) (integer) 72156 13) "health" 14) "online" 3) 1) "slots" 2) 1) (integer) 5461 2) (integer) 10922 3) "nodes" 4) 1) 1) "id" 2) "a4a3f445ead085eb3eb9ee7d8c644ec4481ec9be" 3) "port" 4) (integer) 30002 5) "ip" 6) "127.0.0.1" 7) "endpoint" 8) "127.0.0.1" 9) "role" 10) "master" 11) "replication-offset" 12) (integer) 72156 13) "health" 14) "online" 2) 1) "id" 2) "da6d5847aa019e9b9d2a8aa24a75f856fd3456cc" 3) "port" 4) (integer) 30004 5) "ip" 6) "127.0.0.1" 7) "endpoint" 8) "127.0.0.1" 9) "role" 10) "replica" 11) "replication-offset" 12) (integer) 72156 13) "health" 14) "online" </code></pre> <h2 id="resp2-reply"> RESP2 Reply </h2> <a href="../../develop/reference/protocol-spec#arrays"> Array reply </a> : a nested list of a map of hash ranges and shard nodes describing individual shards. <h2 id="resp3-reply"> RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#arrays"> Array reply </a> : a nested list of <a href="../../develop/reference/protocol-spec#maps"> Map reply </a> of hash ranges and shard nodes describing individual shards. <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/cluster-shards/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/hexpiretime/.html
<section class="prose w-full py-12"> <h1 class="command-name"> HEXPIRETIME </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">HEXPIRETIME key FIELDS numfields field [field ...]</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 7.4.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(N) where N is the number of arguments to the command </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @read </code> <span class="mr-1 last:hidden"> , </span> <code> @hash </code> <span class="mr-1 last:hidden"> , </span> <code> @fast </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Returns the absolute Unix timestamp in seconds since Unix epoch at which the given key's field(s) will expire. </p> <p> See also the <a href="/docs/latest/commands/hpexpiretime/"> <code> HPEXPIRETIME </code> </a> command, which returns the same information with millisecond resolution. </p> <h2 id="examples"> Examples </h2> <pre tabindex="0"><code>redis&gt; HSET mykey field1 "hello" field2 "world" (integer) 2 redis&gt; HEXPIRE mykey 300 FIELDS 2 field1 field2 1) (integer) 1 2) (integer) 1 redis&gt; HEXPIRETIME mykey FIELDS 2 field1 field2 1) (integer) 1715705914 2) (integer) 1715705914 </code></pre> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <ul> <li> <a href="../../develop/reference/protocol-spec#arrays"> Array reply </a> . For each field: <ul> <li> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : <code> -2 </code> if no such field exists in the provided hash key, or the provided key does not exist. </li> <li> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : <code> -1 </code> if the field exists but has no associated expiration set. </li> <li> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : the expiration (Unix timestamp) in seconds. </li> </ul> </li> </ul> <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/hexpiretime/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/acl-whoami/.html
<section class="prose w-full py-12"> <h1 class="command-name"> ACL WHOAMI </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">ACL WHOAMI</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 6.0.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(1) </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Return the username the current connection is authenticated with. New connections are authenticated with the "default" user. They can change user using <a href="/docs/latest/commands/auth/"> <code> AUTH </code> </a> . </p> <h2 id="examples"> Examples </h2> <pre tabindex="0"><code>&gt; ACL WHOAMI "default" </code></pre> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#bulk-strings"> Bulk string reply </a> : the username of the current connection. <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/acl-whoami/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>