url
stringlengths
38
157
content
stringlengths
72
15.1M
https://redis.io/docs/latest/commands/tdigest.reset/.html
<section class="prose w-full py-12"> <h1 class="command-name"> TDIGEST.RESET </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">TDIGEST.RESET key</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.4.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> Resets a t-digest sketch: empty the sketch and re-initializes it. </p> <h2 id="required-arguments"> Required arguments </h2> <details open=""> <summary> <code> key </code> </summary> is key name for an existing t-digest sketch. </details> <h2 id="return-value"> Return value </h2> <p> <a href="/docs/latest/develop/reference/protocol-spec/#simple-strings"> Simple string reply </a> - <code> OK </code> if executed correctly, or [] otherwise. </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; TDIGEST.RESET t </span></span><span class="line"><span class="cl">OK</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/tdigest.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/commands/smismember/.html
<section class="prose w-full py-12"> <h1 class="command-name"> SMISMEMBER </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">SMISMEMBER key member [member ...]</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.2.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 elements being checked for membership </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> @set </code> <span class="mr-1 last:hidden"> , </span> <code> @fast </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Returns whether each <code> member </code> is a member of the set stored at <code> key </code> . </p> <p> For every <code> member </code> , <code> 1 </code> is returned if the value is a member of the set, or <code> 0 </code> if the element is not a member of the set or if <code> key </code> does not exist. </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; SADD myset "one" (integer) 1 redis&gt; SADD myset "one" (integer) 0 redis&gt; SMISMEMBER myset "one" "notamember" 1) (integer) 1 2) (integer) 0 </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#arrays"> Array reply </a> : a list representing the membership of the given elements, in the same order as they are requested. <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/smismember/"/> <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-12/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise for Kubernetes 7.4.2-12 (May 2024) release notes </h1> <p class="text-lg -mt-5 mb-10"> This is a feature release with a new version of Redis Enterprise Software support for persistent volume expansion. </p> <h2 id="highlights"> Highlights </h2> <p> This release has many enhancements, most notably support for persistent volume expansion in the REC. Also, some essential changes in module handling support newer capabilities prompted by changes in the underlying Redis Enterprise around versioning. </p> <h2 id="new-in-this-release"> New in this release </h2> <h3 id="enhancements"> Enhancements </h3> <ul> <li> Support for persistent volume expansion in the REC (RED-84018) </li> <li> Ability to specify Redis version in REDB spec (RED-103945) </li> <li> Updated <a href="/docs/latest/operate/kubernetes/release-notes/7-4-2-releases/#supported-distributions"> supported distributions </a> (RED-119711) </li> <li> Ability to enable modules via REDB without specifying a module version (RED-116082) </li> <li> Dual Stack configuration support (RED-121897) </li> </ul> <h3 id="resolved-issues"> Resolved issues </h3> <ul> <li> Fixed case of client certificates being updated in a loop (RED-121633) </li> <li> Fixed issues disabling replication on REDB (RED-122721) </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> spec.persistentSpec.enablePersistentVolumeResize </td> <td> ADD </td> <td> Set to "true" to allow changes in volumeSize after REC creation (for sizing up only) </td> </tr> <tr> <td> REC </td> <td> status.persistenceStatus </td> <td> ADD </td> <td> Indicates the status of persistent volume expansion </td> </tr> <tr> <td> REC </td> <td> spec.redisEnterpriseIPFamily </td> <td> ADD </td> <td> Configure which IP family to use when Kubernetes cluster has Dual Stack networking enabled </td> </tr> <tr> <td> REDB </td> <td> spec.moduleList[x].version </td> <td> CHANGE </td> <td> Field is no longer mandatory </td> </tr> <tr> <td> REDB </td> <td> spec.upgradeSpec </td> <td> ADD </td> <td> New field allows configuration of module upgrade settings </td> </tr> <tr> <td> REDB </td> <td> spec.redisVersion </td> <td> CHANGE </td> <td> Now allows setting version numbers (Major.Minor) </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-129/#security"> Redis Enterprise 7.4.2-129 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="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> <h4 id="upcoming-changes"> Upcoming Changes </h4> <ul> <li> Future Redis Enterprise images will be UBI9-based only, without support for Ubuntu-based images. </li> </ul> <h3 id="supported-distributions"> Supported distributions </h3> <p> The following table shows supported distributions at the time of this release. You can also find this list in <a href="/docs/latest/operate/kubernetes/reference/supported_k8s_distributions/"> Supported Kubernetes distributions </a> . </p> <p> <span title="Check mark icon"> βœ… </span> Supported – This distribution is supported for this version of Redis Enterprise Software for Kubernetes. </p> <p> <span class="font-serif" title="Deprecation warning"> ⚠️ </span> Deprecated – This distribution is still supported for this version of Redis Enterprise Software for Kubernetes, but support will be removed in a future release. </p> <p> <span title="X icon"> ❌ </span> End of life – Support for this distribution ended. </p> <p> Any distribution not listed below is not supported for production workloads. </p> <table> <thead> <tr> <th> <strong> Kubernetes version </strong> </th> <th> <strong> 1.24 </strong> </th> <th> <strong> 1.25 </strong> </th> <th> <strong> 1.26 </strong> </th> <th> <strong> 1.27 </strong> </th> <th> <strong> 1.28 </strong> </th> <th> <strong> 1.29 </strong> </th> </tr> </thead> <tbody> <tr> <td> <strong> Community Kubernetes </strong> </td> <td> </td> <td> </td> <td> <span class="font-serif" title="Deprecation warning"> ⚠️ </span> </td> <td> <span title="Supported"> βœ… </span> </td> <td> <span title="Supported"> βœ… </span> </td> <td> <span title="Supported"> βœ… </span> </td> </tr> <tr> <td> <strong> Amazon EKS </strong> </td> <td> </td> <td> <span class="font-serif" title="Deprecation warning"> ⚠️ </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> <strong> Azure AKS </strong> </td> <td> </td> <td> </td> <td> <span class="font-serif" title="Deprecation warning"> ⚠️ </span> </td> <td> <span title="Supported"> βœ… </span> </td> <td> <span title="Supported"> βœ… </span> </td> <td> <span title="Supported"> βœ… </span> </td> </tr> <tr> <td> <strong> Google GKE </strong> </td> <td> </td> <td> <span class="font-serif" title="Deprecation warning"> ⚠️ </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> Rancher RKE2 </strong> </td> <td> <span title="X icon"> ❌ </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> <strong> VMware TKG 2.2 </strong> </td> <td> <span class="font-serif" title="Deprecation warning"> ⚠️ </span> </td> <td> <span class="font-serif" title="Deprecation warning"> ⚠️ </span> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> <strong> VMware TKG 2.3 </strong> </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> </tr> <tr> <td> <strong> VMware TKG 2.4 </strong> </td> <td> </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> <strong> OpenShift version </strong> </td> <td> <strong> 4.11 </strong> </td> <td> <strong> 4.12 </strong> </td> <td> <strong> 4.13 </strong> </td> <td> <strong> 4.14 </strong> </td> <td> <strong> 4.15 </strong> </td> <td> </td> </tr> <tr> <td> </td> <td> <span class="font-serif" title="Deprecation warning"> ⚠️ </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> <strong> VMware TKGI version </strong> </td> <td> <strong> 1.15 </strong> </td> <td> <strong> 1.16 </strong> </td> <td> <strong> 1.17 </strong> </td> <td> <strong> 1.18 </strong> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> <span title="X icon"> ❌ </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> </tbody> </table> <h2 id="downloads"> Downloads </h2> <ul> <li> <strong> Redis Enterprise </strong> : <code> redislabs/redis:7.4.2-129 </code> </li> <li> <strong> Operator </strong> : <code> redislabs/operator:7.4.2-12 </code> </li> <li> <strong> Services Rigger </strong> : <code> redislabs/k8s-controller:7.4.2-12 </code> </li> </ul> <h3 id="openshift-images"> OpenShift images </h3> <ul> <li> <strong> Redis Enterprise </strong> : <code> registry.connect.redhat.com/redislabs/redis-enterprise:7.4.2-129.rhel8-openshift </code> </li> <li> <strong> Operator </strong> : <code> registry.connect.redhat.com/redislabs/redis-enterprise-operator:7.4.2-12 </code> </li> <li> <strong> Services Rigger </strong> : <code> registry.connect.redhat.com/redislabs/services-manager:7.4.2-12 </code> </li> </ul> <h3 id="olm-bundle"> OLM bundle </h3> <p> <strong> Redis Enterprise operator bundle </strong> : <code> v7.4.2-12.0 </code> </p> <h2 id="known-limitations"> Known limitations </h2> <h3 id="new-limitations"> New limitations </h3> <ul> <li> <strong> Missing endpoint for admission endpoint (rare) (RED-119469) </strong> Restart the operator pod. </li> </ul> <h3 id="existing-limitations"> Existing limitations </h3> <ul> <li> <p> <strong> The REDB β€œredisVersion” field can’t be used for memcached databases(RED-119152) </strong> </p> </li> <li> <p> <strong> When modifying the database suffix for an Active-Active database, while the service-rigger is in a terminating state, the services-rigger will delete and create the ingress or route resources in a loop (RED-107687) </strong> Wait until the services rigger pod has finished to terminate it. </p> </li> <li> <p> <strong> REAADB changes might fail with "gateway timeout" errors, mostly on OpenShift (RED-103048) </strong> Retry the operation. </p> </li> <li> <p> <strong> Creating two databases with the same name directly on Redis Enterprise software will cause the service to be deleted and the database will not be available (RED-99997) </strong> Avoid duplicating database names. Database creation via K8s has validation in place to prevent this. </p> </li> <li> <p> <strong> Installing the operator bundle produces warning: <code> Warning: would violate PodSecurity "restricted: v1.24" </code> (RED-97381) </strong> Ignore the warning. This issue is documented as benign on official Red Hat documentation. </p> </li> <li> <p> <strong> RERC resources must have a unique name (RED-96302) </strong> The string "rec-name"/"rec-namespace" must be different from all other participating clusters in the Active-Active database. </p> </li> <li> <p> <strong> Admission is not blocking REAADB with <code> shardCount </code> which exceeds license quota (RED-96301) </strong> Fix the problems with the REAADB and reapply. </p> </li> <li> <p> <strong> Active-Active controller only supports global database options. Configuration specific to location is not supported (RED-86490) </strong> </p> </li> <li> <p> <strong> Active-Active setup removal might keep services or routes undeleted (RED-77752) </strong> Delete services or routes manually if you encounter this problem. </p> </li> <li> <p> <strong> <code> autoUpgrade </code> set to <code> true </code> can cause unexpected bdb upgrades when <code> redisUpgradePolicy </code> is set to <code> true </code> (RED-72351) </strong> Contact support if your deployment is impacted. </p> </li> <li> <p> <strong> Following the previous quick start guide version causes issues with creating an REDB due to unrecognized memory field name (RED-69515) </strong> The workaround is to use the newer (current) revision of Deploy Redis Enterprise Software for Kubernetes. </p> </li> <li> <p> <strong> PVC size issues when using decimal value in spec (RED-62132) </strong> Make sure you use integer values for the PVC size. </p> </li> <li> <p> <strong> REC might report error states on initial startup (RED-61707) </strong> There is no workaround at this time except to ignore the errors. </p> </li> <li> <p> <strong> Hashicorp Vault integration - no support for Gesher (RED-55080) </strong> There is no workaround for this issue. Gesher support has been deprecated. </p> </li> <li> <p> <strong> REC clusters fail to start on Kubernetes clusters with unsynchronized clocks (RED-47254) </strong> When REC clusters are deployed on Kubernetes clusters without synchronized clocks, the REC cluster does not start correctly. The fix is to use NTP to synchronize the underlying K8s nodes. </p> </li> <li> <p> <strong> Deleting an OpenShift project with an REC deployed may hang (RED-47192) </strong> When an 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. Therefore, until the REDB resources are deleted, the project deletion will hang. The fix is to delete the REDB resources first and the REC second. Then, you can delete the project. </p> </li> <li> <p> <strong> Clusters must be named 'rec' in OLM-based deployments (RED-39825) </strong> 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 (namely, "rec"). The workaround is to name the cluster "rec". </p> </li> <li> <p> <strong> Readiness probe incorrect on failures (RED-39300) </strong> STS Readiness probe does not mark a node as "not ready" when running <code> rladmin status </code> on node failure. </p> </li> <li> <p> <strong> Internal DNS and Kubernetes DNS may have conflicts (RED-37462) </strong> 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> <strong> K8s-based 5.4.10 clusters seem to negatively affect existing 5.4.6 clusters (RED-37233) </strong> Upgrade clusters to latest version. </p> </li> <li> <p> <strong> Node CPU usage is reported instead of pod CPU usage (RED-36884) </strong> In Kubernetes, the reported node CPU usage is the usage of the Kubernetes worker node hosting the REC pod. </p> </li> <li> <p> <strong> An unreachable cluster has status running (RED-32805) </strong> When a cluster is in an unreachable state, the state remains <code> running </code> instead of triggering an error. </p> </li> <li> <p> <strong> Long cluster names cause routes to be rejected (RED-25871) </strong> A cluster name longer than 20 characters will result in a rejected route configuration because the host part of the domain name exceeds 63 characters. The workaround is to limit the cluster name to 20 characters or fewer. </p> </li> <li> <p> <strong> Cluster CR (REC) errors are not reported after invalid updates (RED-25542) </strong> A cluster CR specification error is not reported if two or more invalid CR resources are updated in sequence. </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/7-4-2-releases/7-4-2-12/"/> <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/cluster_info/.html
<section class="prose w-full py-12 max-w-none"> <h1> CRDB cluster info object </h1> <p class="text-lg -mt-5 mb-10"> An object that represents Active-Active cluster info </p> <p> Configuration details for a cluster that is part of an Active-Active database. </p> <table> <thead> <tr> <th> Name </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> credentials </td> <td> <pre><code> { "username": string, "password": string } </code></pre> </td> <td> Cluster access credentials (required) </td> </tr> <tr> <td> name </td> <td> string </td> <td> Cluster fully qualified name, used to uniquely identify the cluster. Typically this is the same as the hostname used in the URL, although in some configruations the URL may point to a different name/address. (required) </td> </tr> <tr> <td> replication_endpoint </td> <td> string </td> <td> Address to use for peer replication. If not specified, it is assumed that standard cluster naming conventions apply. </td> </tr> <tr> <td> replication_tls_sni </td> <td> string </td> <td> Cluster SNI for TLS connections </td> </tr> <tr> <td> url </td> <td> string </td> <td> Cluster access URL (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/crdb/cluster_info/"/> <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-43/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise Software release notes 6.4.2-43 (March 2023) </h1> <p class="text-lg -mt-5 mb-10"> Ubuntu 20.04 support. Safe node removal. Allow gossip_envoy port configuration. </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> <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-43 March release) </th> </tr> </thead> <tbody> <tr> <td> Ubuntu 16 </td> <td> bb3d3ab7590834790d2d9d9e3dcdf788 </td> </tr> <tr> <td> Ubuntu 18 </td> <td> 55e99e6db76277c15fa46c49d58995b5 </td> </tr> <tr> <td> Ubuntu 20 </td> <td> cccfa62ca7ea955b8c19d9c40bdc1fea </td> </tr> <tr> <td> RedHat Enterprise Linux (RHEL) 7 <br/> Oracle Enterprise Linux (OL) 7 </td> <td> eed4083b0b4c066d31ea9b8ba60a34f5 </td> </tr> <tr> <td> RedHat Enterprise Linux (RHEL) 8 <br/> Oracle Enterprise Linux (OL) 8 <br/> Rocky Enterprise Linux </td> <td> 7fd4321f6a5502c76197fc039f44ffa3 </td> </tr> </tbody> </table> <h2 id="new-features-and-enhancements"> New features and enhancements </h2> <h4 id="support-for-ubuntu-20"> Support for Ubuntu 20 </h4> <p> Added operating system support for Ubuntu 20.04. </p> <h4 id="validate-client-certificates-by-subject-attributes"> Validate client certificates by subject attributes </h4> <ul> <li> <p> Added the ability to enter multiple <code> Organizational Unit (OU) </code> values to a certificate validation's subject entry. Subject validation only succeeds if all <code> OU </code> values match. </p> </li> <li> <p> Validation fails if the certificate’s subject contains an extra field which is missing from the certificate’s configured subject (empty field). </p> </li> </ul> <h4 id="safe-node-removal-rs92095"> Safe node removal (RS92095) </h4> <p> As of this release, the node removal task waits for persistence files to be created on a new node before finishing removal. For more information, see <a href="/docs/latest/operate/rs/clusters/remove-node/"> Remove a cluster node </a> and <a href="https://docs.redis.com/latest/rs/references/cli-utilities/rladmin/node/remove/"> <code> rladmin node remove </code> </a> . </p> <h4 id="allow-port-configuration-for-gossip_envoy-service-rs72028"> Allow port configuration for gossip_envoy service (RS72028) </h4> <p> You can use the REST API to configure the <code> gossip_envoy_admin_port </code> during bootstrapping or runtime. See the <a href="/docs/latest/operate/rs/references/rest-api/objects/cluster/"> cluster object reference </a> for more details. </p> <p> Support for <code> rladmin </code> will be added in a future 6.4.2 maintenance release. </p> <h4 id="redis-stack-v626"> Redis Stack v6.2.6 </h4> <p> Redis Enterprise Software v6.4.2 includes the new features delivered in the latest <a href="https://redis.com/blog/introducing-redis-stack-6-2-6-and-7-0-6/"> Redis Stack release (v6.2.6) </a> : </p> <ul> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-2.6-release-notes/#v264-december-2022"> RediSearch v2.6.4 </a> </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisjson/redisjson-2.4-release-notes/#v245-february-2023"> RedisJSON v2.4.5 </a> </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/bloom/release-notes/redisbloom-2.4-release-notes/#v24-ga-v243-november-2022"> RedisBloom v2.4.3 </a> </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisgraph/redisgraph-2.10-release-notes/#v2105-december-2022"> RedisGraph v2.10.5 </a> </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redistimeseries/redistimeseries-1.8-release-notes/#v185-january-2023"> RedisTimeSeries v1.8.5 </a> </p> </li> </ul> <p> See <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module/"> Upgrade modules </a> to learn how to upgrade a module for a database. </p> <h2 id="resolved-issues"> Resolved issues </h2> <ul> <li> <p> RS95344 - Fix custom installation linkage bug for files related to Active-Active </p> </li> <li> <p> RS91554 - Enhance visibility of <code> redis_mgr </code> </p> </li> <li> <p> RS90496 - Improve cross-node communication to support failovers </p> </li> <li> <p> RS93004 - Allow positive <code> audit_port </code> configuration </p> </li> <li> <p> RS58918 - Reduce the number of clients blocked by flushing a database. Only the client that requested the flush will be blocked until the action finishes. Other clients won't be affected. </p> </li> <li> <p> RS85447 - When creating a database, the memory size is total memory for the database, not the total dataset size. Therefore, if you enable replication and the database has two shards, each shard will have half of the allocated memory size. </p> </li> <li> <p> RS90556 - <code> Heartbeatd </code> - upgrade <a href="https://crates.io/crates/sysinfo"> <code> sysinfo </code> </a> dependency 0.19.1 -&gt; 0.27.7 </p> </li> <li> <p> RS93566 - Added <a href="/docs/latest/operate/rs/references/cli-utilities/rlcheck/"> <code> rlcheck </code> </a> validation step to verify that all needed modules (modules used during the initial creation of any CRDBs on the cluster) are actually available on the cluster. In some cases, if a specific module version is required, the user will need to upload it in order to upgrade the cluster. After the upgrade is complete, you can delete the required module. </p> </li> </ul> <h2 id="known-limitations"> Known limitations </h2> <h3 id="feature-limitations"> Feature limitations </h3> <h4 id="resharding-fails-for-rack-aware-databases-with-no-replication"> Resharding fails for rack-aware databases with no replication </h4> <p> When a database is configured as <a href="/docs/latest/operate/rs/clusters/configure/rack-zone-awareness/"> rack-aware </a> and replication is turned off, the resharding operation fails. </p> <p> RS97971 - This limitation will be fixed in a future 6.4.2 maintenance release. </p> <p> Workaround: </p> <p> Before resharding your database, turn off rack awareness: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">curl -k -u <span class="s2">"&lt;user&gt;:&lt;password&gt;"</span> -H <span class="s2">"Content-type: application/json"</span> -d <span class="s1">'{"rack_aware": false}'</span> -X PUT <span class="s2">"https://localhost:9443/v1/bdbs/&lt;bdb_uid&gt;"</span> </span></span></code></pre> </div> <p> After the resharding process is complete, you can re-enable rack awareness: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">curl -k -u <span class="s2">"&lt;user&gt;:&lt;password&gt;"</span> -H <span class="s2">"Content-type: application/json"</span> -d <span class="s1">'{"rack_aware": true}'</span> -X PUT <span class="s2">"https://localhost:9443/v1/bdbs/&lt;bdb_uid&gt;"</span> </span></span></code></pre> </div> <h3 id="operating-system-limitations"> Operating system limitations </h3> <h4 id="rhel-7-and-rhel-8"> RHEL 7 and RHEL 8 </h4> <p> RS95344 - CRDB database will not start on Redis Enterprise v6.4.2 with a custom installation path. </p> <p> For a workaround, use the following commands to add the relevant CRDB files to the Redis library: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ yum install -y chrpath </span></span><span class="line"><span class="cl">$ find <span class="nv">$installdir</span> -name <span class="s2">"crdt.so"</span> <span class="p">|</span> xargs -n1 -I <span class="o">{}</span> /bin/bash -c <span class="s1">'chrpath -r ${libdir} {}'</span> </span></span></code></pre> </div> <p> This limitation will be fixed in a future 6.4.2 maintenance release. </p> <h4 id="ubuntu-2004"> Ubuntu 20.04 </h4> <p> By default, you cannot use the SHA1 hash algorithm ( <a href="https://manpages.ubuntu.com/manpages/focal/man3/SSL_CTX_set_security_level.3ssl.html#notes"> OpenSSL’s default security level is set to 2 </a> ). The operating system will reject SHA1 certificates even if the <code> mtls_allow_weak_hashing </code> option is enabled. You need to replace SHA1 certificates with newer certificates that use SHA-256. Note that the certificates provided with Redis Enterprise Software use SHA-256. </p> <h4 id="ubuntu-16-18-20"> Ubuntu 16, 18, 20 </h4> <p> RS95824 - An error occurs when running <code> rl_rdbconvert </code> manually. </p> <p> As a workaround, run the following command: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl"><span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span><span class="nv">$libdir</span> rl_rdbconvert </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/release-notes/rs-6-4-2-releases/rs-6-4-2-43/"/> <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/configure/.html
<section class="prose w-full py-12 max-w-none"> <h1> Configure database settings </h1> <p class="text-lg -mt-5 mb-10"> Configure settings specific to each database. </p> <p> You can manage your Redis Enterprise Software databases with several tools: </p> <ul> <li> <p> <a href="#edit-database-settings"> Cluster Manager UI </a> (the web-based user interface) </p> </li> <li> <p> Command-line tools: </p> <ul> <li> <p> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/"> <code> rladmin </code> </a> for standalone database configuration </p> </li> <li> <p> <a href="/docs/latest/operate/rs/references/cli-utilities/crdb-cli/"> <code> crdb-cli </code> </a> for Active-Active database configuration </p> </li> <li> <p> <a href="/docs/latest/develop/tools/cli/"> <code> redis-cli </code> </a> for Redis Community Edition configuration </p> </li> </ul> </li> <li> <p> <a href="/docs/latest/operate/rs/references/rest-api/"> REST API </a> </p> </li> </ul> <h2 id="edit-database-settings"> Edit database settings </h2> <p> You can change the configuration of a Redis Enterprise Software database at any time. </p> <p> To edit the configuration of a database using the Cluster Manager UI: </p> <ol> <li> <p> On the <strong> Databases </strong> screen, select the database you want to edit. </p> </li> <li> <p> From the <strong> Configuration </strong> tab, select <strong> Edit </strong> . </p> </li> <li> <p> Change any <a href="#config-settings"> configurable database settings </a> . </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 <a href="/docs/latest/operate/rs/databases/active-active/"> Active-Active database instances </a> , most database settings only apply to the instance that you are editing. </div> </div> </li> <li> <p> Select <strong> Save </strong> . </p> </li> </ol> <h2 id="config-settings"> Configuration settings </h2> <h3 id="general"> General </h3> <ul> <li> <p> <a href="/docs/latest/operate/rs/databases/configure/db-tags/"> <strong> Tags </strong> </a> - Add custom tags to categorize the database. </p> </li> <li> <p> <strong> Database version </strong> - Select the Redis version when you create a database. </p> </li> <li> <p> <strong> Database name </strong> - The database name requirements are: </p> <ul> <li> <p> Maximum of 63 characters </p> </li> <li> <p> Only letters, numbers, or hyphens (-) are valid characters </p> </li> <li> <p> Must start and end with a letter or digit </p> </li> <li> <p> Case-sensitive </p> </li> </ul> </li> <li> <p> <strong> Endpoint port number </strong> - You can define the port number that clients use to connect to the database. Otherwise, a port is randomly selected. </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> You cannot change the <a href="/docs/latest/operate/rs/networking/port-configurations/"> port number </a> after the database is created. </div> </div> </li> </ul> <h3 id="capacity"> Capacity </h3> <ul> <li> <p> <strong> Memory limit </strong> - <a href="/docs/latest/operate/rs/databases/memory-performance/memory-limit/"> Database memory limits </a> include all database replicas and shards, including replica shards in database replication and database shards in database clustering. </p> <p> If the total size of the database in the cluster reaches the memory limit, the memory eviction policy for the database is enforced. </p> </li> <li> <p> <strong> RAM limit </strong> - If you create a database with Auto Tiering enabled, you also need to set the RAM-to-Flash ratio. Minimum RAM is 10%. Maximum RAM is 50%. </p> </li> <li> <p> <a href="/docs/latest/operate/rs/databases/memory-performance/eviction-policy/"> <strong> Memory eviction </strong> </a> - By default, when the total size of the database reaches its memory limit, the database evicts keys according to the least recently used keys out of all keys with an "expire" field set to make room for new keys. You can select a different eviction policy. </p> </li> </ul> <h3 id="capabilities"> Capabilities </h3> <p> When you create a new in-memory database, you can enable multiple Redis Stack <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/"> <strong> Capabilities </strong> </a> . </p> <p> For Auto Tiering databases, you can enable capabilities that support Auto Tiering. See <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities/"> Redis Enterprise and Redis Stack feature compatibility </a> for compatibility details. </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 Stack capabilities, enable them when you create a new database. You cannot enable them after database creation. </div> </div> <p> To add capabilities to the database: </p> <ol> <li> <p> In the <strong> Capabilities </strong> section, select one or more capabilities. </p> </li> <li> <p> To customize capabilities, click <strong> Parameters </strong> and enter the optional custom configuration. </p> </li> <li> <p> Click <strong> Done </strong> . </p> </li> </ol> <p> To change capabilities' parameters for an existing database using the Cluster Manager UI: </p> <ol> <li> <p> In the <strong> Capabilities </strong> section, click <strong> Edit Parameters </strong> . </p> </li> <li> <p> After you finish editing the module's configuration parameters, click <strong> Done </strong> to close the parameter editor. </p> </li> </ol> <h3 id="high-availability"> High Availability </h3> <ul> <li> <p> <a href="/docs/latest/operate/rs/databases/durability-ha/replication/"> <strong> Replication </strong> </a> - We recommend you use intra-cluster replication to create replica shards for each database for high availability. </p> <p> If the cluster is configured to support <a href="/docs/latest/operate/rs/clusters/configure/rack-zone-awareness/"> rack-zone awareness </a> , you can also enable rack-zone awareness for the database. </p> </li> <li> <p> <a href="/docs/latest/operate/rs/databases/configure/replica-ha/"> <strong> Replica high availability </strong> </a> - Automatically migrates replica shards to an available node if a replica node fails or is promoted to primary. </p> </li> </ul> <h3 id="clustering"> Clustering </h3> <ul> <li> <p> <strong> Enable sharding </strong> - You can either: </p> <ul> <li> <p> Turn on sharding to enable <a href="/docs/latest/operate/rs/databases/durability-ha/clustering/"> database clustering </a> and select the number of database shards. </p> <p> When database clustering is enabled, databases are subject to limitations on <a href="/docs/latest/operate/rs/databases/durability-ha/clustering/"> Multi-key commands </a> . </p> <p> You can increase the number of shards in the database at any time. </p> </li> <li> <p> Turn off sharding to use only one shard so that you can use <a href="/docs/latest/operate/rs/databases/durability-ha/clustering/"> Multi-key commands </a> without the limitations. </p> </li> </ul> </li> <li> <p> <a href="/docs/latest/operate/rs/databases/memory-performance/shard-placement-policy/"> <strong> Shards placement </strong> </a> - Determines how to distribute database shards across nodes in the cluster. </p> <ul> <li> <p> <em> Dense </em> places shards on the smallest number of nodes. </p> </li> <li> <p> <em> Sparse </em> spreads shards across many nodes. </p> </li> </ul> </li> <li> <p> <a href="/docs/latest/operate/rs/databases/configure/oss-cluster-api/"> <strong> OSS Cluster API </strong> </a> - The OSS Cluster API configuration allows access to multiple endpoints for increased throughput. </p> <p> This configuration requires clients to connect to the primary node to retrieve the cluster topology before they can connect directly to proxies on each node. </p> <p> When you enable the OSS Cluster API, shard placement changes to <em> Sparse </em> , and the database proxy policy changes to <em> All primary shards </em> automatically. </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> You must use a client that supports the cluster API to connect to a database that has the cluster API enabled. </div> </div> </li> <li> <p> <strong> Hashing policy </strong> - You can accept the <a href="/docs/latest/operate/rs/databases/durability-ha/clustering/#standard-hashing-policy"> standard hashing policy </a> , which is compatible with Redis Community Edition, or define a <a href="/docs/latest/operate/rs/databases/durability-ha/clustering/#custom-hashing-policy"> custom hashing policy </a> to define where keys are located in the clustered database. </p> </li> <li> <p> <a href="/docs/latest/operate/rs/databases/configure/proxy-policy/"> <strong> Database proxy </strong> </a> - Determines the number and location of active proxies, which manage incoming database operation requests. </p> </li> </ul> <h3 id="durability"> Durability </h3> <ul> <li> <p> <a href="/docs/latest/operate/rs/databases/configure/database-persistence/"> <strong> Persistence </strong> </a> - To protect against loss of data stored in RAM, you can enable data persistence and store a copy of the data on disk with snapshots or an append-only file. </p> </li> <li> <p> <strong> Scheduled backup </strong> - You can configure <a href="/docs/latest/operate/rs/databases/import-export/schedule-backups/"> periodic backups </a> of the database, including the interval and backup location parameters. </p> </li> </ul> <h3 id="tls"> TLS </h3> <p> You can require <a href="/docs/latest/operate/rs/security/encryption/tls/"> <strong> TLS </strong> </a> encryption and authentication for all communications, TLS encryption and authentication for Replica Of communication only, and TLS authentication for clients. </p> <h3 id="access-control"> Access control </h3> <ul> <li> <p> <strong> Unauthenticated access </strong> - You can access the database as the default user without providing credentials. </p> </li> <li> <p> <strong> Password-only authentication </strong> - When you configure a password for your database's default user, all connections to the database must authenticate with the <a href="/docs/latest/commands/auth/"> AUTH command </a> . </p> <p> If you also configure an access control list, connections can specify other users for authentication, and requests are allowed according to the Redis ACLs specified for that user. </p> <p> Creating a database without ACLs enables a <em> default </em> user with full access to the database. You can secure default user access by requiring a password. </p> </li> <li> <p> <strong> Access Control List </strong> - You can specify the <a href="/docs/latest/operate/rs/security/access-control/create-db-roles/"> user roles </a> that have access to the database and the <a href="/docs/latest/operate/rs/security/access-control/redis-acl-overview/"> Redis ACLs </a> that apply to those connections. </p> <p> To define an access control list for a database: </p> <ol> <li> <p> In <strong> Security &gt; Access Control &gt; Access Control List </strong> , select <strong> + Add ACL </strong> . </p> </li> <li> <p> Select a <a href="/docs/latest/operate/rs/security/access-control/create-db-roles/"> role </a> to grant database access. </p> </li> <li> <p> Associate a <a href="/docs/latest/operate/rs/security/access-control/create-db-roles/"> Redis ACL </a> with the role and database. </p> </li> <li> <p> Select the check mark to add the ACL. </p> </li> </ol> </li> </ul> <h3 id="alerts"> Alerts </h3> <p> Select <a href="/docs/latest/operate/rs/clusters/monitoring/#database-alerts"> alerts </a> to show in the database status and configure their thresholds. </p> <p> You can also choose to <a href="/docs/latest/operate/rs/clusters/monitoring/#send-alerts-by-email"> send alerts by email </a> to relevant users. </p> <h3 id="replica-of"> Replica Of </h3> <p> With <a href="/docs/latest/operate/rs/databases/import-export/replica-of/create/"> <strong> Replica Of </strong> </a> , you can make the database a repository for keys from other databases. </p> <h3 id="resp3-support"> RESP3 support </h3> <p> <a href="/docs/latest/develop/reference/protocol-spec/"> RESP </a> (Redis Serialization Protocol) is the protocol clients use to communicate with Redis databases. If you enable RESP3 support, the database will support the RESP3 protocol in addition to RESP2. </p> <p> For more information about Redis Software's compatibility with RESP3, see <a href="/docs/latest/operate/rs/references/compatibility/resp/"> RESP compatibility with Redis Enterprise </a> . </p> <h3 id="internode-encryption"> Internode encryption </h3> <p> Enable <strong> Internode encryption </strong> to encrypt data in transit between nodes for this database. See <a href="/docs/latest/operate/rs/security/encryption/internode-encryption/"> Internode encryption </a> for more information. </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/configure/"/> <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/active-active/create/.html
<section class="prose w-full py-12 max-w-none"> <h1> Create an Active-Active geo-replicated database </h1> <p class="text-lg -mt-5 mb-10"> How to create an Active-Active database and things to consider when setting it up. </p> <p> <a href="/docs/latest/operate/rs/databases/active-active/"> Active-Active geo-replicated databases </a> (formerly known as CRDBs) give applications write access to replicas of the dataset in different geographical locations. </p> <p> The participating Redis Enterprise Software clusters that host the instances can be distributed in different geographic locations. Every instance of an Active-Active database can receive write operations, and all operations are <a href="/docs/latest/operate/rs/databases/active-active/develop/#example-of-synchronization"> synchronized </a> to all instances without conflict. </p> <h2 id="steps-to-create-an-active-active-database"> Steps to create an Active-Active database </h2> <ol> <li> <strong> Create a service account </strong> - On each participating cluster, create a dedicated user account with the Admin role. </li> <li> <strong> Confirm connectivity </strong> - Confirm network connectivity between the participating clusters. </li> <li> <strong> Create Active-Active database </strong> - Connect to one of your clusters and create a new Active-Active database. </li> <li> <strong> Add participating clusters </strong> - Add the participating clusters to the Active-Active database with the user credentials for the service account. </li> <li> <strong> Verify creation </strong> - Log in to each of the participating clusters and verify your Active-Active database was created on them. </li> <li> <strong> Confirm Active-Active database synchronization </strong> - Test writing to one cluster and reading from a different cluster. </li> </ol> <h2 id="prerequisites"> Prerequisites </h2> <ul> <li> Two or more machines with the same version of Redis Enterprise Software installed </li> <li> Network connectivity and cluster FQDN name resolution between all participating clusters </li> <li> <a href="/docs/latest/operate/rs/databases/active-active/#network-time-service-ntp-or-chrony"> Network time service </a> listener (ntpd) configured and running on each node in all clusters </li> </ul> <h2 id="create-an-active-active-database"> Create an Active-Active database </h2> <ol> <li> <p> Create service accounts on each participating cluster: </p> <ol> <li> <p> In a browser, open the Cluster Manager UI for the participating cluster. </p> <p> The default address is: <code> https://&lt;RS_address&gt;:8443 </code> </p> </li> <li> <p> Go to the <strong> Access Control &gt; Users </strong> tab: </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> Click <strong> + Add user </strong> . </p> </li> <li> <p> Enter the username, email, and password for the user. </p> </li> <li> <p> Select the <strong> Admin </strong> role. </p> </li> <li> <p> Click <strong> Save </strong> . </p> </li> </ol> </li> <li> <p> To verify network connectivity between participating clusters, run the following <code> telnet </code> command from each participating cluster to all other participating clusters: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">telnet &lt;target FQDN&gt; <span class="m">9443</span> </span></span></code></pre> </div> </li> <li> <p> In a browser, open the Cluster Manager UI of the cluster where you want to create the Active-Active database. </p> <p> The default address is: <code> https://&lt;RS_address&gt;:8443 </code> </p> </li> <li> <p> Open the <strong> Create database </strong> menu with one of the following methods: </p> <ul> <li> <p> Click the <strong> + </strong> button next to <strong> Databases </strong> in the navigation menu: </p> <a href="/docs/latest/images/rs/screenshots/databases/create-db-plus-drop-down.png" sdata-lightbox="/images/rs/screenshots/databases/create-db-plus-drop-down.png"> <img alt="Create database menu has two options: Single Region and Active-Active database." src="/docs/latest/images/rs/screenshots/databases/create-db-plus-drop-down.png" width="350px"/> </a> </li> <li> <p> Go to the <strong> Databases </strong> screen and select <strong> Create database </strong> : </p> <a href="/docs/latest/images/rs/screenshots/databases/create-db-button-drop-down.png" sdata-lightbox="/images/rs/screenshots/databases/create-db-button-drop-down.png"> <img alt="Create database menu has two options: Single Region and Active-Active database." src="/docs/latest/images/rs/screenshots/databases/create-db-button-drop-down.png" width="350px"/> </a> </li> </ul> </li> <li> <p> Select <strong> Active-Active database </strong> . </p> </li> <li> <p> Enter the cluster's local admin credentials, then click <strong> Save </strong> : </p> <a href="/docs/latest/images/rs/screenshots/databases/active-active-databases/enter-local-admin-credentials.png" sdata-lightbox="/images/rs/screenshots/databases/active-active-databases/enter-local-admin-credentials.png"> <img alt="Enter the cluster's admin username and password." src="/docs/latest/images/rs/screenshots/databases/active-active-databases/enter-local-admin-credentials.png"/> </a> </li> <li> <p> Add participating clusters that will host instances of the Active-Active database: </p> <ol> <li> <p> In the <strong> Participating clusters </strong> section, go to <strong> Other participating clusters </strong> and click <strong> + Add cluster </strong> . </p> </li> <li> <p> In the <strong> Add cluster </strong> configuration panel, enter the new cluster's URL, port number, and the admin username and password for the new participating cluster: </p> <a href="/docs/latest/images/rs/screenshots/databases/active-active-databases/create-db-add-participating-clusters.png" sdata-lightbox="/images/rs/screenshots/databases/active-active-databases/create-db-add-participating-clusters.png"> <img alt="Add cluster panel." src="/docs/latest/images/rs/screenshots/databases/active-active-databases/create-db-add-participating-clusters.png"/> </a> <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> If an Active-Active database <a href="/docs/latest/operate/rs/databases/auto-tiering/"> runs on flash memory </a> , you cannot add participating clusters that run on RAM only. </div> </div> </li> <li> <p> Click <strong> Join cluster </strong> to add the cluster to the list of participating clusters. </p> </li> </ol> </li> <li> <p> Enter a <strong> Database name </strong> . </p> </li> <li> <p> If your cluster supports <a href="/docs/latest/operate/rs/databases/auto-tiering/"> Auto Tiering </a> , in <strong> Runs on </strong> you can select <strong> Flash </strong> so that your database uses Flash memory. We recommend that you use AOF every 1 sec for the best performance during the initial Active-Active database sync of a new replica. </p> </li> <li> <p> To configure additional database settings, expand each relevant section to make changes. </p> <p> See <a href="#configuration-settings"> Configuration settings </a> for more information about each setting. </p> </li> <li> <p> Click <strong> Create </strong> . </p> </li> </ol> <h2 id="configuration-settings"> Configuration settings </h2> <ul> <li> <p> <strong> Database version </strong> - The Redis version used by your database. </p> </li> <li> <p> <strong> Database name </strong> - The database name requirements are: </p> <ul> <li> <p> Maximum of 63 characters </p> </li> <li> <p> Only letters, numbers, or hyphens (-) are valid characters </p> </li> <li> <p> Must start and end with a letter or digit </p> </li> <li> <p> Case-sensitive </p> </li> </ul> </li> <li> <p> <strong> Port </strong> - You can define the port number that clients use to connect to the database. Otherwise, a port is randomly selected. </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> You cannot change the <a href="/docs/latest/operate/rs/networking/port-configurations/"> port number </a> after the database is created. </div> </div> </li> <li> <p> <strong> Memory limit </strong> - <a href="/docs/latest/operate/rs/databases/memory-performance/memory-limit/"> Database memory limits </a> include all database replicas and shards, including replica shards in database replication and database shards in database clustering. </p> <p> If the total size of the database in the cluster reaches the memory limit, the data eviction policy for the database is enforced. </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> If you create a database with Auto Tiering enabled, you also need to set the RAM-to-Flash ratio for this database. Minimum RAM is 10%. Maximum RAM is 50%. </div> </div> </li> <li> <p> <strong> Memory eviction </strong> - The default <a href="/docs/latest/operate/rs/databases/memory-performance/eviction-policy/"> eviction policy </a> for Active-Active databases is <code> noeviction </code> . Redis Enterprise versions 6.0.20 and later support all eviction policies for Active-Active databases, unless <a href="/docs/latest/operate/rs/databases/auto-tiering/"> Auto Tiering </a> is enabled. </p> </li> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/"> <strong> Capabilities </strong> </a> (previously <strong> Modules </strong> ) - When you create a new in-memory database, you can enable multiple Redis Stack capabilities in the database. For Auto Tiering databases, you can enable capabilities that support Auto Tiering. See <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities/"> Redis Enterprise and Redis Stack feature compatibility </a> for compatibility details. </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 Stack capabilities, enable them when you create a new database. You cannot enable them after database creation. </div> </div> <p> To add capabilities to the database: </p> <ol> <li> <p> In the <strong> Capabilities </strong> section, select one or more capabilities. </p> </li> <li> <p> To customize capabilities, select <strong> Parameters </strong> and enter the optional custom configuration. </p> </li> <li> <p> Select <strong> Done </strong> . </p> </li> </ol> </li> </ul> <h3 id="tls"> TLS </h3> <p> If you enable TLS when you create the Active-Active database, the nodes use the TLS mode <strong> Require TLS for CRDB communication only </strong> to require TLS authentication and encryption for communications between participating clusters. </p> <p> After you create the Active-Active database, you can set the TLS mode to <strong> Require TLS for all communications </strong> so client communication from applications are also authenticated and encryption. </p> <h3 id="high-availability"> High availability </h3> <ul> <li> <p> <a href="/docs/latest/operate/rs/databases/durability-ha/replication/"> <strong> Replication </strong> </a> - We recommend that all Active-Active database use replication for best intercluster synchronization performance. </p> <p> When replication is enabled, every Active-Active database master shard is replicated to a corresponding replica shard. The replica shards are then used to synchronize data between the instances, and the master shards are dedicated to handling client requests. </p> </li> <li> <p> <a href="/docs/latest/operate/rs/databases/configure/replica-ha/"> <strong> Replica high availability </strong> </a> - We also recommend that you enable replica high availability to ensure replica shards are highly-available for this synchronization. </p> </li> </ul> <h3 id="clustering"> Clustering </h3> <ul> <li> <p> In the <a href="/docs/latest/operate/rs/databases/durability-ha/clustering/"> <strong> Clustering </strong> </a> section, you can either: </p> <ul> <li> <p> <strong> Enable sharding </strong> and select the number of shards you want to have in the database. When database clustering is enabled, databases have limitations for <a href="/docs/latest/operate/rs/databases/durability-ha/clustering/#multikey-operations"> multi-key operations </a> . </p> <p> You can increase the number of shards in the database at any time. </p> </li> <li> <p> Clear the <strong> Enable sharding </strong> option to use only one shard, which allows you to use <a href="/docs/latest/operate/rs/databases/durability-ha/clustering/#multikey-operations"> multi-key operations </a> without the limitations. </p> </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> You cannot enable or turn off database clustering after the Active-Active database is created. </div> </div> </li> <li> <p> <a href="/docs/latest/operate/rs/databases/configure/oss-cluster-api/"> <strong> OSS Cluster API </strong> </a> - The OSS Cluster API configuration allows access to multiple endpoints for increased throughput. The OSS Cluster API setting applies to all instances of the Active-Active database across participating clusters. </p> <p> This configuration requires clients to connect to the primary node to retrieve the cluster topology before they can connect directly to proxies on each node. </p> <p> When you enable the OSS Cluster API, shard placement changes to <em> Sparse </em> , and the database proxy policy changes to <em> All primary shards </em> automatically. </p> </li> </ul> <h3 id="durability"> Durability </h3> <p> To protect against loss of data stored in RAM, you can enable <a href="/docs/latest/operate/rs/databases/configure/database-persistence/"> <strong> Persistence </strong> </a> to store a copy of the data on disk. </p> <p> Active-Active databases support append-only file (AOF) persistence only. Snapshot persistence is not supported for Active-Active databases. </p> <h3 id="access-control"> Access control </h3> <ul> <li> <p> <strong> Unauthenticated access </strong> - You can access the database as the default user without providing credentials. </p> </li> <li> <p> <strong> Password-only authentication </strong> - When you configure a password for your database's default user, all connections to the database must authenticate with the [AUTH command](/docs/latest/commands/auth/. </p> <p> If you also configure an access control list, connections can specify other users for authentication, and requests are allowed according to the Redis ACLs specified for that user. </p> <p> Creating a database without ACLs enables a <em> default </em> user with full access to the database. You can secure default user access by requiring a password. </p> </li> <li> <p> <strong> Access Control List </strong> - You can specify the <a href="/docs/latest/operate/rs/security/access-control/create-db-roles/"> user roles </a> that have access to the database and the <a href="/docs/latest/operate/rs/security/access-control/redis-acl-overview/"> Redis ACLs </a> that apply to those connections. </p> <p> You can only configure access control after the Active-Active database is created. In each participating cluster, add ACLs after database creation. </p> <p> To define an access control list for a database: </p> <ol> <li> <p> In <strong> Security &gt; Access Control &gt; Access Control List </strong> , select <strong> + Add ACL </strong> . </p> </li> <li> <p> Select a <a href="/docs/latest/operate/rs/security/access-control/create-db-roles/"> role </a> to grant database access. </p> </li> <li> <p> Associate a <a href="/docs/latest/operate/rs/security/access-control/create-db-roles/"> Redis ACL </a> with the role and database. </p> </li> <li> <p> Select the check mark to add the ACL. </p> </li> </ol> </li> </ul> <h3 id="causal-consistency"> Causal consistency </h3> <p> <a href="/docs/latest/operate/rs/databases/active-active/causal-consistency/"> <strong> Causal consistency </strong> </a> in an Active-Active databaseΒ guarantees that the order of operations on a specific key is maintained across all instances of an Active-Active database. </p> <p> To enable causal consistency for an existing Active-Active database, use the REST API. </p> <!-- Also in getting-started-crdbs.md --> <h2 id="test-active-active-database-connections"> Test Active-Active database connections </h2> <p> With the Redis database created, you are ready to connect to your database. See <a href="/docs/latest/operate/rs/databases/active-active/connect/"> Connect to Active-Active databases </a> for tutorials and examples of multiple connection methods. </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/active-active/create/"/> <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/license/.html
<section class="prose w-full py-12 max-w-none"> <h1> License requests </h1> <p class="text-lg -mt-5 mb-10"> License requests </p> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#get-license"> GET </a> </td> <td> <code> /v1/license </code> </td> <td> Get license details </td> </tr> <tr> <td> <a href="#put-license"> PUT </a> </td> <td> <code> /v1/license </code> </td> <td> Update the license </td> </tr> </tbody> </table> <h2 id="get-license"> Get license </h2> <pre><code>GET /v1/license </code></pre> <p> Returns the license details, including license string, expiration, and supported features. </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_license"> view_license </a> </td> </tr> </tbody> </table> <h3 id="get-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <pre><code>GET /license </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> <h3 id="get-response"> Response </h3> <p> Returns a JSON object that contains the license details: </p> <table> <thead> <tr> <th> Name </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> license </td> <td> string </td> <td> License data </td> </tr> <tr> <td> cluster_name </td> <td> string </td> <td> The cluster name (FQDN) </td> </tr> <tr> <td> expired </td> <td> boolean </td> <td> If the cluster key is expired ( <code> true </code> or <code> false </code> ) </td> </tr> <tr> <td> activation_date </td> <td> string </td> <td> The date of the cluster key activation </td> </tr> <tr> <td> expiration_date </td> <td> string </td> <td> The date of the cluster key expiration </td> </tr> <tr> <td> key </td> <td> string </td> <td> License key </td> </tr> <tr> <td> features </td> <td> array of strings </td> <td> Features supported by the cluster </td> </tr> <tr> <td> owner </td> <td> string </td> <td> License owner </td> </tr> <tr> <td> shards_limit </td> <td> integer </td> <td> The total number of shards allowed by the cluster key </td> </tr> <tr> <td> ram_shards_limit </td> <td> integer </td> <td> The number of RAM shards allowed by the cluster key (as of v7.2) </td> </tr> <tr> <td> ram_shards_in_use </td> <td> integer </td> <td> The number of RAM shards in use </td> </tr> <tr> <td> flash_shards_limit </td> <td> integer </td> <td> The number of flash shards (Auto Tiering) allowed by the cluster key (as of v7.2) </td> </tr> <tr> <td> flash_shards_in_use </td> <td> integer </td> <td> The number of flash shards in use </td> </tr> </tbody> </table> <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">"license"</span><span class="p">:</span> <span class="s2">"----- LICENSE START -----\\ndi+iK...KniI9\\n----- LICENSE END -----\\n"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"expired"</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"activation_date"</span><span class="p">:</span><span class="s2">"2018-12-31T00:00:00Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"expiration_date"</span><span class="p">:</span><span class="s2">"2019-12-31T00:00:00Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ram_shards_in_use"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ram_shards_limit"</span><span class="p">:</span> <span class="mi">300</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"flash_shards_in_use"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"flash_shards_limit"</span><span class="p">:</span> <span class="mi">100</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"shards_limit"</span><span class="p">:</span> <span class="mi">400</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"features"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"bigstore"</span><span class="p">],</span> </span></span><span class="line"><span class="cl"> <span class="nt">"owner"</span><span class="p">:</span> <span class="s2">"Redis"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cluster_name"</span><span class="p">:</span> <span class="s2">"mycluster.local"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"key"</span><span class="p">:</span> <span class="s2">"----- LICENSE START -----\\ndi+iK...KniI9\\n----- LICENSE END -----\\n"</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> License is returned in the response body. </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5"> 404 Not Found </a> </td> <td> No license is installed. </td> </tr> </tbody> </table> <h2 id="put-license"> Update license </h2> <pre><code>PUT /v1/license </code></pre> <p> Validate and install a new license string. </p> <p> If you do not provide a valid license, the cluster behaves as if the license was deleted. See <a href="/docs/latest/operate/rs/clusters/configure/license-keys/#expired-cluster-license"> Expired cluster license </a> for a list of available actions and restrictions. </p> <h4 id="required-permissions-1"> 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/#install_new_license"> install_new_license </a> </td> </tr> </tbody> </table> <h3 id="put-request"> Request </h3> <p> The request must be a JSON object with a single key named "license". </p> <h4 id="example-http-request-1"> Example HTTP request </h4> <pre><code>PUT /license </code></pre> <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">"license"</span><span class="p">:</span> <span class="s2">"----- LICENSE START -----\ndi+iK...KniI9\n----- LICENSE END -----\n"</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h4 id="request-headers-1"> Request headers </h4> <table> <thead> <tr> <th> Key </th> <th> Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> Accept </td> <td> application/json </td> <td> Accepted media type </td> </tr> </tbody> </table> <h4 id="request-body"> Request body </h4> <p> Include a JSON object that contains the new <code> license </code> string in the request body. </p> <h3 id="put-response"> Response </h3> <p> Returns an error if the new license is not valid. </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> License installed successfully. </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1"> 400 Bad Request </a> </td> <td> Invalid request, either bad JSON object or corrupted license was supplied. </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7"> 406 Not Acceptable </a> </td> <td> License violation. A response body provides more details on the specific cause. </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/license/"/> <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/recover/.html
<section class="prose w-full py-12 max-w-none"> <h1> rladmin recover </h1> <p class="text-lg -mt-5 mb-10"> Recovers databases in recovery mode. </p> <p> Recovers databases in recovery mode after events such as cluster failure, and restores the databases' configurations and data from stored persistence files. See <a href="/docs/latest/operate/rs/databases/recover/"> Recover a failed database </a> for detailed instructions. </p> <p> Database persistence files are stored in <code> /var/opt/redislabs/persist/redis/ </code> by default, but you can specify a different directory to use for database recovery with <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/node/recovery-path/"> <code> rladmin node &lt;id&gt; recovery_path set &lt;path&gt; </code> </a> . </p> <h2 id="recover-all"> <code> recover all </code> </h2> <p> Recovers all databases in recovery mode. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin recover all </span></span><span class="line"><span class="cl"> <span class="o">[</span> only_configuration <span class="o">]</span> </span></span></code></pre> </div> <h3 id="parameters"> Parameters </h3> <table> <thead> <tr> <th> Parameters </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> only_configuration </td> <td> </td> <td> Recover database configuration without data </td> </tr> </tbody> </table> <h3 id="returns"> Returns </h3> <p> Returns <code> Completed successfully </code> if the database was recovered. Otherwise, returns an error. </p> <h3 id="example"> Example </h3> <pre tabindex="0"><code>$ rladmin recover all 0% [ 0 recovered | 0 failed ] | | Elapsed Time: 0:00:00[first-db (db:1) recovery] Initiated.[second-db (db:2) recovery] Initiated. 50% [ 0 recovered | 0 failed ] |### | Elapsed Time: 0:00:04[first-db (db:1) recovery] Completed successfully 75% [ 1 recovered | 0 failed ] |###### | Elapsed Time: 0:00:06[second-db (db:2) recovery] Completed successfully 100% [ 2 recovered | 0 failed ] |#########| Elapsed Time: 0:00:08 </code></pre> <h2 id="recover-db"> <code> recover db </code> </h2> <p> Recovers a specific database in recovery mode. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin recover db <span class="o">{</span> db:&lt;id&gt; <span class="p">|</span> &lt;name&gt; <span class="o">}</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span> only_configuration <span class="o">]</span> </span></span></code></pre> </div> <h3 id="parameters-1"> Parameters </h3> <table> <thead> <tr> <th> Parameters </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> db </td> <td> db:&lt;id&gt; <br/> name </td> <td> Database to recover </td> </tr> <tr> <td> only_configuration </td> <td> </td> <td> Recover database configuration without data </td> </tr> </tbody> </table> <h3 id="returns-1"> Returns </h3> <p> Returns <code> Completed successfully </code> if the database was recovered. Otherwise, returns an error. </p> <h3 id="example-1"> Example </h3> <pre tabindex="0"><code>$ rladmin recover db db:1 0% [ 0 recovered | 0 failed ] | | Elapsed Time: 0:00:00[demo-db (db:1) recovery] Initiated. 50% [ 0 recovered | 0 failed ] |### | Elapsed Time: 0:00:00[demo-db (db:1) recovery] Completed successfully 100% [ 1 recovered | 0 failed ] |######| Elapsed Time: 0:00:02 </code></pre> <h2 id="recover-list"> <code> recover list </code> </h2> <p> Shows a list of all databases that are currently in recovery mode. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin recover list </span></span></code></pre> </div> <h3 id="parameters-2"> Parameters </h3> <p> None </p> <h3 id="returns-2"> Returns </h3> <p> Displays a list of all recoverable databases. If no databases are in recovery mode, returns <code> No recoverable databases found </code> . </p> <h3 id="example-2"> Example </h3> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ rladmin recover list </span></span><span class="line"><span class="cl">DATABASES IN RECOVERY STATE: </span></span><span class="line"><span class="cl">DB:ID NAME TYPE SHARDS REPLICATION PERSISTENCE STATUS </span></span><span class="line"><span class="cl">db:5 tr01 redis <span class="m">1</span> enabled aof missing-files </span></span><span class="line"><span class="cl">db:6 tr02 redis <span class="m">4</span> enabled snapshot ready </span></span></code></pre> </div> <h2 id="recover-s3_import"> <code> recover s3_import </code> </h2> <p> Imports current database snapshot files from an AWS S3 bucket to a directory on the node. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin recover s3_import </span></span><span class="line"><span class="cl"> s3_bucket &lt;bucket name&gt; </span></span><span class="line"><span class="cl"> <span class="o">[</span> s3_prefix &lt;prefix&gt; <span class="o">]</span> </span></span><span class="line"><span class="cl"> s3_access_key_id &lt;access key&gt; </span></span><span class="line"><span class="cl"> s3_secret_access_key &lt;secret access key&gt; </span></span><span class="line"><span class="cl"> import_path &lt;path&gt; </span></span></code></pre> </div> <h3 id="parameters-3"> Parameters </h3> <table> <thead> <tr> <th> Parameters </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> s3_bucket </td> <td> string </td> <td> S3 bucket name </td> </tr> <tr> <td> s3_prefix </td> <td> string </td> <td> S3 object prefix </td> </tr> <tr> <td> s3_access_key_id </td> <td> string </td> <td> S3 access key ID </td> </tr> <tr> <td> s3_secret_access_key </td> <td> string </td> <td> S3 secret access key </td> </tr> <tr> <td> import_path </td> <td> filepath </td> <td> Local import path where all database snapshots will be imported </td> </tr> </tbody> </table> <h3 id="returns-3"> Returns </h3> <p> Returns <code> Completed successfully </code> if the database files were imported. Otherwise, returns an error. </p> <h3 id="example-3"> Example </h3> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin recover s3_import s3_bucket &lt;bucket-name&gt; s3_prefix &lt;s3-prefix&gt;/ s3_access_key_id &lt;access-key&gt; s3_secret_access_key &lt;secret-access-key&gt; import_path /tmp </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/recover/"/> <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/active-active/develop/data-types/json/.html
<section class="prose w-full py-12 max-w-none"> <h1> JSON in Active-Active databases </h1> <p class="text-lg -mt-5 mb-10"> Information about using JSON with an Active-Active database. </p> <p> Active-Active databases support JSON data structures. </p> <p> The design is based on <a href="https://arxiv.org/abs/1608.03960"> A Conflict-Free Replicated JSON Datatype </a> by Kleppmann and Beresford, but the implementation includes some changes. Several <a href="#conflict-resolution-rules"> conflict resolution rule </a> examples were adapted from this paper as well. </p> <h2 id="prerequisites"> Prerequisites </h2> <p> To use JSON in an Active-Active database, you must enable JSON during database creation. </p> <p> Active-Active Redis Cloud databases add JSON by default. See <a href="/docs/latest/operate/rc/databases/create-database/create-active-active-database/#select-capabilities"> Create an Active-Active subscription </a> in the Redis Cloud documentation for details. </p> <p> In Redis Enterprise Software, JSON is not enabled by default for Active-Active databases. See <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/json/active-active/#create-an-active-active-json-database"> Create an Active-Active JSON database </a> in the Redis Stack and Redis Enterprise documentation for instructions. </p> <h2 id="command-differences"> Command differences </h2> <p> Some JSON commands work differently for Active-Active databases. </p> <h3 id="jsonclear"> <code> JSON.CLEAR </code> </h3> <p> <a href="/docs/latest/commands/json.clear"> <code> JSON.CLEAR </code> </a> resets JSON arrays and objects. It supports concurrent updates to JSON documents from different instances in an Active-Active database and allows the results to be merged. </p> <h2 id="conflict-resolution-rules"> Conflict resolution rules </h2> <p> With Active-Active databases, it's possible for two different instances to try to run write operations on the same data at the same time. If this happens, conflicts can arise when the replicas attempt to sync these changes with each other. Conflict resolution rules determine how the database handles conflicting operations. </p> <p> There are two types of conflict resolution: </p> <ol> <li> <p> Merge: </p> <ul> <li> <p> The operations are associative. </p> </li> <li> <p> Merges the results of both operations. </p> </li> </ul> </li> <li> <p> Win over: </p> <ul> <li> <p> The operations are not associative. </p> </li> <li> <p> One operation wins the conflict and sets the value. </p> </li> <li> <p> Ignores the losing operation. </p> </li> </ul> </li> </ol> <p> The following conflict resolution rules show how Active-Active databases resolve conflicts for various JSON commands. </p> <h3 id="assign-different-types-to-a-key"> Assign different types to a key </h3> <p> <strong> Conflict </strong> </p> <p> Two instances concurrently assign values of different types to the same key within a JSON document. </p> <p> For example: </p> <p> Instance 1 assigns an object to a key within a JSON document. </p> <p> Instance 2 assigns an array to the same key. </p> <p> <strong> Resolution type </strong> </p> <p> Win over </p> <p> <strong> Resolution rule </strong> </p> <p> The instance with the smaller ID wins, so the key becomes an object in the given example. </p> <p> <strong> Example </strong> </p> <table> <thead> <tr> <th style="text-align:center"> Time </th> <th style="text-align:left"> Description </th> <th style="text-align:left"> Instance 1 </th> <th style="text-align:left"> Instance 2 </th> </tr> </thead> <tbody> <tr> <td style="text-align:center"> t1 </td> <td style="text-align:left"> Set the same key to an object or an array </td> <td style="text-align:left"> JSON.SET doc $.a '{}' </td> <td style="text-align:left"> JSON.SET doc $.a '[]' </td> </tr> <tr> <td style="text-align:center"> t2 </td> <td style="text-align:left"> Add data to the object and array </td> <td style="text-align:left"> <nobr> JSON.SET doc $.a.x 'β€œy”' </nobr> <br/> <br/> Result: <br/> {"a": {"x": "y"}} </td> <td style="text-align:left"> <nobr> JSON.SET doc $.a '["z"]' </nobr> <br/> <br/> Result: <br/> {β€œa”: ["z"]} </td> </tr> <tr> <td style="text-align:center"> t3 </td> <td style="text-align:left"> Active-Active synchronization </td> <td style="text-align:left"> – Sync – </td> <td style="text-align:left"> – Sync – </td> </tr> <tr> <td style="text-align:center"> t4 </td> <td style="text-align:left"> Instance 1 wins </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"a": {"x": "y"}} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"a": {"x": "y"}} </td> </tr> </tbody> </table> <h3 id="create-versus-create"> Create versus create </h3> <p> <strong> Conflict </strong> </p> <p> Two instances concurrently use <code> JSON.SET </code> to assign a new JSON document to the same key. </p> <p> <strong> Resolution type </strong> </p> <p> Win over </p> <p> <strong> Resolution rule </strong> </p> <p> The instance with the smaller ID wins. </p> <p> <strong> Example </strong> </p> <table> <thead> <tr> <th style="text-align:center"> Time </th> <th style="text-align:left"> Description </th> <th style="text-align:left"> Instance 1 </th> <th style="text-align:left"> Instance 2 </th> </tr> </thead> <tbody> <tr> <td style="text-align:center"> t1 </td> <td style="text-align:left"> Create a new JSON document </td> <td style="text-align:left"> <nobr> JSON.SET doc $ '{"field": "a"}' </nobr> </td> <td style="text-align:left"> <nobr> JSON.SET doc $ '{"field": "b"}' </nobr> </td> </tr> <tr> <td style="text-align:center"> t2 </td> <td style="text-align:left"> Active-Active synchronization </td> <td style="text-align:left"> – Sync – </td> <td style="text-align:left"> – Sync – </td> </tr> <tr> <td style="text-align:center"> t3 </td> <td style="text-align:left"> Instance 1 wins </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"field": "a"} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"field": "a"} </td> </tr> </tbody> </table> <h3 id="create-versus-update"> Create versus update </h3> <p> <strong> Conflict </strong> </p> <p> Instance 1 creates a new document and assigns it to an existing key with <code> JSON.SET </code> . </p> <p> Instance 2 updates the existing content of the same key with <code> JSON.SET </code> . </p> <p> <strong> Resolution type </strong> </p> <p> Win over </p> <p> <strong> Resolution rule </strong> </p> <p> The operation that creates a new document wins. </p> <p> <strong> Example </strong> </p> <table> <thead> <tr> <th style="text-align:center"> Time </th> <th style="text-align:left"> Description </th> <th style="text-align:left"> Instance 1 </th> <th style="text-align:left"> Instance 2 </th> </tr> </thead> <tbody> <tr> <td style="text-align:center"> t1 </td> <td style="text-align:left"> The document exists on both instances </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"field1": "value1"} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"field1": "value1"} </td> </tr> <tr> <td style="text-align:center"> t2 </td> <td style="text-align:left"> Instance 1 creates a new document; instance 2 updates the existing document </td> <td style="text-align:left"> <nobr> JSON.SET doc $ '{"field2": "value2"}' </nobr> </td> <td style="text-align:left"> <nobr> JSON.SET doc $.field1 '[1, 2, 3]' </nobr> </td> </tr> <tr> <td style="text-align:center"> t3 </td> <td style="text-align:left"> Active-Active synchronization </td> <td style="text-align:left"> – Sync – </td> <td style="text-align:left"> – Sync – </td> </tr> <tr> <td style="text-align:center"> t4 </td> <td style="text-align:left"> Instance 1 wins </td> <td style="text-align:left"> JSON.GET doc . <br/> <br/> Result: <br/> {"field2": "value2"} </td> <td style="text-align:left"> JSON.GET doc . <br/> <br/> Result: <br/> {"field2": "value2"} </td> </tr> </tbody> </table> <h3 id="delete-versus-create"> Delete versus create </h3> <p> <strong> Conflict </strong> </p> <p> Instance 1 deletes a JSON document with <code> JSON.DEL </code> . </p> <p> Instance 2 uses <code> JSON.SET </code> to create a new JSON document and assign it to the key deleted by instance 1. </p> <p> <strong> Resolution type </strong> </p> <p> Win over </p> <p> <strong> Resolution rule </strong> </p> <p> Document creation wins over deletion. </p> <p> <strong> Example </strong> </p> <table> <thead> <tr> <th style="text-align:center"> Time </th> <th style="text-align:left"> Description </th> <th style="text-align:left"> Instance 1 </th> <th style="text-align:left"> Instance 2 </th> </tr> </thead> <tbody> <tr> <td style="text-align:center"> t1 </td> <td style="text-align:left"> The document exists on both instances </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"field1": "value1"} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"field1": "value1"} </td> </tr> <tr> <td style="text-align:center"> t2 </td> <td style="text-align:left"> Instance 1 deletes the document; instance 2 creates a new document </td> <td style="text-align:left"> JSON.DEL doc </td> <td style="text-align:left"> <nobr> JSON.SET doc $ '{"field1": "value2"}' </nobr> </td> </tr> <tr> <td style="text-align:center"> t3 </td> <td style="text-align:left"> Active-Active synchronization </td> <td style="text-align:left"> – Sync – </td> <td style="text-align:left"> – Sync – </td> </tr> <tr> <td style="text-align:center"> t4 </td> <td style="text-align:left"> Instance 2 wins </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> <nobr> {"field1": "value2"} </nobr> </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"field1": "value2"} </td> </tr> </tbody> </table> <h3 id="delete-versus-update"> Delete versus update </h3> <p> <strong> Conflict </strong> </p> <p> Instance 1 deletes a JSON document with <code> JSON.DEL </code> . </p> <p> Instance 2 updates the content of the same document with <code> JSON.SET </code> . </p> <p> <strong> Resolution type </strong> </p> <p> Win over </p> <p> <strong> Resolution rule </strong> </p> <p> Document deletion wins over updates. </p> <p> <strong> Example </strong> </p> <table> <thead> <tr> <th style="text-align:center"> Time </th> <th style="text-align:left"> Description </th> <th style="text-align:left"> Instance 1 </th> <th style="text-align:left"> Instance 2 </th> </tr> </thead> <tbody> <tr> <td style="text-align:center"> t1 </td> <td style="text-align:left"> The document exists on both instances </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> <nobr> {"field1": "value1"} </nobr> </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"field1": "value1"} </td> </tr> <tr> <td style="text-align:center"> t2 </td> <td style="text-align:left"> Instance 1 deletes the document; instance 2 updates it </td> <td style="text-align:left"> JSON.DEL doc </td> <td style="text-align:left"> <nobr> JSON.SET doc $.field1 '[1, 2, 3]' </nobr> </td> </tr> <tr> <td style="text-align:center"> t3 </td> <td style="text-align:left"> Active-Active synchronization </td> <td style="text-align:left"> – Sync – </td> <td style="text-align:left"> – Sync – </td> </tr> <tr> <td style="text-align:center"> t4 </td> <td style="text-align:left"> Instance 1 wins </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> (nil) </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> (nil) </td> </tr> </tbody> </table> <h3 id="update-versus-update"> Update versus update </h3> <p> <strong> Conflict </strong> </p> <p> Instance 1 updates a field inside a JSON document with <code> JSON.SET </code> . </p> <p> Instance 2 updates the same field with a different value. </p> <p> <strong> Resolution type </strong> </p> <p> Win over </p> <p> <strong> Resolution rule </strong> </p> <p> The instance with the smallest ID wins. </p> <p> <strong> Example </strong> </p> <table> <thead> <tr> <th style="text-align:center"> Time </th> <th style="text-align:left"> Description </th> <th style="text-align:left"> Instance 1 </th> <th style="text-align:left"> Instance 2 </th> </tr> </thead> <tbody> <tr> <td style="text-align:center"> t1 </td> <td style="text-align:left"> The document exists on both instances </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"field": "a"} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"field": "a"} </td> </tr> <tr> <td style="text-align:center"> t2 </td> <td style="text-align:left"> Update the same field with different data </td> <td style="text-align:left"> <nobr> JSON.SET doc $.field "b" </nobr> </td> <td style="text-align:left"> <nobr> JSON.SET doc $.field "c" </nobr> </td> </tr> <tr> <td style="text-align:center"> t3 </td> <td style="text-align:left"> Active-Active synchronization </td> <td style="text-align:left"> – Sync – </td> <td style="text-align:left"> – Sync – </td> </tr> <tr> <td style="text-align:center"> t4 </td> <td style="text-align:left"> Instance 1 wins </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"field": "b"} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"field": "b"} </td> </tr> </tbody> </table> <h3 id="update-versus-clear"> Update versus clear </h3> <p> The version of RedisJSON prior to v2.2 has two different ways to reset the content of a JSON object: </p> <ul> <li> <p> Assign a new empty JSON object: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">JSON.SET doc $.colors <span class="s1">'{}'</span> </span></span></code></pre> </div> <p> If you use this method, it cannot be merged with a concurrent update. </p> </li> <li> <p> For each key, remove it with <code> JSON.DEL </code> : </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">JSON.DEL doc $.colors.blue </span></span></code></pre> </div> <p> With this method, it can merge the reset with concurrent updates. </p> </li> </ul> <p> As of RedisJSON v2.2, you can use the <code> JSON.CLEAR </code> command to reset the JSON document without removing each key manually. This method also lets concurrent updates be merged. </p> <h4 id="assign-an-empty-object"> Assign an empty object </h4> <p> <strong> Conflict </strong> </p> <p> Instance 1 adds "red" to the existing "colors" object with <code> JSON.SET </code> . </p> <p> Instance 2 assigns a new empty object for "colors". </p> <p> <strong> Resolution type </strong> </p> <p> Win over </p> <p> <strong> Resolution rule </strong> </p> <p> Document creation wins over the update, so the result will be an empty object. </p> <p> <strong> Example </strong> </p> <table> <thead> <tr> <th style="text-align:center"> Time </th> <th style="text-align:left"> Description </th> <th style="text-align:left"> Instance 1 </th> <th style="text-align:left"> Instance 2 </th> </tr> </thead> <tbody> <tr> <td style="text-align:center"> t1 </td> <td style="text-align:left"> The document exists on both instances </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"colors": {"blue": "#0000ff"}} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"colors": {"blue": "#0000ff"}} </td> </tr> <tr> <td style="text-align:center"> t2 </td> <td style="text-align:left"> Instance 1 adds a new color; instance 2 resets colors to an empty object </td> <td style="text-align:left"> <nobr> JSON.SET doc $.colors.red β€˜#ff0000’ </nobr> </td> <td style="text-align:left"> JSON.SET doc $.colors β€˜{}’ </td> </tr> <tr> <td style="text-align:center"> t3 </td> <td style="text-align:left"> Instance 2 adds a new color </td> <td style="text-align:left"> </td> <td style="text-align:left"> <nobr> JSON.SET doc $.colors.green β€˜#00ff00’ </nobr> </td> </tr> <tr> <td style="text-align:center"> t4 </td> <td style="text-align:left"> </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"colors": {"blue": "#0000ff", "red": "#ff0000"}} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"colors": {"green": "#00ff00"}} </td> </tr> <tr> <td style="text-align:center"> t5 </td> <td style="text-align:left"> Active-Active synchronization </td> <td style="text-align:left"> – Sync – </td> <td style="text-align:left"> – Sync – </td> </tr> <tr> <td style="text-align:center"> t6 </td> <td style="text-align:left"> Instance 2 wins </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"colors": {"green": "#00ff00"}} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"colors": {"green": "#00ff00"}} </td> </tr> </tbody> </table> <h4 id="use-jsonclear"> Use <code> JSON.CLEAR </code> </h4> <p> <strong> Conflict </strong> </p> <p> Instance 1 adds "red" to the existing "colors" object with <code> JSON.SET </code> . </p> <p> Instance 2 clears the "colors" object with <code> JSON.CLEAR </code> and adds "green" to "colors". </p> <p> <strong> Resolution type </strong> </p> <p> Merge </p> <p> <strong> Resolution rule </strong> </p> <p> Merges the results of all operations. </p> <p> <strong> Example </strong> </p> <table> <thead> <tr> <th style="text-align:center"> Time </th> <th style="text-align:left"> Description </th> <th style="text-align:left"> Instance 1 </th> <th style="text-align:left"> Instance 2 </th> </tr> </thead> <tbody> <tr> <td style="text-align:center"> t1 </td> <td style="text-align:left"> The document exists on both instances </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"colors": {"blue": "#0000ff"}} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"colors": {"blue": "#0000ff"}} </td> </tr> <tr> <td style="text-align:center"> t2 </td> <td style="text-align:left"> Instance 1 adds a new color; instance 2 resets the colors </td> <td style="text-align:left"> <nobr> JSON.SET doc $.colors.red β€˜#ff0000’ </nobr> </td> <td style="text-align:left"> JSON.CLEAR doc $.colors </td> </tr> <tr> <td style="text-align:center"> t3 </td> <td style="text-align:left"> </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"colors": {"blue": "#0000ff", "red": "#ff0000"}} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"colors": {}} </td> </tr> <tr> <td style="text-align:center"> t4 </td> <td style="text-align:left"> Instance 2 adds a new color </td> <td style="text-align:left"> </td> <td style="text-align:left"> <nobr> JSON.SET doc $.colors.green β€˜#00ff00’ </nobr> </td> </tr> <tr> <td style="text-align:center"> t5 </td> <td style="text-align:left"> </td> <td style="text-align:left"> </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"colors": {"green": "#00ff00"}} </td> </tr> <tr> <td style="text-align:center"> t6 </td> <td style="text-align:left"> Active-Active synchronization </td> <td style="text-align:left"> – Sync – </td> <td style="text-align:left"> – Sync – </td> </tr> <tr> <td style="text-align:center"> t7 </td> <td style="text-align:left"> Merges the results of both instances </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"colors": {"red": "#ff0000", "green": "#00ff00"}} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"colors": {"red": "#ff0000", "green": "#00ff00"}} </td> </tr> </tbody> </table> <h3 id="update-versus-update-array"> Update versus update array </h3> <p> <strong> Conflict </strong> </p> <p> Two instances update the same existing array with different content. </p> <p> <strong> Resolution type </strong> </p> <p> Merge </p> <p> <strong> Resolution rule </strong> </p> <p> Merges the results of all operations on the array. Preserves the original element order from each instance. </p> <p> <strong> Example </strong> </p> <table> <thead> <tr> <th style="text-align:center"> Time </th> <th style="text-align:left"> Description </th> <th style="text-align:left"> Instance 1 </th> <th style="text-align:left"> Instance 2 </th> </tr> </thead> <tbody> <tr> <td style="text-align:center"> t1 </td> <td style="text-align:left"> The document exists on both instances </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> '["a", "b", "c"]' </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> '["a", "b", "c"]' </td> </tr> <tr> <td style="text-align:center"> t2 </td> <td style="text-align:left"> Instance 1 removes an array element; instance 2 adds one </td> <td style="text-align:left"> JSON.ARRPOP doc $ 1 <br/> <br/> Result: <br/> ["a", "c"] </td> <td style="text-align:left"> <nobr> JSON.ARRINSERT doc $ 0 β€˜β€œy”’ </nobr> <br/> <br/> Result: <br/> ["y", "a", "b", "c"] </td> </tr> <tr> <td style="text-align:center"> t3 </td> <td style="text-align:left"> Both instances add another element to the array </td> <td style="text-align:left"> <nobr> JSON.ARRINSERT doc $ 1 β€˜β€œx”’ </nobr> <br/> <br/> Result: <br/> ["a", "x", "c"] </td> <td style="text-align:left"> <nobr> JSON.ARRINSERT doc $ 2 β€˜β€œz”’ </nobr> <br/> <br/> Result: <br/> ["y", "a", "z", "b", "c"] </td> </tr> <tr> <td style="text-align:center"> t4 </td> <td style="text-align:left"> Active-Active synchronization </td> <td style="text-align:left"> – Sync – </td> <td style="text-align:left"> – Sync – </td> </tr> <tr> <td style="text-align:center"> t5 </td> <td style="text-align:left"> Merge results from both instances </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> ["y", "a", "x", "z", "c"] </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> ["y", "a", "x", "z", "c"] </td> </tr> </tbody> </table> <h3 id="update-versus-delete-array-element"> Update versus delete array element </h3> <p> <strong> Conflict </strong> </p> <p> Instance 1 removes an element from a JSON array with <code> JSON.ARRPOP </code> . </p> <p> Instance 2 updates the same element that instance 1 removes. </p> <p> <strong> Resolution type </strong> </p> <p> Win over </p> <p> <strong> Resolution rule </strong> </p> <p> Deletion wins over updates. </p> <p> <strong> Example </strong> </p> <table> <thead> <tr> <th style="text-align:center"> Time </th> <th style="text-align:left"> Description </th> <th style="text-align:left"> Instance 1 </th> <th style="text-align:left"> Instance 2 </th> </tr> </thead> <tbody> <tr> <td style="text-align:center"> t1 </td> <td style="text-align:left"> The document exists on both instances </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {β€œtodo”: [{β€œtitle”: β€œbuy milk”, β€œdone”: false}]} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {β€œtodo”: [{β€œtitle”: β€œbuy milk”, β€œdone”: false}]} </td> </tr> <tr> <td style="text-align:center"> t2 </td> <td style="text-align:left"> Instance 1 removes an array element; instance 2 updates the same element </td> <td style="text-align:left"> <nobr> JSON.ARRPOP doc $.todo 0 </nobr> </td> <td style="text-align:left"> <nobr> JSON.SET doc '$.todo[0]["done"]' 'true'’ </nobr> </td> </tr> <tr> <td style="text-align:center"> t3 </td> <td style="text-align:left"> </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {β€œtodo”: []} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> [{β€œtitle”: β€œbuy milk”, β€œdone”: true}]} </td> </tr> <tr> <td style="text-align:center"> t4 </td> <td style="text-align:left"> Active-Active synchronization </td> <td style="text-align:left"> – Sync – </td> <td style="text-align:left"> – Sync – </td> </tr> <tr> <td style="text-align:center"> t5 </td> <td style="text-align:left"> Instance 1 wins </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> doc = {β€œtodo”: []} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> doc = {β€œtodo”: []} </td> </tr> </tbody> </table> <h3 id="update-versus-update-object"> Update versus update object </h3> <p> <strong> Conflict </strong> </p> <p> Both instances update the same existing object with different content. </p> <p> <strong> Resolution type </strong> </p> <p> Merge </p> <p> <strong> Resolution rule </strong> </p> <p> Merges the results of all operations on the object. </p> <p> <strong> Example </strong> </p> <table> <thead> <tr> <th style="text-align:center"> Time </th> <th style="text-align:left"> Description </th> <th style="text-align:left"> Instance 1 </th> <th style="text-align:left"> Instance 2 </th> </tr> </thead> <tbody> <tr> <td style="text-align:center"> t1 </td> <td style="text-align:left"> The document exists on both instances </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> '{"grocery": []}' </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> '{"grocery": []}' </td> </tr> <tr> <td style="text-align:center"> t2 </td> <td style="text-align:left"> Add new elements to the array </td> <td style="text-align:left"> <nobr> JSON.ARRAPPEND doc $.grocery β€˜β€œeggs”’ </nobr> </td> <td style="text-align:left"> JSON.ARRAPPEND doc $.grocery β€˜β€œmilk”’ </td> </tr> <tr> <td style="text-align:center"> t3 </td> <td style="text-align:left"> Add new elements to the array </td> <td style="text-align:left"> JSON.ARRAPPEND doc $.grocery β€˜β€œham”’ </td> <td style="text-align:left"> <nobr> JSON.ARRAPPEND doc $.grocery β€˜β€œflour”’ </nobr> </td> </tr> <tr> <td style="text-align:center"> t4 </td> <td style="text-align:left"> </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"grocery":["eggs", "ham"]} </td> <td style="text-align:left"> JSON.GET doc $ <br/> <br/> Result: <br/> {"grocery":["milk", "flour"]} </td> </tr> <tr> <td style="text-align:center"> t5 </td> <td style="text-align:left"> Active-Active synchronization </td> <td style="text-align:left"> – Sync – </td> <td style="text-align:left"> – Sync – </td> </tr> <tr> <td style="text-align:center"> t6 </td> <td style="text-align:left"> Merges the results from both instances </td> <td style="text-align:left"> JSON.GET doc . <br/> <br/> Result: <br/> {"grocery":["eggs","ham","milk", "flour"]} </td> <td style="text-align:left"> JSON.GET doc . <br/> <br/> Result: <br/> {"grocery":["eggs","ham","milk", "flour" ]} </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/active-active/develop/data-types/json/"/> <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/zdiff/.html
<section class="prose w-full py-12"> <h1 class="command-name"> ZDIFF </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">ZDIFF numkeys key [key ...] [WITHSCORES]</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.2.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set. </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> @sortedset </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> This command is similar to <a href="/docs/latest/commands/zdiffstore/"> <code> ZDIFFSTORE </code> </a> , but instead of storing the resulting sorted set, it is returned to the client. </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 zset1 3 "three" (integer) 1 redis&gt; ZADD zset2 1 "one" (integer) 1 redis&gt; ZADD zset2 2 "two" (integer) 1 redis&gt; ZDIFF 2 zset1 zset2 1) "three" redis&gt; ZDIFF 2 zset1 zset2 WITHSCORES 1) "three" 2) "3" </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> <ul> <li> <a href="../../develop/reference/protocol-spec#arrays"> Array reply </a> : the result of the difference including, optionally, scores when the <em> WITHSCORES </em> option is used. </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/zdiff/"/> <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.explaincli/.html
<section class="prose w-full py-12"> <h1 class="command-name"> FT.EXPLAINCLI </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">FT.EXPLAINCLI 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 but formatted for easier reading without using <code> redis-cli --raw </code> </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> <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> In the returned response, a <code> + </code> on a term is an indication of stemming. </div> </div> </details> <h2 id="return"> Return </h2> <p> FT.EXPLAINCLI returns an array reply with 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 </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">127.0.0.1:6379&gt; FT.EXPLAINCLI rd <span class="s2">"(foo bar)|(hello world) @date:[100 200]|@date:[500 +inf]"</span> </span></span><span class="line"><span class="cl"> 1<span class="o">)</span> INTERSECT <span class="o">{</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> UNION <span class="o">{</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> INTERSECT <span class="o">{</span> </span></span><span class="line"><span class="cl"> 4<span class="o">)</span> UNION <span class="o">{</span> </span></span><span class="line"><span class="cl"> 5<span class="o">)</span> foo </span></span><span class="line"><span class="cl"> 6<span class="o">)</span> +foo<span class="o">(</span>expanded<span class="o">)</span> </span></span><span class="line"><span class="cl"> 7<span class="o">)</span> <span class="o">}</span> </span></span><span class="line"><span class="cl"> 8<span class="o">)</span> UNION <span class="o">{</span> </span></span><span class="line"><span class="cl"> 9<span class="o">)</span> bar </span></span><span class="line"><span class="cl">10<span class="o">)</span> +bar<span class="o">(</span>expanded<span class="o">)</span> </span></span><span class="line"><span class="cl">11<span class="o">)</span> <span class="o">}</span> </span></span><span class="line"><span class="cl">12<span class="o">)</span> <span class="o">}</span> </span></span><span class="line"><span class="cl">13<span class="o">)</span> INTERSECT <span class="o">{</span> </span></span><span class="line"><span class="cl">14<span class="o">)</span> UNION <span class="o">{</span> </span></span><span class="line"><span class="cl">15<span class="o">)</span> hello </span></span><span class="line"><span class="cl">16<span class="o">)</span> +hello<span class="o">(</span>expanded<span class="o">)</span> </span></span><span class="line"><span class="cl">17<span class="o">)</span> <span class="o">}</span> </span></span><span class="line"><span class="cl">18<span class="o">)</span> UNION <span class="o">{</span> </span></span><span class="line"><span class="cl">19<span class="o">)</span> world </span></span><span class="line"><span class="cl">20<span class="o">)</span> +world<span class="o">(</span>expanded<span class="o">)</span> </span></span><span class="line"><span class="cl">21<span class="o">)</span> <span class="o">}</span> </span></span><span class="line"><span class="cl">22<span class="o">)</span> <span class="o">}</span> </span></span><span class="line"><span class="cl">23<span class="o">)</span> <span class="o">}</span> </span></span><span class="line"><span class="cl">24<span class="o">)</span> UNION <span class="o">{</span> </span></span><span class="line"><span class="cl">25<span class="o">)</span> NUMERIC <span class="o">{</span>100.000000 &lt;<span class="o">=</span> @date &lt;<span class="o">=</span> 200.000000<span class="o">}</span> </span></span><span class="line"><span class="cl">26<span class="o">)</span> NUMERIC <span class="o">{</span>500.000000 &lt;<span class="o">=</span> @date &lt;<span class="o">=</span> inf<span class="o">}</span> </span></span><span class="line"><span class="cl">27<span class="o">)</span> <span class="o">}</span> </span></span><span class="line"><span class="cl">28<span class="o">)</span> <span class="o">}</span> </span></span><span class="line"><span class="cl">29<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.explaincli/"/> <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/v1.2.0/.html
<section class="prose w-full py-12"> <h1> RedisInsight v1.2, January 2020 </h1> <p class="text-lg -mt-5 mb-10"> TLS Client side authentication support and stability improvements </p> <h2 id="redisinsight-v122-release-notes"> RedisInsight v1.2.2 release notes </h2> <p> Update urgency: Medium </p> <p> This is a maintenance release for version 1.2. </p> <h3 id="details"> Details </h3> <ul> <li> Bug Fixes: <ul> <li> Core: <ul> <li> This releases fixes the possible <strong> false positive </strong> malware issues flagged by certain antivirus vendors introduced by <a href="https://github.com/pyinstaller/pyinstaller/issues/4633"> pyinstaller </a> which was reported on <a href="https://www.reddit.com/r/redis/comments/f1qapz/redisinsight_cotains_malware/"> reddit </a> . </li> </ul> </li> </ul> </li> </ul> <h2 id="redisinsight-v121-release-notes"> RedisInsight v1.2.1 release notes </h2> <p> Update urgency: Medium </p> <p> This is a maintenance release for version 1.2. </p> <h3 id="details-1"> Details </h3> <ul> <li> Enhancements: <ul> <li> Core: <ul> <li> Upgrade notifications: When you open RedisInsight, a notification is shown if a new version is available. </li> </ul> </li> <li> RediSearch: <ul> <li> Support for <a href="https://github.com/RediSearch/RediSearch/releases/tag/v1.6.7"> RediSearch 1.6 </a> . </li> </ul> </li> </ul> </li> <li> Minor Bug Fixes: <ul> <li> RedisTimeSeries: <ul> <li> Time was interpreted as seconds instead of milliseconds as ( <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/issues/332"> Issue 332 </a> ) </li> </ul> </li> </ul> </li> </ul> <h2 id="redisinsight-v120-release-notes"> RedisInsight v1.2.0 release notes </h2> <h3 id="headlines"> Headlines </h3> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> <li> Added support for Client side TLS authentication. </li> <li> Resolved bug which caused blank pages at startup. </li> </ul> <h3 id="details-2"> Details </h3> <ul> <li> New features: <ul> <li> Core: <ul> <li> Added support for Redis databases that require TLS client authentication (as in Redis Enterprise) </li> </ul> </li> <li> RedisTimeseries: <ul> <li> Initial <code> auto-updating </code> functionality when the query's end timestamp is <code> + </code> </li> </ul> </li> </ul> </li> <li> Minor Enhancements: <ul> <li> Core: <ul> <li> Check whether the port is available before starting. </li> <li> Made <code> localhost </code> the default host instead of <code> 0.0.0.0 </code> . </li> <li> Improved logging during startup. </li> </ul> </li> <li> RedisGraph: <ul> <li> Fixed height of query cards. </li> </ul> </li> <li> RediSearch: <ul> <li> Add support for zero-length and whitespace-only index names. </li> </ul> </li> </ul> </li> <li> Bug Fixes: <ul> <li> Core: <ul> <li> Moved server to another thread instead of a separate process. In certain situations, the server process was being orphaned after the main process died. This resulted in a several issues, of which the "blank page issue" was the most common. Now that the server process is in a thread instead of a process, the server is not left running when the process exits. </li> </ul> </li> <li> RediSearch: <ul> <li> Fixed several bugs in the display of summarized results in the table view. </li> </ul> </li> <li> Browser: <ul> <li> Better handling of unsupported values - link to other tools that support it or show better error message. </li> <li> Fixed UI issues when the screen size is varied to provide better responsiveness. </li> </ul> </li> </ul> </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/v1.2.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/references/cli-utilities/rladmin/cluster/running_actions/.html
<section class="prose w-full py-12 max-w-none"> <h1> rladmin cluster running_actions </h1> <p class="text-lg -mt-5 mb-10"> Lists all active tasks. </p> <p> Lists all active tasks running on the cluster. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster running_actions </span></span></code></pre> </div> <h3 id="parameters"> Parameters </h3> <p> None </p> <h3 id="returns"> Returns </h3> <p> Returns details about any active tasks running on the cluster. </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 cluster running_actions </span></span><span class="line"><span class="cl">Got <span class="m">1</span> tasks: </span></span><span class="line"><span class="cl">1<span class="o">)</span> Task: maintenance_on <span class="o">(</span>ce391d81-8d51-4ce2-8f63-729c7ac2589e<span class="o">)</span> Node: <span class="m">1</span> Status: running </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/cluster/running_actions/"/> <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-slots/.html
<section class="prose w-full py-12"> <h1 class="command-name"> CLUSTER SLOTS <span class="text-base"> (deprecated) </span> </h1> <div class="border-l-8 pl-4"> <p> As of Redis version 7.0.0, this command is regarded as deprecated. </p> <p> It can be replaced by <a href="/docs/latest/commands/cluster-shards/"> <code> CLUSTER SHARDS </code> </a> when migrating or writing new code. </p> </div> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">CLUSTER SLOTS</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 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 SLOTS </code> returns details about which cluster slots map to which Redis instances. The command is suitable to be used by Redis Cluster client libraries implementations in order to retrieve (or update when a redirection is received) the map associating cluster <em> hash slots </em> with actual nodes network information, so that when a command is received, it can be sent to what is likely the right instance for the keys specified in the command. </p> <p> The networking information for each node is an array containing the following elements: </p> <ul> <li> Preferred endpoint (Either an IP address, hostname, or NULL) </li> <li> Port number </li> <li> The node ID </li> <li> A map of additional networking metadata </li> </ul> <p> The preferred 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 SLOTS </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 as preferred 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> <p> Additional networking metadata is provided as a map on the fourth argument for each node. The following networking metadata may be returned: </p> <ul> <li> IP: When the preferred endpoint is not set to IP. </li> <li> Hostname: When a node has an announced hostname but the primary endpoint is not set to hostname. </li> </ul> <h2 id="nested-result-array"> Nested Result Array </h2> <p> Each nested result is: </p> <ul> <li> Start slot range </li> <li> End slot range </li> <li> Master for slot range represented as nested networking information </li> <li> First replica of master for slot range </li> <li> Second replica </li> <li> ...continues until all replicas for this master are returned. </li> </ul> <p> Each result includes all active replicas of the master instance for the listed slot range. Failed replicas are not returned. </p> <p> The third nested reply is guaranteed to be the networking information of the master instance for the slot range. All networking information after the third nested reply are replicas of the master. </p> <p> If a cluster instance has non-contiguous slots (e.g. 1-400,900,1800-6000) then master and replica networking information results will be duplicated for each top-level slot range reply. </p> <pre tabindex="0"><code>&gt; CLUSTER SLOTS 1) 1) (integer) 0 2) (integer) 5460 3) 1) "127.0.0.1" 2) (integer) 30001 3) "09dbe9720cda62f7865eabc5fd8857c5d2678366" 4) 1) hostname 2) "host-1.redis.example.com" 4) 1) "127.0.0.1" 2) (integer) 30004 3) "821d8ca00d7ccf931ed3ffc7e3db0599d2271abf" 4) 1) hostname 2) "host-2.redis.example.com" 2) 1) (integer) 5461 2) (integer) 10922 3) 1) "127.0.0.1" 2) (integer) 30002 3) "c9d93d9f2c0c524ff34cc11838c2003d8c29e013" 4) 1) hostname 2) "host-3.redis.example.com" 4) 1) "127.0.0.1" 2) (integer) 30005 3) "faadb3eb99009de4ab72ad6b6ed87634c7ee410f" 4) 1) hostname 2) "host-4.redis.example.com" 3) 1) (integer) 10923 2) (integer) 16383 3) 1) "127.0.0.1" 2) (integer) 30003 3) "044ec91f325b7595e76dbcb18cc688b6a5b434a1" 4) 1) hostname 2) "host-5.redis.example.com" 4) 1) "127.0.0.1" 2) (integer) 30006 3) "58e6e48d41228013e5d9c1c37c5060693925e97e" 4) 1) hostname 2) "host-6.redis.example.com" </code></pre> <p> <strong> Warning: </strong> In future versions there could be more elements describing the node better. In general a client implementation should just rely on the fact that certain parameters are at fixed positions as specified, but more parameters may follow and should be ignored. Similarly a client library should try if possible to cope with the fact that older versions may just have the primary endpoint and port parameter. </p> <h2 id="behavior-change-history"> Behavior change history </h2> <ul> <li> <code> &gt;= 7.0.0 </code> : Added support for hostnames and unknown endpoints in first field of node response. </li> </ul> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#arrays"> Array reply </a> : nested list of slot ranges with networking information. <br/> <h2> History </h2> <ul> <li> Starting with Redis version 4.0.0: Added node IDs. </li> <li> Starting with Redis version 7.0.0: Added additional networking metadata field. </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-slots/"/> <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/glossary/.html
<section class="prose prose-slate w-full max-w-[47rem] py-12"> <h1> Glossary </h1> <dl class="glossary"> <!--- <dt id=""> </dt> <dd> </dd> ---> <h2 id="letter-a"> A, B </h2> <dt id="access-control-list-acl"> access control list (ACL) </dt> <dd> <p> Allows you to manage permissions based on key patterns. </p> <p> More info: <a href="/docs/latest/operate/oss_and_stack/management/security/acl/"> redis.io/operate/oss_and_stack/management/security/acl </a> ; <a href="https://en.wikipedia.org/wiki/Access-control_list"> ACL wikipedia </a> ; <a href="/docs/latest/operate/rs/security/access-control/"> Database access control </a> ; <a href="/docs/latest/operate/rs/security/access-control/ldap/update-database-acls/"> Update database ACLs </a> ; <a href="/docs/latest/operate/rc/security/access-control/data-access-control/role-based-access-control/"> Role-based access control </a> </p> </dd> <p> <a name="active-active"> </a> </p> <dt id="active-active-database-crdb"> Active-Active database (CRDB) </dt> <dd> <p> Geo-distributed databases that span multiple <a href="#redis-enterprise-software"> Redis Enterprise Software </a> <a href="#cluster"> clusters </a> . Active-Active databases, also known as conflict-free replicated databases (CRDB), depend on <a href="#multi-master-replication-mmr"> multi-master replication (MMR) </a> and <a href="#conflict-free-replicated-data-types-crdt"> conflict-free replicated data types (CRDTs) </a> to power a simple development experience for geo-distributed applications. </p> <p> More info: <a href="/docs/latest/operate/rs/databases/active-active/"> Active-Active geo-distributed Redis </a> , <a href="/docs/latest/operate/rs/databases/active-active/"> Geo-distributed Active-Active Redis applications </a> , <a href="/docs/latest/operate/rs/databases/active-active/develop/"> Developing applications for Active-Active databases </a> </p> </dd> <dt id="active-active-database-instance"> Active-Active database instance </dt> <dd> <p> A β€œmember database” of a global Active-Active database which is made up of its own master and replica shards spanning a single cluster. </p> </dd> <dt id="active-passive-database-replication"> active-passive database replication </dt> <dd> <p> Provides applications read-only access to replicas of the data set from different geographical locations. The Redis Enterprise implementation of active-passive replication is called <a href="#replica-of"> Replica Of </a> . </p> </dd> <dt id="admin-console"> admin console </dt> <dd> <p> Each node runs a web server that is used to provide the user with access to the Redis Enterprise Software admin console (previously known as management UI). The admin console allows viewing and managing the entire cluster, so it does not matter which node is used to access it. </p> </dd> <dt id="admission-controller"> admission controller </dt> <dd> <p> A piece of code that intercepts requests to the Kubernetes API server prior to persistence of the object. </p> <p> More info: <a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/"> Using Admission Controllers </a> </p> </dd> <dt id="append-only-file-aof"> append-only file (AoF) </dt> <dd> <p> Log files that keep a record of data changes by writing to the end of a file. This happens with every write, or every second to allow data recovering the entire dataset by replaying the append-only log from the beginning to the end. </p> <p> More info: <a href="/docs/latest/operate/rc/databases/configuration/data-persistence/"> Data Persistence </a> , <a href="/docs/latest/operate/rs/databases/configure/database-persistence/"> Data Persistence with Redis Enterprise Software </a> </p> </dd> <h2 id="letter-c"> C </h2> <dt id="causal-consistency"> causal consistency </dt> <dd> <p> A distributed database is causally consistent if it maintains the same order of operations on a piece of data across all database copies. </p> <p> More info: <a href="https://en.wikipedia.org/wiki/Causal_consistency"> Causal consistency wikipedia </a> , <a href="/docs/latest/operate/rs/databases/active-active/causal-consistency/"> Causal consistency in an Active-Active database </a> </p> </dd> <dt id="cidr-allowlist"> CIDR allowlist </dt> <dd> <p> Classless Inter-Domain Routing (CIDR) is a method to allocate and route IP addresses. A CIDR allowlist defines a range of IP addresses and permits connections to them. </p> <p> More info: <a href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing"> CIDR wikipedia </a> , <a href="/docs/latest/operate/rc/security/cidr-whitelist/"> Configure CIDR allowlist </a> </p> </dd> <dt id="concurrent-writes"> concurrent writes </dt> <dd> <p> Concurrency or updates and writes refer to more than events that happen at the same wall clock time across member Active-Active databases. Concurrent updates refer to the fact that updates happen in between sync events that catch up member Active-Active databases with updates that happened on other member Active-Active databases. </p> </dd> <dt id="consistency"> consistency </dt> <dd> <p> Consistency models describe the way a distributed system keeps replicated data consistent between copies. </p> <p> More info: <a href="https://en.wikipedia.org/wiki/Consistency_model"> Consistency models </a> </p> </dd> <dt id="cluster"> cluster </dt> <dd> <p> A Redis Enterprise cluster is composed of identical nodes that are deployed within a data center or stretched across local availability zones. </p> <p> More info: <a href="/docs/latest/operate/rc/databases/configuration/clustering/"> Database clustering </a> </p> </dd> <dt id="cluster-configuration-store-ccs"> Cluster Configuration Store (CCS) </dt> <dd> <p> An internally managed Redis database that acts as a single repository for all cluster metadata. </p> </dd> <dt id="cluster-node-manager-cnm"> Cluster Node Manager (CNM) </dt> <dd> <p> A collection of Redis Enterprise services responsible for provisioning, migration, monitoring, re-sharding, re-balancing, de-provisioning, auto-scaling </p> </dd> <dt id="conflict-free-replicated-databases-crdb"> conflict-free replicated databases (CRDB) </dt> <dd> <p> Conflict-free replicated databases (CRDB) are an alternate name for <a href="#active-active"> Active-Active databases </a> . </p> </dd> <dt id="conflict-free-replicated-data-types-crdt"> conflict-free replicated data types (CRDT) </dt> <dd> <p> Techniques used by Redis data types in Active-Active databases that handle conflicting concurrent writes across member Active-Active databases. The Redis Enterprise implementation of CRDT is called an Active-Active database (formerly known as CRDB). </p> <p> More info: <a href="/docs/latest/operate/rs/databases/active-active/develop/#info"> CRDT info </a> , <a href="/docs/latest/operate/rs/databases/active-active/"> Active-Active geo-distributed Redis </a> , <a href="https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type"> CRDT wikipedia </a> </p> </dd> <dt id="customresourcedefinition-crd"> CustomResourceDefinition (CRD) </dt> <dd> <p> Custom code that defines a resource to add to your Kubernetes API server without building a complete custom server. </p> <p> More info: <a href="https://kubernetes.io/docs/reference/glossary/?fundamental=true#term-CustomResourceDefinition"> CustomResourceDefinition </a> , <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/"> Custom Resources </a> </p> </dd> <h2 id="letter-d"> D - F </h2> <dt id="data-eviction-policy"> data eviction policy </dt> <dd> <p> Defines how excess data is handled when the database exceeds the memory limit. </p> <p> More info: <a href="/docs/latest/operate/rc/databases/configuration/data-eviction-policies/"> Data Eviction Policy </a> </p> </dd> <dt id="deprecated"> deprecated </dt> <dd> <p> Features are marked as <em> deprecated </em> when they're scheduled to be removed from our products, generally because they've been replaced by new features. </p> <p> For details, see <a href="#obsolete"> obsolete </a> . </p> </dd> <dt id="domain-name-service-dns"> Domain Name Service (DNS) </dt> <dd> <p> Naming system for computers, services, or other resources connected to the Internet or a private network. It associates various information with domain names assigned to each of the participating entities. </p> <p> More info: <a href="https://en.wikipedia.org/wiki/Domain_Name_System"> DNS wikipedia </a> </p> </dd> <dt id="eventual-consistency"> eventual consistency </dt> <dd> <p> After updating data on one instance of a distributed database, the other database copies may have stale data for a short time while they sync. Eventual consistency means that the updated data will eventually be the same across all database copies. </p> <p> More info: <a href="https://en.wikipedia.org/wiki/Eventual_consistency"> Eventual consistency wikipedia </a> </p> </dd> <dt id="fully-qualified-domain-name-fqdn"> Fully qualified domain name (FQDN) </dt> <dd> <p> A domain name that includes a list of domain labels to specify the exact location in the DNS. </p> <p> More info: <a href="https://en.wikipedia.org/wiki/Fully_qualified_domain_name"> FQDN wikipedia </a> </p> </dd> <dt id="fysnc"> `fysnc` </dt> <dd> <p> Linux command to synchronize a file's in-core state with a storage device </p> <p> More info: <a href="https://man7.org/linux/man-pages/man2/fsync.2.html"> <code> fsync </code> man page </a> </p> </dd> <h2 id="letter-g"> G - J </h2> <dt id="hash-slot"> hash slot </dt> <dd> <p> The result of a hash calculation. </p> <p> More info: <a href="/docs/latest/operate/rs/databases/durability-ha/clustering/"> Database clustering </a> </p> </dd> <dt id="hash-tag"> hash tag </dt> <dd> <p> A part of the key that is used in the hash calculation. </p> <p> More info: <a href="/docs/latest/operate/rs/databases/durability-ha/clustering/"> Database clustering </a> </p> </dd> <dt id="high-availability"> high availability </dt> <dd> <p> High availability (HA) is a characteristic of distributed systems that keeps systems available for users for longer than normal periods of time. This is done by reducing single points of failure, increasing redundancy, and making recovering from failures easier. </p> <p> More info: <a href="/docs/latest/operate/rs/databases/durability-ha/"> Redis Enterprise durability and high availability </a> , <a href="https://en.wikipedia.org/wiki/High_availability"> High availability wikipedia </a> </p> </dd> <dt id="ingress"> ingress </dt> <dd> <p> An API object that manages external access to the services in a Kubernetes cluster, typically HTTP. </p> <p> More info: <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/"> Ingress </a> , <a href="/docs/latest/operate/kubernetes/networking/ingress/"> Ingress routing for Redis Enterprise for Kubernetes </a> </p> </dd> <h2 id="letter-k"> K, L </h2> <dt id="kubectl"> kubectl </dt> <dd> <p> A command-line tool for communicating with a Kubernetes API server. </p> <p> More info: <a href="https://kubernetes.io/docs/reference/kubectl/overview/"> Overview of kubectl </a> </p> </dd> <dt id="lightweight-directory-access-protocol-ldap"> Lightweight Directory Access Protocol (LDAP) </dt> <dd> <p> A protocol for accessing and maintaining distributed directory services over an IP network, often used to authenticate users. </p> <p> More info: <a href="https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol"> LDAP wikipedia </a> , <a href="/docs/latest/operate/rs/security/access-control/ldap/"> LDAP authentication </a> </p> </dd> <h2 id="letter-m"> M - O </h2> <dt id="master-node"> master node </dt> <dd> <p> Node that operates as the leader of a cluster. Also known as the primary node. </p> </dd> <dt id="migration"> migration </dt> <dd> <p> Deciding when and where shards will be moved if more network throughput, memory, or CPU resources are needed </p> </dd> <dt id="multicast-dns-mdns"> multicast DNS (mDNS) </dt> <dd> <p> Protocol that resolves hostnames to the IP addresses that do not include a local name server. </p> <p> More info: <a href="https://en.wikipedia.org/wiki/Multicast_DNS"> multicast DNS wikipedia </a> </p> </dd> <dt id="multi-factor-authentication-mfa"> multi-factor authentication (MFA) </dt> <dd> <p> Method of authenticating users with pieces of evidence of the user's identity. When MFA is enabled on Redis Cloud, users must enter their username, password, and an authentication code when logging in. </p> <p> More info: <a href="/docs/latest/operate/rc/security/access-control/multi-factor-authentication/"> Multi-factor authentication </a> </p> </dd> <dt id="multi-primary-replication"> multi-primary replication </dt> <dd> <p> Also known as multi-master replication, Active-Active databases have multiple primary nodes (one on each participating cluster) to enable concurrent writes operations. </p> <p> More info: <a href="/docs/latest/operate/rs/databases/active-active/#multi-primary-replication"> Multi-primary replication </a> </p> </dd> <dt id="namespace"> namespace </dt> <dd> <p> An abstraction used by Kubernetes to support multiple virtual clusters on the same physical cluster. </p> <p> More info: <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/"> Namespaces </a> </p> </dd> <dt id="obsolete"> obsolete </dt> <dd> <p> When features are removed from our products, they're generally replaced by new features that provide a better experience, more functionality, improved security, and other benefits. </p> <p> To provide a transition period, we mark older features as <em> deprecated </em> when introducing replacement features. This gives you time to adjust your deployments, apps, and processes to support the new features. During this transition, the older features continue to work as a courtesy. </p> <p> Eventually, older features are removed from the product. When this happens, they're considered <em> obsolete </em> , partly because they can no longer be used. </p> <p> For best results, we advise against relying on deprecated features for any length of time. </p> </dd> <dt id="operator"> operator </dt> <dd> <p> Operators are software extensions to Kubernetes that make use of custom resources to manage applications and their components. </p> <p> More info: <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/operator/"> operator pattern </a> </p> </dd> <dt id="out-of-memory-oom"> Out-of-Memory (OOM) </dt> <dd> <p> If a member Active-Active database is in an out of memory situation, that member is marked β€œinconsistent” by Redis Enterprise Software, the member stops responding to user traffic, and the syncer initiates full reconciliation with other peers in the Active-Active database. </p> </dd> <h2 id="letter-p"> P - Q </h2> <dt id="participating-clusters"> participating clusters </dt> <dd> <p> Clusters participating in the multi-primary replication of an Active-Active database. </p> </dd> <dt id="provisioning"> provisioning </dt> <dd> <p> Deciding where shards will be created and placed. </p> </dd> <dt id="proxy-policy"> proxy policy </dt> <dd> <p> Determines the number and location of active proxies tied to a single endpoint that receive incoming traffic for a database. </p> <p> For more info, see <a href="/docs/latest/operate/rs/databases/configure/proxy-policy/"> Proxy policy </a> . </p> </dd> <dt id="quorum-node"> quorum node </dt> <dd> <p> Node provisioned only for cluster operations that can be elected as a master node. The quorum node participates in the cluster quorum and must be explicitly assigned this role via the <code> rladmin </code> command. </p> </dd> <h2 id="letter-r"> R </h2> <dt id="rack-zone-awareness"> rack-zone awareness </dt> <dd> <p> Redis Enterprise feature that helps to ensure high availability in the event of a rack or zone failure. In the event of a rack or zone failure, the replicas and endpoints in the remaining racks/zones will be promoted. </p> <p> More info: <a href="/docs/latest/operate/rs/clusters/configure/rack-zone-awareness/"> Rack-zone awareness in Redis Enterprise Software </a> </p> </dd> <dt id="replication-backlog"> replication backlog </dt> <dd> <p> Databases using replication or Active-Active maintain a backlog to synchronize the primary and replica shards. </p> </dd> <dt id="re-sharding"> re-sharding </dt> <dd> <p> Distributing keys and their values among new shards. </p> </dd> <dt id="rebalancing"> rebalancing </dt> <dd> <p> Moving shards to nodes where more resources are available. </p> </dd> <dt id="redis-cloud"> Redis Cloud </dt> <dd> <p> The cloud version of Redis Enterprise. </p> </dd> <dt id="redis-enterprise-cluster"> Redis Enterprise cluster </dt> <dd> <p> Collection of Redis Enterprise nodes. A cluster pools system resources across nodes in the cluster and supports multi-tenant database instances. </p> </dd> <dt id="redis-enterprise-database"> Redis Enterprise database </dt> <dd> <p> Logical entity that manages your entire dataset across multiple Redis instances. It segments the data into shards and distributes them among nodes. </p> </dd> <dt id="redis-enterprise-nodes"> Redis Enterprise nodes </dt> <dd> <p> Physical or virtual machines or containers that runs a collection of Redis Enterprise services </p> </dd> <dt id="redis-enterprise-software"> Redis Enterprise Software </dt> <dd> <p> The on-premises version of Redis Enterprise. </p> </dd> <dt id="redis-instance"> Redis instance </dt> <dd> <p> Single-threaded Redis Community Edition database. Redis OSS was renamed Redis Community Edition (CE) with the v7.4 release. </p> </dd> <dt id="auto-tiering"> Auto Tiering </dt> <dd> <p> Previously known as Redis on Flash. Enables your Redis databases to span both RAM and dedicated flash memory (SSD). Auto Tiering manages the location of key values (RAM vs Flash) in the database via a LRU-based (least-recently-used) mechanism. </p> <p> More info: <a href="/docs/latest/operate/rs/databases/auto-tiering/"> Auto Tiering </a> , <a href="/docs/latest/operate/rs/databases/auto-tiering/quickstart/"> Auto Tiering quick start </a> </p> </dd> <dt id="replica-high-availability-replicaha"> replica high availability (replicaHA) </dt> <dd> <p> High availability feature of Redis Enterprise Software. After a node failure, the cluster automatically migrates remaining replica shards to available nodes. Previously known as "Slave HA" or <code> slave_ha </code> . </p> <p> More info: <a href="/docs/latest/operate/rs/databases/configure/replica-ha/"> High availability for replica shards </a> </p> </dd> <dt id="replica-of"> Replica Of </dt> <dd> <p> The Redis Enterprise implementation of active-passive database replication. </p> <p> More info: <a href="/docs/latest/operate/rs/databases/import-export/replica-of/"> Replica Of </a> </p> </dd> <dt id="replicaset"> ReplicaSet </dt> <dd> <p> A ReplicaSet is a type of Kubernetes resource that (aims to) maintain a set of replica pods running at any given time. </p> <p> More info: <a href="https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/"> ReplicaSet </a> </p> </dd> <dt id="replication"> replication </dt> <dd> <p> Database replication provides a mechanism to ensure high availability. When replication is enabled, your dataset is replicated to a replica shard, which is constantly synchronized with the primary shard. If the primary shard fails, an automatic failover happens and the replica shard is promoted. </p> <p> More info: <a href="/docs/latest/operate/rs/databases/durability-ha/replication/"> Database replication </a> </p> </dd> <dt id="role-based-access-control-rbac"> role-based access control (RBAC) </dt> <dd> <p> A security approach that restricts system access to authorized users. </p> <p> More info: <a href="https://en.wikipedia.org/wiki/Role-based_access_control"> RBAC wikipedia </a> ; <a href="/docs/latest/operate/rs/security/access-control/"> Database access control </a> ; <a href="/docs/latest/operate/rc/security/access-control/data-access-control/role-based-access-control/"> Role-based access control </a> </p> </dd> <h2 id="letter-s"> S </h2> <dt id="secret"> secret </dt> <dd> <p> Kubernetes term for object that stores sensitive information, such as passwords, OAuth tokens, and ssh keys. </p> </dd> <dt id="shard"> shard </dt> <dd> <p> Redis process that is part of the Redis clustered database. </p> <p> More info: <a href="/docs/latest/operate/rs/databases/durability-ha/clustering/"> Database clustering </a> , <a href="/docs/latest/operate/rs/references/terminology/"> terminology </a> </p> </dd> <dt id="sharding"> sharding </dt> <dd> <p> Technique that has been used to scale larger data storage and processing loads. Sharding take your data, partitions it into smaller pieces and then send the data to different locations depending on which partition the data has been assigned to. </p> </dd> <dt id="simple-authentication-and-security-layer-sasl"> Simple Authentication and Security Layer (SASL) </dt> <dd> <p> Framework for adding authentication support and data security to connection-based protocols via replaceable mechanisms. </p> <p> More info: <a href="https://en.wikipedia.org/wiki/Simple_Authentication_and_Security_Layer"> SASL wikipedia </a> </p> </dd> <dt id="snapshot-rdb"> snapshot (RDB) </dt> <dd> <p> Data persistence file that performs a data dump every one, six, or twelve hours. </p> </dd> <dt id="syncer"> syncer </dt> <dd> <p> Process on each node hosting an Active-Active database instance that synchronizes a backlog of operations between participating clusters. </p> <p> More info: <a href="/docs/latest/operate/rs/databases/active-active/syncer/"> Syncer process </a> </p> </dd> <h2 id="letter-t"> T - Z </h2> <dt id="tombstone"> tombstone </dt> <dd> <p> A key that is logically deleted but stays in memory until it is collected by the garbage collector. </p> </dd> <dt id="transport-layer-security-tls"> Transport Layer Security (TLS) </dt> <dd> <p> Protocols that provide communications security over a computer network. </p> <p> More info: <a href="https://en.wikipedia.org/wiki/Transport_Layer_Security"> TLS wikipedia </a> , <a href="/docs/latest/operate/rc/security/database-security/tls-ssl/"> Cloud database TLS </a> , <a href="/docs/latest/operate/rs/security/encryption/tls/"> Redis Enterprise TLS </a> </p> </dd> <dt id="vpc-peering"> VPC peering </dt> <dd> <p> Networking connection between two VPCs that enables you to route traffic between them using private IP addresses. Instances in either VPC can communicate with each other as if they are within the same network. </p> <p> More info: <a href="https://en.wikipedia.org/wiki/Virtual_private_cloud"> VPC wikipedia </a> , <a href="/docs/latest/operate/rc/security/vpc-peering/"> Enable VPC peering </a> </p> </dd> </dl> <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/glossary/"/> <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/active-active/develop/data-types/hyperloglog/.html
<section class="prose w-full py-12 max-w-none"> <h1> HyperLogLog in Active-Active databases </h1> <p class="text-lg -mt-5 mb-10"> Information about using hyperloglog with an Active-Active database. </p> <p> <strong> HyperLogLog </strong> is an algorithm that addresses the <a href="https://en.wikipedia.org/wiki/Count-distinct_problem"> count-distinct problem </a> . To do this it approximates the numbers of items in a <a href="https://en.wikipedia.org/wiki/Multiset"> set </a> . Determining the <em> exact </em> cardinality of a set requires memory according to the cardinality of the set. Because it estimates the cardinality by probability, the HyperLogLog algorithm can run with more reasonable memory requirements. </p> <h2 id="hyperloglog-in-redis"> HyperLogLog in Redis </h2> <p> Redis Community Edition implements <a href="https://redislabs.com/redis-best-practices/counting/hyperloglog/"> HyperLogLog </a> (HLL) as a native data structure. It supports adding elements ( <a href="/docs/latest/commands/pfadd/"> PFADD </a> to an HLL, counting elements ( <a href="/docs/latest/commands/pfcount/"> PFCOUNT </a> of HLLs, and merging of ( <a href="/docs/latest/commands/pfmerge/"> PFMERGE </a> HLLs. </p> <p> Here is an example of a simple write case: </p> <table> <thead> <tr> <th> Time </th> <th> Replica 1 </th> <th> Replica 2 </th> </tr> </thead> <tbody> <tr> <td> t1 </td> <td> PFADD hll x </td> <td> </td> </tr> <tr> <td> t2 </td> <td> --- sync --- </td> <td> </td> </tr> <tr> <td> t3 </td> <td> </td> <td> PFADD hll y </td> </tr> <tr> <td> t4 </td> <td> --- sync --- </td> <td> </td> </tr> <tr> <td> t5 </td> <td> PFCOUNT hll --&gt; 2 </td> <td> PFCOUNT hll --&gt; 2 </td> </tr> </tbody> </table> <p> Here is an example of a concurrent add case: </p> <table> <thead> <tr> <th> Time </th> <th> Replica 1 </th> <th> Replica 2 </th> </tr> </thead> <tbody> <tr> <td> t1 </td> <td> PFADD hll x </td> <td> PFADD hll y </td> </tr> <tr> <td> t2 </td> <td> PFCOUNT hll --&gt; 1 </td> <td> PFCOUNT hll --&gt; 1 </td> </tr> <tr> <td> t3 </td> <td> --- sync --- </td> <td> </td> </tr> <tr> <td> t4 </td> <td> PFCOUNT hll --&gt; 2 </td> <td> PFCOUNT hll --&gt; 2 </td> </tr> </tbody> </table> <h2 id="the-del-wins-approach"> The DEL-wins approach </h2> <p> Other collections in the Redis-CRDT implementation use the observed remove method to resolve conflicts. The CRDT-HLL uses the DEL-wins method. If a DEL request is received at the same time as any other request (ADD/MERGE/EXPIRE) on the HLL-key the replicas consistently converge to delete key. In the observed remove method used by other collections (sets, lists, sorted-sets and hashes), only the replica that received the DEL request removes the elements, but elements added concurrently in other replicas exist in the consistently converged collection. We chose to use the DEL-wins method for the CRDT-HLL to maintain the original time and space complexity of the HLL in Redis Community Edition. </p> <p> Here is an example of a DEL-wins case: </p> <table> <thead> <tr> <th> HLL </th> <th> </th> <th> </th> <th> | </th> <th> Set </th> <th> </th> <th> </th> </tr> </thead> <tbody> <tr> <td> </td> <td> </td> <td> </td> <td> | </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> Time </td> <td> Replica 1 </td> <td> Replica 2 </td> <td> | </td> <td> Time </td> <td> Replica 1 </td> <td> Replica 2 </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> | </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> t1 </td> <td> PFADD h e1 </td> <td> </td> <td> | </td> <td> t1 </td> <td> SADD s e1 </td> <td> </td> </tr> <tr> <td> t2 </td> <td> --- sync --- </td> <td> </td> <td> | </td> <td> t2 </td> <td> --- sync --- </td> <td> </td> </tr> <tr> <td> t3 </td> <td> PFCOUNT h --&gt; 1 </td> <td> PFCOUNT h --&gt; 1 </td> <td> | </td> <td> t3 </td> <td> SCARD s --&gt; 1 </td> <td> SCARD s --&gt; 1 </td> </tr> <tr> <td> t4 </td> <td> PFADD h e2 </td> <td> Del h </td> <td> | </td> <td> t4 </td> <td> SADD s e2 </td> <td> Del S </td> </tr> <tr> <td> t5 </td> <td> PFCOUNT h --&gt; 2 </td> <td> PFCOUNT h --&gt; 0 </td> <td> | </td> <td> t5 </td> <td> SCARD s --&gt; 2 </td> <td> SCARD s --&gt; 0 </td> </tr> <tr> <td> t6 </td> <td> --- sync --- </td> <td> </td> <td> | </td> <td> t6 </td> <td> --- sync --- </td> <td> </td> </tr> <tr> <td> t7 </td> <td> PFCOUNT h --&gt; 0 </td> <td> PFCOUNT h --&gt; 0 </td> <td> | </td> <td> t7 </td> <td> SCARD s --&gt; 1 </td> <td> SCARD s --&gt; 1 </td> </tr> <tr> <td> t8 </td> <td> Exists h --&gt; 0 </td> <td> Exists h --&gt; 0 </td> <td> | </td> <td> t8 </td> <td> Exists s --&gt; 1 </td> <td> Exists s --&gt; 1 </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> | </td> <td> t9 </td> <td> SMEMBERS s --&gt; {e2} </td> <td> SMEMBERS s --&gt; {e2} </td> </tr> </tbody> </table> <h2 id="hll-in-active-active-databases-versus-hll-in-redis-community-edition"> HLL in Active-Active databases versus HLL in Redis Community Edition </h2> <p> In Active-Active databases, we implemented HLL within the CRDT on the basis of the Redis implementation with a few exceptions: </p> <ul> <li> Redis keeps the HLL data structure as an encoded string object such that you can potentially run any string request can on a key that contains an HLL. In CRDT, only get and set are supported for HLL. </li> <li> In CRDT, if you do SET on a key that contains a value encoded as an HLL, then the value will remain an HLL. If the value is not encoded as HLL, then it will be a register. </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/databases/active-active/develop/data-types/hyperloglog/"/> <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/bdb/.html
<section class="prose w-full py-12 max-w-none"> <h1> BDB object </h1> <p class="text-lg -mt-5 mb-10"> An object that represents a database </p> <p> An API object that represents a managed database in the cluster. </p> <table> <thead> <tr> <th> Name </th> <th> Type/Value &amp; Description </th> </tr> </thead> <tbody> <tr> <td> uid </td> <td> integer; Cluster unique ID of database. Can be set during creation but cannot be updated. </td> </tr> <tr> <td> account_id </td> <td> integer; SM account ID </td> </tr> <tr> <td> action_uid </td> <td> string; Currently running action's UID (read-only) </td> </tr> <tr> <td> aof_policy </td> <td> Policy for Append-Only File data persistence <br/> Values: <br/> <strong> 'appendfsync-every-sec' </strong> <br/> 'appendfsync-always' </td> </tr> <tr> <td> authentication_admin_pass </td> <td> string; Password for administrative access to the BDB (used for SYNC from the BDB) </td> </tr> <tr> <td> authentication_redis_pass </td> <td> string; Redis AUTH password authentication. <br/> Use for Redis databases only. Ignored for memcached databases. (deprecated as of Redis Enterprise v7.2, replaced with multiple passwords feature in version 6.0.X) </td> </tr> <tr> <td> authentication_sasl_pass </td> <td> string; Binary memcache SASL password </td> </tr> <tr> <td> authentication_sasl_uname </td> <td> string; Binary memcache SASL username (pattern does not allow special characters &amp;,&lt;,&gt;,") </td> </tr> <tr> <td> authentication_ssl_client_certs </td> <td> <pre><code>[{<br/> "client_cert": string<br/>}, ...]</code></pre> List of authorized client certificates <br/> <strong> client_cert </strong> : X.509 PEM (base64) encoded certificate </td> </tr> <tr> <td> authentication_ssl_crdt_certs </td> <td> <pre><code>[{<br/> "client_cert": string<br/>}, ...]</code></pre> List of authorized CRDT certificates <br/> <strong> client_cert </strong> : X.509 PEM (base64) encoded certificate </td> </tr> <tr> <td> authorized_names </td> <td> array of strings; Additional certified names (deprecated as of Redis Enterprise v6.4.2; use authorized_subjects instead) </td> </tr> <tr> <td> authorized_subjects </td> <td> <pre><code>[{<br/> "CN": string,<br/> "O": string,<br/> "OU": [array of strings],<br/> "L": string,<br/> "ST": string,<br/> "C": string<br/>}, ...]</code></pre> A list of valid subjects used for additional certificate validations during TLS client authentication. All subject attributes are case-sensitive. <br/> <strong> Required subject fields </strong> : <br/> "CN" for Common Name <br/> <strong> Optional subject fields: </strong> <br/> "O" for Organization <br/> "OU" for Organizational Unit (array of strings) <br/> "L" for Locality (city) <br/> "ST" for State/Province <br/> "C" for 2-letter country code </td> </tr> <tr> <td> auto_upgrade </td> <td> boolean (default:Β false); Upgrade the database automatically after a cluster upgrade </td> </tr> <tr> <td> avoid_nodes </td> <td> array of strings; Cluster node UIDs to avoid when placing the database's shards and binding its endpoints </td> </tr> <tr> <td> background_op </td> <td> <pre><code>[{<br/> "status": string,<br/> "name": string,<br/> "error": object,<br/> "progress": number<br/>}, ...]</code></pre> (read-only); <strong> progress </strong> : Percent of completed steps in current operation </td> </tr> <tr> <td> backup </td> <td> boolean (default:Β false); Policy for periodic database backup </td> </tr> <tr> <td> backup_failure_reason </td> <td> Reason of last failed backup process (read-only) <br/> Values: <br/> 'no-permission' <br/> 'wrong-file-path' <br/> 'general-error' </td> </tr> <tr> <td> backup_history </td> <td> integer (default:Β 0); Backup history retention policy (number of days, 0 is forever) </td> </tr> <tr> <td> backup_interval </td> <td> integer; Interval in seconds in which automatic backup will be initiated </td> </tr> <tr> <td> backup_interval_offset </td> <td> integer; Offset (in seconds) from round backup interval when automatic backup will be initiated (should be less than backup_interval) </td> </tr> <tr> <td> backup_location </td> <td> <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/bdb/backup_location/"> complex object </a> ; Target for automatic database backups. <br/> Call <code> GET </code> <code> /jsonschema </code> to retrieve the object's structure. </td> </tr> <tr> <td> backup_progress </td> <td> number, <nobr> (range: 0-100) </nobr> ; Database scheduled periodic backup progress (percentage) (read-only) </td> </tr> <tr> <td> backup_status </td> <td> Status of scheduled periodic backup process (read-only) <br/> Values: <br/> 'exporting' <br/> 'succeeded' <br/> 'failed' </td> </tr> <tr> <td> bigstore </td> <td> boolean (default:Β false); Database bigstore option </td> </tr> <tr> <td> bigstore_ram_size </td> <td> integer (default:Β 0); Memory size of bigstore RAM part. </td> </tr> <tr> <td> bigstore_ram_weights </td> <td> <pre><code>[{<br/> "shard_uid": integer,<br/> "weight": number<br/>}, ...]</code></pre> List of shard UIDs and their bigstore RAM weights; <br/> <strong> shard_uid </strong> : Shard UID; <br/> <strong> weight </strong> : Relative weight of RAM distribution </td> </tr> <tr> <td> client_cert_subject_validation_type </td> <td> Enables additional certificate validations that further limit connections to clients with valid certificates during TLS client authentication. <br/> Values: <br/> <strong> disabled </strong> : Authenticates clients with valid certificates. No additional validations are enforced. <br/> <strong> san_cn </strong> : A client certificate is valid only if its Common Name (CN) matches an entry in the list of valid subjects. Ignores other Subject attributes. <br/> <strong> full_subject </strong> : A client certificate is valid only if its Subject attributes match an entry in the list of valid subjects. </td> </tr> <tr> <td> conns </td> <td> integer (defaultΒ 5); Number of internal proxy connections </td> </tr> <tr> <td> conns_type </td> <td> Connections limit type <br/> Values: <br/> <strong> β€˜per-thread’ </strong> <br/> β€˜per-shard’ </td> </tr> <tr> <td> crdt </td> <td> boolean (default:Β false); Use CRDT-based data types for multi-master replication </td> </tr> <tr> <td> crdt_causal_consistency </td> <td> boolean (default:Β false); Causal consistent CRDB. </td> </tr> <tr> <td> crdt_config_version </td> <td> integer; Replica-set configuration version, for internal use only. </td> </tr> <tr> <td> crdt_featureset_version </td> <td> integer; CRDB active FeatureSet version </td> </tr> <tr> <td> crdt_ghost_replica_ids </td> <td> string; Removed replicas IDs, for internal use only. </td> </tr> <tr> <td> crdt_guid </td> <td> string; GUID of CRDB this database belongs to, for internal use only. </td> </tr> <tr> <td> crdt_modules </td> <td> string; CRDB modules information. The string representation of a JSON list, containing hashmaps. </td> </tr> <tr> <td> crdt_protocol_version </td> <td> integer; CRDB active Protocol version </td> </tr> <tr> <td> crdt_repl_backlog_size </td> <td> string; Active-Active replication backlog size ('auto' or size in bytes) </td> </tr> <tr> <td> crdt_replica_id </td> <td> integer; Local replica ID, for internal use only. </td> </tr> <tr> <td> crdt_replicas </td> <td> string; Replica set configuration, for internal use only. </td> </tr> <tr> <td> crdt_sources </td> <td> array of <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/bdb/syncer_sources/"> syncer_sources </a> objects; Remote endpoints/peers of CRDB database to sync from. See the 'bdb -&gt; replica_sources' section </td> </tr> <tr> <td> crdt_sync </td> <td> Enable, disable, or pause syncing from specified crdt_sources. Applicable only for Active-Active databases. See <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/bdb/replica_sync/"> replica_sync </a> for more details. <br/> Values: <br/> 'enabled' <br/> <strong> 'disabled' </strong> <br/> 'paused' <br/> 'stopped' </td> </tr> <tr> <td> crdt_sync_dist </td> <td> boolean; Enable/disable distributed syncer in master-master </td> </tr> <tr> <td> crdt_syncer_auto_oom_unlatch </td> <td> boolean (default:Β true); Syncer automatically attempts to recover synchronisation from peers after this database throws an Out-Of-Memory error. Otherwise, the syncer exits </td> </tr> <tr> <td> crdt_xadd_id_uniqueness_mode </td> <td> XADD strict ID uniqueness mode. CRDT only. <br/> Values: <br/> β€˜liberal’ <br/> <strong> β€˜strict’ </strong> <br/> β€˜semi-strict’ </td> </tr> <tr> <td> created_time </td> <td> string; The date and time the database was created (read-only) </td> </tr> <tr> <td> data_internode_encryption </td> <td> boolean; Should the data plane internode communication for this database be encrypted </td> </tr> <tr> <td> data_persistence </td> <td> Database on-disk persistence policy. For snapshot persistence, a <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/bdb/snapshot_policy/"> snapshot_policy </a> must be provided <br/> Values: <br/> <strong> 'disabled' </strong> <br/> 'snapshot' <br/> 'aof' </td> </tr> <tr> <td> dataset_import_sources </td> <td> <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/bdb/dataset_import_sources/"> complex object </a> ; Array of source file location description objects to import from when performing an import action. This is write-only and cannot be read after set. <br/> Call GET /jsonschema to retrieve the object's structure. </td> </tr> <tr> <td> db_conns_auditing </td> <td> boolean; Enables/deactivates <a href="/docs/latest/operate/rs/7.4/security/audit-events/"> database connection auditing </a> </td> </tr> <tr> <td> default_user </td> <td> boolean (default:Β true); Allow/disallow a default user to connect </td> </tr> <tr> <td> disabled_commands </td> <td> string (default: ); Redis commands which are disabled in db </td> </tr> <tr> <td> dns_address_master </td> <td> string; Database private address endpoint FQDN (read-only) (deprecated as of Redis Enterprise v4.3.3) </td> </tr> <tr> <td> email_alerts </td> <td> boolean (default:Β false); Send email alerts for this DB </td> </tr> <tr> <td> endpoint </td> <td> string; Latest bound endpoint. Used when reconfiguring an endpoint via update </td> </tr> <tr> <td> endpoint_ip </td> <td> complex object; External IP addresses of node hosting the BDB's endpoint. <code> GET </code> <code> /jsonschema </code> to retrieve the object's structure. (read-only) (deprecated as of Redis Enterprise v4.3.3) </td> </tr> <tr> <td> endpoint_node </td> <td> integer; Node UID hosting the BDB's endpoint (read-only) (deprecated as of Redis Enterprise v4.3.3) </td> </tr> <tr> <td> endpoints </td> <td> array; List of database access endpoints (read-only) <br/> <strong> uid </strong> : Unique identification of this source <br/> <strong> dns_name </strong> : Endpoint’s DNS name <br/> <strong> port </strong> : Endpoint’s TCP port number <br/> <strong> addr </strong> : Endpoint’s accessible addresses <br/> <strong> proxy_policy </strong> : The policy used for proxy binding to the endpoint <br/> <strong> exclude_proxies </strong> : List of proxies to exclude <br/> <strong> include_proxies </strong> : List of proxies to include <br/> <strong> addr_type </strong> : Indicates if the endpoint is based on internal or external IPs <br/> <span class="break-all"> <strong> oss_cluster_api_preferred_ip_type </strong> </span> : Indicates preferred IP type in the OSS cluster API: internal/external <br/> <span class="break-all"> <strong> oss_cluster_api_preferred_endpoint_type </strong> </span> : Indicates preferred endpoint type in the OSS cluster API: ip/hostname </td> </tr> <tr> <td> enforce_client_authentication </td> <td> Require authentication of client certificates for SSL connections to the database. If set to 'enabled', a certificate should be provided in either authentication_ssl_client_certs or authentication_ssl_crdt_certs <br/> Values: <br/> <strong> 'enabled' </strong> <br/> 'disabled' </td> </tr> <tr> <td> eviction_policy </td> <td> Database eviction policy (Redis style). <br/> Values: <br/> 'volatile-lru' <br/> 'volatile-ttl' <br/> 'volatile-random' <br/> 'allkeys-lru' <br/> 'allkeys-random' <br/> 'noeviction' <br/> 'volatile-lfu' <br/> 'allkeys-lfu' <br/> <strong> Redis DB default </strong> : 'volatile-lru' <br/> <strong> memcached DB default </strong> : 'allkeys-lru' </td> </tr> <tr> <td> export_failure_reason </td> <td> Reason of last failed export process (read-only) <br/> Values: <br/> 'no-permission' <br/> 'wrong-file-path' <br/> 'general-error' </td> </tr> <tr> <td> export_progress </td> <td> number, <nobr> (range: 0-100) </nobr> ; Database manually triggered export progress (percentage) (read-only) </td> </tr> <tr> <td> export_status </td> <td> Status of manually triggered export process (read-only) <br/> Values: <br/> 'exporting' <br/> 'succeeded' <br/> 'failed' </td> </tr> <tr> <td> generate_text_monitor </td> <td> boolean; Enable/disable generation of syncer monitoring information </td> </tr> <tr> <td> gradual_src_max_sources </td> <td> integer (default:Β 1); Sync a maximum N sources in parallel (gradual_src_mode should be enabled for this to take effect) </td> </tr> <tr> <td> gradual_src_mode </td> <td> Indicates if gradual sync (of sync sources) should be activated <br/> Values: <br/> 'enabled' <br/> 'disabled' </td> </tr> <tr> <td> gradual_sync_max_shards_per_source </td> <td> integer (default:Β 1); Sync a maximum of N shards per source in parallel (gradual_sync_mode should be enabled for this to take effect) </td> </tr> <tr> <td> gradual_sync_mode </td> <td> Indicates if gradual sync (of source shards) should be activated ('auto' for automatic decision) <br/> Values: <br/> 'enabled' <br/> 'disabled' <br/> 'auto' </td> </tr> <tr> <td> hash_slots_policy </td> <td> The policy used for hash slots handling <br/> Values: <br/> <strong> 'legacy' </strong> : slots range is '1-4096' <br/> <strong> '16k' </strong> : slots range is '0-16383' </td> </tr> <tr> <td> implicit_shard_key </td> <td> boolean (default:Β false); Controls the behavior of what happens in case a key does not match any of the regex rules. <br/> <strong> true </strong> : if a key does not match any of the rules, the entire key will be used for the hashing function <br/> <strong> false </strong> : if a key does not match any of the rules, an error will be returned. </td> </tr> <tr> <td> import_failure_reason </td> <td> Import failure reason (read-only) <br/> Values: <br/> 'download-error' <br/> 'file-corrupted' <br/> 'general-error' <br/> 'file-larger-than-mem-limit:&lt;n bytes of expected dataset&gt;:&lt;n bytes configured bdb limit&gt;' <br/> 'key-too-long' <br/> 'invalid-bulk-length' <br/> 'out-of-memory' </td> </tr> <tr> <td> import_progress </td> <td> number, <nobr> (range: 0-100) </nobr> ; Database import progress (percentage) (read-only) </td> </tr> <tr> <td> import_status </td> <td> Database import process status (read-only) <br/> Values: <br/> 'idle' <br/> 'initializing' <br/> 'importing' <br/> 'succeeded' <br/> 'failed' </td> </tr> <tr> <td> internal </td> <td> boolean (default:Β false); Is this a database used by the cluster internally </td> </tr> <tr> <td> last_backup_time </td> <td> string; Time of last successful backup (read-only) </td> </tr> <tr> <td> last_changed_time </td> <td> string; Last administrative configuration change (read-only) </td> </tr> <tr> <td> last_export_time </td> <td> string; Time of last successful export (read-only) </td> </tr> <tr> <td> max_aof_file_size </td> <td> integer; Maximum size for shard's AOF file (bytes). Default 300GB, (on bigstore DB 150GB) </td> </tr> <tr> <td> max_aof_load_time </td> <td> integer (default:Β 3600); Maximum time shard's AOF reload should take (seconds). </td> </tr> <tr> <td> max_client_pipeline </td> <td> integer (default:Β 200); Maximum number of pipelined commands per connection. Maximum value is 2047. </td> </tr> <tr> <td> max_connections </td> <td> integer (default:Β 0); Maximum number of client connections allowed (0 unlimited) </td> </tr> <tr> <td> max_pipelined </td> <td> integer (default:Β 2000); Determines the maximum number of commands in the proxy’s pipeline per shard connection. </td> </tr> <tr> <td> master_persistence </td> <td> boolean (default:Β false); If true, persists the primary shard in addition to replica shards in a replicated and persistent database. </td> </tr> <tr> <td> memory_size </td> <td> integer (default:Β 0); Database memory limit (0 is unlimited), expressed in bytes. </td> </tr> <tr> <td> metrics_export_all </td> <td> boolean; Enable/disable exposing all shard metrics through the metrics exporter </td> </tr> <tr> <td> mkms </td> <td> boolean (default:Β true); Are MKMS (Multi Key Multi Slots) commands supported? </td> </tr> <tr> <td> module_list </td> <td> <pre><code>[{<br/> "module_id": string,<br/> "module_args": [<br/> u'string',<br/> u'null'],<br/> "module_name": string,<br/> "semantic_version": string<br/>}, ...]</code></pre> List of modules associated with the database <br/> <br/> <strong> module_id </strong> : Module UID <br/> <strong> module_args </strong> : Module command-line arguments (pattern does not allow special characters &amp;,&lt;,&gt;,") <br/> <strong> module_name </strong> : Module's name <br/> <strong> semantic_version </strong> : Module's semantic version <br/> <br/> As of Redis Enterprise Software v7.4.2, <strong> module_id </strong> and <strong> semantic_version </strong> are optional. </td> </tr> <tr> <td> mtls_allow_outdated_certs </td> <td> boolean; An optional mTLS relaxation flag for certs verification </td> </tr> <tr> <td> mtls_allow_weak_hashing </td> <td> boolean; An optional mTLS relaxation flag for certs verification </td> </tr> <tr> <td> name </td> <td> string; Database name. Only letters, numbers, or hyphens are valid characters. The name must start and end with a letter or number. </td> </tr> <tr> <td> oss_cluster </td> <td> boolean (default:Β false); OSS Cluster mode option. Cannot be enabled with <code> 'hash_slots_policy': 'legacy' </code> </td> </tr> <tr> <td> <span class="break-all"> oss_cluster_api_preferred_endpoint_type </span> </td> <td> Endpoint type in the OSS cluster API <br/> Values: <br/> <strong> β€˜ip’ </strong> <br/> β€˜hostname’ </td> </tr> <tr> <td> <span class="break-all"> oss_cluster_api_preferred_ip_type </span> </td> <td> Internal/external IP type in OSS cluster API. Default value for new endpoints <br/> Values: <br/> <strong> 'internal' </strong> <br/> 'external' </td> </tr> <tr> <td> oss_sharding </td> <td> boolean (default:Β false); An alternative to <code> shard_key_regex </code> for using the common case of the OSS shard hashing policy </td> </tr> <tr> <td> port </td> <td> integer; TCP port on which the database is available. Generated automatically if omitted and returned as 0 </td> </tr> <tr> <td> proxy_policy </td> <td> The default policy used for proxy binding to endpoints <br/> Values: <br/> 'single' <br/> 'all-master-shards' <br/> 'all-nodes' </td> </tr> <tr> <td> rack_aware </td> <td> boolean (default:Β false); Require the database to always replicate across multiple racks </td> </tr> <tr> <td> recovery_wait_time </td> <td> integer (default:Β -1); Defines how many seconds to wait for the persistence file to become available during auto recovery. After the wait time expires, auto recovery completes with potential data loss. The default <code> -1 </code> means to wait forever. </td> </tr> <tr> <td> redis_version </td> <td> string; Version of the redis-server processes: e.g. 6.0, 5.0-big </td> </tr> <tr> <td> repl_backlog_size </td> <td> string; Redis replication backlog size ('auto' or size in bytes) </td> </tr> <tr> <td> replica_sources </td> <td> array of <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/bdb/syncer_sources/"> syncer_sources </a> objects; Remote endpoints of database to sync from. See the 'bdb -&gt; replica_sources' section </td> </tr> <tr> <td> <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/bdb/replica_sync/"> replica_sync </a> </td> <td> Enable, disable, or pause syncing from specified replica_sources <br/> Values: <br/> 'enabled' <br/> <strong> 'disabled' </strong> <br/> 'paused' <br/> 'stopped' </td> </tr> <tr> <td> replica_sync_dist </td> <td> boolean; Enable/disable distributed syncer in replica-of </td> </tr> <tr> <td> replication </td> <td> boolean (default:Β false); In-memory database replication mode </td> </tr> <tr> <td> resp3 </td> <td> boolean (default:Β true); Enables or deactivates RESP3 support </td> </tr> <tr> <td> roles_permissions </td> <td> <pre><code>[{<br/> "role_uid": integer,<br/> "redis_acl_uid": integer<br/>}, ...]</code></pre> </td> </tr> <tr> <td> sched_policy </td> <td> Controls how server-side connections are used when forwarding traffic to shards. <br/> Values: <br/> <strong> cmp </strong> : Closest to max_pipelined policy. Pick the connection with the most pipelined commands that has not reached the max_pipelined limit. <br/> <strong> mru </strong> : Try to use most recently used connections. <br/> <strong> spread </strong> : Try to use all connections. <br/> <strong> mnp </strong> : Minimal pipeline policy. Pick the connection with the least pipelined commands. </td> </tr> <tr> <td> shard_block_crossslot_keys </td> <td> boolean (default:Β false); In Lua scripts, prevent use of keys from different hash slots within the range owned by the current shard </td> </tr> <tr> <td> shard_block_foreign_keys </td> <td> boolean (default:Β true); In Lua scripts, <code> foreign_keys </code> prevent use of keys which could reside in a different shard (foreign keys) </td> </tr> <tr> <td> shard_key_regex </td> <td> Custom keyname-based sharding rules. <br/> <code> [{"regex": string}, ...] </code> <br/> To use the default rules you should set the value to: <br/> <code> [{"regex": ".*{(?&lt;tag&gt;.*)}.*"}, {"regex": "(?&lt;tag&gt;.*)"}] </code> </td> </tr> <tr> <td> shard_list </td> <td> array of integers; Cluster unique IDs of all database shards. </td> </tr> <tr> <td> sharding </td> <td> boolean (default:Β false); Cluster mode (server-side sharding). When true, shard hashing rules must be provided by either <code> oss_sharding </code> or <code> shard_key_regex </code> </td> </tr> <tr> <td> shards_count </td> <td> integer, <nobr> (range: 1-512) </nobr> (default:Β 1); Number of database server-side shards </td> </tr> <tr> <td> shards_placement </td> <td> Control the density of shards <br/> Values: <br/> <strong> 'dense' </strong> : Shards reside on as few nodes as possible <br/> <strong> 'sparse' </strong> : Shards reside on as many nodes as possible </td> </tr> <tr> <td> skip_import_analyze </td> <td> Enable/disable skipping the analysis stage when importing an RDB file <br/> Values: <br/> 'enabled' <br/> 'disabled' </td> </tr> <tr> <td> slave_buffer </td> <td> Redis replica output buffer limits <br/> Values: <br/> 'auto' <br/> value in MB <br/> hard:soft:time </td> </tr> <tr> <td> slave_ha </td> <td> boolean; Enable replica high availability mechanism for this database (default takes the cluster setting) </td> </tr> <tr> <td> slave_ha_priority </td> <td> integer; Priority of the BDB in replica high availability mechanism </td> </tr> <tr> <td> snapshot_policy </td> <td> array of <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/bdb/snapshot_policy/"> snapshot_policy </a> objects; Policy for snapshot-based data persistence. A dataset snapshot will be taken every N secs if there are at least M writes changes in the dataset </td> </tr> <tr> <td> ssl </td> <td> boolean (default:Β false); Require SSL authenticated and encrypted connections to the database (deprecated as of Redis Enterprise v5.0.1) </td> </tr> <tr> <td> <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/bdb/status/"> status </a> </td> <td> Database lifecycle status (read-only) <br/> Values: <br/> 'pending' <br/> 'active' <br/> 'active-change-pending' <br/> 'delete-pending' <br/> 'import-pending' <br/> 'creation-failed' <br/> 'recovery' </td> </tr> <tr> <td> support_syncer_reconf </td> <td> boolean; Determines whether the syncer handles its own configuration changes. If false, the DMC restarts the syncer upon a configuration change. </td> </tr> <tr> <td> sync </td> <td> (deprecated as of Redis Enterprise v5.0.1, use <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/bdb/replica_sync/"> replica_sync </a> or crdt_sync instead) Enable, disable, or pause syncing from specified sync_sources <br/> Values: <br/> 'enabled' <br/> <strong> 'disabled' </strong> <br/> 'paused' <br/> 'stopped' </td> </tr> <tr> <td> sync_dedicated_threads </td> <td> integer (range:Β 0-10) (default:Β 5); Number of dedicated Replica Of threads </td> </tr> <tr> <td> sync_sources </td> <td> <pre><code>[{<br/> "uid": integer,<br/> "uri": string,<br/> "compression": integer,<br/> "status": string,<br/> "rdb_transferred": integer,<br/> "rdb_size": integer,<br/> "last_update": string,<br/> "lag": integer,<br/> "last_error": string<br/>}, ...]</code></pre> (deprecated as of Redis Enterprise v5.0.1, instead use replica_sources or crdt_sources) Remote endpoints of database to sync from. See the 'bdb -&gt; replica_sources' section <br/> <strong> uid </strong> : Numeric unique identification of this source <br/> <strong> uri </strong> : Source Redis URI <br/> <strong> compression </strong> : Compression level for the replication link <br/> <strong> status </strong> : Sync status of this source <br/> <strong> rdb_transferred </strong> : Number of bytes transferred from the source's RDB during the syncing phase <br/> <strong> rdb_size </strong> : The source's RDB size to be transferred during the syncing phase <br/> <strong> last_update </strong> : Time last update was received from the source <br/> <strong> lag </strong> : Lag in millisec between source and destination (while synced) <br/> <strong> last_error </strong> : Last error encountered when syncing from the source </td> </tr> <tr> <td> syncer_log_level </td> <td> Minimum syncer log level to log. Only logs with this level or higher will be logged. <br/> Values: <br/> β€˜crit’ <br/> β€˜error’ <br/> β€˜warn’ <br/> <strong> β€˜info’ </strong> <br/> β€˜trace’ <br/> β€˜debug’ </td> </tr> <tr> <td> syncer_mode </td> <td> The syncer for replication between database instances is either on a single node (centralized) or on each node that has a proxy according to the proxy policy (distributed). (read-only) <br/> Values: <br/> 'distributed' <br/> 'centralized' </td> </tr> <tr> <td> tags </td> <td> <pre><code>[{<br/> "key": string,<br/> "value": string<br/>}, ...]</code></pre> Optional list of tag objects attached to the database. Each tag requires a key-value pair. <br/> <strong> key </strong> : Represents the tag's meaning and must be unique among tags (pattern does not allow special characters &amp;,&lt;,&gt;,") <br/> <strong> value </strong> : The tag's value. </td> </tr> <tr> <td> tls_mode </td> <td> Require TLS-authenticated and encrypted connections to the database <br/> Values: <br/> 'enabled' <br/> <strong> 'disabled' </strong> <br/> 'replica_ssl' </td> </tr> <tr> <td> type </td> <td> Type of database <br/> Values: <br/> <strong> 'redis' </strong> <br/> 'memcached' </td> </tr> <tr> <td> use_nodes </td> <td> array of strings; Cluster node UIDs to use for database shards and bound endpoints </td> </tr> <tr> <td> version </td> <td> string; Database compatibility version: full Redis/memcached version number, such as 6.0.6. This value can only change during database creation and database upgrades. </td> </tr> <tr> <td> wait_command </td> <td> boolean (default:Β true); Supports Redis wait command (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/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/develop/tools/insight/release-notes/v1.3.0/.html
<section class="prose w-full py-12"> <h1> RedisInsight v1.3, March 2020 </h1> <p class="text-lg -mt-5 mb-10"> Auto-discovery of Redis Cloud databases, visualising paths in RedisGraph </p> <h2 id="redisinsight-v131-release-notes-april-2020"> RedisInsight v1.3.1 release notes (April 2020) </h2> <p> This is the maintenance release of RedisInsight 1.3 (v1.3.1). </p> <p> Update urgency: Medium </p> <h3 id="headlines"> Headlines </h3> <ul> <li> Fixed support for connecting to Redis database on TLS-enabled hosts with SNI enforcement. </li> </ul> <h3 id="details"> Details </h3> <ul> <li> Bug Fixes: <ul> <li> Core: <ul> <li> Fixed support for connecting to Redis database on TLS-enabled hosts with SNI enforcement. </li> </ul> </li> <li> Memory Analysis <ul> <li> Fixed wrong display of table columns in Memory Analyzer view. </li> </ul> </li> <li> Browser <ul> <li> Fixed bug where the TTL on string and RedisJSON keys was being reset on edit. </li> </ul> </li> <li> Configuration: <ul> <li> Fixed freezing/flashing on refreshing configuration. </li> </ul> </li> <li> CLI <ul> <li> Fixed minor visual bug in inline command documentation. </li> </ul> </li> <li> Security <ul> <li> Updated frontend dependencies that had developed security vulnerabilities. </li> </ul> </li> </ul> </li> </ul> <h2 id="redisinsight-v130-release-notes-march-2020"> RedisInsight v1.3.0 release notes (March 2020) </h2> <p> This is the General Availability release of RedisInsight 1.3 (v1.3.0)! </p> <h3 id="headlines-1"> Headlines </h3> <ul> <li> The Windows installer is now signed with a Microsoft Authenticode certificate. </li> <li> Auto-Discovery of databases for Redis Cloud Pro. </li> <li> Visualising paths in RedisGraph </li> </ul> <h3 id="details-1"> Details </h3> <ul> <li> <p> Features: </p> <ul> <li> Security: <ul> <li> The Windows installer now signed with a Microsoft Authenticode certificate </li> </ul> </li> <li> Core: <ul> <li> Auto-Discovery for Redis Cloud Pro: Redis Cloud Pro subscribers can automatically add their cloud databases with just a few clicks </li> <li> Support for editing the connection details of an added database </li> <li> Better support for Sentinel-monitored databases with different passwords for the sentinel instance(s) and database </li> <li> UI improvements to the add database form </li> <li> Added a button in the top-right menu to reach the online documentation with one click </li> </ul> </li> <li> RedisGraph: <ul> <li> Added support for visualising queries that use <a href="https://oss.redislabs.com/redisgraph/commands/#path-functions"> path functions </a> </li> </ul> </li> <li> Memory Analysis: <ul> <li> Added support for <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#virtual-hosted-style-access"> virtual hosted-style </a> S3 paths for Offline Analysis </li> </ul> </li> <li> Browser: <ul> <li> Added tooltip to make it easier to view the name of long keys </li> </ul> </li> </ul> </li> <li> <p> Bug Fixes: </p> <ul> <li> Core: <ul> <li> Fixed fonts that were being loaded from the Internet, causing jarring visual changes on slow connections </li> </ul> </li> <li> RedisGraph: <ul> <li> Improved rendering of Array records </li> <li> Removed <code> GRAPH.EXPLAIN </code> calls for now until we have execution plan visualisation </li> </ul> </li> </ul> </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/v1.3.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/references/rest-api/requests/bdbs/actions/export_reset_status/.html
<section class="prose w-full py-12 max-w-none"> <h1> Export resets status database action requests </h1> <p class="text-lg -mt-5 mb-10"> Reset database export 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-export-reset-status"> PUT </a> </td> <td> <code> /v1/bdbs/{uid}/actions/export_reset_status </code> </td> <td> Reset database export status </td> </tr> </tbody> </table> <h2 id="put-bdbs-actions-export-reset-status"> Reset database export status </h2> <pre><code>PUT /v1/bdbs/{int: uid}/actions/export_reset_status </code></pre> <p> Resets the database's <code> export_status </code> to idle if an export is not in progress and clears the value of the <code> export_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/references/rest-api/permissions/#reset_bdb_current_export_status"> reset_bdb_current_export_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/export_reset_status </span></span></code></pre> </div> <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> 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> <h4 id="put-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> 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/references/rest-api/requests/bdbs/actions/export_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/commands/json.debug-help/.html
<section class="prose w-full py-12"> <h1 class="command-name"> JSON.DEBUG HELP </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">JSON.DEBUG HELP</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/json"> JSON 1.0.0 </a> </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> N/A </dd> </dl> <p> Return helpful information about the <a href="/docs/latest/commands/json.debug/"> <code> JSON.DEBUG </code> </a> command </p> <h2 id="return"> Return </h2> <p> JSON.DEBUG HELP returns an array with helpful messages. </p> <h2 id="see-also"> See also </h2> <p> <a href="/docs/latest/commands/json.debug/"> <code> JSON.DEBUG </code> </a> </p> <h2 id="related-topics"> Related topics </h2> <ul> <li> <a href="/docs/latest/develop/data-types/json/"> RedisJSON </a> </li> <li> <a href="/docs/latest/develop/interact/search-and-query/indexing/"> Index and search JSON documents </a> </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/json.debug-help/"/> <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-deluser/.html
<section class="prose w-full py-12"> <h1 class="command-name"> ACL DELUSER </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">ACL DELUSER username [username ...]</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) amortized time considering the typical user. </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> Delete all the specified ACL users and terminate all the connections that are authenticated with such users. Note: the special <code> default </code> user cannot be removed from the system, this is the default user that every new connection is authenticated with. The list of users may include usernames that do not exist, in such case no operation is performed for the non existing users. </p> <h2 id="examples"> Examples </h2> <pre tabindex="0"><code>&gt; ACL DELUSER antirez 1 </code></pre> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : the number of users that were deleted. This number will not always match the number of arguments since certain users may not exist. <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-deluser/"/> <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/install/install-stack/linux/.html
<section class="prose w-full py-12 max-w-none"> <h1> Install Redis Stack on Linux </h1> <p class="text-lg -mt-5 mb-10"> How to install Redis Stack on Linux </p> <p> Learn how to install Redis Stack on Linux from the official APT repository or RPM feed, or with Snap or AppImage. </p> <h2 id="from-the-official-ubuntudebian-apt-repository"> From the official Ubuntu/Debian APT Repository </h2> <p> See <a href="https://redis.io/downloads/#redis-stack-downloads"> this page </a> for a complete list of supported Ubuntu/Debian platforms. Add the repository to the APT index, update it, and install Redis Stack: </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt-get install lsb-release curl gpg </span></span><span class="line"><span class="cl">curl -fsSL https://packages.redis.io/gpg <span class="p">|</span> sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg </span></span><span class="line"><span class="cl">sudo chmod <span class="m">644</span> /usr/share/keyrings/redis-archive-keyring.gpg </span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">"deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb </span><span class="k">$(</span>lsb_release -cs<span class="k">)</span><span class="s2"> main"</span> <span class="p">|</span> sudo tee /etc/apt/sources.list.d/redis.list </span></span><span class="line"><span class="cl">sudo apt-get update </span></span><span class="line"><span class="cl">sudo apt-get install redis-stack-server</span></span></code></pre> </div> <p> Redis will not start automatically, nor will it start at boot time. To do this, run the following commands. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo systemctl <span class="nb">enable</span> redis-stack-server </span></span><span class="line"><span class="cl">sudo systemctl start redis-stack-server</span></span></code></pre> </div> <h2 id="from-the-official-red-hatrocky-rpm-feeds"> From the official Red Hat/Rocky RPM Feeds </h2> <p> See <a href="https://redis.io/downloads/#redis-stack-downloads"> this page </a> for a complete list of supported Red Hat/Rocky platforms. Follow these steps to install Redis Stack. </p> <ol> <li> <p> Create the file <code> /etc/yum.repos.d/redis.repo </code> with the following contents. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="o">[</span>Redis<span class="o">]</span> </span></span><span class="line"><span class="cl"><span class="nv">name</span><span class="o">=</span>Redis </span></span><span class="line"><span class="cl"><span class="nv">baseurl</span><span class="o">=</span>http://packages.redis.io/rpm/rhel9 <span class="c1"># replace rhel7 with the appropriate value for your platform</span> </span></span><span class="line"><span class="cl"><span class="nv">enabled</span><span class="o">=</span><span class="m">1</span> </span></span><span class="line"><span class="cl"><span class="nv">gpgcheck</span><span class="o">=</span><span class="m">1</span></span></span></code></pre> </div> </li> <li> <p> Run the following commands: </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">curl -fsSL https://packages.redis.io/gpg &gt; /tmp/redis.key </span></span><span class="line"><span class="cl">sudo rpm --import /tmp/redis.key </span></span><span class="line"><span class="cl">sudo yum install epel-release </span></span><span class="line"><span class="cl">sudo yum install redis-stack-server</span></span></code></pre> </div> </li> </ol> <p> Redis will not start automatically, nor will it start at boot time. To do this, run the following commands. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo systemctl <span class="nb">enable</span> redis-stack-server </span></span><span class="line"><span class="cl">sudo systemctl start redis-stack-server</span></span></code></pre> </div> <h2 id="on-ubuntu-with-snap"> On Ubuntu with Snap </h2> <p> First, download the latest Redis Stack snap package from <a href="https://redis.io/downloads/"> this page </a> . </p> <p> To install, run: </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt update </span></span><span class="line"><span class="cl">sudo apt install redis-tools </span></span><span class="line"><span class="cl">sudo snap install --dangerous --classic &lt;snapname.snap&gt;</span></span></code></pre> </div> <p> Redis will not start automatically, nor will it start at boot time. To start <code> redis-stack-server </code> in the foreground, run the command: </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo snap run redis-stack-server</span></span></code></pre> </div> <p> To stop Redis, enter <code> Ctrl-C </code> . </p> <p> Follow these steps to integrate Redis Stack with <code> systemd </code> so you can start/stop in/from the background: </p> <ol> <li> <p> Edit the <code> /etc/systemd/system/redis-stack-server.service </code> file and enter the following information: </p> <div class="highlight"> <pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">[Unit] </span></span><span class="line"><span class="cl">Description=Redis Stack Server </span></span><span class="line"><span class="cl">After=network.target </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">[Service] </span></span><span class="line"><span class="cl">ExecStart=/usr/bin/snap run redis-stack-server </span></span><span class="line"><span class="cl">Restart=always </span></span><span class="line"><span class="cl">User=root </span></span><span class="line"><span class="cl">Group=root </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">[Install] </span></span><span class="line"><span class="cl">WantedBy=multi-user.target</span></span></code></pre> </div> </li> <li> <p> Run the following commands. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo systemctl daemon-reload </span></span><span class="line"><span class="cl">sudo systemctl start redis-stack-server </span></span><span class="line"><span class="cl">sudo systemctl <span class="nb">enable</span> redis-stack-server</span></span></code></pre> </div> </li> </ol> <p> If your Linux distribution does not currently have Snap installed, you can install it using the instructions described <a href="https://snapcraft.io/docs/installing-snapd"> here </a> . Then, download the appropriate from the <a href="https://redis.io/downloads/"> downloads page </a> . </p> <h2 id="on-ubuntu-with-appimage"> On Ubuntu with AppImage </h2> <p> Fuse needs to be installed before proceeding. Install it as follows. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt update </span></span><span class="line"><span class="cl">sudo apt install fuse</span></span></code></pre> </div> <p> Next, download the latest Redis Stack AppImage package from <a href="https://redis.io/downloads/"> this page </a> . </p> <p> To run the image, execute these commands: </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt update </span></span><span class="line"><span class="cl">sudo apt install redis-tools </span></span><span class="line"><span class="cl">chmod a+x &lt;AppImageFile&gt; <span class="c1"># replace AppImageFile with the name of your downloaded file</span> </span></span><span class="line"><span class="cl">./&lt;AppImageFile&gt;</span></span></code></pre> </div> <p> This will start Redis in the foreground. To stop Redis, enter <code> Ctrl-C </code> . </p> <p> Follow these steps to integrate Redis Stack with <code> systemd </code> so you can start/stop in/from the background: </p> <ol> <li> <p> Edit the <code> /etc/systemd/system/redis-appimage.service </code> file and enter the following information: </p> <div class="highlight"> <pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">[Unit] </span></span><span class="line"><span class="cl">Description=Redis Server (AppImage) </span></span><span class="line"><span class="cl">After=network.target </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">[Service] </span></span><span class="line"><span class="cl">ExecStart=/path/to/your/&lt;AppImageFile&gt; --daemonize no </span></span><span class="line"><span class="cl">Restart=always </span></span><span class="line"><span class="cl">User=redis-user # replace with an existing user or create a new one </span></span><span class="line"><span class="cl">Group=redis-group # replace with an existing group or create a new one </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">[Install] </span></span><span class="line"><span class="cl">WantedBy=multi-user.target</span></span></code></pre> </div> </li> <li> <p> Run the following commands. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo systemctl daemon-reload </span></span><span class="line"><span class="cl">sudo systemctl start redis-appimage </span></span><span class="line"><span class="cl">sudo systemctl <span class="nb">enable</span> redis-appimage</span></span></code></pre> </div> </li> </ol> <h2 id="starting-and-stopping-redis-stack-in-the-background"> Starting and stopping Redis Stack in the background </h2> <p> You can start the Redis server as a background process using the <code> systemctl </code> command. This only applies to Ubuntu/Debian when installed using <code> apt </code> , and Red Hat/Rocky when installed using <code> yum </code> . </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo systemctl start redis-stack-server</span></span></code></pre> </div> <p> To stop the service, use: </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo systemctl stop redis-stack-server</span></span></code></pre> </div> <h2 id="connect-to-redis"> Connect to Redis </h2> <p> Once Redis is running, you can test it by running <code> redis-cli </code> : </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">redis-cli</span></span></code></pre> </div> <p> Test the connection with the <code> ping </code> command: </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; ping </span></span><span class="line"><span class="cl">PONG</span></span></code></pre> </div> <p> You can also test that your Redis server is running using <a href="/docs/latest/develop/tools/insight/"> Redis Insight </a> . </p> <h2 id="next-steps"> Next steps </h2> <p> Once you have a running Redis instance, you may want to: </p> <ul> <li> Try the <a href="/docs/latest/develop/tools/cli/"> Redis CLI tutorial </a> </li> <li> Connect using one of the <a href="/docs/latest/develop/clients/"> Redis clients </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/install/install-redis/#install-redis-properly"> Install Redis "properly" </a> for production use. </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/oss_and_stack/install/install-stack/linux/"/> <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/debuginfo/.html
<section class="prose w-full py-12 max-w-none"> <h1> Debug info requests </h1> <p class="text-lg -mt-5 mb-10"> Debug info requests </p> <div class="banner-article rounded-md" style="background-color: "> <p> These REST API paths are deprecated as of Redis Enterprise Software version 7.4.2. Use the new paths <a href="/docs/latest/operate/rs/7.4/references/rest-api/requests/cluster/debuginfo/"> <code> /v1/cluster/debuginfo </code> </a> , <a href="/docs/latest/operate/rs/7.4/references/rest-api/requests/nodes/debuginfo/"> <code> /v1/nodes/debuginfo </code> </a> , and <a href="/docs/latest/operate/rs/7.4/references/rest-api/requests/bdbs/debuginfo/"> <code> /v1/bdbs/debuginfo </code> </a> instead. </p> </div> <p> Downloads a support package, which includes logs and information about the cluster, nodes, databases, and shards, as a tar file called <code> filename.tar.gz </code> . Extract the files from the tar file to access the debug info. </p> <h2 id="get-debug-info-for-all-nodes-in-the-cluster"> Get debug info for all nodes in the cluster </h2> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="/docs/latest/operate/rs/7.4/references/rest-api/requests/debuginfo/all/#get-all-debuginfo"> GET </a> </td> <td> <code> /v1/debuginfo/all </code> </td> <td> Gets debug info for all nodes </td> </tr> <tr> <td> <a href="/docs/latest/operate/rs/7.4/references/rest-api/requests/debuginfo/all/bdb/#get-all-debuginfo-bdb"> GET </a> </td> <td> <code> /v1/debuginfo/all/bdb/{bdb_uid} </code> </td> <td> Gets debug info for a database from all nodes </td> </tr> </tbody> </table> <h2 id="get-debug-info-for-the-current-node"> Get debug info for the current node </h2> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="/docs/latest/operate/rs/7.4/references/rest-api/requests/debuginfo/node/#get-debuginfo-node"> GET </a> </td> <td> <code> /v1/debuginfo/node </code> </td> <td> Gets debug info for the current node </td> </tr> <tr> <td> <a href="/docs/latest/operate/rs/7.4/references/rest-api/requests/debuginfo/node/bdb/#get-debuginfo-node-bdb"> GET </a> </td> <td> <code> /v1/debuginfo/node/bdb/{bdb_uid} </code> </td> <td> Gets debug info for a database from the current node </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/debuginfo/"/> <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.30.0/.html
<section class="prose w-full py-12"> <h1> RedisInsight v2.30.0, July 2023 </h1> <p class="text-lg -mt-5 mb-10"> RedisInsight v2.30 </p> <h2 id="230-july-2023"> 2.30 (July 2023) </h2> <p> This is the General Availability (GA) release of RedisInsight 2.30. </p> <h3 id="highlights"> Highlights </h3> <p> Introducing support for <a href="https://github.com/RedisGears/RedisGears/"> triggers and functions </a> that bring application logic closer to your data and give Redis powerful features for event-driven data processing </p> <h3 id="details"> Details </h3> <p> <strong> Features and improvements </strong> </p> <p> <a href="https://github.com/RedisInsight/RedisInsight/pull/2247"> #2247 </a> , <a href="https://github.com/RedisInsight/RedisInsight/pull/2249"> #2249 </a> , <a href="https://github.com/RedisInsight/RedisInsight/pull/2273"> #2273 </a> , <a href="https://github.com/RedisInsight/RedisInsight/pull/2279"> #2279 </a> Support for <a href="https://github.com/RedisGears/RedisGears/"> triggers and functions </a> that add the capability to execute server-side functions triggered by events or data operations to: </p> <ul> <li> Speed up applications by running the application logic where the data lives </li> <li> Eliminate the need to maintain the same code across different applications by moving application functionality inside the Redis database </li> <li> Maintain consistent data when applications react to any keyspace change </li> <li> Improve code resiliency by backing up and replicating triggers and functions along with the database </li> </ul> <p> Triggers and functions work with a JavaScript engine, which lets you take advantage of JavaScript’s vast ecosystem of libraries and frameworks and modern, expressive syntax. </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/tools/insight/release-notes/v.2.30.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/security/encryption/tls/enable-tls/.html
<section class="prose w-full py-12 max-w-none"> <h1> Enable TLS </h1> <p class="text-lg -mt-5 mb-10"> Shows how to enable TLS. </p> <p> You can use TLS authentication for one or more of the following types of communication: </p> <ul> <li> Communication from clients (applications) to your database </li> <li> Communication from your database to other clusters for replication using <a href="/docs/latest/operate/rs/databases/import-export/replica-of/"> Replica Of </a> </li> <li> Communication to and from your database to other clusters for synchronization using <a href="/docs/latest/operate/rs/databases/active-active/"> Active-Active </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> When you enable or turn off TLS, the change applies to new connections but does not affect existing connections. Clients must close existing connections and reconnect to apply the change. </div> </div> <h2 id="client"> Enable TLS for client connections </h2> <p> To enable TLS for client connections: </p> <ol> <li> <p> From your database's <strong> Security </strong> tab, select <strong> Edit </strong> . </p> </li> <li> <p> In the <strong> TLS - Transport Layer Security for secure connections </strong> section, make sure the checkbox is selected. </p> </li> <li> <p> In the <strong> Apply TLS for </strong> section, select <strong> Clients and databases + Between databases </strong> . </p> </li> <li> <p> Select <strong> Save </strong> . </p> </li> </ol> <p> To enable mutual TLS for client connections: </p> <ol> <li> <p> Select <strong> Mutual TLS (Client authentication) </strong> . </p> <a href="/docs/latest/images/rs/screenshots/databases/security-mtls-clients-7-8-2.png" sdata-lightbox="/images/rs/screenshots/databases/security-mtls-clients-7-8-2.png"> <img alt="Mutual TLS authentication configuration." src="/docs/latest/images/rs/screenshots/databases/security-mtls-clients-7-8-2.png"/> </a> </li> <li> <p> For each client certificate, select <strong> + Add certificate </strong> , paste or upload the client certificate, then select <strong> Done </strong> . </p> <p> If your database uses Replica Of, you also need to add the syncer certificates for the participating clusters. See <a href="#enable-tls-for-replica-of-cluster-connections"> Enable TLS for Replica Of cluster connections </a> for instructions. </p> </li> <li> <p> You can configure <strong> Additional certificate validations </strong> to further limit connections to clients with valid certificates. </p> <p> Additional certificate validations occur only when loading a <a href="https://en.wikipedia.org/wiki/Chain_of_trust#Computer_security"> certificate chain </a> that includes the <a href="https://en.wikipedia.org/wiki/Root_certificate"> root certificate </a> and intermediate <a href="https://en.wikipedia.org/wiki/Certificate_authority"> CA </a> certificate but does not include a leaf (end-entity) certificate. If you include a leaf certificate, mutual client authentication skips any additional certificate validations. </p> <ol> <li> <p> Select a certificate validation option. </p> <table> <thead> <tr> <th> Validation option </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <em> No validation </em> </td> <td> Authenticates clients with valid certificates. No additional validations are enforced. </td> </tr> <tr> <td> <em> By Subject Alternative Name </em> </td> <td> A client certificate is valid only if its Common Name (CN) matches an entry in the list of valid subjects. Ignores other <a href="https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6"> <code> Subject </code> </a> attributes. </td> </tr> <tr> <td> <em> By full Subject Name </em> </td> <td> A client certificate is valid only if its <a href="https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6"> <code> Subject </code> </a> attributes match an entry in the list of valid subjects. </td> </tr> </tbody> </table> </li> <li> <p> If you selected <strong> No validation </strong> , you can skip this step. Otherwise, select <strong> + Add validation </strong> to create a new entry and then enter valid <a href="https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6"> <code> Subject </code> </a> attributes for your client certificates. All <code> Subject </code> attributes are case-sensitive. </p> <table> <thead> <tr> <th> Subject attribute <br/> (case-sensitive) </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <em> Common Name (CN) </em> </td> <td> Name of the client authenticated by the certificate ( <em> required </em> ) </td> </tr> <tr> <td> <em> Organization (O) </em> </td> <td> The client's organization or company name </td> </tr> <tr> <td> <nobr> <em> Organizational Unit (OU) </em> </nobr> </td> <td> Name of the unit or department within the organization </td> </tr> <tr> <td> <em> Locality (L) </em> </td> <td> The organization's city </td> </tr> <tr> <td> <em> State / Province (ST) </em> </td> <td> The organization's state or province </td> </tr> <tr> <td> <em> Country (C) </em> </td> <td> 2-letter code that represents the organization's country </td> </tr> </tbody> </table> <p> You can only enter a single value for each field, except for the <em> Organizational Unit (OU) </em> field. If your client certificate has a <code> Subject </code> with multiple <em> Organizational Unit (OU) </em> values, press the <code> Enter </code> or <code> Return </code> key after entering each value to add multiple Organizational Units. </p> <a href="/docs/latest/images/rs/screenshots/databases/security-mtls-add-cert-validation-multi-ou.png" sdata-lightbox="/images/rs/screenshots/databases/security-mtls-add-cert-validation-multi-ou.png"> <img alt="An example that shows adding a certificate validation with multiple organizational units." src="/docs/latest/images/rs/screenshots/databases/security-mtls-add-cert-validation-multi-ou.png" width="350px"/> </a> <p> <strong> Breaking change: </strong> If you use the <a href="/docs/latest/operate/rs/references/rest-api/"> REST API </a> instead of the Cluster Manager UI to configure additional certificate validations, note that <code> authorized_names </code> is deprecated as of Redis Enterprise v6.4.2. Use <code> authorized_subjects </code> instead. See the <a href="/docs/latest/operate/rs/references/rest-api/objects/bdb/"> BDB object reference </a> for more details. </p> </li> </ol> </li> <li> <p> Select <strong> Save </strong> . </p> </li> </ol> <p> By default, Redis Enterprise Software validates client certificate expiration dates. You can use <code> rladmin </code> to turn off this behavior. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin tune db &lt; db:id <span class="p">|</span> name &gt; mtls_allow_outdated_certs enabled </span></span></code></pre> </div> <h2 id="enable-tls-for-active-active-cluster-connections"> Enable TLS for Active-Active cluster connections </h2> <p> You cannot enable or turn off TLS after the Active-Active database is created, but you can change the TLS configuration. </p> <p> To enable TLS for Active-Active cluster connections: </p> <ol> <li> <p> During <a href="/docs/latest/operate/rs/databases/active-active/create/"> database creation </a> , expand the <strong> TLS </strong> configuration section. </p> </li> <li> <p> Select <strong> On </strong> to enable TLS. </p> <a href="/docs/latest/images/rs/screenshots/databases/active-active-databases/enable-tls-for-active-active-db.png" sdata-lightbox="/images/rs/screenshots/databases/active-active-databases/enable-tls-for-active-active-db.png"> <img alt="TLS is enabled on the Cluster Manager UI screen." src="/docs/latest/images/rs/screenshots/databases/active-active-databases/enable-tls-for-active-active-db.png"/> </a> </li> <li> <p> Click <strong> Create </strong> . </p> </li> </ol> <p> If you also want to require TLS for client connections, you must edit the Active-Active database configuration after creation. See <a href="#client"> Enable TLS for client connections </a> for instructions. </p> <h2 id="enable-tls-for-replica-of-cluster-connections"> Enable TLS for Replica Of cluster connections </h2> <p> To enable TLS for Replica Of cluster connections: </p> <ol> <li> <p> For each cluster hosting a replica: </p> <ol> <li> <p> Go to <strong> Cluster &gt; Security &gt; Certificates </strong> . </p> </li> <li> <p> Expand the <strong> Replica Of and Active-Active authentication (Syncer certificate) </strong> section. </p> <a href="/docs/latest/images/rs/screenshots/cluster/security-syncer-cert.png" sdata-lightbox="/images/rs/screenshots/cluster/security-syncer-cert.png"> <img alt="Syncer certificate for Replica Of and Active-Active authentication." src="/docs/latest/images/rs/screenshots/cluster/security-syncer-cert.png"/> </a> </li> <li> <p> Download or copy the syncer certificate. </p> </li> </ol> </li> <li> <p> From the <strong> Security </strong> tab of the Replica Of source database, select <strong> Edit </strong> . </p> </li> <li> <p> In the <strong> TLS - Transport Layer Security for secure connections </strong> section, make sure the checkbox is selected. </p> </li> <li> <p> In the <strong> Apply TLS for </strong> section, select <strong> Between databases only </strong> . </p> </li> <li> <p> Select <strong> Mutual TLS (Client authentication) </strong> . </p> <a href="/docs/latest/images/rs/screenshots/databases/security-tls-replica-of.png" sdata-lightbox="/images/rs/screenshots/databases/security-tls-replica-of.png"> <img alt="Replica Of TLS authentication configuration." src="/docs/latest/images/rs/screenshots/databases/security-tls-replica-of.png"/> </a> </li> <li> <p> Select <strong> + Add certificate </strong> , paste or upload the syncer certificate, then select <strong> Done </strong> . </p> <p> Repeat this process, adding the syncer certificate for each cluster hosting a replica of this database. </p> </li> <li> <p> <em> (Optional) </em> To require TLS for client connections, change <strong> Apply TLS for </strong> to <strong> Clients and databases + Between databases </strong> and add client certificates. </p> </li> <li> <p> Select <strong> Save </strong> . </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/security/encryption/tls/enable-tls/"/> <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/.html
<section class="prose w-full py-12 max-w-none"> <h1> RedisGears Java classes and functions </h1> <p> The RedisGears JVM plugin provides a set of classes and functions for you to use in your Java code. </p> <h2 id="classes"> Classes </h2> <table> <thead> <tr> <th style="text-align:left"> Class </th> <th style="text-align:left"> Description </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/jvm/classes/gearsbuilder/"> GearsBuilder </a> </td> <td style="text-align:left"> Creates a RedisGears pipeline of operations to transform data. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/jvm/classes/gearsfuture/"> GearsFuture </a> </td> <td style="text-align:left"> Allows asynchronous processing of records. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/jvm/classes/readers/"> Readers </a> </td> <td style="text-align:left"> Extracts data from the database and creates records to pass through a RedisGears pipeline. </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/gears-v1/jvm/classes/"/> <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/suffix/.html
<section class="prose w-full py-12 max-w-none"> <h1> rladmin suffix </h1> <p class="text-lg -mt-5 mb-10"> Manages the DNS suffixes in the cluster. </p> <p> Manages the DNS suffixes in the cluster. </p> <h2 id="suffix-add"> <code> suffix add </code> </h2> <p> Adds a DNS suffix to the cluster. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin suffix add name &lt;name&gt; </span></span><span class="line"><span class="cl"> <span class="o">[</span>default<span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>internal<span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>mdns<span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>use_aaaa_ns<span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>slaves &lt;ip&gt;..<span class="o">]</span> </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> name </td> <td> string </td> <td> DNS suffix to add to the cluster </td> </tr> <tr> <td> default </td> <td> </td> <td> Sets the given suffix as the default. If a default already exists, this overwrites it. </td> </tr> <tr> <td> internal </td> <td> </td> <td> Forces the given suffix to use private IPs </td> </tr> <tr> <td> mdns </td> <td> </td> <td> Activates multicast DNS support for the given suffix </td> </tr> <tr> <td> slaves </td> <td> list of IPv4 addresses </td> <td> The given suffix will notify the frontend DNS servers when a change in the frontend DNS has occurred </td> </tr> <tr> <td> use_aaaa_ns </td> <td> </td> <td> Activates IPv6 address support </td> </tr> </tbody> </table> <h3 id="returns"> Returns </h3> <p> Returns <code> Added suffixes successfully </code> if the suffix was added. Otherwise, it returns an error. </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 suffix add name new.rediscluster.local </span></span><span class="line"><span class="cl">Added suffixes successfully </span></span></code></pre> </div> <h2 id="suffix-delete"> <code> suffix delete </code> </h2> <p> Deletes an existing DNS suffix from the cluster. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin suffix delete name &lt;name&gt; </span></span></code></pre> </div> <h3 id="parameters-1"> Parameters </h3> <table> <thead> <tr> <th> Parameter </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> name </td> <td> string </td> <td> DNS suffix to delete from the cluster </td> </tr> </tbody> </table> <h3 id="returns-1"> Returns </h3> <p> Returns <code> Suffix deleted successfully </code> if the suffix was deleted. Otherwise, it returns an error. </p> <h3 id="example-1"> Example </h3> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ rladmin suffix delete name new.rediscluster.local </span></span><span class="line"><span class="cl">Suffix deleted successfully </span></span></code></pre> </div> <h2 id="suffix-list"> <code> suffix list </code> </h2> <p> Lists the DNS suffixes in the cluster. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin suffix list </span></span></code></pre> </div> <h3 id="parameters-2"> Parameters </h3> <p> None </p> <h3 id="returns-2"> Returns </h3> <p> Returns a list of the DNS suffixes. </p> <h3 id="example-2"> Example </h3> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ rladmin suffix list </span></span><span class="line"><span class="cl">List of all suffixes: </span></span><span class="line"><span class="cl">cluster.local </span></span><span class="line"><span class="cl">new.rediscluster.local </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/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/operate/rs/security/access-control/create-cluster-roles/.html
<section class="prose w-full py-12 max-w-none"> <h1> Create roles with cluster access only </h1> <p class="text-lg -mt-5 mb-10"> Create roles with cluster access only. </p> <p> Roles with cluster access allow access to the Cluster Management UI and REST API. </p> <h2 id="default-management-roles"> Default management roles </h2> <p> Redis Enterprise Software includes five predefined roles that determine a user's level of access to the Cluster Manager UI and <a href="/docs/latest/operate/rs/references/rest-api/"> REST API </a> . </p> <ol> <li> <strong> DB Viewer </strong> - Read database settings </li> <li> <strong> DB Member </strong> - Administer databases </li> <li> <strong> Cluster Viewer </strong> - Read cluster settings </li> <li> <strong> Cluster Member </strong> - Administer the cluster </li> <li> <strong> User Manager </strong> - Administer users </li> <li> <strong> Admin </strong> - Full cluster access </li> <li> <strong> None </strong> - For data access only - cannot access the Cluster Manager UI or use the REST API </li> </ol> <p> For more details about the privileges granted by each of these roles, see <a href="#cluster-manager-ui-permissions"> Cluster Manager UI permissions </a> or <a href="/docs/latest/operate/rs/references/rest-api/permissions/"> REST API permissions </a> . </p> <h2 id="cluster-manager-ui-permissions"> Cluster Manager UI permissions </h2> <p> Here's a summary of the Cluster Manager UI actions permitted by each default management role: </p> <table> <thead> <tr> <th> Action </th> <th style="text-align:center"> DB Viewer </th> <th style="text-align:center"> DB Member </th> <th style="text-align:center"> Cluster Viewer </th> <th style="text-align:center"> Cluster Member </th> <th style="text-align:center"> Admin </th> <th style="text-align:center"> User Manager </th> </tr> </thead> <tbody> <tr> <td> Create, edit, delete users and LDAP mappings </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> </tr> <tr> <td> Create support package </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> </tr> <tr> <td> Edit database configuration </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> </tr> <tr> <td> Reset slow log </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> </tr> <tr> <td> View cluster configuration </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> </tr> <tr> <td> View cluster logs </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> <br/> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> <br/> </td> </tr> <tr> <td> View cluster metrics </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> </tr> <tr> <td> View database configuration </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> </tr> <tr> <td> View database metrics </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> </tr> <tr> <td> View node configuration </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> </tr> <tr> <td> View node metrics </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> </tr> <tr> <td> View Redis database password </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> </tr> <tr> <td> View slow log </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> </tr> <tr> <td> View and edit cluster settings </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> <td style="text-align:center"> <span title="Allowed"> βœ… Yes </span> </td> <td style="text-align:center"> <span title="Not allowed"> ❌ No </span> </td> </tr> </tbody> </table> <h2 id="create-cluster-role"> Create roles for cluster access </h2> <p> To create a role that grants cluster access but does not grant access to any databases: </p> <ol> <li> <p> From <strong> Access Control </strong> &gt; <strong> Roles </strong> , you can: </p> <ul> <li> <p> Point to a role 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 an existing role. </p> </li> <li> <p> Select <strong> + Add role </strong> to create a new role. </p> </li> </ul> <a href="/docs/latest/images/rs/access-control-role-panel.png" sdata-lightbox="/images/rs/access-control-role-panel.png"> <img alt="Add role with name" src="/docs/latest/images/rs/access-control-role-panel.png"/> </a> </li> <li> <p> Enter a descriptive name for the role. </p> </li> <li> <p> Choose a <strong> Cluster management role </strong> to determine cluster management permissions. </p> <a href="/docs/latest/images/rs/screenshots/access-control/rbac-create-role-cluster-only.png" sdata-lightbox="/images/rs/screenshots/access-control/rbac-create-role-cluster-only.png"> <img alt="Select a cluster management role to set the level of cluster management permissions for the new role." src="/docs/latest/images/rs/screenshots/access-control/rbac-create-role-cluster-only.png"/> </a> </li> <li> <p> To prevent database access when using this role, do not add any ACLs. </p> </li> <li> <p> Select <strong> Save </strong> . </p> </li> </ol> <p> You can <a href="/docs/latest/operate/rs/security/access-control/create-users/#assign-roles-to-users"> assign the new role to users </a> to grant cluster access. </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/security/access-control/create-cluster-roles/"/> <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/tdigest.max/.html
<section class="prose w-full py-12"> <h1 class="command-name"> TDIGEST.MAX </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">TDIGEST.MAX key</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.4.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> Returns the maximum observation value from a t-digest sketch. </p> <h2 id="required-arguments"> Required arguments </h2> <details open=""> <summary> <code> key </code> </summary> is key name for an existing t-digest sketch. </details> <h2 id="return-value"> Return value </h2> <p> <a href="/docs/latest/develop/reference/protocol-spec/#simple-strings"> Simple string reply </a> of maximum observation value from a sketch. The result is always accurate. 'nan' if the sketch is empty. </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; TDIGEST.CREATE t </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">redis&gt; TDIGEST.MAX t </span></span><span class="line"><span class="cl"><span class="s2">"nan"</span> </span></span><span class="line"><span class="cl">redis&gt; TDIGEST.ADD t <span class="m">3</span> <span class="m">4</span> <span class="m">1</span> <span class="m">2</span> <span class="m">5</span> </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">redis&gt;TDIGEST.MAX t </span></span><span class="line"><span class="cl"><span class="s2">"5"</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/tdigest.max/"/> <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/sismember/.html
<section class="prose w-full py-12"> <h1 class="command-name"> SISMEMBER </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">SISMEMBER key member</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> @read </code> <span class="mr-1 last:hidden"> , </span> <code> @set </code> <span class="mr-1 last:hidden"> , </span> <code> @fast </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Returns if <code> member </code> is a member of the set stored at <code> key </code> . </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; SADD myset "one" (integer) 1 redis&gt; SISMEMBER myset "one" (integer) 1 redis&gt; SISMEMBER myset "two" (integer) 0 </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> <p> One of the following: </p> <ul> <li> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : <code> 0 </code> if the element is not a member of the set, or when the key does not exist. </li> <li> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : <code> 1 </code> if the element is a member of the set. </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/sismember/"/> <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/zrevrangebyscore/.html
<section class="prose w-full py-12"> <h1 class="command-name"> ZREVRANGEBYSCORE <span class="text-base"> (deprecated) </span> </h1> <div class="border-l-8 pl-4"> <p> As of Redis version 6.2.0, this command is regarded as deprecated. </p> <p> It can be replaced by <a href="/docs/latest/commands/zrange/"> <code> ZRANGE </code> </a> with the <code> REV </code> and <code> BYSCORE </code> arguments when migrating or writing new code. </p> </div> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">ZREVRANGEBYSCORE key max min [WITHSCORES] [LIMITΒ offset count]</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.2.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)). </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> @sortedset </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Returns all the elements in the sorted set at <code> key </code> with a score between <code> max </code> and <code> min </code> (including elements with score equal to <code> max </code> or <code> min </code> ). In contrary to the default ordering of sorted sets, for this command the elements are considered to be ordered from high to low scores. </p> <p> The elements having the same score are returned in reverse lexicographical order. </p> <p> Apart from the reversed ordering, <code> ZREVRANGEBYSCORE </code> is similar to <a href="/docs/latest/commands/zrangebyscore/"> <code> ZRANGEBYSCORE </code> </a> . </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 myzset 1 "one" (integer) 1 redis&gt; ZADD myzset 2 "two" (integer) 1 redis&gt; ZADD myzset 3 "three" (integer) 1 redis&gt; ZREVRANGEBYSCORE myzset +inf -inf 1) "three" 2) "two" 3) "one" redis&gt; ZREVRANGEBYSCORE myzset 2 1 1) "two" 2) "one" redis&gt; ZREVRANGEBYSCORE myzset 2 (1 1) "two" redis&gt; ZREVRANGEBYSCORE myzset (2 (1 (empty array) </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> <ul> <li> <a href="../../develop/reference/protocol-spec#arrays"> Array reply </a> : a list of the members and, optionally, their scores in the specified score range. </li> </ul> <br/> <h2> History </h2> <ul> <li> Starting with Redis version 2.1.6: <code> min </code> and <code> max </code> can be exclusive. </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/zrevrangebyscore/"/> <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/latency-history/.html
<section class="prose w-full py-12"> <h1 class="command-name"> LATENCY HISTORY </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">LATENCY HISTORY event</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.8.13 </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> LATENCY HISTORY </code> command returns the raw data of the <code> event </code> 's latency spikes time series. </p> <p> This is useful to an application that wants to fetch raw data in order to perform monitoring, display graphs, and so forth. </p> <p> The command will return up to 160 timestamp-latency pairs for the <code> event </code> . </p> <p> Valid values for <code> event </code> are: </p> <ul> <li> <code> active-defrag-cycle </code> </li> <li> <code> aof-fsync-always </code> </li> <li> <code> aof-stat </code> </li> <li> <code> aof-rewrite-diff-write </code> </li> <li> <code> aof-rename </code> </li> <li> <code> aof-write </code> </li> <li> <code> aof-write-active-child </code> </li> <li> <code> aof-write-alone </code> </li> <li> <code> aof-write-pending-fsync </code> </li> <li> <code> command </code> </li> <li> <code> expire-cycle </code> </li> <li> <code> eviction-cycle </code> </li> <li> <code> eviction-del </code> </li> <li> <code> fast-command </code> </li> <li> <code> fork </code> </li> <li> <code> rdb-unlink-temp-file </code> </li> </ul> <h2 id="examples"> Examples </h2> <pre tabindex="0"><code>127.0.0.1:6379&gt; latency history command 1) 1) (integer) 1405067822 2) (integer) 251 2) 1) (integer) 1405067941 2) (integer) 1001 </code></pre> <p> For more information refer to the <a href="/operate/oss_and_stack/management/optimization/latency-monitor.md"> Latency Monitoring Framework page </a> . </p> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#arrays"> Array reply </a> : an array where each element is a two elements array representing the timestamp and the latency of the event. <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/latency-history/"/> <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/smove/.html
<section class="prose w-full py-12"> <h1 class="command-name"> SMOVE </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">SMOVE source destination member</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> @write </code> <span class="mr-1 last:hidden"> , </span> <code> @set </code> <span class="mr-1 last:hidden"> , </span> <code> @fast </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Move <code> member </code> from the set at <code> source </code> to the set at <code> destination </code> . This operation is atomic. In every given moment the element will appear to be a member of <code> source </code> <strong> or </strong> <code> destination </code> for other clients. </p> <p> If the source set does not exist or does not contain the specified element, no operation is performed and <code> 0 </code> is returned. Otherwise, the element is removed from the source set and added to the destination set. When the specified element already exists in the destination set, it is only removed from the source set. </p> <p> An error is returned if <code> source </code> or <code> destination </code> does not hold a set value. </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; SADD myset "one" (integer) 1 redis&gt; SADD myset "two" (integer) 1 redis&gt; SADD myotherset "three" (integer) 1 redis&gt; SMOVE myset myotherset "two" (integer) 1 redis&gt; SMEMBERS myset 1) "one" redis&gt; SMEMBERS myotherset 1) "three" 2) "two" </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> <p> One of the following: </p> <ul> <li> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : <code> 1 </code> if the element is moved. </li> <li> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : <code> 0 </code> if the element is not a member of <em> source </em> and no operation was performed. </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/smove/"/> <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/api/examples/back-up-and-import-data/.html
<section class="prose w-full py-12 max-w-none"> <h1> Database backup and import </h1> <p class="text-lg -mt-5 mb-10"> When you create or update a database, you can specify the backup path. The import API operation lets you import data from various source types and specified locations. </p> <h2 id="back-up-a-database"> Back up a database </h2> <p> When you create or update a database, you can specify the (optional) <code> periodicBackupPath </code> parameter with a <a href="/docs/latest/operate/rc/databases/back-up-data/"> backup path </a> . This parameter enables periodic and on-demand backup operations for the specified database. </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 number of database backups that can run simultaneously on a cluster is limited to 4 by default. </div> </div> <p> The API operation for on-demand backups is <code> POST /subscriptions/{subscriptionId}/databases/{databaseId}/backup </code> . On-demand database backup is an <a href="/docs/latest/operate/rc/api/get-started/process-lifecycle/"> asynchronous operation </a> . </p> <div class="highlight"> <pre class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">POST <span class="s2">"https://[host]/v1/subscriptions/&lt;subscriptionId&gt;/databases/&lt;databaseId&gt;/backup"</span> </span></span></code></pre> </div> <p> The backup database API does not require a body. Instead, the <code> periodicBackupPath </code> must be set to a valid path with available storage capacity to store the backup files for the specific database. </p> <h2 id="import-a-database"> Import a database </h2> <p> You can import data into an existing database from multiple storage sources, including AWS S3, Redis, and FTP. Database import is an <a href="/docs/latest/operate/rc/api/get-started/process-lifecycle/"> asynchronous operation </a> . </p> <p> The API operation for performing on-demand backup is <code> POST /v1/subscriptions/{subscriptionId}/databases/{databaseId}/import </code> . </p> <p> The requirements for data import are: </p> <ul> <li> The URI of the data <ul> <li> The source URI must be accessible to the importing database </li> <li> The data format must be a Redis backup file or a Redis database </li> </ul> </li> <li> The subscription ID and database ID of the destination database </li> </ul> <p> The duration of the import process depends on the amount of data imported and the network bandwidth between the data source and the importing database. </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> Data imported into an existing database overwrites any existing data. </div> </div> <p> To import the data, run: </p> <div class="highlight"> <pre class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">POST <span class="s2">"https://[host]/v1/subscriptions/&lt;subscriptionId&gt;/databases/{databaseId}/import"</span> <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span><span class="o">{</span> </span></span><span class="line"><span class="cl"> <span class="s2">"sourceType"</span>: <span class="s2">"aws-s3"</span>, </span></span><span class="line"><span class="cl"> <span class="s2">"importFromUri"</span>: <span class="o">[</span> </span></span><span class="line"><span class="cl"> <span class="s2">"s3://bucketname/filename-dbForAWSBackup-1_of_3.rdb.gz"</span>, </span></span><span class="line"><span class="cl"> <span class="s2">"s3://bucketname/filename-dbForAWSBackup-2_of_3.rdb.gz"</span>, </span></span><span class="line"><span class="cl"> <span class="s2">"s3://bucketname/filename-dbForAWSBackup-3_of_3.rdb.gz"</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> You can specify the backup location with the <code> sourceType </code> and <code> importFromUri </code> values for these sources: </p> <table> <thead> <tr> <th> Data location </th> <th> sourceType </th> <th> importFromUri </th> </tr> </thead> <tbody> <tr> <td> Amazon AWS S3 </td> <td> aws-s3 </td> <td> s3://bucketname/[path/]filename.rdb[.gz] </td> </tr> <tr> <td> FTP </td> <td> ftp </td> <td> ftp://[username][:password]@[:port]/[path/]filename.rdb[.gz] </td> </tr> <tr> <td> Google Blob Storage </td> <td> google-blob-storage </td> <td> gs://bucketname/[path/]filename.rdb[.gz] </td> </tr> <tr> <td> Microsoft Azure Blob Storage </td> <td> azure-blob-storage </td> <td> abs://:storage_account_access_key@storage_account_name/[container/]filename.rdb[.gz] </td> </tr> <tr> <td> Redis server </td> <td> redis </td> <td> redis://[db_password]@[host]:[port] </td> </tr> <tr> <td> Web server </td> <td> HTTP </td> <td> HTTP://[username][:password]@[:port]/[path/]filename.rdb[.gz] </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/rc/api/examples/back-up-and-import-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/7.4/security/encryption/tls/tls-protocols/.html
<section class="prose w-full py-12 max-w-none"> <h1> Configure TLS protocol </h1> <p> You can change TLS protocols to improve the security of your Redis Enterprise cluster and databases. The default settings are in line with industry best practices, but you can customize them to match the security policy of your organization. </p> <h2 id="configure-tls-protocol"> Configure TLS protocol </h2> <p> The communications for which you can modify TLS protocols are: </p> <ul> <li> Control plane - The TLS configuration for cluster administration. </li> <li> Data plane - The TLS configuration for the communication between applications and databases. </li> <li> Discovery service (Sentinel) - The TLS configuration for the <a href="/docs/latest/operate/rs/7.4/databases/durability-ha/discovery-service/"> discovery service </a> . </li> </ul> <p> You can configure TLS protocols with the <a href="#edit-tls-ui"> Cluster Manager UI </a> , <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/config/"> <code> rladmin </code> </a> , or the <a href="/docs/latest/operate/rs/7.4/references/rest-api/requests/cluster/#put-cluster"> REST API </a> . </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> <ul> <li> <p> After you set the minimum TLS version, Redis Enterprise Software does not accept communications with TLS versions older than the specified version. </p> </li> <li> <p> If you set TLS 1.3 as the minimum TLS version, clients must support TLS 1.3 to connect to Redis Enterprise. </p> </li> </ul> </div> </div> <p> TLS support depends on the operating system. You cannot enable support for protocols or versions that aren't supported by the operating system running Redis Enterprise Software. In addition, updates to the operating system or to Redis Enterprise Software can impact protocol and version support. </p> <p> If you have trouble enabling specific versions of TLS, verify that they're supported by your operating system and that they're configured correctly. </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> TLSv1.2 is generally recommended as the minimum TLS version for encrypted communications. Check with your security team to confirm which TLS protocols meet your organization's policies. </div> </div> <h3 id="edit-tls-ui"> Edit TLS settings in the UI </h3> <p> To configure minimum TLS versions using the Cluster Manager UI: </p> <ol> <li> <p> Go to <strong> Cluster &gt; Security </strong> , then select the <strong> TLS </strong> tab. </p> </li> <li> <p> Click <strong> Edit </strong> . </p> </li> <li> <p> Select the minimum TLS version for cluster connections, database connections, and the discovery service: </p> <a href="/docs/latest/images/rs/screenshots/cluster/security-tls-protocols-edit.png" sdata-lightbox="/images/rs/screenshots/cluster/security-tls-protocols-edit.png"> <img alt="Cluster &gt; Security &gt; TLS settings in edit mode in the Cluster Manager UI." src="/docs/latest/images/rs/screenshots/cluster/security-tls-protocols-edit.png"/> </a> </li> <li> <p> Select the TLS mode for the discovery service: </p> <ul> <li> <strong> Allowed </strong> - Allows both TLS and non-TLS connections </li> <li> <strong> Required </strong> - Allows only TLS connections </li> <li> <strong> Disabled </strong> - Allows only non-TLS connections </li> </ul> </li> <li> <p> Click <strong> Save </strong> . </p> </li> </ol> <h3 id="control-plane-tls"> Control plane TLS </h3> <p> To set the minimum TLS protocol for the control plane using <code> rladmin </code> : </p> <ul> <li> Default minimum TLS protocol: TLSv1.2 </li> <li> Syntax: <code> rladmin cluster config min_control_TLS_version &lt;TLS_Version&gt; </code> </li> <li> TLS versions available: <ul> <li> For TLSv1.2 - 1.2 </li> <li> For TLSv1.3 - 1.3 </li> </ul> </li> </ul> <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 min_control_TLS_version 1.2 </span></span></code></pre> </div> <h3 id="data-plane-tls"> Data plane TLS </h3> <p> To set the minimum TLS protocol for the data path using <code> rladmin </code> : </p> <ul> <li> Default minimum TLS protocol: TLSv1.2 </li> <li> Syntax: <code> rladmin cluster config min_data_TLS_version &lt;TLS_Version&gt; </code> </li> <li> TLS versions available: <ul> <li> For TLSv1.2 - 1.2 </li> <li> For TLSv1.3 - 1.3 </li> </ul> </li> </ul> <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 min_data_TLS_version 1.2 </span></span></code></pre> </div> <h3 id="discovery-service-tls"> Discovery service TLS </h3> <p> To enable TLS for the discovery service using <code> rladmin </code> : </p> <ul> <li> Default: Allows both TLS and non-TLS connections </li> <li> Syntax: <code> rladmin cluster config sentinel_tls_mode &lt;ssl_policy&gt; </code> </li> <li> <code> ssl_policy </code> values available: <ul> <li> <code> allowed </code> - Allows both TLS and non-TLS connections </li> <li> <code> required </code> - Allows only TLS connections </li> <li> <code> disabled </code> - Allows only non-TLS connections </li> </ul> </li> </ul> <p> To set the minimum TLS protocol for the discovery service using <code> rladmin </code> : </p> <ul> <li> Default minimum TLS protocol: TLSv1.2 </li> <li> Syntax: <code> rladmin cluster config min_sentinel_TLS_version &lt;TLS_Version&gt; </code> </li> <li> TLS versions available: <ul> <li> For TLSv1.2 - 1.2 </li> <li> For TLSv1.3 - 1.3 </li> </ul> </li> </ul> <p> To enforce a minimum TLS version for the discovery service, run the following commands: </p> <ol> <li> <p> Allow only TLS connections: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster config sentinel_tls_mode required </span></span></code></pre> </div> </li> <li> <p> Set the minimal TLS version: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster config min_sentinel_TLS_version 1.2 </span></span></code></pre> </div> </li> <li> <p> Restart the discovery service on all cluster nodes to apply your changes: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">supervisorctl restart sentinel_service </span></span></code></pre> </div> </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/7.4/security/encryption/tls/tls-protocols/"/> <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.config-get/.html
<section class="prose w-full py-12"> <h1 class="command-name"> FT.CONFIG GET </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">FT.CONFIG GET option </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> Retrieve configuration options </p> <p> <a href="#examples"> Examples </a> </p> <h2 id="required-arguments"> Required arguments </h2> <details open=""> <summary> <code> option </code> </summary> <p> is name of the configuration option, or '*' for all. </p> </details> <h2 id="return"> Return </h2> <p> FT.CONFIG GET returns an array reply of the configuration name and value. </p> <h2 id="examples"> Examples </h2> <details open=""> <summary> <b> Retrieve configuration options </b> </summary> <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; FT.CONFIG GET TIMEOUT </span></span><span class="line"><span class="cl">1<span class="o">)</span> 1<span class="o">)</span> TIMEOUT </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">42</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">127.0.0.1:6379&gt; FT.CONFIG GET * </span></span><span class="line"><span class="cl"> 1<span class="o">)</span> 1<span class="o">)</span> EXTLOAD </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"> 2<span class="o">)</span> 1<span class="o">)</span> SAFEMODE </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="nb">true</span> </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> 1<span class="o">)</span> CONCURRENT_WRITE_MODE </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="nb">false</span> </span></span><span class="line"><span class="cl"> 4<span class="o">)</span> 1<span class="o">)</span> NOGC </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="nb">false</span> </span></span><span class="line"><span class="cl"> 5<span class="o">)</span> 1<span class="o">)</span> MINPREFIX </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">2</span> </span></span><span class="line"><span class="cl"> 6<span class="o">)</span> 1<span class="o">)</span> FORKGC_SLEEP_BEFORE_EXIT </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">0</span> </span></span><span class="line"><span class="cl"> 7<span class="o">)</span> 1<span class="o">)</span> MAXDOCTABLESIZE </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">1000000</span> </span></span><span class="line"><span class="cl"> 8<span class="o">)</span> 1<span class="o">)</span> MAXSEARCHRESULTS </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">1000000</span> </span></span><span class="line"><span class="cl"> 9<span class="o">)</span> 1<span class="o">)</span> MAXAGGREGATERESULTS </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> unlimited </span></span><span class="line"><span class="cl">10<span class="o">)</span> 1<span class="o">)</span> MAXEXPANSIONS </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">200</span> </span></span><span class="line"><span class="cl">11<span class="o">)</span> 1<span class="o">)</span> MAXPREFIXEXPANSIONS </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">200</span> </span></span><span class="line"><span class="cl">12<span class="o">)</span> 1<span class="o">)</span> TIMEOUT </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">42</span> </span></span><span class="line"><span class="cl">13<span class="o">)</span> 1<span class="o">)</span> INDEX_THREADS </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">8</span> </span></span><span class="line"><span class="cl">14<span class="o">)</span> 1<span class="o">)</span> SEARCH_THREADS </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">20</span> </span></span><span class="line"><span class="cl">15<span class="o">)</span> 1<span class="o">)</span> FRISOINI </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">16<span class="o">)</span> 1<span class="o">)</span> ON_TIMEOUT </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="k">return</span> </span></span><span class="line"><span class="cl">17<span class="o">)</span> 1<span class="o">)</span> GCSCANSIZE </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">100</span> </span></span><span class="line"><span class="cl">18<span class="o">)</span> 1<span class="o">)</span> MIN_PHONETIC_TERM_LEN </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">3</span> </span></span><span class="line"><span class="cl">19<span class="o">)</span> 1<span class="o">)</span> GC_POLICY </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> fork </span></span><span class="line"><span class="cl">20<span class="o">)</span> 1<span class="o">)</span> FORK_GC_RUN_INTERVAL </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">30</span> </span></span><span class="line"><span class="cl">21<span class="o">)</span> 1<span class="o">)</span> FORK_GC_CLEAN_THRESHOLD </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">100</span> </span></span><span class="line"><span class="cl">22<span class="o">)</span> 1<span class="o">)</span> FORK_GC_RETRY_INTERVAL </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">5</span> </span></span><span class="line"><span class="cl">23<span class="o">)</span> 1<span class="o">)</span> FORK_GC_CLEAN_NUMERIC_EMPTY_NODES </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="nb">true</span> </span></span><span class="line"><span class="cl">24<span class="o">)</span> 1<span class="o">)</span> _FORK_GC_CLEAN_NUMERIC_EMPTY_NODES </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="nb">true</span> </span></span><span class="line"><span class="cl">25<span class="o">)</span> 1<span class="o">)</span> _MAX_RESULTS_TO_UNSORTED_MODE </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">1000</span> </span></span><span class="line"><span class="cl">26<span class="o">)</span> 1<span class="o">)</span> UNION_ITERATOR_HEAP </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">20</span> </span></span><span class="line"><span class="cl">27<span class="o">)</span> 1<span class="o">)</span> CURSOR_MAX_IDLE </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">300000</span> </span></span><span class="line"><span class="cl">28<span class="o">)</span> 1<span class="o">)</span> NO_MEM_POOLS </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="nb">false</span> </span></span><span class="line"><span class="cl">29<span class="o">)</span> 1<span class="o">)</span> PARTIAL_INDEXED_DOCS </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="nb">false</span> </span></span><span class="line"><span class="cl">30<span class="o">)</span> 1<span class="o">)</span> UPGRADE_INDEX </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> Upgrade config <span class="k">for</span> upgrading </span></span><span class="line"><span class="cl">31<span class="o">)</span> 1<span class="o">)</span> _NUMERIC_COMPRESS </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="nb">false</span> </span></span><span class="line"><span class="cl">32<span class="o">)</span> 1<span class="o">)</span> _FREE_RESOURCE_ON_THREAD </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="nb">true</span> </span></span><span class="line"><span class="cl">33<span class="o">)</span> 1<span class="o">)</span> _PRINT_PROFILE_CLOCK </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="nb">true</span> </span></span><span class="line"><span class="cl">34<span class="o">)</span> 1<span class="o">)</span> RAW_DOCID_ENCODING </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="nb">false</span> </span></span><span class="line"><span class="cl">35<span class="o">)</span> 1<span class="o">)</span> _NUMERIC_RANGES_PARENTS </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">0</span> </span></span><span class="line"><span class="cl">36<span class="o">)</span> 1<span class="o">)</span> MINSTEMLEN </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">4</span></span></span></code></pre> </div> </details> <h2 id="see-also"> See also </h2> <p> <a href="/docs/latest/commands/ft.config-set/"> <code> FT.CONFIG SET </code> </a> | <a href="/docs/latest/commands/ft.config-help/"> <code> FT.CONFIG HELP </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.config-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/oss_and_stack/stack-with-enterprise/deprecated-features/graph/.html
<section class="prose w-full py-12 max-w-none"> <h1> Graph </h1> <p class="text-lg -mt-5 mb-10"> RedisGraph is a queryable graph database built on Redis. </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> RedisGraph is the first queryable <a href="https://github.com/opencypher/openCypher/blob/master/docs/property-graph-model.adoc"> Property Graph </a> database to use <a href="https://en.wikipedia.org/wiki/Sparse_matrix"> sparse matrices </a> to represent the <a href="https://en.wikipedia.org/wiki/Adjacency_matrix"> adjacency matrix </a> in graphs and <a href="http://faculty.cse.tamu.edu/davis/GraphBLAS.html"> linear algebra </a> to query the graph. </p> <h2 id="primary-features"> Primary features </h2> <ul> <li> Based on the <a href="https://github.com/opencypher/openCypher/blob/master/docs/property-graph-model.adoc"> Property Graph Model </a> <ul> <li> Nodes (vertices) and Relationships (edges) that may have attributes </li> <li> Nodes that can be labeled </li> <li> Relationships have a relationship type </li> </ul> </li> <li> Graphs represented as sparse adjacency matrices </li> <li> <a href="http://www.opencypher.org/"> Cypher </a> as query language <ul> <li> Cypher queries translated into linear algebra expressions </li> </ul> </li> </ul> <h2 id="commands"> Commands </h2> <p> See <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/deprecated-features/graph/commands/"> Graph commands </a> for a list of graph commands that are supported in Redis Enterprise. </p> <h2 id="clients"> Clients </h2> <p> For a list of available RedisGraph clients, see <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/clients.md"> RedisGraph client libraries </a> . </p> <h2 id="configuration"> Configuration </h2> <p> See <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/configuration.md"> Configuration parameters </a> for the complete list of RedisGraph configuration parameters. </p> <p> To learn which configuration parameters are supported in Redis Enterprise, see <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/deprecated-features/graph/config/"> Graph configuration compatibility with Redis Enterprise </a> . </p> <h2 id="design"> Design </h2> <p> For an overview of RedisGraph's design, see <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/design/_index.md"> RedisGraph: A High Performance In-Memory Graph Database </a> . </p> <h3 id="client-specification"> Client specification </h3> <p> RedisGraph client libraries should follow the <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/design/client_spec.md"> Technical specification for writing RedisGraph client libraries </a> . </p> <h3 id="result-set-structure"> Result set structure </h3> <p> <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/design/result_structure.md"> RedisGraph result set structure </a> describes the format RedisGraph uses to print data when using <code> redis-cli </code> . </p> <h3 id="graphbulk-endpoint"> GRAPH.BULK endpoint </h3> <p> You can import new graphs from CSV files using <code> redisgraph-bulk-loader </code> . </p> <p> See the <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/design/bulk_spec.md"> <code> GRAPH.BULK </code> implementation details </a> for more information. </p> <h2 id="data-types"> Data types </h2> <p> RedisGraph supports a number of distinct data types, including: </p> <ul> <li> <p> Graph types: </p> <ul> <li> Nodes </li> <li> Relationships </li> <li> Paths </li> </ul> </li> <li> <p> Scalar types: </p> <ul> <li> Strings </li> <li> Booleans </li> <li> Integers </li> <li> Floating-point values </li> <li> Geospatial points </li> <li> Null </li> </ul> </li> <li> <p> Collection types: </p> <ul> <li> Arrays </li> <li> Maps </li> </ul> </li> </ul> <p> See <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/datatypes.md"> RedisGraph data types </a> for details. </p> <h2 id="cypher-coverage"> Cypher coverage </h2> <p> RedisGraph implements a subset of the Cypher language. See <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/cypher_support.md"> Cypher coverage </a> for more information. </p> <h2 id="path-algorithms"> Path algorithms </h2> <p> To learn how to find single-pair and single-source paths using <code> algo.SPpaths </code> and <code> algo.SSpaths </code> , see <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/path_algorithm.md"> Path algorithms </a> . </p> <h2 id="known-limitations"> Known limitations </h2> <p> RedisGraph has several <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/known_limitations.md"> known limitations </a> . </p> <h2 id="more-info"> More info </h2> <ul> <li> <p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/deprecated-features/graph/graph-quickstart/"> Graph quick start </a> </p> </li> <li> <p> <a href="https://github.com/RedisGraph/RedisGraph/tree/master/docs/docs"> RedisGraph documentation on GitHub </a> </p> </li> <li> <p> <a href="https://github.com/RedisGraph/RedisGraph/blob/master/docs/docs/References.md"> References </a> </p> </li> <li> <p> <a href="https://github.com/RedisGraph/RedisGraph/"> RedisGraph source </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/oss_and_stack/stack-with-enterprise/deprecated-features/graph/"/> <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/register/.html
<section class="prose w-full py-12 max-w-none"> <h1> Register </h1> <p class="text-lg -mt-5 mb-10"> Registers the pipeline of functions to run when certain events occur. </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">java</span><span class="o">.</span><span class="na">lang</span><span class="o">.</span><span class="na">String</span> <span class="nf">register</span><span class="o">()</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="kd">public</span> <span class="n">java</span><span class="o">.</span><span class="na">lang</span><span class="o">.</span><span class="na">String</span> <span class="n">register</span><span class="err">​</span><span class="o">(</span><span class="n">ExecutionMode</span> <span class="n">mode</span><span class="o">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="kd">public</span> <span class="n">java</span><span class="o">.</span><span class="na">lang</span><span class="o">.</span><span class="na">String</span> <span class="n">register</span><span class="err">​</span><span class="o">(</span> </span></span><span class="line"><span class="cl"> <span class="n">ExecutionMode</span> <span class="n">mode</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">OnRegisteredOperation</span> <span class="n">onRegister</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">OnUnregisteredOperation</span> <span class="n">onUnregistered</span><span class="o">)</span> </span></span></code></pre> </div> <p> Registers the pipeline of functions to run when certain <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/register-events/"> events </a> occur. The registered functions will run each time the event occurs. </p> <p> Execution modes: </p> <table> <thead> <tr> <th> Name </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> ASYNC </td> <td> Runs asynchronously on all of the shards. </td> </tr> <tr> <td> ASYNC_LOCAL </td> <td> Runs asynchronously but only on the current shard that generated the event. </td> </tr> <tr> <td> SYNC </td> <td> Runs synchronously only on the same shard that generated the event. </td> </tr> </tbody> </table> <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> If you call <code> register() </code> without specifying an execution mode, it will default to <code> ASYNC </code> . </div> </div> <h2 id="parameters"> Parameters </h2> <table> <thead> <tr> <th> Name </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> mode </td> <td> ExecutionMode </td> <td> The execution mode to use (ASYNC/ASYNC_LOCAL/SYNC) </td> </tr> <tr> <td> onRegister </td> <td> OnRegisteredOperation </td> <td> Register callback that will be called on each shard upon register </td> </tr> <tr> <td> onUnregistered </td> <td> OnUnregisteredOperation </td> <td> Unregister callback that will be called on each shard upon unregister </td> </tr> </tbody> </table> <h2 id="returns"> Returns </h2> <p> Returns a registration ID. </p> <h2 id="example"> Example </h2> <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 class="na">register</span><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/register/"/> <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/data-types/timeseries/reference/out-of-order_performance_considerations/.html
<section class="prose w-full py-12 max-w-none"> <h1> Out-of-order / backfilled ingestion performance considerations </h1> <p class="text-lg -mt-5 mb-10"> Out-of-order / backfilled ingestion performance considerations </p> <p> When an older timestamp is inserted into a time series, the chunk of memory corresponding to the new sample’s time frame will potentially have to be retrieved from the main memory (you can read more about these chunks <a href="https://redislabs.com/blog/redistimeseries-ga-making-4th-dimension-truly-immersive/"> here </a> ). When this chunk is a compressed chunk, it will also have to be decoded before we can insert/update to it. These are memory-intensiveβ€”and in the case of decoding, compute-intensiveβ€”operations that will influence the overall achievable ingestion rate. </p> <p> Ingest performance is critical for us, which pushed us to assess and be transparent about the impact of the out-of-order backfilled ratio on our overall high-performance TSDB. </p> <p> To do so, we created a Go benchmark client that enabled us to control key factors that dictate overall system performance, like the out-of-order ratio, the compression of the series, the number of concurrent clients used, and command pipelining. For the full benchmark-driver configuration details and parameters, please refer to this <a href="https://github.com/RedisTimeSeries/redistimeseries-ooo-benchmark"> GitHub link </a> . </p> <p> Furthermore, all benchmark variations were run on Amazon Web Services instances, provisioned through our benchmark-testing infrastructure. Both the benchmarking client and database servers were running on separate c5.9xlarge instances. The tests were executed on a single-shard setup, with RedisTimeSeries version 1.4. </p> <p> Below you can see the correlation between achievable ops/sec and out-of-order ratio for both compressed and uncompressed chunks. </p> <h2 id="compressed-chunks-out-of-orderbackfilled-impact-analysis"> Compressed chunks out-of-order/backfilled impact analysis </h2> <p> With compressed chunks, given that a single out-of-order datapoint implies the full decompression from double delta of the entire chunk, you should expect higher overheads in out-of-order writes. </p> <p> As a rule of thumb, to increase out-of-order compressed performance, reduce the chunk size as much as possible. Smaller chunks imply less computation on double-delta decompression and thus less overall impact, with the drawback of smaller compression ratio. </p> <p> The graphs and tables below make these key points: </p> <ul> <li> <p> If the database receives 1% of out-of-order samples with our current default chunk size in bytes (4096) the overall impact on the ingestion rate should be 10%. </p> </li> <li> <p> At larger out-of-order percentages, like 5%, 10%, or even 25%, the overall impact should be between 35% to 75% fewer ops/sec. At this level of out-of-order percentages, you should really consider reducing the chunk size. </p> </li> <li> <p> We've observed a maximum 95% drop in the achievable ops/sec even at 99% out-of-order ingestion. (Again, reducing the chunk size can cut the impact in half.) </p> </li> </ul> <img alt="compressed-overall-ops-sec-vs-out-of-order-percentage" src="images/compressed-overall-ops-sec-vs-out-of-order-percentage.png"/> <img alt="compressed-overall-p50-lat-vs-out-of-order-percentage" src="images/compressed-overall-p50-lat-vs-out-of-order-percentage.png"/> <img alt="compressed-out-of-order-overhead-table" src="images/compressed-out-of-order-overhead-table.png"/> <h2 id="uncompressed-chunks-out-of-orderbackfilled-impact-analysis"> Uncompressed chunks out-of-order/backfilled impact analysis </h2> <p> As visible on the charts and tables below, the chunk size does not affect the overall out-of-order impact on ingestion (meaning that if I have a chunk size of 256 bytes and a chunk size of 4096 bytes, the expected impact that out-of-order ingestion is the sameβ€”as it should be). Apart from that, we can observe the following key take-aways: </p> <ul> <li> <p> If the database receives 1% of out-of-order samples, the overall impact in ingestion rate should be low or even unmeasurable. </p> </li> <li> <p> At higher out-of-order percentages, like 5%, 10%, or even 25%, the overall impact should be 5% to 19% fewer ops/sec. </p> </li> <li> <p> We've observed a maximum 45% drop in the achievable ops/sec, even at 99% out-of-order ingestion. </p> </li> </ul> <img alt="uncompressed-overall-ops-sec-vs-out-of-order-percentage" src="images/uncompressed-overall-ops-sec-vs-out-of-order-percentage.png"/> <img alt="uncompressed-overall-p50-lat-vs-out-of-order-percentage" src="images/uncompressed-overall-p50-lat-vs-out-of-order-percentage.png"/> <img alt="uncompressed-out-of-order-overhead-table" src="images/uncompressed-out-of-order-overhead-table.png"/> <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/data-types/timeseries/reference/out-of-order_performance_considerations/"/> <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/ocsp/.html
<section class="prose w-full py-12 max-w-none"> <h1> OCSP object </h1> <p class="text-lg -mt-5 mb-10"> An object that represents the cluster's OCSP configuration </p> <p> An API object that represents the cluster's OCSP configuration. </p> <table> <thead> <tr> <th> Name </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> ocsp_functionality </td> <td> boolean (default:Β false) </td> <td> Enables or turns off OCSP for the cluster </td> </tr> <tr> <td> query_frequency </td> <td> integer <nobr> (range: 60-86400) </nobr> (default:Β 3600) </td> <td> The time interval in seconds between OCSP queries to check the certificate’s status </td> </tr> <tr> <td> recovery_frequency </td> <td> integer <nobr> (range: 60-86400) </nobr> (default:Β 60) </td> <td> The time interval in seconds between retries after the OCSP responder returns an invalid status for the certificate </td> </tr> <tr> <td> recovery_max_tries </td> <td> integer <nobr> (range: 1-100) </nobr> (default:Β 5) </td> <td> The number of retries before the validation query fails and invalidates the certificate </td> </tr> <tr> <td> responder_url </td> <td> string </td> <td> The OCSP server URL embedded in the proxy certificate (if available) (read-only) </td> </tr> <tr> <td> response_timeout </td> <td> integer <nobr> (range: 1-60) </nobr> (default:Β 1) </td> <td> The time interval in seconds to wait for a response before timing out </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/ocsp/"/> <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/july-2023/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Cloud changelog (July 2023) </h1> <p class="text-lg -mt-5 mb-10"> New features, enhancements, and other changes added to Redis Cloud during July 2023. </p> <p> This changelog lists new features, enhancements, and other changes added to Redis Cloud during July 2023. </p> <h2 id="new-features"> New features </h2> <h3 id="new-acl-capabilities"> New ACL capabilities </h3> <p> You can now use <a href="/docs/latest/operate/oss_and_stack/management/security/acl/#selectors"> Selectors </a> and <a href="/docs/latest/operate/oss_and_stack/management/security/acl/#selectors"> Key Permissions </a> in your <a href="/docs/latest/operate/rc/security/access-control/data-access-control/configure-acls/"> ACL rules </a> for all Redis 7.2 databases. </p> <p> In addition, the admin console now returns an error if you try to enter an invalid ACL. It will also associate the ACL rule with the supported database version when you <a href="/docs/latest/operate/rc/security/access-control/data-access-control/create-roles/"> add it to a role </a> . </p> <h2 id="deprecations"> Deprecations </h2> <ul> <li> RedisGraph is no longer available when you select Redis Stack on Fixed. For more information, see the <a href="https://redis.com/blog/redisgraph-eol/"> RedisGraph end of life announcement </a> . </li> <li> You are no longer able to <a href="/docs/latest/operate/rc/security/access-control/data-access-control/configure-acls/"> create an ACL rule </a> using the rule builder. Instead, use <a href="https://redis.io/docs/management/security/acl/"> ACL syntax </a> to define your ACL rules. </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/july-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/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/object-freq/.html
<section class="prose w-full py-12"> <h1 class="command-name"> OBJECT FREQ </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">OBJECT FREQ key</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"> 4.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> @keyspace </code> <span class="mr-1 last:hidden"> , </span> <code> @read </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> This command returns the logarithmic access frequency counter of a Redis object stored at <code> &lt;key&gt; </code> . </p> <p> The command is only available when the <code> maxmemory-policy </code> configuration directive is set to one of the LFU policies. </p> <h2 id="resp2-reply"> RESP2 Reply </h2> One of the following: <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : the counter's value. <a href="../../develop/reference/protocol-spec#bulk-strings"> Nil reply </a> : if <em> key </em> doesn't exist. <h2 id="resp3-reply"> RESP3 Reply </h2> One of the following: <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : the counter's value. <a href="../../develop/reference/protocol-spec#nulls"> Null reply </a> : if <em> key </em> doesn't exist. <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/object-freq/"/> <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/memory-performance/shard-placement-policy/.html
<section class="prose w-full py-12 max-w-none"> <h1> Shard placement policy </h1> <p class="text-lg -mt-5 mb-10"> Detailed info about the shard placement policy. </p> <p> In Redis Enterprise Software, the location of master and replica shards on the cluster nodes can impact the database and node performance. Master shards and their corresponding replica shards are always placed on separate nodes for data resiliency. The shard placement policy helps to maintain optimal performance and resiliency. </p> <p> In addition to the shard placement policy, considerations that determine shard placement are: </p> <ul> <li> Separation of master and replica shards </li> <li> Available persistence and Auto Tiering storage </li> <li> <a href="/docs/latest/operate/rs/clusters/configure/rack-zone-awareness/"> Rack-zone awareness </a> </li> <li> Memory available to host the database when fully populated </li> </ul> <p> The shard placement policies are: </p> <ul> <li> <code> dense </code> - Place as many shards as possible on the smallest number of nodes to reduce the latency between the proxy and the database shards; Recommended for Redis on RAM databases to optimize memory resources </li> <li> <code> sparse </code> - Spread the shards across as many nodes in the cluster as possible to spread the traffic across cluster nodes; Recommended for databases with Auto Tiering enabled to optimize disk resources </li> </ul> <p> When you create a Redis Enterprise Software cluster, the default shard placement policy ( <code> dense </code> ) is assigned to all databases that you create on the cluster. </p> <p> You can: </p> <ul> <li> Change the default shard placement policy for the cluster to <code> sparse </code> so that the cluster applies that policy to all databases that you create </li> <li> Change the shard placement policy for each database after the database is created </li> </ul> <h2 id="shard-placement-policies"> Shard placement policies </h2> <h3 id="dense-shard-placement-policy"> Dense shard placement policy </h3> <p> In the dense policy, the cluster places the database shards on as few nodes as possible. When the node is not able to host all of the shards, some shards are moved to another node to maintain optimal node health. </p> <p> For example, for a database with two master and two replica shards on a cluster with three nodes and a dense shard placement policy, the two master shards are hosted on one node and the two replica shards are hosted on another node. </p> <p> For Redis on RAM databases without the OSS cluster API enabled, use the dense policy to optimize performance. </p> <a href="/docs/latest/images/rs/dense_placement.png" sdata-lightbox="/images/rs/dense_placement.png"> <img src="/docs/latest/images/rs/dense_placement.png"/> </a> <p> <em> Figure: Three nodes with two master shards (red) and two replica shards (white) with a dense placement policy </em> </p> <h3 id="sparse-shard-placement-policy"> Sparse shard placement policy </h3> <p> In the sparse policy, the cluster places shards on as many nodes as possible to distribute the shards of a database across all available nodes. When all nodes have database shards, the shards are distributed evenly across the nodes to maintain optimal node health. </p> <p> For example, for a database with two master and two replica shards on a cluster with three nodes and a sparse shard placement policy: </p> <ul> <li> Node 1 hosts one of the master shards </li> <li> Node 2 hosts the replica for the first master shard </li> <li> Node 3 hosts the second master shard </li> <li> Node 1 hosts for the replica shard for master shard 2 </li> </ul> <p> For Redis on RAM databases with OSS cluster API enabled and for databases with Auto Tiering enabled, use the sparse policy to optimize performance. </p> <a href="/docs/latest/images/rs/sparse_placement.png" sdata-lightbox="/images/rs/sparse_placement.png"> <img src="/docs/latest/images/rs/sparse_placement.png"/> </a> <p> <em> Figure: Three nodes with two master shards (red) and two replica shards (white) with a sparse placement policy </em> </p> <h2 id="related-articles"> Related articles </h2> <p> You can <a href="/docs/latest/operate/rs/databases/configure/shard-placement/"> configure the shard placement policy </a> for each database. </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/memory-performance/shard-placement-policy/"/> <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-8-releases/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Software release notes 7.8.2 </h1> <p class="text-lg -mt-5 mb-10"> Redis Community Edition 7.4 features. Hash field expiration. Client-side caching support. Metrics stream engine preview. New APIs to check database availability, rebalance shards, fail over shards, and control database traffic. Cluster Manager UI enhancements for node actions, database tags, and database configuration. User manager role. Log rotation based on both size and time. Module management enhancements. Configurable minimum password length. Configurable license expiration alert threshold. </p> <p> ​ <a href="https://redis.com/redis-enterprise-software/download-center/software/"> ​Redis Software version 7.8.2 </a> is now available! </p> <h2 id="highlights"> Highlights </h2> <p> This version offers: </p> <ul> <li> <p> Redis Community Edition 7.4 features </p> </li> <li> <p> Hash field expiration </p> </li> <li> <p> Client-side caching support </p> </li> <li> <p> Metrics stream engine preview </p> </li> <li> <p> New APIs to check database availability, rebalance shards, fail over shards, and control database traffic </p> </li> <li> <p> Cluster Manager UI enhancements for node actions, database tags, and database configuration </p> </li> <li> <p> User manager role </p> </li> <li> <p> Log rotation based on both size and time </p> </li> <li> <p> Module management enhancements </p> </li> <li> <p> Configurable minimum password length </p> </li> <li> <p> Configurable license expiration alert threshold </p> </li> </ul> <h2 id="detailed-release-notes"> Detailed release notes </h2> <p> For more detailed release notes, select a build version from the following table: </p> <table> <thead> <tr> <th style="text-align:left"> VersionΒ (ReleaseΒ date) </th> <th style="text-align:left"> Major changes </th> <th style="text-align:left"> Redis CE compatibility </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/release-notes/rs-7-8-releases/rs-7-8-2-34/"> 7.8.2-34 (November 2024) </a> </td> <td style="text-align:left"> Redis Community Edition 7.4 features. Hash field expiration. Client-side caching support. Metrics stream engine preview. New APIs to check database availability, rebalance shards, fail over shards, and control database traffic. Cluster Manager UI enhancements for node actions, database tags, and database configuration. User manager role. Log rotation based on both size and time. Module management enhancements. Configurable minimum password length. Configurable license expiration alert threshold. </td> <td style="text-align:left"> Redis 7.4.0 </td> </tr> </tbody> </table> <h2 id="version-changes"> Version changes </h2> <ul> <li> <p> Added validation to verify the LDAP server URI contains a host and port when updating LDAP configuration. </p> </li> <li> <p> The value of the <code> oss_sharding </code> API field had no effect in previous versions of Redis Software. However, <code> oss_sharding </code> is now set to take effect as part of future plans. Until further notice, set this field to <code> false </code> to avoid unintended impacts. </p> </li> </ul> <h3 id="breaking-changes"> Breaking changes </h3> <p> Redis Software version 7.8.2 introduces the following breaking changes: </p> <ul> <li> <p> When you upgrade a database, the upgrade process also attempts to upgrade database modules by default. </p> <ul> <li> <p> The default value of <code> latest_with_modules </code> has changed to <code> true </code> . </p> </li> <li> <p> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/upgrade/#upgrade-db"> <code> rladmin upgrade db </code> </a> will always upgrade the database's modules. </p> </li> <li> <p> When you <a href="/docs/latest/operate/rs/references/rest-api/requests/bdbs/upgrade/#post-bdbs-upgrade"> upgrade a database </a> using the REST API, you can set <code> "latest_with_modules": false </code> in the request body to prevent module upgrades. </p> </li> </ul> </li> </ul> <h4 id="redis-74-breaking-changes"> Redis database version 7.4 breaking changes </h4> <p> When new major versions of Redis Community Edition change existing commands, upgrading your database to a new version can potentially break some functionality. Before you upgrade, read the provided list of breaking changes that affect Redis Software 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 Cluster Manager UI or run the following <a href="/docs/latest/commands/info/"> <code> INFO </code> </a> command with <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> <h5 id="security-behavior-changes"> Security behavior changes </h5> <ul> <li> <a href="https://github.com/redis/redis/pull/13108"> #13108 </a> Lua: LRU eviction for scripts generated with <code> EVAL </code> . </li> </ul> <h5 id="other-general-behavior-changes"> Other general behavior changes </h5> <ul> <li> <p> <a href="https://github.com/redis/redis/pull/13133"> #13133 </a> Lua: allocate VM code with jemalloc instead of libc and count it as used memory. </p> </li> <li> <p> <a href="https://github.com/redis/redis/pull/12171"> #12171 </a> <code> ACL LOAD </code> : do not disconnect all clients. </p> </li> </ul> <h3 id="product-lifecycle-updates"> Product lifecycle updates </h3> <h4 id="end-of-life-policy-extension"> End-of-life policy extension </h4> <p> The end-of-life policy for Redis Software versions 6.2 and later has been extended to 24 months after the formal release of the subsequent major version. For the updated end-of-life schedule, see the <a href="/docs/latest/operate/rs/installing-upgrading/product-lifecycle/"> Redis Software product lifecycle </a> . </p> <h4 id="supported-upgrade-paths"> Supported upgrade paths </h4> <p> Redis Software versions 6.2.4 and 6.2.8 do not support direct upgrades beyond version 7.4.x. Versions 6.2.10, 6.2.12, and 6.2.18 are part of the <a href="/docs/latest/operate/rs/installing-upgrading/upgrading/upgrade-cluster/#supported-upgrade-paths"> upgrade path </a> . To upgrade from 6.2.4 or 6.2.8 to versions later than 7.4.x, an intermediate upgrade is required. </p> <p> The next major Redis 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 Software product lifecycle </a> for more information about release numbers. </p> <h4 id="end-of-triggers-and-functions-preview"> End of triggers and functions preview </h4> <p> The <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/deprecated-features/triggers-and-functions/"> triggers and functions </a> (RedisGears) preview has been discontinued. </p> <ul> <li> <p> Commands such as <code> TFCALL </code> , <code> TFCALLASYNC </code> , and <code> TFUNCTION </code> will be deprecated and will return error messages. </p> </li> <li> <p> Any JavaScript functions stored in Redis will be removed. </p> </li> <li> <p> JavaScript-based triggers will be blocked. </p> </li> <li> <p> Lua functions and scripts will not be affected. </p> </li> </ul> <p> If your database currently uses triggers and functions, you need to: </p> <ol> <li> <p> Adjust your applications to accommodate these changes. </p> </li> <li> <p> Delete all triggers and functions libraries from your existing database: </p> <ol> <li> <p> Run <code> TFUNCTION LIST </code> . </p> </li> <li> <p> Copy all library names. </p> </li> <li> <p> Run <code> TFUNCTION DELETE </code> for each library in the list. </p> </li> </ol> <p> If any triggers and functions libraries remain in the database, the RDB snapshot won't load on a cluster without RedisGears. </p> </li> <li> <p> Migrate your database to a new database without the RedisGears module. </p> </li> </ol> <h3 id="deprecations"> Deprecations </h3> <h4 id="api-deprecations"> API deprecations </h4> <ul> <li> <p> Deprecated <code> background_op </code> field from BDB REST API object. Use <a href="/docs/latest/operate/rs/references/rest-api/requests/actions/bdb/"> <code> GET /v1/actions/bdb/&lt;bdb_uid&gt; </code> </a> instead. </p> </li> <li> <p> Deprecated the following fields for <a href="/docs/latest/operate/rs/references/rest-api/requests/bdbs/upgrade/"> upgrade database </a> REST API requests: </p> <ul> <li> <p> <code> keep_redis_version </code> ; use <code> redis_version </code> instead </p> </li> <li> <p> <code> current_module </code> ; use <code> new_module_args </code> instead </p> </li> <li> <p> <code> new_module </code> ; use <code> new_module_args </code> instead </p> </li> </ul> </li> <li> <p> Deprecated the following <code> module_list </code> fields for <a href="/docs/latest/operate/rs/references/rest-api/requests/bdbs/#post-bdbs-v1"> create database </a> REST API requests: </p> <ul> <li> <p> <code> module_id </code> ; use <code> module_name </code> instead </p> </li> <li> <p> <code> semantic_version </code> ; use module_args instead </p> </li> </ul> </li> <li> <p> <code> min_redis_version </code> is only relevant to Redis database versions earlier than 7.4 and is replaced with <code> compatible_redis_version </code> in <a href="/docs/latest/operate/rs/references/rest-api/requests/modules/"> module REST API </a> responses. </p> </li> <li> <p> Deprecated the <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/upgrade/#upgrade-module"> <code> rladmin upgrade modules </code> </a> command. Use <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/upgrade/#upgrade-db"> <code> rladmin upgrade db </code> </a> instead. </p> </li> <li> <p> Deprecated <a href="/docs/latest/operate/rs/references/rest-api/requests/modules/upgrade/#post-modules-upgrade-bdb"> <code> POST /v1/modules/upgrade/bdb/&lt;uid&gt; </code> </a> REST API request. Use <a href="/docs/latest/operate/rs/references/rest-api/requests/bdbs/upgrade/#post-bdbs-upgrade"> <code> POST /v1/bdbs/&lt;uid&gt;/upgrade </code> </a> to upgrade modules instead. </p> </li> </ul> <h4 id="v1-prometheus-metrics-deprecation"> V1 Prometheus metrics deprecation </h4> <p> V1 Prometheus metrics are deprecated. To transition to the new metrics stream engine, either migrate your existing dashboards using <a href="/docs/latest/integrate/prometheus-with-redis-enterprise/prometheus-metrics-v1-to-v2/"> Prometheus v1 metrics and equivalent v2 PromQL </a> now, or wait to use new preconfigured dashboards when they become available in a future release. </p> <h4 id="download-center-modules-deprecation"> Download center modules deprecation </h4> <p> New Redis modules will not be available for download from the Redis download center. </p> <h4 id="legacy-ui-not-supported"> Legacy UI not supported </h4> <p> The legacy UI was deprecated in favor of the new Cluster Manager UI in Redis Software version 7.2.4 and is no longer supported as of Redis Software version 7.8.2. </p> <h4 id="redis-60-databases-not-supported"> Redis 6.0 databases not supported </h4> <p> Redis database version 6.0 was deprecated in Redis Software version 7.4.2 and is no longer supported as of Redis Software version 7.8.2. </p> <p> To prepare for the removal of Redis database version 6.0 before you upgrade to Redis Software version 7.8.2: </p> <ul> <li> <p> For Redis Software 6.2.* clusters, upgrade Redis 6.0 databases to Redis 6.2. See the <a href="https://raw.githubusercontent.com/redis/redis/6.2/00-RELEASENOTES"> Redis 6.2 release notes </a> for the list of changes. </p> </li> <li> <p> For Redis Software 7.2.4 and 7.4.2 clusters, upgrade Redis 6.0 databases to Redis 7.2. Before you upgrade your databases, see the list of <a href="/docs/latest/operate/rs/release-notes/rs-7-2-4-releases/rs-7-2-4-52/#redis-72-breaking-changes"> Redis 7.2 breaking changes </a> and update any applications that connect to your database to handle these changes. </p> </li> </ul> <h4 id="ubuntu-1804-not-supported"> Ubuntu 18.04 not supported </h4> <p> Ubuntu 18.04 was deprecated in Redis Software version 7.2.4 and is no longer supported as of Redis Software version 7.8.2. </p> <h3 id="upcoming-changes"> Upcoming changes </h3> <h4 id="default-image-change-for-redis-software-containers"> Default image change for Redis Software containers </h4> <p> Starting with version 7.8, Redis Software containers with the image tag <code> x.y.z-build </code> will be based on RHEL instead of Ubuntu. </p> <p> This change will only affect you if you use containers outside the official <a href="/docs/latest/operate/kubernetes/"> Redis Enterprise for Kubernetes </a> product and use Ubuntu-specific commands. </p> <p> To use Ubuntu-based images after this change, you can specify the operating system suffix in the image tag. For example, use the image tag <code> 7.4.2-216.focal </code> instead of <code> 7.4.2-216 </code> . </p> <h3 id="supported-platforms"> Supported platforms </h3> <p> The following table provides a snapshot of supported platforms as of this Redis 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 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 Software, but support will be removed in a future release. </p> <table> <thead> <tr> <th> Redis Software <br/> major versions </th> <th style="text-align:center"> 7.8 </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"> Nov 2024 </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"> Nov 2026 </td> <td style="text-align:center"> Feb 2026 </td> <td style="text-align:center"> Aug 2025 </td> <td style="text-align:center"> Feb 2025 </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> <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"> <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 9 <br/> FIPS mode <sup> <a href="#table-note-5"> 5 </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> <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> <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"> – </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"> <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"> – </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"> – </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"> <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"> – </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> <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> <td style="text-align:center"> <span title="Supported"> βœ… </span> </td> </tr> </tbody> </table> <ol> <li> <p> <a name="table-note-1"> </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"> </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"> </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"> </a> <a href="/docs/latest/operate/rs/installing-upgrading/quickstarts/docker-quickstart/"> Docker images </a> of Redis Software are certified for development and testing only. </p> </li> <li> <p> <a name="table-note-5"> </a> Supported only if <a href="https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/security_hardening/switching-rhel-to-fips-mode_security-hardening#proc_installing-the-system-with-fips-mode-enabled_switching-rhel-to-fips-mode"> FIPS was enabled during RHEL installation </a> to ensure FIPS compliance. </p> </li> </ol> <h2 id="known-issues"> Known issues </h2> <ul> <li> RS131972: Creating an ACL that contains a line break in the Cluster Manager UI can cause shard migration to fail due to ACL errors. </li> </ul> <h2 id="known-limitations"> Known limitations </h2> <h4 id="new-cluster-manager-ui-limitations"> New Cluster Manager UI limitations </h4> <p> The following legacy UI features are not yet available in the new Cluster Manager UI: </p> <ul> <li> <p> Purge an Active-Active instance. </p> <p> Use <a href="/docs/latest/operate/rs/references/cli-utilities/crdb-cli/crdb/purge-instance/"> <code> crdb-cli crdb purge-instance </code> </a> instead. </p> </li> <li> <p> Search and export the log. </p> </li> </ul> <h4 id="redisgraph-prevents-upgrade-to-rhel-9"> RedisGraph prevents upgrade to RHEL 9 </h4> <p> You cannot upgrade from a prior RHEL version to RHEL 9 if the Redis Software cluster contains a RedisGraph module, even if unused by any database. The <a href="https://redis.com/blog/redisgraph-eol/"> RedisGraph module has reached end-of-life </a> and is completely unavailable in RHEL 9. </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/release-notes/rs-7-8-releases/"/> <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/xrange/.html
<section class="prose w-full py-12"> <h1 class="command-name"> XRANGE </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">XRANGE key start end [COUNTΒ count]</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(N) with N being the number of elements being returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it 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> @stream </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> The command returns the stream entries matching a given range of IDs. The range is specified by a minimum and maximum ID. All the entries having an ID between the two specified or exactly one of the two IDs specified (closed interval) are returned. </p> <p> The <code> XRANGE </code> command has a number of applications: </p> <ul> <li> Returning items in a specific time range. This is possible because Stream IDs are <a href="/docs/latest/develop/data-types/streams/"> related to time </a> . </li> <li> Iterating a stream incrementally, returning just a few items at every iteration. However it is semantically much more robust than the <a href="/docs/latest/commands/scan/"> <code> SCAN </code> </a> family of functions. </li> <li> Fetching a single entry from a stream, providing the ID of the entry to fetch two times: as start and end of the query interval. </li> </ul> <p> The command also has a reciprocal command returning items in the reverse order, called <a href="/docs/latest/commands/xrevrange/"> <code> XREVRANGE </code> </a> , which is otherwise identical. </p> <h2 id="--and--special-ids"> <code> - </code> and <code> + </code> special IDs </h2> <p> The <code> - </code> and <code> + </code> special IDs mean respectively the minimum ID possible and the maximum ID possible inside a stream, so the following command will just return every entry in the stream: </p> <pre tabindex="0"><code>&gt; XRANGE somestream - + 1) 1) 1526985054069-0 2) 1) "duration" 2) "72" 3) "event-id" 4) "9" 5) "user-id" 6) "839248" 2) 1) 1526985069902-0 2) 1) "duration" 2) "415" 3) "event-id" 4) "2" 5) "user-id" 6) "772213" ... other entries here ... </code></pre> <p> The <code> - </code> and <code> + </code> special IDs mean, respectively, the minimal and maximal range IDs, however they are nicer to type. </p> <h2 id="incomplete-ids"> Incomplete IDs </h2> <p> Stream IDs are composed of two parts, a Unix millisecond time stamp and a sequence number for entries inserted in the same millisecond. It is possible to use <code> XRANGE </code> specifying just the first part of the ID, the millisecond time, like in the following example: </p> <pre tabindex="0"><code>&gt; XRANGE somestream 1526985054069 1526985055069 </code></pre> <p> In this case, <code> XRANGE </code> will auto-complete the start interval with <code> -0 </code> and end interval with <code> -18446744073709551615 </code> , in order to return all the entries that were generated between a given millisecond and the end of the other specified millisecond. This also means that repeating the same millisecond two times, we get all the entries within such millisecond, because the sequence number range will be from zero to the maximum. </p> <p> Used in this way <code> XRANGE </code> works as a range query command to obtain entries in a specified time. This is very handy in order to access the history of past events in a stream. </p> <h2 id="exclusive-ranges"> Exclusive ranges </h2> <p> The range is close (inclusive) by default, meaning that the reply can include entries with IDs matching the query's start and end intervals. It is possible to specify an open interval (exclusive) by prefixing the ID with the character <code> ( </code> . This is useful for iterating the stream, as explained below. </p> <h2 id="returning-a-maximum-number-of-entries"> Returning a maximum number of entries </h2> <p> Using the <strong> COUNT </strong> option it is possible to reduce the number of entries reported. This is a very important feature even if it may look marginal, because it allows, for instance, to model operations such as <em> give me the entry greater or equal to the following </em> : </p> <pre tabindex="0"><code>&gt; XRANGE somestream 1526985054069-0 + COUNT 1 1) 1) 1526985054069-0 2) 1) "duration" 2) "72" 3) "event-id" 4) "9" 5) "user-id" 6) "839248" </code></pre> <p> In the above case the entry <code> 1526985054069-0 </code> exists, otherwise the server would have sent us the next one. Using <code> COUNT </code> is also the base in order to use <code> XRANGE </code> as an iterator. </p> <h2 id="iterating-a-stream"> Iterating a stream </h2> <p> In order to iterate a stream, we can proceed as follows. Let's assume that we want two elements per iteration. We start fetching the first two elements, which is trivial: </p> <pre tabindex="0"><code>&gt; XRANGE writers - + COUNT 2 1) 1) 1526985676425-0 2) 1) "name" 2) "Virginia" 3) "surname" 4) "Woolf" 2) 1) 1526985685298-0 2) 1) "name" 2) "Jane" 3) "surname" 4) "Austen" </code></pre> <p> Then instead of starting the iteration again from <code> - </code> , as the start of the range we use the entry ID of the <em> last </em> entry returned by the previous <code> XRANGE </code> call as an exclusive interval. </p> <p> The ID of the last entry is <code> 1526985685298-0 </code> , so we just prefix it with a '(', and continue our iteration: </p> <pre tabindex="0"><code>&gt; XRANGE writers (1526985685298-0 + COUNT 2 1) 1) 1526985691746-0 2) 1) "name" 2) "Toni" 3) "surname" 4) "Morrison" 2) 1) 1526985712947-0 2) 1) "name" 2) "Agatha" 3) "surname" 4) "Christie" </code></pre> <p> And so forth. Eventually this will allow to visit all the entries in the stream. Obviously, we can start the iteration from any ID, or even from a specific time, by providing a given incomplete start ID. Moreover, we can limit the iteration to a given ID or time, by providing an end ID or incomplete ID instead of <code> + </code> . </p> <p> The command <a href="/docs/latest/commands/xread/"> <code> XREAD </code> </a> is also able to iterate the stream. The command <a href="/docs/latest/commands/xrevrange/"> <code> XREVRANGE </code> </a> can iterate the stream reverse, from higher IDs (or times) to lower IDs (or times). </p> <h3 id="iterating-with-earlier-versions-of-redis"> Iterating with earlier versions of Redis </h3> <p> While exclusive range intervals are only available from Redis 6.2, it is still possible to use a similar stream iteration pattern with earlier versions. You start fetching from the stream the same way as described above to obtain the first entries. </p> <p> For the subsequent calls, you'll need to programmatically advance the last entry's ID returned. Most Redis client should abstract this detail, but the implementation can also be in the application if needed. In the example above, this means incrementing the sequence of <code> 1526985685298-0 </code> by one, from 0 to 1. The second call would, therefore, be: </p> <pre tabindex="0"><code>&gt; XRANGE writers 1526985685298-1 + COUNT 2 1) 1) 1526985691746-0 2) 1) "name" 2) "Toni" ... </code></pre> <p> Also, note that once the sequence part of the last ID equals 18446744073709551615, you'll need to increment the timestamp and reset the sequence part to 0. For example, incrementing the ID <code> 1526985685298-18446744073709551615 </code> should result in <code> 1526985685299-0 </code> . </p> <p> A symmetrical pattern applies to iterating the stream with <a href="/docs/latest/commands/xrevrange/"> <code> XREVRANGE </code> </a> . The only difference is that the client needs to decrement the ID for the subsequent calls. When decrementing an ID with a sequence part of 0, the timestamp needs to be decremented by 1 and the sequence set to 18446744073709551615. </p> <h2 id="fetching-single-items"> Fetching single items </h2> <p> If you look for an <code> XGET </code> command you'll be disappointed because <code> XRANGE </code> is effectively the way to go in order to fetch a single entry from a stream. All you have to do is to specify the ID two times in the arguments of XRANGE: </p> <pre tabindex="0"><code>&gt; XRANGE mystream 1526984818136-0 1526984818136-0 1) 1) 1526984818136-0 2) 1) "duration" 2) "1532" 3) "event-id" 4) "5" 5) "user-id" 6) "7782813" </code></pre> <h2 id="additional-information-about-streams"> Additional information about streams </h2> <p> For further information about Redis streams please check our <a href="/docs/latest/develop/data-types/streams/"> introduction to Redis Streams document </a> . </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; XADD writers * name Virginia surname Woolf "1731593088845-0" redis&gt; XADD writers * name Jane surname Austen "1731593088845-1" redis&gt; XADD writers * name Toni surname Morrison "1731593088845-2" redis&gt; XADD writers * name Agatha surname Christie "1731593088845-3" redis&gt; XADD writers * name Ngozi surname Adichie "1731593088846-0" redis&gt; XLEN writers (integer) 5 redis&gt; XRANGE writers - + COUNT 2 1) 1) "1731593088845-0" 2) 1) "name" 2) "Virginia" 3) "surname" 4) "Woolf" 2) 1) "1731593088845-1" 2) 1) "name" 2) "Jane" 3) "surname" 4) "Austen" </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#arrays"> Array reply </a> : a list of stream entries with IDs matching the specified range. <br/> <h2> History </h2> <ul> <li> Starting with Redis version 6.2.0: Added exclusive ranges. </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/xrange/"/> <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/redistimeseries/redistimeseries-1.8-release-notes.html
<section class="prose w-full py-12 max-w-none"> <h1> RedisTimeSeries 1.8 release notes </h1> <p class="text-lg -mt-5 mb-10"> Added a time-weighted average aggregator, gap filling, ability to control bucket timestamps, ability to control alignment for compaction rules, new reducer types, and ability to include the latest (possibly partial) raw bucket samples when retrieving compactions </p> <h2 id="requirements"> Requirements </h2> <p> RedisTimeSeries v1.8.13 requires: </p> <ul> <li> Minimum Redis compatibility version (database): 6.0.16 </li> <li> Minimum Redis Enterprise Software version (cluster): 6.2.8 </li> </ul> <h2 id="v1813-march-2024"> v1.8.13 (March 2024) </h2> <p> This is a maintenance release for RedisTimeSeries 1.8. </p> <p> Update urgency: <code> LOW </code> : No need to upgrade unless there are new features you want to use. </p> <h3 id="details"> Details </h3> <ul> <li> <p> Bug fixes: </p> <ul> <li> <a href="https://github.com/RedisGears/LibMR/pull/51"> LibMR#51 </a> Crash on SSL initialization failure (MOD-5647) </li> </ul> </li> <li> <p> Improvements: </p> <ul> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1593"> #1593 </a> More detailed LibMR error messages </li> </ul> </li> </ul> <h2 id="v1812-december-2023"> v1.8.12 (December 2023) </h2> <p> This is a maintenance release for RedisTimeSeries 1.8. </p> <p> Update urgency: <code> SECURITY </code> : There are security fixes in the release. </p> <p> Details: </p> <ul> <li> <p> Security and privacy: </p> <ul> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1506"> #1506 </a> Don’t expose internal commands (MOD-5643) </li> </ul> </li> <li> <p> Bug fixes: </p> <ul> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1494"> #1494 </a> Potential crash when using an invalid argument value </li> </ul> </li> <li> <p> Improvements: </p> <ul> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1516"> #1516 </a> Added support for CBL-Mariner 2 </li> </ul> </li> </ul> <h2 id="v1811-july-2023"> v1.8.11 (July 2023) </h2> <p> This is a maintenance release for RedisTimeSeries 1.8. </p> <p> Update urgency: <code> MODERATE </code> : Program an upgrade of the server, but it's not urgent. </p> <p> Details: </p> <ul> <li> <p> Bug fixes: </p> <ul> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1486"> #1486 </a> When using <code> LATEST </code> , results may contain samples earlier than <code> fromTimestamp </code> ( <code> TS.RANGE </code> , <code> TS.REVRANGE </code> , <code> TS.MRANGE </code> , and <code> TS.MREVRANGE </code> ) </li> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1471"> #1471 </a> Potential crash on <code> TS.MRANGE </code> when aggregating millions of time series </li> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1469"> #1469 </a> Potential memory leak in <code> TS.MRANGE </code> after eviction </li> </ul> </li> <li> <p> Performance enhancements: </p> <ul> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1476"> #1476 </a> Significant performance improvement when using multiple label filters ( <code> TS.MGET </code> , <code> TS.MRANGE </code> , <code> TS.MREVRANGE </code> , and <code> TS.QUERYINDEX </code> ) (MOD-5338) </li> </ul> </li> </ul> <h2 id="v1810-april-2023"> v1.8.10 (April 2023) </h2> <p> This is a maintenance release for RedisTimeSeries 1.8. </p> <p> Update urgency: <code> MODERATE </code> : Program an upgrade of the server, but it's not urgent. </p> <p> Details: </p> <ul> <li> <p> Bug fixes: </p> <ul> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1455"> #1455 </a> <code> TS.ADD </code> - optional arguments are not replicated (MOD-5110) </li> </ul> </li> </ul> <h2 id="v189-march-2023"> v1.8.9 (March 2023) </h2> <p> This is a maintenance release for RedisTimeSeries 1.8. </p> <p> Update urgency: <code> MODERATE </code> : Program an upgrade of the server, but it's not urgent. </p> <p> Details: </p> <ul> <li> <p> Bug fixes: </p> <ul> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1421"> #1421 </a> Potential crash after deleting from a time series with an <code> AVG </code> compaction (MOD-4972) </li> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1422"> #1422 </a> Incorrectly return an error when deleting from a time series with a compaction and with no expiry </li> </ul> </li> </ul> <h2 id="v188-march-2023"> v1.8.8 (March 2023) </h2> <p> This is a maintenance release for RedisTimeSeries 1.8 </p> <p> Update urgency: <code> MODERATE </code> : Program an upgrade of the server, but it's not urgent. </p> <p> Details: </p> <ul> <li> <p> Bug fixes: </p> <ul> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1290"> #1290 </a> Potential crash when using <code> FILTER_BY_TS </code> </li> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1397"> #1397 </a> Memory leak when trying to create an already existing key (MOD-4724, RED-93418) </li> </ul> </li> </ul> <h2 id="v185-january-2023"> v1.8.5 (January 2023) </h2> <p> This is a maintenance release for RedisTimeSeries 1.8. </p> <p> Update urgency: <code> HIGH </code> : There is a critical bug that may affect a subset of users. Upgrade! </p> <p> Details: </p> <ul> <li> <p> Bug fixes: </p> <ul> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1388"> #1388 </a> Potential crash when upgrading from v1.6 to 1.8 if there are compactions with <code> min </code> or <code> max </code> aggregation (MOD-4695) </li> </ul> </li> </ul> <h2 id="v184-december-2022"> v1.8.4 (December 2022) </h2> <p> This is a maintenance release for RedisTimeSeries 1.8. </p> <p> Update urgency: <code> HIGH </code> : There is a critical bug that may affect a subset of users. Upgrade! </p> <p> Details: </p> <ul> <li> <p> Bug fixes: </p> <ul> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1360"> #1360 </a> Potential crash when upgrading from v1.6 to 1.8 if there are compactions with <code> min </code> or <code> max </code> aggregation (MOD-4559) </li> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1370"> #1370 </a> Potential crash when using <a href="/docs/latest/commands/ts.revrange"> TS.REVRANGE </a> or <a href="/docs/latest/commands/ts.mrevrange"> TS.MREVRANGE </a> with aggregation </li> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1347"> #1347 </a> When adding samples with <a href="/docs/latest/commands/ts.add"> TS.ADD </a> or <a href="/docs/latest/commands/ts.madd"> TS.MADD </a> using <code> * </code> as timestamp, the timestamp could differ between master and replica shards </li> </ul> </li> <li> <p> Improvements: </p> <ul> <li> <a href="https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1215"> #1215 </a> OSS cluster: Support TLS and IPv6; introduce new configuration parameter: <a href="/docs/latest/develop/data-types/timeseries/configuration/#oss_global_password"> OSS_GLOBAL_PASSWORD </a> </li> </ul> </li> </ul> <h2 id="v18-ga-v183-november-2022"> v1.8 GA (v1.8.3) (November 2022) </h2> <p> This is the General Availability release of RedisTimeSeries 1.8. </p> <h3 id="highlights"> Highlights </h3> <p> RedisTimeSeries 1.8 introduces seven highly requested features, performance improvements, and bug fixes. </p> <h3 id="whats-new-in-18"> What's new in 1.8 </h3> <ul> <li> <p> <strong> Optionally retrieving aggregation results for the latest (still open) bucket for compactions </strong> </p> <p> Till version 1.8, when a time series is a compaction, <a href="/docs/latest/commands/ts.get"> TS.GET </a> , <a href="/docs/latest/commands/ts.mget"> TS.MGET </a> , <a href="/docs/latest/commands/ts.range"> TS.RANGE </a> , <a href="/docs/latest/commands/ts.revrange"> TS.REVRANGE </a> , <a href="/docs/latest/commands/ts.mrange"> TS.MRANGE </a> , <a href="/docs/latest/commands/ts.mrevrange"> TS.MREVRANGE </a> did not report the compacted value of the latest bucket. The reason is that the data in the latest bucket of a compaction is still partial. A bucket is β€˜closed’ and compacted only upon the arrival of data that β€˜opens’ a β€˜new latest’ bucket. </p> <p> There are use cases, however, where the compaction of the latest bucket should be retrieved as well. For example, a user may want to receive the count of events since the start of the decade, and the retention period for raw data is only one month. Till version 1.8, the user would have to run two queries - one on a compaction and one on the latest raw data, and then sum the results. Since version 1.8, by specifying <code> LATEST </code> , it is possible to retrieve the latest (possibly partial) bucket as well. </p> <p> To report aggregations for the latest bucket, use the new optional <code> LATEST </code> flag to <a href="/docs/latest/commands/ts.get"> TS.GET </a> , <a href="/docs/latest/commands/ts.mget"> TS.MGET </a> , <a href="/docs/latest/commands/ts.range"> TS.RANGE </a> , <a href="/docs/latest/commands/ts.revrange"> TS.REVRANGE </a> , <a href="/docs/latest/commands/ts.mrange"> TS.MRANGE </a> , and <a href="/docs/latest/commands/ts.mrevrange"> TS.REVRANGE </a> . </p> </li> <li> <p> <strong> Optionally retrieving aggregation results for empty buckets </strong> </p> <p> The commands <a href="/docs/latest/commands/ts.range"> TS.RANGE </a> , <a href="/docs/latest/commands/ts.revrange"> TS.REVRANGE </a> , <a href="/docs/latest/commands/ts.mrange"> TS.MRANGE </a> , and <a href="/docs/latest/commands/ts.mrevrange"> TS.MREVRANGE </a> have an optional <code> [AGGREGATION aggregator bucketDuration] </code> parameter. When this parameter is specified, raw reports are aggregated per bucket. </p> <p> Till version 1.8, results were not reported for empty buckets. With <code> EMPTY </code> , it is now possible to report aggregations for empty buckets as well. </p> <p> The two primary reasons for wanting to retrieve values for empty buckets: </p> <ul> <li> <p> It is easier to align results from similar queries over multiple time series </p> </li> <li> <p> It is easier to use the retrieved results with some external tools (e.g., charting tools) </p> </li> </ul> <p> For the <code> sum </code> and <code> count </code> aggregators, the value 0 is reported for empty buckets. </p> <p> For the <code> min </code> , <code> max </code> , <code> range </code> , <code> avg </code> , <code> first </code> , <code> std.p </code> , and <code> std.s </code> aggregators, the value NaN (not a number) is reported. </p> <p> For the <code> last </code> aggregator and the new <code> twa </code> aggregator, the <code> EMPTY </code> flag is used for gap filling (see below). </p> <p> To report aggregations for empty buckets, use the new optional <code> EMPTY </code> flag in <a href="/docs/latest/commands/ts.range"> TS.RANGE </a> , <a href="/docs/latest/commands/ts.revrange"> TS.REVRANGE </a> , <a href="/docs/latest/commands/ts.mrange"> TS.MRANGE </a> , and <a href="/docs/latest/commands/ts.mrevrange"> TS.MREVRANGE </a> . </p> <p> Regardless of the values of <code> fromTimestamp </code> and <code> toTimestamp </code> , no data is reported for empty buckets that end before the earliest sample or begin after the latest sample in the time series. </p> </li> <li> <p> <strong> A new aggregator: time-weighted average </strong> </p> <p> When a time series holds discrete samples of a continuous signal (e.g., temperature), using <code> avg </code> to estimate the average value over a given timeframe would produce a good estimate only when the signal is sampled at constant intervals. If, however, samples are available at non-constant intervals (e.g., when some samples are missing), the <code> twa </code> aggregator produces a more accurate estimate by averaging samples over time instead of simply averaging the samples. </p> <a href="/docs/latest/images/modules/twa.png" sdata-lightbox="/images/modules/twa.png"> <img alt="A graph showing the difference between average and time-weighted average." src="/docs/latest/images/modules/twa.png"/> </a> <p> This is an extreme example: the signal in the diagram above has 4 samples in its β€˜high’ value and 13 samples in its β€˜low’ value. However, the period in each of those states is about the same. It is easy to see that the simple average (avg) of all the 17 samples does not represent the signal’s average over time. </p> <p> Time-weighted average ( <code> twa </code> ) adds weight to each sample. The weight is proportional to the time interval that the sample represents. In the diagram, the time-weighted average over the whole period assigns appropriate weight to each sample, so the result represents the signal’s average value over the whole period much more accurately. </p> </li> <li> <p> <strong> Gap filling: optionally interpolate or repeat last value for empty buckets </strong> </p> <p> Gap filling is performed when using <code> EMPTY </code> together with either <code> last </code> or <code> twa </code> aggregator. </p> <p> Using <code> EMPTY </code> with the <code> twa </code> aggregator allows us to estimate the average of a continuous signal even for buckets where no samples were collected (gap-filling). </p> <a href="/docs/latest/images/modules/GapFilling.png" sdata-lightbox="/images/modules/GapFilling.png"> <img alt="A graph that illustrates gap-filling." src="/docs/latest/images/modules/GapFilling.png"/> </a> <p> Consider we want to use <a href="/docs/latest/commands/ts.range"> TS.RANGE </a> to calculate the average value of each bucket (p1, p2, p3 in the diagram above). Using avg, the value reported for bucket p2 would be NaN, as this bucket contains no samples. If we use <code> EMPTY </code> with <code> twa </code> , on the other hand, the average value for bucket p2 would be calculated based on the linear interpolation of the value left of p2 and the value right of p2. </p> <p> When sampling a continuous signal, we can use this β€˜gap-filling’ capability to calculate the average value of the signal over equal-width buckets without concern about bucket alignment or missing samples. </p> <p> Using <code> EMPTY </code> with the last aggregator allows filling empty buckets by repeating the value of the previous sample. This is useful, for example, when values in the time series represent stock prices and the price has not been changed during a bucket’s timeframe. </p> </li> <li> <p> <strong> Ability to control how bucket timestamps are reported </strong> </p> <p> Till version 1.8, <a href="/docs/latest/commands/ts.range"> TS.RANGE </a> , <a href="/docs/latest/commands/ts.revrange"> TS.REVRANGE </a> , <a href="/docs/latest/commands/ts.mrange"> TS.MRANGE </a> , and <a href="/docs/latest/commands/ts.mrevrange"> TS.MREVRANGE </a> returned the start time of each reported bucket as its timestamp. </p> <p> Changing this behavior and reporting each bucket’s start time, end time, or mid-time is now possible. This is required in many use cases. For example, when drawing bars in trading applications, annotating each bar with the end timestamp of the bucket it represents is very common. </p> <p> The way bucket timestamps are reported can be specified with the new optional <code> BUCKETTIMESTAMP </code> parameter of <a href="/docs/latest/commands/ts.range"> TS.RANGE </a> , <a href="/docs/latest/commands/ts.revrange"> TS.REVRANGE </a> , <a href="/docs/latest/commands/ts.mrange"> TS.MRANGE </a> , and <a href="/docs/latest/commands/ts.mrevrange"> TS.MREVRANGE </a> . </p> <p> <code> - </code> or <code> low </code> : the bucket's start time (default) </p> <p> <code> + </code> or <code> high </code> : the bucket's end time </p> <p> <code> ~ </code> or <code> mid </code> : the bucket's mid-time (rounded down if not an integer) </p> </li> <li> <p> <strong> Ability to control alignment for compaction rules </strong> </p> <p> Till version 1.8, compaction rules could not be aligned. One could specify a compaction rule with 24-hour buckets, and as a result, each bucket would aggregate events from midnight till the next midnight. The first bucket always started at the epoch and all other buckets were aligned accordingly. </p> <p> But what if we want to aggregate daily events from 06:00 to 06:00 the next day? We can now specify alignment for compaction rules. </p> <p> Alignment can be specified with the new optional <code> alignTimestamp </code> parameter of <a href="/docs/latest/commands/ts.createrule"> TS.CREATERULE </a> and the <a href="/docs/latest/develop/data-types/timeseries/configuration/"> COMPACTION_POLICY </a> configuration parameter. Specifying <code> alignTimestamp </code> ensures that there is a bucket that starts exactly at <code> alignTimestamp </code> and all other buckets are aligned accordingly. <code> alignTimestamp </code> is expressed in milliseconds. The default value is 0 (aligned with the epoch). </p> </li> <li> <p> <strong> New reducers </strong> </p> <p> Till version 1.8, only the <code> sum </code> , <code> min </code> , and <code> max </code> could be used as reducer types. </p> <p> It is now possible, for example, to calculate the maximal temperature per timeframe for each sensor and then report the average temperature (avg reducer) over groups of sensors (grouped by a given label's value). </p> <p> This can be specified with the new reducer types ( <a href="/docs/latest/commands/ts.mrange"> TS.MRANGE </a> and <a href="/docs/latest/commands/ts.mrevrange"> TS.MREVRANGE </a> : <code> avg </code> , <code> range </code> , <code> count </code> , <code> std.p </code> , <code> std.s </code> , <code> var.p </code> , and <code> var.s </code> . </p> </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> New RDB version (v7). RDB files created with v1.8.3 are not backward compatible. </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/redistimeseries/redistimeseries-1.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/integrate/write-behind/data-transformation/data-transformation-pipeline/.html
<section class="prose w-full py-12 max-w-none"> <h1> Data transformation pipeline </h1> <p class="text-lg -mt-5 mb-10"> Learn how to transform data to Redis types </p> <p> Write-behind's data transformation capabilities allow users to transform their data beyond the default translation of source types to Redis types. The transformation involves no coding. Instead, it is described in a set of human readable YAML files, one per source table. </p> <p> The ingested format and types are different from one source to another. Currently, the only supported source is <a href="https://debezium.io/"> Debezium </a> . The first transformation from Debezium types to native JSON with Redis types is done automatically without any need for user instructions. Then, this JSON is passed on to the user defined transformation pipeline. </p> <p> Each job describes the transformation logic to perform on data from a single source. The source is typically a database table or collection and is specified as the full name of this table/collection. The job may include filtering logic to skip data that matches a condition. Other logical steps in the job will transform the data into the desired output that will be stored in Redis as hashes or JSON. </p> <a href="/docs/latest/images/rdi/data-transformation-pipeline.png" sdata-lightbox="/images/rdi/data-transformation-pipeline.png"> <img src="/docs/latest/images/rdi/data-transformation-pipeline.png"/> </a> <h2 id="default-job"> Default job </h2> <p> In situations where there is a need to perform a transformation on all ingested records without creating a specific job for specific tables, the default job is used. The transformation associated with this job will be applied to all tables that lack their own explicitly defined jobs. The default job must have a table name of "*", and only one instance of this type of job is permitted. </p> <p> For example, the default job can streamline tasks such as adding a prefix or postfix to Redis keys, or adding fields to new hashes and JSONs without customizing each source table. </p> <p> Currently, the default job is supported for ingest pipelines only. </p> <h3 id="example"> Example </h3> <p> This example demonstrates the process of adding an <code> app_code </code> field with a value of <code> foo </code> using the <a href="/docs/latest/integrate/write-behind/reference/data-transformation-block-types/add_field/"> add_field </a> block to all tables that lack explicitly defined jobs. Additionally, it appends an <code> aws </code> prefix and a <code> gcp </code> postfix to every generated hash key. </p> <p> default.yaml </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="s2">"*"</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">row_format</span><span class="p">:</span><span class="w"> </span><span class="l">full</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">after.app_code</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="s2">"`foo`"</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">output</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">redis.write</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">data_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 class="nt">key</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="l">concat(['aws', '#', table, '#', keys(key)[0], '#', values(key)[0], '#gcp'])</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> <h2 id="jobs"> Jobs </h2> <p> Each job is defined in a separate YAML file. All of these files will be uploaded to Write-behind using the <code> deploy </code> command. For more information, see <a href="#deploy-configuration"> deploy configuration </a> ). If you are using the <a href="/docs/latest/integrate/write-behind/reference/cli/redis-di-scaffold/"> scaffold </a> command, place the job files in the <code> jobs </code> folder. </p> <h3 id="job-yaml-structure"> Job YAML structure </h3> <h4 id="fields"> Fields </h4> <ul> <li> <p> <code> source </code> : </p> <p> This section describes the table that the job operates on: </p> <ul> <li> <code> server_name </code> : logical server name (optional). Corresponds to the <code> debezium.source.topic.prefix </code> property specified in Debezium Server's <code> application.properties </code> config file </li> <li> <code> db </code> : database name (optional) </li> <li> <code> schema </code> : database schema (optional) </li> <li> <code> table </code> : database table name </li> <li> <code> row_format </code> : format of the data to be transformed: <code> data_only </code> (default) - only payload, full - complete change record </li> </ul> </li> </ul> <blockquote> <p> Note: Any reference to the properties <code> server_name </code> , <code> db </code> , <code> schema </code> , and <code> table </code> will be treated by default as case insensitive. This can be changed by setting <code> case_insensitive </code> to <code> false </code> . </p> </blockquote> <blockquote> <p> Cassandra only: In Cassandra, a <code> keyspace </code> is roughly the equivalent to a <code> schema </code> in other databases. Write-behind uses the <code> schema </code> property declared in a job file to match the <code> keyspace </code> attribute of the incoming change record. </p> </blockquote> <blockquote> <p> MongoDB only: In MongoDB, a <code> replica set </code> is a cluster of shards with data and can be regarded as roughly equivalent to a <code> schema </code> in a relational database. A MongoDB <code> collection </code> is similar to a <code> table </code> in other databases. Write-behind uses the <code> schema </code> and <code> table </code> properties declared in a job file to match the <code> replica set </code> and <code> collection </code> attributes of the incoming change record, respectively. </p> </blockquote> <ul> <li> <p> <code> transform </code> : </p> <p> This section includes a series of blocks that define how the data will be transformed. For more information, see <a href="/docs/latest/integrate/write-behind/reference/data-transformation-block-types/"> supported blocks </a> and <a href="/docs/latest/integrate/write-behind/reference/jmespath-custom-functions/"> JMESPath custom functions </a> . </p> </li> <li> <p> <code> output </code> : </p> <p> This section defines the output targets for processed data: </p> <ul> <li> Cassandra: <ul> <li> <code> uses </code> : <code> cassandra.write </code> : write into a Cassandra data store </li> <li> <code> with </code> : <ul> <li> <code> connection </code> : connection name </li> <li> <code> keyspace </code> : keyspace </li> <li> <code> table </code> : target table </li> <li> <code> keys </code> : array of key columns </li> <li> <code> mapping </code> : array of mapping columns </li> <li> <code> opcode_field </code> : the name of the field in the payload that holds the operation (c - create, d - delete, u - update) for this record in the database </li> </ul> </li> </ul> </li> <li> Redis: <ul> <li> <code> uses </code> : <code> redis.write </code> : write to a Redis data structure. Multiple blocks of this type are allowed in the same job </li> <li> <code> with </code> : <ul> <li> <code> connection </code> : connection name as defined in <code> config.yaml </code> (by default, the connection named 'target' is used) </li> <li> <code> data_type </code> : target data structure when writing data to Redis (hash, json, set and stream are supported values) </li> <li> <code> key </code> : this allows you to override the key of the record by applying custom logic: <ul> <li> <code> expression </code> : expression to execute </li> <li> <code> language </code> : expression language, JMESPath or SQL </li> </ul> </li> <li> <code> expire </code> : positive integer value indicating a number of seconds for the key to expire. If not set, the key will never expire </li> </ul> </li> </ul> </li> <li> SQL: <ul> <li> <code> uses </code> : <code> relational.write </code> : write into a SQL-compatible data store </li> <li> <code> with </code> : <ul> <li> <code> connection </code> : connection name </li> <li> <code> schema </code> : schema </li> <li> <code> table </code> : target table name </li> <li> <code> keys </code> : array of key columns </li> <li> <code> mapping </code> : array of mapping columns </li> <li> <code> opcode_field </code> : the name of the field in the payload that holds the operation (c - create, d - delete, u - update) for this record in the database </li> </ul> </li> </ul> </li> </ul> </li> </ul> <h4 id="notes"> Notes </h4> <ul> <li> <code> source </code> is required. </li> <li> Either <code> transform </code> , <code> key </code> , or both should be specified. </li> </ul> <h4 id="using-key-in-transformations"> Using key in transformations </h4> <p> To access the Redis key (for example in a write-behind job) you will need to take the following steps: </p> <ul> <li> Set <code> row_format: full </code> to allow access to the key that is part of the full data entry. </li> <li> Use the expression <code> key.key </code> to get the Redis key as a string. </li> </ul> <h4 id="before-and-after-values"> Before and after values </h4> <p> Update events typically report <code> before </code> and <code> after </code> sections, providing access to the data state before and after the update. To access the "before" values explicitly, you will need to: </p> <ul> <li> Set <code> row_format: full </code> to allow access to the key that is part of the full data entry. </li> <li> Use the <code> before.&lt;FIELD_NAME&gt; </code> pattern. </li> </ul> <h3 id="example-1"> Example </h3> <p> This example shows how to rename the <code> fname </code> field to <code> first_name </code> in the table <code> emp </code> using the <code> rename_field </code> block. It also demonstrates how to set the key of this record instead of relying on the default logic. </p> <p> redislabs.dbo.emp.yaml </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">rename_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">from_field</span><span class="p">:</span><span class="w"> </span><span class="l">fname</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">to_field</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">output</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">redis.write</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">connection</span><span class="p">:</span><span class="w"> </span><span class="l">target</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">key</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="l">concat(['emp:fname:',fname,':lname:',lname])</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> <h3 id="deploy-configuration"> Deploy configuration </h3> <p> In order to deploy your jobs to the remote Write-behind database, run: </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">redis-di deploy </span></span></code></pre> </div> <h3 id="deploy-configuration-on-kubernetes"> Deploy configuration on Kubernetes </h3> <p> If the Write-behind CLI is deployed as a pod in a Kubernetes cluster, perform these steps to deploy your jobs: </p> <ul> <li> <p> Create a ConfigMap from the YAML files in your <code> jobs </code> folder: </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl create configmap redis-di-jobs --from-file<span class="o">=</span>jobs/ </span></span></code></pre> </div> </li> <li> <p> Deploy your jobs: </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl <span class="nb">exec</span> -it pod/redis-di-cli -- redis-di deploy </span></span></code></pre> </div> </li> </ul> <blockquote> <p> Note: A delay occurs between creating/modifying the ConfigMap and its availability in the <code> redis-di-cli </code> pod. Wait around 30 seconds before running the <code> redis-di deploy </code> command. </p> </blockquote> <p> You have two options to update the ConfigMap: </p> <ul> <li> <p> For smaller changes, you can edit the ConfigMap directly with this command: </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl edit configmap redis-di-jobs </span></span></code></pre> </div> </li> <li> <p> For bigger changes such as adding another job file, edit the files in your local <code> jobs </code> folder and then run this command: </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl create configmap redis-di-jobs --from-file<span class="o">=</span>jobs/ --dry-run<span class="o">=</span>client -o yaml <span class="p">|</span> kubectl apply -f - </span></span></code></pre> </div> </li> </ul> <blockquote> <p> Note: You need to run <code> kubectl exec -it pod/redis-di-cli -- redis-di deploy </code> after updating the ConfigMap with either option. </p> </blockquote> <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/data-transformation/data-transformation-pipeline/"/> <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/ttl/.html
<section class="prose w-full py-12"> <h1 class="command-name"> TTL </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">TTL key</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> @keyspace </code> <span class="mr-1 last:hidden"> , </span> <code> @read </code> <span class="mr-1 last:hidden"> , </span> <code> @fast </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Returns the remaining time to live of a key that has a timeout. This introspection capability allows a Redis client to check how many seconds a given key will continue to be part of the dataset. </p> <p> In Redis 2.6 or older the command returns <code> -1 </code> if the key does not exist or if the key exists but has no associated expire. </p> <p> Starting with Redis 2.8 the return value in case of error changed: </p> <ul> <li> The command returns <code> -2 </code> if the key does not exist. </li> <li> The command returns <code> -1 </code> if the key exists but has no associated expire. </li> </ul> <p> See also the <a href="/docs/latest/commands/pttl/"> <code> PTTL </code> </a> command that returns the same information with milliseconds resolution (Only available in Redis 2.6 or greater). </p> <h2 id="examples"> Examples </h2> <div class="codetabs cli group flex justify-start items-center flex-wrap box-border rounded-lg mt-0 mb-0 mx-auto bg-slate-900" id="cmds_generic-stepttl"> <input checked="" class="radiotab w-0 h-0" data-lang="redis-cli" id="redis-cli_cmds_generic-stepttl" name="cmds_generic-stepttl" tabindex="1" type="radio"/> <label class="justify-left label ml-4 pt-3.5 px-3 pb-1 cursor-pointer text-sm text-center bg-redis-ink-900 hover:text-redis-red-600 rounded rounded-mx transition duration-150 ease-in-out" for="redis-cli_cmds_generic-stepttl" title="Open example"> &gt;_ Redis CLI </label> <div aria-labelledby="tab-cmds_generic-stepttl" class="panel order-last hidden w-full mt-0 relative" id="panel_redis-cli_cmds_generic-stepttl" role="tabpanel" tabindex="0"> <div class="highlight"> <pre class="chroma"><code class="language-plaintext" data-lang="plaintext"><span class="line hl"><span class="cl">&gt; SET mykey "Hello" </span></span><span class="line hl"><span class="cl">"OK" </span></span><span class="line hl"><span class="cl">&gt; EXPIRE mykey 10 </span></span><span class="line hl"><span class="cl">(integer) 1 </span></span><span class="line hl"><span class="cl">&gt; TTL mykey </span></span><span class="line hl"><span class="cl">(integer) 10</span></span></code></pre> </div> <button class="clipboard-button text-neutral-400 hover:text-slate-100 bg-slate-600 absolute -top-8 right-10 h-7 w-7 mr-2 mt-2 p-1 rounded rounded-mx" onclick="copyCodeToClipboard('#panel_redis-cli_cmds_generic-stepttl')" tabindex="1" title="Copy to clipboard"> <svg fill="currentColor" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M9 43.95q-1.2 0-2.1-.9-.9-.9-.9-2.1V10.8h3v30.15h23.7v3Zm6-6q-1.2 0-2.1-.9-.9-.9-.9-2.1v-28q0-1.2.9-2.1.9-.9 2.1-.9h22q1.2 0 2.1.9.9.9.9 2.1v28q0 1.2-.9 2.1-.9.9-2.1.9Zm0-3h22v-28H15v28Zm0 0v-28 28Z"> </path> </svg> <div class="tooltip relative inline-block"> <span class="tooltiptext hidden bg-slate-200 rounded rounded-mx text-slate-800 text-center text-xs p-1 absolute right-6 bottom-4"> Copied! </span> </div> </button> <div class="cli-footer flex items-center justify-between rounded-b-md bg-slate-900 mt-0 px-4 pt-0 mb-0 transition-opacity ease-in-out duration-300 opacity-0 invisible group-hover:opacity-100 group-hover:visible"> <div class="flex-1 text-xs text-white overflow-ellipsis"> Are you tired of using redis-cli? Try Redis Insight - the developer GUI for Redis. </div> <div class="text-right"> <a class="rounded rounded-mx px-2 py-1 flex items-center text-white text-xs hover:text-white hover:bg-slate-600 hover:border-transparent focus:outline-none focus:ring-2 focus:white focus:border-slate-500" href="https://redis.com/redis-enterprise/redis-insight/" tabindex="1" title="Get Redis Insight"> <svg class="w-4 h-4 mr-1" fill="none" height="14" viewbox="0 0 14 14" width="14" xmlns="http://www.w3.org/2000/svg"> <path d="M2.26236 5.66895L1.21732 6.07172L7.00018 8.65693V7.79842L2.26236 5.66895Z" fill="#fca5a5"> </path> <path d="M2.26236 8.02271L1.21732 8.42548L7.00018 11.0119V10.1516L2.26236 8.02271Z" fill="#fca5a5"> </path> <path d="M1.21732 3.7175L7.00018 6.30392V2.87805L8.66273 2.13423L7.00018 1.49512L1.21732 3.7175Z" fill="#fca5a5"> </path> <path d="M7.00018 2.8781V6.30366L1.21732 3.71724V5.20004L7.00018 7.79705V8.65526L1.21732 6.07217V7.55496L7.00018 10.1553V11.0135L1.21732 8.42376V9.90656H1.18878L7.00018 12.5051L8.66273 11.7613V2.13428L7.00018 2.8781Z" fill="#f87171"> </path> <path d="M9.07336 11.5777L10.7359 10.8338V4.01538L9.07336 4.7592V11.5777Z" fill="#f87171"> </path> <path d="M9.07336 4.75867L10.7359 4.01485L9.07336 3.37573V4.75867Z" fill="#fca5a5"> </path> <path d="M11.1481 10.6497L12.8112 9.90591V5.896L11.1487 6.63982L11.1481 10.6497Z" fill="#f87171"> </path> <path d="M11.1481 6.63954L12.8112 5.89572L11.1481 5.25781V6.63954Z" fill="#fca5a5"> </path> </svg> <span> Get Redis Insight </span> </a> </div> </div> </div> <input class="radiotab w-0 h-0" data-lang="python" id="Python_cmds_generic-stepttl" name="cmds_generic-stepttl" tabindex="1" type="radio"/> <label class="justify-left label ml-4 pt-3.5 px-3 pb-1 cursor-pointer text-sm text-center bg-redis-ink-900 hover:text-redis-red-600 rounded rounded-mx transition duration-150 ease-in-out" for="Python_cmds_generic-stepttl" title="Open example"> Python </label> <div aria-labelledby="tab-cmds_generic-stepttl" class="panel order-last hidden w-full mt-0 relative" id="panel_Python_cmds_generic-stepttl" role="tabpanel" tabindex="0"> <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="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">decode_responses</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"key1"</span><span class="p">,</span> <span class="s2">"Hello"</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; True</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"key2"</span><span class="p">,</span> <span class="s2">"World"</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; True</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">delete</span><span class="p">(</span><span class="s2">"key1"</span><span class="p">,</span> <span class="s2">"key2"</span><span class="p">,</span> <span class="s2">"key3"</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; 2</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"mykey"</span><span class="p">,</span> <span class="s2">"Hello"</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; True</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">expire</span><span class="p">(</span><span class="s2">"mykey"</span><span class="p">,</span> <span class="mi">10</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; True</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">ttl</span><span class="p">(</span><span class="s2">"mykey"</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; 10</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"mykey"</span><span class="p">,</span> <span class="s2">"Hello World"</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; True</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">ttl</span><span class="p">(</span><span class="s2">"mykey"</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; -1</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">expire</span><span class="p">(</span><span class="s2">"mykey"</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="n">xx</span><span class="o">=</span><span class="kc">True</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; False</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">ttl</span><span class="p">(</span><span class="s2">"mykey"</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; -1</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">expire</span><span class="p">(</span><span class="s2">"mykey"</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="n">nx</span><span class="o">=</span><span class="kc">True</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; True</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">ttl</span><span class="p">(</span><span class="s2">"mykey"</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; 10</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line hl"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"mykey"</span><span class="p">,</span> <span class="s2">"Hello"</span><span class="p">)</span> </span></span><span class="line hl"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="n">res</span><span class="p">)</span> </span></span><span class="line hl"><span class="cl"><span class="c1"># &gt;&gt;&gt; True</span> </span></span><span class="line hl"><span class="cl"> </span></span><span class="line hl"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">expire</span><span class="p">(</span><span class="s2">"mykey"</span><span class="p">,</span> <span class="mi">10</span><span class="p">)</span> </span></span><span class="line hl"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="n">res</span><span class="p">)</span> </span></span><span class="line hl"><span class="cl"><span class="c1"># &gt;&gt;&gt; True</span> </span></span><span class="line hl"><span class="cl"> </span></span><span class="line hl"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">ttl</span><span class="p">(</span><span class="s2">"mykey"</span><span class="p">)</span> </span></span><span class="line hl"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="n">res</span><span class="p">)</span> </span></span><span class="line hl"><span class="cl"><span class="c1"># &gt;&gt;&gt; 10</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">sadd</span><span class="p">(</span><span class="s2">"myset"</span><span class="p">,</span> <span class="o">*</span><span class="nb">set</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="s2">"foo"</span><span class="p">,</span> <span class="s2">"foobar"</span><span class="p">,</span> <span class="s2">"feelsgood"</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; 6</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">sscan_iter</span><span class="p">(</span><span class="s2">"myset"</span><span class="p">,</span> <span class="n">match</span><span class="o">=</span><span class="s2">"f*"</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; ['foobar', 'foo', 'feelsgood']</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="n">cursor</span><span class="p">,</span> <span class="n">key</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">scan</span><span class="p">(</span><span class="n">cursor</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">match</span><span class="o">=</span><span class="s1">'*11*'</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">cursor</span><span class="p">,</span> <span class="n">key</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">cursor</span><span class="p">,</span> <span class="n">key</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">scan</span><span class="p">(</span><span class="n">cursor</span><span class="p">,</span> <span class="n">match</span><span class="o">=</span><span class="s1">'*11*'</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">cursor</span><span class="p">,</span> <span class="n">key</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">cursor</span><span class="p">,</span> <span class="n">key</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">scan</span><span class="p">(</span><span class="n">cursor</span><span class="p">,</span> <span class="n">match</span><span class="o">=</span><span class="s1">'*11*'</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">cursor</span><span class="p">,</span> <span class="n">key</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">cursor</span><span class="p">,</span> <span class="n">key</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">scan</span><span class="p">(</span><span class="n">cursor</span><span class="p">,</span> <span class="n">match</span><span class="o">=</span><span class="s1">'*11*'</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">cursor</span><span class="p">,</span> <span class="n">key</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">cursor</span><span class="p">,</span> <span class="n">keys</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">scan</span><span class="p">(</span><span class="n">cursor</span><span class="p">,</span> <span class="n">match</span><span class="o">=</span><span class="s1">'*11*'</span><span class="p">,</span> <span class="n">count</span><span class="o">=</span><span class="mi">1000</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">cursor</span><span class="p">,</span> <span class="n">keys</span><span class="p">)</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="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">geoadd</span><span class="p">(</span><span class="s2">"geokey"</span><span class="p">,</span> <span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="s2">"value"</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; 1</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">zadd</span><span class="p">(</span><span class="s2">"zkey"</span><span class="p">,</span> <span class="p">{</span><span class="s2">"value"</span><span class="p">:</span> <span class="mi">1000</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; 1</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">type</span><span class="p">(</span><span class="s2">"geokey"</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; zset</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">type</span><span class="p">(</span><span class="s2">"zkey"</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; zset</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">cursor</span><span class="p">,</span> <span class="n">keys</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">scan</span><span class="p">(</span><span class="n">cursor</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">_type</span><span class="o">=</span><span class="s2">"zset"</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">keys</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; ['zkey', 'geokey']</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">res</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">hset</span><span class="p">(</span><span class="s2">"myhash"</span><span class="p">,</span> <span class="n">mapping</span><span class="o">=</span><span class="p">{</span><span class="s2">"a"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s2">"b"</span><span class="p">:</span> <span class="mi">2</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">res</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; 2</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">cursor</span><span class="p">,</span> <span class="n">keys</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">hscan</span><span class="p">(</span><span class="s2">"myhash"</span><span class="p">,</span> <span class="mi">0</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">keys</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; {'a': '1', 'b': '2'}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">cursor</span><span class="p">,</span> <span class="n">keys</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">hscan</span><span class="p">(</span><span class="s2">"myhash"</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">no_values</span><span class="o">=</span><span class="kc">True</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">keys</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="c1"># &gt;&gt;&gt; ['a', 'b']</span> </span></span><span class="line"><span class="cl"> </span></span></code></pre> </div> <button class="clipboard-button text-neutral-400 hover:text-slate-100 bg-slate-600 absolute -top-8 right-10 h-7 w-7 mr-2 mt-2 p-1 rounded rounded-mx" onclick="copyCodeToClipboard('#panel_Python_cmds_generic-stepttl')" tabindex="1" title="Copy to clipboard"> <svg fill="currentColor" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M9 43.95q-1.2 0-2.1-.9-.9-.9-.9-2.1V10.8h3v30.15h23.7v3Zm6-6q-1.2 0-2.1-.9-.9-.9-.9-2.1v-28q0-1.2.9-2.1.9-.9 2.1-.9h22q1.2 0 2.1.9.9.9.9 2.1v28q0 1.2-.9 2.1-.9.9-2.1.9Zm0-3h22v-28H15v28Zm0 0v-28 28Z"> </path> </svg> <div class="tooltip relative inline-block"> <span class="tooltiptext hidden bg-slate-200 rounded rounded-mx text-slate-800 text-center text-xs p-1 absolute right-6 bottom-4"> Copied! </span> </div> </button> <button aria-controls="panel_Python_cmds_generic-stepttl" class="visibility-button text-neutral-400 hover:text-slate-100 bg-slate-600 absolute -top-8 right-2 h-7 w-7 mr-2 mt-2 p-1 rounded rounded-mx" onclick="toggleVisibleLines(this)" tabindex="1" title="Toggle visibility"> <svg class="hidden" fill="currentColor" id="visibility-off" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="m31.45 27.05-2.2-2.2q1.3-3.55-1.35-5.9-2.65-2.35-5.75-1.2l-2.2-2.2q.85-.55 1.9-.8 1.05-.25 2.15-.25 3.55 0 6.025 2.475Q32.5 19.45 32.5 23q0 1.1-.275 2.175-.275 1.075-.775 1.875Zm6.45 6.45-2-2q2.45-1.8 4.275-4.025Q42 25.25 42.85 23q-2.5-5.55-7.5-8.775Q30.35 11 24.5 11q-2.1 0-4.3.4-2.2.4-3.45.95L14.45 10q1.75-.8 4.475-1.4Q21.65 8 24.25 8q7.15 0 13.075 4.075Q43.25 16.15 46 23q-1.3 3.2-3.35 5.85-2.05 2.65-4.75 4.65Zm2.9 11.3-8.4-8.25q-1.75.7-3.95 1.075T24 38q-7.3 0-13.25-4.075T2 23q1-2.6 2.775-5.075T9.1 13.2L2.8 6.9l2.1-2.15L42.75 42.6ZM11.15 15.3q-1.85 1.35-3.575 3.55Q5.85 21.05 5.1 23q2.55 5.55 7.675 8.775Q17.9 35 24.4 35q1.65 0 3.25-.2t2.4-.6l-3.2-3.2q-.55.25-1.35.375T24 31.5q-3.5 0-6-2.45T15.5 23q0-.75.125-1.5T16 20.15Zm15.25 7.1Zm-5.8 2.9Z"> </path> </svg> <svg fill="currentColor" id="visibility-on" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M24 31.5q3.55 0 6.025-2.475Q32.5 26.55 32.5 23q0-3.55-2.475-6.025Q27.55 14.5 24 14.5q-3.55 0-6.025 2.475Q15.5 19.45 15.5 23q0 3.55 2.475 6.025Q20.45 31.5 24 31.5Zm0-2.9q-2.35 0-3.975-1.625T18.4 23q0-2.35 1.625-3.975T24 17.4q2.35 0 3.975 1.625T29.6 23q0 2.35-1.625 3.975T24 28.6Zm0 9.4q-7.3 0-13.2-4.15Q4.9 29.7 2 23q2.9-6.7 8.8-10.85Q16.7 8 24 8q7.3 0 13.2 4.15Q43.1 16.3 46 23q-2.9 6.7-8.8 10.85Q31.3 38 24 38Zm0-15Zm0 12q6.05 0 11.125-3.275T42.85 23q-2.65-5.45-7.725-8.725Q30.05 11 24 11t-11.125 3.275Q7.8 17.55 5.1 23q2.7 5.45 7.775 8.725Q17.95 35 24 35Z"> </path> </svg> </button> <div class="cli-footer flex items-center justify-between rounded-b-md bg-slate-900 mt-0 px-4 pt-0 mb-0 transition-opacity ease-in-out duration-300 opacity-0 invisible group-hover:opacity-100 group-hover:visible"> <a class="rounded rounded-mx px-3 py-1 text-white text-xs hover:text-white hover:bg-slate-600 hover:border-transparent focus:outline-none focus:ring-2 focus:white focus:border-slate-500" href="https://redis.io/docs/latest/develop/connect/clients/python/redis-py/" tabindex="1" title="Quick-Start"> Python Quick-Start </a> <div class="w-1/2"> </div> <div class="flex-1 text-right"> <a class="button text-neutral-400 hover:text-slate-100 h-6 w-6 p-1" href="https://github.com/redis/redis-py/tree/master/doctests/cmds_generic.py" tabindex="1" title="Improve this code example"> <svg fill="github" height="16" viewbox="0 0 18 16" width="18" xmlns="http://www.w3.org/2000/svg"> <path clip-rule="evenodd" d="M8.99953 1.43397e-06C7.09918 -0.000897921 5.26058 0.674713 3.81295 1.90585C2.36533 3.13699 1.40324 4.84324 1.09896 6.71907C0.794684 8.5949 1.1681 10.5178 2.15233 12.1434C3.13657 13.769 4.66734 14.9912 6.47053 15.591C6.87053 15.664 7.01653 15.417 7.01653 15.205C7.01653 15.015 7.00953 14.512 7.00553 13.845C4.78053 14.328 4.31053 12.772 4.31053 12.772C4.16325 12.2887 3.84837 11.8739 3.42253 11.602C2.69653 11.102 3.47753 11.116 3.47753 11.116C3.73043 11.1515 3.97191 11.2442 4.18365 11.3869C4.39539 11.5297 4.57182 11.7189 4.69953 11.94C4.80755 12.1377 4.95378 12.3119 5.12972 12.4526C5.30567 12.5933 5.50782 12.6976 5.72442 12.7595C5.94103 12.8214 6.16778 12.8396 6.39148 12.813C6.61519 12.7865 6.83139 12.7158 7.02753 12.605C7.06381 12.1992 7.24399 11.8197 7.53553 11.535C5.75953 11.335 3.89153 10.647 3.89153 7.581C3.88005 6.78603 4.17513 6.01716 4.71553 5.434C4.47318 4.74369 4.50322 3.98693 4.79953 3.318C4.79953 3.318 5.47053 3.103 6.99953 4.138C8.31074 3.77905 9.69432 3.77905 11.0055 4.138C12.5325 3.103 13.2055 3.318 13.2055 3.318C13.5012 3.9877 13.5294 4.74513 13.2845 5.435C13.8221 6.01928 14.114 6.78817 14.0995 7.582C14.0995 10.655 12.2285 11.332 10.4465 11.53C10.6375 11.724 10.7847 11.9566 10.8784 12.2123C10.972 12.4679 11.0099 12.7405 10.9895 13.012C10.9895 14.081 10.9795 14.944 10.9795 15.206C10.9795 15.42 11.1235 15.669 11.5295 15.591C13.3328 14.9911 14.8636 13.7689 15.8479 12.1432C16.8321 10.5175 17.2054 8.59447 16.901 6.71858C16.5966 4.84268 15.6343 3.13642 14.1865 1.90536C12.7387 0.674306 10.9 -0.0011359 8.99953 1.43397e-06Z" fill="white" fill-rule="evenodd"> </path> </svg> </a> </div> </div> </div> <input class="radiotab w-0 h-0" data-lang="javascript" id="Nodejs_cmds_generic-stepttl" name="cmds_generic-stepttl" tabindex="1" type="radio"/> <label class="justify-left label ml-4 pt-3.5 px-3 pb-1 cursor-pointer text-sm text-center bg-redis-ink-900 hover:text-redis-red-600 rounded rounded-mx transition duration-150 ease-in-out" for="Nodejs_cmds_generic-stepttl" title="Open example"> Node.js </label> <div aria-labelledby="tab-cmds_generic-stepttl" class="panel order-last hidden w-full mt-0 relative" id="panel_Nodejs_cmds_generic-stepttl" role="tabpanel" tabindex="0"> <div class="highlight"> <pre class="chroma"><code class="language-javascript" data-lang="javascript"><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="kr">import</span> <span class="p">{</span> <span class="nx">createClient</span> <span class="p">}</span> <span class="nx">from</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="kr">const</span> <span class="nx">client</span> <span class="o">=</span> <span class="nx">createClient</span><span class="p">();</span> </span></span><span class="line"><span class="cl"><span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">connect</span><span class="p">().</span><span class="k">catch</span><span class="p">(</span><span class="nx">console</span><span class="p">.</span><span class="nx">error</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">delRes1</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="s1">'key1'</span><span class="p">,</span> <span class="s1">'Hello'</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">delRes1</span><span class="p">);</span> <span class="c1">// OK </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">delRes2</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="s1">'key2'</span><span class="p">,</span> <span class="s1">'World'</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">delRes2</span><span class="p">);</span> <span class="c1">// OK </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">delRes3</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">del</span><span class="p">([</span><span class="s1">'key1'</span><span class="p">,</span> <span class="s1">'key2'</span><span class="p">,</span> <span class="s1">'key3'</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">delRes3</span><span class="p">);</span> <span class="c1">// 2 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">expireRes1</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="s1">'mykey'</span><span class="p">,</span> <span class="s1">'Hello'</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">expireRes1</span><span class="p">);</span> <span class="c1">// OK </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">expireRes2</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">expire</span><span class="p">(</span><span class="s1">'mykey'</span><span class="p">,</span> <span class="mi">10</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">expireRes2</span><span class="p">);</span> <span class="c1">// true </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">expireRes3</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">ttl</span><span class="p">(</span><span class="s1">'mykey'</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">expireRes3</span><span class="p">);</span> <span class="c1">// 10 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">expireRes4</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="s1">'mykey'</span><span class="p">,</span> <span class="s1">'Hello World'</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">expireRes4</span><span class="p">);</span> <span class="c1">// OK </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">expireRes5</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">ttl</span><span class="p">(</span><span class="s1">'mykey'</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">expireRes5</span><span class="p">);</span> <span class="c1">// -1 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">expireRes6</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">expire</span><span class="p">(</span><span class="s1">'mykey'</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="s2">"XX"</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">expireRes6</span><span class="p">);</span> <span class="c1">// false </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">expireRes7</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">ttl</span><span class="p">(</span><span class="s1">'mykey'</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">expireRes7</span><span class="p">);</span> <span class="c1">// -1 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">expireRes8</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">expire</span><span class="p">(</span><span class="s1">'mykey'</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="s2">"NX"</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">expireRes8</span><span class="p">);</span> <span class="c1">// true </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">expireRes9</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">ttl</span><span class="p">(</span><span class="s1">'mykey'</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">expireRes9</span><span class="p">);</span> <span class="c1">// 10 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line hl"><span class="cl"><span class="kr">const</span> <span class="nx">ttlRes1</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="s1">'mykey'</span><span class="p">,</span> <span class="s1">'Hello'</span><span class="p">);</span> </span></span><span class="line hl"><span class="cl"><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">ttlRes1</span><span class="p">);</span> <span class="c1">// OK </span></span></span><span class="line hl"><span class="cl"><span class="c1"></span> </span></span><span class="line hl"><span class="cl"><span class="kr">const</span> <span class="nx">ttlRes2</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">expire</span><span class="p">(</span><span class="s1">'mykey'</span><span class="p">,</span> <span class="mi">10</span><span class="p">);</span> </span></span><span class="line hl"><span class="cl"><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">ttlRes2</span><span class="p">);</span> <span class="c1">// true </span></span></span><span class="line hl"><span class="cl"><span class="c1"></span> </span></span><span class="line hl"><span class="cl"><span class="kr">const</span> <span class="nx">ttlRes3</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">ttl</span><span class="p">(</span><span class="s1">'mykey'</span><span class="p">);</span> </span></span><span class="line hl"><span class="cl"><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">ttlRes3</span><span class="p">);</span> <span class="c1">// 10 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">scan1Res1</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">sAdd</span><span class="p">(</span><span class="s1">'myset'</span><span class="p">,</span> <span class="p">[</span><span class="s1">'1'</span><span class="p">,</span> <span class="s1">'2'</span><span class="p">,</span> <span class="s1">'3'</span><span class="p">,</span> <span class="s1">'foo'</span><span class="p">,</span> <span class="s1">'foobar'</span><span class="p">,</span> <span class="s1">'feelsgood'</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">scan1Res1</span><span class="p">);</span> <span class="c1">// 6 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">scan1Res2</span> <span class="o">=</span> <span class="p">[];</span> </span></span><span class="line"><span class="cl"><span class="k">for</span> <span class="kr">await</span> <span class="p">(</span><span class="kr">const</span> <span class="nx">value</span> <span class="k">of</span> <span class="nx">client</span><span class="p">.</span><span class="nx">sScanIterator</span><span class="p">(</span><span class="s1">'myset'</span><span class="p">,</span> <span class="p">{</span> <span class="nx">MATCH</span><span class="o">:</span> <span class="s1">'f*'</span> <span class="p">}))</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nx">scan1Res2</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">value</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">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">scan1Res2</span><span class="p">);</span> <span class="c1">// ['foo', 'foobar', 'feelsgood'] </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kd">let</span> <span class="nx">cursor</span> <span class="o">=</span> <span class="s1">'0'</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="kd">let</span> <span class="nx">scanResult</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">scanResult</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">scan</span><span class="p">(</span><span class="nx">cursor</span><span class="p">,</span> <span class="p">{</span> <span class="nx">MATCH</span><span class="o">:</span> <span class="s1">'*11*'</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">scanResult</span><span class="p">.</span><span class="nx">cursor</span><span class="p">,</span> <span class="nx">scanResult</span><span class="p">.</span><span class="nx">keys</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">scanResult</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">scan</span><span class="p">(</span><span class="nx">scanResult</span><span class="p">.</span><span class="nx">cursor</span><span class="p">,</span> <span class="p">{</span> <span class="nx">MATCH</span><span class="o">:</span> <span class="s1">'*11*'</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">scanResult</span><span class="p">.</span><span class="nx">cursor</span><span class="p">,</span> <span class="nx">scanResult</span><span class="p">.</span><span class="nx">keys</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">scanResult</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">scan</span><span class="p">(</span><span class="nx">scanResult</span><span class="p">.</span><span class="nx">cursor</span><span class="p">,</span> <span class="p">{</span> <span class="nx">MATCH</span><span class="o">:</span> <span class="s1">'*11*'</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">scanResult</span><span class="p">.</span><span class="nx">cursor</span><span class="p">,</span> <span class="nx">scanResult</span><span class="p">.</span><span class="nx">keys</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">scanResult</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">scan</span><span class="p">(</span><span class="nx">scanResult</span><span class="p">.</span><span class="nx">cursor</span><span class="p">,</span> <span class="p">{</span> <span class="nx">MATCH</span><span class="o">:</span> <span class="s1">'*11*'</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">scanResult</span><span class="p">.</span><span class="nx">cursor</span><span class="p">,</span> <span class="nx">scanResult</span><span class="p">.</span><span class="nx">keys</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">scanResult</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">scan</span><span class="p">(</span><span class="nx">scanResult</span><span class="p">.</span><span class="nx">cursor</span><span class="p">,</span> <span class="p">{</span> <span class="nx">MATCH</span><span class="o">:</span> <span class="s1">'*11*'</span><span class="p">,</span> <span class="nx">COUNT</span><span class="o">:</span> <span class="mi">1000</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">scanResult</span><span class="p">.</span><span class="nx">cursor</span><span class="p">,</span> <span class="nx">scanResult</span><span class="p">.</span><span class="nx">keys</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">scan3Res1</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">geoAdd</span><span class="p">(</span><span class="s1">'geokey'</span><span class="p">,</span> <span class="p">{</span> <span class="nx">longitude</span><span class="o">:</span> <span class="mi">0</span><span class="p">,</span> <span class="nx">latitude</span><span class="o">:</span> <span class="mi">0</span><span class="p">,</span> <span class="nx">member</span><span class="o">:</span> <span class="s1">'value'</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">scan3Res1</span><span class="p">);</span> <span class="c1">// 1 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">scan3Res2</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">zAdd</span><span class="p">(</span><span class="s1">'zkey'</span><span class="p">,</span> <span class="p">[{</span> <span class="nx">score</span><span class="o">:</span> <span class="mi">1000</span><span class="p">,</span> <span class="nx">value</span><span class="o">:</span> <span class="s1">'value'</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">scan3Res2</span><span class="p">);</span> <span class="c1">// 1 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">scan3Res3</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">type</span><span class="p">(</span><span class="s1">'geokey'</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">scan3Res3</span><span class="p">);</span> <span class="c1">// zset </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">scan3Res4</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">type</span><span class="p">(</span><span class="s1">'zkey'</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">scan3Res4</span><span class="p">);</span> <span class="c1">// zset </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">scan3Res5</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">scan</span><span class="p">(</span><span class="s1">'0'</span><span class="p">,</span> <span class="p">{</span> <span class="nx">TYPE</span><span class="o">:</span> <span class="s1">'zset'</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">scan3Res5</span><span class="p">.</span><span class="nx">keys</span><span class="p">);</span> <span class="c1">// ['zkey', 'geokey'] </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">scan4Res1</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">hSet</span><span class="p">(</span><span class="s1">'myhash'</span><span class="p">,</span> <span class="p">{</span> <span class="nx">a</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span> <span class="nx">b</span><span class="o">:</span> <span class="mi">2</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">scan4Res1</span><span class="p">);</span> <span class="c1">// 2 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">scan4Res2</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">hScan</span><span class="p">(</span><span class="s1">'myhash'</span><span class="p">,</span> <span class="mi">0</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">scan4Res2</span><span class="p">.</span><span class="nx">tuples</span><span class="p">);</span> <span class="c1">// [{field: 'a', value: '1'}, {field: 'b', value: '2'}] </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">scan4Res3</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">hScan</span><span class="p">(</span><span class="s1">'myhash'</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="p">{</span> <span class="nx">COUNT</span><span class="o">:</span> <span class="mi">10</span> <span class="p">});</span> </span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">items</span> <span class="o">=</span> <span class="nx">scan4Res3</span><span class="p">.</span><span class="nx">tuples</span><span class="p">.</span><span class="nx">map</span><span class="p">((</span><span class="nx">item</span><span class="p">)</span> <span class="p">=&gt;</span> <span class="nx">item</span><span class="p">.</span><span class="nx">field</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">items</span><span class="p">);</span> <span class="c1">// ['a', 'b'] </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">quit</span><span class="p">();</span> </span></span></code></pre> </div> <button class="clipboard-button text-neutral-400 hover:text-slate-100 bg-slate-600 absolute -top-8 right-10 h-7 w-7 mr-2 mt-2 p-1 rounded rounded-mx" onclick="copyCodeToClipboard('#panel_Nodejs_cmds_generic-stepttl')" tabindex="1" title="Copy to clipboard"> <svg fill="currentColor" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M9 43.95q-1.2 0-2.1-.9-.9-.9-.9-2.1V10.8h3v30.15h23.7v3Zm6-6q-1.2 0-2.1-.9-.9-.9-.9-2.1v-28q0-1.2.9-2.1.9-.9 2.1-.9h22q1.2 0 2.1.9.9.9.9 2.1v28q0 1.2-.9 2.1-.9.9-2.1.9Zm0-3h22v-28H15v28Zm0 0v-28 28Z"> </path> </svg> <div class="tooltip relative inline-block"> <span class="tooltiptext hidden bg-slate-200 rounded rounded-mx text-slate-800 text-center text-xs p-1 absolute right-6 bottom-4"> Copied! </span> </div> </button> <button aria-controls="panel_Nodejs_cmds_generic-stepttl" class="visibility-button text-neutral-400 hover:text-slate-100 bg-slate-600 absolute -top-8 right-2 h-7 w-7 mr-2 mt-2 p-1 rounded rounded-mx" onclick="toggleVisibleLines(this)" tabindex="1" title="Toggle visibility"> <svg class="hidden" fill="currentColor" id="visibility-off" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="m31.45 27.05-2.2-2.2q1.3-3.55-1.35-5.9-2.65-2.35-5.75-1.2l-2.2-2.2q.85-.55 1.9-.8 1.05-.25 2.15-.25 3.55 0 6.025 2.475Q32.5 19.45 32.5 23q0 1.1-.275 2.175-.275 1.075-.775 1.875Zm6.45 6.45-2-2q2.45-1.8 4.275-4.025Q42 25.25 42.85 23q-2.5-5.55-7.5-8.775Q30.35 11 24.5 11q-2.1 0-4.3.4-2.2.4-3.45.95L14.45 10q1.75-.8 4.475-1.4Q21.65 8 24.25 8q7.15 0 13.075 4.075Q43.25 16.15 46 23q-1.3 3.2-3.35 5.85-2.05 2.65-4.75 4.65Zm2.9 11.3-8.4-8.25q-1.75.7-3.95 1.075T24 38q-7.3 0-13.25-4.075T2 23q1-2.6 2.775-5.075T9.1 13.2L2.8 6.9l2.1-2.15L42.75 42.6ZM11.15 15.3q-1.85 1.35-3.575 3.55Q5.85 21.05 5.1 23q2.55 5.55 7.675 8.775Q17.9 35 24.4 35q1.65 0 3.25-.2t2.4-.6l-3.2-3.2q-.55.25-1.35.375T24 31.5q-3.5 0-6-2.45T15.5 23q0-.75.125-1.5T16 20.15Zm15.25 7.1Zm-5.8 2.9Z"> </path> </svg> <svg fill="currentColor" id="visibility-on" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M24 31.5q3.55 0 6.025-2.475Q32.5 26.55 32.5 23q0-3.55-2.475-6.025Q27.55 14.5 24 14.5q-3.55 0-6.025 2.475Q15.5 19.45 15.5 23q0 3.55 2.475 6.025Q20.45 31.5 24 31.5Zm0-2.9q-2.35 0-3.975-1.625T18.4 23q0-2.35 1.625-3.975T24 17.4q2.35 0 3.975 1.625T29.6 23q0 2.35-1.625 3.975T24 28.6Zm0 9.4q-7.3 0-13.2-4.15Q4.9 29.7 2 23q2.9-6.7 8.8-10.85Q16.7 8 24 8q7.3 0 13.2 4.15Q43.1 16.3 46 23q-2.9 6.7-8.8 10.85Q31.3 38 24 38Zm0-15Zm0 12q6.05 0 11.125-3.275T42.85 23q-2.65-5.45-7.725-8.725Q30.05 11 24 11t-11.125 3.275Q7.8 17.55 5.1 23q2.7 5.45 7.775 8.725Q17.95 35 24 35Z"> </path> </svg> </button> <div class="cli-footer flex items-center justify-between rounded-b-md bg-slate-900 mt-0 px-4 pt-0 mb-0 transition-opacity ease-in-out duration-300 opacity-0 invisible group-hover:opacity-100 group-hover:visible"> <a class="rounded rounded-mx px-3 py-1 text-white text-xs hover:text-white hover:bg-slate-600 hover:border-transparent focus:outline-none focus:ring-2 focus:white focus:border-slate-500" href="https://redis.io/docs/latest/develop/connect/clients/nodejs/" tabindex="1" title="Quick-Start"> Node.js Quick-Start </a> <div class="w-1/2"> </div> <div class="flex-1 text-right"> <a class="button text-neutral-400 hover:text-slate-100 h-6 w-6 p-1" href="https://github.com/redis/node-redis/tree/emb-examples/doctests/cmds-generic.js" tabindex="1" title="Improve this code example"> <svg fill="github" height="16" viewbox="0 0 18 16" width="18" xmlns="http://www.w3.org/2000/svg"> <path clip-rule="evenodd" d="M8.99953 1.43397e-06C7.09918 -0.000897921 5.26058 0.674713 3.81295 1.90585C2.36533 3.13699 1.40324 4.84324 1.09896 6.71907C0.794684 8.5949 1.1681 10.5178 2.15233 12.1434C3.13657 13.769 4.66734 14.9912 6.47053 15.591C6.87053 15.664 7.01653 15.417 7.01653 15.205C7.01653 15.015 7.00953 14.512 7.00553 13.845C4.78053 14.328 4.31053 12.772 4.31053 12.772C4.16325 12.2887 3.84837 11.8739 3.42253 11.602C2.69653 11.102 3.47753 11.116 3.47753 11.116C3.73043 11.1515 3.97191 11.2442 4.18365 11.3869C4.39539 11.5297 4.57182 11.7189 4.69953 11.94C4.80755 12.1377 4.95378 12.3119 5.12972 12.4526C5.30567 12.5933 5.50782 12.6976 5.72442 12.7595C5.94103 12.8214 6.16778 12.8396 6.39148 12.813C6.61519 12.7865 6.83139 12.7158 7.02753 12.605C7.06381 12.1992 7.24399 11.8197 7.53553 11.535C5.75953 11.335 3.89153 10.647 3.89153 7.581C3.88005 6.78603 4.17513 6.01716 4.71553 5.434C4.47318 4.74369 4.50322 3.98693 4.79953 3.318C4.79953 3.318 5.47053 3.103 6.99953 4.138C8.31074 3.77905 9.69432 3.77905 11.0055 4.138C12.5325 3.103 13.2055 3.318 13.2055 3.318C13.5012 3.9877 13.5294 4.74513 13.2845 5.435C13.8221 6.01928 14.114 6.78817 14.0995 7.582C14.0995 10.655 12.2285 11.332 10.4465 11.53C10.6375 11.724 10.7847 11.9566 10.8784 12.2123C10.972 12.4679 11.0099 12.7405 10.9895 13.012C10.9895 14.081 10.9795 14.944 10.9795 15.206C10.9795 15.42 11.1235 15.669 11.5295 15.591C13.3328 14.9911 14.8636 13.7689 15.8479 12.1432C16.8321 10.5175 17.2054 8.59447 16.901 6.71858C16.5966 4.84268 15.6343 3.13642 14.1865 1.90536C12.7387 0.674306 10.9 -0.0011359 8.99953 1.43397e-06Z" fill="white" fill-rule="evenodd"> </path> </svg> </a> </div> </div> </div> <input class="radiotab w-0 h-0" data-lang="java" id="Java_cmds_generic-stepttl" name="cmds_generic-stepttl" tabindex="1" type="radio"/> <label class="justify-left label ml-4 pt-3.5 px-3 pb-1 cursor-pointer text-sm text-center bg-redis-ink-900 hover:text-redis-red-600 rounded rounded-mx transition duration-150 ease-in-out" for="Java_cmds_generic-stepttl" title="Open example"> Java </label> <div aria-labelledby="tab-cmds_generic-stepttl" class="panel order-last hidden w-full mt-0 relative" id="panel_Java_cmds_generic-stepttl" role="tabpanel" tabindex="0"> <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">redis.clients.jedis.UnifiedJedis</span><span class="o">;</span> </span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">redis.clients.jedis.args.ExpiryOption</span><span class="o">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">CmdsGenericExample</span> <span class="o">{</span> </span></span><span class="line"><span class="cl"> <span class="kd">public</span> <span class="kt">void</span> <span class="nf">run</span><span class="o">()</span> <span class="o">{</span> </span></span><span class="line"><span class="cl"> <span class="n">UnifiedJedis</span> <span class="n">jedis</span> <span class="o">=</span> <span class="k">new</span> <span class="n">UnifiedJedis</span><span class="o">(</span><span class="s">"redis://localhost:6379"</span><span class="o">);</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="n">String</span> <span class="n">delResult1</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">set</span><span class="o">(</span><span class="s">"key1"</span><span class="o">,</span> <span class="s">"Hello"</span><span class="o">);</span> </span></span><span class="line"><span class="cl"> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">delResult1</span><span class="o">);</span> <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="n">String</span> <span class="n">delResult2</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">set</span><span class="o">(</span><span class="s">"key2"</span><span class="o">,</span> <span class="s">"World"</span><span class="o">);</span> </span></span><span class="line"><span class="cl"> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">delResult2</span><span class="o">);</span> <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="kt">long</span> <span class="n">delResult3</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">del</span><span class="o">(</span><span class="s">"key1"</span><span class="o">,</span> <span class="s">"key2"</span><span class="o">,</span> <span class="s">"key3"</span><span class="o">);</span> </span></span><span class="line"><span class="cl"> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">delResult3</span><span class="o">);</span> <span class="c1">// &gt;&gt;&gt; 2 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'del' step. </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="n">String</span> <span class="n">expireResult1</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">set</span><span class="o">(</span><span class="s">"mykey"</span><span class="o">,</span> <span class="s">"Hello"</span><span class="o">);</span> </span></span><span class="line"><span class="cl"> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">expireResult1</span><span class="o">);</span> <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="kt">long</span> <span class="n">expireResult2</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">expire</span><span class="o">(</span><span class="s">"mykey"</span><span class="o">,</span> <span class="mi">10</span><span class="o">);</span> </span></span><span class="line"><span class="cl"> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">expireResult2</span><span class="o">);</span> <span class="c1">// &gt;&gt;&gt; 1 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> <span class="kt">long</span> <span class="n">expireResult3</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">ttl</span><span class="o">(</span><span class="s">"mykey"</span><span class="o">);</span> </span></span><span class="line"><span class="cl"> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">expireResult3</span><span class="o">);</span> <span class="c1">// &gt;&gt;&gt; 10 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> <span class="n">String</span> <span class="n">expireResult4</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">set</span><span class="o">(</span><span class="s">"mykey"</span><span class="o">,</span> <span class="s">"Hello World"</span><span class="o">);</span> </span></span><span class="line"><span class="cl"> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">expireResult4</span><span class="o">);</span> <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="kt">long</span> <span class="n">expireResult5</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">ttl</span><span class="o">(</span><span class="s">"mykey"</span><span class="o">);</span> </span></span><span class="line"><span class="cl"> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">expireResult5</span><span class="o">);</span> <span class="c1">// &gt;&gt;&gt; -1 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> <span class="kt">long</span> <span class="n">expireResult6</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">expire</span><span class="o">(</span><span class="s">"mykey"</span><span class="o">,</span> <span class="mi">10</span><span class="o">,</span> <span class="n">ExpiryOption</span><span class="o">.</span><span class="na">XX</span><span class="o">);</span> </span></span><span class="line"><span class="cl"> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">expireResult6</span><span class="o">);</span> <span class="c1">// &gt;&gt;&gt; 0 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> <span class="kt">long</span> <span class="n">expireResult7</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">ttl</span><span class="o">(</span><span class="s">"mykey"</span><span class="o">);</span> </span></span><span class="line"><span class="cl"> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">expireResult7</span><span class="o">);</span> <span class="c1">// &gt;&gt;&gt; -1 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> <span class="kt">long</span> <span class="n">expireResult8</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">expire</span><span class="o">(</span><span class="s">"mykey"</span><span class="o">,</span> <span class="mi">10</span><span class="o">,</span> <span class="n">ExpiryOption</span><span class="o">.</span><span class="na">NX</span><span class="o">);</span> </span></span><span class="line"><span class="cl"> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">expireResult8</span><span class="o">);</span> <span class="c1">// &gt;&gt;&gt; 1 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> <span class="kt">long</span> <span class="n">expireResult9</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">ttl</span><span class="o">(</span><span class="s">"mykey"</span><span class="o">);</span> </span></span><span class="line"><span class="cl"> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">expireResult9</span><span class="o">);</span> <span class="c1">// &gt;&gt;&gt; 10 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'expire' step. </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> </span></span><span class="line hl"><span class="cl"> <span class="n">String</span> <span class="n">ttlResult1</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">set</span><span class="o">(</span><span class="s">"mykey"</span><span class="o">,</span> <span class="s">"Hello"</span><span class="o">);</span> </span></span><span class="line hl"><span class="cl"> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">ttlResult1</span><span class="o">);</span> <span class="c1">// &gt;&gt;&gt; OK </span></span></span><span class="line hl"><span class="cl"><span class="c1"></span> </span></span><span class="line hl"><span class="cl"> <span class="kt">long</span> <span class="n">ttlResult2</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">expire</span><span class="o">(</span><span class="s">"mykey"</span><span class="o">,</span> <span class="mi">10</span><span class="o">);</span> </span></span><span class="line hl"><span class="cl"> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">ttlResult2</span><span class="o">);</span> <span class="c1">// &gt;&gt;&gt; 1 </span></span></span><span class="line hl"><span class="cl"><span class="c1"></span> </span></span><span class="line hl"><span class="cl"> <span class="kt">long</span> <span class="n">ttlResult3</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">ttl</span><span class="o">(</span><span class="s">"mykey"</span><span class="o">);</span> </span></span><span class="line hl"><span class="cl"> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">ttlResult3</span><span class="o">);</span> <span class="c1">// &gt;&gt;&gt; 10 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'ttl' step. </span></span></span><span class="line"><span class="cl"><span class="c1"></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></code></pre> </div> <button class="clipboard-button text-neutral-400 hover:text-slate-100 bg-slate-600 absolute -top-8 right-10 h-7 w-7 mr-2 mt-2 p-1 rounded rounded-mx" onclick="copyCodeToClipboard('#panel_Java_cmds_generic-stepttl')" tabindex="1" title="Copy to clipboard"> <svg fill="currentColor" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M9 43.95q-1.2 0-2.1-.9-.9-.9-.9-2.1V10.8h3v30.15h23.7v3Zm6-6q-1.2 0-2.1-.9-.9-.9-.9-2.1v-28q0-1.2.9-2.1.9-.9 2.1-.9h22q1.2 0 2.1.9.9.9.9 2.1v28q0 1.2-.9 2.1-.9.9-2.1.9Zm0-3h22v-28H15v28Zm0 0v-28 28Z"> </path> </svg> <div class="tooltip relative inline-block"> <span class="tooltiptext hidden bg-slate-200 rounded rounded-mx text-slate-800 text-center text-xs p-1 absolute right-6 bottom-4"> Copied! </span> </div> </button> <button aria-controls="panel_Java_cmds_generic-stepttl" class="visibility-button text-neutral-400 hover:text-slate-100 bg-slate-600 absolute -top-8 right-2 h-7 w-7 mr-2 mt-2 p-1 rounded rounded-mx" onclick="toggleVisibleLines(this)" tabindex="1" title="Toggle visibility"> <svg class="hidden" fill="currentColor" id="visibility-off" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="m31.45 27.05-2.2-2.2q1.3-3.55-1.35-5.9-2.65-2.35-5.75-1.2l-2.2-2.2q.85-.55 1.9-.8 1.05-.25 2.15-.25 3.55 0 6.025 2.475Q32.5 19.45 32.5 23q0 1.1-.275 2.175-.275 1.075-.775 1.875Zm6.45 6.45-2-2q2.45-1.8 4.275-4.025Q42 25.25 42.85 23q-2.5-5.55-7.5-8.775Q30.35 11 24.5 11q-2.1 0-4.3.4-2.2.4-3.45.95L14.45 10q1.75-.8 4.475-1.4Q21.65 8 24.25 8q7.15 0 13.075 4.075Q43.25 16.15 46 23q-1.3 3.2-3.35 5.85-2.05 2.65-4.75 4.65Zm2.9 11.3-8.4-8.25q-1.75.7-3.95 1.075T24 38q-7.3 0-13.25-4.075T2 23q1-2.6 2.775-5.075T9.1 13.2L2.8 6.9l2.1-2.15L42.75 42.6ZM11.15 15.3q-1.85 1.35-3.575 3.55Q5.85 21.05 5.1 23q2.55 5.55 7.675 8.775Q17.9 35 24.4 35q1.65 0 3.25-.2t2.4-.6l-3.2-3.2q-.55.25-1.35.375T24 31.5q-3.5 0-6-2.45T15.5 23q0-.75.125-1.5T16 20.15Zm15.25 7.1Zm-5.8 2.9Z"> </path> </svg> <svg fill="currentColor" id="visibility-on" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M24 31.5q3.55 0 6.025-2.475Q32.5 26.55 32.5 23q0-3.55-2.475-6.025Q27.55 14.5 24 14.5q-3.55 0-6.025 2.475Q15.5 19.45 15.5 23q0 3.55 2.475 6.025Q20.45 31.5 24 31.5Zm0-2.9q-2.35 0-3.975-1.625T18.4 23q0-2.35 1.625-3.975T24 17.4q2.35 0 3.975 1.625T29.6 23q0 2.35-1.625 3.975T24 28.6Zm0 9.4q-7.3 0-13.2-4.15Q4.9 29.7 2 23q2.9-6.7 8.8-10.85Q16.7 8 24 8q7.3 0 13.2 4.15Q43.1 16.3 46 23q-2.9 6.7-8.8 10.85Q31.3 38 24 38Zm0-15Zm0 12q6.05 0 11.125-3.275T42.85 23q-2.65-5.45-7.725-8.725Q30.05 11 24 11t-11.125 3.275Q7.8 17.55 5.1 23q2.7 5.45 7.775 8.725Q17.95 35 24 35Z"> </path> </svg> </button> <div class="cli-footer flex items-center justify-between rounded-b-md bg-slate-900 mt-0 px-4 pt-0 mb-0 transition-opacity ease-in-out duration-300 opacity-0 invisible group-hover:opacity-100 group-hover:visible"> <a class="rounded rounded-mx px-3 py-1 text-white text-xs hover:text-white hover:bg-slate-600 hover:border-transparent focus:outline-none focus:ring-2 focus:white focus:border-slate-500" href="https://redis.io/docs/latest/develop/connect/clients/java/jedis/" tabindex="1" title="Quick-Start"> Java Quick-Start </a> <div class="w-1/2"> </div> <div class="flex-1 text-right"> <a class="button text-neutral-400 hover:text-slate-100 h-6 w-6 p-1" href="https://github.com/redis/jedis/tree/master/src/test/java/io/redis/examples/CmdsGenericExample.java" tabindex="1" title="Improve this code example"> <svg fill="github" height="16" viewbox="0 0 18 16" width="18" xmlns="http://www.w3.org/2000/svg"> <path clip-rule="evenodd" d="M8.99953 1.43397e-06C7.09918 -0.000897921 5.26058 0.674713 3.81295 1.90585C2.36533 3.13699 1.40324 4.84324 1.09896 6.71907C0.794684 8.5949 1.1681 10.5178 2.15233 12.1434C3.13657 13.769 4.66734 14.9912 6.47053 15.591C6.87053 15.664 7.01653 15.417 7.01653 15.205C7.01653 15.015 7.00953 14.512 7.00553 13.845C4.78053 14.328 4.31053 12.772 4.31053 12.772C4.16325 12.2887 3.84837 11.8739 3.42253 11.602C2.69653 11.102 3.47753 11.116 3.47753 11.116C3.73043 11.1515 3.97191 11.2442 4.18365 11.3869C4.39539 11.5297 4.57182 11.7189 4.69953 11.94C4.80755 12.1377 4.95378 12.3119 5.12972 12.4526C5.30567 12.5933 5.50782 12.6976 5.72442 12.7595C5.94103 12.8214 6.16778 12.8396 6.39148 12.813C6.61519 12.7865 6.83139 12.7158 7.02753 12.605C7.06381 12.1992 7.24399 11.8197 7.53553 11.535C5.75953 11.335 3.89153 10.647 3.89153 7.581C3.88005 6.78603 4.17513 6.01716 4.71553 5.434C4.47318 4.74369 4.50322 3.98693 4.79953 3.318C4.79953 3.318 5.47053 3.103 6.99953 4.138C8.31074 3.77905 9.69432 3.77905 11.0055 4.138C12.5325 3.103 13.2055 3.318 13.2055 3.318C13.5012 3.9877 13.5294 4.74513 13.2845 5.435C13.8221 6.01928 14.114 6.78817 14.0995 7.582C14.0995 10.655 12.2285 11.332 10.4465 11.53C10.6375 11.724 10.7847 11.9566 10.8784 12.2123C10.972 12.4679 11.0099 12.7405 10.9895 13.012C10.9895 14.081 10.9795 14.944 10.9795 15.206C10.9795 15.42 11.1235 15.669 11.5295 15.591C13.3328 14.9911 14.8636 13.7689 15.8479 12.1432C16.8321 10.5175 17.2054 8.59447 16.901 6.71858C16.5966 4.84268 15.6343 3.13642 14.1865 1.90536C12.7387 0.674306 10.9 -0.0011359 8.99953 1.43397e-06Z" fill="white" fill-rule="evenodd"> </path> </svg> </a> </div> </div> </div> <input class="radiotab w-0 h-0" data-lang="go" id="Go_cmds_generic-stepttl" name="cmds_generic-stepttl" tabindex="1" type="radio"/> <label class="justify-left label ml-4 pt-3.5 px-3 pb-1 cursor-pointer text-sm text-center bg-redis-ink-900 hover:text-redis-red-600 rounded rounded-mx transition duration-150 ease-in-out" for="Go_cmds_generic-stepttl" title="Open example"> Go </label> <div aria-labelledby="tab-cmds_generic-stepttl" class="panel order-last hidden w-full mt-0 relative" id="panel_Go_cmds_generic-stepttl" role="tabpanel" tabindex="0"> <div class="highlight"> <pre class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kn">package</span> <span class="nx">example_commands_test</span> </span></span><span class="line"><span class="cl"> </span></span><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">"math"</span> </span></span><span class="line"><span class="cl"> <span class="s">"time"</span> </span></span><span class="line"><span class="cl"> </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></span><span class="line"><span class="cl"><span class="kd">func</span> <span class="nf">ExampleClient_del_cmd</span><span class="p">()</span> <span class="p">{</span> </span></span><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">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></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 docs </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="p">})</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="nx">delResult1</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">Set</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"key1"</span><span class="p">,</span> <span class="s">"Hello"</span><span class="p">,</span> <span class="mi">0</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">delResult1</span><span class="p">)</span> <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="nx">delResult2</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">Set</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"key2"</span><span class="p">,</span> <span class="s">"World"</span><span class="p">,</span> <span class="mi">0</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">delResult2</span><span class="p">)</span> <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="nx">delResult3</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">Del</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"key1"</span><span class="p">,</span> <span class="s">"key2"</span><span class="p">,</span> <span class="s">"key3"</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">delResult3</span><span class="p">)</span> <span class="c1">// &gt;&gt;&gt; 2 </span></span></span><span class="line"><span class="cl"><span class="c1"></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">ExampleClient_expire_cmd</span><span class="p">()</span> <span class="p">{</span> </span></span><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">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></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 docs </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="p">})</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="nx">expireResult1</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">Set</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"mykey"</span><span class="p">,</span> <span class="s">"Hello"</span><span class="p">,</span> <span class="mi">0</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">expireResult1</span><span class="p">)</span> <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="nx">expireResult2</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">Expire</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"mykey"</span><span class="p">,</span> <span class="mi">10</span><span class="o">*</span><span class="nx">time</span><span class="p">.</span><span class="nx">Second</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">expireResult2</span><span class="p">)</span> <span class="c1">// &gt;&gt;&gt; true </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> <span class="nx">expireResult3</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">TTL</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"mykey"</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">math</span><span class="p">.</span><span class="nf">Round</span><span class="p">(</span><span class="nx">expireResult3</span><span class="p">.</span><span class="nf">Seconds</span><span class="p">()))</span> <span class="c1">// &gt;&gt;&gt; 10 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> <span class="nx">expireResult4</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">Set</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"mykey"</span><span class="p">,</span> <span class="s">"Hello World"</span><span class="p">,</span> <span class="mi">0</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">expireResult4</span><span class="p">)</span> <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="nx">expireResult5</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">TTL</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"mykey"</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">expireResult5</span><span class="p">)</span> <span class="c1">// &gt;&gt;&gt; -1ns </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> <span class="nx">expireResult6</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">ExpireXX</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"mykey"</span><span class="p">,</span> <span class="mi">10</span><span class="o">*</span><span class="nx">time</span><span class="p">.</span><span class="nx">Second</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">expireResult6</span><span class="p">)</span> <span class="c1">// &gt;&gt;&gt; false </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> <span class="nx">expireResult7</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">TTL</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"mykey"</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">expireResult7</span><span class="p">)</span> <span class="c1">// &gt;&gt;&gt; -1ns </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> <span class="nx">expireResult8</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">ExpireNX</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"mykey"</span><span class="p">,</span> <span class="mi">10</span><span class="o">*</span><span class="nx">time</span><span class="p">.</span><span class="nx">Second</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">expireResult8</span><span class="p">)</span> <span class="c1">// &gt;&gt;&gt; true </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"> <span class="nx">expireResult9</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">TTL</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"mykey"</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">math</span><span class="p">.</span><span class="nf">Round</span><span class="p">(</span><span class="nx">expireResult9</span><span class="p">.</span><span class="nf">Seconds</span><span class="p">()))</span> <span class="c1">// &gt;&gt;&gt; 10 </span></span></span><span class="line"><span class="cl"><span class="c1"></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">ExampleClient_ttl_cmd</span><span class="p">()</span> <span class="p">{</span> </span></span><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">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></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 docs </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="p">})</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> </span></span><span class="line hl"><span class="cl"> <span class="nx">ttlResult1</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">Set</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"mykey"</span><span class="p">,</span> <span class="s">"Hello"</span><span class="p">,</span> <span class="mi">10</span><span class="o">*</span><span class="nx">time</span><span class="p">.</span><span class="nx">Second</span><span class="p">).</span><span class="nf">Result</span><span class="p">()</span> </span></span><span class="line hl"><span class="cl"> </span></span><span class="line hl"><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 hl"><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 hl"><span class="cl"> <span class="p">}</span> </span></span><span class="line hl"><span class="cl"> </span></span><span class="line hl"><span class="cl"> <span class="nx">fmt</span><span class="p">.</span><span class="nf">Println</span><span class="p">(</span><span class="nx">ttlResult1</span><span class="p">)</span> <span class="c1">// &gt;&gt;&gt; OK </span></span></span><span class="line hl"><span class="cl"><span class="c1"></span> </span></span><span class="line hl"><span class="cl"> <span class="nx">ttlResult2</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">TTL</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"mykey"</span><span class="p">).</span><span class="nf">Result</span><span class="p">()</span> </span></span><span class="line hl"><span class="cl"> </span></span><span class="line hl"><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 hl"><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 hl"><span class="cl"> <span class="p">}</span> </span></span><span class="line hl"><span class="cl"> </span></span><span class="line hl"><span class="cl"> <span class="nx">fmt</span><span class="p">.</span><span class="nf">Println</span><span class="p">(</span><span class="nx">math</span><span class="p">.</span><span class="nf">Round</span><span class="p">(</span><span class="nx">ttlResult2</span><span class="p">.</span><span class="nf">Seconds</span><span class="p">()))</span> <span class="c1">// &gt;&gt;&gt; 10 </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <button class="clipboard-button text-neutral-400 hover:text-slate-100 bg-slate-600 absolute -top-8 right-10 h-7 w-7 mr-2 mt-2 p-1 rounded rounded-mx" onclick="copyCodeToClipboard('#panel_Go_cmds_generic-stepttl')" tabindex="1" title="Copy to clipboard"> <svg fill="currentColor" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M9 43.95q-1.2 0-2.1-.9-.9-.9-.9-2.1V10.8h3v30.15h23.7v3Zm6-6q-1.2 0-2.1-.9-.9-.9-.9-2.1v-28q0-1.2.9-2.1.9-.9 2.1-.9h22q1.2 0 2.1.9.9.9.9 2.1v28q0 1.2-.9 2.1-.9.9-2.1.9Zm0-3h22v-28H15v28Zm0 0v-28 28Z"> </path> </svg> <div class="tooltip relative inline-block"> <span class="tooltiptext hidden bg-slate-200 rounded rounded-mx text-slate-800 text-center text-xs p-1 absolute right-6 bottom-4"> Copied! </span> </div> </button> <button aria-controls="panel_Go_cmds_generic-stepttl" class="visibility-button text-neutral-400 hover:text-slate-100 bg-slate-600 absolute -top-8 right-2 h-7 w-7 mr-2 mt-2 p-1 rounded rounded-mx" onclick="toggleVisibleLines(this)" tabindex="1" title="Toggle visibility"> <svg class="hidden" fill="currentColor" id="visibility-off" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="m31.45 27.05-2.2-2.2q1.3-3.55-1.35-5.9-2.65-2.35-5.75-1.2l-2.2-2.2q.85-.55 1.9-.8 1.05-.25 2.15-.25 3.55 0 6.025 2.475Q32.5 19.45 32.5 23q0 1.1-.275 2.175-.275 1.075-.775 1.875Zm6.45 6.45-2-2q2.45-1.8 4.275-4.025Q42 25.25 42.85 23q-2.5-5.55-7.5-8.775Q30.35 11 24.5 11q-2.1 0-4.3.4-2.2.4-3.45.95L14.45 10q1.75-.8 4.475-1.4Q21.65 8 24.25 8q7.15 0 13.075 4.075Q43.25 16.15 46 23q-1.3 3.2-3.35 5.85-2.05 2.65-4.75 4.65Zm2.9 11.3-8.4-8.25q-1.75.7-3.95 1.075T24 38q-7.3 0-13.25-4.075T2 23q1-2.6 2.775-5.075T9.1 13.2L2.8 6.9l2.1-2.15L42.75 42.6ZM11.15 15.3q-1.85 1.35-3.575 3.55Q5.85 21.05 5.1 23q2.55 5.55 7.675 8.775Q17.9 35 24.4 35q1.65 0 3.25-.2t2.4-.6l-3.2-3.2q-.55.25-1.35.375T24 31.5q-3.5 0-6-2.45T15.5 23q0-.75.125-1.5T16 20.15Zm15.25 7.1Zm-5.8 2.9Z"> </path> </svg> <svg fill="currentColor" id="visibility-on" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M24 31.5q3.55 0 6.025-2.475Q32.5 26.55 32.5 23q0-3.55-2.475-6.025Q27.55 14.5 24 14.5q-3.55 0-6.025 2.475Q15.5 19.45 15.5 23q0 3.55 2.475 6.025Q20.45 31.5 24 31.5Zm0-2.9q-2.35 0-3.975-1.625T18.4 23q0-2.35 1.625-3.975T24 17.4q2.35 0 3.975 1.625T29.6 23q0 2.35-1.625 3.975T24 28.6Zm0 9.4q-7.3 0-13.2-4.15Q4.9 29.7 2 23q2.9-6.7 8.8-10.85Q16.7 8 24 8q7.3 0 13.2 4.15Q43.1 16.3 46 23q-2.9 6.7-8.8 10.85Q31.3 38 24 38Zm0-15Zm0 12q6.05 0 11.125-3.275T42.85 23q-2.65-5.45-7.725-8.725Q30.05 11 24 11t-11.125 3.275Q7.8 17.55 5.1 23q2.7 5.45 7.775 8.725Q17.95 35 24 35Z"> </path> </svg> </button> <div class="cli-footer flex items-center justify-between rounded-b-md bg-slate-900 mt-0 px-4 pt-0 mb-0 transition-opacity ease-in-out duration-300 opacity-0 invisible group-hover:opacity-100 group-hover:visible"> <a class="rounded rounded-mx px-3 py-1 text-white text-xs hover:text-white hover:bg-slate-600 hover:border-transparent focus:outline-none focus:ring-2 focus:white focus:border-slate-500" href="https://redis.io/docs/latest/develop/connect/clients/go/" tabindex="1" title="Quick-Start"> Go Quick-Start </a> <div class="w-1/2"> </div> <div class="flex-1 text-right"> <a class="button text-neutral-400 hover:text-slate-100 h-6 w-6 p-1" href="https://github.com/redis/go-redis/tree/master/doctests/cmds_generic_test.go" tabindex="1" title="Improve this code example"> <svg fill="github" height="16" viewbox="0 0 18 16" width="18" xmlns="http://www.w3.org/2000/svg"> <path clip-rule="evenodd" d="M8.99953 1.43397e-06C7.09918 -0.000897921 5.26058 0.674713 3.81295 1.90585C2.36533 3.13699 1.40324 4.84324 1.09896 6.71907C0.794684 8.5949 1.1681 10.5178 2.15233 12.1434C3.13657 13.769 4.66734 14.9912 6.47053 15.591C6.87053 15.664 7.01653 15.417 7.01653 15.205C7.01653 15.015 7.00953 14.512 7.00553 13.845C4.78053 14.328 4.31053 12.772 4.31053 12.772C4.16325 12.2887 3.84837 11.8739 3.42253 11.602C2.69653 11.102 3.47753 11.116 3.47753 11.116C3.73043 11.1515 3.97191 11.2442 4.18365 11.3869C4.39539 11.5297 4.57182 11.7189 4.69953 11.94C4.80755 12.1377 4.95378 12.3119 5.12972 12.4526C5.30567 12.5933 5.50782 12.6976 5.72442 12.7595C5.94103 12.8214 6.16778 12.8396 6.39148 12.813C6.61519 12.7865 6.83139 12.7158 7.02753 12.605C7.06381 12.1992 7.24399 11.8197 7.53553 11.535C5.75953 11.335 3.89153 10.647 3.89153 7.581C3.88005 6.78603 4.17513 6.01716 4.71553 5.434C4.47318 4.74369 4.50322 3.98693 4.79953 3.318C4.79953 3.318 5.47053 3.103 6.99953 4.138C8.31074 3.77905 9.69432 3.77905 11.0055 4.138C12.5325 3.103 13.2055 3.318 13.2055 3.318C13.5012 3.9877 13.5294 4.74513 13.2845 5.435C13.8221 6.01928 14.114 6.78817 14.0995 7.582C14.0995 10.655 12.2285 11.332 10.4465 11.53C10.6375 11.724 10.7847 11.9566 10.8784 12.2123C10.972 12.4679 11.0099 12.7405 10.9895 13.012C10.9895 14.081 10.9795 14.944 10.9795 15.206C10.9795 15.42 11.1235 15.669 11.5295 15.591C13.3328 14.9911 14.8636 13.7689 15.8479 12.1432C16.8321 10.5175 17.2054 8.59447 16.901 6.71858C16.5966 4.84268 15.6343 3.13642 14.1865 1.90536C12.7387 0.674306 10.9 -0.0011359 8.99953 1.43397e-06Z" fill="white" fill-rule="evenodd"> </path> </svg> </a> </div> </div> </div> <input class="radiotab w-0 h-0" data-lang="dotnet" id="Csharp_cmds_generic-stepttl" name="cmds_generic-stepttl" tabindex="1" type="radio"/> <label class="justify-left label ml-4 pt-3.5 px-3 pb-1 cursor-pointer text-sm text-center bg-redis-ink-900 hover:text-redis-red-600 rounded rounded-mx transition duration-150 ease-in-out" for="Csharp_cmds_generic-stepttl" title="Open example"> C# </label> <div aria-labelledby="tab-cmds_generic-stepttl" class="panel order-last hidden w-full mt-0 relative" id="panel_Csharp_cmds_generic-stepttl" role="tabpanel" tabindex="0"> <div class="highlight"> <pre class="chroma"><code class="language-C#" data-lang="C#"><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="k">using</span> <span class="nn">NRedisStack.Tests</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="k">using</span> <span class="nn">StackExchange.Redis</span><span class="p">;</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></span><span class="line"><span class="cl"><span class="k">public</span> <span class="k">class</span> <span class="nc">CmdsGenericExample</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">void</span> <span class="n">run</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="kt">var</span> <span class="n">muxer</span> <span class="p">=</span> <span class="n">ConnectionMultiplexer</span><span class="p">.</span><span class="n">Connect</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="kt">var</span> <span class="n">db</span> <span class="p">=</span> <span class="n">muxer</span><span class="p">.</span><span class="n">GetDatabase</span><span class="p">();</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'copy' step.</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="kt">bool</span> <span class="n">delResult1</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">StringSet</span><span class="p">(</span><span class="s">"key1"</span><span class="p">,</span> <span class="s">"Hello"</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="n">delResult1</span><span class="p">);</span> <span class="c1">// &gt;&gt;&gt; true</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="kt">bool</span> <span class="n">delResult2</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">StringSet</span><span class="p">(</span><span class="s">"key2"</span><span class="p">,</span> <span class="s">"World"</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="n">delResult2</span><span class="p">);</span> <span class="c1">// &gt;&gt;&gt; true</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="kt">long</span> <span class="n">delResult3</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">KeyDelete</span><span class="p">(</span><span class="k">new</span> <span class="n">RedisKey</span><span class="p">[]</span> <span class="p">{</span> <span class="s">"key1"</span><span class="p">,</span> <span class="s">"key2"</span><span class="p">,</span> <span class="s">"key3"</span> <span class="p">});</span> </span></span><span class="line"><span class="cl"> <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="n">delResult3</span><span class="p">);</span> <span class="c1">// &gt;&gt;&gt; 2</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'del' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'dump' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'exists' step.</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="kt">bool</span> <span class="n">expireResult1</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">StringSet</span><span class="p">(</span><span class="s">"mykey"</span><span class="p">,</span> <span class="s">"Hello"</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="n">expireResult1</span><span class="p">);</span> <span class="c1">// &gt;&gt;&gt; true</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="kt">bool</span> <span class="n">expireResult2</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">KeyExpire</span><span class="p">(</span><span class="s">"mykey"</span><span class="p">,</span> <span class="k">new</span> <span class="n">TimeSpan</span><span class="p">(</span><span class="m">0</span><span class="p">,</span> <span class="m">0</span><span class="p">,</span> <span class="m">10</span><span class="p">));</span> </span></span><span class="line"><span class="cl"> <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="n">expireResult2</span><span class="p">);</span> <span class="c1">// &gt;&gt;&gt; true</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="n">TimeSpan</span> <span class="n">expireResult3</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">KeyTimeToLive</span><span class="p">(</span><span class="s">"mykey"</span><span class="p">)</span> <span class="p">??</span> <span class="n">TimeSpan</span><span class="p">.</span><span class="n">Zero</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="n">Math</span><span class="p">.</span><span class="n">Round</span><span class="p">(</span><span class="n">expireResult3</span><span class="p">.</span><span class="n">TotalSeconds</span><span class="p">));</span> <span class="c1">// &gt;&gt;&gt; 10</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="kt">bool</span> <span class="n">expireResult4</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">StringSet</span><span class="p">(</span><span class="s">"mykey"</span><span class="p">,</span> <span class="s">"Hello World"</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="n">expireResult4</span><span class="p">);</span> <span class="c1">// &gt;&gt;&gt; true</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="n">TimeSpan</span> <span class="n">expireResult5</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">KeyTimeToLive</span><span class="p">(</span><span class="s">"mykey"</span><span class="p">)</span> <span class="p">??</span> <span class="n">TimeSpan</span><span class="p">.</span><span class="n">Zero</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="n">Math</span><span class="p">.</span><span class="n">Round</span><span class="p">(</span><span class="n">expireResult5</span><span class="p">.</span><span class="n">TotalSeconds</span><span class="p">).</span><span class="n">ToString</span><span class="p">());</span> <span class="c1">// &gt;&gt;&gt; 0</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="kt">bool</span> <span class="n">expireResult6</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">KeyExpire</span><span class="p">(</span><span class="s">"mykey"</span><span class="p">,</span> <span class="k">new</span> <span class="n">TimeSpan</span><span class="p">(</span><span class="m">0</span><span class="p">,</span> <span class="m">0</span><span class="p">,</span> <span class="m">10</span><span class="p">),</span> <span class="n">ExpireWhen</span><span class="p">.</span><span class="n">HasExpiry</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="n">expireResult6</span><span class="p">);</span> <span class="c1">// &gt;&gt;&gt; false</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="n">TimeSpan</span> <span class="n">expireResult7</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">KeyTimeToLive</span><span class="p">(</span><span class="s">"mykey"</span><span class="p">)</span> <span class="p">??</span> <span class="n">TimeSpan</span><span class="p">.</span><span class="n">Zero</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="n">Math</span><span class="p">.</span><span class="n">Round</span><span class="p">(</span><span class="n">expireResult7</span><span class="p">.</span><span class="n">TotalSeconds</span><span class="p">));</span> <span class="c1">// &gt;&gt;&gt; 0</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="kt">bool</span> <span class="n">expireResult8</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">KeyExpire</span><span class="p">(</span><span class="s">"mykey"</span><span class="p">,</span> <span class="k">new</span> <span class="n">TimeSpan</span><span class="p">(</span><span class="m">0</span><span class="p">,</span> <span class="m">0</span><span class="p">,</span> <span class="m">10</span><span class="p">),</span> <span class="n">ExpireWhen</span><span class="p">.</span><span class="n">HasNoExpiry</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="n">expireResult8</span><span class="p">);</span> <span class="c1">// &gt;&gt;&gt; true</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="n">TimeSpan</span> <span class="n">expireResult9</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">KeyTimeToLive</span><span class="p">(</span><span class="s">"mykey"</span><span class="p">)</span> <span class="p">??</span> <span class="n">TimeSpan</span><span class="p">.</span><span class="n">Zero</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="n">Math</span><span class="p">.</span><span class="n">Round</span><span class="p">(</span><span class="n">expireResult9</span><span class="p">.</span><span class="n">TotalSeconds</span><span class="p">));</span> <span class="c1">// &gt;&gt;&gt; 10</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'expire' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'expireat' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'expiretime' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'keys' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'migrate' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'move' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'object_encoding' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'object_freq' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'object_idletime' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'object_refcount' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'persist' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'pexpire' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'pexpireat' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'pexpiretime' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'pttl' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'randomkey' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'rename' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'renamenx' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'restore' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'scan1' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'scan2' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'scan3' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'scan4' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'sort' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'sort_ro' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'touch' step.</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> </span></span><span class="line hl"><span class="cl"> <span class="kt">bool</span> <span class="n">ttlResult1</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">StringSet</span><span class="p">(</span><span class="s">"mykey"</span><span class="p">,</span> <span class="s">"Hello"</span><span class="p">);</span> </span></span><span class="line hl"><span class="cl"> <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="n">ttlResult1</span><span class="p">);</span> <span class="c1">// &gt;&gt;&gt; true</span> </span></span><span class="line hl"><span class="cl"> </span></span><span class="line hl"><span class="cl"> <span class="kt">bool</span> <span class="n">ttlResult2</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">KeyExpire</span><span class="p">(</span><span class="s">"mykey"</span><span class="p">,</span> <span class="k">new</span> <span class="n">TimeSpan</span><span class="p">(</span><span class="m">0</span><span class="p">,</span> <span class="m">0</span><span class="p">,</span> <span class="m">10</span><span class="p">));</span> </span></span><span class="line hl"><span class="cl"> <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="n">ttlResult2</span><span class="p">);</span> </span></span><span class="line hl"><span class="cl"> </span></span><span class="line hl"><span class="cl"> <span class="n">TimeSpan</span> <span class="n">ttlResult3</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">KeyTimeToLive</span><span class="p">(</span><span class="s">"mykey"</span><span class="p">)</span> <span class="p">??</span> <span class="n">TimeSpan</span><span class="p">.</span><span class="n">Zero</span><span class="p">;</span> </span></span><span class="line hl"><span class="cl"> <span class="kt">string</span> <span class="n">ttlRes</span> <span class="p">=</span> <span class="n">Math</span><span class="p">.</span><span class="n">Round</span><span class="p">(</span><span class="n">ttlResult3</span><span class="p">.</span><span class="n">TotalSeconds</span><span class="p">).</span><span class="n">ToString</span><span class="p">();</span> </span></span><span class="line hl"><span class="cl"> <span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="n">Math</span><span class="p">.</span><span class="n">Round</span><span class="p">(</span><span class="n">ttlResult3</span><span class="p">.</span><span class="n">TotalSeconds</span><span class="p">));</span> <span class="c1">// &gt;&gt;&gt; 10</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'ttl' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'type' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'unlink' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'wait' step.</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></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="c1">// Tests for 'waitaof' step.</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="p">}</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span></code></pre> </div> <button class="clipboard-button text-neutral-400 hover:text-slate-100 bg-slate-600 absolute -top-8 right-10 h-7 w-7 mr-2 mt-2 p-1 rounded rounded-mx" onclick="copyCodeToClipboard('#panel_Csharp_cmds_generic-stepttl')" tabindex="1" title="Copy to clipboard"> <svg fill="currentColor" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M9 43.95q-1.2 0-2.1-.9-.9-.9-.9-2.1V10.8h3v30.15h23.7v3Zm6-6q-1.2 0-2.1-.9-.9-.9-.9-2.1v-28q0-1.2.9-2.1.9-.9 2.1-.9h22q1.2 0 2.1.9.9.9.9 2.1v28q0 1.2-.9 2.1-.9.9-2.1.9Zm0-3h22v-28H15v28Zm0 0v-28 28Z"> </path> </svg> <div class="tooltip relative inline-block"> <span class="tooltiptext hidden bg-slate-200 rounded rounded-mx text-slate-800 text-center text-xs p-1 absolute right-6 bottom-4"> Copied! </span> </div> </button> <button aria-controls="panel_Csharp_cmds_generic-stepttl" class="visibility-button text-neutral-400 hover:text-slate-100 bg-slate-600 absolute -top-8 right-2 h-7 w-7 mr-2 mt-2 p-1 rounded rounded-mx" onclick="toggleVisibleLines(this)" tabindex="1" title="Toggle visibility"> <svg class="hidden" fill="currentColor" id="visibility-off" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="m31.45 27.05-2.2-2.2q1.3-3.55-1.35-5.9-2.65-2.35-5.75-1.2l-2.2-2.2q.85-.55 1.9-.8 1.05-.25 2.15-.25 3.55 0 6.025 2.475Q32.5 19.45 32.5 23q0 1.1-.275 2.175-.275 1.075-.775 1.875Zm6.45 6.45-2-2q2.45-1.8 4.275-4.025Q42 25.25 42.85 23q-2.5-5.55-7.5-8.775Q30.35 11 24.5 11q-2.1 0-4.3.4-2.2.4-3.45.95L14.45 10q1.75-.8 4.475-1.4Q21.65 8 24.25 8q7.15 0 13.075 4.075Q43.25 16.15 46 23q-1.3 3.2-3.35 5.85-2.05 2.65-4.75 4.65Zm2.9 11.3-8.4-8.25q-1.75.7-3.95 1.075T24 38q-7.3 0-13.25-4.075T2 23q1-2.6 2.775-5.075T9.1 13.2L2.8 6.9l2.1-2.15L42.75 42.6ZM11.15 15.3q-1.85 1.35-3.575 3.55Q5.85 21.05 5.1 23q2.55 5.55 7.675 8.775Q17.9 35 24.4 35q1.65 0 3.25-.2t2.4-.6l-3.2-3.2q-.55.25-1.35.375T24 31.5q-3.5 0-6-2.45T15.5 23q0-.75.125-1.5T16 20.15Zm15.25 7.1Zm-5.8 2.9Z"> </path> </svg> <svg fill="currentColor" id="visibility-on" viewbox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M24 31.5q3.55 0 6.025-2.475Q32.5 26.55 32.5 23q0-3.55-2.475-6.025Q27.55 14.5 24 14.5q-3.55 0-6.025 2.475Q15.5 19.45 15.5 23q0 3.55 2.475 6.025Q20.45 31.5 24 31.5Zm0-2.9q-2.35 0-3.975-1.625T18.4 23q0-2.35 1.625-3.975T24 17.4q2.35 0 3.975 1.625T29.6 23q0 2.35-1.625 3.975T24 28.6Zm0 9.4q-7.3 0-13.2-4.15Q4.9 29.7 2 23q2.9-6.7 8.8-10.85Q16.7 8 24 8q7.3 0 13.2 4.15Q43.1 16.3 46 23q-2.9 6.7-8.8 10.85Q31.3 38 24 38Zm0-15Zm0 12q6.05 0 11.125-3.275T42.85 23q-2.65-5.45-7.725-8.725Q30.05 11 24 11t-11.125 3.275Q7.8 17.55 5.1 23q2.7 5.45 7.775 8.725Q17.95 35 24 35Z"> </path> </svg> </button> <div class="cli-footer flex items-center justify-between rounded-b-md bg-slate-900 mt-0 px-4 pt-0 mb-0 transition-opacity ease-in-out duration-300 opacity-0 invisible group-hover:opacity-100 group-hover:visible"> <a class="rounded rounded-mx px-3 py-1 text-white text-xs hover:text-white hover:bg-slate-600 hover:border-transparent focus:outline-none focus:ring-2 focus:white focus:border-slate-500" href="https://redis.io/docs/latest/develop/connect/clients/dotnet/" tabindex="1" title="Quick-Start"> C# Quick-Start </a> <div class="w-1/2"> </div> <div class="flex-1 text-right"> <a class="button text-neutral-400 hover:text-slate-100 h-6 w-6 p-1" href="https://github.com/redis/NRedisStack/tree/master/tests/Doc/CmdsGenericExample.cs" tabindex="1" title="Improve this code example"> <svg fill="github" height="16" viewbox="0 0 18 16" width="18" xmlns="http://www.w3.org/2000/svg"> <path clip-rule="evenodd" d="M8.99953 1.43397e-06C7.09918 -0.000897921 5.26058 0.674713 3.81295 1.90585C2.36533 3.13699 1.40324 4.84324 1.09896 6.71907C0.794684 8.5949 1.1681 10.5178 2.15233 12.1434C3.13657 13.769 4.66734 14.9912 6.47053 15.591C6.87053 15.664 7.01653 15.417 7.01653 15.205C7.01653 15.015 7.00953 14.512 7.00553 13.845C4.78053 14.328 4.31053 12.772 4.31053 12.772C4.16325 12.2887 3.84837 11.8739 3.42253 11.602C2.69653 11.102 3.47753 11.116 3.47753 11.116C3.73043 11.1515 3.97191 11.2442 4.18365 11.3869C4.39539 11.5297 4.57182 11.7189 4.69953 11.94C4.80755 12.1377 4.95378 12.3119 5.12972 12.4526C5.30567 12.5933 5.50782 12.6976 5.72442 12.7595C5.94103 12.8214 6.16778 12.8396 6.39148 12.813C6.61519 12.7865 6.83139 12.7158 7.02753 12.605C7.06381 12.1992 7.24399 11.8197 7.53553 11.535C5.75953 11.335 3.89153 10.647 3.89153 7.581C3.88005 6.78603 4.17513 6.01716 4.71553 5.434C4.47318 4.74369 4.50322 3.98693 4.79953 3.318C4.79953 3.318 5.47053 3.103 6.99953 4.138C8.31074 3.77905 9.69432 3.77905 11.0055 4.138C12.5325 3.103 13.2055 3.318 13.2055 3.318C13.5012 3.9877 13.5294 4.74513 13.2845 5.435C13.8221 6.01928 14.114 6.78817 14.0995 7.582C14.0995 10.655 12.2285 11.332 10.4465 11.53C10.6375 11.724 10.7847 11.9566 10.8784 12.2123C10.972 12.4679 11.0099 12.7405 10.9895 13.012C10.9895 14.081 10.9795 14.944 10.9795 15.206C10.9795 15.42 11.1235 15.669 11.5295 15.591C13.3328 14.9911 14.8636 13.7689 15.8479 12.1432C16.8321 10.5175 17.2054 8.59447 16.901 6.71858C16.5966 4.84268 15.6343 3.13642 14.1865 1.90536C12.7387 0.674306 10.9 -0.0011359 8.99953 1.43397e-06Z" fill="white" fill-rule="evenodd"> </path> </svg> </a> </div> </div> </div> </div> <p> Give these commands a try in the interactive console: </p> <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; SET mykey "Hello" "OK" redis&gt; EXPIRE mykey 10 (integer) 1 redis&gt; TTL mykey (integer) 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> <p> One of the following: </p> <ul> <li> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : TTL in seconds. </li> <li> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : <code> -1 </code> if the key exists but has no associated expiration. </li> <li> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : <code> -2 </code> if the key does not exist. </li> </ul> <br/> <h2> History </h2> <ul> <li> Starting with Redis version 2.8.0: Added the -2 reply. </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/ttl/"/> <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_task/.html
<section class="prose w-full py-12 max-w-none"> <h1> CRDB task object </h1> <p class="text-lg -mt-5 mb-10"> An object that represents a CRDB task </p> <p> An object that represents an Active-Active (CRDB) task. </p> <table> <thead> <tr> <th> Name </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> id </td> <td> string </td> <td> CRDB task ID (read only) </td> </tr> <tr> <td> crdb_guid </td> <td> string </td> <td> Globally unique Active-Active database ID (GUID) (read-only) </td> </tr> <tr> <td> errors </td> <td> <pre><code> [{ "cluster_name": string, "description": string, "error_code": string }, ...] </code></pre> </td> <td> Details for errors that occurred on a cluster </td> </tr> <tr> <td> status </td> <td> 'queued' <br/> 'started' <br/> 'finished' <br/> 'failed' </td> <td> CRDB task status (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/crdb_task/"/> <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/manage-rec-certificates/.html
<section class="prose w-full py-12 max-w-none"> <h1> Manage Redis Enterprise cluster (REC) certificates </h1> <p class="text-lg -mt-5 mb-10"> Install your own certificates to be used by the Redis Enterprise cluster's operator. </p> <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 added to the cluster. For the list of of certificates used by Redis Enterprise Software and the traffic they encrypt, see the <a href="/docs/latest/operate/rs/security/certificates/"> certificates table </a> . </p> <p> To install and use your own certificates with Kubernetes on your Redis Enterprise cluster, they need to be stored in <a href="https://kubernetes.io/docs/concepts/configuration/secret/"> secrets </a> . The REC custom resource also needs to be configured with those secret names to read and use the certificates. </p> <h2 id="create-a-secret-to-hold-the-new-certificate"> Create a secret to hold the new certificate </h2> <p> Create the <a href="https://kubernetes.io/docs/tasks/configmap-secret/managing-secret-using-kubectl/"> secret </a> with the required fields shown below. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">kubectl create secret generic &lt;secret-name&gt; <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span> --from-file<span class="o">=</span><span class="nv">certificate</span><span class="o">=</span>&lt;/PATH/TO/certificate.pem&gt; <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span> --from-file<span class="o">=</span><span class="nv">key</span><span class="o">=</span>&lt;/PATH/TO/key.pem&gt; <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span> --from-literal<span class="o">=</span><span class="nv">name</span><span class="o">=</span>&lt;proxy <span class="p">|</span> api <span class="p">|</span> cm <span class="p">|</span> syncer <span class="p">|</span> metrics_exporter&gt; </span></span></code></pre> </div> <h2 id="update-certificates-in-the-rec-custom-resource"> Update certificates in the REC custom resource </h2> <p> Edit the Redis Enterprise cluster (REC) custom resource to add a <code> certificates </code> subsection under the <code> spec </code> section. You are only required to add the fields for the certificates you are installing. </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">spec</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">certificates</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">apiCertificateSecretName</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;apicert-secret-name&gt;</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">cmCertificateSecretName</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;cmcert-secret-name&gt;</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">syncerCertificateSecretName</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;syncercert-secret-name&gt;</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">metricsExporterCertificateSecretName</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;metricscert-secret-name&gt;</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">proxyCertificateSecretName</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;proxycert-secret-name&gt;</span><span class="w"> </span></span></span></code></pre> </div> <h3 id="update-certificates-through-the-api"> Update certificates through the API </h3> <p> Alternatively, you can also update the REC certificates via the API: </p> <pre tabindex="0"><code class="language-API" data-lang="API">PUT /v1/cluster/update_cert { "certificate": &lt;certificate&gt;, "key": &lt;cert-key&gt;, "name": &lt;cert-name&gt; } </code></pre> <h3 id="verify-the-certificate-was-updated"> Verify the certificate was updated </h3> <p> Check the operator logs and use the API to verify the certificate has been updated. </p> <pre tabindex="0"><code class="language-api" data-lang="api">GET /v1/cluster/certificates </code></pre> <h2 id="more-info"> More info </h2> <ul> <li> <a href="/docs/latest/operate/rs/security/certificates/updating-certificates/"> Update certificates </a> </li> <li> <a href="/docs/latest/operate/rs/security/certificates/create-certificates/"> Install your own certificates </a> </li> <li> <a href="/docs/latest/glossary/#letter-t"> Glossary/Transport Layer Security (TLS) </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/kubernetes/security/manage-rec-certificates/"/> <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/config-get/.html
<section class="prose w-full py-12 max-w-none"> <h1> ConfigGet </h1> <p class="text-lg -mt-5 mb-10"> Gets the value of a RedisGears configuration setting. </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="kd">static</span> <span class="n">java</span><span class="o">.</span><span class="na">lang</span><span class="o">.</span><span class="na">String</span> <span class="n">configGet</span><span class="err">​</span><span class="o">(</span><span class="n">java</span><span class="o">.</span><span class="na">lang</span><span class="o">.</span><span class="na">String</span> <span class="n">key</span><span class="o">)</span> </span></span></code></pre> </div> <p> Gets the value of a RedisGears <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/deprecated-features/triggers-and-functions/configuration/"> configuration setting </a> . </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> You can set configuration values when you load the module or use the <code> RG.CONFIGSET </code> command. </div> </div> <h2 id="parameters"> Parameters </h2> <table> <thead> <tr> <th> Name </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> key </td> <td> string </td> <td> The configuration setting to get </td> </tr> </tbody> </table> <h2 id="returns"> Returns </h2> <p> Returns the configuration value of a RedisGears configuration setting. </p> <h2 id="example"> Example </h2> <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">configGet</span><span class="o">(</span><span class="s">"ExecutionMaxIdleTime"</span><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/config-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/installing-upgrading/product-lifecycle/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise Software product lifecycle </h1> <p class="text-lg -mt-5 mb-10"> The product lifecycle of Redis Enterprise Software. </p> <p> The Redis Enterprise Software product lifecycle fully reflects the <a href="https://redis.com/software-subscription-agreement"> subscription agreement </a> . However, for any discrepancy between the two policies, the subscription agreement prevails. </p> <p> Redis Enterprise modules follow the <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/modules-lifecycle/"> modules lifecycle </a> . </p> <h2 id="release-numbers"> Release numbers </h2> <p> Redis uses a four-place numbering scheme to designate released versions of its products. The format is β€œMajor1.Major2.Minor-Build”. </p> <ul> <li> Major sections of the version number represents fundamental changes and additions in capabilities to Redis Enterprise Software. The Major1 and Major2 part of the version number are incremented based on the size and scale of the changes in each release. </li> <li> The Minor section of the version number represents quality improvements, fixes to existing capabilities, and new capabilities which are typically minor, feature-flagged, or optional. </li> <li> Build number is incremented with any changes to the product. Build number is incremented with each build when any change is made to the binaries. </li> </ul> <p> Redis Enterprise Software typically gets two major releases every year but the product shipping cycles may vary. Maintenance releases, typically available on the last minor release of the current major1.major2 release are typically made available on a monthly cadence, although cycles may vary. </p> <h2 id="endoflife-schedule"> End-of-life schedule </h2> <p> For Redis Enterprise Software versions 6.2 and later, the end-of-life (EOL) for each major release occurs 24 months after the formal release of the subsequent major version. Monthly maintenance will be provided on the last minor release of the major1.major2 releases. This update to the EOL policy allows a lead time of at least 24 months to upgrade to the new release after it is available. </p> <table> <thead> <tr> <th> Version - Release date </th> <th> End of Life (EOL) </th> </tr> </thead> <tbody> <tr> <td> 7.4 – February 2024 </td> <td> - </td> </tr> <tr> <td> 7.2 – August 2023 </td> <td> February 28, 2026 </td> </tr> <tr> <td> 6.4 – February 2023 </td> <td> August 31, 2025 </td> </tr> <tr> <td> 6.2 – August 2021 </td> <td> February 28, 2025 </td> </tr> <tr> <td> 6.0 – May 2020 </td> <td> May 31, 2022 </td> </tr> <tr> <td> 5.6 – April 2020 </td> <td> October 31, 2021 </td> </tr> <tr> <td> 5.4 – December 2018 </td> <td> December 31, 2020 </td> </tr> <tr> <td> 5.2 – June 2018 </td> <td> December 31, 2019 </td> </tr> </tbody> </table> <h2 id="supported-upgrade-paths"> Supported upgrade paths </h2> <p> <span title="Check mark icon"> βœ… </span> Supported – You can upgrade directly from the current Redis Software cluster version. </p> <p> <span title="X icon"> ❌ </span> Not supported – You cannot upgrade directly from the current Redis Software cluster version. You must first upgrade to a supported intermediate version. </p> <table> <thead> <tr> <th style="text-align:center"> Current Redis Software cluster version </th> <th style="text-align:center"> Upgrade to Redis Software 6.2.x </th> <th style="text-align:center"> Upgrade to Redis Software 6.4.x </th> <th style="text-align:center"> Upgrade to Redis Software 7.2.x </th> <th style="text-align:center"> Upgrade to Redis Software 7.4.x </th> <th style="text-align:center"> Upgrade to Redis Software 7.8.x </th> </tr> </thead> <tbody> <tr> <td style="text-align:center"> 6.0.x </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="Not supported"> ❌ </span> </td> <td style="text-align:center"> <span title="Not supported"> ❌ </span> </td> </tr> <tr> <td style="text-align:center"> 6.2.4 <br/> 6.2.8 </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> <td style="text-align:center"> <span title="Not supported"> ❌ </span> </td> </tr> <tr> <td style="text-align:center"> 6.2.10 <br/> 6.2.12 <br/> 6.2.18 </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> <td style="text-align:center"> <span title="Supported"> βœ… </span> </td> </tr> <tr> <td style="text-align:center"> 6.4.x </td> <td style="text-align:center"> – </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 style="text-align:center"> 7.2.x </td> <td style="text-align:center"> – </td> <td style="text-align:center"> – </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> </tr> <tr> <td style="text-align:center"> 7.4.x </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> <td style="text-align:center"> <span title="Supported"> βœ… </span> </td> </tr> </tbody> </table> <p> For detailed upgrade instructions, see <a href="/docs/latest/operate/rs/7.4/installing-upgrading/upgrading/upgrade-cluster/"> Upgrade a Redis Enterprise Software cluster </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/installing-upgrading/product-lifecycle/"/> <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/active-active/delete/.html
<section class="prose w-full py-12 max-w-none"> <h1> Delete Active-Active databases </h1> <p class="text-lg -mt-5 mb-10"> Considerations while deleting Active-Active databases. </p> <p> When you delete an Active-Active database (formerly known as CRDB), all instances of the Active-Active database are deleted from all participating clusters. </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> This action is immediate, non-reversible, and has no rollback. </div> </div> <p> Because Active-Active databases are made up of instances on multiple participating clusters, to restore a deleted Active-Active database you must create the database again with all of its instances and then restore the data to the database from backup. </p> <p> We recommended that you: </p> <ul> <li> Back up your data and test the restore on another database before you delete an Active-Active database. </li> <li> Consider <a href="/docs/latest/operate/rs/databases/import-export/flush/"> flushing the data </a> from the database so that you can keep the Active-Active database configuration and restore the data to it if necessary. </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/databases/active-active/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/develop/reference/sentinel-clients/.html
<section class="prose w-full py-12"> <h1> Sentinel client spec </h1> <p class="text-lg -mt-5 mb-10"> How to build clients for Redis Sentinel </p> <p> Redis Sentinel is a monitoring solution for Redis instances that handles automatic failover of Redis masters and service discovery (who is the current master for a given group of instances?). Since Sentinel is both responsible for reconfiguring instances during failovers, and providing configurations to clients connecting to Redis masters or replicas, clients are required to have explicit support for Redis Sentinel. </p> <p> This document is targeted at Redis clients developers that want to support Sentinel in their clients implementation with the following goals: </p> <ul> <li> Automatic configuration of clients via Sentinel. </li> <li> Improved safety of Redis Sentinel automatic failover. </li> </ul> <p> For details about how Redis Sentinel works, please check the <a href="/docs/latest/operate/oss_and_stack/management/sentinel/"> Redis Documentation </a> , as this document only contains information needed for Redis client developers, and it is expected that readers are familiar with the way Redis Sentinel works. </p> <h2 id="redis-service-discovery-via-sentinel"> Redis service discovery via Sentinel </h2> <p> Redis Sentinel identifies every master with a name like "stats" or "cache". Every name actually identifies a <em> group of instances </em> , composed of a master and a variable number of replicas. </p> <p> The address of the Redis master that is used for a specific purpose inside a network may change after events like an automatic failover, a manually triggered failover (for instance in order to upgrade a Redis instance), and other reasons. </p> <p> Normally Redis clients have some kind of hard-coded configuration that specifies the address of a Redis master instance within a network as IP address and port number. However if the master address changes, manual intervention in every client is needed. </p> <p> A Redis client supporting Sentinel can automatically discover the address of a Redis master from the master name using Redis Sentinel. So instead of a hard coded IP address and port, a client supporting Sentinel should optionally be able to take as input: </p> <ul> <li> A list of ip:port pairs pointing to known Sentinel instances. </li> <li> The name of the service, like "cache" or "timelines". </li> </ul> <p> This is the procedure a client should follow in order to obtain the master address starting from the list of Sentinels and the service name. </p> <h3 id="step-1-connect-to-the-first-sentinel"> Step 1: connect to the first Sentinel </h3> <p> The client should iterate the list of Sentinel addresses. For every address it should try to connect to the Sentinel, using a short timeout (in the order of a few hundreds of milliseconds). On errors or timeouts the next Sentinel address should be tried. </p> <p> If all the Sentinel addresses were tried without success, an error should be returned to the client. </p> <p> The first Sentinel replying to the client request should be put at the start of the list, so that at the next reconnection, we'll try first the Sentinel that was reachable in the previous connection attempt, minimizing latency. </p> <h3 id="step-2-ask-for-the-master-address"> Step 2: ask for the master address </h3> <p> Once a connection with a Sentinel is established, the client should retry to execute the following command on the Sentinel: </p> <pre><code>SENTINEL get-master-addr-by-name master-name </code></pre> <p> Where <em> master-name </em> should be replaced with the actual service name specified by the user. </p> <p> The result from this call can be one of the following two replies: </p> <ul> <li> An ip:port pair. </li> <li> A null reply. This means Sentinel does not know this master. </li> </ul> <p> If an ip:port pair is received, this address should be used to connect to the Redis master. Otherwise if a null reply is received, the client should try the next Sentinel in the list. </p> <h3 id="step-3-call-the-role-command-in-the-target-instance"> Step 3: call the ROLE command in the target instance </h3> <p> Once the client discovered the address of the master instance, it should attempt a connection with the master, and call the <a href="/docs/latest/commands/role/"> <code> ROLE </code> </a> command in order to verify the role of the instance is actually a master. </p> <p> If the <a href="/docs/latest/commands/role/"> <code> ROLE </code> </a> commands is not available (it was introduced in Redis 2.8.12), a client may resort to the <code> INFO replication </code> command parsing the <code> role: </code> field of the output. </p> <p> If the instance is not a master as expected, the client should wait a short amount of time (a few hundreds of milliseconds) and should try again starting from Step 1. </p> <h2 id="handle-reconnections"> Handle reconnections </h2> <p> Once the service name is resolved into the master address and a connection is established with the Redis master instance, every time a reconnection is needed, the client should resolve again the address using Sentinels restarting from Step 1. For instance Sentinel should contacted again the following cases: </p> <ul> <li> If the client reconnects after a timeout or socket error. </li> <li> If the client reconnects because it was explicitly closed or reconnected by the user. </li> </ul> <p> In the above cases and any other case where the client lost the connection with the Redis server, the client should resolve the master address again. </p> <h2 id="sentinel-failover-disconnection"> Sentinel failover disconnection </h2> <p> Starting with Redis 2.8.12, when Redis Sentinel changes the configuration of an instance, for example promoting a replica to a master, demoting a master to replicate to the new master after a failover, or simply changing the master address of a stale replica instance, it sends a <code> CLIENT KILL type normal </code> command to the instance in order to make sure all the clients are disconnected from the reconfigured instance. This will force clients to resolve the master address again. </p> <p> If the client will contact a Sentinel with yet not updated information, the verification of the Redis instance role via the <a href="/docs/latest/commands/role/"> <code> ROLE </code> </a> command will fail, allowing the client to detect that the contacted Sentinel provided stale information, and will try again. </p> <p> Note: it is possible that a stale master returns online at the same time a client contacts a stale Sentinel instance, so the client may connect with a stale master, and yet the ROLE output will match. However when the master is back again Sentinel will try to demote it to replica, triggering a new disconnection. The same reasoning applies to connecting to stale replicas that will get reconfigured to replicate with a different master. </p> <h2 id="connect-to-replicas"> Connect to replicas </h2> <p> Sometimes clients are interested to connect to replicas, for example in order to scale read requests. This protocol supports connecting to replicas by modifying step 2 slightly. Instead of calling the following command: </p> <pre><code>SENTINEL get-master-addr-by-name master-name </code></pre> <p> The clients should call instead: </p> <pre><code>SENTINEL replicas master-name </code></pre> <p> In order to retrieve a list of replica instances. </p> <p> Symmetrically the client should verify with the <a href="/docs/latest/commands/role/"> <code> ROLE </code> </a> command that the instance is actually a replica, in order to avoid scaling read queries with the master. </p> <h2 id="connection-pools"> Connection pools </h2> <p> For clients implementing connection pools, on reconnection of a single connection, the Sentinel should be contacted again, and in case of a master address change all the existing connections should be closed and connected to the new address. </p> <h2 id="error-reporting"> Error reporting </h2> <p> The client should correctly return the information to the user in case of errors. Specifically: </p> <ul> <li> If no Sentinel can be contacted (so that the client was never able to get the reply to <code> SENTINEL get-master-addr-by-name </code> ), an error that clearly states that Redis Sentinel is unreachable should be returned. </li> <li> If all the Sentinels in the pool replied with a null reply, the user should be informed with an error that Sentinels don't know this master name. </li> </ul> <h2 id="sentinels-list-automatic-refresh"> Sentinels list automatic refresh </h2> <p> Optionally once a successful reply to <code> get-master-addr-by-name </code> is received, a client may update its internal list of Sentinel nodes following this procedure: </p> <ul> <li> Obtain a list of other Sentinels for this master using the command <code> SENTINEL sentinels &lt;master-name&gt; </code> . </li> <li> Add every ip:port pair not already existing in our list at the end of the list. </li> </ul> <p> It is not needed for a client to be able to make the list persistent updating its own configuration. The ability to upgrade the in-memory representation of the list of Sentinels can be already useful to improve reliability. </p> <h2 id="subscribe-to-sentinel-events-to-improve-responsiveness"> Subscribe to Sentinel events to improve responsiveness </h2> <p> The <a href="/docs/latest/operate/oss_and_stack/management/sentinel/"> Sentinel documentation </a> shows how clients can connect to Sentinel instances using Pub/Sub in order to subscribe to changes in the Redis instances configurations. </p> <p> This mechanism can be used in order to speedup the reconfiguration of clients, that is, clients may listen to Pub/Sub in order to know when a configuration change happened in order to run the three steps protocol explained in this document in order to resolve the new Redis master (or replica) address. </p> <p> However update messages received via Pub/Sub should not substitute the above procedure, since there is no guarantee that a client is able to receive all the update messages. </p> <h2 id="additional-information"> Additional information </h2> <p> For additional information or to discuss specific aspects of this guidelines, please drop a message to the <a href="https://groups.google.com/group/redis-db"> Redis Google Group </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/develop/reference/sentinel-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/rs.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise Software </h1> <p class="text-lg -mt-5 mb-10"> The self-managed, enterprise-grade version of Redis. </p> <p> <a href="https://redis.io/enterprise/"> Redis Enterprise </a> is a self-managed, enterprise-grade version of Redis. </p> <p> With Redis Enterprise, you get many enterprise-grade capabilities, including: </p> <ul> <li> Linear scalability </li> <li> High availability, backups, and recovery </li> <li> Predictable performance </li> <li> 24/7 support </li> </ul> <p> You can run self-managed Redis Enterprise Software in an on-premises data center or on your preferred cloud platform. </p> <p> If you prefer a fully managed Redis database-as-a-service, available on major public cloud services, consider setting up a <a href="/docs/latest/operate/rc/"> Redis Cloud </a> subscription. You can <a href="https://redis.io/try-free/"> try Redis Cloud </a> for free. </p> <h2 id="get-started"> Get started </h2> <p> Build a small-scale cluster with the Redis Enterprise Software container image. </p> <ul> <li> <a href="/docs/latest/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart/"> Linux quickstart </a> </li> <li> <a href="/docs/latest/operate/rs/installing-upgrading/quickstarts/docker-quickstart/"> Docker quickstart </a> </li> <li> <a href="/docs/latest/operate/rs/databases/active-active/get-started/"> Get started with Active-Active </a> </li> </ul> <h2 id="install--setup"> Install &amp; setup </h2> <p> <a href="/docs/latest/operate/rs/installing-upgrading/"> Install &amp; set up </a> a Redis Enterprise Software cluster. </p> <ul> <li> <a href="/docs/latest/operate/rs/networking/"> Networking </a> </li> <li> <a href="/docs/latest/operate/rs/clusters/new-cluster-setup/"> Set up </a> &amp; <a href="/docs/latest/operate/rs/clusters/configure/"> configure </a> a <a href="/docs/latest/operate/rs/clusters/"> cluster </a> </li> <li> <a href="/docs/latest/operate/rs/release-notes/"> Release notes </a> </li> </ul> <h2 id="databases"> Databases </h2> <p> Create and manage a <a href="/docs/latest/operate/rs/databases/"> Redis database </a> on a cluster. </p> <ul> <li> <a href="/docs/latest/operate/rs/databases/create/"> Create a Redis Enterprise Software database </a> </li> <li> <a href="/docs/latest/operate/rs/databases/configure/"> Configure database </a> </li> <li> <a href="/docs/latest/operate/rs/databases/active-active/create/"> Create Active-Active database </a> </li> <li> <a href="/docs/latest/operate/rs/databases/active-active/manage/"> Edit Active-Active database </a> </li> </ul> <h2 id="security"> Security </h2> <p> <a href="/docs/latest/operate/rs/security/"> Manage secure connections </a> to the cluster and databases. </p> <ul> <li> <a href="/docs/latest/operate/rs/security/access-control/"> Access control </a> </li> <li> <a href="/docs/latest/operate/rs/security/access-control/manage-users/"> Users </a> &amp; <a href="/docs/latest/operate/rs/security/access-control/"> roles </a> </li> <li> <a href="/docs/latest/operate/rs/security/certificates/"> Certificates </a> </li> <li> <a href="/docs/latest/operate/rs/security/encryption/tls/"> TLS </a> &amp; <a href="/docs/latest/operate/rs/security/encryption/"> Encryption </a> </li> </ul> <h2 id="reference"> Reference </h2> <p> Use command-line utilities and the REST API to manage the cluster and databases. </p> <ul> <li> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/"> rladmin </a> , <a href="/docs/latest/operate/rs/references/cli-utilities/crdb-cli/"> crdb-cli </a> , &amp; <a href="/docs/latest/operate/rs/references/cli-utilities/"> other utilities </a> </li> <li> <a href="/docs/latest/operate/rs/references/rest-api/"> REST API reference </a> &amp; <a href="/docs/latest/operate/rs/references/rest-api/quick-start/"> examples </a> </li> <li> <a href="/docs/latest/commands/"> Redis commands </a> </li> </ul> <h2 id="related-info"> Related info </h2> <ul> <li> <a href="/docs/latest/operate/rc/"> Redis Cloud </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/"> Redis Community Edition </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/"> Redis Stack </a> </li> <li> <a href="/docs/latest/glossary/"> Glossary </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/"/> <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/bloom/.html
<section class="prose w-full py-12 max-w-none"> <h1> Probabilistic data structures </h1> <p class="text-lg -mt-5 mb-10"> Probabilistic data structures </p> <p> A Bloom filter is a probabilistic data structure which provides an efficient way to verify that an entry is certainly <em> not </em> in a set. This makes it especially ideal when trying to search for items on expensive-to-access resources (such as over a network or disk): If I have a large on-disk database and I want to know if the key <em> foo </em> exists in it, I can query the Bloom filter first, which tells me with a certainty whether it potentially exists (and then the disk lookup can continue) or whether it does <em> not </em> exist, and in this case I can forego the expensive disk lookup and simply send a negative reply up the stack. </p> <p> While it's possible to use other data structures (such as a hash table) to perform this, Bloom filters are also especially useful in that they occupy very little space per element, typically counted in the number of <em> bits </em> (not bytes!). There exists a percentage of false positives (which is controllable), but for an initial test of whether a key exists in a set, they provide excellent speed and most importantly excellent space efficiency. </p> <p> Bloom filters are used in a wide variety of applications such as ad serving - making sure a user doesn't see an ad too often; likewise in content recommendation systems - ensuring recommendations don't appear too often, in databases - quickly checking if an entry exists in a table before accessing it on disk, and so on. </p> <h2 id="how-bloom-filters-work"> How Bloom filters work </h2> <p> Most of the literature on Bloom filter uses highly symbolic and/or mathematical descriptions to describe it. If you're mathematically challenged like yours truly, you might find my explanation more useful. </p> <p> A Bloom filter is an array of many bits. When an element is 'added' to a bloom filter, the element is hashed. Then <em> bit[hashval % nbits] </em> is set to 1. This looks fairly similar to how buckets in a hash table are mapped. To check if an item is present or not, the hash is computed and the filter sees if the corresponding bit is set or not. </p> <a href="/docs/latest/images/rs/rebloom-hash1.png" sdata-lightbox="/images/rs/rebloom-hash1.png"> <img src="/docs/latest/images/rs/rebloom-hash1.png"/> </a> <p> Of course, this is subject to collisions. If a collision happens, the filter returns a false positive - indicating that the entry is indeed found (note that a bloom filter never returns a false negative, that is, claim that something does not exist when it fact it is present). </p> <p> In order to reduce the risk of collisions, an entry may use more than one bit: the entry is hashed <em> bits_per_element (bpe) </em> times with a different seed for each iteration resulting in a different hash value, and for each hash value, the corresponding <em> hash % nbits </em> bit is set. To check if an entry exists, the candidate key is also hashed <em> bpe </em> times, and if any corresponding bit is <em> unset </em> , then it can be determined with certainty that the item does <em> not </em> exist. </p> <p> The actual value of <em> bpe </em> is determined at the time the filter is created. Generally the more bits per element, the lower the likelihood of false positives. </p> <a href="/docs/latest/images/rs/rebloom-hash3.png" sdata-lightbox="/images/rs/rebloom-hash3.png"> <img src="/docs/latest/images/rs/rebloom-hash3.png"/> </a> <p> In the example above, all three bits would need to be set in order for the filter to return a positive result. </p> <p> Another value affecting the accuracy of a Bloom filter is its <em> fill ratio </em> , or how many bits in the filter are actually set. If a filter has a vast majority of bits set, the likelihood of any specific lookup returning false is decreased, and thus the possibility of the filter returning false positives is increased. </p> <h2 id="scalable-bloom-filters"> Scalable Bloom filters </h2> <p> Typically Bloom filters must be created with a foreknowledge of how many entries they contain. The <em> bpe </em> number needs to be fixed, and likewise, the width of the bit array is also fixed. Unlike hash tables, Bloom filters cannot be "rebalanced" because there is no way to know <em> which </em> entries are part of the filter (the filter can only determine whether a given entry is <em> not </em> present, but does not actually store the entries which <em> are </em> present). </p> <p> In order to allow Bloom filters to 'scale' and be able to accommodate more elements than they've been designed to, they may be stacked. Once a single Bloom filter reaches capacity, a new one is created atop it. Typically the new filter has greater capacity than the previous one in order to reduce the likelihood of needing to stack yet another filter. </p> <p> In a stackable (scalable) Bloom filter, checking for membership now involves inspecting each layer for presence. Adding new items now involves checking that it does not exist beforehand, and adding it to the current filter. Hashes still only need to be computed once, however. </p> <p> When creating a Bloom filter - even a scalable one, it's important to have a good idea of how many items it is expected to contain. A filter whose initial layer can only contain a small number of elements will degrade performance significantly because it will take more layers to reach a larger capacity. </p> <h2 id="more-info"> More info </h2> <ul> <li> <a href="/docs/latest/develop/data-types/probabilistic/bloom-filter/"> Probabilistic data structures quick start </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/bloom/commands/"> Probabilistic data structure commands </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/bloom/config/"> Probabilistic data structure configuration </a> </li> <li> <a href="https://github.com/RedisBloom/RedisBloom/"> RedisBloom source </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/oss_and_stack/stack-with-enterprise/bloom/"/> <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/legacy-release-notes/rs-5-4-4-june-2019/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise Software Release Notes 5.4.4 (June 2019) </h1> <p> Redis Enterprise Software (RS) 5.4.4 is now available. This release enables the functionality of Active-Active Redis (CRDB) combined with RoF (Auto Tiering), supports the creation of Redis databases with multiple modules, and adds other enhancements and bug fixes. </p> <h2 id="overview"> Overview </h2> <p> Follow these <a href="/docs/latest/operate/rs/installing-upgrading/upgrading/"> instructions for upgrading </a> to RS 5.4.4 from RS 5.0 and above. If you have a version older than 5.0, you must first upgrade to version 5.2 (or at least 5.0). </p> <h2 id="new-features"> New features </h2> <h3 id="activeactive-redis-with-rof"> Active-Active Redis with RoF </h3> <p> RS 5.4.4 lets you create Active-Active Redis databases (CRDBs) with Auto Tiering and get the benefits of geo-distributed Redis databases along with the significant cost savings of using Auto Tiering. </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> You must select <strong> Redis 5 </strong> as the Redis version to use CRDB and RoF. </div> </div> <h3 id="support-for-multiple-modules"> Support for multiple modules </h3> <p> RS 5.4.4 supports the creation and management of Redis databases with a combination of any of the following GA modules: </p> <ul> <li> RediSearch (GA) </li> <li> RedisGraph (GA) </li> <li> RedisBloom (GA) </li> <li> RedisJSON (GA) </li> </ul> <video autoplay="" class="video" controls="" loop="" muted="" playsinline="" preload="auto" title="Adding multiple modules" width="100%"> <source src="/images/rs/multiple-modules.mp4" type="video/mp4"/> </video> <p> To upgrade databases with multiple modules, you can use the <code> rladmin upgrade </code> command. </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 syntax for the <code> rladmin upgrade </code> command now requires that the module_args parameter be written inside quotation marks. </div> </div> <ul> <li> <p> To upgrade only the modules within an existing database, for example with RedisBloom (bf) and RedisJSON: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin upgrade module db_name db1 module_name bf version <span class="m">10003</span> module_args <span class="s2">""</span> module_name ReJSON version <span class="m">10001</span> module_args <span class="s2">""</span> </span></span></code></pre> </div> </li> <li> <p> To upgrade a database with its modules, for example db1 with RediSearch and RedisGraph: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin upgrade db db1 and module module_name redisearch version <span class="m">103</span> module_args <span class="s2">"ON_TIMEOUT FAIL NOGC"</span> and module module_name graph version <span class="m">10016</span> module_args <span class="s2">""</span> </span></span></code></pre> </div> </li> </ul> <p> You can also upgrade the modules with the REST API. </p> <ul> <li> <p> To upgrade multiple modules, enter the details of each module in the <code> modules </code> parameter: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">curl -X POST -u <span class="s2">"[email protected]:password"</span> -H <span class="s2">"Content-Type: application/json"</span> -d <span class="s1">'{"modules":[{"module_name": "ReJSON", "current_module": "&lt;module_uid&gt;", "new_module": "&lt;module_uid&gt;", "new_module_args": "", "current_semantic_version":"1.0.4"}, {"module_name":"ft","current_module":"&lt;module_uid&gt;","new_module": "&lt;module_uid&gt;","current_semantic_version":"1.4.3", "new_module_args":"PARTITIONS AUTO"}], "force_restart":true}'</span> https://127.0.0.1:9443/v1/bdbs/2/modules/upgrade </span></span></code></pre> </div> </li> <li> <p> To upgrade a single module, you can either: </p> <ul> <li> Enter the details of the module in the <code> modules </code> parameter </li> <li> Enter the details of the module without the <code> modules </code> parameter, as in previous releases </li> </ul> </li> </ul> <h2 id="additional-capabilities"> Additional capabilities </h2> <ul> <li> Support for persistence of AOF every 1 second in Active-Active Redis (CRDB), in addition to AOF every write. We recommend that you use AOF every 1 second for the best performance during the initial CRDB sync of a new replica. </li> <li> NGINX version updated to 1.14.2 </li> </ul> <h2 id="information"> Information </h2> <ul> <li> Stay up to date with the <a href="/docs/latest/operate/rs/installing-upgrading/product-lifecycle/"> End of Life (EOL) Policy </a> for RS 5.4 and all previous RS versions. </li> </ul> <h2 id="important-fixes"> Important fixes </h2> <ul> <li> RS26508 - Fixed redis-cli failure for a specific CRDB data type. </li> <li> RS29191 - Fixed a failure when removing a replica from a CRDB. </li> <li> RS29097 - Fixed a misconfiguration when using SFTP backup and encounter a node failure. </li> <li> RS28286 - Updated <code> SETEX </code> and <code> PSETEX </code> commands output of CRDB to match Redis outputs. </li> <li> RS26984 - Fixed metrics_exporter reports for node and shard level metrics. </li> <li> RS19854 - Fixed uploading a Redis Module so you can upload a Redis Module when the admin console is connected to any node. </li> <li> RS29238 - Improved the compression performance in CRDB. </li> </ul> <h2 id="known-limitations"> Known limitations </h2> <h3 id="upgrade"> Upgrade </h3> <ul> <li> <a href="/docs/latest/operate/rs/release-notes/legacy-release-notes/rs-5-4-2-april-2019/"> RS 5.4.2 </a> introduced new Active-Active Redis (CRDB) capabilities that improve its compatibility with open source Redis. Now the string data-type in CRDB 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 <a href="/docs/latest/operate/rs/installing-upgrading/upgrading/#upgrading-crdbs"> upgrade the CRDB protocol </a> . </li> <li> Before you upgrade a database with RediSearch Module to Redis 5.0, you must <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module/"> upgrade the RediSearch Module </a> to version 1.4.2 or above. </li> <li> Node upgrade fails if the SSL certificates were configured in version 5.0.2 or above by manually updating the certificates on the disk instead of <a href="/docs/latest/operate/rs/security/certificates/updating-certificates/"> updating them through the API </a> . For assistance with this issue, <a href="https://redislabs.com/company/support/"> contact Redis support </a> . </li> <li> We recommend that you test module upgrade commands in a test environment before you upgrade modules in a production environment. The module upgrade arguments are not validated during the upgrade process and incorrect arguments can cause unexpected downtime. </li> <li> Starting from RS 5.4.2, to preserve the current Redis major.minor version during database upgrade you must use the <code> keep_redis_version </code> option instead of <code> keep_current_version </code> . </li> </ul> <h3 id="subscriptions"> Subscriptions </h3> <ul> <li> If a user subscribes to a channel during recovery of a CRDB from AOF, the user receives old messages that are stored in the AOF file. </li> </ul> <h3 id="cluster-api"> Cluster API </h3> <ul> <li> <p> The API for removing a node is updated in RS 5.4.2 or higher. The API call must include json data and the "Content-Type: application/json" header. For example: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">curl -X POST -H <span class="s2">"Content-Type: application/json"</span> -i -k -u [email protected]:passsword https://localhost:9443/v1/nodes/3/actions/remove --data <span class="s2">"{}"</span> </span></span></code></pre> </div> </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> The CLIENT ID command cannot guarantee incremental IDs between clients that connect to different nodes under multi proxy policies. </li> <li> CLIENT UNBLOCK command is not supported in RS 5.4.x </li> <li> Starting from RS 5.4.2 and after upgrading the CRDB, TYPE command for string data-type in CRDBs 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/legacy-release-notes/rs-5-4-4-june-2019/"/> <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/active-active/develop/data-types/.html
<section class="prose w-full py-12 max-w-none"> <h1> Data types for Active-Active databases </h1> <p class="text-lg -mt-5 mb-10"> Introduction to differences in data types between standalone and Active-Active Redis databases. </p> <p> Active-Active databases use conflict-free replicated data types (CRDTs). From a developer perspective, most supported data types work the same for Active-Active and standard Redis databases. However, a few methods also come with specific requirements in Active-Active databases. </p> <p> Even though they look identical to standard Redis data types, there are specific rules that govern the handling of conflicting concurrent writes for each data type. </p> <p> As conflict handling rules differ between data types, some commands have slightly different requirements in Active-Active databases versus standard Redis databases. </p> <p> See the following articles for more information </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/active-active/develop/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/operate/rs/release-notes/rs-7-4-2-releases/rs-7-4-2-169/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise Software release notes 7.4.2-169 (May 2024) </h1> <p class="text-lg -mt-5 mb-10"> Configuration options for cluster management API workers and threads. Reduced Cluster Configuration Store CPU usage. </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> Configuration options for cluster management API workers and threads </p> </li> <li> <p> Reduced Cluster Configuration Store CPU usage </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> Allow configuring <code> cnm_http_workers </code> and <code> cnm_http_max_threads_per_worker </code> using a <a href="/docs/latest/operate/rs/references/rest-api/requests/cluster/#put-cluster"> <code> PUT /v1/cluster </code> </a> REST API request. You can update these settings if the API load is higher than the cluster can handle by default. Configuring more workers than the default will consume more memory. </p> </li> <li> <p> Reduced Cluster Configuration Store CPU usage, following the addition of the internal caching mechanism in the resource management calculations. </p> </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 </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> RS123237: CRDT syncer prevents potential data mismatches or data loss due to missing keys when removing and re-adding a cluster in an Active-Active setup with at least three participating clusters after removing older clusters without re-adding them. </p> </li> <li> <p> RS93876: When resharding is performed with <code> shards_blueprint </code> , improved the order of resharding to avoid stuck state machines due to low memory. </p> </li> <li> <p> RS119350: Avoid removing roles bound to LDAP mappings during cluster upgrade even if the roles aren't assigned to any users. </p> </li> <li> <p> RS123561: Improved the installation validation process by identifying an occupied DNS port. </p> </li> <li> <p> RS122365: Improved platform and module readiness checks by ignoring operating systems that are no longer part of the cluster. </p> </li> <li> <p> RS96400: DMC management threads properly terminate instead of maintaining a blocking connection if they can't reach the CCS after a predefined time. </p> </li> <li> <p> RS117188: Replaced the policy cache mechanism. Cache data from the versions file. </p> </li> <li> <p> RS120425: Skip <a href="/docs/latest/operate/rs/references/cli-utilities/rlcheck/"> <code> rlcheck </code> </a> <code> ccs_dns </code> check when <code> pdns_server </code> is not enabled. </p> </li> <li> <p> RS118252: For databases with OSS Cluster API enabled, endpoints can bind to nodes that have master shards even if <code> max_listeners=0 </code> . </p> </li> <li> <p> RS115382: Updated DMC to disconnect the client with an error if the token size exceeds <code> MAX_KEY_BULK_SIZE </code> . </p> </li> <li> <p> RS110798: Reduced <code> cluster_wd </code> request latency, fixing communication errors on large clusters. </p> </li> <li> <p> RS119705: On in-place upgrades, minimize DMC downtime by performing CCS schema upgrade before services are restarted. </p> </li> <li> <p> RS117224: Avoid RAM eviction during scripts. </p> </li> <li> <p> RS122062: Use <code> os_family </code> instead of <code> os_name </code> when creating module platforms during cluster upgrade, fixing join requests for operating systems like CentOS and Oracle Linux. </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 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 MD5 checksums for the available packages: </p> <table> <thead> <tr> <th> Package </th> <th> MD5 checksum (7.4.2-169 May release) </th> </tr> </thead> <tbody> <tr> <td> Ubuntu 18 </td> <td> 20ff0c73c6df04921355e2b256672f8e </td> </tr> <tr> <td> Ubuntu 20 </td> <td> 1bdfad0d0a435bf6bcc648034bcc6bd6 </td> </tr> <tr> <td> Red Hat Enterprise Linux (RHEL) 8 </td> <td> 5a7ebdce87aff285ea78d5a29ccbafc5 </td> </tr> <tr> <td> Red Hat Enterprise Linux (RHEL) 9 </td> <td> 06dae1500cca622a6f61f51f107685df </td> </tr> <tr> <td> Amazon Linux 2 </td> <td> 1eb64a1e1c10c17d126494b3bfc5f090 </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) 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-169/"/> <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/jedis/produsage/.html
<section class="prose w-full py-12"> <h1> Production usage </h1> <p class="text-lg -mt-5 mb-10"> Get your Jedis app ready for production </p> <p> The following sections explain how to handle situations that may occur in your production environment. </p> <h3 id="timeouts"> Timeouts </h3> <p> To set a timeout for a connection, use the <code> JedisPooled </code> or <code> JedisPool </code> constructor with the <code> timeout </code> parameter, or use <code> JedisClientConfig </code> with the <code> socketTimeout </code> and <code> connectionTimeout </code> parameters: </p> <div class="highlight"> <pre class="chroma"><code class="language-java" data-lang="java"><span class="line"><span class="cl"><span class="n">HostAndPort</span> <span class="n">hostAndPort</span> <span class="o">=</span> <span class="k">new</span> <span class="n">HostAndPort</span><span class="o">(</span><span class="s">"localhost"</span><span class="o">,</span> <span class="mi">6379</span><span class="o">);</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">JedisPooled</span> <span class="n">jedisWithTimeout</span> <span class="o">=</span> <span class="k">new</span> <span class="n">JedisPooled</span><span class="o">(</span><span class="n">hostAndPort</span><span class="o">,</span> </span></span><span class="line"><span class="cl"> <span class="n">DefaultJedisClientConfig</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">socketTimeoutMillis</span><span class="o">(</span><span class="mi">5000</span><span class="o">)</span> <span class="c1">// set timeout to 5 seconds </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="o">.</span><span class="na">connectionTimeoutMillis</span><span class="o">(</span><span class="mi">5000</span><span class="o">)</span> <span class="c1">// set connection timeout to 5 seconds </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="n">poolConfig</span> </span></span><span class="line"><span class="cl"><span class="o">);</span> </span></span></code></pre> </div> <h3 id="exception-handling"> Exception handling </h3> <p> The Jedis Exception Hierarchy is rooted on <code> JedisException </code> , which implements <code> RuntimeException </code> , and are therefore all unchecked exceptions. </p> <pre tabindex="0"><code>JedisException β”œβ”€β”€ JedisDataException β”‚ β”œβ”€β”€ JedisRedirectionException β”‚ β”‚ β”œβ”€β”€ JedisMovedDataException β”‚ β”‚ └── JedisAskDataException β”‚ β”œβ”€β”€ AbortedTransactionException β”‚ β”œβ”€β”€ JedisAccessControlException β”‚ └── JedisNoScriptException β”œβ”€β”€ JedisClusterException β”‚ β”œβ”€β”€ JedisClusterOperationException β”‚ β”œβ”€β”€ JedisConnectionException β”‚ └── JedisValidationException └── InvalidURIException </code></pre> <h4 id="general-exceptions"> General exceptions </h4> <p> In general, Jedis can throw the following exceptions while executing commands: </p> <ul> <li> <code> JedisConnectionException </code> - when the connection to Redis is lost or closed unexpectedly. Configure failover to handle this exception automatically with Resilience4J and the built-in Jedis failover mechanism. </li> <li> <code> JedisAccessControlException </code> - when the user does not have the permission to execute the command or the user ID and/or password are incorrect. </li> <li> <code> JedisDataException </code> - when there is a problem with the data being sent to or received from the Redis server. Usually, the error message will contain more information about the failed command. </li> <li> <code> JedisException </code> - this exception is a catch-all exception that can be thrown for any other unexpected errors. </li> </ul> <p> Conditions when <code> JedisException </code> can be thrown: </p> <ul> <li> Bad return from a health check with the <a href="/docs/latest/commands/ping/"> <code> PING </code> </a> command </li> <li> Failure during SHUTDOWN </li> <li> Pub/Sub failure when issuing commands (disconnect) </li> <li> Any unknown server messages </li> <li> Sentinel: can connect to sentinel but master is not monitored or all Sentinels are down. </li> <li> MULTI or DISCARD command failed </li> <li> Shard commands key hash check failed or no Reachable Shards </li> <li> Retry deadline exceeded/number of attempts (Retry Command Executor) </li> <li> POOL - pool exhausted, error adding idle objects, returning broken resources to the pool </li> </ul> <p> All the Jedis exceptions are runtime exceptions and in most cases irrecoverable, so in general bubble up to the API capturing the error message. </p> <h3 id="dns-cache-and-redis"> DNS cache and Redis </h3> <p> When you connect to a Redis server with multiple endpoints, such as <a href="https://redis.com/redis-enterprise/technology/active-active-geo-distribution/"> Redis Enterprise Active-Active </a> , you <em> must </em> disable the JVM's DNS cache. If a server node or proxy fails, the IP address for any database affected by the failure will change. When this happens, your app will keep trying to use the stale IP address if DNS caching is enabled. </p> <p> Use the following code to disable the DNS cache: </p> <div class="highlight"> <pre class="chroma"><code class="language-java" data-lang="java"><span class="line"><span class="cl"><span class="n">java</span><span class="o">.</span><span class="na">security</span><span class="o">.</span><span class="na">Security</span><span class="o">.</span><span class="na">setProperty</span><span class="o">(</span><span class="s">"networkaddress.cache.ttl"</span><span class="o">,</span><span class="s">"0"</span><span class="o">);</span> </span></span><span class="line"><span class="cl"><span class="n">java</span><span class="o">.</span><span class="na">security</span><span class="o">.</span><span class="na">Security</span><span class="o">.</span><span class="na">setProperty</span><span class="o">(</span><span class="s">"networkaddress.cache.negative.ttl"</span><span class="o">,</span> <span class="s">"0"</span><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/develop/clients/jedis/produsage/"/> <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/use/patterns/distributed-locks/.html
<section class="prose w-full py-12"> <h1> Distributed Locks with Redis </h1> <p class="text-lg -mt-5 mb-10"> A distributed lock pattern with Redis </p> <p> Distributed locks are a very useful primitive in many environments where different processes must operate with shared resources in a mutually exclusive way. </p> <p> There are a number of libraries and blog posts describing how to implement a DLM (Distributed Lock Manager) with Redis, but every library uses a different approach, and many use a simple approach with lower guarantees compared to what can be achieved with slightly more complex designs. </p> <p> This page describes a more canonical algorithm to implement distributed locks with Redis. We propose an algorithm, called <strong> Redlock </strong> , which implements a DLM which we believe to be safer than the vanilla single instance approach. We hope that the community will analyze it, provide feedback, and use it as a starting point for the implementations or more complex or alternative designs. </p> <h2 id="implementations"> Implementations </h2> <p> Before describing the algorithm, here are a few links to implementations already available that can be used for reference. </p> <ul> <li> <a href="https://github.com/antirez/redlock-rb"> Redlock-rb </a> (Ruby implementation). There is also a <a href="https://github.com/leandromoreira/redlock-rb"> fork of Redlock-rb </a> that adds a gem for easy distribution. </li> <li> <a href="https://github.com/0exp/redis_queued_locks"> RedisQueuedLocks </a> (Ruby implementation). </li> <li> <a href="https://github.com/SPSCommerce/redlock-py"> Redlock-py </a> (Python implementation). </li> <li> <a href="https://github.com/brainix/pottery#redlock"> Pottery </a> (Python implementation). </li> <li> <a href="https://github.com/joanvila/aioredlock"> Aioredlock </a> (Asyncio Python implementation). </li> <li> <a href="https://github.com/ronnylt/redlock-php"> Redlock-php </a> (PHP implementation). </li> <li> <a href="https://github.com/malkusch/lock#phpredismutex"> PHPRedisMutex </a> (further PHP implementation). </li> <li> <a href="https://github.com/cheprasov/php-redis-lock"> cheprasov/php-redis-lock </a> (PHP library for locks). </li> <li> <a href="https://github.com/rtckit/reactphp-redlock"> rtckit/react-redlock </a> (Async PHP implementation). </li> <li> <a href="https://github.com/go-redsync/redsync"> Redsync </a> (Go implementation). </li> <li> <a href="https://github.com/mrniko/redisson"> Redisson </a> (Java implementation). </li> <li> <a href="https://github.com/sbertrang/redis-distlock"> Redis::DistLock </a> (Perl implementation). </li> <li> <a href="https://github.com/jacket-code/redlock-cpp"> Redlock-cpp </a> (C++ implementation). </li> <li> <a href="https://github.com/sewenew/redis-plus-plus/#redlock"> Redis-plus-plus </a> (C++ implementation). </li> <li> <a href="https://github.com/kidfashion/redlock-cs"> Redlock-cs </a> (C#/.NET implementation). </li> <li> <a href="https://github.com/samcook/RedLock.net"> RedLock.net </a> (C#/.NET implementation). Includes async and lock extension support. </li> <li> <a href="https://github.com/psibernetic/scarletlock"> ScarletLock </a> (C# .NET implementation with configurable datastore). </li> <li> <a href="https://github.com/LiZhenNet/Redlock4Net"> Redlock4Net </a> (C# .NET implementation). </li> <li> <a href="https://github.com/mike-marcacci/node-redlock"> node-redlock </a> (NodeJS implementation). Includes support for lock extension. </li> <li> <a href="https://github.com/oslabs-beta/Deno-Redlock"> Deno DLM </a> (Deno implementation) </li> <li> <a href="https://github.com/hexcowboy/rslock"> Rslock </a> (Rust implementation). Includes async and lock extension support. </li> </ul> <h2 id="safety-and-liveness-guarantees"> Safety and Liveness Guarantees </h2> <p> We are going to model our design with just three properties that, from our point of view, are the minimum guarantees needed to use distributed locks in an effective way. </p> <ol> <li> Safety property: Mutual exclusion. At any given moment, only one client can hold a lock. </li> <li> Liveness property A: Deadlock free. Eventually it is always possible to acquire a lock, even if the client that locked a resource crashes or gets partitioned. </li> <li> Liveness property B: Fault tolerance. As long as the majority of Redis nodes are up, clients are able to acquire and release locks. </li> </ol> <h2 id="why-failover-based-implementations-are-not-enough"> Why Failover-based Implementations Are Not Enough </h2> <p> To understand what we want to improve, let’s analyze the current state of affairs with most Redis-based distributed lock libraries. </p> <p> The simplest way to use Redis to lock a resource is to create a key in an instance. The key is usually created with a limited time to live, using the Redis expires feature, so that eventually it will get released (property 2 in our list). When the client needs to release the resource, it deletes the key. </p> <p> Superficially this works well, but there is a problem: this is a single point of failure in our architecture. What happens if the Redis master goes down? Well, let’s add a replica! And use it if the master is unavailable. This is unfortunately not viable. By doing so we can’t implement our safety property of mutual exclusion, because Redis replication is asynchronous. </p> <p> There is a race condition with this model: </p> <ol> <li> Client A acquires the lock in the master. </li> <li> The master crashes before the write to the key is transmitted to the replica. </li> <li> The replica gets promoted to master. </li> <li> Client B acquires the lock to the same resource A already holds a lock for. <strong> SAFETY VIOLATION! </strong> </li> </ol> <p> Sometimes it is perfectly fine that, under special circumstances, for example during a failure, multiple clients can hold the lock at the same time. If this is the case, you can use your replication based solution. Otherwise we suggest to implement the solution described in this document. </p> <h2 id="correct-implementation-with-a-single-instance"> Correct Implementation with a Single Instance </h2> <p> Before trying to overcome the limitation of the single instance setup described above, let’s check how to do it correctly in this simple case, since this is actually a viable solution in applications where a race condition from time to time is acceptable, and because locking into a single instance is the foundation we’ll use for the distributed algorithm described here. </p> <p> To acquire the lock, the way to go is the following: </p> <pre><code> SET resource_name my_random_value NX PX 30000 </code></pre> <p> The command will set the key only if it does not already exist ( <code> NX </code> option), with an expire of 30000 milliseconds ( <code> PX </code> option). The key is set to a value β€œmy_random_value”. This value must be unique across all clients and all lock requests. </p> <p> Basically the random value is used in order to release the lock in a safe way, with a script that tells Redis: remove the key only if it exists and the value stored at the key is exactly the one I expect to be. This is accomplished by the following Lua script: </p> <pre><code>if redis.call("get",KEYS[1]) == ARGV[1] then return redis.call("del",KEYS[1]) else return 0 end </code></pre> <p> This is important in order to avoid removing a lock that was created by another client. For example a client may acquire the lock, get blocked performing some operation for longer than the lock validity time (the time at which the key will expire), and later remove the lock, that was already acquired by some other client. Using just <a href="/docs/latest/commands/del/"> <code> DEL </code> </a> is not safe as a client may remove another client's lock. With the above script instead every lock is β€œsigned” with a random string, so the lock will be removed only if it is still the one that was set by the client trying to remove it. </p> <p> What should this random string be? We assume it’s 20 bytes from <code> /dev/urandom </code> , but you can find cheaper ways to make it unique enough for your tasks. For example a safe pick is to seed RC4 with <code> /dev/urandom </code> , and generate a pseudo random stream from that. A simpler solution is to use a UNIX timestamp with microsecond precision, concatenating the timestamp with a client ID. It is not as safe, but probably sufficient for most environments. </p> <p> The "lock validity time" is the time we use as the key's time to live. It is both the auto release time, and the time the client has in order to perform the operation required before another client may be able to acquire the lock again, without technically violating the mutual exclusion guarantee, which is only limited to a given window of time from the moment the lock is acquired. </p> <p> So now we have a good way to acquire and release the lock. With this system, reasoning about a non-distributed system composed of a single, always available, instance, is safe. Let’s extend the concept to a distributed system where we don’t have such guarantees. </p> <h2 id="the-redlock-algorithm"> The Redlock Algorithm </h2> <p> In the distributed version of the algorithm we assume we have N Redis masters. Those nodes are totally independent, so we don’t use replication or any other implicit coordination system. We already described how to acquire and release the lock safely in a single instance. We take for granted that the algorithm will use this method to acquire and release the lock in a single instance. In our examples we set N=5, which is a reasonable value, so we need to run 5 Redis masters on different computers or virtual machines in order to ensure that they’ll fail in a mostly independent way. </p> <p> In order to acquire the lock, the client performs the following operations: </p> <ol> <li> It gets the current time in milliseconds. </li> <li> It tries to acquire the lock in all the N instances sequentially, using the same key name and random value in all the instances. During step 2, when setting the lock in each instance, the client uses a timeout which is small compared to the total lock auto-release time in order to acquire it. For example if the auto-release time is 10 seconds, the timeout could be in the ~ 5-50 milliseconds range. This prevents the client from remaining blocked for a long time trying to talk with a Redis node which is down: if an instance is not available, we should try to talk with the next instance ASAP. </li> <li> The client computes how much time elapsed in order to acquire the lock, by subtracting from the current time the timestamp obtained in step 1. If and only if the client was able to acquire the lock in the majority of the instances (at least 3), and the total time elapsed to acquire the lock is less than lock validity time, the lock is considered to be acquired. </li> <li> If the lock was acquired, its validity time is considered to be the initial validity time minus the time elapsed, as computed in step 3. </li> <li> If the client failed to acquire the lock for some reason (either it was not able to lock N/2+1 instances or the validity time is negative), it will try to unlock all the instances (even the instances it believed it was not able to lock). </li> </ol> <h3 id="is-the-algorithm-asynchronous"> Is the Algorithm Asynchronous? </h3> <p> The algorithm relies on the assumption that while there is no synchronized clock across the processes, the local time in every process updates at approximately at the same rate, with a small margin of error compared to the auto-release time of the lock. This assumption closely resembles a real-world computer: every computer has a local clock and we can usually rely on different computers to have a clock drift which is small. </p> <p> At this point we need to better specify our mutual exclusion rule: it is guaranteed only as long as the client holding the lock terminates its work within the lock validity time (as obtained in step 3), minus some time (just a few milliseconds in order to compensate for clock drift between processes). </p> <p> This paper contains more information about similar systems requiring a bound <em> clock drift </em> : <a href="http://dl.acm.org/citation.cfm?id=74870"> Leases: an efficient fault-tolerant mechanism for distributed file cache consistency </a> . </p> <h3 id="retry-on-failure"> Retry on Failure </h3> <p> When a client is unable to acquire the lock, it should try again after a random delay in order to try to desynchronize multiple clients trying to acquire the lock for the same resource at the same time (this may result in a split brain condition where nobody wins). Also the faster a client tries to acquire the lock in the majority of Redis instances, the smaller the window for a split brain condition (and the need for a retry), so ideally the client should try to send the <a href="/docs/latest/commands/set/"> <code> SET </code> </a> commands to the N instances at the same time using multiplexing. </p> <p> It is worth stressing how important it is for clients that fail to acquire the majority of locks, to release the (partially) acquired locks ASAP, so that there is no need to wait for key expiry in order for the lock to be acquired again (however if a network partition happens and the client is no longer able to communicate with the Redis instances, there is an availability penalty to pay as it waits for key expiration). </p> <h3 id="releasing-the-lock"> Releasing the Lock </h3> <p> Releasing the lock is simple, and can be performed whether or not the client believes it was able to successfully lock a given instance. </p> <h3 id="safety-arguments"> Safety Arguments </h3> <p> Is the algorithm safe? Let's examine what happens in different scenarios. </p> <p> To start let’s assume that a client is able to acquire the lock in the majority of instances. All the instances will contain a key with the same time to live. However, the key was set at different times, so the keys will also expire at different times. But if the first key was set at worst at time T1 (the time we sample before contacting the first server) and the last key was set at worst at time T2 (the time we obtained the reply from the last server), we are sure that the first key to expire in the set will exist for at least <code> MIN_VALIDITY=TTL-(T2-T1)-CLOCK_DRIFT </code> . All the other keys will expire later, so we are sure that the keys will be simultaneously set for at least this time. </p> <p> During the time that the majority of keys are set, another client will not be able to acquire the lock, since N/2+1 SET NX operations can’t succeed if N/2+1 keys already exist. So if a lock was acquired, it is not possible to re-acquire it at the same time (violating the mutual exclusion property). </p> <p> However we want to also make sure that multiple clients trying to acquire the lock at the same time can’t simultaneously succeed. </p> <p> If a client locked the majority of instances using a time near, or greater, than the lock maximum validity time (the TTL we use for SET basically), it will consider the lock invalid and will unlock the instances, so we only need to consider the case where a client was able to lock the majority of instances in a time which is less than the validity time. In this case for the argument already expressed above, for <code> MIN_VALIDITY </code> no client should be able to re-acquire the lock. So multiple clients will be able to lock N/2+1 instances at the same time (with "time" being the end of Step 2) only when the time to lock the majority was greater than the TTL time, making the lock invalid. </p> <h3 id="liveness-arguments"> Liveness Arguments </h3> <p> The system liveness is based on three main features: </p> <ol> <li> The auto release of the lock (since keys expire): eventually keys are available again to be locked. </li> <li> The fact that clients, usually, will cooperate removing the locks when the lock was not acquired, or when the lock was acquired and the work terminated, making it likely that we don’t have to wait for keys to expire to re-acquire the lock. </li> <li> The fact that when a client needs to retry a lock, it waits a time which is comparably greater than the time needed to acquire the majority of locks, in order to probabilistically make split brain conditions during resource contention unlikely. </li> </ol> <p> However, we pay an availability penalty equal to <a href="/docs/latest/commands/ttl/"> <code> TTL </code> </a> time on network partitions, so if there are continuous partitions, we can pay this penalty indefinitely. This happens every time a client acquires a lock and gets partitioned away before being able to remove the lock. </p> <p> Basically if there are infinite continuous network partitions, the system may become not available for an infinite amount of time. </p> <h3 id="performance-crash-recovery-and-fsync"> Performance, Crash Recovery and fsync </h3> <p> Many users using Redis as a lock server need high performance in terms of both latency to acquire and release a lock, and number of acquire / release operations that it is possible to perform per second. In order to meet this requirement, the strategy to talk with the N Redis servers to reduce latency is definitely multiplexing (putting the socket in non-blocking mode, send all the commands, and read all the commands later, assuming that the RTT between the client and each instance is similar). </p> <p> However there is another consideration around persistence if we want to target a crash-recovery system model. </p> <p> Basically to see the problem here, let’s assume we configure Redis without persistence at all. A client acquires the lock in 3 of 5 instances. One of the instances where the client was able to acquire the lock is restarted, at this point there are again 3 instances that we can lock for the same resource, and another client can lock it again, violating the safety property of exclusivity of lock. </p> <p> If we enable AOF persistence, things will improve quite a bit. For example we can upgrade a server by sending it a <a href="/docs/latest/commands/shutdown/"> <code> SHUTDOWN </code> </a> command and restarting it. Because Redis expires are semantically implemented so that time still elapses when the server is off, all our requirements are fine. However everything is fine as long as it is a clean shutdown. What about a power outage? If Redis is configured, as by default, to fsync on disk every second, it is possible that after a restart our key is missing. In theory, if we want to guarantee the lock safety in the face of any kind of instance restart, we need to enable <code> fsync=always </code> in the persistence settings. This will affect performance due to the additional sync overhead. </p> <p> However things are better than they look like at a first glance. Basically, the algorithm safety is retained as long as when an instance restarts after a crash, it no longer participates to any <strong> currently active </strong> lock. This means that the set of currently active locks when the instance restarts were all obtained by locking instances other than the one which is rejoining the system. </p> <p> To guarantee this we just need to make an instance, after a crash, unavailable for at least a bit more than the max <a href="/docs/latest/commands/ttl/"> <code> TTL </code> </a> we use. This is the time needed for all the keys about the locks that existed when the instance crashed to become invalid and be automatically released. </p> <p> Using <em> delayed restarts </em> it is basically possible to achieve safety even without any kind of Redis persistence available, however note that this may translate into an availability penalty. For example if a majority of instances crash, the system will become globally unavailable for <a href="/docs/latest/commands/ttl/"> <code> TTL </code> </a> (here globally means that no resource at all will be lockable during this time). </p> <h3 id="making-the-algorithm-more-reliable-extending-the-lock"> Making the algorithm more reliable: Extending the lock </h3> <p> If the work performed by clients consists of small steps, it is possible to use smaller lock validity times by default, and extend the algorithm implementing a lock extension mechanism. Basically the client, if in the middle of the computation while the lock validity is approaching a low value, may extend the lock by sending a Lua script to all the instances that extends the TTL of the key if the key exists and its value is still the random value the client assigned when the lock was acquired. </p> <p> The client should only consider the lock re-acquired if it was able to extend the lock into the majority of instances, and within the validity time (basically the algorithm to use is very similar to the one used when acquiring the lock). </p> <p> However this does not technically change the algorithm, so the maximum number of lock reacquisition attempts should be limited, otherwise one of the liveness properties is violated. </p> <h3 id="disclaimer-about-consistency"> Disclaimer about consistency </h3> <p> Please consider thoroughly reviewing the <a href="#analysis-of-redlock"> Analysis of Redlock </a> section at the end of this page. Martin Kleppman's article and antirez's answer to it are very relevant. If you are concerned about consistency and correctness, you should pay attention to the following topics: </p> <ol> <li> You should implement fencing tokens. This is especially important for processes that can take significant time and applies to any distributed locking system. Extending locks' lifetime is also an option, but donΒ΄t assume that a lock is retained as long as the process that had acquired it is alive. </li> <li> Redis is not using monotonic clock for TTL expiration mechanism. That means that a wall-clock shift may result in a lock being acquired by more than one process. Even though the problem can be mitigated by preventing admins from manually setting the server's time and setting up NTP properly, there's still a chance of this issue occurring in real life and compromising consistency. </li> </ol> <h2 id="want-to-help"> Want to help? </h2> <p> If you are into distributed systems, it would be great to have your opinion / analysis. Also reference implementations in other languages could be great. </p> <p> Thanks in advance! </p> <h2 id="analysis-of-redlock"> Analysis of Redlock </h2> <hr/> <ol> <li> Martin Kleppmann <a href="http://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html"> analyzed Redlock here </a> . A counterpoint to this analysis can be <a href="http://antirez.com/news/101"> found here </a> . </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/use/patterns/distributed-locks/"/> <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/quickstarts/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise Software quickstarts </h1> <p class="text-lg -mt-5 mb-10"> Follow these quickstarts to try out Redis Enterprise Software. </p> <p> Try out Redis Enterprise Software using one of the following quickstarts: </p> <ul> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart/"> Redis Enterprise Software quickstart </a> </p> </li> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/quickstarts/docker-quickstart/"> Docker quickstart for Redis Enterprise Software </a> </p> </li> </ul> <p> Additional quickstart guides are available to help you: </p> <ul> <li> <p> Set up a <a href="/docs/latest/operate/rs/databases/auto-tiering/quickstart/"> Auto Tiering cluster </a> to optimize memory resources. </p> </li> <li> <p> Set up an <a href="/docs/latest/operate/rs/databases/active-active/get-started/"> Active-Active cluster </a> to enable high availability. </p> </li> <li> <p> <a href="/docs/latest/operate/rs/clusters/optimize/memtier-benchmark/"> Benchmark </a> Redis Enterprise Software performance. </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/quickstarts/"/> <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/api/examples/create-database/.html
<section class="prose w-full py-12 max-w-none"> <h1> Create and manage databases </h1> <p class="text-lg -mt-5 mb-10"> This article describes how to create and manage a database using <code> cURL </code> commands. </p> <p> You can use the Redis Cloud REST API to create databases. </p> <p> These examples use the <a href="/docs/latest/operate/rc/api/get-started/use-rest-api/#use-the-curl-http-client"> <code> cURL </code> utility </a> . You can use any REST client to work with the Redis Cloud REST API. The examples in this article refer to Redis Cloud Pro databases. </p> <h2 id="create-a-database"> Create a database </h2> <p> To create a database, use <code> POST /subscriptions/{subscription-id}/databases </code> </p> <p> The database is created in an existing or a newly created subscription. </p> <p> When a subscription is created, it is created with at least one database. </p> <p> You can add databases to the subscription; you can also update or delete existing databases. </p> <p> Creating a database is an <a href="/docs/latest/operate/rc/api/get-started/process-lifecycle/"> asynchronous operation </a> . </p> <p> The following API call creates a database. </p> <div class="highlight"> <pre class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">POST <span class="s2">"https://[host]/v1/subscriptions/</span><span class="nv">$SUBSCRIPTION_ID</span><span class="s2">/databases"</span> </span></span><span class="line"><span class="cl"><span class="o">{</span> </span></span><span class="line"><span class="cl"> <span class="s2">"name"</span>: <span class="s2">"Database-example-basic"</span>, </span></span><span class="line"><span class="cl"> <span class="s2">"memoryLimitInGb"</span>: 10, </span></span><span class="line"><span class="cl"> <span class="s2">"password"</span>: <span class="s2">"P@ssw0rd"</span> </span></span><span class="line"><span class="cl"><span class="o">}</span> </span></span></code></pre> </div> <p> The JSON body contains only the most basic, required parameters in order to create a database: </p> <ul> <li> Database name - A unique name per subscription that can contain only alphanumeric characters and hyphens </li> <li> Maximum database size in GB </li> <li> Database password </li> </ul> <h3 id="additional-database-parameters"> Additional database parameters </h3> <p> There are many additional parameters and settings that can be defined on database creation: </p> <ul> <li> Review the database parameters and options in the <a href="https://api.redislabs.com/v1/swagger-ui.html#/Databases"> Swagger OpenAPI documentation </a> . </li> <li> Select <code> POST Create database </code> . </li> <li> Under <code> Database definition </code> , click on the <code> Model </code> options. </li> </ul> <a href="/docs/latest/images/rv/api/swagger-database-create-documentation.png" sdata-lightbox="/images/rv/api/swagger-database-create-documentation.png"> <img src="/docs/latest/images/rv/api/swagger-database-create-documentation.png"/> </a> <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/api/examples/create-database/"/> <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/cli-utilities/crdb-cli/task/.html
<section class="prose w-full py-12 max-w-none"> <h1> crdb-cli task commands </h1> <p class="text-lg -mt-5 mb-10"> Manage Active-Active tasks. </p> <p> The <code> crdb-cli task </code> commands help investigate Active-Active database performance issues. They should not be used except as directed by Support. </p> <h2 id="crdb-cli-task-commands"> <code> crdb-cli task </code> commands </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/7.4/references/cli-utilities/crdb-cli/task/cancel/"> cancel </a> </td> <td style="text-align:left"> Attempts to cancel a specified Active-Active database task. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/crdb-cli/task/list/"> list </a> </td> <td style="text-align:left"> Lists active and recent Active-Active database tasks. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/crdb-cli/task/status/"> status </a> </td> <td style="text-align:left"> Shows the status of a specified Active-Active database task. </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/cli-utilities/crdb-cli/task/"/> <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/data-transformation/transformation-examples/.html
<section class="prose w-full py-12 max-w-none"> <h1> Write-behind transformation examples </h1> <p class="text-lg -mt-5 mb-10"> See examples of write-behind transform job configurations </p> <nav> <a href="/docs/latest/integrate/write-behind/data-transformation/transformation-examples/foreach-example/"> Write-behind foreach example </a> <br/> <br/> <a href="/docs/latest/integrate/write-behind/data-transformation/transformation-examples/write-behind-to-redis-example/"> Write-behind to Redis Enterprise target example </a> <br/> <br/> </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/write-behind/data-transformation/transformation-examples/"/> <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/.html
<section class="prose w-full py-12 max-w-none"> <h1> Manage AWS cloud accounts </h1> <p class="text-lg -mt-5 mb-10"> Describes how to provision your Redis Cloud subscription to use existing cloud provider accounts. </p> <div class="banner-article rounded-md"> <p> Self-managed AWS accounts are deprecated, so this article has been archived. </p> </div> <p> Many customers use cloud provider accounts provisioned and maintained by Redis. </p> <p> Customers with existing Amazon Web Services (AWS) accounts can provision their Redis Cloud Pro subscriptions to use their existing AWS accounts. </p> <p> To do so, you associate your existing AWS account as a <em> cloud account </em> for your subscription. This requires setting up and entering credentials that enable monitoring, maintenance, and technical support of your subscription. </p> <p> To do this, you need: </p> <ol> <li> A programmatic user with an access key and a secret access key for that user. </li> <li> A console role that allows administrative access to the cloud account. </li> </ol> <p> These resources need to exist before adding the cloud account to your subscription. To learn more, see <a href="/docs/latest/operate/rc/cloud-integrations/aws-cloud-accounts/iam-resources/"> Create IAM resources </a> . </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> <p> Once an AWS account has been configured as a cloud account, you must <em> not </em> : </p> <ul> <li> Manually change the configuration of required resources, such as security groups <br/> </li> <li> Manually suspend or stop (terminate) provisioned resources <br/> </li> </ul> </div> </div> <h2 id="view-cloud-account-settings"> View cloud account settings </h2> <p> To create or edit a cloud account in Redis Cloud: </p> <ol> <li> <p> Sign in to the <a href="https://cloud.redis.io/"> Redis Cloud console </a> and then select the target subscription. </p> </li> <li> <p> From the console menu, select <strong> Account Settings </strong> and then select the <strong> Cloud Account </strong> tab. </p> <p> This displays a list of cloud accounts associated with your Redis Cloud subscription. </p> <a href="/docs/latest/images/rc/account-settings-cloud-account-tab.png" sdata-lightbox="/images/rc/account-settings-cloud-account-tab.png"> <img alt="Use the Cloud Account tab of the Account Settings screen to define cloud accounts for your Redis Cloud subscription." src="/docs/latest/images/rc/account-settings-cloud-account-tab.png" width="75%"/> </a> </li> </ol> <p> The <strong> Cloud account </strong> tab lets you manage cloud accounts associated with your Redis Cloud subscription. </p> <p> The <strong> Cloud Account </strong> tab is not available (or supported) for Redis Cloud Essentials subscriptions. If you do not see a <strong> Cloud Account </strong> tab on the Account Settings page, verify that you have selected a Redis Cloud Essentials subscription. </p> <h2 id="add-a-new-cloud-account"> Add a new cloud account </h2> <p> To add a new cloud account to your Redis Cloud subscription, select the <strong> Add </strong> button from the Cloud Account tab of the Account Settings screen. </p> <a href="/docs/latest/images/rc/icon-cloud-account-add.png" sdata-lightbox="/images/rc/icon-cloud-account-add.png"> <img alt="Use the Add button to add new cloud accounts to your Redis Cloud subscription." src="/docs/latest/images/rc/icon-cloud-account-add.png" width="36px"/> </a> <p> This displays the <strong> Add cloud account </strong> dialog </p> <a href="/docs/latest/images/rc/account-settings-prompt-add-cloud-account.png" sdata-lightbox="/images/rc/account-settings-prompt-add-cloud-account.png"> <img alt="Use the Add cloud account prompt to enter the details of the cloud account." src="/docs/latest/images/rc/account-settings-prompt-add-cloud-account.png" width="50%"/> </a> <p> Each of the following fields are required. </p> <table> <thead> <tr> <th> Setting </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <em> Account name </em> </td> <td> A descriptive name for your cloud account settings </td> </tr> <tr> <td> <em> AWSΒ accessΒ key </em> </td> <td> The AWS access key for the programmatic user created to support your cloud account settings </td> </tr> <tr> <td> <em> AWSΒ secretΒ key </em> </td> <td> The AWS secret key for the programmatic user created to support your cloud account settings </td> </tr> <tr> <td> <em> IAM role name </em> </td> <td> The name of the AWS console role with access to the AWS console </td> </tr> </tbody> </table> <p> Use the <strong> Add account </strong> button to save your cloud account details. </p> <a href="/docs/latest/images/rc/button-cloud-account-add.png" sdata-lightbox="/images/rc/button-cloud-account-add.png"> <img alt="Use the Add account button to save the details of your new cloud account." src="/docs/latest/images/rc/button-cloud-account-add.png" width="140px"/> </a> <p> Be sure to create the resources before adding the cloud account to your subscription, as they're used to verify access to the cloud account. The details can be saved only after access is verified. </p> <p> When problems occur, an information icon appears and the field is highlighted in red. When this happens, the icon includes a tooltip that explains the issue. </p> <a href="/docs/latest/images/rc/account-settings-prompt-cloud-account-error.png" sdata-lightbox="/images/rc/account-settings-prompt-cloud-account-error.png"> <img alt="When errors occur, the field is highlighted in red and a notification icon appears. The icon tooltip describes the problem." src="/docs/latest/images/rc/account-settings-prompt-cloud-account-error.png" width="50%"/> </a> <p> If the <strong> Add account </strong> button is inactive, verify that: </p> <ul> <li> You've specified all field values correctly </li> <li> The resources exist in your AWS account </li> <li> Each resource provides the required level of access </li> </ul> <p> For help, see <a href="/docs/latest/operate/rc/cloud-integrations/aws-cloud-accounts/iam-resources/"> Create IAM resources </a> . </p> <h2 id="edit-cloud-account-details"> Edit cloud account details </h2> <p> To update the details of a cloud account associated with your Redis Cloud subscription, select the cloud account from the <strong> Cloud account </strong> tab and then select the <strong> Edit </strong> button. </p> <a href="/docs/latest/images/rc/icon-cloud-account-edit.png" sdata-lightbox="/images/rc/icon-cloud-account-edit.png"> <img alt="Use the Edit button to update cloud account details." src="/docs/latest/images/rc/icon-cloud-account-edit.png" width="36px"/> </a> <p> This displays the <strong> Edit cloud account </strong> dialog: </p> <a href="/docs/latest/images/rc/account-settings-prompt-edit-cloud-account.png" sdata-lightbox="/images/rc/account-settings-prompt-edit-cloud-account.png"> <img alt="Use the Edit cloud account prompt to update the details of the cloud account." src="/docs/latest/images/rc/account-settings-prompt-edit-cloud-account.png" width="50%"/> </a> <table> <thead> <tr> <th> Setting </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <em> Account name </em> </td> <td> A descriptive name for your cloud account settings </td> </tr> <tr> <td> <em> AWS access key </em> </td> <td> The AWS access key for the programmatic user created to support your cloud account settings </td> </tr> <tr> <td> <em> AWS secret key </em> </td> <td> The AWS secret key for the programmatic user created to support your cloud account settings </td> </tr> <tr> <td> <nobr> <em> AWS console username </em> </nobr> </td> <td> The username for the AWS console </td> </tr> <tr> <td> <em> AWS console password </em> </td> <td> The password for AWS console access </td> </tr> </tbody> </table> <p> Use the <strong> Update account </strong> button to save your changes. </p> <a href="/docs/latest/images/rc/button-cloud-account-update.png" sdata-lightbox="/images/rc/button-cloud-account-update.png"> <img alt="Use the Update account button to save the updated cloud account details." src="/docs/latest/images/rc/button-cloud-account-update.png" width="140px"/> </a> <h2 id="delete-cloud-account-details"> Delete cloud account details </h2> <p> To remove a cloud account from your Redis cloud subscription, select the cloud account from the <strong> Cloud account </strong> tab and then select the <strong> Delete </strong> button. </p> <a href="/docs/latest/images/rc/icon-cloud-account-delete.png" sdata-lightbox="/images/rc/icon-cloud-account-delete.png"> <img alt="Use the Delete button to remove cloud account details." src="/docs/latest/images/rc/icon-cloud-account-delete.png" width="36px"/> </a> <h2 id="dedicated-iam-resources"> Dedicated IAM resources </h2> <p> We strongly recommend using dedicated identity and access management (IAM) resources to manage your AWS cloud accounts. These resources should not be shared with any other task, account, or process. </p> <p> To learn more, see <a href="/docs/latest/operate/rc/cloud-integrations/aws-cloud-accounts/iam-resources/"> Create IAM resources for AWS cloud accounts </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/rc/cloud-integrations/aws-cloud-accounts/"/> <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/.html
<section class="prose w-full py-12 max-w-none"> <h1> Install, set up, and upgrade Redis Enterprise Software </h1> <p class="text-lg -mt-5 mb-10"> Learn how to install, set up, and upgrade Redis Enterprise Software. </p> <p> You can run self-managed Redis Enterprise Software in an on-premises data center or on your preferred cloud platform. </p> <p> If you prefer a fully managed Redis database-as-a-service, available on major public cloud services, consider setting up a <a href="/docs/latest/operate/rc/"> Redis Cloud </a> subscription. You can <a href="https://redis.io/try-free/"> try Redis Cloud </a> for free. </p> <h2 id="quickstarts"> Quickstarts </h2> <p> If you want to try out Redis Enterprise Software, see the following quickstarts: </p> <ul> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart/"> Redis Enterprise Software quickstart </a> </p> </li> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/quickstarts/docker-quickstart/"> Docker quickstart for Redis Enterprise Software </a> </p> </li> </ul> <h2 id="install-redis-enterprise-software"> Install Redis Enterprise Software </h2> <p> To install Redis Enterprise Software on a <a href="/docs/latest/operate/rs/installing-upgrading/install/plan-deployment/supported-platforms/"> supported platform </a> , you need to: </p> <ol> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/install/plan-deployment/"> Plan your deployment </a> . </p> </li> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/install/prepare-install/"> Prepare to install </a> . </p> </li> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/install/"> Perform the install </a> . </p> </li> </ol> <p> Depending on your needs, you may also want to <a href="#more-info-and-options"> customize the installation </a> . </p> <h2 id="upgrade-existing-deployment"> Upgrade existing deployment </h2> <p> If you already installed Redis Enterprise Software, you can: </p> <ul> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/upgrading/upgrade-cluster/"> Upgrade a cluster </a> </p> </li> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/upgrading/upgrade-database/"> Upgrade a database </a> </p> </li> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/upgrading/upgrade-active-active/"> Upgrade an Active-Active database </a> </p> </li> </ul> <h2 id="uninstall-redis-enterprise-software"> Uninstall Redis Enterprise Software </h2> <ul> <li> <a href="/docs/latest/operate/rs/installing-upgrading/uninstalling/"> Uninstall existing deployment </a> </li> </ul> <h2 id="more-info-and-options"> More info and options </h2> <p> More information is available to help with customization and related questions: </p> <ul> <li> <a href="/docs/latest/operate/rs/installing-upgrading/configuring/centos-rhel-firewall/"> CentOS/RHEL firewall configuration </a> </li> <li> <a href="/docs/latest/operate/rs/installing-upgrading/configuring/change-location-socket-files/"> Change socket file location </a> </li> <li> <a href="/docs/latest/operate/rs/networking/cluster-dns/"> Cluster DNS configuration </a> </li> <li> <a href="/docs/latest/operate/rs/networking/cluster-lba-setup/"> Cluster load balancer setup </a> </li> <li> <a href="/docs/latest/operate/rs/installing-upgrading/install/plan-deployment/file-locations/"> File locations </a> </li> <li> <a href="/docs/latest/operate/rs/installing-upgrading/configuring/linux-swap/"> Linux swap space configuration </a> </li> <li> <a href="/docs/latest/operate/rs/networking/mdns/"> mDNS client prerequisites </a> </li> <li> <a href="/docs/latest/operate/rs/installing-upgrading/install/customize-user-and-group/"> User and group ownership </a> </li> </ul> <h2 id="next-steps"> Next steps </h2> <p> After you install Redis Enterprise Software and set up your cluster, you can: </p> <ul> <li> <p> <a href="/docs/latest/operate/rs/security/access-control/create-users/"> Add users </a> to the cluster with specific permissions. To begin, start with <a href="/docs/latest/operate/rs/security/access-control/"> Access control </a> . </p> </li> <li> <p> <a href="/docs/latest/operate/rs/databases/create/"> Create databases </a> to use with your applications. </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/"/> <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/subscriptions/maintenance/.html
<section class="prose w-full py-12 max-w-none"> <h1> Subscription and database maintenance </h1> <p class="text-lg -mt-5 mb-10"> Describes maintenance that Redis performs on a Redis Cloud subscription. </p> <p> Redis will maintain your Redis Cloud subscriptions and databases as needed to ensure your databases are running the most stable and up-to-date version of Redis. </p> <h2 id="maintenance-windows"> Maintenance windows </h2> <p> Maintenance windows define when Redis can perform maintenance on your subscriptions and databases. Maintenance window options depend on your subscription type. </p> <h3 id="redis-cloud-pro"> Redis Cloud Pro </h3> <p> For Redis Cloud Pro plans, Redis will perform maintenance automatically while limiting service disruption as much as possible. If you want to control when we can perform maintenance for a Redis Cloud Pro subscription, you can <a href="/docs/latest/operate/rc/subscriptions/maintenance/set-maintenance-windows/#set-manual-maintenance-windows"> set manual maintenance windows </a> . </p> <h3 id="redis-cloud-essentials"> Redis Cloud Essentials </h3> <p> Redis Cloud Essentials databases have a set maintenance window based on the cloud provider region. The maintenance window for Redis Cloud Essentials databases is <strong> daily from 12 AM to 6 AM </strong> in the region's local time zone. We won't use more than one maintenance window per week unless we need to do <a href="/docs/latest/operate/rc/subscriptions/maintenance/#urgent-maintenance"> urgent maintenance </a> , and we won't perform any maintenance that introduces breaking changes during these maintenance windows. </p> <h2 id="maintenance-activities"> Maintenance activities </h2> <p> During maintenance, Redis ensures the stability of your subscriptions and databases. </p> <p> This includes, but is not limited to: </p> <ul> <li> Upgrading Redis or an advanced capability to the latest version </li> <li> Cluster optimization </li> <li> Replacing a cluster node </li> <li> Adding more memory to a node </li> <li> Applying security patches </li> </ul> <p> Redis will notify users by email when maintenance starts and ends. For more details, see <a href="#notifications"> Notifications </a> . </p> <p> During maintenance, your database will be operational, but you may notice some latency when connecting to your databases. </p> <p> Your application may also disconnect from your database for a few seconds. Most Redis clients are set to refresh their DNS address when they reconnect to the database, and you will not be required to perform any further action. If you encounter connectivity problems for more than a minute during maintenance, please refresh your DNS entries. </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"> Tip: </div> To make sure your applications are set to reconnect after maintenance activity, see <a href="/docs/latest/operate/rc/resilient-apps/"> Develop highly available and resilient apps with Redis Cloud </a> . </div> </div> <h3 id="urgent-maintenance"> Urgent maintenance </h3> <p> Urgent maintenance refers to any activity that could affect service and cannot wait for scheduling. This includes applying urgent security patches. </p> <p> Redis can perform urgent maintenance at any time, even if you have set a manual maintenance window or have temporarily <a href="/docs/latest/operate/rc/subscriptions/maintenance/set-maintenance-windows/#skip-maintenance-temporarily"> skipped maintenance </a> . Redis will notify you by email when urgent maintenance starts and ends. </p> <h3 id="major-upgrades"> Major upgrades </h3> <p> We won't schedule major upgrades or upgrades that might include breaking changes until you opt-in to those changes. You can control your Redis major version on the <a href="/docs/latest/operate/rc/subscriptions/view-pro-subscription/"> subscription page </a> . </p> <h2 id="notifications"> Notifications </h2> <p> Redis will notify you by email when maintenance starts and ends. If Redis needs an action from you to start maintenance, we will notify you with a reasonable amount of time before planned maintenance. </p> <p> If you want to receive maintenance notifications by email: </p> <ol> <li> <p> Go to <a href="/docs/latest/operate/rc/security/access-control/access-management/"> Access Management </a> and select your account in the list. </p> </li> <li> <p> Select the Edit button. </p> <a href="/docs/latest/images/rc/icon-access-management-edit-user.png" sdata-lightbox="/images/rc/icon-access-management-edit-user.png"> <img alt="Use the Edit button change details for a team member." src="/docs/latest/images/rc/icon-access-management-edit-user.png" width="30px"/> </a> </li> <li> <p> Select <strong> Operational emails </strong> if it is not already turned on. </p> <a href="/docs/latest/images/rc/access-mgmt-edit-user-dialog.png" sdata-lightbox="/images/rc/access-mgmt-edit-user-dialog.png"> <img alt="Use the Edit User dialog to change the details for a user" src="/docs/latest/images/rc/access-mgmt-edit-user-dialog.png" width="50%"/> </a> </li> <li> <p> Select <strong> Save user </strong> to save your changes. </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/subscriptions/maintenance/"/> <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/certificates/.html
<section class="prose w-full py-12 max-w-none"> <h1> Cluster certificates requests </h1> <p class="text-lg -mt-5 mb-10"> Cluster certificates requests </p> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#get-cluster-certificates"> GET </a> </td> <td> <code> /v1/cluster/certificates </code> </td> <td> Get cluster certificates </td> </tr> <tr> <td> <a href="#put-cluster-update_cert"> PUT </a> </td> <td> <code> /v1/cluster/update_cert </code> </td> <td> Update a cluster certificate </td> </tr> <tr> <td> <a href="#delete-cluster-certificate"> DELETE </a> </td> <td> <code> /v1/cluster/certificates/{certificate_name} </code> </td> <td> Delete cluster certificate </td> </tr> </tbody> </table> <h2 id="get-cluster-certificates"> Get cluster certificates </h2> <pre><code>GET /v1/cluster/certificates </code></pre> <p> Get the cluster's certificates. </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_info"> view_cluster_info </a> </td> </tr> </tbody> </table> <h3 id="get-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <pre><code>GET /cluster/certificates </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> <h3 id="get-response"> Response </h3> <p> Returns a JSON object that contains the cluster's certificates and keys. </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">"api_cert"</span><span class="p">:</span> <span class="s2">"-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"api_key"</span><span class="p">:</span> <span class="s2">"-----BEGIN RSA PRIVATE KEY-----...-----END RSA PRIVATE KEY-----"</span> </span></span><span class="line"><span class="cl"> <span class="s2">"// additional certificates..."</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> </tbody> </table> <h2 id="put-cluster-update_cert"> Update cluster certificate </h2> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">PUT /v1/cluster/update_cert </span></span></code></pre> </div> <p> Replaces an existing certificate on all nodes within the cluster with a new certificate. The new certificate must pass validation before it can replace the old certificate. </p> <p> See the <a href="/docs/latest/operate/rs/7.4/security/certificates/"> certificates table </a> for the list of cluster certificates and their descriptions. </p> <h3 id="put-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">PUT /cluster/update_cert </span></span></code></pre> </div> <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">"name"</span><span class="p">:</span> <span class="s2">"certificate1"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"key"</span><span class="p">:</span> <span class="s2">"-----BEGIN RSA PRIVATE KEY-----\n[key_content]\n-----END RSA PRIVATE KEY-----"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"certificate"</span><span class="p">:</span> <span class="s2">"-----BEGIN CERTIFICATE-----\n[cert_content]\n-----END CERTIFICATE-----"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <p> Replace <code> [key_content] </code> with the content of the private key and <code> [cert_content] </code> with the content of the certificate. </p> <h3 id="put-response"> Response </h3> <p> Responds with the <code> 200 OK </code> status code if the certificate replacement succeeds across the entire cluster. </p> <p> Otherwise, retry the certificate update in case the failure was due to a temporary issue in the cluster. </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> No error </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1"> 400 Bad Request </a> </td> <td> Failed, invalid certificate. </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4"> 403 Forbidden </a> </td> <td> Failed, unknown certificate. </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5"> 404 Not Found </a> </td> <td> Failed, invalid certificate. </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7"> 406 Not Acceptable </a> </td> <td> Failed, expired certificate. </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10"> 409 Conflict </a> </td> <td> Failed, not all nodes have been updated. </td> </tr> </tbody> </table> <h2 id="delete-cluster-certificate"> Delete cluster certificate </h2> <pre><code>DELETE /v1/cluster/certificates/{string: certificate_name} </code></pre> <p> Removes the specified cluster certificate from both CCS and disk across all nodes. Only optional certificates can be deleted through this endpoint. See the <a href="/docs/latest/operate/rs/7.4/security/certificates/"> certificates table </a> for the list of cluster certificates and their descriptions. </p> <h3 id="delete-request"> Request </h3> <h4 id="example-http-request-2"> Example HTTP request </h4> <pre><code>DELETE /cluster/certificates/&lt;certificate_name&gt; </code></pre> <h4 id="request-headers-1"> 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> <h3 id="delete-response"> Response </h3> <p> Returns a status code that indicates the certificate deletion success or failure. </p> <h3 id="delete-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> Operation successful </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5"> 404 Not Found </a> </td> <td> Failed, requested deletion of an unknown certificate </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4"> 403 Forbidden </a> </td> <td> Failed, requested deletion of a required certificate </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, error while deleting certificate from disk </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/certificates/"/> <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.range.html
<section class="prose w-full py-12"> <h1 class="command-name"> TS.RANGE </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">TS.RANGE key fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS ts...] [FILTER_BY_VALUE min max] [COUNT count] [[ALIGN align] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]] </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+k) where n = Number of data points, m = Chunk size (data points per chunk), k = Number of data points that are in the requested range </dd> </dl> <p> Query a range in forward direction </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> fromTimestamp </code> </summary> <p> is start timestamp for the range query (integer Unix timestamp in milliseconds) or <code> - </code> to denote the timestamp of the earliest sample in the time series. </p> </details> <details open=""> <summary> <code> toTimestamp </code> </summary> <p> is end timestamp for the range query (integer Unix timestamp in milliseconds) or <code> + </code> to denote the timestamp of the latest sample in the time series. </p> <p> <note> <b> Note: </b> When the time series is a compaction, the last compacted value may aggregate raw values with timestamp beyond <code> toTimestamp </code> . That is because <code> toTimestamp </code> only limits the timestamp of the compacted value, which is the start time of the raw bucket that was compacted. </note> </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.RANGE 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.RANGE 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> <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> COUNT count </code> </summary> <p> When used without <code> AGGREGATION </code> : limits the number of reported samples. </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> <code> align </code> 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> 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 the maximum and the 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> <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> , <a href="/docs/latest/develop/reference/protocol-spec/#simple-strings"> Simple string reply </a> ) pairs representing (timestamp, value(double)) </li> <li> [] (e.g., on invalid filter value) </li> </ul> <h2 id="complexity"> Complexity </h2> <p> TS.RANGE complexity can be improved in the future by using binary search to find the start of the range, which makes this <code> O(Log(n/m)+k*m) </code> . But, because <code> m </code> is small, you can disregard it and look at the operation as <code> O(Log(n)+k) </code> . </p> <h2 id="examples"> Examples </h2> <details open=""> <summary> <b> Filter results by timestamp or sample value </b> </summary> <p> Consider a metric where acceptable values are between -100 and 100, and the value 9999 is used as an indication of bad measurement. </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">1000</span> <span class="m">30</span> temp:TLV <span class="m">1010</span> <span class="m">35</span> temp:TLV <span class="m">1020</span> <span class="m">9999</span> temp:TLV <span class="m">1030</span> <span class="m">40</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">1030</span></span></span></code></pre> </div> <p> Now, retrieve all values except out-of-range values. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">TS.RANGE temp:TLV - + FILTER_BY_VALUE -100 <span class="m">100</span> </span></span><span class="line"><span class="cl">1<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">30</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">35</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">1030</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">40</span></span></span></code></pre> </div> <p> Now, retrieve the average value, while ignoring out-of-range values. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">TS.RANGE temp:TLV - + FILTER_BY_VALUE -100 <span class="m">100</span> AGGREGATION avg <span class="m">1000</span> </span></span><span class="line"><span class="cl">1<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">35</span></span></span></code></pre> </div> </details> <details open=""> <summary> <b> Align aggregation buckets </b> </summary> <p> To demonstrate alignment, let’s create a stock and add 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.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: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: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></code></pre> </div> <p> Next, aggregate without using <code> ALIGN </code> , defaulting to alignment 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.RANGE stock:A - + AGGREGATION min <span class="m">20</span> </span></span><span class="line"><span class="cl">1<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">100</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">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">3<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1040</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">4<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1060</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">300</span> </span></span><span class="line"><span class="cl">5<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">1080</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">320</span></span></span></code></pre> </div> <p> And now set <code> ALIGN </code> to 10 to have a bucket start at time 10, and align all the buckets with a 20 milliseconds duration. </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.RANGE stock:A - + ALIGN <span class="m">10</span> AGGREGATION min <span class="m">20</span> </span></span><span class="line"><span class="cl">1<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">990</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">100</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">1990</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">200</span> </span></span><span class="line"><span class="cl">4<span class="o">)</span> 1<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"> 2<span class="o">)</span> <span class="m">210</span> </span></span><span class="line"><span class="cl">5<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">2990</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">300</span> </span></span><span class="line"><span class="cl">6<span class="o">)</span> 1<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"> 2<span class="o">)</span> <span class="m">310</span></span></span></code></pre> </div> <p> When the start timestamp for the range query is explicitly stated (not <code> - </code> ), you can set <code> ALIGN </code> to that time by setting align to <code> - </code> or to <code> start </code> . </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.RANGE stock:A <span class="m">5</span> + ALIGN - AGGREGATION min <span class="m">20</span> </span></span><span class="line"><span class="cl">1<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">985</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">100</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">1005</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">1985</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">200</span> </span></span><span class="line"><span class="cl">4<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">2005</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">5<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">2985</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">300</span> </span></span><span class="line"><span class="cl">6<span class="o">)</span> 1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">3005</span> </span></span><span class="line"><span class="cl"> 2<span class="o">)</span> <span class="m">310</span></span></span></code></pre> </div> <p> Similarly, when the end timestamp for the range query is explicitly stated, you can set <code> ALIGN </code> to that time by setting align to <code> + </code> or to <code> end </code> . </p> </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.revrange/"> <code> TS.REVRANGE </code> </a> | <a href="/docs/latest/commands/ts.mrevrange/"> <code> TS.MREVRANGE </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.range/"/> <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/creategearsbuilder/.html
<section class="prose w-full py-12 max-w-none"> <h1> CreateGearsBuilder </h1> <p class="text-lg -mt-5 mb-10"> Creates a new GearsBuilder object. </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="kd">static</span> <span class="o">&lt;</span><span class="n">I</span> <span class="kd">extends</span> <span class="n">java</span><span class="o">.</span><span class="na">io</span><span class="o">.</span><span class="na">Serializable</span><span class="o">&gt;</span> <span class="n">GearsBuilder</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span> <span class="n">CreateGearsBuilder</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">readers</span><span class="o">.</span><span class="na">BaseReader</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span> <span class="n">reader</span><span class="o">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="kd">public</span> <span class="kd">static</span> <span class="o">&lt;</span><span class="n">I</span> <span class="kd">extends</span> <span class="n">java</span><span class="o">.</span><span class="na">io</span><span class="o">.</span><span class="na">Serializable</span><span class="o">&gt;</span> <span class="n">GearsBuilder</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span> <span class="n">CreateGearsBuilder</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">readers</span><span class="o">.</span><span class="na">BaseReader</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span> <span class="n">reader</span><span class="o">,</span> </span></span><span class="line"><span class="cl"> <span class="n">java</span><span class="o">.</span><span class="na">lang</span><span class="o">.</span><span class="na">String</span> <span class="n">desc</span><span class="o">)</span> </span></span></code></pre> </div> <p> Creates a new <code> GearsBuilder </code> object. Use this function instead of a <code> GearsBuilder </code> constructor to avoid type warnings. </p> <h2 id="parameters"> Parameters </h2> <p> Type Parameters: </p> <table> <thead> <tr> <th> Name </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> I </td> <td> The template type of the returned builder. The reader determines the type. </td> </tr> </tbody> </table> <p> Parameters: </p> <table> <thead> <tr> <th> Name </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> desc </td> <td> string </td> <td> The description </td> </tr> <tr> <td> reader </td> <td> BaseReader <i> </i> </td> <td> The pipe reader </td> </tr> </tbody> </table> <h2 id="returns"> Returns </h2> <p> Returns a new GearsBuilder object. </p> <h2 id="example"> Example </h2> <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></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/creategearsbuilder/"/> <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/pubsub-shardchannels/.html
<section class="prose w-full py-12"> <h1 class="command-name"> PUBSUB SHARDCHANNELS </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">PUBSUB SHARDCHANNELS [pattern]</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 active shard channels, and assuming constant time pattern matching (relatively short shard channels). </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> Lists the currently <em> active shard channels </em> . </p> <p> An active shard channel is a Pub/Sub shard channel with one or more subscribers. </p> <p> If no <code> pattern </code> is specified, all the channels are listed, otherwise if pattern is specified only channels matching the specified glob-style pattern are listed. </p> <p> The information returned about the active shard channels are at the shard level and not at the cluster level. </p> <h2 id="examples"> Examples </h2> <pre tabindex="0"><code>&gt; PUBSUB SHARDCHANNELS 1) "orders" &gt; PUBSUB SHARDCHANNELS o* 1) "orders" </code></pre> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#arrays"> Array reply </a> : a list of active channels, optionally matching the specified pattern. <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/pubsub-shardchannels/"/> <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-create/.html
<section class="prose w-full py-12 max-w-none"> <h1> redis-di create </h1> <p class="text-lg -mt-5 mb-10"> Creates the Write-behind Database instance </p> <h2 id="usage"> Usage </h2> <pre tabindex="0"><code>Usage: redis-di create [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> silent </code> : </p> <ul> <li> Type: BOOL </li> <li> Default: <code> false </code> </li> <li> Usage: <code> --silent </code> </li> </ul> <p> Silent install. Do not prompt to enter missing parameters </p> </li> <li> <p> <code> no_configure </code> : </p> <ul> <li> Type: BOOL </li> <li> Default: <code> false </code> </li> <li> Usage: <code> --no-configure </code> </li> </ul> <p> Do not install Write-behind Engine to the Write-behind Database </p> </li> <li> <p> <code> cluster_host </code> (REQUIRED): </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --cluster-host </code> </li> </ul> <p> Host/IP of Redis Enterprise Cluster (service name in case of k8s) </p> </li> <li> <p> <code> cluster_api_port </code> (REQUIRED): </p> <ul> <li> Type: &lt;IntRange 1000&lt;=x&lt;=65535&gt; </li> <li> Default: <code> 9443 </code> </li> <li> Usage: <code> --cluster-api-port </code> </li> </ul> <p> API Port of Redis Enterprise Cluster </p> </li> <li> <p> <code> cluster_user </code> (REQUIRED): </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --cluster-user </code> </li> </ul> <p> Redis Enterprise Cluster username with either DB Member, Cluster Member or Cluster Admin roles </p> </li> <li> <p> <code> cluster_password </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --cluster-password </code> </li> </ul> <p> Redis Enterprise Cluster Password </p> </li> <li> <p> <code> rdi_port </code> : </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 for the new Write-behind Database </p> </li> <li> <p> <code> rdi_password </code> : </p> <ul> <li> Type: STRING </li> <li> Default: `` </li> <li> Usage: <code> --rdi-password </code> </li> </ul> <p> Password for the new Write-behind Database (alphanumeric characters with zero or more of the following: ! &amp; # $ ^ &lt; &gt; -) </p> </li> <li> <p> <code> rdi_memory </code> : </p> <ul> <li> Type: <intrange x=""> =30&gt; </intrange> </li> <li> Default: <code> 100 </code> </li> <li> Usage: <code> --rdi-memory </code> </li> </ul> <p> Memory for Write-behind Database (in MB) </p> </li> <li> <p> <code> rdi_shards </code> : </p> <ul> <li> Type: <intrange x=""> =1&gt; </intrange> </li> <li> Default: <code> 1 </code> </li> <li> Usage: <code> --rdi-shards </code> </li> </ul> <p> Number of database server-side shards </p> </li> <li> <p> <code> replication </code> : </p> <ul> <li> Type: BOOL </li> <li> Default: <code> false </code> </li> <li> Usage: <code> --replication </code> </li> </ul> <p> In-memory database replication </p> </li> <li> <p> <code> redisgears_module </code> : </p> <ul> <li> Type: STRING </li> <li> Default: `` </li> <li> Usage: <code> --redisgears-module </code> </li> </ul> <p> RedisGears module file </p> </li> <li> <p> <code> with_rejson </code> : </p> <ul> <li> Type: BOOL </li> <li> Default: <code> false </code> </li> <li> Usage: <code> --with-rejson </code> </li> </ul> <p> Include ReJSON in the Write-behind Database </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 create [OPTIONS] Creates the Write-behind Database instance Options: -log-level, --loglevel [DEBUG|INFO|WARN|ERROR|CRITICAL] [default: INFO] --silent Silent install. Do not prompt to enter missing parameters --no-configure Do not install Write-behind Engine to the Write-behind Database --cluster-host TEXT Host/IP of Redis Enterprise Cluster (service name in case of k8s) [required] --cluster-api-port INTEGER RANGE API Port of Redis Enterprise Cluster [default: 9443; 1000&lt;=x&lt;=65535; required] --cluster-user TEXT Redis Enterprise Cluster username with either DB Member, Cluster Member or Cluster Admin roles [required] --cluster-password TEXT Redis Enterprise Cluster Password --rdi-port INTEGER RANGE Port for the new Write-behind Database [1000&lt;=x&lt;=65535] --rdi-password TEXT Password for the new Write-behind Database (alphanumeric characters with zero or more of the following: ! &amp; # $ ^ &lt; &gt; -) --rdi-memory INTEGER RANGE Memory for Write-behind Database (in MB) [x&gt;=30] --rdi-shards INTEGER RANGE Number of database server-side shards [x&gt;=1] --replication In-memory database replication --redisgears-module TEXT RedisGears module file --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-create/"/> <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/json.forget.html
<section class="prose w-full py-12"> <h1 class="command-name"> JSON.FORGET </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">JSON.FORGET key [path]</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/json"> JSON 1.0.0 </a> </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(N) when path is evaluated to a single value where N is the size of the deleted value, O(N) when path is evaluated to multiple values, where N is the size of the key </dd> </dl> <p> See <a href="/docs/latest/commands/json.del/"> <code> JSON.DEL </code> </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/json.forget/"/> <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/april-2024/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Cloud changelog (April 2024) </h1> <p class="text-lg -mt-5 mb-10"> New features, enhancements, and other changes added to Redis Cloud during April 2024. </p> <h2 id="new-features"> New features </h2> <h3 id="nano-billing-unit"> Nano billing unit </h3> <p> We added a Nano billing unit for Pro databases with a maximum size of 500 MB and a maximum throughput of 500 ops/sec. Use it to create smaller databases for a lower cost. </p> <h3 id="essentials-subscriptions-through-aws-marketplace"> Essentials subscriptions through AWS Marketplace </h3> <p> You can now use your <a href="/docs/latest/operate/rc/cloud-integrations/gcp-marketplace/"> AWS Marketplace </a> account to pay for your Essentials subscriptions as well as your Pro subscriptions. </p> <h2 id="enhancements"> Enhancements </h2> <h3 id="search-and-query-throughput-in-opssec"> Search and query throughput in ops/sec </h3> <p> You can now set the throughput for databases with Search and query in operations per second (ops/sec), like all other Redis databases. This will let you seamlessly scale your query workload in and out as needed. </p> <h2 id="deprecations"> Deprecations </h2> <ul> <li> Setting throughput by <code> number-of-shards </code> is now deprecated for the <code> POST /v1/subscriptions/{subscriptionId}/databases </code> REST API endpoint and will be removed soon. We recommend changing the throughput measurement to <code> operations-per-second </code> when you create databases using the Redis Cloud API. </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/april-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/commands/tdigest.rank/.html
<section class="prose w-full py-12"> <h1 class="command-name"> TDIGEST.RANK </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">TDIGEST.RANK key value [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/probabilistic"> Bloom 2.4.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 values specified. </dd> </dl> <p> Returns, for each input value (floating-point), the estimated rank of the value (the number of observations in the sketch that are smaller than the value + half the number of observations that are equal to the value). </p> <p> Multiple ranks can be retrieved in a single call. </p> <h2 id="required-arguments"> Required arguments </h2> <details open=""> <summary> <code> key </code> </summary> is key name for an existing t-digest sketch. </details> <details open=""> <summary> <code> value </code> </summary> is input value for which the rank should be estimated. <h2 id="return-value"> Return value </h2> <p> <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> - an array of integers populated with rank_1, rank_2, ..., rank_V: </p> <ul> <li> -1 - when <code> value </code> is smaller than the value of the smallest observation. </li> <li> The number of observations - when <code> value </code> is larger than the value of the largest observation. </li> <li> Otherwise: an estimation of the number of (observations smaller than <code> value </code> + half the observations equal to <code> value </code> ). </li> </ul> <p> 0 is the rank of the value of the smallest observation. </p> <p> <em> n </em> -1 is the rank of the value of the largest observation; <em> n </em> denotes the number of observations added to the sketch. </p> <p> All values are -2 if the sketch is empty. </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; TDIGEST.CREATE s COMPRESSION <span class="m">1000</span> </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">redis&gt; TDIGEST.ADD s <span class="m">10</span> <span class="m">20</span> <span class="m">30</span> <span class="m">40</span> <span class="m">50</span> <span class="m">60</span> </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">redis&gt; TDIGEST.RANK s <span class="m">0</span> <span class="m">10</span> <span class="m">20</span> <span class="m">30</span> <span class="m">40</span> <span class="m">50</span> <span class="m">60</span> <span class="m">70</span> </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> -1 </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><span class="line"><span class="cl">4<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">2</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">3</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">4</span> </span></span><span class="line"><span class="cl">7<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">5</span> </span></span><span class="line"><span class="cl">8<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> <span class="m">6</span> </span></span><span class="line"><span class="cl">redis&gt; TDIGEST.REVRANK s <span class="m">0</span> <span class="m">10</span> <span class="m">20</span> <span class="m">30</span> <span class="m">40</span> <span class="m">50</span> <span class="m">60</span> <span class="m">70</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">6</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">5</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">4</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">3</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">2</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">1</span> </span></span><span class="line"><span class="cl">7<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">8<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> -1 </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; TDIGEST.CREATE s COMPRESSION <span class="m">1000</span> </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">redis&gt; TDIGEST.ADD s <span class="m">10</span> <span class="m">10</span> <span class="m">10</span> <span class="m">10</span> <span class="m">20</span> <span class="m">20</span> </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">redis&gt; TDIGEST.RANK s <span class="m">10</span> <span class="m">20</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">2</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">5</span> </span></span><span class="line"><span class="cl">redis&gt; TDIGEST.REVRANK s <span class="m">10</span> <span class="m">20</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">4</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> <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/tdigest.rank/"/> <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> </details> </section>
https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors.html
<section class="prose w-full py-12"> <h1> Vectors </h1> <p class="text-lg -mt-5 mb-10"> Learn how to use vector fields and perform vector searches in Redis </p> <p> Redis includes a <a href="https://redis.io/blog/benchmarking-results-for-vector-databases/"> high-performance vector database </a> that lets you perform semantic searches over vector embeddings. You can augment these searches with filtering over text, numerical, geospatial, and tag metadata. </p> <p> To quickly get started, check out the <a href="/docs/latest/develop/get-started/vector-database"> Redis vector quickstart guide </a> and the <a href="https://github.com/redis-developer/redis-ai-resources"> Redis AI Resources </a> Github repo. </p> <h2 id="overview"> Overview </h2> <ol> <li> <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors#create-a-vector-index"> <strong> Create a vector index </strong> </a> : Redis maintains a secondary index over your data with a defined schema (including vector fields and metadata). Redis supports <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors#flat-index"> <code> FLAT </code> </a> and <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors#hnsw-index"> <code> HNSW </code> </a> vector index types. </li> <li> <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors#store-and-update-vectors"> <strong> Store and update vectors </strong> </a> : Redis stores vectors and metadata in hashes or JSON objects. </li> <li> <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors#search-with-vectors"> <strong> Search with vectors </strong> </a> : Redis supports several advanced querying strategies with vector fields including k-nearest neighbor ( <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors#knn-vector-search"> KNN </a> ), <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors#vector-range-queries"> vector range queries </a> , and <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors#filters"> metadata filters </a> . </li> <li> <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors#runtime-query-params"> <strong> Configure vector queries at runtime </strong> </a> . </li> <li> <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors#vector-search-examples"> <strong> Vector search examples </strong> </a> : Explore several vector search examples that cover different use cases and techniques. </li> </ol> <h2 id="create-a-vector-index"> Create a vector index </h2> <p> When you define the schema for an index, you can include one or more vector fields as shown below. </p> <p> <strong> Syntax </strong> </p> <pre tabindex="0"><code>FT.CREATE &lt;index_name&gt; ON &lt;storage_type&gt; PREFIX 1 &lt;key_prefix&gt; SCHEMA ... &lt;field_name&gt; VECTOR &lt;algorithm&gt; &lt;index_attribute_count&gt; &lt;index_attribute_name&gt; &lt;index_attribute_value&gt; [&lt;index_attribute_name&gt; &lt;index_attribute_value&gt; ...] </code></pre> <p> Refer to the full <a href="/docs/latest/develop/interact/search-and-query/indexing/"> indexing </a> documentation for additional fields, options, and noted limitations. </p> <p> <strong> Parameters </strong> </p> <table> <thead> <tr> <th style="text-align:left"> Parameter </th> <th style="text-align:left"> Description </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <code> index_name </code> </td> <td style="text-align:left"> Name of the index. </td> </tr> <tr> <td style="text-align:left"> <code> storage_type </code> </td> <td style="text-align:left"> Storage option ( <code> HASH </code> or <code> JSON </code> ). </td> </tr> <tr> <td style="text-align:left"> <code> prefix </code> (optional) </td> <td style="text-align:left"> Key prefix used to select which keys should be indexed. Defaults to all keys if omitted. </td> </tr> <tr> <td style="text-align:left"> <code> field_name </code> </td> <td style="text-align:left"> Name of the vector field. </td> </tr> <tr> <td style="text-align:left"> <code> algorithm </code> </td> <td style="text-align:left"> Vector index algorithm ( <code> FLAT </code> or <code> HNSW </code> ). </td> </tr> <tr> <td style="text-align:left"> <code> index_attribute_count </code> </td> <td style="text-align:left"> Number of vector field attributes. </td> </tr> <tr> <td style="text-align:left"> <code> index_attribute_name </code> </td> <td style="text-align:left"> Vector field attribute name. </td> </tr> <tr> <td style="text-align:left"> <code> index_attribute_value </code> </td> <td style="text-align:left"> Vector field attribute value. </td> </tr> </tbody> </table> <h3 id="flat-index"> FLAT index </h3> <p> Choose the <code> FLAT </code> index when you have small datasets (&lt; 1M vectors) or when perfect search accuracy is more important than search latency. </p> <p> <strong> Required attributes </strong> </p> <table> <thead> <tr> <th style="text-align:left"> Attribute </th> <th style="text-align:left"> Description </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <code> TYPE </code> </td> <td style="text-align:left"> Vector type ( <code> BFLOAT16 </code> , <code> FLOAT16 </code> , <code> FLOAT32 </code> , <code> FLOAT64 </code> ). <code> BFLOAT16 </code> and <code> FLOAT16 </code> require v2.10 or later. </td> </tr> <tr> <td style="text-align:left"> <code> DIM </code> </td> <td style="text-align:left"> The width, or number of dimensions, of the vector embeddings stored in this field. In other words, the number of floating point elements comprising the vector. <code> DIM </code> must be a positive integer. The vector used to query this field must have the exact dimensions as the field itself. </td> </tr> <tr> <td style="text-align:left"> <code> DISTANCE_METRIC </code> </td> <td style="text-align:left"> Distance metric ( <code> L2 </code> , <code> IP </code> , <code> COSINE </code> ). </td> </tr> </tbody> </table> <p> <strong> Example </strong> </p> <pre tabindex="0"><code>FT.CREATE documents ON HASH PREFIX 1 docs: SCHEMA doc_embedding VECTOR FLAT 6 TYPE FLOAT32 DIM 1536 DISTANCE_METRIC COSINE </code></pre> <p> In the example above, an index named <code> documents </code> is created over hashes with the key prefix <code> docs: </code> and a <code> FLAT </code> vector field named <code> doc_embedding </code> with three index attributes: <code> TYPE </code> , <code> DIM </code> , and <code> DISTANCE_METRIC </code> . </p> <h3 id="hnsw-index"> HNSW index </h3> <p> <code> HNSW </code> , or hierarchical navigable small world, is an approximate nearest neighbors algorithm that uses a multi-layered graph to make vector search more scalable. </p> <ul> <li> The lowest layer contains all data points, and each higher layer contains a subset, forming a hierarchy. </li> <li> At runtime, the search traverses the graph on each layer from top to bottom, finding the local minima before dropping to the subsequent layer. </li> </ul> <p> Choose the <code> HNSW </code> index type when you have larger datasets (&gt; 1M documents) or when search performance and scalability are more important than perfect search accuracy. </p> <p> <strong> Required attributes </strong> </p> <table> <thead> <tr> <th style="text-align:left"> Attribute </th> <th style="text-align:left"> Description </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <code> TYPE </code> </td> <td style="text-align:left"> Vector type ( <code> BFLOAT16 </code> , <code> FLOAT16 </code> , <code> FLOAT32 </code> , <code> FLOAT64 </code> ). <code> BFLOAT16 </code> and <code> FLOAT16 </code> require v2.10 or later. </td> </tr> <tr> <td style="text-align:left"> <code> DIM </code> </td> <td style="text-align:left"> The width, or number of dimensions, of the vector embeddings stored in this field. In other words, the number of floating point elements comprising the vector. <code> DIM </code> must be a positive integer. The vector used to query this field must have the exact dimensions as the field itself. </td> </tr> <tr> <td style="text-align:left"> <code> DISTANCE_METRIC </code> </td> <td style="text-align:left"> Distance metric ( <code> L2 </code> , <code> IP </code> , <code> COSINE </code> ). </td> </tr> </tbody> </table> <p> <strong> Optional attributes </strong> </p> <p> <a href="https://arxiv.org/ftp/arxiv/papers/1603/1603.09320.pdf"> <code> HNSW </code> </a> supports a number of additional parameters to tune the accuracy of the queries, while trading off performance. </p> <table> <thead> <tr> <th style="text-align:left"> Attribute </th> <th style="text-align:left"> Description </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <code> M </code> </td> <td style="text-align:left"> Max number of outgoing edges (connections) for each node in a graph layer. On layer zero, the max number of connections will be <code> 2 * M </code> . Higher values increase accuracy, but also increase memory usage and index build time. The default is 16. </td> </tr> <tr> <td style="text-align:left"> <code> EF_CONSTRUCTION </code> </td> <td style="text-align:left"> Max number of connected neighbors to consider during graph building. Higher values increase accuracy, but also increase index build time. The default is 200. </td> </tr> <tr> <td style="text-align:left"> <code> EF_RUNTIME </code> </td> <td style="text-align:left"> Max top candidates during KNN search. Higher values increase accuracy, but also increase search latency. The default is 10. </td> </tr> <tr> <td style="text-align:left"> <code> EPSILON </code> </td> <td style="text-align:left"> Relative factor that sets the boundaries in which a range query may search for candidates. That is, vector candidates whose distance from the query vector is <code> radius * (1 + EPSILON) </code> are potentially scanned, allowing more extensive search and more accurate results, at the expense of run time. The default is 0.01. </td> </tr> </tbody> </table> <p> <strong> Example </strong> </p> <pre tabindex="0"><code>FT.CREATE documents ON HASH PREFIX 1 docs: SCHEMA doc_embedding VECTOR HNSW 10 TYPE FLOAT64 DIM 1536 DISTANCE_METRIC COSINE M 40 EF_CONSTRUCTION 250 </code></pre> <p> In the example above, an index named <code> documents </code> is created over hashes with the key prefix <code> docs: </code> and an <code> HNSW </code> vector field named <code> doc_embedding </code> with five index attributes: <code> TYPE </code> , <code> DIM </code> , <code> DISTANCE_METRIC </code> , <code> M </code> , and <code> EF_CONSTRUCTION </code> . </p> <h3 id="distance-metrics"> Distance metrics </h3> <p> Redis supports three popular distance metrics to measure the degree of similarity between two vectors <mjx-container class="MathJax CtxtMenu_Attached_0" ctxtmenu_counter="0" jax="CHTML" style="font-size: 120%; position: relative;" tabindex="0"> <mjx-math aria-hidden="true" class="MJX-TEX"> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D462 TEX-I"> </mjx-c> </mjx-mi> </mjx-math> <mjx-assistive-mml display="inline" unselectable="on"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi> u </mi> </math> </mjx-assistive-mml> </mjx-container> , <mjx-container class="MathJax CtxtMenu_Attached_0" ctxtmenu_counter="1" jax="CHTML" style="font-size: 120%; position: relative;" tabindex="0"> <mjx-math aria-hidden="true" class="MJX-TEX"> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D463 TEX-I"> </mjx-c> </mjx-mi> </mjx-math> <mjx-assistive-mml display="inline" unselectable="on"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi> v </mi> </math> </mjx-assistive-mml> </mjx-container> <mjx-container class="MathJax CtxtMenu_Attached_0" ctxtmenu_counter="2" jax="CHTML" style="font-size: 120%; position: relative;" tabindex="0"> <mjx-math aria-hidden="true" class="MJX-TEX"> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c2208"> </mjx-c> </mjx-mo> <mjx-msup space="4"> <mjx-texatom texclass="ORD"> <mjx-mi class="mjx-ds mjx-b"> <mjx-c class="mjx-c211D TEX-A"> </mjx-c> </mjx-mi> </mjx-texatom> <mjx-script style="vertical-align: 0.363em;"> <mjx-mi class="mjx-i" size="s"> <mjx-c class="mjx-c1D45B TEX-I"> </mjx-c> </mjx-mi> </mjx-script> </mjx-msup> </mjx-math> <mjx-assistive-mml display="inline" unselectable="on"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mo> ∈ </mo> <msup> <mrow data-mjx-texclass="ORD"> <mi mathvariant="double-struck"> R </mi> </mrow> <mi> n </mi> </msup> </math> </mjx-assistive-mml> </mjx-container> , where <mjx-container class="MathJax CtxtMenu_Attached_0" ctxtmenu_counter="3" jax="CHTML" style="font-size: 120%; position: relative;" tabindex="0"> <mjx-math aria-hidden="true" class="MJX-TEX"> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D45B TEX-I"> </mjx-c> </mjx-mi> </mjx-math> <mjx-assistive-mml display="inline" unselectable="on"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi> n </mi> </math> </mjx-assistive-mml> </mjx-container> is the length of the vectors: </p> <table> <thead> <tr> <th style="text-align:left"> Distance metric </th> <th style="text-align:left"> Description </th> <th style="text-align:left"> Mathematical representation </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <code> L2 </code> </td> <td style="text-align:left"> Euclidean distance between two vectors. </td> <td style="text-align:left"> <mjx-container class="MathJax CtxtMenu_Attached_0" ctxtmenu_counter="4" jax="CHTML" style="font-size: 119.9%; position: relative;" tabindex="0"> <mjx-math aria-hidden="true" class="MJX-TEX"> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D451 TEX-I"> </mjx-c> </mjx-mi> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c28"> </mjx-c> </mjx-mo> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D462 TEX-I"> </mjx-c> </mjx-mi> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c2C"> </mjx-c> </mjx-mo> <mjx-mi class="mjx-i" space="2"> <mjx-c class="mjx-c1D463 TEX-I"> </mjx-c> </mjx-mi> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c29"> </mjx-c> </mjx-mo> <mjx-mo class="mjx-n" space="4"> <mjx-c class="mjx-c3D"> </mjx-c> </mjx-mo> <mjx-msqrt space="4"> <mjx-sqrt> <mjx-surd> <mjx-mo class="mjx-s4"> <mjx-c class="mjx-c221A TEX-S4"> </mjx-c> </mjx-mo> </mjx-surd> <mjx-box style="padding-top: 0.103em;"> <mjx-mstyle> <mjx-munderover> <mjx-over style="padding-bottom: 0.192em; padding-left: 0.51em;"> <mjx-mi class="mjx-i" size="s"> <mjx-c class="mjx-c1D45B TEX-I"> </mjx-c> </mjx-mi> </mjx-over> <mjx-box> <mjx-munder> <mjx-row> <mjx-base> <mjx-mo class="mjx-lop"> <mjx-c class="mjx-c2211 TEX-S2"> </mjx-c> </mjx-mo> </mjx-base> </mjx-row> <mjx-row> <mjx-under style="padding-top: 0.167em; padding-left: 0.148em;"> <mjx-texatom size="s" texclass="ORD"> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D456 TEX-I"> </mjx-c> </mjx-mi> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c3D"> </mjx-c> </mjx-mo> <mjx-mn class="mjx-n"> <mjx-c class="mjx-c31"> </mjx-c> </mjx-mn> </mjx-texatom> </mjx-under> </mjx-row> </mjx-munder> </mjx-box> </mjx-munderover> <mjx-texatom space="2" texclass="ORD"> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c28"> </mjx-c> </mjx-mo> <mjx-msub> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D462 TEX-I"> </mjx-c> </mjx-mi> <mjx-script style="vertical-align: -0.15em;"> <mjx-mi class="mjx-i" size="s"> <mjx-c class="mjx-c1D456 TEX-I"> </mjx-c> </mjx-mi> </mjx-script> </mjx-msub> <mjx-mo class="mjx-n" space="3"> <mjx-c class="mjx-c2212"> </mjx-c> </mjx-mo> <mjx-msub space="3"> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D463 TEX-I"> </mjx-c> </mjx-mi> <mjx-script style="vertical-align: -0.15em;"> <mjx-mi class="mjx-i" size="s"> <mjx-c class="mjx-c1D456 TEX-I"> </mjx-c> </mjx-mi> </mjx-script> </mjx-msub> <mjx-msup> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c29"> </mjx-c> </mjx-mo> <mjx-script style="vertical-align: 0.413em;"> <mjx-mn class="mjx-n" size="s"> <mjx-c class="mjx-c32"> </mjx-c> </mjx-mn> </mjx-script> </mjx-msup> </mjx-texatom> </mjx-mstyle> </mjx-box> </mjx-sqrt> </mjx-msqrt> </mjx-math> <mjx-assistive-mml display="inline" unselectable="on"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi> d </mi> <mo stretchy="false"> ( </mo> <mi> u </mi> <mo> , </mo> <mi> v </mi> <mo stretchy="false"> ) </mo> <mo> = </mo> <msqrt> <mstyle displaystyle="true" scriptlevel="0"> <munderover> <mo data-mjx-texclass="OP"> βˆ‘ </mo> <mrow data-mjx-texclass="ORD"> <mi> i </mi> <mo> = </mo> <mn> 1 </mn> </mrow> <mi> n </mi> </munderover> <mrow data-mjx-texclass="ORD"> <mo stretchy="false"> ( </mo> <msub> <mi> u </mi> <mi> i </mi> </msub> <mo> βˆ’ </mo> <msub> <mi> v </mi> <mi> i </mi> </msub> <msup> <mo stretchy="false"> ) </mo> <mn> 2 </mn> </msup> </mrow> </mstyle> </msqrt> </math> </mjx-assistive-mml> </mjx-container> </td> </tr> <tr> <td style="text-align:left"> <code> IP </code> </td> <td style="text-align:left"> Inner product of two vectors. </td> <td style="text-align:left"> <mjx-container class="MathJax CtxtMenu_Attached_0" ctxtmenu_counter="5" jax="CHTML" style="font-size: 119.9%; position: relative;" tabindex="0"> <mjx-math aria-hidden="true" class="MJX-TEX"> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D451 TEX-I"> </mjx-c> </mjx-mi> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c28"> </mjx-c> </mjx-mo> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D462 TEX-I"> </mjx-c> </mjx-mi> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c2C"> </mjx-c> </mjx-mo> <mjx-mi class="mjx-i" space="2"> <mjx-c class="mjx-c1D463 TEX-I"> </mjx-c> </mjx-mi> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c29"> </mjx-c> </mjx-mo> <mjx-mo class="mjx-n" space="4"> <mjx-c class="mjx-c3D"> </mjx-c> </mjx-mo> <mjx-mn class="mjx-n" space="4"> <mjx-c class="mjx-c31"> </mjx-c> </mjx-mn> <mjx-mo class="mjx-n" space="3"> <mjx-c class="mjx-c2212"> </mjx-c> </mjx-mo> <mjx-mi class="mjx-i" space="3"> <mjx-c class="mjx-c1D462 TEX-I"> </mjx-c> </mjx-mi> <mjx-mo class="mjx-n" space="3"> <mjx-c class="mjx-c22C5"> </mjx-c> </mjx-mo> <mjx-mi class="mjx-i" space="3"> <mjx-c class="mjx-c1D463 TEX-I"> </mjx-c> </mjx-mi> </mjx-math> <mjx-assistive-mml display="inline" unselectable="on"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi> d </mi> <mo stretchy="false"> ( </mo> <mi> u </mi> <mo> , </mo> <mi> v </mi> <mo stretchy="false"> ) </mo> <mo> = </mo> <mn> 1 </mn> <mo> βˆ’ </mo> <mi> u </mi> <mo> β‹… </mo> <mi> v </mi> </math> </mjx-assistive-mml> </mjx-container> </td> </tr> <tr> <td style="text-align:left"> <code> COSINE </code> </td> <td style="text-align:left"> Cosine distance of two vectors. </td> <td style="text-align:left"> <mjx-container class="MathJax CtxtMenu_Attached_0" ctxtmenu_counter="6" jax="CHTML" style="font-size: 119.9%; position: relative;" tabindex="0"> <mjx-math aria-hidden="true" class="MJX-TEX"> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D451 TEX-I"> </mjx-c> </mjx-mi> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c28"> </mjx-c> </mjx-mo> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D462 TEX-I"> </mjx-c> </mjx-mi> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c2C"> </mjx-c> </mjx-mo> <mjx-mi class="mjx-i" space="2"> <mjx-c class="mjx-c1D463 TEX-I"> </mjx-c> </mjx-mi> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c29"> </mjx-c> </mjx-mo> <mjx-mo class="mjx-n" space="4"> <mjx-c class="mjx-c3D"> </mjx-c> </mjx-mo> <mjx-mn class="mjx-n" space="4"> <mjx-c class="mjx-c31"> </mjx-c> </mjx-mn> <mjx-mo class="mjx-n" space="3"> <mjx-c class="mjx-c2212"> </mjx-c> </mjx-mo> <mjx-mfrac space="3"> <mjx-frac> <mjx-num> <mjx-nstrut> </mjx-nstrut> <mjx-mrow size="s"> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D462 TEX-I"> </mjx-c> </mjx-mi> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c22C5"> </mjx-c> </mjx-mo> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D463 TEX-I"> </mjx-c> </mjx-mi> </mjx-mrow> </mjx-num> <mjx-dbox> <mjx-dtable> <mjx-line> </mjx-line> <mjx-row> <mjx-den> <mjx-dstrut> </mjx-dstrut> <mjx-mrow size="s"> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c2016"> </mjx-c> </mjx-mo> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D462 TEX-I"> </mjx-c> </mjx-mi> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c2016"> </mjx-c> </mjx-mo> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c2016"> </mjx-c> </mjx-mo> <mjx-mi class="mjx-i"> <mjx-c class="mjx-c1D463 TEX-I"> </mjx-c> </mjx-mi> <mjx-mo class="mjx-n"> <mjx-c class="mjx-c2016"> </mjx-c> </mjx-mo> </mjx-mrow> </mjx-den> </mjx-row> </mjx-dtable> </mjx-dbox> </mjx-frac> </mjx-mfrac> </mjx-math> <mjx-assistive-mml display="inline" unselectable="on"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi> d </mi> <mo stretchy="false"> ( </mo> <mi> u </mi> <mo> , </mo> <mi> v </mi> <mo stretchy="false"> ) </mo> <mo> = </mo> <mn> 1 </mn> <mo> βˆ’ </mo> <mfrac> <mrow> <mi> u </mi> <mo> β‹… </mo> <mi> v </mi> </mrow> <mrow> <mo data-mjx-texclass="OPEN" fence="false" stretchy="false"> β€– </mo> <mi> u </mi> <mo data-mjx-texclass="CLOSE" fence="false" stretchy="false"> β€– </mo> <mo data-mjx-texclass="OPEN" fence="false" stretchy="false"> β€– </mo> <mi> v </mi> <mo data-mjx-texclass="CLOSE" fence="false" stretchy="false"> β€– </mo> </mrow> </mfrac> </math> </mjx-assistive-mml> </mjx-container> </td> </tr> </tbody> </table> <p> The above metrics calculate distance between two vectors, where the smaller the value is, the closer the two vectors are in the vector space. </p> <h2 id="store-and-update-vectors"> Store and update vectors </h2> <p> On index creation, the <code> &lt;storage_type&gt; </code> dictates how vector and metadata are structured and loaded into Redis. </p> <h3 id="hash"> Hash </h3> <p> Store or update vectors and any metadata in <a href="/docs/latest/develop/data-types/hashes/"> hashes </a> using the <a href="/docs/latest/commands/hset/"> <code> HSET </code> </a> command. </p> <p> <strong> Example </strong> </p> <pre tabindex="0"><code>HSET docs:01 doc_embedding &lt;vector_bytes&gt; category sports </code></pre> <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"> Tip: </div> Hash values are stored as binary-safe strings. The value <code> &lt;vector_bytes&gt; </code> represents the vector's underlying memory buffer. </div> </div> <p> A common method for converting vectors to bytes uses the <a href="https://redis-py.readthedocs.io/en/stable/examples/search_vector_similarity_examples.html"> redis-py </a> client library and the Python <a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.tobytes.html"> NumPy </a> library. </p> <p> <strong> Example </strong> </p> <div class="highlight"> <pre class="chroma"><code class="language-py" data-lang="py"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span> </span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">redis</span> <span class="kn">import</span> <span class="n">Redis</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">redis_client</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">'localhost'</span><span class="p">,</span> <span class="n">port</span><span class="o">=</span><span class="mi">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 a FLOAT32 vector</span> </span></span><span class="line"><span class="cl"><span class="n">vector</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.34</span><span class="p">,</span> <span class="mf">0.63</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.54</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.69</span><span class="p">,</span> <span class="mf">0.98</span><span class="p">,</span> <span class="mf">0.61</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># Convert vector to bytes</span> </span></span><span class="line"><span class="cl"><span class="n">vector_bytes</span> <span class="o">=</span> <span class="n">vector</span><span class="o">.</span><span class="n">tobytes</span><span class="p">()</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># Use the Redis client to store the vector bytes and metadata at a specified key</span> </span></span><span class="line"><span class="cl"><span class="n">redis_client</span><span class="o">.</span><span class="n">hset</span><span class="p">(</span><span class="s1">'docs:01'</span><span class="p">,</span> <span class="n">mapping</span> <span class="o">=</span> <span class="p">{</span><span class="s2">"vector"</span><span class="p">:</span> <span class="n">vector_bytes</span><span class="p">,</span> <span class="s2">"category"</span><span class="p">:</span> <span class="s2">"sports"</span><span class="p">})</span> </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"> Tip: </div> The vector blob size must match the dimension and float type of the vector field specified in the index's schema; otherwise, indexing will fail. </div> </div> <h3 id="json"> JSON </h3> <p> You can store or update vectors and any associated metadata in <a href="/docs/latest/develop/data-types/json/"> JSON </a> using the <a href="/docs/latest/commands/json.set/"> <code> JSON.SET </code> </a> command. </p> <p> To store vectors in Redis as JSON, you store the vector as a JSON array of floats. Note that this differs from vector storage in Redis hashes, which are instead stored as raw bytes. </p> <p> <strong> Example </strong> </p> <pre tabindex="0"><code>JSON.SET docs:01 $ '{"doc_embedding":[0.34,0.63,-0.54,-0.69,0.98,0.61], "category": "sports"}' </code></pre> <p> One of the benefits of JSON is schema flexibility. As of v2.6.1, JSON supports multi-value indexing. This allows you to index multiple vectors under the same <a href="/docs/latest/develop/data-types/json/path/"> JSONPath </a> . </p> <p> Here are some examples of multi-value indexing with vectors: </p> <p> <strong> Multi-value indexing example </strong> </p> <pre tabindex="0"><code>JSON.SET docs:01 $ '{"doc_embedding":[[1,2,3,4], [5,6,7,8]]}' JSON.SET docs:01 $ '{"chunk1":{"doc_embedding":[1,2,3,4]}, "chunk2":{"doc_embedding":[5,6,7,8]}}' </code></pre> <p> Additional information and examples are available in the <a href="/docs/latest/develop/interact/search-and-query/indexing/#index-json-arrays-as-vector"> Indexing JSON documents </a> section. </p> <h2 id="search-with-vectors"> Search with vectors </h2> <p> You can run vector search queries with the <a href="/docs/latest/commands/ft.search/"> <code> FT.SEARCH </code> </a> or <a href="/docs/latest/commands/ft.aggregate/"> <code> FT.AGGREGATE </code> </a> commands. </p> <p> To issue a vector search query with <code> FT.SEARCH </code> , you must set the <code> DIALECT </code> option to &gt;= <code> 2 </code> . See the <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/dialects/"> dialects documentation </a> for more information. </p> <h3 id="knn-vector-search"> KNN vector search </h3> <p> KNN vector search finds the top k nearest neighbors to a query vector. It has the following syntax: </p> <p> <strong> Syntax </strong> </p> <pre tabindex="0"><code>FT.SEARCH &lt;index_name&gt; &lt;primary_filter_query&gt;=&gt;[KNN &lt;top_k&gt; @&lt;vector_field&gt; $&lt;vector_blob_param&gt; $&lt;vector_query_params&gt; AS &lt;distance_field&gt;] PARAMS &lt;query_params_count&gt; [$&lt;vector_blob_param&gt; &lt;vector_blob&gt; &lt;query_param_name&gt; &lt;query_param_value&gt; ...] SORTBY &lt;distance_field&gt; DIALECT 4 </code></pre> <p> <strong> Parameters </strong> </p> <table> <thead> <tr> <th style="text-align:left"> Parameter </th> <th style="text-align:left"> Description </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <code> index_name </code> </td> <td style="text-align:left"> Name of the index. </td> </tr> <tr> <td style="text-align:left"> <code> primary_filter_query </code> </td> <td style="text-align:left"> <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors#filters"> Filter </a> criteria. Use <code> * </code> when no filters are required. </td> </tr> <tr> <td style="text-align:left"> <code> top_k </code> </td> <td style="text-align:left"> Number of nearest neighbors to fetch from the index. </td> </tr> <tr> <td style="text-align:left"> <code> vector_field </code> </td> <td style="text-align:left"> Name of the vector field to search against. </td> </tr> <tr> <td style="text-align:left"> <code> vector_blob_param </code> </td> <td style="text-align:left"> The query vector, passed in as a blob of raw bytes. The blob's byte size must match the vector field's dimensions and type. </td> </tr> <tr> <td style="text-align:left"> <code> vector_query_params </code> (optional) </td> <td style="text-align:left"> An optional section for marking one or more vector query parameters passed through the <code> PARAMS </code> section. Valid parameters should be provided as key-value pairs. See which <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors#runtime-query-params"> runtime query params </a> are supported for each vector index type. </td> </tr> <tr> <td style="text-align:left"> <code> distance_field </code> (optional) </td> <td style="text-align:left"> The optional distance field name used in the response and/or for sorting. By default, the distance field name is <code> __&lt;vector_field&gt;_score </code> and it can be used for sorting without using <code> AS &lt;distance_field&gt; </code> in the query. </td> </tr> <tr> <td style="text-align:left"> <code> vector_query_params_count </code> </td> <td style="text-align:left"> The number of vector query parameters. </td> </tr> <tr> <td style="text-align:left"> <code> vector_query_param_name </code> </td> <td style="text-align:left"> The name of the vector query parameter. </td> </tr> <tr> <td style="text-align:left"> <code> vector_query_param_value </code> </td> <td style="text-align:left"> The value of the vector query parameter. </td> </tr> </tbody> </table> <p> <strong> Example </strong> </p> <pre tabindex="0"><code>FT.SEARCH documents "*=&gt;[KNN 10 @doc_embedding $BLOB]" PARAMS 2 BLOB "\x12\xa9\xf5\x6c" DIALECT 4 </code></pre> <p> <strong> Use query attributes </strong> </p> <p> Alternatively, as of v2.6, <code> &lt;vector_query_params&gt; </code> and <code> &lt;distance_field&gt; </code> name can be specified in runtime <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/query_syntax/#query-attributes"> query attributes </a> as shown below. </p> <pre tabindex="0"><code>[KNN &lt;top_k&gt; @&lt;vector_field&gt; $&lt;vector_blob_param&gt;]=&gt;{$yield_distance_as: &lt;distance_field&gt;} </code></pre> <h3 id="vector-range-queries"> Vector range queries </h3> <p> Vector range queries allow you to filter the index using a <code> radius </code> parameter representing the semantic distance between an input query vector and indexed vector fields. This is useful in scenarios when you don't know exactly how many nearest ( <code> top_k </code> ) neighbors to fetch, but you do know how similar the results should be. </p> <p> For example, imagine a fraud or anomaly detection scenario where you aren't sure if there are any matches in the vector index. You can issue a vector range query to quickly check if there are any records of interest in the index within the specified radius. </p> <p> Vector range queries operate slightly different than KNN vector queries: </p> <ul> <li> Vector range queries can appear multiple times in a query as filter criteria. </li> <li> Vector range queries can be a part of the <code> &lt;primary_filter_query&gt; </code> in KNN vector search. </li> </ul> <p> <strong> Syntax </strong> </p> <pre tabindex="0"><code>FT.SEARCH &lt;index_name&gt; @&lt;vector_field&gt;:[VECTOR_RANGE (&lt;radius&gt; | $&lt;radius_param&gt;) $&lt;vector_blob_param&gt; $&lt;vector_query_params&gt;] PARAMS &lt;vector_query_params_count&gt; [&lt;vector_query_param_name&gt; &lt;vector_query_param_value&gt; ...] SORTBY &lt;distance_field&gt; DIALECT 4 </code></pre> <table> <thead> <tr> <th style="text-align:left"> Parameter </th> <th style="text-align:left"> Description </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <code> index_name </code> </td> <td style="text-align:left"> Name of the index. </td> </tr> <tr> <td style="text-align:left"> <code> vector_field </code> </td> <td style="text-align:left"> Name of the vector field in the index. </td> </tr> <tr> <td style="text-align:left"> <code> radius </code> or <code> radius_param </code> </td> <td style="text-align:left"> The maximum semantic distance allowed between the query vector and indexed vectors. You can provide the value directly in the query, passed to the <code> PARAMS </code> section, or as a query attribute. </td> </tr> <tr> <td style="text-align:left"> <code> vector_blob_param </code> </td> <td style="text-align:left"> The query vector, passed in as a blob of raw bytes. The blob's byte size must match the vector field's dimensions and type. </td> </tr> <tr> <td style="text-align:left"> <code> vector_query_params </code> (optional) </td> <td style="text-align:left"> An optional section for marking one or more vector query parameters passed through the <code> PARAMS </code> section. Valid parameters should be provided as key-value pairs. See which <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors#runtime-query-params"> runtime query params </a> are supported for each vector index type. </td> </tr> <tr> <td style="text-align:left"> <code> vector_query_params_count </code> </td> <td style="text-align:left"> The number of vector query parameters. </td> </tr> <tr> <td style="text-align:left"> <code> vector_query_param_name </code> </td> <td style="text-align:left"> The name of the vector query parameter. </td> </tr> <tr> <td style="text-align:left"> <code> vector_query_param_value </code> </td> <td style="text-align:left"> The value of the vector query parameter. </td> </tr> </tbody> </table> <p> <strong> Use query attributes </strong> </p> <p> A vector range query clause can be followed by a query attributes section as follows: </p> <pre tabindex="0"><code>@&lt;vector_field&gt;: [VECTOR_RANGE (&lt;radius&gt; | $&lt;radius_param&gt;) $&lt;vector_blob_param&gt;]=&gt;{$&lt;param&gt;: (&lt;value&gt; | $&lt;value_attribute&gt;); ... } </code></pre> <p> where the relevant parameters in that case are <code> $yield_distance_as </code> and <code> $epsilon </code> . Note that there is no default distance field name in range queries. </p> <h3 id="filters"> Filters </h3> <p> Redis supports vector searches that include filters to narrow the search space based on defined criteria. If your index contains searchable fields (for example, <code> TEXT </code> , <code> TAG </code> , <code> NUMERIC </code> , <code> GEO </code> , <code> GEOSHAPE </code> , and <code> VECTOR </code> ), you can perform vector searches with filters. </p> <p> <strong> Supported filter types </strong> </p> <ul> <li> <a href="https://redis.io/docs/develop/interact/search-and-query/query/exact-match/"> Exact match </a> </li> <li> <a href="https://redis.io/docs/develop/interact/search-and-query/query/range/"> Numeric range </a> </li> <li> <a href="https://redis.io/docs/develop/interact/search-and-query/query/full-text/"> Full-text </a> </li> <li> <a href="https://redis.io/docs/develop/interact/search-and-query/query/geo-spatial/"> Geospatial </a> </li> </ul> <p> You can also <a href="https://redis.io/docs/develop/interact/search-and-query/query/combined/"> combine multiple queries </a> as a filter. </p> <p> <strong> Syntax </strong> </p> <p> Vector search queries with filters follow this basic structure: </p> <pre tabindex="0"><code>FT.SEARCH &lt;index_name&gt; &lt;primary_filter_query&gt;=&gt;[...] </code></pre> <p> where <code> &lt;primary_filter_query&gt; </code> defines document selection and filtering. </p> <p> <strong> Example </strong> </p> <pre tabindex="0"><code>FT.SEARCH documents "(@title:Sports @year:[2020 2022])=&gt;[KNN 10 @doc_embedding $BLOB]" PARAMS 2 BLOB "\x12\xa9\xf5\x6c" DIALECT 4 </code></pre> <h3 id="how-filtering-works"> How filtering works </h3> <p> Redis uses internal algorithms to optimize the filtering computation for vector search. The runtime algorithm is determined by heuristics that aim to minimize query latency based on several factors derived from the query and the index. </p> <p> <strong> Batches mode </strong> </p> <p> Batches mode works by paginating through small batches of nearest neighbors from the index: </p> <ul> <li> A batch of high-scoring documents from the vector index is retrieved. These documents are yielded only if the <code> &lt;primary_filter_query&gt; </code> is satisfied. In other words, the document must contain a similar vector and meet the filter criteria. </li> <li> The iterative procedure terminates when <code> &lt;top_k&gt; </code> documents that pass the filter criteria are yielded, or after every vector in the index has been processed. </li> <li> The batch size is determined automatically by heuristics based on <code> &lt;top_k&gt; </code> and the ratio between the expected number of documents in the index that pass the <code> &lt;primary_filter_query&gt; </code> and the vector index size. </li> <li> The goal is to minimize the total number of batches required to get the <code> &lt;top_k&gt; </code> results while preserving the smallest batch size possible. Note that the batch size may change dynamically in each iteration based on the number of results that pass the filter in previous batches. </li> </ul> <p> <strong> Ad-hoc brute force mode </strong> </p> <ul> <li> The score of every vector corresponding to a document that passes the filter is computed, and the <code> &lt;top_k&gt; </code> results are selected and returned. </li> <li> This approach is preferable when the number of documents passing the <code> &lt;primary_filter_query&gt; </code> is relatively small. </li> <li> The results of the KNN query will always be accurate in this mode, even if the underlying vector index algorithm is an approximate one. </li> </ul> <p> The execution mode may switch from batch mode to ad-hoc brute-force mode during the run, based on updated estimations of relevant factors from one batch to another. </p> <h2 id="runtime-query-parameters"> Runtime query parameters </h2> <h3 id="filter-mode"> Filter mode </h3> <p> By default, Redis selects the best filter mode to optimize query execution. You can override the auto-selected policy using these optional parameters: </p> <table> <thead> <tr> <th style="text-align:left"> Parameter </th> <th style="text-align:left"> Description </th> <th style="text-align:left"> Options </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <code> HYBRID_POLICY </code> </td> <td style="text-align:left"> Specifies the filter mode to use during vector search with filters (hybrid). </td> <td style="text-align:left"> <code> BATCHES </code> or <code> ADHOC_BF </code> </td> </tr> <tr> <td style="text-align:left"> <code> BATCH_SIZE </code> </td> <td style="text-align:left"> A fixed batch size to use in every iteration when the <code> BATCHES </code> policy is auto-selected or requested. </td> <td style="text-align:left"> Positive integer. </td> </tr> </tbody> </table> <h3 id="index-specific-query-parameters"> Index-specific query parameters </h3> <p> <strong> FLAT </strong> </p> <p> Currently, there are no runtime parameters available for FLAT indexes. </p> <p> <strong> HNSW </strong> </p> <p> Optional runtime parameters for HNSW indexes are: </p> <table> <thead> <tr> <th style="text-align:left"> Parameter </th> <th style="text-align:left"> Description </th> <th style="text-align:left"> Default value </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <code> EF_RUNTIME </code> </td> <td style="text-align:left"> The maximum number of top candidates to hold during the KNN search. Higher values lead to more accurate results at the expense of a longer query runtime. </td> <td style="text-align:left"> The value passed during index creation. The default is 10. </td> </tr> <tr> <td style="text-align:left"> <code> EPSILON </code> </td> <td style="text-align:left"> The relative factor that sets the boundaries for a vector range query. Vector candidates whose distance from the query vector is <code> radius * (1 + EPSILON) </code> are potentially scanned, allowing a more extensive search and more accurate results at the expense of runtime. </td> <td style="text-align:left"> The value passed during index creation. The default is 0.01. </td> </tr> </tbody> </table> <h3 id="important-notes"> Important notes </h3> <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"> Important notes: </div> <ol> <li> <p> When performing a KNN vector search, you specify <code> &lt;top_k&gt; </code> nearest neighbors. However, the default Redis query <code> LIMIT </code> parameter (used for pagination) is 10. In order to get <code> &lt;top_k&gt; </code> returned results, you must also specify <code> LIMIT 0 &lt;top_k&gt; </code> in your search command. See examples below. </p> </li> <li> <p> By default, the results are sorted by their document's score. To sort by vector similarity score, use <code> SORTBY &lt;distance_field&gt; </code> . See examples below. </p> </li> <li> <p> Depending on your chosen distance metric, the calculated distance between vectors in an index have different bounds. For example, <code> Cosine </code> distance is bounded by <code> 2 </code> , while <code> L2 </code> distance is not bounded. When performing a vector range query, the best practice is to adjust the <code> &lt;radius&gt; </code> parameter based on your use case and required recall or precision metrics. </p> </li> </ol> </div> </div> <h2 id="vector-search-examples"> Vector search examples </h2> <p> Below are a number of examples to help you get started. For more comprehensive walkthroughs, see the <a href="/docs/latest/develop/get-started/vector-database"> Redis vector quickstart guide </a> and the <a href="https://github.com/redis-developer/redis-ai-resources"> Redis AI Resources </a> Github repo. </p> <h3 id="knn-vector-search-examples"> KNN vector search examples </h3> <p> Return the 10 nearest neighbor documents for which the <code> doc_embedding </code> vector field is the closest to the query vector represented by the following 4-byte blob: </p> <pre tabindex="0"><code>FT.SEARCH documents "*=&gt;[KNN 10 @doc_embedding $BLOB]" PARAMS 2 BLOB "\x12\xa9\xf5\x6c" SORTBY __vector_score DIALECT 4 </code></pre> <p> Return the top 10 nearest neighbors and customize the <code> K </code> and <code> EF_RUNTIME </code> parameters using query parameters. See the "Optional arguments" section in <a href="/docs/latest/commands/ft.search"> FT.SEARCH command </a> . Set the <code> EF_RUNTIME </code> value to 150, assuming <code> doc_embedding </code> is an <code> HNSW </code> index: </p> <pre tabindex="0"><code>FT.SEARCH documents "*=&gt;[KNN $K @doc_embedding $BLOB EF_RUNTIME $EF]" PARAMS 6 BLOB "\x12\xa9\xf5\x6c" K 10 EF 150 DIALECT 4 </code></pre> <p> Assign a custom name to the distance field ( <code> vector_distance </code> ) and then sort using that name: </p> <pre tabindex="0"><code>FT.SEARCH documents "*=&gt;[KNN 10 @doc_embedding $BLOB AS vector_distance]" PARAMS 2 BLOB "\x12\xa9\xf5\x6c" SORTBY vector_distance DIALECT 4 </code></pre> <p> Use <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/query_syntax#query-attributes"> query attributes </a> syntax to specify optional parameters and the distance field name: </p> <pre tabindex="0"><code>FT.SEARCH documents "*=&gt;[KNN 10 @doc_embedding $BLOB]=&gt;{$EF_RUNTIME: $EF; $YIELD_DISTANCE_AS: vector_distance}" PARAMS 4 EF 150 BLOB "\x12\xa9\xf5\x6c" SORTBY vector_distance DIALECT 4 </code></pre> <p> To explore additional Python vector search examples, review recipes for the <a href="https://github.com/redis-developer/redis-ai-resources/blob/main/python-recipes/vector-search/00_redispy.ipynb"> <code> Redis Python </code> </a> client library and the <a href="https://github.com/redis-developer/redis-ai-resources/blob/main/python-recipes/vector-search/01_redisvl.ipynb"> <code> Redis Vector Library </code> </a> . </p> <h3 id="filter-examples"> Filter examples </h3> <p> For these examples, assume you created an index named <code> movies </code> with records of different movies and their metadata. </p> <p> Among the movies that have <code> 'Dune' </code> in the <code> title </code> field and <code> year </code> between <code> [2020, 2022] </code> , return the top 10 nearest neighbors, sorted by <code> movie_distance </code> : </p> <pre tabindex="0"><code>FT.SEARCH movies "(@title:Dune @year:[2020 2022])=&gt;[KNN 10 @movie_embedding $BLOB AS movie_distance]" PARAMS 2 BLOB "\x12\xa9\xf5\x6c" SORTBY movie_distance DIALECT 4 </code></pre> <p> Among the movies that have <code> action </code> as a category tag, but not <code> drama </code> , return the top 10 nearest neighbors, sorted by <code> movie_distance </code> : </p> <pre tabindex="0"><code>FT.SEARCH movies "(@category:{action} ~@category:{drama})=&gt;[KNN 10 @doc_embedding $BLOB AS movie_distance]" PARAMS 2 BLOB "\x12\xa9\xf5\x6c" SORTBY movie_distance DIALECT 4 </code></pre> <p> Among the movies that have <code> drama </code> or <code> action </code> as a category tag, return the top 10 nearest neighbors and explicitly set the filter mode (hybrid policy) to "ad-hoc brute force" rather than it being auto-selected: </p> <pre tabindex="0"><code>FT.SEARCH movies "(@category:{drama | action})=&gt;[KNN 10 @doc_embedding $BLOB HYBRID_POLICY ADHOC_BF]" PARAMS 2 BLOB "\x12\xa9\xf5\x6c" SORTBY __vec_score DIALECT 4 </code></pre> <p> Among the movies that have <code> action </code> as a category tag, return the top 10 nearest neighbors and explicitly set the filter mode (hybrid policy) to "batches" and batch size 50 using a query parameter: </p> <pre tabindex="0"><code>FT.SEARCH movies "(@category:{action})=&gt;[KNN 10 @doc_embedding $BLOB HYBRID_POLICY BATCHES BATCH_SIZE $BATCH_SIZE]" PARAMS 4 BLOB "\x12\xa9\xf5\x6c" BATCH_SIZE 50 DIALECT 4 </code></pre> <p> Run the same query as above and use the query attributes syntax to specify optional parameters: </p> <pre tabindex="0"><code>FT.SEARCH movies "(@category:{action})=&gt;[KNN 10 @doc_embedding $BLOB]=&gt;{$HYBRID_POLICY: BATCHES; $BATCH_SIZE: 50}" PARAMS 2 BLOB "\x12\xa9\xf5\x6c" DIALECT 4 </code></pre> <p> To explore additional Python vector search examples, review recipes for the <a href="https://github.com/redis-developer/redis-ai-resources/blob/main/python-recipes/vector-search/00_redispy.ipynb"> <code> Redis Python </code> </a> client library and the <a href="https://github.com/redis-developer/redis-ai-resources/blob/main/python-recipes/vector-search/01_redisvl.ipynb"> <code> Redis Vector Library </code> </a> . </p> <h3 id="range-query-examples"> Range query examples </h3> <p> For these examples, assume you created an index named <code> products </code> with records of different products and metadata from an ecommerce site. </p> <p> Return 100 products for which the distance between the <code> description_vector </code> field and the specified query vector blob is at most 5: </p> <pre tabindex="0"><code>FT.SEARCH products "@description_vector:[VECTOR_RANGE 5 $BLOB]" PARAMS 2 BLOB "\x12\xa9\xf5\x6c" LIMIT 0 100 DIALECT 4 </code></pre> <p> Run the same query as above and set the <code> EPSILON </code> parameter to <code> 0.5 </code> , assuming <code> description_vector </code> is HNSW index, yield the vector distance between <code> description_vector </code> and the query result in a field named <code> vector_distance </code> , and sort the results by that distance. </p> <pre tabindex="0"><code>FT.SEARCH products "@description_vector:[VECTOR_RANGE 5 $BLOB]=&gt;{$EPSILON:0.5; $YIELD_DISTANCE_AS: vector_distance}" PARAMS 2 BLOB "\x12\xa9\xf5\x6c" SORTBY vector_distance LIMIT 0 100 DIALECT 4 </code></pre> <p> Use the vector range query as a filter: return all the documents that contain either <code> 'shirt' </code> in their <code> type </code> tag with their <code> year </code> value in the range <code> [2020, 2022] </code> or a vector stored in <code> description_vector </code> whose distance from the query vector is no more than <code> 0.8 </code> , then sort the results by their vector distance, if it is in the range: </p> <pre tabindex="0"><code>FT.SEARCH products "(@type:{shirt} @year:[2020 2022]) | @description_vector:[VECTOR_RANGE 0.8 $BLOB]=&gt;{$YIELD_DISTANCE_AS: vector_distance}" PARAMS 2 BLOB "\x12\xa9\xf5\x6c" SORTBY vector_distance DIALECT 4 </code></pre> <p> To explore additional Python vector search examples, review recipes for the <a href="https://github.com/redis-developer/redis-ai-resources/blob/main/python-recipes/vector-search/00_redispy.ipynb"> <code> Redis Python </code> </a> client library and the <a href="https://github.com/redis-developer/redis-ai-resources/blob/main/python-recipes/vector-search/01_redisvl.ipynb"> <code> Redis Vector Library </code> </a> . </p> <h2 id="next-steps"> Next steps </h2> <p> Vector embeddings and vector search are not new concepts. Many of the largest companies have used vectors to represent products in ecommerce catalogs or content in advertising pipelines for well over a decade. </p> <p> With the emergence of Large Language Models (LLMs) and the proliferation of applications that require advanced information retrieval techniques, Redis is well positioned to serve as your high performance query engine for semantic search and more. </p> <p> Here are some additonal resources that apply vector search for different use cases: </p> <ul> <li> <a href="https://github.com/redis-developer/redis-ai-resources/blob/main/python-recipes/RAG/01_redisvl.ipynb"> Retrieval augmented generation from scratch </a> </li> <li> <a href="https://github.com/redis-developer/redis-ai-resources/blob/main/python-recipes/semantic-cache/semantic_caching_gemini.ipynb"> Semantic caching </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/develop/interact/search-and-query/advanced-concepts/vectors/"/> <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-flushslots/.html
<section class="prose w-full py-12"> <h1 class="command-name"> CLUSTER FLUSHSLOTS </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">CLUSTER FLUSHSLOTS</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> Deletes all slots from a node. </p> <p> The <code> CLUSTER FLUSHSLOTS </code> deletes all information about slots from the connected node. It can only be called when the database is empty. </p> <h2 id="resp2-reply"> RESP2 Reply </h2> <a href="../../develop/reference/protocol-spec#simple-strings"> Simple string reply </a> : <code> OK </code> <h2 id="resp3-reply"> 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/cluster-flushslots/"/> <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/recipes/write-behind/.html
<section class="prose w-full py-12 max-w-none"> <h1> Write-behind, write-through, and read-through caching </h1> <p class="text-lg -mt-5 mb-10"> Write-behind, write-through, and read-through caching between Redis and other databases (SQL or NoSQL). </p> <p> The <a href="https://github.com/RedisGears/rghibernate"> rghibernate </a> recipe uses RedisGears functions and the <a href="https://hibernate.org/"> Hibernate </a> framework to implement write-behind, write-through, and read-through caching. </p> <p> These caching strategies allow applications to simply connect to a Redis cache layer instead of an underlying database. Whenever the application updates data in the cache, Redis also syncs the data in the backend database. </p> <p> The underlying database could be an SQL database like MySQL, so you will need to provide an XML file that tells rghibernate how to map data between Redis and the other database. </p> <h2 id="differences-from-rgsync"> Differences from RGSync </h2> <p> <a href="https://github.com/RedisGears/rgsync"> RGSync </a> : </p> <ul> <li> Python-based recipe </li> <li> Programmable </li> </ul> <p> <a href="https://github.com/RedisGears/rghibernate"> rghibernate </a> : </p> <ul> <li> Java-based recipe </li> <li> Uses the Hibernate framework </li> <li> Configurable rather than programmable </li> </ul> <h2 id="set-up-write-behind-and-read-through"> Set up write-behind and read-through </h2> <p> To set up write-behind caching, first build an rghibernate JAR and register it with RedisGears. </p> <p> Then, register the following configuration files: </p> <ul> <li> <p> Connector XML: Tells Redis how to connect to the underlying database. </p> </li> <li> <p> Mapping XML: Shows how to map data between the two databases, such as mapping Redis hashes to MySQL tables. </p> </li> </ul> <h3 id="register-rghibernate-jar"> Register rghibernate JAR </h3> <ol> <li> <p> Download the rghibernate JAR from the <a href="https://redis.com/redis-enterprise-software/download-center/modules/"> download center </a> . </p> </li> <li> <p> Upload the JAR to a Redis node. </p> </li> <li> <p> Register rghibernate with RedisGears: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ redis-cli -x RG.JEXECUTE com.redislabs.WriteBehind &lt; <span class="o">{</span>filepath<span class="o">}</span>/rghibernate-0.1.1-jar-with-dependencies.jar </span></span></code></pre> </div> </li> </ol> <h3 id="configure-database-connection"> Configure database connection </h3> <ol> <li> <p> Create a <a href="#connector-xml"> connector XML file </a> with the configuration to connect Redis to an underlying database. </p> </li> <li> <p> Upload the file to a Redis node. </p> </li> <li> <p> Register the connector configuration: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">&gt; redis-cli -x RG.TRIGGER SYNC.REGISTERCONNECTOR mysql <span class="m">1000</span> <span class="m">10</span> <span class="m">5</span> &lt; src/test/resources/mysql_hibernate.cfg.xml </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="s2">"OK"</span> </span></span></code></pre> </div> </li> </ol> <h3 id="configure-data-mapping"> Configure data mapping </h3> <ol> <li> <p> Create a <a href="#mapping-xml"> mapping XML file </a> that defines how Redis maps data to an underlying database. </p> </li> <li> <p> Upload the file to a Redis node. </p> </li> <li> <p> Register the mapping configuration for write-behind: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">&gt; redis-cli -x RG.TRIGGER SYNC.REGISTERSOURCE StudentWrite mysql WriteBehind &lt; src/test/resources/Student.hbm.xml </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="s2">"OK"</span> </span></span></code></pre> </div> </li> <li> <p> Register the same mapping configuration for read-through: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">&gt; redis-cli -x RG.TRIGGER SYNC.REGISTERSOURCE StudentRead mysql ReadThrough <span class="m">0</span> &lt; src/test/resources/Student.hbm.xml </span></span><span class="line"><span class="cl">1<span class="o">)</span> <span class="s2">"OK"</span> </span></span></code></pre> </div> </li> </ol> <h2 id="example-configuration"> Example configuration </h2> <p> Here are some example configuration files for connecting to databases and mapping data. </p> <h3 id="connector-xml"> Connector XML </h3> <p> This configuration file contains connection details for an underlying MySQL database: </p> <div class="highlight"> <pre class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="cp">&lt;!DOCTYPE hibernate-configuration PUBLIC </span></span></span><span class="line"><span class="cl"><span class="cp"> "-//Hibernate/Hibernate Configuration DTD 3.0//EN" </span></span></span><span class="line"><span class="cl"><span class="cp"> "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"&gt;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nt">&lt;hibernate-configuration&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;session-factory&gt;</span> </span></span><span class="line"><span class="cl"> <span class="c">&lt;!-- JDBC Database connection settings --&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"connection.driver_class"</span><span class="nt">&gt;</span>org.mariadb.jdbc.Driver<span class="nt">&lt;/property&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"connection.url"</span><span class="nt">&gt;</span>jdbc:mysql://localhost:3306/test?allowPublicKeyRetrieval=true<span class="ni">&amp;amp;</span>useSSL=false<span class="nt">&lt;/property&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"connection.username"</span><span class="nt">&gt;</span>user<span class="nt">&lt;/property&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"connection.password"</span><span class="nt">&gt;</span>pass<span class="nt">&lt;/property&gt;</span> </span></span><span class="line"><span class="cl"> <span class="c">&lt;!-- JDBC connection pool settings ... using built-in test pool --&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"connection.pool_size"</span><span class="nt">&gt;</span>1<span class="nt">&lt;/property&gt;</span> </span></span><span class="line"><span class="cl"> <span class="c">&lt;!-- Echo the SQL to stdout --&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"show_sql"</span><span class="nt">&gt;</span>false<span class="nt">&lt;/property&gt;</span> </span></span><span class="line"><span class="cl"> <span class="c">&lt;!-- Set the current session context --&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"current_session_context_class"</span><span class="nt">&gt;</span>thread<span class="nt">&lt;/property&gt;</span> </span></span><span class="line"><span class="cl"> <span class="c">&lt;!-- Drop and re-create the database schema on startup --&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"hbm2ddl.auto"</span><span class="nt">&gt;</span>update<span class="nt">&lt;/property&gt;</span> </span></span><span class="line"><span class="cl"> <span class="c">&lt;!-- dbcp connection pool configuration --&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"hibernate.dbcp.initialSize"</span><span class="nt">&gt;</span>5<span class="nt">&lt;/property&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"hibernate.dbcp.maxTotal"</span><span class="nt">&gt;</span>20<span class="nt">&lt;/property&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"hibernate.dbcp.maxIdle"</span><span class="nt">&gt;</span>10<span class="nt">&lt;/property&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"hibernate.dbcp.minIdle"</span><span class="nt">&gt;</span>5<span class="nt">&lt;/property&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"hibernate.dbcp.maxWaitMillis"</span><span class="nt">&gt;</span>-1<span class="nt">&lt;/property&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;/session-factory&gt;</span> </span></span><span class="line"><span class="cl"><span class="nt">&lt;/hibernate-configuration&gt;</span> </span></span></code></pre> </div> <h3 id="mapping-xml"> Mapping XML </h3> <p> The following XML maps Redis hashes, which represent students, to a MySQL table: </p> <div class="highlight"> <pre class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="cp">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span> </span></span><span class="line"><span class="cl"><span class="nt">&lt;hibernate-mapping</span> <span class="na">xmlns=</span><span class="s">"http://www.hibernate.org/xsd/hibernate-mapping"</span> </span></span><span class="line"><span class="cl"> <span class="na">xmlns:xsi=</span><span class="s">"http://www.w3.org/2001/XMLSchema-instance"</span> </span></span><span class="line"><span class="cl"> <span class="na">xsi:schemaLocation=</span><span class="s">"http://www.hibernate.org/xsd/hibernate-mapping </span></span></span><span class="line"><span class="cl"><span class="s"> http://www.hibernate.org/xsd/hibernate-mapping/hibernate-mapping-4.0.xsd"</span><span class="nt">&gt;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;class</span> <span class="na">entity-name=</span><span class="s">"Student"</span> <span class="na">table=</span><span class="s">"student"</span><span class="nt">&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;tuplizer</span> <span class="na">entity-mode=</span><span class="s">"dynamic-map"</span> <span class="na">class=</span><span class="s">"org.hibernate.tuple.entity.DynamicMapEntityTuplizer"</span><span class="nt">/&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;id</span> <span class="na">name=</span><span class="s">"id"</span> <span class="na">type=</span><span class="s">"integer"</span> <span class="na">length=</span><span class="s">"50"</span> <span class="na">column=</span><span class="s">"id"</span><span class="nt">/&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"firstName"</span> <span class="na">column=</span><span class="s">"first_name"</span> <span class="na">type=</span><span class="s">"string"</span><span class="nt">/&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"lastName"</span> <span class="na">column=</span><span class="s">"last_name"</span> <span class="na">type=</span><span class="s">"string"</span><span class="nt">/&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"email"</span> <span class="na">column=</span><span class="s">"email"</span> <span class="na">type=</span><span class="s">"string"</span> <span class="na">not-null=</span><span class="s">"true"</span><span class="nt">/&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">"age"</span> <span class="na">column=</span><span class="s">"age"</span> <span class="na">type=</span><span class="s">"integer"</span><span class="nt">/&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;/class&gt;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nt">&lt;/hibernate-mapping&gt;</span> </span></span></code></pre> </div> <h2 id="commands"> Commands </h2> <p> Run rghibernate commands with <code> RG.TRIGGER </code> : </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">redis-cli RG.TRIGGER SYNC.&lt;COMMAND&gt; </span></span></code></pre> </div> <p> To pass a file to a command like <code> SYNC.REGISTERCONNECTOR </code> or <code> SYNC.REGISTERSOURCE </code> , use the <nobr> <code> redis-cli -x </code> </nobr> option: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">redis-cli -x RG.TRIGGER SYNC.<span class="o">{</span>COMMAND<span class="o">}</span> <span class="o">{</span>arg1 arg2 ...<span class="o">}</span> &lt; <span class="o">{</span>file<span class="o">}</span> </span></span></code></pre> </div> <h3 id="command-list"> Command list </h3> <table> <thead> <tr> <th> Command </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#syncregisterconnector"> SYNC.REGISTERCONNECTOR </a> </td> <td> Register a new connector </td> </tr> <tr> <td> SYNC.UNREGISTERCONNECTOR </td> <td> Unregister a connector (cannot have sources attached) </td> </tr> <tr> <td> <a href="#syncregistersource"> SYNC.REGISTERSOURCE </a> </td> <td> Extra configuration based on policy </td> </tr> <tr> <td> SYNC.UNREGISTERSOURCE </td> <td> Unregister a source </td> </tr> <tr> <td> SYNC.INFO SOURCES </td> <td> Dump all sources </td> </tr> <tr> <td> SYNC.INFO CONNECTORS </td> <td> Dump all connectors </td> </tr> </tbody> </table> <h3 id="syncregisterconnector"> SYNC.REGISTERCONNECTOR </h3> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ redis-cli -x RG.TRIGGER SYNC.REGISTERCONNECTOR <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span> <span class="o">{</span>connector name<span class="o">}</span> <span class="o">{</span>batch size<span class="o">}</span> <span class="o">{</span>timeout<span class="o">}</span> <span class="o">{</span>retry interval<span class="o">}</span> <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span> &lt; <span class="o">{</span>connector xml<span class="o">}</span> </span></span></code></pre> </div> <table> <thead> <tr> <th> Name </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> connector name </td> <td> Name to give to your connector </td> </tr> <tr> <td> batch size </td> <td> The size of the data sent to the backend in batches </td> </tr> <tr> <td> timeout </td> <td> After this timeout, sends data to the backend even if the batch size was not reached </td> </tr> <tr> <td> retry interval </td> <td> Retry interval on error </td> </tr> <tr> <td> connector xml </td> <td> Hibernate XML definition of the connector </td> </tr> </tbody> </table> <h3 id="syncregistersource"> SYNC.REGISTERSOURCE </h3> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">redis-cli -x RG.TRIGGER SYNC.REGISTERSOURCE <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span> <span class="o">{</span><span class="nb">source</span> name<span class="o">}</span> <span class="o">{</span>connector name<span class="o">}</span> <span class="o">{</span>policy<span class="o">}</span> <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span> &lt; <span class="o">{</span>mapping xml<span class="o">}</span> </span></span></code></pre> </div> <table> <thead> <tr> <th> Name </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> source name </td> <td> Name to give to your source </td> </tr> <tr> <td> connector name </td> <td> Connector to send the data to </td> </tr> <tr> <td> policy </td> <td> WriteBehind/WriteThrough/ReadThrough: <br/> <br/> β€’ On WriteThrough, an extra argument is WriteTimeout <br/> <br/> β€’ On ReadThrough, an extra argument is expire (0 for no expire) </td> </tr> <tr> <td> mapping xml </td> <td> Hibernate XML definition of the mapping </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/gears-v1/jvm/recipes/write-behind/"/> <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-94/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise Software release notes 6.4.2-94 (July 2023) </h1> <p class="text-lg -mt-5 mb-10"> Look-ahead mechanism for planner attempts. Package OS compatibility validation. </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> <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-94 July release) </th> </tr> </thead> <tbody> <tr> <td> Ubuntu 16 </td> <td> e664a93108aeb72cf9dc849b84b79239 </td> </tr> <tr> <td> Ubuntu 18 </td> <td> 9b547be7e093a0668caa9d5af36ddd21 </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> f9df1080427660bab601f1690ee7ffca </td> </tr> <tr> <td> RedHat Enterprise Linux (RHEL) 8 <br/> Oracle Enterprise Linux (OL) 8 <br/> Rocky Enterprise Linux </td> <td> f44dfaf4da5d54d35d739ba1e243eca0 </td> </tr> <tr> <td> Amazon Linux 2 </td> <td> f2c5c2b5e879b8fd6792336f757593e2 </td> </tr> </tbody> </table> <h2 id="new-features-and-enhancements"> New features and enhancements </h2> <ul> <li> <p> RS98361 - Enhanced the algorithm responsible for placing shards in the cluster. This improvement applies when creating new databases and when calling the REST API <code> GET optimize_shards_placement </code> for existing databases. </p> <p> With this update, the algorithm efficiently finds a legal placement while reducing the calculation time significantly. These changes ensure a smoother and faster experience when managing databases with a large number of shards and dense shard placement policy. </p> </li> <li> <p> RS62197 - Added validation of the operating system (OS) version before installation. The installer automatically validates the OS type and version and verifies the correct binary is used for the corresponding system. This prevents missing dependencies which may cause issues later on. </p> <p> The validation applies to major versions of all operating systems. If the check fails, the installation process halts with an appropriate error message. </p> </li> </ul> <h4 id="redis-stack-v626"> Redis Stack v6.2.6 </h4> <p> Redis Enterprise Software v6.4.2 includes the new features delivered in the latest <a href="https://redis.com/blog/introducing-redis-stack-6-2-6-and-7-0-6/"> Redis Stack release (6.2.6 v7) </a> : </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.9 </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.10 </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.10 </a> </p> </li> </ul> <p> See <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module/"> Upgrade modules </a> to learn how to upgrade a module for a database. </p> <h2 id="resolved-issues"> Resolved issues </h2> <ul> <li> <p> RS100903 - Fixed a v6.4.2 issue: when a database client requests [ <code> SLOWLOG GET [count] </code> ](/docs/latest/commands/slowlog-get/, the proxy ignores β€œcount” and always replies with 128 records </p> </li> <li> <p> RS95394 - Fixed Replica Of sync causing high DMC memory usage on source cluster when TLS is enabled "for Replica Of Only". </p> </li> <li> <p> RS102905 - Fixed invalid character that could potentially cause failure in generating support package for Active-Active databases. </p> </li> <li> <p> RS92430 - Optimized internal certification rotation process benefiting mainly clusters. </p> </li> <li> <p> RS99495 - Updated UI title property to "Redis Enterprise" </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-94/"/> <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.insert/.html
<section class="prose w-full py-12"> <h1 class="command-name"> CF.INSERT </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">CF.INSERT 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, 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.add/"> <code> CF.ADD </code> </a> , except that more than one item can be added and capacity can be specified. </p> <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 "1" means that the item has been successfully added to the filter, and "-1" means that the item was not added because the filter is full. </li> <li> [] on error (invalid arguments, wrong key type, and so on) and also when <code> NOCREATE </code> is specified and <code> key </code> does not exist. </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; CF.INSERT 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.INSERT cf1 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> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">redis&gt; CF.RESERVE cf2 <span class="m">2</span> BUCKETSIZE <span class="m">1</span> EXPANSION <span class="m">0</span> </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">redis&gt; CF.INSERT cf2 ITEMS <span class="m">1</span> <span class="m">1</span> <span class="m">1</span> <span class="m">1</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">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> -1 </span></span><span class="line"><span class="cl">4<span class="o">)</span> <span class="o">(</span>integer<span class="o">)</span> -1</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.insert/"/> <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-unpause/.html
<section class="prose w-full py-12"> <h1 class="command-name"> CLIENT UNPAUSE </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">CLIENT UNPAUSE</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.2.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 paused clients </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> <code> CLIENT UNPAUSE </code> is used to resume command processing for all clients that were paused by <a href="/docs/latest/commands/client-pause/"> <code> CLIENT PAUSE </code> </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/client-unpause/"/> <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/triggers-and-functions/concepts/resp_js_conversion/.html
<section class="prose w-full py-12 max-w-none"> <h1> RESP &amp; JavaScript </h1> <p class="text-lg -mt-5 mb-10"> Converting RESP to and from JavaScript </p> <div class="banner-article rounded-md"> <p> The Redis Stack triggers and functions feature preview has ended and it will not be promoted to GA. </p> </div> <p> When running Redis commands from within a function using the <code> client.call </code> API, the reply is parsed as a resp3 reply and converted to a JS object using the following rules: </p> <table> <thead> <tr> <th> resp 3 </th> <th> JS object type </th> </tr> </thead> <tbody> <tr> <td> <code> status </code> </td> <td> <code> StringObject </code> with a field called <code> __reply_type </code> and value <code> status </code> (or error if failed to convert to utf8) </td> </tr> <tr> <td> <code> bulk string </code> </td> <td> JS <code> String </code> (or error if failed to convert to utf8) </td> </tr> <tr> <td> <code> Error </code> </td> <td> Raise JS exception </td> </tr> <tr> <td> <code> long </code> </td> <td> JS big integer </td> </tr> <tr> <td> <code> double </code> </td> <td> JS number </td> </tr> <tr> <td> <code> array </code> </td> <td> JS array </td> </tr> <tr> <td> <code> map </code> </td> <td> JS object </td> </tr> <tr> <td> <code> set </code> </td> <td> JS set </td> </tr> <tr> <td> <code> bool </code> </td> <td> JS boolean </td> </tr> <tr> <td> <code> big number </code> </td> <td> <code> StringObject </code> with a field called <code> __reply_type </code> and value <code> big_number </code> </td> </tr> <tr> <td> <code> verbatim string </code> </td> <td> <code> StringObject </code> with 2 additional fields: 1. <code> __reply_type </code> and value <code> verbatim </code> 2. <code> __format </code> with the value of the ext in the verbatim string (or error if failed to convert to utf8) </td> </tr> <tr> <td> <code> null </code> </td> <td> JS null </td> </tr> <tr> <td> </td> <td> </td> </tr> </tbody> </table> <p> When running Redis commands from within a function using the <code> client.callRaw </code> API, the reply is parsed as a resp3 reply and converted to a JS object using the following rules: </p> <table> <thead> <tr> <th> resp 3 </th> <th> JS object type </th> </tr> </thead> <tbody> <tr> <td> <code> status </code> </td> <td> JS <code> ArrayBuffer </code> with a field called <code> __reply_type </code> and value <code> status </code> </td> </tr> <tr> <td> <code> bulk string </code> </td> <td> JS <code> ArrayBuffer </code> </td> </tr> <tr> <td> <code> Error </code> </td> <td> Raise JS exception </td> </tr> <tr> <td> <code> long </code> </td> <td> JS big integer </td> </tr> <tr> <td> <code> double </code> </td> <td> JS number </td> </tr> <tr> <td> <code> array </code> </td> <td> JS array </td> </tr> <tr> <td> <code> map </code> </td> <td> JS object </td> </tr> <tr> <td> <code> set </code> </td> <td> JS set </td> </tr> <tr> <td> <code> bool </code> </td> <td> JS boolean </td> </tr> <tr> <td> <code> big number </code> </td> <td> <code> StringObject </code> with a field called <code> __reply_type </code> and value <code> big_number </code> </td> </tr> <tr> <td> <code> verbatim string </code> </td> <td> JS <code> ArrayBuffer </code> with 2 additional fields: 1. <code> __reply_type </code> and value <code> verbatim </code> 2. <code> __format </code> with the value of the ext in the verbatim string </td> </tr> <tr> <td> <code> null </code> </td> <td> JS null </td> </tr> <tr> <td> </td> <td> </td> </tr> </tbody> </table> <h2 id="javascript-to-resp-conversion"> JavaScript to RESP conversion </h2> <table> <thead> <tr> <th> JS type </th> <th> RESP2 </th> <th> RESP3 </th> </tr> </thead> <tbody> <tr> <td> <code> string </code> </td> <td> <code> bulk string </code> </td> <td> <code> bulk string </code> </td> </tr> <tr> <td> <code> string </code> object with field <code> __reply_type=status </code> </td> <td> <code> status </code> </td> <td> <code> status </code> </td> </tr> <tr> <td> Exception </td> <td> <code> error </code> </td> <td> <code> error </code> </td> </tr> <tr> <td> <code> big integer </code> </td> <td> <code> long </code> </td> <td> <code> long </code> </td> </tr> <tr> <td> <code> number </code> </td> <td> <code> bulk string </code> </td> <td> <code> double </code> </td> </tr> <tr> <td> <code> array </code> </td> <td> <code> array </code> </td> <td> <code> array </code> </td> </tr> <tr> <td> <code> map </code> </td> <td> <code> array </code> </td> <td> <code> map </code> </td> </tr> <tr> <td> <code> set </code> </td> <td> <code> array </code> </td> <td> <code> set </code> </td> </tr> <tr> <td> <code> bool </code> </td> <td> <code> long </code> </td> <td> <code> bool </code> </td> </tr> <tr> <td> <code> string </code> object with field <code> __reply_type=varbatim </code> and <code> __format=txt </code> </td> <td> <code> bulk string </code> </td> <td> <code> verbatim string </code> with format as <code> txt </code> </td> </tr> <tr> <td> <code> null </code> </td> <td> resp2 <code> null </code> </td> <td> resp3 <code> null </code> </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/triggers-and-functions/concepts/resp_js_conversion/"/> <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-getuser/.html
<section class="prose w-full py-12"> <h1 class="command-name"> ACL GETUSER </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">ACL GETUSER username</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(N). Where N is the number of password, command and pattern rules that the user has. </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 command returns all the rules defined for an existing ACL user. </p> <p> Specifically, it lists the user's ACL flags, password hashes, commands, key patterns, channel patterns (Added in version 6.2) and selectors (Added in version 7.0). Additional information may be returned in the future if more metadata is added to the user. </p> <p> Command rules are always returned in the same format as the one used in the <a href="/docs/latest/commands/acl-setuser/"> <code> ACL SETUSER </code> </a> command. Before version 7.0, keys and channels were returned as an array of patterns, however in version 7.0 later they are now also returned in same format as the one used in the <a href="/docs/latest/commands/acl-setuser/"> <code> ACL SETUSER </code> </a> command. Note: This description of command rules reflects the user's effective permissions, so while it may not be identical to the set of rules used to configure the user, it is still functionally identical. </p> <p> Selectors are listed in the order they were applied to the user, and include information about commands, key patterns, and channel patterns. </p> <h2 id="examples"> Examples </h2> <p> Here's an example configuration for a user </p> <pre tabindex="0"><code>&gt; ACL SETUSER sample on nopass +GET allkeys &amp;* (+SET ~key2) "OK" &gt; ACL GETUSER sample 1) "flags" 2) 1) "on" 2) "allkeys" 3) "nopass" 3) "passwords" 4) (empty array) 5) "commands" 6) "+@all" 7) "keys" 8) "~*" 9) "channels" 10) "&amp;*" 11) "selectors" 12) 1) 1) "commands" 6) "+SET" 7) "keys" 8) "~key2" 9) "channels" 10) "&amp;*" </code></pre> <h2 id="resp2-reply"> RESP2 Reply </h2> <p> One of the following: </p> <ul> <li> <a href="../../develop/reference/protocol-spec#arrays"> Array reply </a> : a list of ACL rule definitions for the user. </li> <li> <a href="../../develop/reference/protocol-spec#bulk-strings"> Nil reply </a> : if user does not exist. </li> </ul> <h2 id="resp3-reply"> RESP3 Reply </h2> <p> One of the following: </p> <ul> <li> <a href="../../develop/reference/protocol-spec#maps"> Map reply </a> : a set of ACL rule definitions for the user </li> <li> <a href="../../develop/reference/protocol-spec#nulls"> Null reply </a> : if user does not exist. </li> </ul> <br/> <h2> History </h2> <ul> <li> Starting with Redis version 6.2.0: Added Pub/Sub channel patterns. </li> <li> Starting with Redis version 7.0.0: Added selectors and changed the format of key and channel patterns from a list to their rule representation. </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/acl-getuser/"/> <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-getredir/.html
<section class="prose w-full py-12"> <h1 class="command-name"> CLIENT GETREDIR </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">CLIENT GETREDIR</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> <code> @connection </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> This command returns the client ID we are redirecting our <a href="/docs/latest/develop/clients/client-side-caching/#tracking"> tracking </a> notifications to. We set a client to redirect to when using <a href="/docs/latest/commands/client-tracking/"> <code> CLIENT TRACKING </code> </a> to enable tracking. However in order to avoid forcing client libraries implementations to remember the ID notifications are redirected to, this command exists in order to improve introspection and allow clients to check later if redirection is active and towards which client ID. </p> <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> 0 </code> when not redirecting notifications to any client. </li> <li> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : <code> -1 </code> if client tracking is not enabled. </li> <li> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : the ID of the client to which notification are being redirected. </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-getredir/"/> <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/cli-utilities/redis-cli/.html
<section class="prose w-full py-12 max-w-none"> <h1> redis-cli </h1> <p class="text-lg -mt-5 mb-10"> Run Redis commands. </p> <p> The <code> redis-cli </code> command-line utility lets you interact with a Redis database. With <code> redis-cli </code> , you can run <a href="/docs/latest/commands/"> Redis commands </a> directly from the command-line terminal or with <a href="#interactive-mode"> interactive mode </a> . </p> <p> If you want to run Redis commands without <code> redis-cli </code> , you can <a href="/docs/latest/develop/tools/insight/"> connect to a database with Redis Insight </a> and use the built-in <a href="/docs/latest/develop/tools/insight/"> CLI </a> prompt instead. </p> <h2 id="install-redis-cli"> Install <code> redis-cli </code> </h2> <p> When you install Redis Enterprise Software or Redis Community Edition, it also installs the <code> redis-cli </code> command-line utility. </p> <p> To learn how to install Redis and <code> redis-cli </code> , see the following installation guides: </p> <ul> <li> <p> <a href="/docs/latest/operate/oss_and_stack/install/install-redis/"> Redis Community Edition </a> </p> </li> <li> <p> <a href="/docs/latest/operate/rs/7.4/installing-upgrading/quickstarts/redis-enterprise-software-quickstart/"> Redis Enterprise Software </a> </p> </li> <li> <p> <a href="/docs/latest/operate/rs/7.4/installing-upgrading/quickstarts/docker-quickstart/"> Redis Enterprise Software with Docker </a> </p> </li> </ul> <h2 id="connect-to-a-database"> Connect to a database </h2> <p> To run Redis commands with <code> redis-cli </code> , you need to connect to your Redis database. </p> <p> You can find endpoint and port details in the <strong> Databases </strong> list or the database’s <strong> Configuration </strong> screen. </p> <h3 id="connect-remotely"> Connect remotely </h3> <p> If you have <code> redis-cli </code> installed on your local machine, you can use it to connect to a remote Redis database. You will need to provide the database's connection details, such as the hostname or IP address, port, and password. </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; -a &lt;password&gt; </span></span></code></pre> </div> <p> You can also provide the password with the <code> REDISCLI_AUTH </code> environment variable instead of the <code> -a </code> option: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ <span class="nb">export</span> <span class="nv">REDISCLI_AUTH</span><span class="o">=</span>&lt;password&gt; </span></span><span class="line"><span class="cl">$ redis-cli -h &lt;endpoint&gt; -p &lt;port&gt; </span></span></code></pre> </div> <h3 id="connect-over-tls"> Connect over TLS </h3> <p> To connect to a Redis Enterprise Software or Redis Cloud database over TLS: </p> <ol> <li> <p> Download or copy the Redis Enterprise server (or proxy) certificates. </p> <ul> <li> <p> For Redis Cloud, see <a href="/docs/latest/operate/rc/security/database-security/tls-ssl/#download-certificates"> Download certificates </a> for detailed instructions on how to download the server certificates ( <code> redis_ca.pem </code> ) from the <a href="https://cloud.redis.io/"> Redis Cloud console </a> . </p> </li> <li> <p> For Redis Enterprise Software, copy the proxy certificate from the Cluster Manager UI ( <strong> Cluster &gt; Security &gt; Certificates &gt; Server authentication </strong> ) or from a cluster node ( <code> /etc/opt/redislabs/proxy_cert.pem </code> ). </p> </li> </ul> </li> <li> <p> Copy the certificate to each client machine. </p> </li> <li> <p> If your database doesn't require client authentication, provide the Redis Enterprise server certificate ( <code> redis_ca.pem </code> for Cloud or <code> proxy_cert.pem </code> for Software) when you connect: </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; --tls --cacert &lt;redis_cert&gt;.pem </span></span></code></pre> </div> </li> <li> <p> If your database requires client authentication, provide your client's private and public keys along with the Redis Enterprise server certificate ( <code> redis_ca.pem </code> for Cloud or <code> proxy_cert.pem </code> for Software) when you connect: </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; --tls --cacert &lt;redis_cert&gt;.pem <span class="se">\ </span></span></span><span class="line"><span class="cl"><span class="se"></span> --cert redis_user.crt --key redis_user_private.key </span></span></code></pre> </div> </li> </ol> <h3 id="connect-with-docker"> Connect with Docker </h3> <p> If your Redis database runs in a Docker container, you can use <code> docker exec </code> to run <code> redis-cli </code> commands: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ docker <span class="nb">exec</span> -it &lt;Redis container name&gt; redis-cli -p &lt;port&gt; </span></span></code></pre> </div> <h2 id="basic-use"> Basic use </h2> <p> You can run <code> redis-cli </code> commands directly from the command-line terminal: </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; &lt;Redis command&gt; </span></span></code></pre> </div> <p> For example, you can use <code> redis-cli </code> to test your database connection and store a new Redis string in the database: </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 <span class="m">12000</span> PING </span></span><span class="line"><span class="cl">PONG </span></span><span class="line"><span class="cl">$ redis-cli -h &lt;endpoint&gt; -p <span class="m">12000</span> SET mykey <span class="s2">"Hello world"</span> </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">$ redis-cli -h &lt;endpoint&gt; -p <span class="m">12000</span> GET mykey </span></span><span class="line"><span class="cl"><span class="s2">"Hello world"</span> </span></span></code></pre> </div> <p> For more information, see <a href="/docs/latest/develop/tools/cli/#command-line-usage"> Command line usage </a> . </p> <h2 id="interactive-mode"> Interactive mode </h2> <p> In <code> redis-cli </code> <a href="/docs/latest/develop/tools/cli/#interactive-mode"> interactive mode </a> , you can: </p> <ul> <li> Run any <code> redis-cli </code> command without prefacing it with <code> redis-cli </code> . </li> <li> Enter <code> ? </code> for more information about how to use the <code> HELP </code> command and <a href="/docs/latest/develop/tools/cli/#preferences"> set <code> redis-cli </code> preferences </a> . </li> <li> Enter <a href="/docs/latest/develop/tools/cli/#showing-help-about-redis-commands"> <code> HELP </code> </a> followed by the name of a command for more information about the command and its options. </li> <li> Press the <code> Tab </code> key for command completion. </li> <li> Enter <code> exit </code> or <code> quit </code> or press <code> Control+D </code> to exit interactive mode and return to the terminal prompt. </li> </ul> <p> This example shows how to start interactive mode and run Redis commands: </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">12000</span> </span></span><span class="line"><span class="cl">127.0.0.1:12000&gt; PING </span></span><span class="line"><span class="cl">PONG </span></span><span class="line"><span class="cl">127.0.0.1:12000&gt; SET mykey <span class="s2">"Hello world"</span> </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">127.0.0.1:12000&gt; GET mykey </span></span><span class="line"><span class="cl"><span class="s2">"Hello world"</span> </span></span></code></pre> </div> <h2 id="examples"> Examples </h2> <h3 id="check-slowlog"> Check slowlog </h3> <p> Run <a href="/docs/latest/commands/slowlog-get/"> <code> slowlog get </code> </a> for a list of recent slow commands: </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; slowlog get &lt;number of entries&gt; </span></span></code></pre> </div> <h3 id="scan-for-big-keys"> Scan for big keys </h3> <p> Scan the database for big keys: </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; --bigkeys </span></span></code></pre> </div> <p> See <a href="/docs/latest/develop/tools/cli/#scanning-for-big-keys"> Scanning for big keys </a> for more information. </p> <h2 id="more-info"> More info </h2> <ul> <li> <a href="/docs/latest/develop/tools/cli/"> Redis CLI documentation </a> </li> <li> [Redis commands reference](/docs/latest/commands/ </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/references/cli-utilities/redis-cli/"/> <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-92/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise Software release notes 7.2.4-92 (November 2023) </h1> <p class="text-lg -mt-5 mb-10"> New Cluster Manager UI enhancements - LDAP configuration improvements. New <code> capability_name </code> field added to module REST API object. Automatic removal of deprecated, predefined roles and ACLs upon cluster upgrade, unless they are associated with any users or databases. </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> , originally released as version 7.2.4-86. Version 7.2.4-92 fixes several additional issues that affect version 7.2.4-86. </p> <h2 id="highlights"> Highlights </h2> <p> This version offers: </p> <ul> <li> <p> New Cluster Manager UI enhancements </p> </li> <li> <p> New <code> capability_name </code> field in module REST API object </p> </li> <li> <p> Automatic removal of deprecated, predefined roles and ACLs upon cluster upgrade, unless they are associated with any users or databases </p> </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> Improved <a href="/docs/latest/operate/rs/security/access-control/ldap/enable-role-based-ldap/"> LDAP configuration </a> and moved it from <strong> Cluster &gt; Security &gt; LDAP </strong> to <strong> Access Control &gt; LDAP &gt; Configuration </strong> </li> </ul> </li> <li> <p> New <code> capability_name </code> field added to <a href="/docs/latest/operate/rs/references/rest-api/objects/module/"> module REST API object </a> </p> </li> <li> <p> The following predefined roles and ACLs are removed automatically when you upgrade the cluster, unless they are associated with any users or databases, as planned in the Redis Enterprise Software version 7.2.4-52 <a href="/docs/latest/operate/rs/release-notes/rs-7-2-4-releases/rs-7-2-4-52/#access-control-deprecations"> deprecation notice </a> : </p> <ul> <li> <p> Custom roles (not management roles): Cluster Member, Cluster Viewer, DB Member, DB Viewer, None. </p> </li> <li> <p> Redis ACLs: Not Dangerous and Read Only. </p> </li> </ul> </li> </ul> <h4 id="redis-modules"> Redis modules </h4> <p> Redis Enterprise Software versions 7.2.4-92 and 7.2.4-86 include the following Redis Stack modules: </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.6"> RedisTimeSeries 1.10.6 </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.12-m13"> RedisGears 2.0.12 </a> </p> </li> </ul> <h3 id="resolved-issues"> Resolved issues </h3> <p> The following issues were resolved in ​Redis Enterprise Software version 7.2.4-92: </p> <ul> <li> <p> RS114368 - Cluster upgrades should no longer show a warning that the <code> redislabs </code> user or group already exists. </p> </li> <li> <p> RS114185 - Resolved a <a href="/docs/latest/operate/rs/release-notes/rs-7-2-4-releases/rs-7-2-4-92/#known-issues"> known issue </a> regarding cluster upgrade failures due to a <code> Failed to get default_suffix </code> error, which appears in <code> dmcproxy.log </code> . </p> </li> </ul> <p> The following issues were resolved in ​Redis Enterprise Software version 7.2.4-86: </p> <ul> <li> <p> RS109744 - Node removal sometimes got stuck in a <code> starting </code> state when <code> wait_for_persistence </code> was enabled. </p> </li> <li> <p> RS110481 - Importing a database mid-upgrade failed when the primary (master) node had the new version. </p> </li> <li> <p> RS111363 - Fixed an issue in the legacy UI, where you could not update and save your changes on the <strong> settings &gt; preferences </strong> tab even though these settings were visible. </p> </li> <li> <p> RS39744 - The <code> /opt/redislabs </code> directory was not created with <code> redislabs </code> user and group. </p> </li> <li> <p> RS111648 - In <code> cnm_exec.log </code> , replaced "root" with the module utils log name. </p> </li> <li> <p> RS112517 - Fixed an issue in the <code> prepare_flash </code> script that reduced Auto Tiering performance on Ubuntu 20. </p> </li> <li> <p> RS104189 - Added timeout to <code> /shards </code> API to prevent long response times if a shard is stuck. </p> </li> <li> <p> RS108771 - Fixed migration issue when a node containing the source shard was down. </p> </li> <li> <p> RS105989 - Fixed node removal failure during cluster upgrade. </p> </li> <li> <p> RS112568 - Fixed migration and node removal scenarios where a node contained a module that was not spread to all cluster nodes. </p> </li> <li> <p> RS110204 - Fixed failure to change the primary (master) node when requested during an upgrade if a shard was down. </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 (7.2.4-92 November release) </th> </tr> </thead> <tbody> <tr> <td> Ubuntu 18 </td> <td> 17166732725284728162180d92e3fa72 </td> </tr> <tr> <td> Ubuntu 20 </td> <td> d4bd75933d95bbd18d487b9834180517 </td> </tr> <tr> <td> RedHat Enterprise Linux (RHEL) 7 <br/> Oracle Enterprise Linux (OL) 7 </td> <td> 78447b4643fafb5dcec37c2981ca7b59 </td> </tr> <tr> <td> RedHat Enterprise Linux (RHEL) 8 <br/> Oracle Enterprise Linux (OL) 8 <br/> Rocky Enterprise Linux </td> <td> 6dc4f3ba3d789d8e02f7a963128b79a4 </td> </tr> <tr> <td> Amazon Linux 2 </td> <td> f829ecba9874ed30229736617ad8f0f8 </td> </tr> </tbody> </table> <h2 id="known-issues"> Known issues </h2> <ul> <li> <p> RS114185 - During an upgrade to Redis Enterprise Software version 7.2.4-86, the proxy might not start due to a <code> Failed to get default_suffix </code> error, which appears in <code> dmcproxy.log </code> . </p> <p> As a workaround, start <code> dmcproxy </code> manually: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">supervisorctl restart dmcproxy </span></span></code></pre> </div> <p> This issue was fixed in Redis Enterprise Software version 7.2.4-92. </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-92 and 7.2.4-86 support 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-92/"/> <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/installing-upgrading/creating-support-package/.html
<section class="prose w-full py-12 max-w-none"> <h1> Create a support package </h1> <p class="text-lg -mt-5 mb-10"> Create a support package that gathers essential information to help debug issues. </p> <p> If you encounter any issues that you are not able to resolve yourself and need to <a href="https://redis.io/support/"> contact Redis support </a> for assistance, you can <a href="#create-support-package"> create a support package </a> that gathers all essential information to help debug your issues. </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 process of creating the support package can take several minutes and generates load on the system. </div> </div> <h2 id="support-package-files"> Support package files </h2> <p> The support package is a zip file that contains all cluster configuration and logs. </p> <p> When downloaded from the Cluster Manager UI, the support package's name is <code> debuginfo.tar.gz </code> . </p> <h3 id="database-support-package-files"> Database support package files </h3> <p> Cluster and database support packages collect database details in <code> database_&lt;bdb_uid&gt; </code> directories, where <code> &lt;bdb_uid&gt; </code> is the database ID, and Redis shard details in <code> &lt;node_uid&gt; </code> directories. </p> <p> The following table describes the included files: </p> <table> <thead> <tr> <th> File </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> ccs-redis.json </td> <td> Primary node's local cluster configuration store (CCS). </td> </tr> <tr> <td> /database_&lt;bdb_uid&gt;/ </td> <td> Directory that includes files for a specific database.&lt;bdb_uid&gt; is the database ID. </td> </tr> <tr> <td> database_&lt;bdb_uid&gt;_ccs_info.txt </td> <td> Database information from the cluster configuration store (CCS). Includes settings for databases, endpoints, shards, replicas, and CRDB. </td> </tr> <tr> <td> database_&lt;bdb_uid&gt;.clientlist </td> <td> List of clients connected to the database when the support package was created. </td> </tr> <tr> <td> database_&lt;bdb_uid&gt;.info </td> <td> Redis information and statistics for the database. See <a href="/docs/latest/commands/info/"> <code> INFO </code> </a> for details about the collected fields. </td> </tr> <tr> <td> database_&lt;bdb_uid&gt;.rladmin </td> <td> Database information. See <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/info/#info-db"> <code> rladmin info db </code> </a> for an example of collected fields. Also includes creation time, last changed time, Redis version, memory limit, persistence type, eviction policy, hashing policy, and whether SSL, backups, and email alerts are enabled. </td> </tr> <tr> <td> database_&lt;bdb_uid&gt;.slowlog </td> <td> Contains slowlog output, which includes commands that took longer than 10 milliseconds. Only included if <code> slowlog_in_sanitized_support </code> is <code> true </code> in cluster settings. </td> </tr> <tr> <td> /node_&lt;node_uid&gt;/redis_&lt;shard_uid&gt;.txt </td> <td> For each shard of the specified database only. Includes shard configuration and <a href="/docs/latest/commands/info/"> information </a> , slowlog information, and latency information. </td> </tr> </tbody> </table> <h3 id="node-support-package-files"> Node support package files </h3> <p> Cluster and node support packages collect node details in <code> node_&lt;node_uid&gt; </code> directories, where <code> &lt;node_uid&gt; </code> is the node ID. </p> <p> The following table describes the included files: </p> <table> <thead> <tr> <th> File </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> ccs-redis.json </td> <td> The node's local cluster configuration store (CCS). </td> </tr> <tr> <td> /conf/ </td> <td> Directory that contains configuration files. </td> </tr> <tr> <td> /logs/ </td> <td> Directory that includes logs. </td> </tr> <tr> <td> node_&lt;node_uid&gt;.ccs </td> <td> Includes cluster configuration, node configuration, and DMC proxy configuration. </td> </tr> <tr> <td> node_&lt;node_uid&gt;_envoy_config.json </td> <td> Envoy configuration. </td> </tr> <tr> <td> node_&lt;node_uid&gt;.rladmin </td> <td> Information about the cluster's nodes, databases, endpoints, and shards. See <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/status/"> <code> rladmin status </code> </a> for example output. </td> </tr> <tr> <td> node_&lt;node_uid&gt;_sys_info.txt </td> <td> Node's system information including: <br/> β€’ Socket files list <br/> β€’ Log files list <br/> β€’ Processes running on the node <br/> β€’ Disk usage <br/> β€’ Persistent files list <br/> β€’ Memory usage <br/> β€’ Network interfaces <br/> β€’ Installed packages <br/> β€’ Active iptables <br/> β€’ OS and platform <br/> β€’ Network connection <br/> β€’ Status of Redis processes </td> </tr> <tr> <td> redis_&lt;shard_uid&gt;.txt </td> <td> For each shard of the specified database only. Includes shard configuration and <a href="/docs/latest/commands/info/"> information </a> , slowlog information, and latency information. </td> </tr> </tbody> </table> <p> Each node's <code> /conf/ </code> directory contains the following files: </p> <ul> <li> bootstrap_status.json </li> <li> ccs-paths.conf </li> <li> config.json </li> <li> envoy.yaml </li> <li> gossip_envoy.yaml </li> <li> heartbeatd-config.json </li> <li> last_bootstrap.json </li> <li> local_addr.conf </li> <li> node.id </li> <li> node_local_config.json </li> <li> redislabs_env_config.sh </li> <li> socket.conf </li> <li> supervisord_alert_mgr.conf </li> <li> supervisord_cm_server.conf </li> <li> supervisord_crdb_coordinator.conf </li> <li> supervisord_crdb_worker.conf </li> <li> supervisord_mdns_server.conf </li> <li> supervisord_pdns_server.conf </li> </ul> <p> Each node's <code> /conf/ </code> directory also contains the following key and cert modulus files: </p> <ul> <li> api_cert.modulus </li> <li> api_key.modulus </li> <li> ccs_internode_encryption_cert.modulus </li> <li> ccs_internode_encryption_key.modulus </li> <li> cm_cert.modulus </li> <li> cm_key.modulus </li> <li> data_internode_encryption_cert.modulus </li> <li> data_internode_encryption_key.modulus </li> <li> gossip_ca_signed_cert.modulus </li> <li> gossip_ca_signed_key.modulus </li> <li> mesh_ca_signed_cert.modulus </li> <li> mesh_ca_signed_key.modulus </li> <li> metrics_exporter_cert.modulus </li> <li> metrics_exporter_key.modulus </li> <li> proxy_cert.modulus </li> <li> proxy_key.modulus </li> <li> syncer_cert.modulus </li> <li> syncer_key.modulus </li> </ul> <h2 id="create-support-package"> Create support package </h2> <h3 id="cluster-manager-ui-method"> Cluster Manager UI method </h3> <p> To create a support package from the Cluster Manager UI: </p> <ol> <li> <p> In the navigation menu, select <strong> Support </strong> . </p> <a href="/docs/latest/images/rs/screenshots/create-support-package.png" sdata-lightbox="/images/rs/screenshots/create-support-package.png"> <img alt="Select Support and create a support package." src="/docs/latest/images/rs/screenshots/create-support-package.png" width="60%"/> </a> </li> <li> <p> Select <strong> Proceed </strong> . </p> </li> <li> <p> In the <strong> Create support package </strong> dialog, select <strong> Run process </strong> . </p> </li> <li> <p> The package is created and downloaded by your browser. </p> </li> </ol> <h3 id="command-line-method"> Command-line method </h3> <p> If package creation fails with <code> internal error </code> or if you cannot access the UI, create a support package for the cluster from the command line on any node in the cluster using the <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/debug_info/"> <code> rladmin cluster debug_info </code> </a> command: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">/opt/redislabs/bin/rladmin cluster debug_info </span></span></code></pre> </div> <ul> <li> <p> If <code> rladmin cluster debug_info </code> fails for lack of space in the <code> /tmp </code> directory, you can: </p> <ol> <li> <p> Change the storage location where the support package is saved: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster config debuginfo_path &lt;path&gt; </span></span></code></pre> </div> <p> The <code> redislabs </code> user must have write access to the storage location on all cluster nodes. </p> </li> <li> <p> On any node in the cluster, run: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster debug_info </span></span></code></pre> </div> </li> </ol> </li> <li> <p> If <code> rladmin cluster debug_info </code> fails for another reason, you can create a support package for the cluster from the command line on each node in the cluster with the command: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">/opt/redislabs/bin/debuginfo </span></span></code></pre> </div> </li> </ul> <p> Upload the tar file to <a href="https://redis.com/company/support/"> Redis support </a> . The path to the archive is shown in the command output. </p> <h3 id="rest-api-method"> REST API method </h3> <p> You can also use <code> debuginfo </code> <a href="/docs/latest/operate/rs/7.4/references/rest-api/"> REST API </a> requests to create and download support packages. </p> <p> To download debug info from all nodes and databases: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /v1/cluster/debuginfo </span></span></code></pre> </div> <p> To download debug info from all nodes: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /v1/nodes/debuginfo </span></span></code></pre> </div> <p> To download debug info from a specific node, replace <code> &lt;uid&gt; </code> in the following request with the node ID: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /v1/nodes/&lt;uid&gt;/debuginfo </span></span></code></pre> </div> <p> To download debug info from all databases: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /v1/bdbs/debuginfo </span></span></code></pre> </div> <p> To download debug info from a specific database, replace <code> &lt;uid&gt; </code> in the following request with the database ID: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /v1/bdbs/&lt;uid&gt;/debuginfo </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/7.4/installing-upgrading/creating-support-package/"/> <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/configure/database-persistence/.html
<section class="prose w-full py-12 max-w-none"> <h1> Configure database persistence </h1> <p class="text-lg -mt-5 mb-10"> How to configure database persistence with either an append-only file (AOF) or snapshots. </p> <p> All data is stored and managed exclusively in either RAM or RAM + flash Memory ( <a href="/docs/latest/operate/rs/7.4/databases/auto-tiering/"> Auto Tiering </a> ) and therefore, is at risk of being lost upon a process or server failure. As Redis Enterprise Software is not just a caching solution, but also a full-fledged database, <a href="https://redis.com/redis-enterprise/technology/durable-redis/"> persistence </a> to disk is critical. Therefore, Redis Enterprise Software supports persisting data to disk on a per-database basis and in multiple ways. </p> <p> <a href="https://redis.com/redis-enterprise/technology/durable-redis/"> Persistence </a> can be configured either during database creation or by editing an existing database's configuration. While the persistence model can be changed dynamically, it can take time for your database to switch from one persistence model to the other. It depends on what you are switching from and to, but also on the size of your database. </p> <h2 id="configure-database-persistence"> Configure database persistence </h2> <p> You can configure persistence when you <a href="/docs/latest/operate/rs/7.4/databases/create/"> create a database </a> , or you can edit an existing database's configuration: </p> <ol> <li> <p> From the <strong> Databases </strong> list, select the database, then select <strong> Configuration </strong> . </p> </li> <li> <p> Select <strong> Edit </strong> . </p> </li> <li> <p> Expand the <strong> High Availability </strong> section. </p> </li> <li> <p> For <strong> Persistence </strong> , select an <a href="#data-persistence-options"> option </a> from the list. </p> </li> <li> <p> Select <strong> Save </strong> . </p> </li> </ol> <h2 id="data-persistence-options"> Data persistence options </h2> <p> There are six options for persistence in Redis Enterprise Software: </p> <table> <thead> <tr> <th> <strong> Options </strong> </th> <th> <strong> Description </strong> </th> </tr> </thead> <tbody> <tr> <td> None </td> <td> Data is not persisted to disk at all. </td> </tr> <tr> <td> Append-only file (AOF) - fsync every write </td> <td> Data is fsynced to disk with every write. </td> </tr> <tr> <td> Append-only file (AOF) - fsync every 1 sec </td> <td> Data is fsynced to disk every second. </td> </tr> <tr> <td> Snapshot, every 1 hour </td> <td> A snapshot of the database is created every hour. </td> </tr> <tr> <td> Snapshot, every 6 hours </td> <td> A snapshot of the database is created every 6 hours. </td> </tr> <tr> <td> Snapshot, every 12 hours </td> <td> A snapshot of the database is created every 12 hours. </td> </tr> </tbody> </table> <h2 id="select-a-persistence-strategy"> Select a persistence strategy </h2> <p> When selecting your persistence strategy, you should take into account your tolerance for data loss and performance needs. There will always be tradeoffs between the two. The fsync() system call syncs data from file buffers to disk. You can configure how often Redis performs an fsync() to most effectively make tradeoffs between performance and durability for your use case. Redis supports three fsync policies: every write, every second, and disabled. </p> <p> Redis also allows snapshots through RDB files for persistence. Within Redis Enterprise, you can configure both snapshots and fsync policies. </p> <p> For any high availability needs, use replication to further reduce the risk of data loss. </p> <p> <strong> For use cases where data loss has a high cost: </strong> </p> <p> Append-only file (AOF) - fsync every write - Redis Enterprise sets the Redis directive <code> appendfsyncalways </code> . With this policy, Redis will wait for the write and the fsync to complete prior to sending an acknowledgement to the client that the data has written. This introduces the performance overhead of the fsync in addition to the execution of the command. The fsync policy always favors durability over performance and should be used when there is a high cost for data loss. </p> <p> <strong> For use cases where data loss is tolerable only limitedly: </strong> </p> <p> Append-only file (AOF) - fsync every 1 sec - Redis will fsync any newly written data every second. This policy balances performance and durability and should be used when minimal data loss is acceptable in the event of a failure. This is the default Redis policy. This policy could result in between 1 and 2 seconds worth of data loss but on average this will be closer to one second. </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> If you use AOF for persistence, enable replication to improve performance. When both features are enabled for a database, the replica handles persistence, which prevents any performance impact on the master. </div> </div> <p> <strong> For use cases where data loss is tolerable or recoverable for extended periods of time: </strong> </p> <ul> <li> Snapshot, every 1 hour - Performs a full backup every hour. </li> <li> Snapshot, every 6 hour - Performs a full backup every 6 hours. </li> <li> Snapshot, every 12 hour - Performs a full backup every 12 hours. </li> <li> None - Does not back up or persist data at all. </li> </ul> <h2 id="append-only-file-aof-vs-snapshot-rdb"> Append-only file (AOF) vs snapshot (RDB) </h2> <p> Now that you know the available options, to assist in making a decision on which option is right for your use case, here is a table about the two: </p> <table> <thead> <tr> <th> <strong> Append-only File (AOF) </strong> </th> <th> <strong> Snapshot (RDB) </strong> </th> </tr> </thead> <tbody> <tr> <td> More resource intensive </td> <td> Less resource intensive </td> </tr> <tr> <td> Provides better durability (recover the latest point in time) </td> <td> Less durable </td> </tr> <tr> <td> Slower time to recover (Larger files) </td> <td> Faster recovery time </td> </tr> <tr> <td> More disk space required (files tend to grow large and require compaction) </td> <td> Requires less resources (I/O once every several hours and no compaction required) </td> </tr> </tbody> </table> <h2 id="active-active-data-persistence"> Active-Active data persistence </h2> <p> Active-Active databases support AOF persistence only. Snapshot persistence is not supported for Active-Active databases. </p> <p> If an Active-Active database is using snapshot persistence, use <code> crdb-cli </code> to switch to AOF persistence: </p> <div class="highlight"> <pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">crdb-cli crdb update --crdb-guid &lt;CRDB_GUID&gt; --default-db-config \ </span></span><span class="line"><span class="cl"> '{"data_persistence": "aof", "aof_policy":"appendfsync-every-sec"}' </span></span></code></pre> </div> <h2 id="auto-tiering-data-persistence"> Auto Tiering data persistence </h2> <p> Auto Tiering flash storage is not considered persistent storage. </p> <p> Flash-based databases are expected to hold larger datasets, and shard repair times can take longer after node failures. To better protect the database against node failures with longer repair times, consider enabling master and replica dual data persistence. </p> <p> However, dual data persistence with replication adds some processor and network overhead, especially for cloud configurations with network-attached persistent storage, such as EBS-backed volumes in AWS. </p> <p> There may be times when performance is critical for your use case and you don't want to risk data persistence adding latency. </p> <p> You can enable or turn off data persistence on the master shards using the following <code> rladmin </code> command: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin tune db &lt;database_ID_or_name&gt; master_persistence &lt;disabled <span class="p">|</span> enabled&gt; </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/7.4/databases/configure/database-persistence/"/> <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/compatibility/resp/.html
<section class="prose w-full py-12 max-w-none"> <h1> RESP compatibility with Redis Enterprise </h1> <p class="text-lg -mt-5 mb-10"> Redis Enterprise supports RESP2 and RESP3. </p> <p> RESP (Redis Serialization Protocol) is the protocol that clients use to communicate with Redis databases. See the <a href="/docs/latest/develop/reference/protocol-spec/"> RESP protocol specification </a> for more information. </p> <h2 id="supported-resp-versions"> Supported RESP versions </h2> <ul> <li> <p> RESP2 is supported by all Redis Enterprise versions. </p> </li> <li> <p> RESP3 is supported by Redis Enterprise 7.2 and later. </p> </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> Redis Enterprise versions that support RESP3 continue to support RESP2. </div> </div> <h2 id="enable-resp3"> Enable RESP3 for a database </h2> <p> To use RESP3 with a Redis Enterprise Software database: </p> <ol> <li> <p> Upgrade Redis servers to version 7.2 or later. </p> <p> For Active-Active and Replica Of databases: </p> <ol> <li> <p> Upgrade all participating clusters to Redis Enterprise version 7.2.x or later. </p> </li> <li> <p> Upgrade all databases to version 7.x or later. </p> </li> </ol> </li> <li> <p> Enable RESP3 support for your database ( <code> enabled </code> by default): </p> <ul> <li> <p> <a href="/docs/latest/operate/rs/7.4/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&gt; resp3 enabled </span></span></code></pre> </div> <p> You can use the database name in place of <code> db:&lt;ID&gt; </code> in the preceding command. </p> </li> <li> <p> <a href="/docs/latest/operate/rs/7.4/references/rest-api/requests/bdbs/#put-bdbs"> Update database configuration </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/bdbs/&lt;uid&gt; </span></span><span class="line"><span class="cl"><span class="o">{</span> <span class="s2">"resp3"</span>: <span class="nb">true</span> <span class="o">}</span> </span></span></code></pre> </div> </li> </ul> </li> </ol> <h2 id="deactivate-resp3"> Deactivate RESP3 for a database </h2> <p> To deactivate RESP3 support for a database: </p> <ul> <li> <p> <a href="/docs/latest/operate/rs/7.4/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&gt; resp3 disabled </span></span></code></pre> </div> <p> You can use the database name in place of <code> db:&lt;ID&gt; </code> in the preceding command. </p> </li> <li> <p> <a href="/docs/latest/operate/rs/7.4/references/rest-api/requests/bdbs/#put-bdbs"> Update database configuration </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/bdbs/&lt;uid&gt; </span></span><span class="line"><span class="cl"><span class="o">{</span> <span class="s2">"resp3"</span>: <span class="nb">false</span> <span class="o">}</span> </span></span></code></pre> </div> </li> </ul> <p> When RESP3 is deactivated, connected clients that use RESP3 are disconnected from the database. </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> You cannot use sharded pub/sub if you deactivate RESP3 support. </div> </div> <h2 id="change-default-resp3-option"> Change default RESP3 option </h2> <p> The cluster-wide option <code> resp3_default </code> determines the default value of the <code> resp3 </code> option, which enables or deactivates RESP3 for a database, upon upgrading a database to version 7.2. <code> resp3_default </code> is set to <code> enabled </code> by default. </p> <p> To change <code> resp3_default </code> to <code> disabled </code> , use one of the following methods: </p> <ul> <li> <p> Cluster Manager UI: </p> <ol> <li> <p> On the <strong> Databases </strong> screen, select <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> Upgrade configuration </strong> . </p> </li> <li> <p> For <strong> RESP3 support </strong> , select <strong> Disable </strong> . </p> </li> <li> <p> Click <strong> Save </strong> . </p> </li> </ol> </li> <li> <p> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/tune/#tune-cluster"> <code> rladmin tune cluster </code> </a> </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin tune cluster resp3_default disabled </span></span></code></pre> </div> </li> <li> <p> <a href="/docs/latest/operate/rs/7.4/references/rest-api/requests/cluster/policy/#put-cluster-policy"> Update cluster policy </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/policy </span></span><span class="line"><span class="cl"><span class="o">{</span> <span class="s2">"resp3_default"</span>: <span class="nb">false</span> <span class="o">}</span> </span></span></code></pre> </div> </li> </ul> <h2 id="client-prerequisites-for-redis-72-upgrade"> Client prerequisites for Redis 7.2 upgrade </h2> <p> The Redis clients <a href="https://redis.uptrace.dev/"> Go-Redis </a> version 9 and <a href="https://redis.github.io/lettuce/"> Lettuce </a> versions 6 and later use RESP3 by default. If you use either client to run Redis Stack commands, you should set the client's protocol version to RESP2 before upgrading your database to Redis version 7.2 to prevent potential application issues due to RESP3 breaking changes. </p> <h3 id="go-redis"> Go-Redis </h3> <p> For applications using Go-Redis v9.0.5 or later, set the protocol version to RESP2: </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> <h3 id="lettuce"> Lettuce </h3> <p> To set the protocol version to RESP2 with Lettuce v6 or later: </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> <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/compatibility/resp/"/> <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/xgroup-help/.html
<section class="prose w-full py-12"> <h1 class="command-name"> XGROUP HELP </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">XGROUP HELP</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(1) </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @stream </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> The <code> XGROUP HELP </code> command returns a helpful text describing the different subcommands. </p> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#arrays"> Array reply </a> : a list of sub-commands and their descriptions. <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/xgroup-help/"/> <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-bumpepoch/.html
<section class="prose w-full py-12"> <h1 class="command-name"> CLUSTER BUMPEPOCH </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">CLUSTER BUMPEPOCH</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> Advances the cluster config epoch. </p> <p> The <code> CLUSTER BUMPEPOCH </code> command triggers an increment to the cluster's config epoch from the connected node. The epoch will be incremented if the node's config epoch is zero, or if it is less than the cluster's greatest epoch. </p> <p> <strong> Note: </strong> config epoch management is performed internally by the cluster, and relies on obtaining a consensus of nodes. The <code> CLUSTER BUMPEPOCH </code> attempts to increment the config epoch <strong> WITHOUT </strong> getting the consensus, so using it may violate the "last failover wins" rule. Use it with caution. </p> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <p> One of the following: </p> <ul> <li> <a href="../../develop/reference/protocol-spec#bulk-strings"> Bulk string reply </a> : <code> BUMPED </code> if the epoch was incremented. </li> <li> <a href="../../develop/reference/protocol-spec#bulk-strings"> Bulk string reply </a> : <code> STILL </code> if the node already has the greatest configured epoch in the cluster. </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/cluster-bumpepoch/"/> <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-get-rejected/.html
<section class="prose w-full py-12 max-w-none"> <h1> redis-di get-rejected </h1> <p class="text-lg -mt-5 mb-10"> Returns all the stored rejected entries </p> <h2 id="usage"> Usage </h2> <pre tabindex="0"><code>Usage: redis-di get-rejected [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> max_records </code> : </p> <ul> <li> Type: <intrange x=""> =1&gt; </intrange> </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --max-records </code> </li> </ul> <p> Maximum rejected records per DLQ </p> </li> <li> <p> <code> oldest </code> : </p> <ul> <li> Type: BOOL </li> <li> Default: <code> false </code> </li> <li> Usage: <code> --oldest -o </code> </li> </ul> <p> Displays the oldest rejected records. If omitted, most resent records will be retrieved </p> </li> <li> <p> <code> dlq_name </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --dlq-name </code> </li> </ul> <p> Only prints the rejected records for the specified DLQ (Dead Letter Queue) name </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 get-rejected [OPTIONS] Returns all the stored rejected entries 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 --max-records INTEGER RANGE Maximum rejected records per DLQ [x&gt;=1] -o, --oldest Displays the oldest rejected records. If omitted, most resent records will be retrieved --dlq-name TEXT Only prints the rejected records for the specified DLQ (Dead Letter Queue) name --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-get-rejected/"/> <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/durability-ha/clustering/.html
<section class="prose w-full py-12 max-w-none"> <h1> Database clustering </h1> <p class="text-lg -mt-5 mb-10"> Clustering to allow customers to spread the load of a Redis process over multiple cores and the RAM of multiple servers. </p> <p> Source available <a href="https://redislabs.com/redis-features/redis"> Redis </a> is a single-threaded process to provide speed and simplicity. A single Redis process is bound by the CPU core that it is running on and available memory on the server. </p> <p> Redis Enterprise Software supports database clustering to allow customers to spread the load of a Redis process over multiple cores and the RAM of multiple servers. A database cluster is a set of Redis processes where each process manages a subset of the database keyspace. </p> <p> The keyspace of a Redis Enterprise cluster is partitioned into database shards. Each shard resides on a single node and is managed by that node. Each node in a Redis database cluster can manage multiple shards. The key space in the shards is divided into hash slots. The slot of a key is determined by a hash of the key name or part of the key name. </p> <p> Database clustering is transparent to the Redis client that connects to the database. The Redis client accesses the database through a single endpoint that automatically routes all operations to the relevant shards. You can connect an application to a single Redis process or a clustered database without any difference in the application logic. </p> <h2 id="terminology"> Terminology </h2> <p> In clustering, these terms are commonly used: </p> <ul> <li> Tag or Hash Tag - A part of the key that is used in the hash calculation. </li> <li> Slot or Hash Slot - The result of the hash calculation. </li> <li> Shard - Redis process that is part of the Redis clustered database. </li> </ul> <h2 id="when-to-use-clustering-sharding"> When to use clustering (sharding) </h2> <p> Clustering is an efficient way of scaling Redis that should be used when: </p> <ul> <li> The dataset is large enough to benefit from using the RAM resources of more than one node. When a dataset is more than 25 GB (50 GB for RoF), we recommend that you enable clustering to create multiple shards of the database and spread the data requests across nodes. </li> <li> The operations performed against the database are CPU-intensive, resulting in performance degradation. By having multiple CPU cores manage the database's shards, the load of operations is distributed among them. </li> </ul> <h2 id="number-of-shards"> Number of shards </h2> <p> When enabling database clustering, you can set the number of database shards. The minimum number of shards per database is 2 and the maximum depends on the subscription youΒ purchased. </p> <p> After you enable database clustering and set the number of shards, you cannot deactivate database clustering or reduce the number of shards. You can only increase the number of shards by a multiple of the current number of shards. For example, if the current number of shards is 3, you can increase the number of shards to 6, 9, or 12. </p> <h2 id="supported-hashing-policies"> Supported hashing policies </h2> <h3 id="standard-hashing-policy"> Standard hashing policy </h3> <p> When using the standard hashing policy, a clustered Redis Enterprise database behaves similarly to a standard <a href="/docs/latest/operate/oss_and_stack/reference/cluster-spec/#hash-tags"> Redis Community Edition cluster </a> , except when using multiple hash tags in a key's name. We recommend using only a single hash tag in a key name for hashing in Redis Enterprise. </p> <ul> <li> <p> <strong> Keys with a hash tag </strong> : a key's hash tag is any substring between <code> { </code> and <code> } </code> in the key's name. When a key's name includes the pattern <code> {...} </code> , the hash tag is used as input for the hashing function. </p> <p> For example, the following key names have the same hash tag and map to the same hash slot: <code> foo{bar} </code> , <code> {bar}baz </code> , and <code> foo{bar}baz </code> . </p> </li> <li> <p> <strong> Keys without a hash tag </strong> : when a key does not contain the <code> {...} </code> pattern, the entire key's name is used for hashing. </p> </li> </ul> <p> You can use a hash tag to store related keys in the same hash slot so multi-key operations can run on these keys. If you do not use a hash tag in the key's name, the keys are distributed evenly across the keyspace's shards. If your application does not perform multi-key operations, you do not need to use hash tags. </p> <h3 id="custom-hashing-policy"> Custom hashing policy </h3> <p> You can configure a custom hashing policy for a clustered database. A custom hashing policy is required when different keys need to be kept together on the same shard to allow multi-key operations. The custom hashing policy is provided through a set of Perl Compatible Regular Expressions (PCRE) rules that describe the dataset's key name patterns. </p> <p> To configure a custom hashing policy, enter the regular expression (RegEx) rules that identify the substring in the key's name - hash tag -- on which hashing is done. The hash tag is denoted in the RegEx by the use of the `tag` named subpattern. Different keys that have the same hash tag are stored and managed in the same slot. </p> <p> After you enable the custom hashing policy, the following default RegEx rules are implemented. Update these rules to fit your specific logic: </p> <table> <thead> <tr> <th> RegEx Rule </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> .*{(?&lt;tag&gt;.*)}.* </td> <td> Hashing is done on the substring between the curly braces. </td> </tr> <tr> <td> (?&lt;tag&gt;.*) </td> <td> The entire key's name is used for hashing. </td> </tr> </tbody> </table> <p> You can modify existing rules, add new ones, delete rules, or change their order to suit your application's requirements. </p> <h3 id="custom-hashing-policy-notes-and-limitations"> Custom hashing policy notes and limitations </h3> <ol> <li> You can define up to 32 RegEx rules, each up to 256 characters. </li> <li> RegEx rules are evaluated in order, and the first rule matched is used. Therefore, you should place common key name patterns at the beginning of the rule list. </li> <li> Key names that do not match any of the RegEx rules trigger an error. </li> <li> The '.*(?&lt;tag&gt;)' RegEx rule forces keys into a single slot because the hash key is always empty. Therefore, when used, this should be the last, catch-all rule. </li> <li> The following flag is enabled in the regular expression parser: PCRE_ANCHORED: the pattern is constrained to match only at the start of the string being searched. </li> </ol> <h2 id="change-the-hashing-policy"> Change the hashing policy </h2> <p> The hashing policy of a clustered database can be changed. However, most hashing policy changes trigger the deletion (FLUSHDB) of the data before they can be applied. </p> <p> Examples of such changes include: </p> <ul> <li> Changing the hashing policy from standard to custom or conversely, custom to standard. </li> <li> Changing the order of custom hashing policy rules. </li> <li> Adding new rules in the custom hashing policy. </li> <li> Deleting rules from the custom hashing policy. </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> The recommended workaround for updates that are not enabled, or require flushing the database, is to back up the database and import the data to a newly configured database. </div> </div> <h2 id="multikey-operations"> Multi-key operations </h2> <p> Operations on multiple keys in a clustered database are supported with the following limitations: </p> <ul> <li> <p> <strong> Multi-key commands </strong> : Redis offers several commands that accept multiple keys as arguments. In a clustered database, most multi-key commands are not allowed across slots. The following multi-key commands <strong> are allowed </strong> across slots: DEL, MSET, MGET, EXISTS, UNLINK, TOUCH </p> <p> In Active-Active databases, multi-key write commands (DEL, MSET, UNLINK) can only be run on keys that are in the same slot. However, the following multi-key commands <strong> are allowed </strong> across slots in Active-Active databases: MGET, EXISTS, and TOUCH. </p> <p> Commands that affect all keys or keys that match a specified pattern are allowed in a clustered database, for example: FLUSHDB, FLUSHALL, KEYS </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> When using these commands in a sharded setup, the command is distributed across multiple shards and the responses from all shards are combined into a single response. </div> </div> </li> <li> <p> <strong> Geo commands </strong> : For the <a href="/docs/latest/commands/georadius/"> GEORADIUS </a> and <a href="/docs/latest/commands/georadiusbymember/"> GEORADIUSBYMEMBER </a> commands, the STORE and STOREDIST options can only be used when all affected keys reside in the same slot. </p> </li> <li> <p> <strong> Transactions </strong> : All operations within a WATCH / MULTI / EXEC block should be performed on keys that are mapped to the same slot. </p> </li> <li> <p> <strong> Lua scripts </strong> : All keys used by a Lua script must be mapped to the same slot and must be provided as arguments to the EVAL / EVALSHA commands (as per the Redis specification). Using keys in a Lua script that were not provided as arguments might violate the sharding concept but do not result in the proper violation error being returned. </p> </li> <li> <p> <strong> Renaming/Copy keys </strong> : The use of the RENAME / RENAMENX / COPY commands is allowed only when the key's original and new values are mapped to the same slot. </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/databases/durability-ha/clustering/"/> <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/.html
<section class="prose w-full py-12 max-w-none"> <h1> Libraries and tools </h1> </section>
https://redis.io/docs/latest/operate/rs/references/rest-api/requests/bdbs/modules/config/.html
<section class="prose w-full py-12 max-w-none"> <h1> Database modules config requests </h1> <p class="text-lg -mt-5 mb-10"> Configure Redis module requests </p> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#post-bdb-modules-config"> POST </a> </td> <td> <code> /v1/bdbs/{uid}/modules/config </code> </td> <td> Configure module </td> </tr> </tbody> </table> <h2 id="post-bdb-modules-config"> Configure module </h2> <pre><code>POST /v1/bdbs/{string: uid}/modules/config </code></pre> <p> Use the module runtime configuration command (if defined) to configure new arguments for the module. </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/#edit_bdb_module"> edit_bdb_module </a> </td> </tr> </tbody> </table> <h3 id="post-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <pre><code>POST /bdbs/1/modules/config </code></pre> <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">"modules"</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">"module_name"</span><span class="p">:</span> <span class="s2">"search"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"module_args"</span><span class="p">:</span> <span class="s2">"MINPREFIX 3 MAXEXPANSIONS 1000"</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="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="request-body"> Request body </h4> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> modules </td> <td> list of JSON objects </td> <td> List of modules (module_name) and their new configuration settings (module_args) </td> </tr> <tr> <td> module_name </td> <td> <code> search </code> <br/> <code> ReJSON </code> <br/> <code> graph </code> <br/> <code> timeseries </code> <br/> <code> bf </code> </td> <td> Module's name </td> </tr> <tr> <td> module_args </td> <td> string </td> <td> Module command line arguments (pattern does not allow special characters &amp;,&lt;,&gt;,”) </td> </tr> </tbody> </table> <h3 id="post-response"> Response </h3> <p> Returns a status code. If an error occurs, the response body may include an error code and message with more details. </p> <h3 id="post-error-codes"> Error codes </h3> <p> When errors are reported, the server may return a JSON object with <code> error_code </code> and <code> message </code> field that provide additional information. The following are possible <code> error_code </code> values: </p> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> db_not_exist </td> <td> Database with given UID doesn't exist in cluster </td> </tr> <tr> <td> missing_field </td> <td> "module_name" or "module_args" are not defined in request </td> </tr> <tr> <td> invalid_schema </td> <td> JSON object received is not a dict object </td> </tr> <tr> <td> param_error </td> <td> "module_args" parameter was not parsed properly </td> </tr> <tr> <td> module_not_exist </td> <td> Module with given "module_name" does not exist for the database </td> </tr> </tbody> </table> <h3 id="post-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, module updated on bdb. </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5"> 404 Not Found </a> </td> <td> bdb not found. </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1"> 400 Bad Request </a> </td> <td> Bad or missing configuration parameters. </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7"> 406 Not Acceptable </a> </td> <td> Module does not support runtime configuration of arguments. </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/bdbs/modules/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/7.4/references/rest-api/requests/actions/bdb/.html
<section class="prose w-full py-12 max-w-none"> <h1> Database actions requests </h1> <p class="text-lg -mt-5 mb-10"> Database actions requests </p> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#get-db-actions"> GET </a> </td> <td> <code> /v1/actions/bdb/{bdb_uid} </code> </td> <td> Get the status of a specific database's actions </td> </tr> </tbody> </table> <h2 id="get-db-actions"> Get database actions </h2> <pre tabindex="0"><code>GET /v1/actions/bdb/{bdb_uid} </code></pre> <p> Get the status of all currently executing, pending, or completed state-machine-related actions for a specific database. This API tracks short-lived API requests that return <code> action_uid </code> . </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_status_of_cluster_action"> view_status_of_cluster_action </a> </td> </tr> </tbody> </table> <h3 id="get-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <pre tabindex="0"><code>GET /actions/bdb/1 </code></pre> <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> string </td> <td> Unique database ID </td> </tr> </tbody> </table> <h3 id="get-response"> Response </h3> <p> Returns an array of JSON objects with attributes from <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/action/"> actions </a> and <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/state-machine/"> state machines </a> . </p> <p> Each action contains the following attributes: <code> name </code> , <code> action_uid </code> , <code> status </code> , and <code> progress </code> . </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="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"action_uid"</span><span class="p">:</span> <span class="s2">"8afc7f70-f3ae-4244-a5e9-5133e78b2e97"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"heartbeat"</span><span class="p">:</span> <span class="mi">1703067908</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"name"</span><span class="p">:</span> <span class="s2">"SMUpdateBDB"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"object_name"</span><span class="p">:</span> <span class="s2">"bdb:1"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"pending_ops"</span><span class="p">:</span> <span class="p">{},</span> </span></span><span class="line"><span class="cl"> <span class="nt">"progress"</span><span class="p">:</span> <span class="mf">50.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"state"</span><span class="p">:</span> <span class="s2">"proxy_policy"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"status"</span><span class="p">:</span> <span class="s2">"active"</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> <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, response provides info about state-machine actions </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5"> 404 Not Found </a> </td> <td> bdb not found </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/actions/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/rs/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/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>