url
stringlengths
38
157
content
stringlengths
72
15.1M
https://redis.io/docs/latest/operate/rs/references/cli-utilities/crdb-cli/crdb/update/.html
<section class="prose w-full py-12 max-w-none"> <h1> crdb-cli crdb update </h1> <p class="text-lg -mt-5 mb-10"> Updates the configuration of an Active-Active database. </p> <p> Updates the configuration of an Active-Active database. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">crdb-cli crdb update --crdb-guid &lt;guid&gt; </span></span><span class="line"><span class="cl"> <span class="o">[</span>--no-wait<span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>--force<span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>--default-db-config &lt;configuration&gt; <span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>--default-db-config-file &lt;filename&gt;<span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>--compression &lt;0-6&gt;<span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>--causal-consistency <span class="o">{</span> <span class="nb">true</span> <span class="p">|</span> <span class="nb">false</span> <span class="o">}</span> <span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>--credentials <span class="nv">id</span><span class="o">=</span>&lt;id&gt;,username<span class="o">=</span>&lt;username&gt;,password<span class="o">=</span>&lt;password&gt; <span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>--encryption <span class="o">{</span> <span class="nb">true</span> <span class="p">|</span> <span class="nb">false</span> <span class="o">}</span> <span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>--oss-cluster <span class="o">{</span> <span class="nb">true</span> <span class="p">|</span> <span class="nb">false</span> <span class="o">}</span> <span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>--featureset-version <span class="o">{</span> <span class="nb">true</span> <span class="p">|</span> <span class="nb">false</span> <span class="o">}</span> <span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>--memory-size &lt;maximum_memory&gt;<span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>--bigstore-ram-size &lt;maximum_memory&gt;<span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span>--update-module <span class="nv">name</span><span class="o">=</span>&lt;name&gt;,featureset_version<span class="o">=</span>&lt;version&gt;<span class="o">]</span> </span></span></code></pre> </div> <p> If you want to change the configuration of the local instance only, use <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/"> <code> rladmin </code> </a> instead. </p> <h3 id="parameters"> Parameters </h3> <table> <thead> <tr> <th> Parameter </th> <th> Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> crdb-guid &lt;guid&gt; </td> <td> string </td> <td> GUID of the Active-Active database (required) </td> </tr> <tr> <td> bigstore-ram-size &lt;maximum_memory&gt; </td> <td> size in bytes, kilobytes (KB), or gigabytes (GB) </td> <td> Maximum RAM limit for the databases with Auto Tiering enabled, if activated </td> </tr> <tr> <td> memory-size &lt;maximum_memory&gt; </td> <td> size in bytes, kilobytes (KB), or gigabytes (GB) </td> <td> Maximum database memory (required) </td> </tr> <tr> <td> causal-consistency </td> <td> true <br/> false </td> <td> <a href="/docs/latest/operate/rs/databases/active-active/causal-consistency/"> Causal consistency </a> applies updates to all instances in the order they were received </td> </tr> <tr> <td> compression </td> <td> 0-6 </td> <td> The level of data compression: <br/> <br/> 0 = No compression <br/> <br/> 6 = High compression and resource load (Default: 3) </td> </tr> <tr> <td> credentials id=&lt;id&gt;,username=&lt;username&gt;,password=&lt;password&gt; </td> <td> strings </td> <td> Updates the credentials for access to the instance </td> </tr> <tr> <td> default-db-config &lt;configuration&gt; </td> <td> </td> <td> Default database configuration from stdin </td> </tr> <tr> <td> default-db-config-file &lt;filename&gt; </td> <td> filepath </td> <td> Default database configuration from file </td> </tr> <tr> <td> encryption </td> <td> true <br/> false </td> <td> Activates or deactivates encryption </td> </tr> <tr> <td> force </td> <td> </td> <td> Force an update even if there are no changes </td> </tr> <tr> <td> no-wait </td> <td> </td> <td> Do not wait for the command to finish </td> </tr> <tr> <td> oss-cluster </td> <td> true <br/> false </td> <td> Activates or deactivates OSS Cluster mode </td> </tr> <tr> <td> eviction-policy </td> <td> noeviction <br/> allkeys-lru <br/> allkeys-lfu <br/> allkeys-random <br/> volatile-lru <br/> volatile-lfu <br/> volatile-random <br/> volatile-ttl </td> <td> Updates <a href="/docs/latest/operate/rs/databases/memory-performance/eviction-policy/"> eviction policy </a> </td> </tr> <tr> <td> featureset-version </td> <td> true <br/> false </td> <td> Updates to latest FeatureSet version </td> </tr> <tr> <td> update-module name=&lt;name&gt;,featureset_version=&lt;version&gt; </td> <td> strings </td> <td> Update a module to the specified version </td> </tr> </tbody> </table> <h3 id="returns"> Returns </h3> <p> Returns the task ID of the task that is updating the database. </p> <p> If <code> --no-wait </code> is specified, the command exits. Otherwise, it will wait for the database to be updated and then return "finished." </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">$ crdb-cli crdb update --crdb-guid 968d586c-e12d-4b8f-8473-42eb88d0a3a2 --memory-size 2GBTask 7e98efc1-8233-4578-9e0c-cdc854b8af9e created </span></span><span class="line"><span class="cl"> ---&gt; Status changed: queued -&gt; started </span></span><span class="line"><span class="cl"> ---&gt; Status changed: started -&gt; finished </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/crdb-cli/crdb/update/"/> <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/crdb-cli/crdb/remove-instance/.html
<section class="prose w-full py-12 max-w-none"> <h1> crdb-cli crdb remove-instance </h1> <p class="text-lg -mt-5 mb-10"> Removes a peer replica from an Active-Active database. </p> <p> Removes a peer replica instance from the Active-Active database and deletes the instance and its data from the participating cluster. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">crdb-cli crdb remove-instance --crdb-guid &lt;guid&gt; </span></span><span class="line"><span class="cl"> --instance-id &lt;instance-id&gt; </span></span><span class="line"><span class="cl"> <span class="o">[</span> --force <span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span> --no-wait <span class="o">]</span> </span></span></code></pre> </div> <p> If the cluster cannot communicate with the instance that you want to remove, you can: </p> <ol> <li> <p> Use the <code> --force </code> option to remove the instance from the Active-Active database without purging the data from the instance. </p> </li> <li> <p> Run <a href="/docs/latest/operate/rs/references/cli-utilities/crdb-cli/crdb/purge-instance/"> <code> crdb-cli crdb purge-instance </code> </a> from the removed instance to delete the Active-Active database and its data. </p> </li> </ol> <h3 id="parameters"> Parameters </h3> <table> <thead> <tr> <th> Parameter </th> <th> Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> crdb-guid </td> <td> string </td> <td> The GUID of the database (required) </td> </tr> <tr> <td> instance-id </td> <td> string </td> <td> The ID of the local instance to remove (required) </td> </tr> <tr> <td> force </td> <td> </td> <td> Removes the instance without purging data from the instance. <br/> If --force is specified, you must run <a href="/docs/latest/operate/rs/references/cli-utilities/crdb-cli/crdb/purge-instance/"> <code> crdb-cli crdb purge-instance </code> </a> from the removed instance. </td> </tr> <tr> <td> no-wait </td> <td> </td> <td> Does not wait for the task to complete </td> </tr> </tbody> </table> <h3 id="returns"> Returns </h3> <p> Returns the task ID of the task that is deleting the instance. </p> <p> If <code> --no-wait </code> is specified, the command exits. Otherwise, it will wait for the instance to be removed and return <code> finished </code> . </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">$ crdb-cli crdb remove-instance --crdb-guid db6365b5-8aca-4055-95d8-7eb0105c0b35 --instance-id <span class="m">2</span> --force </span></span><span class="line"><span class="cl">Task b1eba5ba-90de-49e9-8678-d66daa1afb51 created </span></span><span class="line"><span class="cl"> ---&gt; Status changed: queued -&gt; started </span></span><span class="line"><span class="cl"> ---&gt; Status changed: started -&gt; finished </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/crdb-cli/crdb/remove-instance/"/> <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-delconsumer/.html
<section class="prose w-full py-12"> <h1 class="command-name"> XGROUP DELCONSUMER </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">XGROUP DELCONSUMER key group consumer</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> @write </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 <code> XGROUP DELCONSUMER </code> command deletes a consumer from the consumer group. </p> <p> Sometimes it may be useful to remove old consumers since they are no longer used. </p> <p> Note, however, that any pending messages that the consumer had will become unclaimable after it was deleted. It is strongly recommended, therefore, that any pending messages are claimed or acknowledged prior to deleting the consumer from the group. </p> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : the number of pending messages the consumer had before it was deleted. <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-delconsumer/"/> <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/redisjson/redisjson-1.0-release-notes.html
<section class="prose w-full py-12 max-w-none"> <h1> RedisJSON 1.0 release notes </h1> <p class="text-lg -mt-5 mb-10"> Serialization cache for JSON.GET. </p> <h2 id="requirements"> Requirements </h2> <p> RedisJSON v1.0.8 requires: </p> <ul> <li> Minimum Redis compatibility version (database): 4.0.0 </li> <li> Minimum Redis Enterprise Software version (cluster): 5.0.0 </li> </ul> <h2 id="v108-august-2021"> v1.0.8 (August 2021) </h2> <p> This is a maintenance release for version 1.0. </p> <p> Update urgency: <code> LOW </code> - No need to upgrade unless there are new features you want to use. </p> <p> Details: </p> <ul> <li> <p> Enhancements: </p> <ul> <li> # <a href="https://github.com/redisjson/redisjson/issues/257"> 257 </a> Support inter shards TLS capability </li> </ul> </li> <li> <p> Bug fixes: </p> <ul> <li> # <a href="https://github.com/redisjson/redisjson/issues/282"> 282 </a> Change <code> JSON.DEBUG </code> first key index to 2 </li> </ul> </li> </ul> <h2 id="v107-december-2020"> v1.0.7 (December 2020) </h2> <p> This is a maintenance release for version 1.0. </p> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> <a href="https://github.com/RedisJSON/RedisJSON/pull/222"> #222 </a> Validate path is not empty. </li> <li> <a href="https://github.com/RedisJSON/RedisJSON/pull/253"> #253 </a> <code> NULL </code> de-reference after error. </li> </ul> <h2 id="v105-september-2020"> v1.0.5 (September 2020) </h2> <p> This is a maintenance release for version 1.0. </p> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Enhancements: <ul> <li> Republish docker image based on Redis 6 </li> </ul> </li> <li> Bugfixes: <ul> <li> # <a href="https://github.com/RedisJSON/RedisJSON/issues/200"> 200 </a> Following a call to JSON.ARRPOP and JSON.STRAPPEND, the LRU cache should be invalidated. </li> </ul> </li> </ul> <h2 id="v104-february-2019"> v1.0.4 (February 2019) </h2> <p> This release updates the version to 1.0.4. </p> <h2 id="v103-12-september-2018"> v1.0.3 (12 September 2018) </h2> <p> This release disables the cache by default, and allows an explicit <code> CACHE </code> <code> &lt;ON|OFF&gt; </code> module argument to enable it. </p> <h2 id="v102-10-september-2018"> v1.0.2 (10 September 2018) </h2> <p> This release contains some bug fixes over 1.0.2. It also includes some ci changes as well. </p> <h2 id="v101-december-2017"> v1.0.1 (December 2017) </h2> <p> This version provides a serialization cache for JSON.GET (when used with the default parameters). The cache policy is LRU (last recently used), and extremely small items are not cached. </p> <p> In the future, options may be added to configure the cache, but for the time being the cache is intended to be small and transparent. </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/stack-with-enterprise/release-notes/redisjson/redisjson-1.0-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/operate/rs/7.4/clusters/remove-node/.html
<section class="prose w-full py-12 max-w-none"> <h1> Remove a cluster node </h1> <p class="text-lg -mt-5 mb-10"> Remove a node from your Redis Enterprise cluster. </p> <p> You might want to remove a node from a Redis Enterprise cluster for one of the following reasons: </p> <ul> <li> To <a href="#permanently-remove-a-node"> permanently remove a node </a> if you no longer need the extra capacity. </li> <li> To <a href="#replace-a-faulty-node"> replace a faulty node </a> with a healthy node. </li> <li> To <a href="#replace-a-healthy-node"> replace a healthy node </a> with a different node. </li> </ul> <p> You can configure <a href="/docs/latest/operate/rs/7.4/clusters/monitoring/#cluster-alerts"> email alerts from the cluster </a> to notify you of cluster changes, including when a node is removed. </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> Read through these explanations thoroughly before taking any action. </div> </div> <h2 id="permanently-remove-a-node"> Permanently remove a node </h2> <p> Permanently removing a node means you are decreasing cluster capacity. Before trying to remove a node, make sure that the cluster has enough capacity for all resources without that node, otherwise you cannot remove the node. </p> <p> If there is not enough capacity in the cluster to facilitate removing the node, you can either delete databases or add another node instead of the one you would like to remove. </p> <p> During the removal process, the cluster migrates all resources from the node being removed to other nodes in the cluster. In order to ensure database connectivity, and database high availability (when replication is enabled), the cluster first creates replacement shards or endpoints on one of the other nodes in the cluster, initiates failover as needed, and only then removes the node. </p> <p> If a cluster has only two nodes (which is not recommended for production deployments) and some databases have replication enabled, you cannot remove a node. </p> <h2 id="replace-a-faulty-node"> Replace a faulty node </h2> <p> If the cluster has a faulty node that you would like to replace, you only need to add a new node to the cluster. The cluster recognizes the existence of a faulty node and automatically replaces the faulty node with the new node. </p> <p> For guidelines, refer to <a href="/docs/latest/operate/rs/7.4/clusters/replace-node/"> Replacing a faulty node </a> . </p> <h2 id="replace-a-healthy-node"> Replace a healthy node </h2> <p> If you would like to replace a healthy node with a different node, you must first add the new node to the cluster, migrate all the resources from the node you would like to remove, and only then remove the node. </p> <p> For further guidance, refer to <a href="/docs/latest/operate/rs/7.4/clusters/add-node/"> adding a new node to a cluster </a> . </p> <p> You can migrate resources by using the <code> rladmin </code> command-line interface (CLI). For guidelines, refer to <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/"> <code> rladmin </code> command-line interface (CLI) </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> The <a href="/docs/latest/operate/rs/7.4/networking/cluster-dns/"> DNS records </a> must be updated each time a node is added or replaced. </div> </div> <h2 id="remove-a-node"> Remove a node </h2> <p> To remove a node using the Cluster Manager UI: </p> <ol> <li> <p> If you are using the new Cluster Manager UI, switch to the legacy admin console. </p> <a href="/docs/latest/images/rs/screenshots/switch-to-legacy-ui.png" sdata-lightbox="/images/rs/screenshots/switch-to-legacy-ui.png"> <img alt="Select switch to legacy admin console from the dropdown." src="/docs/latest/images/rs/screenshots/switch-to-legacy-ui.png" width="300px"/> </a> </li> <li> <p> On the <strong> nodes </strong> page, select the node you want to remove. </p> </li> <li> <p> Click <strong> Remove </strong> at the top of the <strong> node </strong> page. </p> </li> <li> <p> Confirm you want to <strong> Remove </strong> the node when prompted. </p> </li> <li> <p> Redis Enterprise Software examines the node and the cluster and takes the actions required to remove the node. </p> </li> <li> <p> At any point, you can click the <strong> Abort </strong> button to stop the process. When aborted, the current internal action is completed, and then the process stops. </p> </li> <li> <p> Once the process finishes, the node is no longer shown in the UI. </p> </li> </ol> <p> To remove a node using the REST API, use <a href="/docs/latest/operate/rs/7.4/references/rest-api/requests/nodes/actions/#post-node-action"> <code> POST /v1/nodes/&lt;node_id&gt;/actions/remove </code> </a> . </p> <p> By default, the remove node action completes after all resources migrate off the removed node. Node removal does not wait for migrated shards' persistence files to be created on the new nodes. </p> <p> To change node removal to wait for the creation of new persistence files for all migrated shards, set <code> wait_for_persistence </code> to <code> true </code> in the request body or <a href="/docs/latest/operate/rs/7.4/references/rest-api/requests/cluster/policy/#put-cluster-policy"> update the cluster policy </a> <code> persistent_node_removal </code> to <code> true </code> to change the cluster's default behavior. </p> <p> For example: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">POST https://&lt;hostname&gt;:9443/v1/nodes/&lt;node_id&gt;/actions/remove </span></span><span class="line"><span class="cl"><span class="o">{</span> </span></span><span class="line"><span class="cl"> <span class="s2">"wait_for_persistence"</span>: <span class="nb">true</span> </span></span><span class="line"><span class="cl"><span class="o">}</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"> Note: </div> If you need to add a removed node back to the cluster, you must <a href="/docs/latest/operate/rs/7.4/installing-upgrading/uninstalling/"> uninstall </a> and <a href="/docs/latest/operate/rs/7.4/installing-upgrading/"> reinstall </a> the software on that node. </div> </div> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/clusters/remove-node/"/> <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/app-failover-active-active/.html
<section class="prose w-full py-12 max-w-none"> <h1> Application failover with Active-Active databases </h1> <p class="text-lg -mt-5 mb-10"> How to failover your application to connect to a remote replica. </p> <p> Active-Active Redis deployments don't have a built-in failover or failback mechanism for application connections. An application deployed with an Active-Active database connects to a replica of the database that is geographically nearby. If that replica is not available, the application can failover to a remote replica, and failback again if necessary. In this article we explain how this process works. </p> <p> Active-Active connection failover can improve data availability, but can negatively impact data consistency. Active-Active replication, like Redis replication, is asynchronous. An application that fails over to another replica can miss write operations. If the failed replica saved the write operations in persistent storage, then the write operations are processed when the failed replica recovers. </p> <h2 id="detecting-failure"> Detecting Failure </h2> <p> Your application can detect two types of failure: </p> <ol> <li> <strong> Local failures </strong> - The local replica is down or otherwise unavailable </li> <li> <strong> Replication failures </strong> - The local replica is available but fails to replicate to or from remote replicas </li> </ol> <h3 id="local-failures"> Local Failures </h3> <p> Local failure is detected when the application is unable to connect to the database endpoint for any reason. Reasons for a local failure can include: multiple node failures, configuration errors, connection refused, connection timed out, unexpected protocol level errors. </p> <h3 id="replication-failures"> Replication Failures </h3> <p> Replication failures are more difficult to detect reliably without causing false positives. Replication failures can include: network split, replication configuration issues, remote replica failures. </p> <p> The most reliable method for health-checking replication is by using the Redis publish/subscribe (pub/sub) mechanism. </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> Note that this document does not suggest that Redis pub/sub is reliable in the common sense. Messages can get lost in certain conditions, but that is acceptable in this case because typically the application determines that replication is down only after not being able to deliver a number of messages over a period of time. </div> </div> <p> When you use the pub/sub data type to detect failures, the application: </p> <ol> <li> Connects to all replicas and subscribes to a dedicated channel for each replica. </li> <li> Connects to all replicas and periodically publishes a uniquely identifiable message. </li> <li> Monitors received messages and ensures that it is able to receive its own messages within a predetermined window of time. </li> </ol> <p> You can also use known dataset changes to monitor the reliability of the replication stream, but pub/sub is preferred method because: </p> <ol> <li> It does not involve dataset changes. </li> <li> It does not make any assumptions about the dataset. </li> <li> Pub/sub messages are delivered as replicated effects and are a more reliable indicator of a live replication link. In certain cases, dataset keys may appear to be modified even if the replication link fails. This happens because keys may receive updates through full-state replication (re-sync) or through online replication of effects. </li> </ol> <h2 id="impact-of-sharding-on-failure-detection"> Impact of sharding on failure detection </h2> <p> If your sharding configuration is symmetric, make sure to use at least one key (PUB/SUB channels or real dataset key) per shard. Shards are replicated individually and are vulnerable to failure. Symmetric sharding configurations have the same number of shards and hash slots for all replicas. We do not recommend an asymmetric sharding configuration, which requires at least one key per hash slot that intersects with a pair of shards. </p> <p> To make sure that there is at least one key per shard, the application should: </p> <ol> <li> Use the Cluster API to retrieve the database sharding configuration. </li> <li> Compute a number of key names, such that there is one key per shard. </li> <li> Use those key names as channel names for the pub/sub mechanism. </li> </ol> <h3 id="failing-over"> Failing over </h3> <p> When the application needs to failover to another replica, it should simply re-establish its connections with the endpoint on the remote replica. Because Active/Active and Redis replication are asynchronous, the remote endpoint may not have all of the locally performed and acknowledged writes. </p> <p> It's best if your application doesn't read its own recent writes. Those writes can be either: </p> <ol> <li> Lost forever, if the local replica has an event such as a double failure or loss of persistent files. </li> <li> Temporarily unavailable, but will be available at a later time if the local replica's failure is temporary. </li> </ol> <!--- <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"><svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"/> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"/> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"/> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium">Note:</div> Sample code that maps a hash slot to a key name can be found in this Python script.</div> </div> ---> <h2 id="failback-decision"> Failback decision </h2> <p> Your application can use the same checks described above to continue monitoring the state of the failed replica after failover. </p> <p> To monitor the state of a replica during the failback process, you must make sure the replica is available, re-synced with the remote replicas, and not in stale mode. The PUB/SUB mechanism is an effective way to monitor this. </p> <p> Dataset-based mechanisms are potentially less reliable for several reasons: </p> <ol> <li> In order to determine that a local replica is not stale, it is not enough to simply read keys from it. You must also attempt to write to it. </li> <li> As stated above, remote writes for some keys appear in the local replica before the replication link is back up and while the replica is still in stale mode. </li> <li> A replica that was never written to never becomes stale, so on startup it is immediately ready but serves stale data for a longer period of time. </li> </ol> <h2 id="replica-configuration-changes"> Replica Configuration Changes </h2> <p> All failover and failback operations should be done strictly on the application side, and should not involve changes to the Active-Active configuration. The only valid case for re-configuring the Active-Active deployment and removing a replica is when memory consumption becomes too high because garbage collection cannot be performed. Once a replica is removed, it can only be re-joined as a new replica and it loses any writes that were not converged. </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/databases/active-active/develop/app-failover-active-active/"/> <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/get-started/process-lifecycle/.html
<section class="prose w-full py-12 max-w-none"> <h1> The API request lifecycle </h1> <p class="text-lg -mt-5 mb-10"> API requests follow specific lifecycle phases and states, based on the complexity and length of execution of the operation. </p> <p> All Redis Cloud <a href="/docs/latest/operate/rc/subscriptions/"> subscriptions </a> can leverage a RESTful API that permits operations against a variety of resources, including servers, services, and related infrastructure. </p> <p> <a href="/docs/latest/operate/rc/api/get-started/enable-the-api/"> Once it's enabled </a> , you can use the REST API to create, update, and delete subscriptions, databases, and other entities. </p> <p> API operations run asynchronously, which means that provisioning occurs in the background. When you submit a request, a background process starts working on it. The response object includes an ID that lets you determine the status of the background process as it performs its work. </p> <p> For operations that do not create or modify resources (such as most GET operations), the API is sychronous; that is, the response object reports the results of the request. </p> <p> Asynchronous operations have two main phases: processing and provisioning. A resource is not available until both phases are complete. </p> <a href="/docs/latest/images/rv/api/processing-and-provisioning.png" sdata-lightbox="/images/rv/api/processing-and-provisioning.png"> <img src="/docs/latest/images/rv/api/processing-and-provisioning.png"/> </a> <h2 id="task-processing"> Task processing </h2> <p> During this phase, the request is received, evaluated, planned, and executed. </p> <h3 id="use-tasks-to-track-requests"> Use tasks to track requests </h3> <p> Many operations are asychronous, including CREATE, UPDATE, and DELETE operations. The response objects for such operations provide a <code> taskId </code> identifier that lets you track the progress of the underlying operation. </p> <p> You can query the <code> taskId </code> to track the state of a specific task: </p> <div class="highlight"> <pre class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">GET <span class="s2">"https://[host]/v1/tasks/&lt;taskId&gt;"</span> </span></span></code></pre> </div> <p> You can also query the state of all active tasks or recently completed tasks in your account: </p> <div class="highlight"> <pre class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">GET <span class="s2">"https://[host]/v1/tasks"</span> </span></span></code></pre> </div> <h3 id="task-process-states"> Task process states </h3> <p> During the processing of a request, the task moves through these states: </p> <ul> <li> <code> received </code> - Request is received and awaits processing. </li> <li> <code> processing-in-progress </code> - A dedicated worker is processing the request. </li> <li> <code> processing-completed </code> - Request processing succeeded and the request is being provisioned (or de-provisioned, depending on the specific request). A <code> response </code> segment is included with the task status JSON response. The response includes a <code> resourceId </code> for each resource that the request creates, such as Subscription or Database ID. </li> <li> <code> processing-error </code> - Request processing failed. A detailed cause or reason is included in the task status JSON response. </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> A task that reaches the <code> received </code> state cannot be cancelled and it will await completion (i.e. processing and provisioning). If you wish to undo an operation that was performed by a task, perform a compensating action (for example: delete a subscription that was created unintentionally) </div> </div> <h2 id="task-provisioning-phase"> Task provisioning phase </h2> <p> When the processing phase succeeds and the task is in the <code> processing-completed </code> state, the provisioning phase starts. During the provisioning phase, the API orchestrates all of the infrastructure, resources, and dependencies required by the request. </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 term "provisioning" refers to all infrastructure changes required in order to apply the request. This includes provisioning new or additional infrastructure. </div> </div> <p> The provisioning phase may require several minutes to complete. You can query the resource identifier to track the progress of the provisioning phase. </p> <p> For example, when you provision a new subscription, use this API call to query the status of the subscription: </p> <div class="highlight"> <pre class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">GET <span class="s2">"https://[host]/v1/subscriptions/&lt;subscription-id&gt;"</span> </span></span></code></pre> </div> <p> Where the <code> &lt;subscription-id&gt; </code> is the resource ID that you receive when the task is in the <code> processing-completed </code> state. </p> <h3 id="provisioning-state-values"> Provisioning state values </h3> <p> During the provisioning of a resource (such as a subscription, database, or cloud account) the resource transitions through these states: </p> <ul> <li> <code> pending </code> - Provisioning is in progress. </li> <li> <code> active </code> - Provisioning completed successfully. </li> <li> <code> deleting </code> - De-provisioning and deletion is in progress. </li> <li> <code> error </code> - An error occurred during the provisioning phase, including the details of the error. </li> </ul> <h2 id="process-limitations"> Process limitations </h2> <p> The following limitations apply to asynchronous operations: </p> <ul> <li> <p> For each account, only one operation is <strong> processed </strong> concurrently. When multiple tasks are sent for the same account, they will be received and processed one after the other. </p> </li> <li> <p> The provisioning phase can be performed in parallel except: </p> <ul> <li> Subscription creation, update, and deletion: You cannot change (make non-active) more than three subscriptions at the same time. </li> <li> Database creation in an existing subscription: This can cause the subscription state to change from <code> active </code> to <code> pending </code> during database provisioning in cases such as database sizing that requires cluster resizing or updating cluster metadata. </li> </ul> </li> <li> <p> For example: </p> <ul> <li> Concurrently sending multiple "create database" tasks will cause each task to be in the <code> received </code> state, awaiting processing. </li> <li> When the first task starts processing it will be moved to the <code> processing-in-progress </code> state. </li> <li> When that first task is completed (either <code> processing-completed </code> or <code> processing-error </code> ), the second task will start processing, and so on. </li> <li> Typically, the processing phase is much faster than the provisioning phase, and multiple tasks will be in provisioned concurrently. </li> <li> If the creation of the database requires an update to the subscription, the subscription state is set to <code> pending </code> . When you create multiple databases one after the other, we recommend that you check the subscription state after the processing phase of each database create request. If the subscription is in <code> pending </code> state you must wait for the subscription changes to complete and the subscription state to return to <code> active </code> . </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/operate/rc/api/get-started/process-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/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/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/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/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/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/operate/rs/7.4/databases/configure/db-upgrade/.html
<section class="prose w-full py-12 max-w-none"> <h1> Change database upgrade configuration </h1> <p class="text-lg -mt-5 mb-10"> Configure cluster-wide policies that affect default database upgrades. </p> <p> Database upgrade configuration includes cluster-wide policies that affect default database upgrades. </p> <h2 id="edit-upgrade-configuration"> Edit upgrade configuration </h2> <p> To edit database upgrade configuration using the 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> Change database <a href="#upgrade-config-settings"> upgrade configuration settings </a> . </p> </li> <li> <p> Select <strong> Save </strong> . </p> </li> </ol> <h2 id="upgrade-config-settings"> Upgrade configuration settings </h2> <h3 id="database-shard-parallel-upgrade"> Database shard parallel upgrade </h3> <p> To change the number of shards upgraded in parallel during database upgrades, use one of the following methods: </p> <ul> <li> <p> Cluster Manager UI – Edit <strong> Database shard parallel upgrade </strong> in <a href="#edit-upgrade-configuration"> <strong> Upgrade configuration </strong> </a> </p> </li> <li> <p> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/tune/#tune-cluster"> rladmin tune cluster </a> : </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin tune cluster parallel_shards_upgrade <span class="o">{</span> all <span class="p">|</span> &lt;integer&gt; <span class="o">}</span> </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">"parallel_shards_upgrade"</span>: &lt;integer&gt; <span class="o">}</span> </span></span></code></pre> </div> </li> </ul> <h3 id="resp3-support"> RESP3 support </h3> <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 or later. <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 – Edit <strong> RESP3 support </strong> in <a href="#edit-upgrade-configuration"> <strong> Upgrade configuration </strong> </a> </p> </li> <li> <p> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/tune/#tune-cluster"> rladmin tune cluster </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 <span class="o">{</span> enabled <span class="p">|</span> disabled <span class="o">}</span> </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>: &lt;boolean&gt; <span class="o">}</span> </span></span></code></pre> </div> </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/configure/db-upgrade/"/> <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/bdb/backup_location/.html
<section class="prose w-full py-12 max-w-none"> <h1> BDB backup/export location object </h1> <p class="text-lg -mt-5 mb-10"> Documents the bdb backup_location/export_location object used with Redis Enterprise Software REST API calls. </p> <p> You can back up or export a database's dataset to the following types of locations: </p> <ul> <li> FTP/S </li> <li> SFTP </li> <li> Amazon S3 </li> <li> Google Cloud Storage </li> <li> Microsoft Azure Storage </li> <li> NAS/Local Storage </li> </ul> <h2 id="basic-parameters"> Basic parameters </h2> <p> For all backup/export location objects, you need to specify the location type via the <code> type </code> field. </p> <table> <thead> <tr> <th> Location type </th> <th> "type" value </th> </tr> </thead> <tbody> <tr> <td> FTP/S </td> <td> "url" </td> </tr> <tr> <td> SFTP </td> <td> "sftp" </td> </tr> <tr> <td> Amazon S3 </td> <td> "s3" </td> </tr> <tr> <td> Google Cloud Storage </td> <td> "gs" </td> </tr> <tr> <td> Microsoft Azure Storage </td> <td> "abs" </td> </tr> <tr> <td> NAS/Local Storage </td> <td> "mount_point" </td> </tr> </tbody> </table> <h2 id="location-specific-parameters"> Location-specific parameters </h2> <p> Any additional required parameters may differ based on the backup/export location type. </p> <h3 id="ftp"> FTP </h3> <table> <thead> <tr> <th> Key name </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> url </td> <td> string </td> <td> A URI that represents a FTP/S location with the following format: <code> ftp://user:password@host:port/path/ </code> . The user and password can be omitted if not needed. </td> </tr> </tbody> </table> <h3 id="sftp"> SFTP </h3> <table> <thead> <tr> <th> Key name </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> key </td> <td> string </td> <td> SSH private key to secure the SFTP server connection. If you do not specify an SSH private key, the autogenerated private key of the cluster is used, and you must add the SSH public key of the cluster to the SFTP server configuration. (optional) </td> </tr> <tr> <td> sftp_url </td> <td> string </td> <td> SFTP URL in the format: <code> sftp://user:password@host[:port][/path/] </code> . The default port number is 22 and the default path is '/'. </td> </tr> </tbody> </table> <h3 id="aws-s3"> AWS S3 </h3> <table> <thead> <tr> <th> Key name </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> access_key_id </td> <td> string </td> <td> The AWS Access Key ID with access to the bucket </td> </tr> <tr> <td> bucket_name </td> <td> string </td> <td> S3 bucket name </td> </tr> <tr> <td> region_name </td> <td> string </td> <td> Amazon S3 region name (optional) </td> </tr> <tr> <td> secret_access_key </td> <td> string </td> <td> The AWS Secret Access Key that matches the Access Key ID </td> </tr> <tr> <td> subdir </td> <td> string </td> <td> Path to the backup directory in the S3 bucket (optional) </td> </tr> </tbody> </table> <h3 id="google-cloud-storage"> Google Cloud Storage </h3> <table> <thead> <tr> <th> Key name </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> bucket_name </td> <td> string </td> <td> Cloud Storage bucket name </td> </tr> <tr> <td> client_email </td> <td> string </td> <td> Email address for the Cloud Storage client ID </td> </tr> <tr> <td> client_id </td> <td> string </td> <td> Cloud Storage client ID with access to the Cloud Storage bucket </td> </tr> <tr> <td> private_key </td> <td> string </td> <td> Cloud Storage private key that matches the private key ID </td> </tr> <tr> <td> private_key_id </td> <td> string </td> <td> Cloud Storage private key ID with access to the Cloud Storage bucket </td> </tr> <tr> <td> subdir </td> <td> string </td> <td> Path to the backup directory in the Cloud Storage bucket (optional) </td> </tr> </tbody> </table> <h3 id="azure-blob-storage"> Azure Blob Storage </h3> <table> <thead> <tr> <th> Key name </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> account_key </td> <td> string </td> <td> Access key for the storage account </td> </tr> <tr> <td> account_name </td> <td> string </td> <td> Storage account name with access to the container </td> </tr> <tr> <td> container </td> <td> string </td> <td> Blob Storage container name </td> </tr> <tr> <td> sas_token </td> <td> string </td> <td> Token to authenticate with shared access signature </td> </tr> <tr> <td> subdir </td> <td> string </td> <td> Path to the backup directory in the Blob Storage container (optional) </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> <code> account_key </code> and <code> sas_token </code> are mutually exclusive </div> </div> <h3 id="naslocal-storage"> NAS/Local Storage </h3> <table> <thead> <tr> <th> Key name </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> path </td> <td> string </td> <td> Path to the local mount point. You must create the mount point on all nodes, and the <code> redislabs:redislabs </code> user must have read and write permissions on the local mount point. </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/bdb/backup_location/"/> <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/key-specs/HAHAHUGOSHORTCODE-s26-HBHB.html
<section class="prose w-full py-12"> <h1> Command key specifications </h1> <p class="text-lg -mt-5 mb-10"> What are command key specification and how to use them in your client </p> <p> Many of the commands in Redis accept key names as input arguments. The 9th element in the reply of <a href="/docs/latest/commands/command/"> <code> COMMAND </code> </a> (and <a href="/docs/latest/commands/command-info/"> <code> COMMAND INFO </code> </a> ) is an array that consists of the command's key specifications. </p> <p> A <em> key specification </em> describes a rule for extracting the names of one or more keys from the arguments of a given command. Key specifications provide a robust and flexible mechanism, compared to the <em> first key </em> , <em> last key </em> and <em> step </em> scheme employed until Redis 7.0. Before introducing these specifications, Redis clients had no trivial programmatic means to extract key names for all commands. </p> <p> Cluster-aware Redis clients had to have the keys' extraction logic hard-coded in the cases of commands such as <a href="/docs/latest/commands/eval/"> <code> EVAL </code> </a> and <a href="/docs/latest/commands/zunionstore/"> <code> ZUNIONSTORE </code> </a> that rely on a <em> numkeys </em> argument or <a href="/docs/latest/commands/sort/"> <code> SORT </code> </a> and its many clauses. Alternatively, the <a href="/docs/latest/commands/command-getkeys/"> <code> COMMAND GETKEYS </code> </a> can be used to achieve a similar extraction effect but at a higher latency. </p> <p> A Redis client isn't obligated to support key specifications. It can continue using the legacy <em> first key </em> , <em> last key </em> and <em> step </em> scheme along with the <a href="/docs/latest/commands/command/#flags"> <em> movablekeys </em> flag </a> that remain unchanged. </p> <p> However, a Redis client that implements key specifications support can consolidate most of its keys' extraction logic. Even if the client encounters an unfamiliar type of key specification, it can always revert to the <a href="/docs/latest/commands/command-getkeys/"> <code> COMMAND GETKEYS </code> </a> command. </p> <p> That said, most cluster-aware clients only require a single key name to perform correct command routing, so it is possible that although a command features one unfamiliar specification, its other specification may still be usable by the client. </p> <p> Key specifications are maps with the following keys: </p> <ol> <li> <strong> begin_search: </strong> : the starting index for keys' extraction. </li> <li> <strong> find_keys: </strong> the rule for identifying the keys relative to the BS. </li> <li> <strong> notes </strong> : notes about this key spec, if there are any. </li> <li> <strong> flags </strong> : indicate the type of data access. </li> </ol> <h2 id="begin_search"> begin_search </h2> <p> The <em> begin_search </em> value of a specification informs the client of the extraction's beginning. The value is a map. There are three types of <code> begin_search </code> : </p> <ol> <li> <strong> index: </strong> key name arguments begin at a constant index. </li> <li> <strong> keyword: </strong> key names start after a specific keyword (token). </li> <li> <strong> unknown: </strong> an unknown type of specification - see the <a href="#incomplete"> incomplete flag section </a> for more details. </li> </ol> <h3 id="index"> index </h3> <p> The <em> index </em> type of <code> begin_search </code> indicates that input keys appear at a constant index. It is a map under the <em> spec </em> key with a single key: </p> <ol> <li> <strong> index: </strong> the 0-based index from which the client should start extracting key names. </li> </ol> <h3 id="keyword"> keyword </h3> <p> The <em> keyword </em> type of <code> begin_search </code> means a literal token precedes key name arguments. It is a map under the <em> spec </em> with two keys: </p> <ol> <li> <strong> keyword: </strong> the keyword (token) that marks the beginning of key name arguments. </li> <li> <strong> startfrom: </strong> an index to the arguments array from which the client should begin searching. This can be a negative value, which means the search should start from the end of the arguments' array, in reverse order. For example, <em> -2 </em> 's meaning is to search reverse from the penultimate argument. </li> </ol> <p> More examples of the <em> keyword </em> search type include: </p> <ul> <li> <a href="/docs/latest/commands/set/"> <code> SET </code> </a> has a <code> begin_search </code> specification of type <em> index </em> with a value of <em> 1 </em> . </li> <li> <a href="/docs/latest/commands/xread/"> <code> XREAD </code> </a> has a <code> begin_search </code> specification of type <em> keyword </em> with the values <em> "STREAMS" </em> and <em> 1 </em> as <em> keyword </em> and <em> startfrom </em> , respectively. </li> <li> <a href="/docs/latest/commands/migrate/"> <code> MIGRATE </code> </a> has a <em> start_search </em> specification of type <em> keyword </em> with the values of <em> "KEYS" </em> and <em> -2 </em> . </li> </ul> <h2 id="find_keys"> find_keys </h2> <p> The <code> find_keys </code> value of a key specification tells the client how to continue the search for key names. <code> find_keys </code> has three possible types: </p> <ol> <li> <strong> range: </strong> keys stop at a specific index or relative to the last argument. </li> <li> <strong> keynum: </strong> an additional argument specifies the number of input keys. </li> <li> <strong> unknown: </strong> an unknown type of specification - see the <a href="#incomplete"> incomplete flag section </a> for more details. </li> </ol> <h3 id="range"> range </h3> <p> The <em> range </em> type of <code> find_keys </code> is a map under the <em> spec </em> key with three keys: </p> <ol> <li> <strong> lastkey: </strong> the index, relative to <code> begin_search </code> , of the last key argument. This can be a negative value, in which case it isn't relative. For example, <em> -1 </em> indicates to keep extracting keys until the last argument, <em> -2 </em> until one before the last, and so on. </li> <li> <strong> keystep: </strong> the number of arguments that should be skipped, after finding a key, to find the next one. </li> <li> <strong> limit: </strong> if <em> lastkey </em> is has the value of <em> -1 </em> , we use the <em> limit </em> to stop the search by a factor. <em> 0 </em> and <em> 1 </em> mean no limit. <em> 2 </em> means half of the remaining arguments, 3 means a third, and so on. </li> </ol> <h3 id="keynum"> keynum </h3> <p> The <em> keynum </em> type of <code> find_keys </code> is a map under the <em> spec </em> key with three keys: </p> <ul> <li> <strong> keynumidx: </strong> the index, relative to <code> begin_search </code> , of the argument containing the number of keys. </li> <li> <strong> firstkey: </strong> the index, relative to <code> begin_search </code> , of the first key. This is usually the next argument after <em> keynumidx </em> , and its value, in this case, is greater by one. </li> <li> <strong> keystep: </strong> Tthe number of arguments that should be skipped, after finding a key, to find the next one. </li> </ul> <p> Examples: </p> <ul> <li> The <a href="/docs/latest/commands/set/"> <code> SET </code> </a> command has a <em> range </em> of <em> 0 </em> , <em> 1 </em> and <em> 0 </em> . </li> <li> The <a href="/docs/latest/commands/mset/"> <code> MSET </code> </a> command has a <em> range </em> of <em> -1 </em> , <em> 2 </em> and <em> 0 </em> . </li> <li> The <a href="/docs/latest/commands/xread/"> <code> XREAD </code> </a> command has a <em> range </em> of <em> -1 </em> , <em> 1 </em> and <em> 2 </em> . </li> <li> The <a href="/docs/latest/commands/zunion/"> <code> ZUNION </code> </a> command has a <em> start_search </em> type <em> index </em> with the value <em> 1 </em> , and <code> find_keys </code> of type <em> keynum </em> with values of <em> 0 </em> , <em> 1 </em> and <em> 1 </em> . </li> <li> The <a href="https://oss.redislabs.com/redisai/master/commands/#aidagrun"> <code> AI.DAGRUN </code> </a> command has a <em> start_search </em> of type <em> keyword </em> with values of <em> "LOAD" </em> and <em> 1 </em> , and <code> find_keys </code> of type <em> keynum </em> with values of <em> 0 </em> , <em> 1 </em> and <em> 1 </em> . </li> </ul> <p> <strong> Note: </strong> this isn't a perfect solution as the module writers can come up with anything. However, this mechanism should allow the extraction of key name arguments for the vast majority of commands. </p> <h2 id="notes"> notes </h2> <p> Notes about non-obvious key specs considerations, if applicable. </p> <h2 id="flags"> flags </h2> <p> A key specification can have additional flags that provide more details about the key. These flags are divided into three groups, as described below. </p> <h3 id="access-type-flags"> Access type flags </h3> <p> The following flags declare the type of access the command uses to a key's value or its metadata. A key's metadata includes LRU/LFU counters, type, and cardinality. These flags do not relate to the reply sent back to the client. </p> <p> Every key specification has precisely one of the following flags: </p> <ul> <li> <strong> RW: </strong> the read-write flag. The command modifies the data stored in the value of the key or its metadata. This flag marks every operation that isn't distinctly a delete, an overwrite, or read-only. </li> <li> <strong> RO: </strong> the read-only flag. The command only reads the value of the key (although it doesn't necessarily return it). </li> <li> <strong> OW: </strong> the overwrite flag. The command overwrites the data stored in the value of the key. </li> <li> <strong> RM: </strong> the remove flag. The command deletes the key. </li> </ul> <h3 id="logical-operation-flags"> Logical operation flags </h3> <p> The following flags declare the type of operations performed on the data stored as the key's value and its TTL (if any), not the metadata. These flags describe the logical operation that the command executes on data, driven by the input arguments. The flags do not relate to modifying or returning metadata (such as a key's type, cardinality, or existence). </p> <p> Every key specification may include the following flag: </p> <ul> <li> <strong> access: </strong> the access flag. This flag indicates that the command returns, copies, or somehow uses the user's data that's stored in the key. </li> </ul> <p> In addition, the specification may include precisely one of the following: </p> <ul> <li> <strong> update: </strong> the update flag. The command updates the data stored in the key's value. The new value may depend on the old value. This flag marks every operation that isn't distinctly an insert or a delete. </li> <li> <strong> insert: </strong> the insert flag. The command only adds data to the value; existing data isn't modified or deleted. </li> <li> <strong> delete: </strong> the delete flag. The command explicitly deletes data from the value stored at the key. </li> </ul> <h3 id="miscellaneous-flags"> Miscellaneous flags </h3> <p> Key specifications may have the following flags: </p> <ul> <li> <strong> not_key: </strong> this flag indicates that the specified argument isn't a key. This argument is treated the same as a key when computing which slot a command should be assigned to for Redis cluster. For all other purposes this argument should not be considered a key. </li> <li> <strong> incomplete: </strong> this flag is explained below. </li> <li> <strong> variable_flags: </strong> this flag is explained below. </li> </ul> <h3 id="incomplete"> incomplete </h3> <p> Some commands feature exotic approaches when it comes to specifying their keys, which makes extraction difficult. Consider, for example, what would happen with a call to <a href="/docs/latest/commands/migrate/"> <code> MIGRATE </code> </a> that includes the literal string <em> "KEYS" </em> as an argument to its <em> AUTH </em> clause. Our key specifications would miss the mark, and extraction would begin at the wrong index. </p> <p> Thus, we recognize that key specifications are incomplete and may fail to extract all keys. However, we assure that even incomplete specifications never yield the wrong names of keys, providing that the command is syntactically correct. </p> <p> In the case of <a href="/docs/latest/commands/migrate/"> <code> MIGRATE </code> </a> , the search begins at the end ( <em> startfrom </em> has the value of <em> -1 </em> ). If and when we encounter a key named <em> "KEYS" </em> , we'll only extract the subset of the key name arguments after it. That's why <a href="/docs/latest/commands/migrate/"> <code> MIGRATE </code> </a> has the <em> incomplete </em> flag in its key specification. </p> <p> Another case of incompleteness is the <a href="/docs/latest/commands/sort/"> <code> SORT </code> </a> command. Here, the <code> begin_search </code> and <code> find_keys </code> are of type <em> unknown </em> . The client should revert to calling the <a href="/docs/latest/commands/command-getkeys/"> <code> COMMAND GETKEYS </code> </a> command to extract key names from the arguments, short of implementing it natively. The difficulty arises, for example, because the string <em> "STORE" </em> is both a keyword (token) and a valid literal argument for <a href="/docs/latest/commands/sort/"> <code> SORT </code> </a> . </p> <p> <strong> Note: </strong> the only commands with <em> incomplete </em> key specifications are <a href="/docs/latest/commands/sort/"> <code> SORT </code> </a> and <a href="/docs/latest/commands/migrate/"> <code> MIGRATE </code> </a> . We don't expect the addition of such commands in the future. </p> <h3 id="variable_flags"> variable_flags </h3> <p> In some commands, the flags for the same key name argument can depend on other arguments. For example, consider the <a href="/docs/latest/commands/set/"> <code> SET </code> </a> command and its optional <em> GET </em> argument. Without the <em> GET </em> argument, <a href="/docs/latest/commands/set/"> <code> SET </code> </a> is write-only, but it becomes a read and write command with it. When this flag is present, it means that the key specification flags cover all possible options, but the effective flags depend on other arguments. </p> <h2 id="examples"> Examples </h2> <h3 id="sethahahugoshortcode-s25-hbhbs-key-specifications"> <a href="/docs/latest/commands/set/"> <code> SET </code> </a> 's key specifications </h3> <pre tabindex="0"><code> 1) 1) "flags" 2) 1) RW 2) access 3) update 3) "begin_search" 4) 1) "type" 2) "index" 3) "spec" 4) 1) "index" 2) (integer) 1 5) "find_keys" 6) 1) "type" 2) "range" 3) "spec" 4) 1) "lastkey" 2) (integer) 0 3) "keystep" 4) (integer) 1 5) "limit" 6) (integer) 0 </code></pre> <h3 id="zunionhahahugoshortcode-s26-hbhbs-key-specifications"> <a href="/docs/latest/commands/zunion/"> <code> ZUNION </code> </a> 's key specifications </h3> <pre tabindex="0"><code> 1) 1) "flags" 2) 1) RO 2) access 3) "begin_search" 4) 1) "type" 2) "index" 3) "spec" 4) 1) "index" 2) (integer) 1 5) "find_keys" 6) 1) "type" 2) "keynum" 3) "spec" 4) 1) "keynumidx" 2) (integer) 0 3) "firstkey" 4) (integer) 1 5) "keystep" 6) (integer) 1 </code></pre> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/develop/reference/key-specs/"/> <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/shards/stats/last/.html
<section class="prose w-full py-12 max-w-none"> <h1> Latest shards stats requests </h1> <p class="text-lg -mt-5 mb-10"> Most recent shard statistics requests </p> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#get-all-shards-stats-last"> GET </a> </td> <td> <code> /v1/shards/stats/last </code> </td> <td> Get most recent stats for all shards </td> </tr> <tr> <td> <a href="#get-shard-stats-last"> GET </a> </td> <td> <code> /v1/shards/stats/last/{uid} </code> </td> <td> Get most recent stats for a specific shard </td> </tr> </tbody> </table> <h2 id="get-all-shards-stats-last"> Get latest stats for all shards </h2> <pre><code>GET /v1/shards/stats/last </code></pre> <p> Get most recent statistics for all shards. </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_all_shard_stats"> view_all_shard_stats </a> </td> </tr> </tbody> </table> <h3 id="get-all-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <pre><code>GET /shards/stats/last?interval=1sec&amp;stime=015-05-27T08:27:35Z </code></pre> <h4 id="request-headers"> Request headers </h4> <table> <thead> <tr> <th> Key </th> <th> Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> Host </td> <td> cnm.cluster.fqdn </td> <td> Domain name </td> </tr> <tr> <td> Accept </td> <td> application/json </td> <td> Accepted media type </td> </tr> </tbody> </table> <h4 id="query-parameters"> Query parameters </h4> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> interval </td> <td> string </td> <td> Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week. Default: 1sec (optional) </td> </tr> <tr> <td> stime </td> <td> ISO_8601 </td> <td> Start time from which we want the stats. Should comply with the <a href="https://en.wikipedia.org/wiki/ISO_8601"> ISO_8601 </a> format (optional) </td> </tr> <tr> <td> etime </td> <td> ISO_8601 </td> <td> End time after which we don't want the stats. Should comply with the <a href="https://en.wikipedia.org/wiki/ISO_8601"> ISO_8601 </a> format (optional) </td> </tr> </tbody> </table> <h3 id="get-all-response"> Response </h3> <p> Returns most recent <a href="/docs/latest/operate/rs/references/rest-api/objects/statistics/"> statistics </a> for all shards. </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">"1"</span><span class="p">:</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"1sec"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"stime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:27:35Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"etime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:28:36Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"used_memory_peak"</span><span class="p">:</span> <span class="mf">5888264.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"used_memory_rss"</span><span class="p">:</span> <span class="mf">5888264.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"read_hits"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"pubsub_patterns"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"no_of_keys"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"mem_size_lua"</span><span class="p">:</span> <span class="mf">35840.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"last_save_time"</span><span class="p">:</span> <span class="mf">1432541051.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"sync_partial_ok"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"connected_clients"</span><span class="p">:</span> <span class="mf">9.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"avg_ttl"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"write_misses"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"used_memory"</span><span class="p">:</span> <span class="mf">5651440.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"sync_full"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"expired_objects"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"total_req"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"blocked_clients"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"pubsub_channels"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"evicted_objects"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"no_of_expires"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"1sec"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"write_hits"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"read_misses"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"sync_partial_err"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"rdb_changes_since_last_save"</span><span class="p">:</span> <span class="mf">0.0</span> </span></span><span class="line"><span class="cl"> <span class="p">},</span> </span></span><span class="line"><span class="cl"> <span class="nt">"2"</span><span class="p">:</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"1sec"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"stime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:27:40Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"etime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:28:45Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"// additional fields..."</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="get-all-status-codes"> Status codes </h3> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok"> 200 OK </a> </td> <td> No error </td> </tr> <tr> <td> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found"> 404 Not Found </a> </td> <td> No shards exist </td> </tr> </tbody> </table> <h2 id="get-shard-stats-last"> Get latest shard stats </h2> <pre><code>GET /v1/shards/stats/last/{int: uid} </code></pre> <p> Get most recent statistics for a specific shard. </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/#view_shard_stats"> view_shard_stats </a> </td> </tr> </tbody> </table> <h3 id="get-request"> Request </h3> <h4 id="example-http-request-1"> Example HTTP request </h4> <pre><code>GET /shards/stats/last/1?interval=1sec&amp;stime=2015-05-28T08:27:35Z </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> <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 shard requested. </td> </tr> </tbody> </table> <h4 id="query-parameters-1"> Query parameters </h4> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> interval </td> <td> string </td> <td> Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week. Default: 1sec. (optional) </td> </tr> <tr> <td> stime </td> <td> ISO_8601 </td> <td> Start time from which we want the stats. Should comply with the <a href="https://en.wikipedia.org/wiki/ISO_8601"> ISO_8601 </a> format (optional) </td> </tr> <tr> <td> etime </td> <td> ISO_8601 </td> <td> End time after which we don't want the stats. Should comply with the <a href="https://en.wikipedia.org/wiki/ISO_8601"> ISO_8601 </a> format (optional) </td> </tr> </tbody> </table> <h3 id="get-response"> Response </h3> <p> Returns the most recent <a href="/docs/latest/operate/rs/references/rest-api/objects/statistics/"> statistics </a> for the specified shard. </p> <h4 id="example-json-body-1"> Example JSON body </h4> <div class="highlight"> <pre class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"1"</span><span class="p">:</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"1sec"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"stime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:27:35Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"etime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:27:36Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"used_memory_peak"</span><span class="p">:</span> <span class="mf">5888264.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"used_memory_rss"</span><span class="p">:</span> <span class="mf">5888264.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"read_hits"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"pubsub_patterns"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"no_of_keys"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"mem_size_lua"</span><span class="p">:</span> <span class="mf">35840.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"last_save_time"</span><span class="p">:</span> <span class="mf">1432541051.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"sync_partial_ok"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"connected_clients"</span><span class="p">:</span> <span class="mf">9.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"avg_ttl"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"write_misses"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"used_memory"</span><span class="p">:</span> <span class="mf">5651440.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"sync_full"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"expired_objects"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"total_req"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"blocked_clients"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"pubsub_channels"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"evicted_objects"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"no_of_expires"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"1sec"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"write_hits"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"read_misses"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"sync_partial_err"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"rdb_changes_since_last_save"</span><span class="p">:</span> <span class="mf">0.0</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><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="https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok"> 200 OK </a> </td> <td> No error </td> </tr> <tr> <td> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found"> 404 Not Found </a> </td> <td> Shard does not exist </td> </tr> <tr> <td> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable"> 406 Not Acceptable </a> </td> <td> Shard isn't currently active </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/shards/stats/last/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/references/rest-api/requests/bdbs/availability/.html
<section class="prose w-full py-12 max-w-none"> <h1> Database availability requests </h1> <p class="text-lg -mt-5 mb-10"> REST API requests to check database availability </p> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#get-db-endpoint-availability"> GET </a> </td> <td> <code> /v1/local/bdbs/{uid}/endpoint/availability </code> </td> <td> Verifies local database endpoint availability </td> </tr> <tr> <td> <a href="#get-db-availability"> GET </a> </td> <td> <code> /v1/bdbs/{uid}/availability </code> </td> <td> Verifies database availability </td> </tr> </tbody> </table> <h2 id="get-db-endpoint-availability"> Get database endpoint availability </h2> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /v1/local/bdbs/<span class="o">{</span>uid<span class="o">}</span>/endpoint/availability </span></span></code></pre> </div> <p> Verifies the local database endpoint is available. This request does not redirect to the primary node. </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/#view_bdb_info"> view_bdb_info </a> </td> <td> admin <br/> cluster_member <br/> cluster_viewer <br/> db_member <br/> db_viewer <br/> user_manager </td> </tr> </tbody> </table> <h3 id="get-endpoint-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /local/bdbs/1/endpoint/availability </span></span></code></pre> </div> <h4 id="headers"> Headers </h4> <table> <thead> <tr> <th> Key </th> <th> Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> Host </td> <td> cnm.cluster.fqdn </td> <td> Domain name </td> </tr> <tr> <td> Accept </td> <td> application/json </td> <td> Accepted media type </td> </tr> </tbody> </table> <h4 id="url-parameters"> URL parameters </h4> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> uid </td> <td> integer </td> <td> The unique ID of the database. </td> </tr> </tbody> </table> <h3 id="get-endpoint-response"> Response </h3> <p> Returns the status code <code> 200 OK </code> if the local database endpoint is available. </p> <p> If the local database endpoint is unavailable, returns an error status code and a JSON object that contains <code> error_code </code> and <code> description </code> fields. </p> <h3 id="get-endpoint-error-codes"> Error codes </h3> <p> When errors are reported, the server may return a JSON object with <code> error_code </code> and <code> description </code> fields 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> no_quorum </td> <td> Master healthcheck failed (no quorum in the cluster) </td> </tr> <tr> <td> db_not_found </td> <td> Database does not exist in the cluster </td> </tr> <tr> <td> bdb_endpoint_unavailable </td> <td> Local database endpoint is not available </td> </tr> </tbody> </table> <h3 id="get-endpoint-status-codes"> Status codes </h3> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok"> 200 OK </a> </td> <td> Database endpoint is available. </td> </tr> <tr> <td> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-503-service-unavailable"> 503 Service Unavailable </a> </td> <td> Database endpoint is unavailable. </td> </tr> </tbody> </table> <h2 id="get-db-availability"> Get database availability </h2> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /v1/bdbs/<span class="o">{</span>uid<span class="o">}</span>/availability </span></span></code></pre> </div> <p> Gets the availability status of a database. </p> <ul> <li> <p> If the OSS Cluster API is enabled, verifies all endpoints for this database are available. </p> </li> <li> <p> Otherwise, verifies the database has at least one available endpoint. </p> </li> </ul> <h3 id="permissions-1"> Permissions </h3> <table> <thead> <tr> <th> Permission name </th> <th> Roles </th> </tr> </thead> <tbody> <tr> <td> <a href="/docs/latest/operate/rs/references/rest-api/permissions/#view_bdb_info"> view_bdb_info </a> </td> <td> admin <br/> cluster_member <br/> cluster_viewer <br/> db_member <br/> db_viewer <br/> user_manager </td> </tr> </tbody> </table> <h3 id="get-db-request"> Request </h3> <h4 id="example-http-request-1"> Example HTTP request </h4> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /bdbs/1/availability </span></span></code></pre> </div> <h4 id="headers-1"> Headers </h4> <table> <thead> <tr> <th> Key </th> <th> Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> Host </td> <td> cnm.cluster.fqdn </td> <td> Domain name </td> </tr> <tr> <td> Accept </td> <td> application/json </td> <td> Accepted media type </td> </tr> </tbody> </table> <h4 id="url-parameters-1"> URL parameters </h4> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> uid </td> <td> integer </td> <td> The unique ID of the database. </td> </tr> </tbody> </table> <h3 id="get-db-response"> Response </h3> <p> Returns the status code <code> 200 OK </code> if the database is available. </p> <p> If the database is unavailable, returns an error status code and a JSON object that contains <code> error_code </code> and <code> description </code> fields. </p> <h3 id="get-db-error-codes"> Error codes </h3> <p> When errors are reported, the server may return a JSON object with <code> error_code </code> and <code> description </code> fields 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> no_quorum </td> <td> Master healthcheck failed (no quorum in the cluster) </td> </tr> <tr> <td> db_not_found </td> <td> Database does not exist in the cluster </td> </tr> <tr> <td> bdb_unavailable </td> <td> Database is not available </td> </tr> </tbody> </table> <h3 id="get-db-status-codes"> Status codes </h3> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok"> 200 OK </a> </td> <td> Database is available. </td> </tr> <tr> <td> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-503-service-unavailable"> 503 Service Unavailable </a> </td> <td> Database is unavailable or doesn't have quorum. </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/availability/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/clusters/logging/alerts-events/.html
<section class="prose w-full py-12 max-w-none"> <h1> Alerts and events </h1> <p class="text-lg -mt-5 mb-10"> Logged alerts and events </p> <p> The following alerts and events can appear in <code> syslog </code> and the Cluster Manager UI logs. </p> <table> <thead> <tr> <th> Alert/Event </th> <th> UI message </th> <th> Severity </th> <th> Notes </th> </tr> </thead> <tbody> <tr> <td> aof_slow_disk_io </td> <td> Redis performance is degraded as a result of disk I/O limits </td> <td> True: error, False: info </td> <td> node alert </td> </tr> <tr> <td> authentication_err </td> <td> </td> <td> error </td> <td> bdb event; Replica of - error authenticating with the source database </td> </tr> <tr> <td> backup_delayed </td> <td> Periodic backup has been delayed for longer than <code> &lt;threshold&gt; </code> minutes </td> <td> True: warning, False: info </td> <td> bdb alert; Has threshold parameter in the data: section of the log entry. </td> </tr> <tr> <td> backup_failed </td> <td> </td> <td> error </td> <td> bdb event </td> </tr> <tr> <td> backup_started </td> <td> </td> <td> info </td> <td> bdb event </td> </tr> <tr> <td> backup_succeeded </td> <td> </td> <td> info </td> <td> bdb event </td> </tr> <tr> <td> bdb_created </td> <td> </td> <td> info </td> <td> bdb event </td> </tr> <tr> <td> bdb_deleted </td> <td> </td> <td> info </td> <td> bdb event </td> </tr> <tr> <td> bdb_updated </td> <td> </td> <td> info </td> <td> bdb event; Indicates that a bdb configuration has been updated </td> </tr> <tr> <td> checks_error </td> <td> </td> <td> error </td> <td> node event; Indicates that one or more node checks have failed </td> </tr> <tr> <td> cluster_updated </td> <td> </td> <td> info </td> <td> cluster event; Indicates that cluster settings have been updated </td> </tr> <tr> <td> compression_unsup_err </td> <td> </td> <td> error </td> <td> bdb event; Replica of - Compression not supported by sync destination </td> </tr> <tr> <td> crossslot_err </td> <td> </td> <td> error </td> <td> bdb event; Replica of - sharded destination does not support operation executed on source </td> </tr> <tr> <td> cpu_utilization </td> <td> CPU utilization has reached <code> &lt;threshold&gt; </code> % </td> <td> True: warning, False: info </td> <td> node alert; Has global_threshold parameter in the key/value section of the log entry. </td> </tr> <tr> <td> even_node_count </td> <td> True high availability requires an odd number of nodes </td> <td> True: warning, False: info </td> <td> cluster alert </td> </tr> <tr> <td> ephemeral_storage </td> <td> Ephemeral storage has reached <code> &lt;threshold&gt; </code> % of its capacity </td> <td> True: warning, False: info </td> <td> node alert; Has global_threshold parameter in the key/value section of the log entry. </td> </tr> <tr> <td> export_failed </td> <td> </td> <td> error </td> <td> bdb event </td> </tr> <tr> <td> export_started </td> <td> </td> <td> info </td> <td> bdb event </td> </tr> <tr> <td> export_succeeded </td> <td> </td> <td> info </td> <td> bdb event </td> </tr> <tr> <td> failed </td> <td> Node failed </td> <td> critical </td> <td> node alert </td> </tr> <tr> <td> free_flash </td> <td> Flash storage has reached <code> &lt;threshold&gt; </code> % of its capacity </td> <td> True: warning, False: info </td> <td> node alert; Has global_threshold parameter in the key/value section of the log entry. </td> </tr> <tr> <td> high_latency </td> <td> Latency is higher than <code> &lt;threshold&gt; </code> milliseconds </td> <td> True: warning, False: info </td> <td> bdb alert; Has threshold parameter in the key/value section of the log entry. </td> </tr> <tr> <td> high_syncer_lag </td> <td> Replica of - sync lag is higher than <code> &lt;threshold&gt; </code> seconds </td> <td> True: warning, False: info </td> <td> bdb alert; Has threshold parameter in the key/value section of the log entry. </td> </tr> <tr> <td> high_throughput </td> <td> Throughput is higher than <code> &lt;threshold&gt; </code> RPS (requests per second) </td> <td> True: warning, False: info </td> <td> bdb alert; Has threshold parameter in the key/value section of the log entry. </td> </tr> <tr> <td> import_failed </td> <td> </td> <td> error </td> <td> bdb event </td> </tr> <tr> <td> import_started </td> <td> </td> <td> info </td> <td> bdb event </td> </tr> <tr> <td> import_succeeded </td> <td> </td> <td> info </td> <td> bdb event </td> </tr> <tr> <td> inconsistent_redis_sw </td> <td> Not all databases are running the same open source version </td> <td> True: warning, False: info </td> <td> cluster alert </td> </tr> <tr> <td> inconsistent_rl_sw </td> <td> Not all nodes in the cluster are running the same Redis Labs Enterprise Cluster version </td> <td> True: warning, False: info </td> <td> cluster alert </td> </tr> <tr> <td> insufficient_disk_aofrw </td> <td> Node has insufficient disk space for AOF rewrite </td> <td> True: error, False: info </td> <td> node alert </td> </tr> <tr> <td> internal_bdb </td> <td> Issues with internal cluster databases </td> <td> True: warning, False: info </td> <td> cluster alert </td> </tr> <tr> <td> license_added </td> <td> </td> <td> info </td> <td> cluster event </td> </tr> <tr> <td> license_deleted </td> <td> </td> <td> info </td> <td> cluster event </td> </tr> <tr> <td> license_updated </td> <td> </td> <td> info </td> <td> cluster event </td> </tr> <tr> <td> low_throughput </td> <td> Throughput is lower than <code> &lt;threshold&gt; </code> RPS (requests per second) </td> <td> True: warning, False: info </td> <td> bdb alert; Has threshold parameter in the key/value section of the log entry. </td> </tr> <tr> <td> memory </td> <td> Node memory has reached <code> &lt;threshold&gt; </code> % of its capacity </td> <td> True: warning, False: info </td> <td> node alert; Has global_threshold parameter in the key/value section of the log entry. </td> </tr> <tr> <td> multiple_nodes_down </td> <td> Multiple cluster nodes are down - this might cause data loss </td> <td> True: warning, False: info </td> <td> cluster alert </td> </tr> <tr> <td> net_throughput </td> <td> Network throughput has reached <code> &lt;threshold&gt; </code> MB/s </td> <td> True: warning, False: info </td> <td> node alert; Has global_threshold parameter in the key/value section of the log entry. </td> </tr> <tr> <td> node_abort_remove_request </td> <td> </td> <td> info </td> <td> node event </td> </tr> <tr> <td> node_joined </td> <td> Node joined </td> <td> info </td> <td> cluster event </td> </tr> <tr> <td> node_operation_failed </td> <td> Node operation failed </td> <td> error </td> <td> cluster event </td> </tr> <tr> <td> node_remove_abort_completed </td> <td> Node removed </td> <td> info </td> <td> cluster event; The remove node is a process that can fail and can also be aborted. If aborted, the abort can succeed or fail. </td> </tr> <tr> <td> node_remove_abort_failed </td> <td> Node removed </td> <td> error </td> <td> cluster event; The remove node is a process that can fail and can also be aborted. If aborted, the abort can succeed or fail. </td> </tr> <tr> <td> node_remove_completed </td> <td> Node removed </td> <td> info </td> <td> cluster event; The remove node is a process that can fail and can also be aborted. If aborted, the abort can succeed or fail. </td> </tr> <tr> <td> node_remove_failed </td> <td> Node removed </td> <td> error </td> <td> cluster event; The remove node is a process that can fail and can also be aborted. If aborted, the abort can succeed or fail. </td> </tr> <tr> <td> node_remove_request </td> <td> </td> <td> info </td> <td> node event </td> </tr> <tr> <td> ocsp_query_failed </td> <td> Failed querying OCSP server </td> <td> True: error, False: info </td> <td> cluster alert </td> </tr> <tr> <td> ocsp_status_revoked </td> <td> OCSP status revoked </td> <td> True: error, False: info </td> <td> cluster alert </td> </tr> <tr> <td> oom_err </td> <td> </td> <td> error </td> <td> bdb event; Replica of - Replication source/target out of memory </td> </tr> <tr> <td> persistent_storage </td> <td> Persistent storage has reached <code> &lt;threshold&gt; </code> % of its capacity </td> <td> True: warning, False: info </td> <td> node alert; Has global_threshold parameter in the key/value section of the log entry. </td> </tr> <tr> <td> ram_dataset_overhead </td> <td> RAM Dataset overhead in a shard has reached <code> &lt;threshold&gt; </code> % of its RAM limit </td> <td> True: warning, False: info </td> <td> bdb alert; Has threshold parameter in the key/value section of the log entry. </td> </tr> <tr> <td> ram_overcommit </td> <td> Cluster capacity is less than total memory allocated to its databases </td> <td> True: error, False: info </td> <td> cluster alert </td> </tr> <tr> <td> ram_values </td> <td> Percent of values in a shard's RAM is lower than <code> &lt;threshold&gt; </code> % of its key count </td> <td> True: warning, False: info </td> <td> bdb alert; Has threshold parameter in the key/value section of the log entry. </td> </tr> <tr> <td> shard_num_ram_values </td> <td> Number of values in a shard's RAM is lower than <code> &lt;threshold&gt; </code> values </td> <td> True: warning, False: info </td> <td> bdb alert; Has threshold parameter in the key/value section of the log entry. </td> </tr> <tr> <td> size </td> <td> Dataset size has reached <code> &lt;threshold&gt; </code> % of the memory limit </td> <td> True: warning, False: info </td> <td> bdb alert; Has threshold parameter in the key/value section of the log entry. </td> </tr> <tr> <td> syncer_connection_error </td> <td> </td> <td> error </td> <td> bdb alert </td> </tr> <tr> <td> syncer_general_error </td> <td> </td> <td> error </td> <td> bdb alert </td> </tr> <tr> <td> too_few_nodes_for_replication </td> <td> Database replication requires at least two nodes in cluster </td> <td> True: warning, False: info </td> <td> cluster alert </td> </tr> <tr> <td> user_created </td> <td> </td> <td> info </td> <td> user event </td> </tr> <tr> <td> user_deleted </td> <td> </td> <td> info </td> <td> user event </td> </tr> <tr> <td> user_updated </td> <td> </td> <td> info </td> <td> user event; Indicates that a user configuration has been updated </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/clusters/logging/alerts-events/"/> <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/ldap/.html
<section class="prose w-full py-12 max-w-none"> <h1> Cluster LDAP requests </h1> <p class="text-lg -mt-5 mb-10"> LDAP configuration requests </p> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#get-cluster-ldap"> GET </a> </td> <td> <code> /v1/cluster/ldap </code> </td> <td> Get LDAP configuration </td> </tr> <tr> <td> <a href="#put-cluster-ldap"> PUT </a> </td> <td> <code> /v1/cluster/ldap </code> </td> <td> Set/update LDAP configuration </td> </tr> <tr> <td> <a href="#delete-cluster-ldap"> DELETE </a> </td> <td> <code> /v1/cluster/ldap </code> </td> <td> Delete LDAP configuration </td> </tr> </tbody> </table> <h2 id="get-cluster-ldap"> Get LDAP configuration </h2> <pre><code>GET /v1/cluster/ldap </code></pre> <p> Get the LDAP configuration. </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_ldap_config"> view_ldap_config </a> </td> </tr> </tbody> </table> <h3 id="get-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <pre><code>GET /cluster/ldap </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 an <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/ldap/"> LDAP object </a> . </p> <h4 id="example-json-body"> Example JSON body </h4> <div class="highlight"> <pre class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"bind_dn"</span><span class="p">:</span> <span class="s2">"rl_admin"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"bind_pass"</span><span class="p">:</span> <span class="s2">"***"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ca_cert"</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"control_plane"</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"data_plane"</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"dn_group_attr"</span><span class="p">:</span> <span class="s2">"MemberOf"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"dn_group_query"</span><span class="p">:</span> <span class="p">{},</span> </span></span><span class="line"><span class="cl"> <span class="nt">"starttls"</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"uris"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"ldap://ldap.example.org:636"</span><span class="p">],</span> </span></span><span class="line"><span class="cl"> <span class="nt">"user_dn_query"</span><span class="p">:</span> <span class="p">{},</span> </span></span><span class="line"><span class="cl"> <span class="nt">"user_dn_template"</span><span class="p">:</span> <span class="s2">"cn=%u, ou=users,dc=example,dc=org"</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> Success </td> </tr> </tbody> </table> <h2 id="put-cluster-ldap"> Update LDAP configuration </h2> <pre><code>PUT /v1/cluster/ldap </code></pre> <p> Set or update the cluster LDAP configuration. </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/7.4/references/rest-api/permissions/#config_ldap"> config_ldap </a> </td> </tr> </tbody> </table> <h3 id="put-request"> Request </h3> <h4 id="example-http-request-1"> Example HTTP request </h4> <pre><code>POST /cluster/ldap </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">"uris"</span><span class="p">:</span> <span class="p">[</span> </span></span><span class="line"><span class="cl"> <span class="s2">"ldap://ldap.redislabs.com:389"</span> </span></span><span class="line"><span class="cl"> <span class="p">],</span> </span></span><span class="line"><span class="cl"> <span class="nt">"bind_dn"</span><span class="p">:</span> <span class="s2">"rl_admin"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"bind_pass"</span><span class="p">:</span> <span class="s2">"secret"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"user_dn_template"</span><span class="p">:</span> <span class="s2">"cn=%u,dc=example,dc=org"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"dn_group_attr"</span><span class="p">:</span> <span class="s2">"MemberOf"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"directory_timeout_s"</span><span class="p">:</span> <span class="mi">5</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> 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> <p> Include an <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/ldap/"> LDAP object </a> with updated fields in the request body. </p> <h3 id="put-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="put-error-codes"> Error codes </h3> <p> Possible <code> error_code </code> values: </p> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> illegal_fields_combination </td> <td> An unacceptable combination of fields was specified for the configuration object (e.g.: two mutually-exclusive fields), or a required field is missing. </td> </tr> </tbody> </table> <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> Success, LDAP config has been set. </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> </tbody> </table> <h2 id="delete-cluster-ldap"> Delete LDAP configuration </h2> <pre><code>DELETE /v1/cluster/ldap </code></pre> <p> Clear the LDAP configuration. </p> <h4 id="required-permissions-2"> 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/#config_ldap"> config_ldap </a> </td> </tr> </tbody> </table> <h3 id="delete-request"> Request </h3> <h4 id="example-http-request-2"> Example HTTP request </h4> <pre><code>DELETE /cluster/ldap </code></pre> <h4 id="request-headers-2"> 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. </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> Success </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/ldap/"/> <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/commands/transactions/.html
<section class="prose w-full py-12 max-w-none"> <h1> Transaction commands compatibility </h1> <p class="text-lg -mt-5 mb-10"> Transaction commands compatibility. </p> <p> The following table shows which Redis Community Edition <a href="/docs/latest/commands/?group=transactions"> transaction commands </a> are compatible with standard and Active-Active databases in Redis Enterprise Software and Redis Cloud. </p> <table> <thead> <tr> <th style="text-align:left"> Command </th> <th style="text-align:left"> Redis <br/> Enterprise </th> <th style="text-align:left"> Redis <br/> Cloud </th> <th style="text-align:left"> Notes </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/discard/"> DISCARD </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/exec/"> EXEC </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/multi/"> MULTI </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/unwatch/"> UNWATCH </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/commands/watch/"> WATCH </a> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> <span title="Supported"> ✅ Standard </span> <br/> <span title="Supported"> <nobr> ✅ Active-Active </nobr> </span> </td> <td style="text-align:left"> </td> </tr> </tbody> </table> <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/commands/transactions/"/> <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/redisearch/redisearch-1.4-release-notes.md.html
<section class="prose w-full py-12 max-w-none"> <h1> RediSearch 1.4 release notes </h1> <p class="text-lg -mt-5 mb-10"> Conditional updates. Schema modification. Query spelling correction. Phonetic matching. More fuzziness in search. Retrieve and change runtime configuration. Unlimited autocomplete results. </p> <h2 id="requirements"> Requirements </h2> <p> RediSearch v1.4.28 requires: </p> <ul> <li> Minimum Redis compatibility version (database): 4.0.0 </li> <li> Minimum Redis Enterprise Software version (cluster): 5.0.0 </li> </ul> <h2 id="v1428-may-2020"> v1.4.28 (May 2020) </h2> <p> This is a maintenance release for version 1.4. </p> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Bugfixes: <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/pull/1218"> 1218 </a> Potential crash when running without concurrency and using the cursor API. </li> </ul> </li> </ul> <h2 id="v1427-april-2020"> v1.4.27 (April 2020) </h2> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Features: <ul> <li> # <a href="https://github.com/redisearch/redisearch/issues/1172"> 1172 </a> Added <code> exists </code> function that can be used on conditional updates <code> REPLACE PARTIAL </code> to check if a field exists in the document. </li> </ul> </li> <li> Minor Enhancements: <ul> <li> # <a href="https://github.com/redisearch/redisearch/issues/1172"> 1172 </a> Lazy evaluation of the right side of 'or'/'and' clauses in IF condition. </li> </ul> </li> <li> Bugfixes: <ul> <li> # <a href="https://github.com/redisearch/redisearch/issues/1110"> 1110 </a> Rare GC failure when accessing uninitialized variable. </li> <li> # <a href="https://github.com/redisearch/redisearch/issues/1131"> 1131 </a> Crash on highlighting a search query where the document no longer exists. </li> </ul> </li> </ul> <h2 id="v1426-march-2020"> v1.4.26 (March 2020) </h2> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Fix rare <code> FORK GC </code> crash which caused by accessing uninitialized variable. </li> </ul> <h2 id="v1425-march-2020"> v1.4.25 (March 2020) </h2> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Features: <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/1051"> 1051 </a> Added support for updating tag fields on document updates with <code> NOINDEX </code> fields. </li> </ul> </li> <li> Bugfixes: <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/1051"> 1051 </a> <code> FORK GC </code> was not updating the unique sum of the numeric index. </li> </ul> </li> </ul> <h2 id="v1424-january-2020"> v1.4.24 (January 2020) </h2> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Bugfixes: <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/1038"> 1038 </a> Memory leak on cursor. </li> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/1049"> 1049 </a> Crash on conversion error when freeing other indexed fields. </li> </ul> </li> </ul> <h2 id="v1423"> v1.4.23 </h2> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Bugfixes: <ul> <li> Memory leak when cursor timed out and cursor wasn't consumed. </li> </ul> </li> </ul> <h2 id="v1422"> v1.4.22 </h2> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Bugfixes: <ul> <li> FILTER option was not working correctly with coordinator. </li> <li> Memory leak when cursor was combined with sorted fields. </li> </ul> </li> </ul> <h2 id="v1421"> v1.4.21 </h2> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Bugfixes: <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/1031"> 1031 </a> Highlighting crashed when used with <code> NOINDEX </code> fields. </li> </ul> </li> </ul> <h2 id="v1420-january-2020"> v1.4.20 (January 2020) </h2> <p> Update urgency: Medium This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release. </p> <ul> <li> Improvements <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/1020"> 1020 </a> Performance improvement for reading fields that are not sortable. </li> </ul> </li> <li> Bugfixes <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/1022"> 1022 </a> Illegal memory access by queries during <code> GC </code> run. </li> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/1022"> 1022 </a> Recreating the index with the same name (delete+create) removed the index from cursor list. </li> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/1022"> 1022 </a> Memory leak when performing <code> FT.AGGREGATE </code> on non-existing index. </li> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/1022"> 1022 </a> Potential data corruption during <code> GC </code> run. </li> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/1025"> 1025 </a> Aliasing not working properly with <code> FT.AGGREGATE </code> . </li> </ul> </li> </ul> <h2 id="v1419-december-2019"> v1.4.19 (December 2019) </h2> <p> Update urgency: Medium This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release. </p> <ul> <li> Bugfixes <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/1000"> 1000 </a> - <code> FT.DEL </code> was not replicated to replica correctly </li> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/1004"> 1004 </a> - Memory leak on <code> TAG </code> array on certain situations </li> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/1006"> 1006 </a> - Unexposed error on conditional update <code> IF </code> that caused the error message to leak </li> </ul> </li> </ul> <h2 id="v1418-november-2019"> v1.4.18 (November 2019) </h2> <p> Update urgency: Medium This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release. </p> <ul> <li> Bug fixes <ul> <li> <a href="https://github.com/RediSearch/RediSearch/issues/947"> #947 </a> Fix short read on FORK GC pipe that could result in a crash and potential data corruption </li> </ul> </li> </ul> <h2 id="v1417-october-2019"> v1.4.17 (October 2019) </h2> <p> Update urgency: Medium This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release. </p> <ul> <li> Features: <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/779"> 779 </a> Added <code> to_number() </code> and <code> to_str() </code> functions for ambiguity reasons </li> </ul> </li> <li> Improvements <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/891"> 891 </a> All memory allocations will now use the redis memory allocator. This means that all the memory will be exposed correctly in the redis <code> INFO MEMORY </code> command. </li> </ul> </li> </ul> <h2 id="v1416-september-2019"> v1.4.16 (September 2019) </h2> <p> Update urgency: Medium This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release. </p> <p> Main features: </p> <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/883"> 883 </a> Forkgc optimizations - introduce new config parameter <code> FORK_GC_CLEAN_THRESHOLD </code> . RediSearch will only start to clean when the number of not cleaned documents is exceeding this threshold. </li> </ul> <p> Main Fixes: </p> <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/848"> 848 </a> RediSearch will not crash when sorting on fields that don't exists in all documents. </li> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/884"> 884 </a> Fix wrong results on intersect iterator. </li> </ul> <h2 id="v1415-28-august-2019"> v1.4.15 (28 August 2019) </h2> <p> Update urgency: Medium This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release. </p> <p> Main Fixes: </p> <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/866"> 866 </a> - Fix RDB corruption caused by deleting none-existing terms from the suggestion trie. </li> <li> When Redis exits, forked processes by FORK Garbage Collection will now be closed accordingly. </li> <li> For indices that are not temporary and interleaved: When an index is dropped, the indexer thread is now closed. </li> </ul> <h2 id="v1414-20-august-2019"> v1.4.14 (20 August 2019) </h2> <p> Update urgency: Medium This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release. </p> <p> Main Fixes: </p> <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/851"> 851 </a> In interleaved mode (non safemode), documents deleted by concurrent updates, will be ignored. </li> </ul> <h2 id="v1413-8-august-2019"> v1.4.13 (8 August 2019) </h2> <p> Update urgency: Medium This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release . </p> <p> Main Fixes: </p> <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/798"> 798 </a> fix issue where phonetic queries return wrong results </li> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/820"> 820 </a> fix crash on getting a none existing doc from a doc table </li> <li> Fix issue with invalid memory read when using tags with ' ' (space) separator </li> </ul> <h2 id="v1412-5-august-2019"> v1.4.12 (5 August 2019) </h2> <p> Update urgency: Medium This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release . </p> <p> Main features: </p> <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/741"> 741 </a> Allow Chinese tokenizing to recognise -escape for punctuations </li> </ul> <p> Main Fixes: </p> <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/739"> 739 </a> Fix crash on search error </li> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/346"> 346 </a> Fix issue where fuzzy can not be used with numbers </li> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/769"> 769 </a> Fix rare crash on rdb loading </li> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/749"> 749 </a> On prefix searches, do not expand prefixes to terms which have no documents </li> </ul> <h2 id="v1411-june-2019"> v1.4.11 (June 2019) </h2> <p> Update urgency: Medium </p> <p> This release only add support for aliasing to the previews 1.4.10 release. </p> <ul> <li> Added functionality <ul> <li> # <a href="https://github.com/RediSearch/RediSearch/issues/731"> 731 </a> Add index aliasing. This allows users to provide (or remove) ‘links’ to indexes. The commands are FT.ALIASADD, FT.ALIASDEL, and FT.ALIASUPDATE. </li> </ul> </li> </ul> <h2 id="v1410-28-may-2019"> v1.4.10 (28 May 2019) </h2> <p> Update urgency: Medium </p> <p> This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release . </p> <p> Main Fixes: </p> <ul> <li> Fix memory leak when combining SORT with APPLY on FT.AGGREGATE </li> </ul> <h2 id="v149-18-may-2019"> v1.4.9 (18 May 2019) </h2> <p> Update urgency: Medium </p> <p> This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release . </p> <p> Main Fixes: </p> <ul> <li> Fork GC will now squash the empty blocks of the inverted indexes. </li> <li> Fix invalid memory access when using aggregate with GROUPBY. </li> <li> Fix issue where using limit with SORTBY might return duplicate results. </li> </ul> <p> Known Issue: </p> <ul> <li> Memory leak when combining SORT and APPLY in FT.AGGREGATE. This issue is fixed on 1.4.10. It's recommended to skip directly to 1.4.10. </li> </ul> <h2 id="v148-29-april-2019"> v1.4.8 (29 April 2019) </h2> <p> Update urgency: Low </p> <p> Technical release, no changes nor fixes. </p> <h2 id="v147-29-april-2019"> v1.4.7 (29 April 2019) </h2> <p> Update urgency: Medium </p> <p> This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release . </p> <p> Main Fixes: </p> <ul> <li> Fix issue where Dropping and recreating the same index while querying might cause crashes. </li> </ul> <h2 id="v146-8-april-2019"> v1.4.6 (8 April 2019) </h2> <p> Update urgency: Medium </p> <p> This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release . </p> <p> Main Fixes: </p> <ul> <li> Loading a potentially corrupted RDB files generated by versions lower than 1.4 </li> <li> Fix issue where <code> REPLACE PARTIAL </code> might not work properly (# <a href="https://github.com/RediSearch/RediSearch/issues/621"> 621 </a> ) </li> </ul> <h2 id="v145-march-2019"> v1.4.5 (March 2019) </h2> <p> Update urgency: Low </p> <p> This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release . </p> <p> Main Fixes: </p> <ul> <li> Fixed issue where FORK GC causing redis rdb fork to fail </li> </ul> <h2 id="v144-21-february-2019"> v1.4.4 (21 February 2019) </h2> <p> Update urgency: Low </p> <p> This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release . </p> <p> Main Fixes: </p> <ul> <li> Fixed memory leak on Fork GC </li> <li> Fixed key close after releasing GIL on Fork GC (might cause crashed on rare situations) </li> </ul> <h2 id="v143-4-february-2019"> v1.4.3 (4 February 2019) </h2> <p> Update urgency: Low </p> <p> This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes for issues found after the previous release . </p> <p> Main Fixes: </p> <ol> <li> Fixed memory leak on mempool destroy </li> <li> Fixed process crash when running with fork GC (preview) </li> <li> Fixed fork GC (preview) deadlock when using Tags </li> <li> Fixed memory leaks on index creation and deletion </li> </ol> <h2 id="v142-27-november-2018"> v1.4.2 (27 November 2018) </h2> <p> Update urgency: Low </p> <p> This is a maintenance release for version 1.4. </p> <p> This release improves overall stability and provides fixes to issues found. </p> <h2 id="v141-12-november-2018"> v1.4.1 (12 November 2018) </h2> <p> Update urgency: Medium </p> <p> This is a maintenance release for version 1.4, with the next version planned for release being 2.0. </p> <p> This release improves overall stability and focuses on performance improvements of the garbage collector. It also includes: </p> <ul> <li> New: Runtime Configuration </li> <li> Change: Unlimited Autocomplete Results </li> </ul> <h3 id="garbage-collector"> Garbage collector </h3> <p> RediSearch employs a garbage collector that removes deleted documents from the internal data structures. </p> <p> In this release the garbage collection mechanism was improved in terms of efficiency, i.e. the amount of memory it reclaims, as well as in terms of performance (i.e. it is faster). The improved mechanism uses forked threads. Additional details can be found in this post: <a href="https://redislabs.com/blog/increased-garbage-collection-performance-redisearch-1-4-1/"> How We Increased Garbage Collection Performance with RediSearch 1.4.1 </a> . </p> <p> The improved collection mechanism is currently * <em> experimental </em> - and is not enabled by default. Enabling the new garbage collection mechanism requires setting the <code> GC_POLICY </code> configuration option to <code> FORK </code> at load time, for example: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">redis-server --loadmodule ./redisearch.so GC_POLICY FORK </span></span></code></pre> </div> <h3 id="runtime-configuration"> Runtime configuration </h3> <p> RediSearch's <a href="/docs/latest/develop/interact/search-and-query/basic-constructs/configuration-parameters/"> configuration </a> is applied via arguments passed to the module at load time. This release introduces the new <code> FT.CONFIG </code> command that allows to retrieve the current configuration as well as change it during runtime. </p> <h3 id="unlimited-autocomplete-results"> Unlimited autocomplete results </h3> <p> This version removes the limit of 10 results from <code> FT.SUGGET </code> - you can set the <code> MAX num </code> as high as needed. </p> <h2 id="v140-august-2018"> v1.4.0 (August 2018) </h2> <p> **Update urgency:*- Medium - mainly due to numerous fixes </p> <p> This version improves overall stability and performance of RediSearch. It also delivers better support for use cases in which documents are continuously updated. New features: </p> <ul> <li> Conditional updates </li> <li> Schema modification </li> <li> Query spelling correction </li> <li> Phonetic matching </li> <li> Enhancement: More fuzziness in search </li> </ul> <h3 id="continuous-updates"> Continuous updates </h3> <p> Like most search engines, RediSearch was designed for maintaining append-mostly indices. To update an existing document, the document is actually replaced - that is deleted and added to the index. </p> <p> Because RediSearch provides realtime indexing and searching, it is sometimes used to search near-realtime data (or the results of its processing). In such cases, the number of indexed documents stays mostly static, but their contents are continuously updated. </p> <p> To support this use case, RediSearch has been reworked internally to use 64-bit internal document IDs so that an index can sustain high update throughputs without overflowing. Furthermore and as a result, significant effort has been put into improving memory management and garbage collection. </p> <h3 id="conditional-updates"> Conditional updates </h3> <p> The <code> IF </code> subcommand has been add to <code> FT.ADD </code> . When used with the existing <code> REPLACE [PARTIAL] </code> subcommand, the document will be updated only if the condition provided evaluates to a truth value, otherwise a special <code> NOADD </code> reply is returned. </p> <h3 id="schema-modification"> Schema modification </h3> <p> The <code> FT.ALTER </code> command has been introduced, and provides the ability to add new fields to the definition of an existing index. The contents of such newly-added fields are indexed only for new or updated documents. </p> <h3 id="query-spelling-correction"> Query spelling correction </h3> <p> Query spelling correction, a.k.a "did you mean", is now provided via the <code> FT.SPELLCHECK </code> command. It enables generating suggestions for search terms that could be misspelled. For more details see <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/spellcheck/"> Query Spelling Correction </a> . </p> <h3 id="phonetic-matching"> Phonetic matching </h3> <p> Phonetic matching, a.k.a "Jon or John?", is now supported via the <code> PHONETIC </code> text field attribute. The terms in such fields are also indexed by their phonetic equivalents, and search results include these by default. For more details see <a href="/docs/latest/develop/interact/search-and-query/advanced-concepts/phonetic_matching/"> Phonetic Matching </a> . </p> <h3 id="more-fuzziness-in-search"> More fuzziness in search </h3> <p> The fuzzy match operator, '%', can now be repeated up to three times to specify the Levenshtein distance. That means that the queries <code> %hello% </code> , <code> %%hello%% </code> and <code> %%%hello%%% </code> will perform fuzzy matching on 'hello' for all terms with LD of 1, 2 and 3, respectively. </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/stack-with-enterprise/release-notes/redisearch/redisearch-1.4-release-notes/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/json.nummultby.html
<section class="prose w-full py-12"> <h1 class="command-name"> JSON.NUMMULTBY <span class="text-base"> (deprecated) </span> </h1> <div class="border-l-8 pl-4"> <p> As of JSON version 2.0, this command is regarded as deprecated. </p> </div> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">JSON.NUMMULTBY key path 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/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(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key </dd> </dl> <p> Multiply the number value stored at <code> path </code> by <code> number </code> </p> <p> <a href="#examples"> Examples </a> </p> <h2 id="required-arguments"> Required arguments </h2> <details open=""> <summary> <code> key </code> </summary> <p> is key to modify. </p> </details> <details open=""> <summary> <code> value </code> </summary> <p> is number value to multiply. </p> </details> <h2 id="optional-arguments"> Optional arguments </h2> <details open=""> <summary> <code> path </code> </summary> <p> is JSONPath to specify. Default is root <code> $ </code> . </p> </details> <h2 id="return"> Return </h2> <p> JSON.NUMMULTBY returns a bulk string reply specified as a stringified new values for each path, or <code> nil </code> element if the matching JSON value is not a number. For more information about replies, see <a href="/docs/latest/develop/reference/protocol-spec/"> Redis serialization protocol specification </a> . </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; JSON.SET doc . <span class="s1">'{"a":"b","b":[{"a":2}, {"a":5}, {"a":"c"}]}'</span> </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">redis&gt; JSON.NUMMULTBY doc $.a <span class="m">2</span> </span></span><span class="line"><span class="cl"><span class="s2">"[null]"</span> </span></span><span class="line"><span class="cl">redis&gt; JSON.NUMMULTBY doc $..a <span class="m">2</span> </span></span><span class="line"><span class="cl"><span class="s2">"[null,4,10,null]"</span></span></span></code></pre> </div> <h2 id="see-also"> See also </h2> <p> <a href="/docs/latest/commands/json.numincrby/"> <code> JSON.NUMINCRBY </code> </a> | <a href="/docs/latest/commands/json.arrinsert/"> <code> JSON.ARRINSERT </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.nummultby/"/> <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/nodes/stats/.html
<section class="prose w-full py-12 max-w-none"> <h1> Node stats requests </h1> <p class="text-lg -mt-5 mb-10"> Node statistics requests </p> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#get-all-nodes-stats"> GET </a> </td> <td> <code> /v1/nodes/stats </code> </td> <td> Get stats for all nodes </td> </tr> <tr> <td> <a href="#get-node-stats"> GET </a> </td> <td> <code> /v1/nodes/stats/{uid} </code> </td> <td> Get stats for a single node </td> </tr> </tbody> </table> <h2 id="get-all-nodes-stats"> Get all nodes stats </h2> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /v1/nodes/stats </span></span></code></pre> </div> <p> Get statistics for all nodes. </p> <h4 id="required-permissions"> Required permissions </h4> <table> <thead> <tr> <th> Permission name </th> </tr> </thead> <tbody> <tr> <td> <a href="/docs/latest/operate/rs/7.4/references/rest-api/permissions/#view_all_nodes_stats"> view_all_nodes_stats </a> </td> </tr> </tbody> </table> <h3 id="get-all-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /nodes/stats?interval<span class="o">=</span>1hour<span class="p">&amp;</span><span class="nv">stime</span><span class="o">=</span>2014-08-28T10:00:00Z </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="query-parameters"> Query parameters </h4> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> interval </td> <td> string </td> <td> Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) </td> </tr> <tr> <td> stime </td> <td> ISO_8601 </td> <td> Start time from which we want the stats. Should comply with the <a href="https://en.wikipedia.org/wiki/ISO_8601"> ISO_8601 </a> format (optional) </td> </tr> <tr> <td> etime </td> <td> ISO_8601 </td> <td> End time after which we don't want the stats. Should comply with the <a href="https://en.wikipedia.org/wiki/ISO_8601"> ISO_8601 </a> format (optional) </td> </tr> </tbody> </table> <h3 id="get-all-response"> Response </h3> <p> Returns a JSON array of <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/statistics/"> statistics </a> for all nodes. </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">"uid"</span><span class="p">:</span> <span class="s2">"1"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"intervals"</span><span class="p">:</span> <span class="p">[</span> </span></span><span class="line"><span class="cl"> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"1sec"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"stime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:40:11Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"etime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:40:12Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"conns"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cpu_idle"</span><span class="p">:</span> <span class="mf">0.5499999999883585</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cpu_system"</span><span class="p">:</span> <span class="mf">0.03499999999985448</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cpu_user"</span><span class="p">:</span> <span class="mf">0.38000000000101863</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"egress_bytes"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ephemeral_storage_avail"</span><span class="p">:</span> <span class="mf">2929315840.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ephemeral_storage_free"</span><span class="p">:</span> <span class="mf">3977830400.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"free_memory"</span><span class="p">:</span> <span class="mf">893485056.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ingress_bytes"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"persistent_storage_avail"</span><span class="p">:</span> <span class="mf">2929315840.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"persistent_storage_free"</span><span class="p">:</span> <span class="mf">3977830400.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"total_req"</span><span class="p">:</span> <span class="mf">0.0</span> </span></span><span class="line"><span class="cl"> <span class="p">},</span> </span></span><span class="line"><span class="cl"> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"1sec"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"stime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:40:12Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"etime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:40:13Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cpu_idle"</span><span class="p">:</span> <span class="mf">1.2</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"// additional fields..."</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><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><span class="line"><span class="cl"> <span class="nt">"uid"</span><span class="p">:</span> <span class="s2">"2"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"intervals"</span><span class="p">:</span> <span class="p">[</span> </span></span><span class="line"><span class="cl"> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"1sec"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"stime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:40:11Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"etime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:40:12Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"conns"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cpu_idle"</span><span class="p">:</span> <span class="mf">0.5499999999883585</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cpu_system"</span><span class="p">:</span> <span class="mf">0.03499999999985448</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cpu_user"</span><span class="p">:</span> <span class="mf">0.38000000000101863</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"egress_bytes"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ephemeral_storage_avail"</span><span class="p">:</span> <span class="mf">2929315840.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ephemeral_storage_free"</span><span class="p">:</span> <span class="mf">3977830400.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"free_memory"</span><span class="p">:</span> <span class="mf">893485056.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ingress_bytes"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"persistent_storage_avail"</span><span class="p">:</span> <span class="mf">2929315840.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"persistent_storage_free"</span><span class="p">:</span> <span class="mf">3977830400.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"total_req"</span><span class="p">:</span> <span class="mf">0.0</span> </span></span><span class="line"><span class="cl"> <span class="p">},</span> </span></span><span class="line"><span class="cl"> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"1sec"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"stime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:40:12Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"etime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:40:13Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cpu_idle"</span><span class="p">:</span> <span class="mf">1.2</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"// additional fields..."</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><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> <h3 id="get-all-status-codes"> Status codes </h3> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1"> 200 OK </a> </td> <td> No error </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5"> 404 Not Found </a> </td> <td> No nodes exist </td> </tr> </tbody> </table> <h2 id="get-node-stats"> Get node stats </h2> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /v1/nodes/stats/<span class="o">{</span>int: uid<span class="o">}</span> </span></span></code></pre> </div> <p> Get statistics for a node. </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/7.4/references/rest-api/permissions/#view_node_stats"> view_node_stats </a> </td> </tr> </tbody> </table> <h3 id="get-request"> Request </h3> <h4 id="example-http-request-1"> Example HTTP request </h4> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /nodes/stats/1?interval<span class="o">=</span>1hour<span class="p">&amp;</span><span class="nv">stime</span><span class="o">=</span>2014-08-28T10:00:00Z </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> 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 node requested. </td> </tr> </tbody> </table> <h4 id="query-parameters-1"> Query parameters </h4> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> interval </td> <td> string </td> <td> Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) </td> </tr> <tr> <td> stime </td> <td> ISO_8601 </td> <td> Start time from which we want the stats. Should comply with the <a href="https://en.wikipedia.org/wiki/ISO_8601"> ISO_8601 </a> format (optional) </td> </tr> <tr> <td> etime </td> <td> ISO_8601 </td> <td> End time after which we don't want the stats. Should comply with the <a href="https://en.wikipedia.org/wiki/ISO_8601"> ISO_8601 </a> format (optional) </td> </tr> </tbody> </table> <h3 id="get-response"> Response </h3> <p> Returns <a href="/docs/latest/operate/rs/7.4/references/rest-api/objects/statistics/"> statistics </a> for the specified node. </p> <h4 id="example-json-body-1"> Example JSON body </h4> <div class="highlight"> <pre class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"uid"</span><span class="p">:</span> <span class="s2">"1"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"intervals"</span><span class="p">:</span> <span class="p">[</span> </span></span><span class="line"><span class="cl"> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"1sec"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"stime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:40:11Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"etime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:40:12Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"conns"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cpu_idle"</span><span class="p">:</span> <span class="mf">0.5499999999883585</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cpu_system"</span><span class="p">:</span> <span class="mf">0.03499999999985448</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cpu_user"</span><span class="p">:</span> <span class="mf">0.38000000000101863</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"egress_bytes"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ephemeral_storage_avail"</span><span class="p">:</span> <span class="mf">2929315840.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ephemeral_storage_free"</span><span class="p">:</span> <span class="mf">3977830400.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"free_memory"</span><span class="p">:</span> <span class="mf">893485056.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"ingress_bytes"</span><span class="p">:</span> <span class="mf">0.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"persistent_storage_avail"</span><span class="p">:</span> <span class="mf">2929315840.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"persistent_storage_free"</span><span class="p">:</span> <span class="mf">3977830400.0</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"total_req"</span><span class="p">:</span> <span class="mf">0.0</span> </span></span><span class="line"><span class="cl"> <span class="p">},</span> </span></span><span class="line"><span class="cl"> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"interval"</span><span class="p">:</span> <span class="s2">"1sec"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"stime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:40:12Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"etime"</span><span class="p">:</span> <span class="s2">"2015-05-28T08:40:13Z"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cpu_idle"</span><span class="p">:</span> <span class="mf">1.2</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"// additional fields..."</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><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 </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5"> 404 Not Found </a> </td> <td> Node does not exist </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7"> 406 Not Acceptable </a> </td> <td> Node isn't currently active </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4"> 503 Service Unavailable </a> </td> <td> Node is in recovery state </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/nodes/stats/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/develop/tools/insight/release-notes/v1.11.0/.html
<section class="prose w-full py-12"> <h1> RedisInsight v1.11, Oct 2021 </h1> <p class="text-lg -mt-5 mb-10"> RedisInsight v1.11.0 </p> <h2 id="1111-january-2022"> 1.11.1 (January 2022) </h2> <p> This is the maintenance release of RedisInsight 1.11 (v1.11.1)! </p> <h3 id="fixes"> Fixes: </h3> <ul> <li> Core: <ul> <li> Fixed a warning about <code> urllib </code> version deprecation. </li> <li> ACL errors are now show in pretty format while in edit database screen. </li> <li> Fixed unnecessary warning about segment when there's no internet connection. </li> </ul> </li> <li> RediSearch: <ul> <li> Fix index tool support for <code> v2.2.5 </code> . </li> </ul> </li> <li> Bulk actions: <ul> <li> Added support for cross-slot bulk action execution. </li> <li> Fixed a bug where there's a failure when a malformed UTF-8 characters are present in the key. </li> </ul> </li> <li> Memory Analysis: <ul> <li> Added support for <code> quicklist2 </code> data type. </li> </ul> </li> <li> Cluster Management: <ul> <li> Generic errors are also displayed in the tool. This is helpful when connected to a vendor provided redis with custom exceptions. </li> </ul> </li> </ul> <h2 id="1110"> 1.11.0 </h2> <p> This is the General Availability Release of RedisInsight 1.11 (v1.11.0)! </p> <h3 id="headlines"> Headlines: </h3> <ul> <li> Added beta support for <a href="https://oss.redis.com/redisai/"> RedisAI </a> </li> <li> Fixed the issue with empty fields for Hash objects. </li> </ul> <h3 id="full-details"> Full Details: </h3> <ul> <li> Core: <ul> <li> Fixed a bug where editing cluster returns error. </li> <li> Fixed broken redis links. </li> </ul> </li> <li> Browser <ul> <li> Check Hash value for <code> emptiness </code> </li> </ul> </li> <li> RedisGraph: <ul> <li> Added support for point datatype. </li> <li> Fixed a bug where returning relationships without their respective nodes leads to infinite loading </li> </ul> </li> <li> RediSearch: <ul> <li> Fixed a bug where a malformed unicode string in redisearch doesn't produce results. </li> </ul> </li> <li> RedisTimeseries: <ul> <li> Added support for <code> TS.REVRANGE </code> and <code> TS.MREVRANGE </code> commands. </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.11.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/integrate/redisvl/overview/cli/.html
<section class="prose w-full py-12 max-w-none"> <h1> RedisVL CLI </h1> <p class="text-lg -mt-5 mb-10"> How to use RedisVL's CLI </p> <p> RedisVL is a Python library with a dedicated CLI to help load and create vector search indexes within Redis. </p> <p> This document will walk through how to use the RedisVL CLI ( <code> rvl </code> ). </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> This document is a converted form of <a href="https://github.com/RedisVentures/redisvl/blob/main/docs/user_guide/cli.ipynb"> this Jupyter notebook </a> . </div> </div> <p> Before beginning, be sure of the following: </p> <ol> <li> You have installed RedisVL and have that environment activated. </li> <li> You have a running Redis instance with the Redis Query Engine capability. </li> </ol> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># First, see if the rvl tool is installed</span> </span></span><span class="line"><span class="cl">$ rvl version </span></span><span class="line"><span class="cl">11:13:52 <span class="o">[</span>RedisVL<span class="o">]</span> INFO RedisVL version 0.1.2 </span></span></code></pre> </div> <h2 id="index"> Index </h2> <p> The <code> rvl index </code> command can be used for a number of tasks related to creating and managing indexes. Whether you are working in Bash or another shell, this CLI tool can still be useful for managing and inspecting your indexes. </p> <p> First, create an index from a YAML schema that looks like the following: </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="s1">'0.1.0'</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">index</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">vectorizers</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">prefix</span><span class="p">:</span><span class="w"> </span><span class="l">doc</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">storage_type</span><span class="p">:</span><span class="w"> </span><span class="l">hash</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">fields</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">sentence</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">text</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">embedding</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">vector</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">attrs</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">dims</span><span class="p">:</span><span class="w"> </span><span class="m">768</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">algorithm</span><span class="p">:</span><span class="w"> </span><span class="l">flat</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">distance_metric</span><span class="p">:</span><span class="w"> </span><span class="l">cosine</span><span class="w"> </span></span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Create an index from a yaml schema</span> </span></span><span class="line"><span class="cl">$ rvl index create -s schema.yaml </span></span><span class="line"><span class="cl">11:13:54 <span class="o">[</span>RedisVL<span class="o">]</span> INFO Index created successfully </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># List the indexes that are available</span> </span></span><span class="line"><span class="cl">$ rvl index listall </span></span><span class="line"><span class="cl">11:13:56 <span class="o">[</span>RedisVL<span class="o">]</span> INFO Indices: </span></span><span class="line"><span class="cl">11:13:56 <span class="o">[</span>RedisVL<span class="o">]</span> INFO 1. vectorizers </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># inspect the index fields</span> </span></span><span class="line"><span class="cl">$ rvl index info -i providers </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">Index Information: </span></span><span class="line"><span class="cl">╭──────────────┬────────────────┬────────────┬─────────────────┬────────────╮ </span></span><span class="line"><span class="cl">│ Index Name │ Storage Type │ Prefixes │ Index Options │ Indexing │ </span></span><span class="line"><span class="cl">├──────────────┼────────────────┼────────────┼─────────────────┼────────────┤ </span></span><span class="line"><span class="cl">│ vectorizers │ HASH │ <span class="o">[</span><span class="s1">'doc'</span><span class="o">]</span> │ <span class="o">[]</span> │ <span class="m">0</span> │ </span></span><span class="line"><span class="cl">╰──────────────┴────────────────┴────────────┴─────────────────┴────────────╯ </span></span><span class="line"><span class="cl">Index Fields: </span></span><span class="line"><span class="cl">╭───────────┬─────────────┬────────┬────────────────┬────────────────╮ </span></span><span class="line"><span class="cl">│ Name │ Attribute │ Type │ Field Option │ Option Value │ </span></span><span class="line"><span class="cl">├───────────┼─────────────┼────────┼────────────────┼────────────────┤ </span></span><span class="line"><span class="cl">│ sentence │ sentence │ TEXT │ WEIGHT │ <span class="m">1</span> │ </span></span><span class="line"><span class="cl">│ embedding │ embedding │ VECTOR │ │ │ </span></span><span class="line"><span class="cl">╰───────────┴─────────────┴────────┴────────────────┴────────────────╯ </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># delete an index without deleting the data within it</span> </span></span><span class="line"><span class="cl">$ rvl index delete -i vectorizers </span></span><span class="line"><span class="cl">11:13:59 <span class="o">[</span>RedisVL<span class="o">]</span> INFO Index deleted successfully </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># view the index</span> </span></span><span class="line"><span class="cl">$ rvl index listall </span></span><span class="line"><span class="cl">11:14:00 <span class="o">[</span>RedisVL<span class="o">]</span> INFO Indices: </span></span></code></pre> </div> <h2 id="stats"> Stats </h2> <p> The <code> rvl stats </code> command will return some basic information about an index. This is useful for checking the status of an index, or for getting information about the index to use in other commands. </p> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># create a new index with the same schema</span> </span></span><span class="line"><span class="cl">$ rvl index create -s schema.yaml </span></span><span class="line"><span class="cl">11:14:02 <span class="o">[</span>RedisVL<span class="o">]</span> INFO Index created successfully </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># list the indexes that are available</span> </span></span><span class="line"><span class="cl">$ rvl index listall </span></span><span class="line"><span class="cl">11:14:03 <span class="o">[</span>RedisVL<span class="o">]</span> INFO Indices: </span></span><span class="line"><span class="cl">11:14:03 <span class="o">[</span>RedisVL<span class="o">]</span> INFO 1. vectorizers </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># see all the stats for the index</span> </span></span><span class="line"><span class="cl">$ rvl stats -i providers </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">Statistics: </span></span><span class="line"><span class="cl">╭─────────────────────────────┬────────────╮ </span></span><span class="line"><span class="cl">│ Stat Key │ Value │ </span></span><span class="line"><span class="cl">├─────────────────────────────┼────────────┤ </span></span><span class="line"><span class="cl">│ num_docs │ <span class="m">0</span> │ </span></span><span class="line"><span class="cl">│ num_terms │ <span class="m">0</span> │ </span></span><span class="line"><span class="cl">│ max_doc_id │ <span class="m">0</span> │ </span></span><span class="line"><span class="cl">│ num_records │ <span class="m">0</span> │ </span></span><span class="line"><span class="cl">│ percent_indexed │ <span class="m">1</span> │ </span></span><span class="line"><span class="cl">│ hash_indexing_failures │ <span class="m">0</span> │ </span></span><span class="line"><span class="cl">│ number_of_uses │ <span class="m">1</span> │ </span></span><span class="line"><span class="cl">│ bytes_per_record_avg │ nan │ </span></span><span class="line"><span class="cl">│ doc_table_size_mb │ <span class="m">0</span> │ </span></span><span class="line"><span class="cl">│ inverted_sz_mb │ <span class="m">0</span> │ </span></span><span class="line"><span class="cl">│ key_table_size_mb │ <span class="m">0</span> │ </span></span><span class="line"><span class="cl">│ offset_bits_per_record_avg │ nan │ </span></span><span class="line"><span class="cl">│ offset_vectors_sz_mb │ <span class="m">0</span> │ </span></span><span class="line"><span class="cl">│ offsets_per_term_avg │ nan │ </span></span><span class="line"><span class="cl">│ records_per_doc_avg │ nan │ </span></span><span class="line"><span class="cl">│ sortable_values_size_mb │ <span class="m">0</span> │ </span></span><span class="line"><span class="cl">│ total_indexing_time │ <span class="m">0</span> │ </span></span><span class="line"><span class="cl">│ total_inverted_index_blocks │ <span class="m">0</span> │ </span></span><span class="line"><span class="cl">│ vector_index_sz_mb │ 0.00818634 │ </span></span><span class="line"><span class="cl">╰─────────────────────────────┴────────────╯ </span></span></code></pre> </div> <div class="highlight"> <pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ rvl index destroy -i vectorizers </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">09:00:27 <span class="o">[</span>RedisVL<span class="o">]</span> INFO Index deleted successfully </span></span></code></pre> </div> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/redisvl/overview/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/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> Data is stored in RAM or a combination of RAM and flash memory ( <a href="/docs/latest/operate/rs/databases/auto-tiering/"> Auto Tiering </a> ), which risks data loss during process or server failures. Redis Enterprise Software supports multiple methods to persist data to disk on a per-database basis to ensure data durability. </p> <p> You can configure <a href="https://redis.com/redis-enterprise/technology/durable-redis/"> persistence </a> during database creation or by editing an existing database. Although the persistence model can be changed dynamically, the switch can take time depending on the database size and the models being switched. </p> <h2 id="configure-database-persistence"> Configure database persistence </h2> <p> You can configure persistence when you <a href="/docs/latest/operate/rs/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> Durability </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/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/references/cli-utilities/rladmin/.html
<section class="prose w-full py-12 max-w-none"> <h1> rladmin </h1> <p class="text-lg -mt-5 mb-10"> Manage Redis Enterprise clusters and databases. </p> <p> <code> rladmin </code> is a command-line utility that lets you perform administrative tasks such as failover, migration, and endpoint binding on a Redis Enterprise Software cluster. You can also use <code> rladmin </code> to edit cluster and database configurations. </p> <p> Although you can use the Cluster Manager UI for some of these tasks, others are unique to the <code> rladmin </code> command-line tool. </p> <h2 id="rladmin-commands"> <code> rladmin </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/references/cli-utilities/rladmin/bind/"> bind </a> </td> <td style="text-align:left"> Manages the proxy policy for a specified database endpoint. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/"> cluster </a> </td> <td style="text-align:left"> Manage cluster. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/failover/"> failover </a> </td> <td style="text-align:left"> Fail over primary shards of a database to their replicas. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/help/"> help </a> </td> <td style="text-align:left"> Shows available commands or specific command usage. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/info/"> info </a> </td> <td style="text-align:left"> Shows the current configuration of a cluster, database, node, or proxy. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/migrate/"> migrate </a> </td> <td style="text-align:left"> Moves Redis Enterprise Software shards or endpoints to a new node in the same cluster. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/node/"> node </a> </td> <td style="text-align:left"> Manage nodes. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/placement/"> placement </a> </td> <td style="text-align:left"> Configures the shard placement policy for a database. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/recover/"> recover </a> </td> <td style="text-align:left"> Recovers databases in recovery mode. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/restart/"> restart </a> </td> <td style="text-align:left"> Restarts Redis Enterprise Software processes for a specific database. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/status/"> status </a> </td> <td style="text-align:left"> Displays the current cluster status and topology information. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/suffix/"> suffix </a> </td> <td style="text-align:left"> Manages the DNS suffixes in the cluster. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/tune/"> tune </a> </td> <td style="text-align:left"> Configures parameters for databases, proxies, nodes, and clusters. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/upgrade/"> upgrade </a> </td> <td style="text-align:left"> Upgrades the version of a module or Redis Enterprise Software for a database. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/verify/"> verify </a> </td> <td style="text-align:left"> Prints verification reports for the cluster. </td> </tr> </tbody> </table> <h2 id="use-the-rladmin-shell"> Use the <code> rladmin </code> shell </h2> <p> To open the <code> rladmin </code> shell: </p> <ol> <li> <p> Sign in to a Redis Enterprise Software node with an account that is a member of the <strong> redislabs </strong> group. </p> <p> The <code> rladmin </code> binary is located in <code> /opt/redislabs/bin </code> . If you don't have this directory in your <code> PATH </code> , you may want to add it. Otherwise, you can use <code> bash -l &lt;username&gt; </code> to sign in as a user with permissions for that directory. </p> </li> <li> <p> Run: <code> rladmin </code> </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 the CLI does not recognize the <code> rladmin </code> command, run this command to load the necessary configuration first: <nobr> <code> bash -l </code> </nobr> </div> </div> </li> </ol> <p> In the <code> rladmin </code> shell, you can: </p> <ul> <li> Run any <code> rladmin </code> command without prefacing it with <code> rladmin </code> . </li> <li> Enter <code> ? </code> to view the full list of available commands. </li> <li> Enter <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/help/"> <code> help </code> </a> followed by the name of a command for a detailed explanation of the command and its usage. </li> <li> Press the <code> Tab </code> key for command completion. </li> <li> Enter <code> exit </code> or press <code> Control+D </code> to exit the <code> rladmin </code> shell and return to the terminal prompt. </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/"/> <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.10.0/.html
<section class="prose w-full py-12"> <h1> RedisInsight v1.10, March 2021 </h1> <p class="text-lg -mt-5 mb-10"> RedisInsight v1.10.0 </p> <h2 id="1101-april-2021"> 1.10.1 (April 2021) </h2> <p> This is the maintenance release of RedisInsight 1.10 (v1.10.1)! </p> <h3 id="fixes"> Fixes: </h3> <ul> <li> Core: <ul> <li> Fixed a bug where launching RedisInsight on macOS mojave (10.14.6) would log out the user. </li> <li> Fixed two major container vulnerability. (CVE-2021-24031, CVE-2021-24032 and CVE-2020-36242) </li> <li> Select existing installation path on upgrades in Windows. </li> </ul> </li> <li> CLI: <ul> <li> Added support for RAW mode ( <code> --raw </code> in <code> redis-cli </code> ). </li> </ul> </li> <li> Browser: <ul> <li> Fixed a bug where a number in redis string datatype is treated as a JSON . </li> <li> RedisJSON - Distinguish between empty and collapsed objects/arrays. </li> </ul> </li> <li> Streams: <ul> <li> Added ability to configure auto refresh interval. </li> </ul> </li> <li> RedisTimeseries: <ul> <li> Charts now support milliseconds. </li> <li> Added ability to configure auto refresh interval. </li> </ul> </li> <li> RedisGraph: <ul> <li> Properly detect module in Redis Enterprise </li> <li> Large queries that are truncated in the query card is provided with a tooltip that displays the query on hover. </li> <li> Properly render boolean data types in the objects. </li> </ul> </li> <li> Bulk actions: <ul> <li> Fixed a bug where preview returns duplicate dry run commands. </li> </ul> </li> </ul> <h2 id="1100-march-2021"> 1.10.0 (March 2021) </h2> <p> This is the General Availability (GA) Release of RedisInsight 1.10 (v1.10.0)! </p> <h3 id="headlines"> Headlines: </h3> <ul> <li> Improvements to the way the Browser tool displays "special" strings. </li> <li> UX improvements to the RedisGraph tool. </li> <li> Ability to configure the slowlog threshold from within the Slowlog tool. </li> </ul> <h3 id="full-details"> Full Details: </h3> <ul> <li> Overview: <ul> <li> The connection details of the Redis database are now displayed. </li> <li> A message is displayed to indicate a cluster with no replicas instead of an empty table. </li> <li> Fixed a bug where the memory usage chart would display an incorrect graph when the memory usage changes rapidly. </li> </ul> </li> <li> Browser: <ul> <li> Pretty-print "special" strings (like JSON, Java serialized object, Python pickle objects, etc.) once the entire value is loaded. </li> <li> Pretty-print "special" strings (like JSON, Java serialized object, Python pickle objects, etc.) inside container types like Hashes, Sets and Sorted Sets. </li> <li> Allow sorting the members of a sorted set by score. </li> <li> Refresh button for the key list. </li> <li> Delete a key by pressing the "Delete" key. </li> <li> All keys are now visible by default, i.e, the data type filters are disabled by default. </li> <li> Fixed bug where switching logical databases did not work correctly sometimes. </li> <li> Fixed bug where adding a field to a hash with an empty value crashes the UI. </li> <li> Fixed bug where setting TTL to -1 does not effectively delete the key. </li> <li> Added tooltip explaining how to use the logical database selector along with a submit button. </li> </ul> </li> <li> Streams: <ul> <li> Refresh button for the list of streams. </li> </ul> </li> <li> RedisGraph: <ul> <li> Node size is now dependent on the number of direct relationships. </li> <li> Added support for pasting the full <code> GRAPH.QUERY </code> command into the query textbox. </li> </ul> </li> <li> RediSearch: <ul> <li> Fixed bug where the application fails to execute queries on indices starting with/enclosed within single-quotes. </li> </ul> </li> <li> Bulk Actions: <ul> <li> Improved support for operations on a large number of keys. </li> </ul> </li> <li> Slowlog: <ul> <li> Allow configuring the slowlog threshold from within the tool for non-cluster databases. </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.10.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/commands/client-kill/.html
<section class="prose w-full py-12"> <h1 class="command-name"> CLIENT KILL </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">CLIENT KILL &lt;ip:port | &lt;[ID client-id] | [TYPE &lt;NORMAL | MASTER | SLAVE | REPLICA | PUBSUB&gt;] | [USER username] | [ADDR ip:port] | [LADDR ip:port] | [SKIPME &lt;YES | NO&gt;] | [MAXAGE maxage] [[ID client-id] | [TYPE &lt;NORMAL | MASTER | SLAVE | REPLICA | PUBSUB&gt;] | [USER username] | [ADDR ip:port] | [LADDR ip:port] | [SKIPME &lt;YES | NO&gt;] | [MAXAGE maxage] ...]&gt;&gt;</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 2.4.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(N) where N is the number of client connections </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @admin </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> <code> @dangerous </code> <span class="mr-1 last:hidden"> , </span> <code> @connection </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> The <code> CLIENT KILL </code> command closes a given client connection. This command support two formats, the old format: </p> <pre><code>CLIENT KILL addr:port </code></pre> <p> The <code> ip:port </code> should match a line returned by the <a href="/docs/latest/commands/client-list/"> <code> CLIENT LIST </code> </a> command ( <code> addr </code> field). </p> <p> The new format: </p> <pre><code>CLIENT KILL &lt;filter&gt; &lt;value&gt; ... ... &lt;filter&gt; &lt;value&gt; </code></pre> <p> With the new form it is possible to kill clients by different attributes instead of killing just by address. The following filters are available: </p> <ul> <li> <code> CLIENT KILL ADDR ip:port </code> . This is exactly the same as the old three-arguments behavior. </li> <li> <code> CLIENT KILL LADDR ip:port </code> . Kill all clients connected to specified local (bind) address. </li> <li> <code> CLIENT KILL ID client-id </code> . Allows to kill a client by its unique <code> ID </code> field. Client <code> ID </code> 's are retrieved using the <a href="/docs/latest/commands/client-list/"> <code> CLIENT LIST </code> </a> command. </li> <li> <code> CLIENT KILL TYPE type </code> , where <em> type </em> is one of <code> normal </code> , <code> master </code> , <code> replica </code> and <code> pubsub </code> . This closes the connections of <strong> all the clients </strong> in the specified class. Note that clients blocked into the <a href="/docs/latest/commands/monitor/"> <code> MONITOR </code> </a> command are considered to belong to the <code> normal </code> class. </li> <li> <code> CLIENT KILL USER username </code> . Closes all the connections that are authenticated with the specified <a href="/docs/latest/operate/oss_and_stack/management/security/acl/"> ACL </a> username, however it returns an error if the username does not map to an existing ACL user. </li> <li> <code> CLIENT KILL SKIPME yes/no </code> . By default this option is set to <code> yes </code> , that is, the client calling the command will not get killed, however setting this option to <code> no </code> will have the effect of also killing the client calling the command. </li> <li> <code> CLIENT KILL MAXAGE maxage </code> . Closes all the connections that are older than the specified age, in seconds. Added in Redis v7.4. </li> </ul> <p> It is possible to provide multiple filters at the same time. The command will handle multiple filters via logical AND. For example: </p> <pre><code>CLIENT KILL addr 127.0.0.1:12345 type pubsub </code></pre> <p> is valid and will kill only a pubsub client with the specified address. This format containing multiple filters is rarely useful currently. </p> <p> When the new form is used the command no longer returns <code> OK </code> or an error, but instead the number of killed clients, that may be zero. </p> <h2 id="client-kill-and-redis-sentinel"> CLIENT KILL and Redis Sentinel </h2> <p> Recent versions of Redis Sentinel (Redis 2.8.12 or greater) use CLIENT KILL in order to kill clients when an instance is reconfigured, in order to force clients to perform the handshake with one Sentinel again and update its configuration. </p> <h2 id="notes"> Notes </h2> <p> Due to the single-threaded nature of Redis, it is not possible to kill a client connection while it is executing a command. From the client point of view, the connection can never be closed in the middle of the execution of a command. However, the client will notice the connection has been closed only when the next command is sent (and results in network error). </p> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <p> One of the following: </p> <ul> <li> <a href="../../develop/reference/protocol-spec#simple-strings"> Simple string reply </a> : <code> OK </code> when called in 3 argument format and the connection has been closed. </li> <li> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : when called in filter/value format, the number of clients killed. </li> </ul> <br/> <h2> History </h2> <ul> <li> Starting with Redis version 2.8.12: Added new filter format. </li> <li> Starting with Redis version 2.8.12: <code> ID </code> option. </li> <li> Starting with Redis version 3.2.0: Added <code> master </code> type in for <code> TYPE </code> option. </li> <li> Starting with Redis version 5.0.0: Replaced <code> slave </code> <code> TYPE </code> with <code> replica </code> . <code> slave </code> still supported for backward compatibility. </li> <li> Starting with Redis version 6.2.0: <code> LADDR </code> option. </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/client-kill/"/> <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/set/.html
<section class="prose w-full py-12"> <h1 class="command-name"> SET </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">SET key value [NX | XX] [GET] [EX seconds | PX milliseconds | EXAT unix-time-seconds | PXAT unix-time-milliseconds | KEEPTTL]</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> @string </code> <span class="mr-1 last:hidden"> , </span> <code> @slow </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Set <code> key </code> to hold the string <code> value </code> . If <code> key </code> already holds a value, it is overwritten, regardless of its type. Any previous time to live associated with the key is discarded on successful <code> SET </code> operation. </p> <h2 id="options"> Options </h2> <p> The <code> SET </code> command supports a set of options that modify its behavior: </p> <ul> <li> <code> EX </code> <em> seconds </em> -- Set the specified expire time, in seconds (a positive integer). </li> <li> <code> PX </code> <em> milliseconds </em> -- Set the specified expire time, in milliseconds (a positive integer). </li> <li> <code> EXAT </code> <em> timestamp-seconds </em> -- Set the specified Unix time at which the key will expire, in seconds (a positive integer). </li> <li> <code> PXAT </code> <em> timestamp-milliseconds </em> -- Set the specified Unix time at which the key will expire, in milliseconds (a positive integer). </li> <li> <code> NX </code> -- Only set the key if it does not already exist. </li> <li> <code> XX </code> -- Only set the key if it already exists. </li> <li> <code> KEEPTTL </code> -- Retain the time to live associated with the key. </li> <li> <code> GET </code> -- Return the old string stored at key, or nil if key did not exist. An error is returned and <code> SET </code> aborted if the value stored at key is not a string. </li> </ul> <p> Note: Since the <code> SET </code> command options can replace <a href="/docs/latest/commands/setnx/"> <code> SETNX </code> </a> , <a href="/docs/latest/commands/setex/"> <code> SETEX </code> </a> , <a href="/docs/latest/commands/psetex/"> <code> PSETEX </code> </a> , <a href="/docs/latest/commands/getset/"> <code> GETSET </code> </a> , it is possible that in future versions of Redis these commands will be deprecated and finally removed. </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; SET mykey "Hello" "OK" redis&gt; GET mykey "Hello" redis&gt; SET anotherkey "will expire in a minute" EX 60 "OK" </pre> <div class="prompt" style=""> <span> redis&gt; </span> <input autocomplete="off" name="prompt" spellcheck="false" type="text"/> </div> </form> <h3 id="code-examples"> Code examples </h3> <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="set_and_get-step"> <input checked="" class="radiotab w-0 h-0" data-lang="python" id="Python_set_and_get-step" name="set_and_get-step" 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_set_and_get-step" title="Open example"> Python </label> <div aria-labelledby="tab-set_and_get-step" class="panel order-last hidden w-full mt-0 relative" id="panel_Python_set_and_get-step" 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="s2">""" </span></span></span><span class="line"><span class="cl"><span class="s2">Code samples for data structure store quickstart pages: </span></span></span><span class="line"><span class="cl"><span class="s2"> https://redis.io/docs/latest/develop/get-started/data-store/ </span></span></span><span class="line"><span class="cl"><span class="s2">"""</span> </span></span><span class="line"><span class="cl"> </span></span><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">host</span><span class="o">=</span><span class="s2">"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 class="n">db</span><span class="o">=</span><span class="mi">0</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 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">set</span><span class="p">(</span><span class="s2">"bike:1"</span><span class="p">,</span> <span class="s2">"Process 134"</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">get</span><span class="p">(</span><span class="s2">"bike:1"</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; "Process 134"</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_Python_set_and_get-step')" 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_set_and_get-step" 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/string_set_get.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_set_and_get-step" name="set_and_get-step" 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_set_and_get-step" title="Open example"> Node.js </label> <div aria-labelledby="tab-set_and_get-step" class="panel order-last hidden w-full mt-0 relative" id="panel_Nodejs_set_and_get-step" role="tabpanel" tabindex="0"> <div class="highlight"> <pre class="chroma"><code class="language-javascript" data-lang="javascript"><span class="line hl"><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></span><span class="line"><span class="cl"><span class="nx">client</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="s1">'error'</span><span class="p">,</span> <span class="nx">err</span> <span class="p">=&gt;</span> <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s1">'Redis Client Error'</span><span class="p">,</span> <span class="nx">err</span><span class="p">));</span> </span></span><span class="line"><span class="cl"> </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 hl"><span class="cl"><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">'bike:1'</span><span class="p">,</span> <span class="s1">'Process 134'</span><span class="p">);</span> </span></span><span class="line hl"><span class="cl"><span class="kr">const</span> <span class="nx">value</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s1">'bike:1'</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">value</span><span class="p">);</span> </span></span><span class="line hl"><span class="cl"><span class="c1">// returns 'Process 134' </span></span></span><span class="line hl"><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_set_and_get-step')" 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_set_and_get-step" 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/string-set-get-example.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_set_and_get-step" name="set_and_get-step" 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_set_and_get-step" title="Open example"> Java </label> <div aria-labelledby="tab-set_and_get-step" class="panel order-last hidden w-full mt-0 relative" id="panel_Java_set_and_get-step" 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">package</span> <span class="nn">io.redis.examples</span><span class="o">;</span> </span></span><span class="line"><span class="cl"> </span></span><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></span><span class="line"><span class="cl"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">SetGetExample</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="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></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 hl"><span class="cl"> <span class="n">String</span> <span class="n">status</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">"bike:1"</span><span class="o">,</span> <span class="s">"Process 134"</span><span class="o">);</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="o">(</span><span class="s">"OK"</span><span class="o">.</span><span class="na">equals</span><span class="o">(</span><span class="n">status</span><span class="o">))</span> <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="s">"Successfully added a bike."</span><span class="o">);</span> </span></span><span class="line hl"><span class="cl"> </span></span><span class="line hl"><span class="cl"> <span class="n">String</span> <span class="n">value</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">"bike:1"</span><span class="o">);</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="o">(</span><span class="n">value</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">)</span> <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="s">"The name of the bike is: "</span> <span class="o">+</span> <span class="n">value</span> <span class="o">+</span> <span class="s">"."</span><span class="o">);</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></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_set_and_get-step')" 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_set_and_get-step" 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/SetGetExample.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_set_and_get-step" name="set_and_get-step" 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_set_and_get-step" title="Open example"> Go </label> <div aria-labelledby="tab-set_and_get-step" class="panel order-last hidden w-full mt-0 relative" id="panel_Go_set_and_get-step" 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></span><span class="line"><span class="cl"> <span class="s">"github.com/redis/go-redis/v9"</span> </span></span><span class="line"><span class="cl"><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="kd">func</span> <span class="nf">ExampleClient_Set_and_get</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 hl"><span class="cl"> </span></span><span class="line hl"><span class="cl"> </span></span><span class="line hl"><span class="cl"> <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">"bike:1"</span><span class="p">,</span> <span class="s">"Process 134"</span><span class="p">,</span> <span class="mi">0</span><span class="p">).</span><span class="nf">Err</span><span class="p">()</span> </span></span><span class="line 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="s">"OK"</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="nx">value</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">Get</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"bike:1"</span><span class="p">).</span><span class="nf">Result</span><span class="p">()</span> </span></span><span class="line 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 class="nx">fmt</span><span class="p">.</span><span class="nf">Printf</span><span class="p">(</span><span class="s">"The name of the bike is %s"</span><span class="p">,</span> <span class="nx">value</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><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_Go_set_and_get-step')" 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_set_and_get-step" 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/set_get_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_set_and_get-step" name="set_and_get-step" 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_set_and_get-step" title="Open example"> C# </label> <div aria-labelledby="tab-set_and_get-step" class="panel order-last hidden w-full mt-0 relative" id="panel_Csharp_set_and_get-step" 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 class="k">public</span> <span class="k">class</span> <span class="nc">SetGetExample</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">redis</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">redis</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 hl"><span class="cl"> <span class="kt">bool</span> <span class="n">status</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">"bike:1"</span><span class="p">,</span> <span class="s">"Process 134"</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="p">(</span><span class="n">status</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="s">"Successfully added a bike."</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="kt">var</span> <span class="k">value</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">StringGet</span><span class="p">(</span><span class="s">"bike:1"</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="p">(</span><span class="k">value</span><span class="p">.</span><span class="n">HasValue</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="s">"The name of the bike is: "</span> <span class="p">+</span> <span class="k">value</span> <span class="p">+</span> <span class="s">"."</span><span class="p">);</span> </span></span><span class="line hl"><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></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_set_and_get-step')" 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_set_and_get-step" 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/SetGetExample.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> <h2 id="patterns"> Patterns </h2> <p> <strong> Note: </strong> The following pattern is discouraged in favor of <a href="/docs/latest/develop/use/patterns/distributed-locks/"> the Redlock algorithm </a> which is only a bit more complex to implement, but offers better guarantees and is fault tolerant. </p> <p> The command <code> SET resource-name anystring NX EX max-lock-time </code> is a simple way to implement a locking system with Redis. </p> <p> A client can acquire the lock if the above command returns <code> OK </code> (or retry after some time if the command returns Nil), and remove the lock just using <a href="/docs/latest/commands/del/"> <code> DEL </code> </a> . </p> <p> The lock will be auto-released after the expire time is reached. </p> <p> It is possible to make this system more robust modifying the unlock schema as follows: </p> <ul> <li> Instead of setting a fixed string, set a non-guessable large random string, called token. </li> <li> Instead of releasing the lock with <a href="/docs/latest/commands/del/"> <code> DEL </code> </a> , send a script that only removes the key if the value matches. </li> </ul> <p> This avoids that a client will try to release the lock after the expire time deleting the key created by another client that acquired the lock later. </p> <p> An example of unlock script would be similar to the following: </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> The script should be called with <code> EVAL ...script... 1 resource-name token-value </code> </p> <h2 id="resp2-reply"> RESP2 Reply </h2> <p> Any of the following: </p> <ul> <li> <a href="../../develop/reference/protocol-spec#bulk-strings"> Nil reply </a> : <code> GET </code> not given: Operation was aborted (conflict with one of the <code> XX </code> / <code> NX </code> options). </li> <li> <a href="../../develop/reference/protocol-spec#simple-strings"> Simple string reply </a> : <code> OK </code> . <code> GET </code> not given: The key was set. </li> <li> <a href="../../develop/reference/protocol-spec#bulk-strings"> Nil reply </a> : <code> GET </code> given: The key didn't exist before the <code> SET </code> . </li> <li> <a href="../../develop/reference/protocol-spec#bulk-strings"> Bulk string reply </a> : <code> GET </code> given: The previous value of the key. </li> </ul> <h2 id="resp3-reply"> RESP3 Reply </h2> <p> Any of the following: </p> <ul> <li> <a href="../../develop/reference/protocol-spec#nulls"> Null reply </a> : <code> GET </code> not given: Operation was aborted (conflict with one of the <code> XX </code> / <code> NX </code> options). </li> <li> <a href="../../develop/reference/protocol-spec#simple-strings"> Simple string reply </a> : <code> OK </code> . <code> GET </code> not given: The key was set. </li> <li> <a href="../../develop/reference/protocol-spec#nulls"> Null reply </a> : <code> GET </code> given: The key didn't exist before the <code> SET </code> . </li> <li> <a href="../../develop/reference/protocol-spec#bulk-strings"> Bulk string reply </a> : <code> GET </code> given: The previous value of the key. </li> </ul> <br/> <h2> History </h2> <ul> <li> Starting with Redis version 2.6.12: Added the <code> EX </code> , <code> PX </code> , <code> NX </code> and <code> XX </code> options. </li> <li> Starting with Redis version 6.0.0: Added the <code> KEEPTTL </code> option. </li> <li> Starting with Redis version 6.2.0: Added the <code> GET </code> , <code> EXAT </code> and <code> PXAT </code> option. </li> <li> Starting with Redis version 7.0.0: Allowed the <code> NX </code> and <code> GET </code> options to be used together. </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/set/"/> <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/crdb/get/.html
<section class="prose w-full py-12 max-w-none"> <h1> crdb-cli crdb get </h1> <p class="text-lg -mt-5 mb-10"> Shows the current configuration of an Active-Active database. </p> <p> Shows the current configuration of an Active-Active database. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">crdb-cli crdb get --crdb-guid &lt;guid&gt; </span></span></code></pre> </div> <h3 id="parameters"> Parameters </h3> <table> <thead> <tr> <th> Parameter </th> <th> Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> crdb-guid </td> <td> string </td> <td> The GUID of the database (required) </td> </tr> </tbody> </table> <h3 id="returns"> Returns </h3> <p> Returns the current configuration of the database. </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">$ crdb-cli crdb get --crdb-guid d84f6fe4-5bb7-49d2-a188-8900e09c6f66 </span></span><span class="line"><span class="cl">CRDB-GUID: d84f6fe4-5bb7-49d2-a188-8900e09c6f66 </span></span><span class="line"><span class="cl">Name: database1 </span></span><span class="line"><span class="cl">Encryption: False </span></span><span class="line"><span class="cl">Causal consistency: False </span></span><span class="line"><span class="cl">Protocol version: <span class="m">1</span> </span></span><span class="line"><span class="cl">FeatureSet version: <span class="m">5</span> </span></span><span class="line"><span class="cl">Modules: <span class="o">[]</span> </span></span><span class="line"><span class="cl">Default-DB-Config: </span></span><span class="line"><span class="cl"> memory_size: <span class="m">1073741824</span> </span></span><span class="line"><span class="cl"> port: <span class="m">12000</span> </span></span><span class="line"><span class="cl"> replication: True </span></span><span class="line"><span class="cl"> shard_key_regex: <span class="o">[{</span><span class="s1">'regex'</span>: <span class="s1">'.*\\{(?&lt;tag&gt;.*)\\}.*'</span><span class="o">}</span>, <span class="o">{</span><span class="s1">'regex'</span>: <span class="s1">'(?&lt;tag&gt;.*)'</span><span class="o">}]</span> </span></span><span class="line"><span class="cl"> sharding: True </span></span><span class="line"><span class="cl"> shards_count: <span class="m">1</span> </span></span><span class="line"><span class="cl"> tls_mode: disabled </span></span><span class="line"><span class="cl"> rack_aware: None </span></span><span class="line"><span class="cl"> data_persistence: None </span></span><span class="line"><span class="cl"> authentication_redis_pass: None </span></span><span class="line"><span class="cl"> authentication_admin_pass: None </span></span><span class="line"><span class="cl"> oss_sharding: None </span></span><span class="line"><span class="cl"> oss_cluster: None </span></span><span class="line"><span class="cl"> proxy_policy: None </span></span><span class="line"><span class="cl"> shards_placement: None </span></span><span class="line"><span class="cl"> oss_cluster_api_preferred_ip_type: None </span></span><span class="line"><span class="cl"> bigstore: None </span></span><span class="line"><span class="cl"> bigstore_ram_size: None </span></span><span class="line"><span class="cl"> aof_policy: None </span></span><span class="line"><span class="cl"> snapshot_policy: None </span></span><span class="line"><span class="cl"> max_aof_load_time: None </span></span><span class="line"><span class="cl"> max_aof_file_size: None </span></span><span class="line"><span class="cl">Instance: </span></span><span class="line"><span class="cl"> Id: <span class="m">1</span> </span></span><span class="line"><span class="cl"> Cluster: </span></span><span class="line"><span class="cl"> FQDN: cluster1.redis.local </span></span><span class="line"><span class="cl"> URL: https://cluster1.redis.local:9443 </span></span><span class="line"><span class="cl"> Replication-Endpoint: &lt;Default&gt; </span></span><span class="line"><span class="cl"> Replication TLS SNI: &lt;Default&gt; </span></span><span class="line"><span class="cl"> Compression: <span class="m">3</span> </span></span><span class="line"><span class="cl"> DB-Config: </span></span><span class="line"><span class="cl"> authentication_admin_pass: </span></span><span class="line"><span class="cl"> replication: None </span></span><span class="line"><span class="cl"> rack_aware: None </span></span><span class="line"><span class="cl"> memory_size: None </span></span><span class="line"><span class="cl"> data_persistence: None </span></span><span class="line"><span class="cl"> tls_mode: None </span></span><span class="line"><span class="cl"> authentication_redis_pass: None </span></span><span class="line"><span class="cl"> port: None </span></span><span class="line"><span class="cl"> shards_count: None </span></span><span class="line"><span class="cl"> shard_key_regex: None </span></span><span class="line"><span class="cl"> oss_sharding: None </span></span><span class="line"><span class="cl"> oss_cluster: None </span></span><span class="line"><span class="cl"> proxy_policy: None </span></span><span class="line"><span class="cl"> shards_placement: None </span></span><span class="line"><span class="cl"> oss_cluster_api_preferred_ip_type: None </span></span><span class="line"><span class="cl"> bigstore: None </span></span><span class="line"><span class="cl"> bigstore_ram_size: None </span></span><span class="line"><span class="cl"> aof_policy: None </span></span><span class="line"><span class="cl"> snapshot_policy: None </span></span><span class="line"><span class="cl"> max_aof_load_time: None </span></span><span class="line"><span class="cl"> max_aof_file_size: None </span></span><span class="line"><span class="cl">Instance: </span></span><span class="line"><span class="cl"> Id: <span class="m">2</span> </span></span><span class="line"><span class="cl"> Cluster: </span></span><span class="line"><span class="cl"> FQDN: cluster2.redis.local </span></span><span class="line"><span class="cl"> URL: https://cluster2.redis.local:9443 </span></span><span class="line"><span class="cl"> Replication-Endpoint: &lt;Default&gt; </span></span><span class="line"><span class="cl"> Replication TLS SNI: &lt;Default&gt; </span></span><span class="line"><span class="cl"> Compression: <span class="m">3</span> </span></span><span class="line"><span class="cl"> DB-Config: </span></span><span class="line"><span class="cl"> authentication_admin_pass: </span></span><span class="line"><span class="cl"> replication: None </span></span><span class="line"><span class="cl"> rack_aware: None </span></span><span class="line"><span class="cl"> memory_size: None </span></span><span class="line"><span class="cl"> data_persistence: None </span></span><span class="line"><span class="cl"> tls_mode: None </span></span><span class="line"><span class="cl"> authentication_redis_pass: None </span></span><span class="line"><span class="cl"> port: None </span></span><span class="line"><span class="cl"> shards_count: None </span></span><span class="line"><span class="cl"> shard_key_regex: None </span></span><span class="line"><span class="cl"> oss_sharding: None </span></span><span class="line"><span class="cl"> oss_cluster: None </span></span><span class="line"><span class="cl"> proxy_policy: None </span></span><span class="line"><span class="cl"> shards_placement: None </span></span><span class="line"><span class="cl"> oss_cluster_api_preferred_ip_type: None </span></span><span class="line"><span class="cl"> bigstore: None </span></span><span class="line"><span class="cl"> bigstore_ram_size: None </span></span><span class="line"><span class="cl"> aof_policy: None </span></span><span class="line"><span class="cl"> snapshot_policy: None </span></span><span class="line"><span class="cl"> max_aof_load_time: None </span></span><span class="line"><span class="cl"> max_aof_file_size: None </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/references/cli-utilities/crdb-cli/crdb/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/commands/rpushx/.html
<section class="prose w-full py-12"> <h1 class="command-name"> RPUSHX </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">RPUSHX key element [element ...]</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(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments. </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> @list </code> <span class="mr-1 last:hidden"> , </span> <code> @fast </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Inserts specified values at the tail of the list stored at <code> key </code> , only if <code> key </code> already exists and holds a list. In contrary to <a href="/docs/latest/commands/rpush/"> <code> RPUSH </code> </a> , no operation will be performed when <code> key </code> does not yet 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; RPUSH mylist "Hello" (integer) 1 redis&gt; RPUSHX mylist "World" (integer) 2 redis&gt; RPUSHX myotherlist "World" (integer) 0 redis&gt; LRANGE mylist 0 -1 1) "Hello" 2) "World" redis&gt; LRANGE myotherlist 0 -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> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : the length of the list after the push operation. <br/> <h2> History </h2> <ul> <li> Starting with Redis version 4.0.0: Accepts multiple <code> element </code> arguments. </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/rpushx/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/redis-data-integration/reference/ports/.html
<section class="prose w-full py-12 max-w-none"> <h1> RDI ports and protocols </h1> <p class="text-lg -mt-5 mb-10"> Network ports and protocols used by RDI </p> <p> The table below shows the ports and protocols that RDI uses for its services: </p> <table> <thead> <tr> <th style="text-align:left"> Name </th> <th style="text-align:left"> Type </th> <th style="text-align:left"> Port </th> <th style="text-align:left"> Protocol </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> prometheus-service </td> <td style="text-align:left"> Service </td> <td style="text-align:left"> 9092 </td> <td style="text-align:left"> TCP </td> </tr> <tr> <td style="text-align:left"> prometheus-service </td> <td style="text-align:left"> Ingress </td> <td style="text-align:left"> 9092 </td> <td style="text-align:left"> TCP/HTTP </td> </tr> <tr> <td style="text-align:left"> rdi-api </td> <td style="text-align:left"> Service </td> <td style="text-align:left"> 8080 </td> <td style="text-align:left"> TCP </td> </tr> <tr> <td style="text-align:left"> rdi-api </td> <td style="text-align:left"> Deployment </td> <td style="text-align:left"> 8080 </td> <td style="text-align:left"> TCP </td> </tr> <tr> <td style="text-align:left"> rdi-api </td> <td style="text-align:left"> Ingress </td> <td style="text-align:left"> 8080 </td> <td style="text-align:left"> TCP/HTTP </td> </tr> <tr> <td style="text-align:left"> rdi-metric-exporter </td> <td style="text-align:left"> Service </td> <td style="text-align:left"> 9121 </td> <td style="text-align:left"> TCP </td> </tr> <tr> <td style="text-align:left"> rdi-metric-exporter </td> <td style="text-align:left"> Ingress </td> <td style="text-align:left"> 9121 </td> <td style="text-align:left"> TCP/HTTP </td> </tr> <tr> <td style="text-align:left"> rdi-operator </td> <td style="text-align:left"> Deployment </td> <td style="text-align:left"> 8080 </td> <td style="text-align:left"> TCP </td> </tr> <tr> <td style="text-align:left"> vm-dis-reloader </td> <td style="text-align:left"> Deployment </td> <td style="text-align:left"> 9090 </td> <td style="text-align:left"> TCP </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/integrate/redis-data-integration/reference/ports/"/> <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/rc-quickstart/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Cloud quick start </h1> <p> If you're new to Redis Cloud, this quick start helps you get up and running. </p> <p> You'll learn how to: </p> <ol> <li> <p> Create an account and a free database </p> </li> <li> <p> Connect to your database </p> </li> </ol> <p> If you already have an account, see <a href="/docs/latest/operate/rc/databases/create-database/create-essentials-database/"> Create an Essentials database </a> to create a Free 30 MB Essentials database. Free plans are a type of Essentials plans; this provides an easy upgrade path when you need it. </p> <p> If you already have a database, see <a href="/docs/latest/operate/rc/databases/"> Manage databases </a> . </p> <h2 id="create-an-account"> Create an account </h2> <p> To create a new account with a free database: </p> <ol> <li> <p> Go to the <a href="https://redis.io/try-free/"> Sign up </a> page. </p> </li> <li> <p> There are two options available to get started with Redis Cloud: </p> <ul> <li> Enter your information in the form and select <strong> Get Started </strong> . </li> <li> Sign up with <strong> Google </strong> or <strong> Github </strong> . </li> </ul> </li> <li> <p> After you enter your information, you should receive an activation email from Redis. Select <strong> Activate account </strong> to go to the <strong> Get Started </strong> page in the <a href="https://cloud.redis.io"> Redis Cloud console </a> . </p> <a href="/docs/latest/images/rc/quickstart-get-started.png" sdata-lightbox="/images/rc/quickstart-get-started.png"> <img alt="Dialog to create your free database." src="/docs/latest/images/rc/quickstart-get-started.png" width="75%"/> </a> <ol> <li> Choose your role from the <strong> Role </strong> drop-down. </li> <li> Choose your company size from the <strong> myself/company </strong> drop-down. If you are working on a personal project, select <strong> myself </strong> . </li> <li> Select your Redis use case from the <strong> use case </strong> drop-down. </li> <li> Choose your client language from the <strong> client </strong> drop-down. </li> </ol> <p> Click <strong> Create Free Database </strong> to move on. </p> </li> <li> <p> Select your preferred cloud vendor and region. </p> <a href="/docs/latest/images/rc/quickstart-create-free-database.png" sdata-lightbox="/images/rc/quickstart-create-free-database.png"> <img alt="Dialog to create your free database." src="/docs/latest/images/rc/quickstart-create-free-database.png" width="75%"/> </a> </li> <li> <p> Select <strong> Let's start free </strong> to create your 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> If you would rather customize your database, select <strong> Create a custom database </strong> to go to the <strong> New database </strong> page. From there, you can <a href="/docs/latest/operate/rc/databases/create-database/"> Create a database </a> . </div> </div> <p> The <strong> Database list </strong> appears with your new database in the list. </p> <a href="/docs/latest/images/rc/quickstart-database-list.png" sdata-lightbox="/images/rc/quickstart-database-list.png"> <img alt="The database list showing your new Database." src="/docs/latest/images/rc/quickstart-database-list.png" width="75%"/> </a> </li> <li> <p> Select the database name to view the <strong> Configuration </strong> tab for your new database. </p> <a href="/docs/latest/images/rc/quickstart-database-overview.png" sdata-lightbox="/images/rc/quickstart-database-overview.png"> <img alt="Configuration tab showing details of your new database." src="/docs/latest/images/rc/quickstart-database-overview.png" width="75%"/> </a> </li> <li> <p> In the upper corner, an icon shows the current status of the database. If the icon shows an orange clock, this means your database is still being created and its status is <em> pending </em> . </p> <p> <a href="/docs/latest/images/rc/icon-database-update-status-pending.png#no-click" sdata-lightbox="/images/rc/icon-database-update-status-pending.png#no-click"> <img alt="Pending database status" src="/docs/latest/images/rc/icon-database-update-status-pending.png#no-click"/> </a> <a href="/docs/latest/images/rc/icon-database-update-status-active.png#no-click" sdata-lightbox="/images/rc/icon-database-update-status-active.png#no-click"> <img alt="Active database status" src="/docs/latest/images/rc/icon-database-update-status-active.png#no-click"/> </a> </p> <p> Once the database has been created, it becomes <em> active </em> and the status indicator switches to a green circle containing a checkmark. </p> <p> Redis Cloud console operations are asynchronous; they operate <a href="/docs/latest/operate/rc/api/get-started/process-lifecycle/"> in the background </a> . You can continue to use the Redis Cloud console for other tasks, but pending resources aren't available until they're active. </p> <p> When your new database becomes active, you're ready to connect to it. </p> </li> </ol> <h2 id="connect-to-a-database"> Connect to a database </h2> <p> At this point, you're viewing the <strong> Configuration </strong> details for your new database. Go to the <strong> Security </strong> section of the page. </p> <p> To connect to your database, you need your username and password. Each database is protected by a <strong> Default user </strong> called <code> default </code> and a masked <strong> Default user password </strong> . Select the eye icon to show or hide the password. </p> <a href="/docs/latest/images/rc/database-fixed-configuration-security.png" sdata-lightbox="/images/rc/database-fixed-configuration-security.png"> <img alt="The Security section of the Configuration tab of the database details page." src="/docs/latest/images/rc/database-fixed-configuration-security.png" width="75%"/> </a> <p> Once you have the username and password, select <strong> Connect </strong> to open the connection wizard. </p> <a href="/docs/latest/images/rc/connection-wizard-button.png#no-click" sdata-lightbox="/images/rc/connection-wizard-button.png#no-click"> <img alt="Connect button." src="/docs/latest/images/rc/connection-wizard-button.png#no-click"/> </a> <p> The connection wizard provides the following database connection methods: </p> <ul> <li> <p> <a href="#using-redisinsight"> Redis Insight </a> </p> </li> <li> <p> <a href="#using-rediscli"> <code> redis-cli </code> </a> utility </p> </li> <li> <p> <a href="#using-redis-client"> Redis client </a> for your preferred programming language </p> </li> </ul> <a href="/docs/latest/images/rc/connection-wizard.png" sdata-lightbox="/images/rc/connection-wizard.png"> <img alt="The connection wizard." src="/docs/latest/images/rc/connection-wizard.png"/> </a> <h3 id="using-redisinsight"> Redis Insight </h3> <p> <a href="/docs/latest/develop/tools/insight/"> Redis Insight </a> is a free Redis GUI that is available for macOS, Windows, and Linux. </p> <ol> <li> <p> In the connection wizard, under <strong> Redis Insight </strong> , select <strong> Download </strong> to download Redis Insight. </p> </li> <li> <p> <a href="/docs/latest/develop/tools/insight/"> Install Redis Insight </a> . </p> </li> <li> <p> Once installed, select <strong> Open with Redis Insight </strong> . </p> </li> <li> <p> A pop-up asks if you wish to open the link with Redis Insight. Select <strong> Open Redis Insight </strong> to connect to your database with Redis Insight. </p> </li> </ol> <p> See the <a href="/docs/latest/develop/tools/insight/"> Redis Insight docs </a> for more info. </p> <h3 id="using-redis-client"> Redis client </h3> <p> A Redis client is a software library or tool that enables applications to interact with a Redis server. Each client has its own syntax and installation process. For help with a specific client, see the client's documentation. </p> <p> The connection wizard provides code snippets to connect to your database with the following programming languages: </p> <ul> <li> node.js using <a href="/docs/latest/develop/clients/nodejs/"> node-redis </a> </li> <li> .NET using <a href="https://stackexchange.github.io/StackExchange.Redis/"> StackExchange.Redis </a> </li> <li> Python using <a href="/docs/latest/develop/clients/redis-py/"> redis-py </a> </li> <li> Java using <a href="/docs/latest/develop/clients/jedis/"> Jedis </a> </li> </ul> <a href="/docs/latest/images/rc/connection-wizard-clients.png" sdata-lightbox="/images/rc/connection-wizard-clients.png"> <img alt="The connection wizard clients." src="/docs/latest/images/rc/connection-wizard-clients.png"/> </a> <p> See <a href="/docs/latest/develop/clients/"> Clients </a> to learn how to connect with the official Redis clients. </p> <h3 id="using-rediscli"> redis-cli </h3> <p> The <a href="/docs/latest/develop/tools/cli/"> <code> redis-cli </code> </a> utility is installed when you install Redis. It provides a command-line interface that lets you work with your database using core <a href="/docs/latest/commands/"> Redis commands </a> . </p> <p> To run <code> redis-cli </code> , <a href="/docs/latest/operate/oss_and_stack/install/install-stack/"> install Redis Stack </a> on your machine. </p> <p> See <a href="/docs/latest/develop/tools/cli/"> Redis CLI </a> to learn how to use <code> redis-cli </code> . </p> <h2 id="more-info"> More info </h2> <ul> <li> <a href="/docs/latest/develop/clients/"> Connect your application </a> </li> <li> <a href="/docs/latest/operate/rc/databases/import-data/"> Import data </a> </li> <li> <a href="/docs/latest/operate/rc/databases/"> Manage databases </a> </li> <li> <a href="/docs/latest/operate/rc/databases/configuration/data-persistence/"> Data persistence </a> </li> <li> <a href="/docs/latest/operate/rc/security/"> Secure your Redis Cloud database </a> </li> <li> <a href="/docs/latest/operate/rc/databases/back-up-data/"> Back-up databases </a> </li> <li> <a href="/docs/latest/operate/rc/databases/monitor-performance/"> Monitor Redis Cloud performance </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/rc/rc-quickstart/"/> <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/zunion/.html
<section class="prose w-full py-12"> <h1 class="command-name"> ZUNION </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">ZUNION numkeys key [key ...] [WEIGHTS weight [weight ...]] [AGGREGATE &lt;SUM | MIN | MAX&gt;] [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(N)+O(M*log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set. </dd> <dt class="font-semibold text-redis-ink-900 m-0"> ACL categories: </dt> <dd class="m-0"> <code> @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/zunionstore/"> <code> ZUNIONSTORE </code> </a> , but instead of storing the resulting sorted set, it is returned to the client. </p> <p> For a description of the <code> WEIGHTS </code> and <code> AGGREGATE </code> options, see <a href="/docs/latest/commands/zunionstore/"> <code> ZUNIONSTORE </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 zset1 1 "one" (integer) 1 redis&gt; ZADD zset1 2 "two" (integer) 1 redis&gt; ZADD zset2 1 "one" (integer) 1 redis&gt; ZADD zset2 2 "two" (integer) 1 redis&gt; ZADD zset2 3 "three" (integer) 1 redis&gt; ZUNION 2 zset1 zset2 1) "one" 2) "three" 3) "two" redis&gt; ZUNION 2 zset1 zset2 WITHSCORES 1) "one" 2) "2" 3) "three" 4) "3" 5) "two" 6) "4" </pre> <div class="prompt" style=""> <span> redis&gt; </span> <input autocomplete="off" name="prompt" spellcheck="false" type="text"/> </div> </form> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#arrays"> Array reply </a> : the result of the union with, optionally, their scores when <em> WITHSCORES </em> is used. <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/zunion/"/> <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/recommendations/node-selection/.html
<section class="prose w-full py-12 max-w-none"> <h1> Control node selection </h1> <p class="text-lg -mt-5 mb-10"> This section provides information about how Redis Enterprise cluster pods can be scheduled to only be placed on specific nodes or node pools. </p> <p> Many Kubernetes cluster deployments have different kinds of nodes that have different CPU and memory resources available for scheduling cluster workloads. Redis Enterprise for Kubernetes has various abilities to control the scheduling Redis Enterprise cluster node pods through properties specified in the Redis Enterprise cluster custom resource definition (CRD). </p> <p> A Redis Enterprise cluster (REC) is deployed as a StatefulSet which manages the Redis Enterprise cluster node pods. The scheduler chooses a node to deploy a new Redis Enterprise cluster node pod on when: </p> <ul> <li> The cluster is created </li> <li> The cluster is resized </li> <li> A pod fails </li> </ul> <p> Here are the ways that you can control the pod scheduling: </p> <h2 id="using-node-selectors"> Using node selectors </h2> <p> The <a href="/docs/latest/operate/kubernetes/reference/redis_enterprise_cluster_api/#spec"> <code> nodeSelector </code> </a> property of the cluster specification uses the same values and structures as the <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector"> Kubernetes <code> nodeSelector </code> </a> . In general, node labels are a simple way to make sure that specific nodes are used for Redis Enterprise pods. For example, if nodes 'n1' and 'n2' are labeled as "high memory": </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">kubectl label nodes n1 <span class="nv">memory</span><span class="o">=</span>high </span></span><span class="line"><span class="cl">kubectl label nodes n2 <span class="nv">memory</span><span class="o">=</span>high </span></span></code></pre> </div> <p> The Redis Enterprise cluster CRD can request to be scheduled on these nodes: </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">app.redislabs.com/v1</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">RedisEnterpriseCluster</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">metadata</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">rec</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><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">nodes</span><span class="p">:</span><span class="w"> </span><span class="m">3</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">nodeSelector</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">memory</span><span class="p">:</span><span class="w"> </span><span class="l">high</span><span class="w"> </span></span></span></code></pre> </div> <p> Then, when the operator creates the StatefulSet associated with the pod, the nodeSelector section is part of the pod specification. When the scheduler attempts to create new pods, it needs to satisfy the node selection constraints. </p> <h2 id="using-node-pools"> Using node pools </h2> <p> A node pool is a common part of the underlying infrastructure of the Kubernetes cluster deployment and provider. Often, node pools are similarly-configured classes of nodes such as nodes with the same allocated amount of memory and CPU. Implementors often label these nodes with a consistent set of labels. </p> <p> On Google Kubernetes Engine (GKE), all node pools have the label <code> cloud.google.com/gke-nodepool </code> with a value of the name used during configuration. On Microsoft Azure Kubernetes System (AKS), you can create node pools with a specific set of labels. Other managed cluster services may have similar labeling schemes. </p> <p> You can use the <code> nodeSelector </code> section to request a specific node pool by label values. For example, on GKE: </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">app.redislabs.com/v1</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">RedisEnterpriseCluster</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">metadata</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">rec</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><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">nodes</span><span class="p">:</span><span class="w"> </span><span class="m">3</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">nodeSelector</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">cloud.google.com/gke-nodepool</span><span class="p">:</span><span class="w"> </span><span class="s1">'high-memory'</span><span class="w"> </span></span></span></code></pre> </div> <h2 id="using-node-taints"> Using node taints </h2> <p> You can use multiple node taints with a set of tolerations to control Redis Enterprise cluster node pod scheduling. The <code> podTolerations </code> property of the cluster specification specifies a list of pod tolerations to use. The value is a list of <a href="https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts"> Kubernetes tolerations </a> . </p> <p> For example, if the cluster has a single node pool, the node taints can control the allowed workloads for a node. You can add taints to the node, for example nodes n1, n2, and n3, reserve a set of nodes for the Redis Enterprise cluster: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">kubectl taint nodes n1 <span class="nv">db</span><span class="o">=</span>rec:NoSchedule </span></span><span class="line"><span class="cl">kubectl taint nodes n2 <span class="nv">db</span><span class="o">=</span>rec:NoSchedule </span></span><span class="line"><span class="cl">kubectl taint nodes n3 <span class="nv">db</span><span class="o">=</span>rec:NoSchedule </span></span></code></pre> </div> <p> This prevents any pods from being scheduled onto the nodes unless the pods can tolerate the taint <code> db=rec </code> . </p> <p> You can then add the toleration for this taint to the cluster specification: </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">app.redislabs.com/v1</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">RedisEnterpriseCluster</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">metadata</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">rec</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><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">nodes</span><span class="p">:</span><span class="w"> </span><span class="m">3</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">podTolerations</span><span class="p">:</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 class="l">db</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">operator</span><span class="p">:</span><span class="w"> </span><span class="l">Equal </span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">value</span><span class="p">:</span><span class="w"> </span><span class="l">rec</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">effect</span><span class="p">:</span><span class="w"> </span><span class="l">NoSchedule</span><span class="w"> </span></span></span></code></pre> </div> <p> A set of taints can also handle more complex use cases. For example, a <code> role=test </code> or <code> role=dev </code> taint can be used to designate a node as dedicated for testing or development workloads via pod tolerations. </p> <h2 id="using-pod-anti-affinity"> Using pod anti-affinity </h2> <p> By default, the Redis Enterprise node pods are not allowed to be placed on the same node for the same cluster: </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">podAntiAffinity</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">requiredDuringSchedulingIgnoredDuringExecution</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">labelSelector</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">matchLabels</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">app</span><span class="p">:</span><span class="w"> </span><span class="l">redis-enterprise</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">redis.io/cluster</span><span class="p">:</span><span class="w"> </span><span class="l">rec</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">redis.io/role</span><span class="p">:</span><span class="w"> </span><span class="l">node</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">topologyKey</span><span class="p">:</span><span class="w"> </span><span class="l">kubernetes.io/hostname</span><span class="w"> </span></span></span></code></pre> </div> <p> Each pod has the three labels above where <code> redis.io/cluster </code> is the label for the name of your cluster. </p> <p> You can change this rule to restrict or include nodes that the Redis Enterprise cluster node pods can run on. For example, you can delete the <code> redis.io/cluster </code> label so that even Redis Enterprise node pods from different clusters cannot be scheduled on the same Kubernetes node: </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">app.redislabs.com/v1</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">RedisEnterpriseCluster</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">metadata</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">rec</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><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">nodes</span><span class="p">:</span><span class="w"> </span><span class="m">3</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">podAntiAffinity</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">requiredDuringSchedulingIgnoredDuringExecution</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">labelSelector</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">matchLabels</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">app</span><span class="p">:</span><span class="w"> </span><span class="l">redis-enterprise</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">redis.io/role</span><span class="p">:</span><span class="w"> </span><span class="l">node</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">topologyKey</span><span class="p">:</span><span class="w"> </span><span class="l">kubernetes.io/hostname</span><span class="w"> </span></span></span></code></pre> </div> <p> or you can prevent Redis Enterprise nodes from being schedule with other workloads. For example, if all database workloads have the label 'local/role: database', you can use this label to avoid scheduling two databases on the same node: </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">app.redislabs.com/v1</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">RedisEnterpriseCluster</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">metadata</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">rec</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><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">nodes</span><span class="p">:</span><span class="w"> </span><span class="m">3</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">extraLabels</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">local/role</span><span class="p">:</span><span class="w"> </span><span class="l">database</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">podAntiAffinity</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">requiredDuringSchedulingIgnoredDuringExecution</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">labelSelector</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">matchLabels</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">local/role</span><span class="p">:</span><span class="w"> </span><span class="l">database</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">app</span><span class="p">:</span><span class="w"> </span><span class="l">redis-enterprise</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">redis.io/cluster</span><span class="p">:</span><span class="w"> </span><span class="l">rec</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">redis.io/role</span><span class="p">:</span><span class="w"> </span><span class="l">node</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">topologyKey</span><span class="p">:</span><span class="w"> </span><span class="l">kubernetes.io/hostname</span><span class="w"> </span></span></span></code></pre> </div> <p> In this case, any pods that are deployed with the label <code> local/role: database </code> cannot be scheduled on the same node. </p> <h2 id="using-rack-awareness"> Using rack awareness </h2> <p> You can configure Redis Enterprise with rack-zone awareness to increase availability during partitions or other rack (or region) related failures. </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 creating your rack-zone ID, there are some constraints to consider; see <a href="/docs/latest/operate/rs/clusters/configure/rack-zone-awareness/#rack-zone-id-rules"> rack-zone awareness </a> for more info. </div> </div> <p> Rack-zone awareness is a single property in the Redis Enterprise cluster CRD named <code> rackAwarenessNodeLabel </code> . This value for this label is commonly <code> topology.kubernetes.io/zone </code> as documented in <a href="https://kubernetes.io/docs/setup/best-practices/multiple-zones/#nodes-are-labeled"> 'Running in multiple zones' </a> . </p> <p> You can check the value for this label in your nodes with the command: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl"><span class="nv">$kubectl</span> get nodes -o custom-columns<span class="o">=</span><span class="s2">"name:metadata.name"</span>,<span class="s2">"rack\\zone:metadata.labels.failure-domain\.beta\.kubernetes\.io/zone"</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">name rack<span class="se">\z</span>one </span></span><span class="line"><span class="cl">ip-10-0-x-a.eu-central-1.compute.internal eu-central-1a </span></span><span class="line"><span class="cl">ip-10-0-x-b.eu-central-1.compute.internal eu-central-1a </span></span><span class="line"><span class="cl">ip-10-0-x-c.eu-central-1.compute.internal eu-central-1b </span></span><span class="line"><span class="cl">ip-10-0-x-d.eu-central-1.compute.internal eu-central-1b </span></span></code></pre> </div> <h3 id="enabling-the-cluster-role"> Enabling the cluster role </h3> <p> For the operator to read the cluster node information, you must create a cluster role for the operator and then bind the role to the service account. </p> <p> Here's a cluster role: </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">ClusterRole</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">rbac.authorization.k8s.io/v1</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">metadata</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">redis-enterprise-operator</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">rules</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># needed for rack awareness</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">apiGroups</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">""</span><span class="p">]</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">resources</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"nodes"</span><span class="p">]</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">verbs</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"list"</span><span class="p">,</span><span class="w"> </span><span class="s2">"get"</span><span class="p">,</span><span class="w"> </span><span class="s2">"watch"</span><span class="p">]</span><span class="w"> </span></span></span></code></pre> </div> <p> And here's how to apply the role: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">kubectl apply -f https://raw.githubusercontent.com/RedisLabs/redis-enterprise-k8s-docs/master/rack_awareness/rack_aware_cluster_role.yaml </span></span></code></pre> </div> <p> The binding is typically to the <code> redis-enterprise-operator </code> service account: </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">ClusterRoleBinding</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">rbac.authorization.k8s.io/v1</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">metadata</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">redis-enterprise-operator</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">subjects</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span>- <span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">ServiceAccount</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">namespace</span><span class="p">:</span><span class="w"> </span><span class="l">OPERATOR_NAMESPACE</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">redis-enterprise-operator</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">roleRef</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">ClusterRole</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">redis-enterprise-operator</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">apiGroup</span><span class="p">:</span><span class="w"> </span><span class="l">rbac.authorization.k8s.io</span><span class="w"> </span></span></span></code></pre> </div> <p> and it can be applied by running: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">kubectl apply -f https://raw.githubusercontent.com/RedisLabs/redis-enterprise-k8s-docs/master/rack_awareness/rack_aware_cluster_role_binding.yaml </span></span></code></pre> </div> <p> Once the cluster role and the binding have been applied, you can configure Redis Enterprise clusters to use rack awareness labels. </p> <h3 id="configuring-rack-awareness"> Configuring rack awareness </h3> <p> You can configure the node label to read for the rack zone by setting the <code> rackAwarenessNodeLabel </code> property: </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">app.redislabs.com/v1</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">RedisEnterpriseCluster</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">metadata</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">example-redisenterprisecluster</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"></span><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">nodes</span><span class="p">:</span><span class="w"> </span><span class="m">3</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">rackAwarenessNodeLabel</span><span class="p">:</span><span class="w"> </span><span class="l">topology.kubernetes.io/zone</span><span class="w"> </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"> Note: </div> When you use the <code> rackAwarenessNodeLabel </code> property, the operator will change the topologyKey for the anti-affinity rule to the label name used unless you have specified the <code> podAntiAffinity </code> property as well. If you use <code> rackAwarenessNodeLabel </code> and <code> podAntiAffinity </code> together, you must make sure that the <code> topologyKey </code> in your pod anti-affinity rule is set to the node label name. </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/kubernetes/recommendations/node-selection/"/> <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/configuring/linux-swap/.html
<section class="prose w-full py-12 max-w-none"> <h1> Configure swap for Linux </h1> <p class="text-lg -mt-5 mb-10"> Turn off Linux swap space. </p> <p> Linux operating systems use swap space, which is enabled by default, to help manage memory (pages) by copying pages from RAM to disk. Due to the way Redis Enterprise Software utilizes and manages memory, it is best to prevent OS swapping. For more details, see <a href="/docs/latest/operate/rs/7.4/databases/memory-performance/memory-limit/"> memory limits </a> . The recommendation is to turn off Linux swap completely in the OS. </p> <p> When you install or build the OS on the machine intended to host your Redis Enterprise Software cluster, avoid configuring swap partitions if possible. </p> <h2 id="turn-off-swap"> Turn off swap </h2> <p> To turn off swap in the OS of an existing server, VM, or instance, you must have <code> sudo </code> access or be a root user to run the following commands: </p> <ol> <li> <p> Turn off swap: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">sudo swapoff -a </span></span></code></pre> </div> </li> <li> <p> Comment out the swap partitions configured in the OS so swap remains off even after a reboot: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">sudo sed -i.bak <span class="s1">'/ swap / s/^(.*)$/#1/g'</span> /etc/fstab </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/installing-upgrading/configuring/linux-swap/"/> <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/probabilistic/cuckoo-filter/.html
<section class="prose w-full py-12"> <h1> Cuckoo filter </h1> <p class="text-lg -mt-5 mb-10"> Cuckoo filters are a probabilistic data structure that checks for presence of an element in a set </p> <p> A Cuckoo filter, just like a Bloom filter, is a probabilistic data structure in Redis Stack that enables you to check if an element is present in a set in a very fast and space efficient way, while also allowing for deletions and showing better performance than Bloom in some scenarios. </p> <p> While the Bloom filter is a bit array with flipped bits at positions decided by the hash function, a Cuckoo filter is an array of buckets, storing fingerprints of the values in one of the buckets at positions decided by the two hash functions. A membership query for item <code> x </code> searches the possible buckets for the fingerprint of <code> x </code> , and returns true if an identical fingerprint is found. A cuckoo filter's fingerprint size will directly determine the false positive rate. </p> <h2 id="use-cases"> Use cases </h2> <p> <strong> Targeted ad campaigns (advertising, retail) </strong> </p> <p> This application answers this question: Has the user signed up for this campaign yet? </p> <p> Use a Cuckoo filter for every campaign, populated with targeted users' ids. On every visit, the user id is checked against one of the Cuckoo filters. </p> <ul> <li> If yes, the user has not signed up for campaign. Show the ad. </li> <li> If the user clicks ad and signs up, remove the user id from that Cuckoo filter. </li> <li> If no, the user has signed up for that campaign. Try the next ad/Cuckoo filter. </li> </ul> <p> <strong> Discount code/coupon validation (retail, online shops) </strong> </p> <p> This application answers this question: Has this discount code/coupon been used yet? </p> <p> Use a Cuckoo filter populated with all discount codes/coupons. On every try, the entered code is checked against the filter. </p> <ul> <li> If no, the coupon is not valid. </li> <li> If yes, the coupon can be valid. Check the main database. If valid, remove from Cuckoo filter as <code> used </code> . </li> </ul> <p> Note&gt; In addition to these two cases, Cuckoo filters serve very well all the Bloom filter use cases. </p> <h2 id="examples"> Examples </h2> <blockquote> <p> You'll learn how to create an empty cuckoo filter with an initial capacity for 1,000 items, add items, check their existence, and remove them. Even though the <a href="/docs/latest/commands/cf.add/"> <code> CF.ADD </code> </a> command can create a new filter if one isn't present, it might not be optimally sized for your needs. It's better to use the <a href="/docs/latest/commands/cf.reserve/"> <code> CF.RESERVE </code> </a> command to set up a filter with your preferred capacity. </p> </blockquote> <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="cuckoo_tutorial-stepcuckoo"> <input checked="" class="radiotab w-0 h-0" data-lang="redis-cli" id="redis-cli_cuckoo_tutorial-stepcuckoo" name="cuckoo_tutorial-stepcuckoo" 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_cuckoo_tutorial-stepcuckoo" title="Open example"> &gt;_ Redis CLI </label> <div aria-labelledby="tab-cuckoo_tutorial-stepcuckoo" class="panel order-last hidden w-full mt-0 relative" id="panel_redis-cli_cuckoo_tutorial-stepcuckoo" 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; CF.RESERVE bikes:models 1000000 </span></span><span class="line hl"><span class="cl">OK </span></span><span class="line hl"><span class="cl">&gt; CF.ADD bikes:models "Smoky Mountain Striker" </span></span><span class="line hl"><span class="cl">(integer) 1 </span></span><span class="line hl"><span class="cl">&gt; CF.EXISTS bikes:models "Smoky Mountain Striker" </span></span><span class="line hl"><span class="cl">(integer) 1 </span></span><span class="line hl"><span class="cl">&gt; CF.EXISTS bikes:models "Terrible Bike Name" </span></span><span class="line hl"><span class="cl">(integer) 0 </span></span><span class="line hl"><span class="cl">&gt; CF.DEL bikes:models "Smoky Mountain Striker" </span></span><span class="line hl"><span class="cl">(integer) 1</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_cuckoo_tutorial-stepcuckoo')" 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_cuckoo_tutorial-stepcuckoo" name="cuckoo_tutorial-stepcuckoo" 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_cuckoo_tutorial-stepcuckoo" title="Open example"> Python </label> <div aria-labelledby="tab-cuckoo_tutorial-stepcuckoo" class="panel order-last hidden w-full mt-0 relative" id="panel_Python_cuckoo_tutorial-stepcuckoo" 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="s2">""" </span></span></span><span class="line"><span class="cl"><span class="s2">Code samples for Cuckoo filter doc pages: </span></span></span><span class="line"><span class="cl"><span class="s2"> https://redis.io/docs/latest/develop/data-types/probabilistic/cuckoo-filter/ </span></span></span><span class="line"><span class="cl"><span class="s2">"""</span> </span></span><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></span><span class="line hl"><span class="cl"><span class="n">res1</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">cf</span><span class="p">()</span><span class="o">.</span><span class="n">reserve</span><span class="p">(</span><span class="s2">"bikes:models"</span><span class="p">,</span> <span class="mi">1000000</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">res1</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="n">res2</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">cf</span><span class="p">()</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s2">"bikes:models"</span><span class="p">,</span> <span class="s2">"Smoky Mountain Striker"</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">res2</span><span class="p">)</span> <span class="c1"># &gt;&gt;&gt; 1</span> </span></span><span class="line hl"><span class="cl"> </span></span><span class="line hl"><span class="cl"><span class="n">res3</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">cf</span><span class="p">()</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="s2">"bikes:models"</span><span class="p">,</span> <span class="s2">"Smoky Mountain Striker"</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">res3</span><span class="p">)</span> <span class="c1"># &gt;&gt;&gt; 1</span> </span></span><span class="line hl"><span class="cl"> </span></span><span class="line hl"><span class="cl"><span class="n">res4</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">cf</span><span class="p">()</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="s2">"bikes:models"</span><span class="p">,</span> <span class="s2">"Terrible Bike Name"</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">res4</span><span class="p">)</span> <span class="c1"># &gt;&gt;&gt; 0</span> </span></span><span class="line hl"><span class="cl"> </span></span><span class="line hl"><span class="cl"><span class="n">res5</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">cf</span><span class="p">()</span><span class="o">.</span><span class="n">delete</span><span class="p">(</span><span class="s2">"bikes:models"</span><span class="p">,</span> <span class="s2">"Smoky Mountain Striker"</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">res5</span><span class="p">)</span> <span class="c1"># &gt;&gt;&gt; 1</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_cuckoo_tutorial-stepcuckoo')" 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_cuckoo_tutorial-stepcuckoo" 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/dt_cuckoo.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_cuckoo_tutorial-stepcuckoo" name="cuckoo_tutorial-stepcuckoo" 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_cuckoo_tutorial-stepcuckoo" title="Open example"> Node.js </label> <div aria-labelledby="tab-cuckoo_tutorial-stepcuckoo" class="panel order-last hidden w-full mt-0 relative" id="panel_Nodejs_cuckoo_tutorial-stepcuckoo" role="tabpanel" tabindex="0"> <div class="highlight"> <pre class="chroma"><code class="language-javascript" data-lang="javascript"><span class="line"><span class="cl"><span class="kr">import</span> <span class="nx">assert</span> <span class="nx">from</span> <span class="s1">'assert'</span><span class="p">;</span> </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></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="kr">const</span> <span class="nx">res1</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">cf</span><span class="p">.</span><span class="nx">reserve</span><span class="p">(</span><span class="s1">'bikes:models'</span><span class="p">,</span> <span class="mi">1000000</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">res1</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="kr">const</span> <span class="nx">res2</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">cf</span><span class="p">.</span><span class="nx">add</span><span class="p">(</span><span class="s1">'bikes:models'</span><span class="p">,</span> <span class="s1">'Smoky Mountain Striker'</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">res2</span><span class="p">);</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="kr">const</span> <span class="nx">res3</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">cf</span><span class="p">.</span><span class="nx">exists</span><span class="p">(</span><span class="s1">'bikes:models'</span><span class="p">,</span> <span class="s1">'Smoky Mountain Striker'</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">res3</span><span class="p">);</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="kr">const</span> <span class="nx">res4</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">cf</span><span class="p">.</span><span class="nx">exists</span><span class="p">(</span><span class="s1">'bikes:models'</span><span class="p">,</span> <span class="s1">'Terrible Bike Name'</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">res4</span><span class="p">);</span> <span class="c1">// &gt;&gt;&gt; 0 </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">res5</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">client</span><span class="p">.</span><span class="nx">cf</span><span class="p">.</span><span class="nx">del</span><span class="p">(</span><span class="s1">'bikes:models'</span><span class="p">,</span> <span class="s1">'Smoky Mountain Striker'</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">res5</span><span class="p">);</span> <span class="c1">// &gt;&gt;&gt; 1 </span></span></span><span class="line"><span class="cl"><span class="c1"></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_cuckoo_tutorial-stepcuckoo')" 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_cuckoo_tutorial-stepcuckoo" 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/dt-cuckoo.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_cuckoo_tutorial-stepcuckoo" name="cuckoo_tutorial-stepcuckoo" 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_cuckoo_tutorial-stepcuckoo" title="Open example"> Java </label> <div aria-labelledby="tab-cuckoo_tutorial-stepcuckoo" class="panel order-last hidden w-full mt-0 relative" id="panel_Java_cuckoo_tutorial-stepcuckoo" role="tabpanel" tabindex="0"> <div class="highlight"> <pre class="chroma"><code class="language-java" data-lang="java"><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="kn">package</span> <span class="nn">io.redis.examples</span><span class="o">;</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">org.junit.Assert</span><span class="o">;</span> </span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">org.junit.Test</span><span class="o">;</span> </span></span><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></span><span class="line"><span class="cl"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">CuckooFilterExample</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 hl"><span class="cl"> <span class="n">String</span> <span class="n">res1</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">cfReserve</span><span class="o">(</span><span class="s">"bikes:models"</span><span class="o">,</span> <span class="mi">1000000</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">res1</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></span><span class="line hl"><span class="cl"> <span class="kt">boolean</span> <span class="n">res2</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">cfAdd</span><span class="o">(</span><span class="s">"bikes:models"</span><span class="o">,</span> <span class="s">"Smoky Mountain Striker"</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">res2</span><span class="o">);</span> <span class="c1">// &gt;&gt;&gt; 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="kt">boolean</span> <span class="n">res3</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">cfExists</span><span class="o">(</span><span class="s">"bikes:models"</span><span class="o">,</span> <span class="s">"Smoky Mountain Striker"</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">res3</span><span class="o">);</span> <span class="c1">// &gt;&gt;&gt; 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="kt">boolean</span> <span class="n">res4</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">cfExists</span><span class="o">(</span><span class="s">"bikes:models"</span><span class="o">,</span> <span class="s">"Terrible Bike Name"</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">res4</span><span class="o">);</span> <span class="c1">// &gt;&gt;&gt; False </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">boolean</span> <span class="n">res5</span> <span class="o">=</span> <span class="n">jedis</span><span class="o">.</span><span class="na">cfDel</span><span class="o">(</span><span class="s">"bikes:models"</span><span class="o">,</span> <span class="s">"Smoky Mountain Striker"</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">res5</span><span class="o">);</span> <span class="c1">// &gt;&gt;&gt; True </span></span></span><span class="line hl"><span class="cl"><span class="c1"></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> <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_cuckoo_tutorial-stepcuckoo')" 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_cuckoo_tutorial-stepcuckoo" 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/CuckooFilterExample.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_cuckoo_tutorial-stepcuckoo" name="cuckoo_tutorial-stepcuckoo" 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_cuckoo_tutorial-stepcuckoo" title="Open example"> Go </label> <div aria-labelledby="tab-cuckoo_tutorial-stepcuckoo" class="panel order-last hidden w-full mt-0 relative" id="panel_Go_cuckoo_tutorial-stepcuckoo" 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></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_cuckoo</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">res1</span><span class="p">,</span> <span class="nx">err</span> <span class="o">:=</span> <span class="nx">rdb</span><span class="p">.</span><span class="nf">CFReserve</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"bikes:models"</span><span class="p">,</span> <span class="mi">1000000</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">res1</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">res2</span><span class="p">,</span> <span class="nx">err</span> <span class="o">:=</span> <span class="nx">rdb</span><span class="p">.</span><span class="nf">CFAdd</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"bikes:models"</span><span class="p">,</span> <span class="s">"Smoky Mountain Striker"</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">res2</span><span class="p">)</span> <span class="c1">// &gt;&gt;&gt; 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="nx">res3</span><span class="p">,</span> <span class="nx">err</span> <span class="o">:=</span> <span class="nx">rdb</span><span class="p">.</span><span class="nf">CFExists</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"bikes:models"</span><span class="p">,</span> <span class="s">"Smoky Mountain Striker"</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">res3</span><span class="p">)</span> <span class="c1">// &gt;&gt;&gt; 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="nx">res4</span><span class="p">,</span> <span class="nx">err</span> <span class="o">:=</span> <span class="nx">rdb</span><span class="p">.</span><span class="nf">CFExists</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"bikes:models"</span><span class="p">,</span> <span class="s">"Terrible Bike Name"</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">res4</span><span class="p">)</span> <span class="c1">// &gt;&gt;&gt; false </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">res5</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">CFDel</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="s">"bikes:models"</span><span class="p">,</span> <span class="s">"Smoky Mountain Striker"</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">res5</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="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_cuckoo_tutorial-stepcuckoo')" 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_cuckoo_tutorial-stepcuckoo" 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/cuckoo_tutorial_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_cuckoo_tutorial-stepcuckoo" name="cuckoo_tutorial-stepcuckoo" 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_cuckoo_tutorial-stepcuckoo" title="Open example"> C# </label> <div aria-labelledby="tab-cuckoo_tutorial-stepcuckoo" class="panel order-last hidden w-full mt-0 relative" id="panel_Csharp_cuckoo_tutorial-stepcuckoo" 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.RedisStackCommands</span><span class="p">;</span> </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">Cuckoo_tutorial</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 hl"><span class="cl"> <span class="kt">bool</span> <span class="n">res1</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">CF</span><span class="p">().</span><span class="n">Reserve</span><span class="p">(</span><span class="s">"bikes:models"</span><span class="p">,</span> <span class="m">1000000</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">res1</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">res2</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">CF</span><span class="p">().</span><span class="n">Add</span><span class="p">(</span><span class="s">"bikes:models"</span><span class="p">,</span> <span class="s">"Smoky Mountain Striker"</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">res2</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">res3</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">CF</span><span class="p">().</span><span class="n">Exists</span><span class="p">(</span><span class="s">"bikes:models"</span><span class="p">,</span> <span class="s">"Smoky Mountain Striker"</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">res3</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">res4</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">CF</span><span class="p">().</span><span class="n">Exists</span><span class="p">(</span><span class="s">"bikes:models"</span><span class="p">,</span> <span class="s">"Terrible Bike Name"</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">res4</span><span class="p">);</span> <span class="c1">// &gt;&gt;&gt; False</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">res5</span> <span class="p">=</span> <span class="n">db</span><span class="p">.</span><span class="n">CF</span><span class="p">().</span><span class="n">Del</span><span class="p">(</span><span class="s">"bikes:models"</span><span class="p">,</span> <span class="s">"Smoky Mountain Striker"</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">res5</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="c1">// Tests for 'cuckoo' 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_cuckoo_tutorial-stepcuckoo')" 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_cuckoo_tutorial-stepcuckoo" 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/Cuckoo_tutorial.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> <h2 id="bloom-vs-cuckoo-filters"> Bloom vs. Cuckoo filters </h2> <p> Bloom filters typically exhibit better performance and scalability when inserting items (so if you're often adding items to your dataset, then a Bloom filter may be ideal). Cuckoo filters are quicker on check operations and also allow deletions. </p> <h2 id="sizing-cuckoo-filters"> Sizing Cuckoo filters </h2> <p> These are the main parameters and features of a cuckoo filter: </p> <ul> <li> <code> p </code> target false positive rate </li> <li> <code> f </code> fingerprint length in bits </li> <li> <code> α </code> fill rate or load factor (0≤α≤1) </li> <li> <code> b </code> number of entries per bucket </li> <li> <code> m </code> number of buckets </li> <li> <code> n </code> number of items </li> <li> <code> C </code> average bits per item </li> </ul> <p> Let's start by remembering that a cuckoo filter bucket can have multiple entries (where each entry stores one fingerprint). If we end up having all entries occupied with a fingerprint then we won't have empty slots to save new elements and the filter will be declared full, that's why we should always maintain a certain percentage of our cuckoo filter free. <br/> As a result of this the "real" memory cost of an item should include that overhead in addition to the fingerprint size. If <code> α </code> is the load factor (fingerprint size / total filter size) and <code> f </code> is the number of bits in an entry the amortised space cost <code> f/α bits </code> . </p> <p> When you initialise a new filter you are asked to choose its capacity and bucket size. </p> <pre tabindex="0"><code>CF.RESERVE {key} {capacity} [BUCKETSIZE bucketSize] [MAXITERATIONS maxIterations] [EXPANSION expansion] </code></pre> <h3 id="choosing-the-capacity--capacity"> Choosing the capacity ( <code> capacity </code> ) </h3> <p> The capacity of a Cuckoo filter is calculated as </p> <pre tabindex="0"><code>capacity = n*f/α </code></pre> <p> where <code> n </code> is the number of elements you expect to have in your filter, <code> f </code> is the fingerprint length in bits which is set to <code> 8 </code> and <code> α </code> is the fill factor. So in order to get your filter capacity you must first choose a fill factor. The fill factor will determine the density of your data and of course the memory. The capacity will be rounded up to the next "power of two (2 <sup> n </sup> )" number. </p> <blockquote> <p> Please note that inserting repeated items in a cuckoo filter will try to add them multiple times causing your filter to fill up </p> </blockquote> <p> Because of how Cuckoo Filters work, the filter is likely to declare itself full before capacity is reached and therefore fill rate will likely never reach 100%. </p> <h3 id="choosing-the-bucket-size-bucketsize"> Choosing the bucket size ( <code> BUCKETSIZE </code> ) </h3> <p> Number of items in each bucket. A higher bucket size value improves the fill rate but also causes a higher error rate and slightly slower performance. </p> <pre tabindex="0"><code>error_rate = (buckets * hash_functions)/2^fingerprint_size = (buckets*2)/256 </code></pre> <p> When bucket size of 1 is used the fill rate is 55% and false positive error rate is 2/256 ≈ 0.78% <strong> which is the minimal false positive rate you can achieve </strong> . Larger buckets increase the error rate linearly but improve the fill rate of the filter. For example, a bucket size of 3 yields a 2.34% error rate and 80% fill rate. Bucket size of 4 - a 3.12% error rate and a 95% fill rate. </p> <h3 id="choosing-the-scaling-factor-expansion"> Choosing the scaling factor ( <code> EXPANSION </code> ) </h3> <p> When the filter self-declares itself full, it will auto-expand by generating additional sub-filters at the cost of reduced performance and increased error rate. The new sub-filter is created with size of the previous sub-filter multiplied by <code> EXPANSION </code> (chosen on filter creation). Like bucket size, additional sub-filters grow the error rate linearly (the compound error is a sum of all subfilters' errors). The size of the new sub-filter is the size of the last sub-filter multiplied by expansion and this is something very important to keep in mind. If you know you'll have to scale at some point it's better to choose a higher expansion value. The default is 1. </p> <p> Maybe you're wondering "Why would I create a smaller filter with a high expansion rate if I know I'm going to scale anyway?"; the answer is: for cases where you need to keep many filters (let's say a filter per user, or per product) and most of them will stay small, but some with more activity will have to scale. </p> <p> The expansion factor will be rounded up to the next "power of two (2 <sup> n </sup> )" number. </p> <h3 id="choosing-the-maximum-number-of-iterations-maxiterations"> Choosing the maximum number of iterations ( <code> MAXITERATIONS </code> ) </h3> <p> <code> MAXITERATIONS </code> dictates the number of attempts to find a slot for the incoming fingerprint. Once the filter gets full, a high MAXITERATIONS value will slow down insertions. The default value is 20. </p> <h3 id="interesting-facts"> Interesting facts: </h3> <ul> <li> Unused capacity in prior sub-filters is automatically used when possible. </li> <li> The filter can grow up to 32 times. </li> <li> You can delete items to stay within filter limits instead of rebuilding </li> <li> Adding the same element multiple times will create multiple entries, thus filling up your filter. </li> </ul> <h2 id="performance"> Performance </h2> <p> Adding an element to a Cuckoo filter has a time complexity of O(1). </p> <p> Similarly, checking for an element and deleting an element also has a time complexity of O(1). </p> <h2 id="academic-sources"> Academic sources </h2> <ul> <li> <a href="https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf"> Cuckoo Filter: Practically Better Than Bloom </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/data-types/probabilistic/cuckoo-filter/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/latency-help/.html
<section class="prose w-full py-12"> <h1 class="command-name"> LATENCY HELP </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">LATENCY 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"> 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> @slow </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> The <code> LATENCY HELP </code> command returns a helpful text describing the different subcommands. </p> <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> : 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/latency-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/json.debug/.html
<section class="prose w-full py-12"> <h1 class="command-name"> JSON.DEBUG </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">JSON.DEBUG</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> This is a container command for debugging related tasks. </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.debug/"/> <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/rladmin/node/maintenance-mode/.html
<section class="prose w-full py-12 max-w-none"> <h1> rladmin node maintenance_mode </h1> <p class="text-lg -mt-5 mb-10"> Turns quorum-only mode on or off for a node. </p> <p> Configures <a href="/docs/latest/operate/rs/7.4/clusters/maintenance-mode/#activate-maintenance-mode"> quorum-only mode </a> on a node. </p> <h2 id="node-maintenance_mode-on"> <code> node maintenance_mode on </code> </h2> <p> Migrates shards out of the node and turns the node into a quorum node to prevent shards from returning to it. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin node &lt;ID&gt; maintenance_mode on </span></span><span class="line"><span class="cl"> <span class="o">[</span> keep_slave_shards <span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span> evict_ha_replica <span class="o">{</span> enabled <span class="p">|</span> disabled <span class="o">}</span> <span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span> evict_active_active_replica <span class="o">{</span> enabled <span class="p">|</span> disabled <span class="o">}</span> <span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span> evict_dbs &lt;list of database names or IDs&gt; <span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span> demote_node <span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span> overwrite_snapshot <span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span> max_concurrent_actions &lt;integer&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> node </td> <td> integer </td> <td> Turns the specified node into a quorum node </td> </tr> <tr> <td> demote_node </td> <td> </td> <td> If the node is a primary node, changes the node to replica </td> </tr> <tr> <td> evict_ha_replica </td> <td> <code> enabled </code> <br/> <code> disabled </code> </td> <td> Migrates the HA replica shards in the node </td> </tr> <tr> <td> evict_active_active_replica </td> <td> <code> enabled </code> <br/> <code> disabled </code> </td> <td> Migrates the Active-Active replica shards in the node </td> </tr> <tr> <td> evict_dbs </td> <td> list of database names or IDs </td> <td> Specify databases whose shards should be evicted from the node when entering maintenance mode. <br/> <br/> Examples: <br/> <code> $ rladmin node 1 maintenance_mode on evict_dbs db:1 db:2 </code> <br/> <code> $ rladmin node 1 maintenance_mode on evict_dbs db_name1 db_name2 </code> </td> </tr> <tr> <td> keep_slave_shards </td> <td> </td> <td> Keeps replica shards in the node and demotes primary shards to replicas. <br/> <br/> Deprecated as of Redis Enterprise Software 7.4.2. Use <code> evict_ha_replica disabled evict_active_active_replica disabled </code> instead. </td> </tr> <tr> <td> max_concurrent_actions </td> <td> integer </td> <td> Maximum number of concurrent actions during node maintenance </td> </tr> <tr> <td> overwrite_snapshot </td> <td> </td> <td> Overwrites the latest existing node snapshot taken when enabling maintenance mode </td> </tr> </tbody> </table> <h3 id="returns"> Returns </h3> <p> Returns <code> OK </code> if the node was converted successfully. If the cluster does not have enough resources to migrate the shards, the process returns a warning. </p> <p> Use <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/status/#status-nodes"> <code> rladmin status nodes </code> </a> to verify the node became a quorum node. </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 node <span class="m">2</span> maintenance_mode on overwrite_snapshot </span></span><span class="line"><span class="cl">Found snapshot from 2024-01-06T11:36:47Z, overwriting the snapshot </span></span><span class="line"><span class="cl">Performing maintenance_on action on node:2: 0% </span></span><span class="line"><span class="cl">created snapshot NodeSnapshot&lt;<span class="nv">name</span><span class="o">=</span>maintenance_mode_2024-01-11_20-25-37,time<span class="o">=</span>None,node_uid<span class="o">=</span>2&gt; </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">node:2 will not accept any more shards </span></span><span class="line"><span class="cl">Performing maintenance_on action on node:2: 100% </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">$ rladmin status nodes </span></span><span class="line"><span class="cl">CLUSTER NODES: </span></span><span class="line"><span class="cl">NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS </span></span><span class="line"><span class="cl">*node:1 master 192.0.2.12 198.51.100.1 3d99db1fdf4b 5/100 <span class="m">6</span> 14.21GB/19.54GB 10.62GB/16.02GB 6.2.12-37 OK </span></span><span class="line"><span class="cl">node:2 slave 192.0.2.13 198.51.100.2 fc7a3d332458 0/0 <span class="m">6</span> 14.21GB/19.54GB 0KB/0KB 6.2.12-37 OK </span></span><span class="line"><span class="cl">node:4 slave 192.0.2.14 6d754fe12cb9 5/100 <span class="m">6</span> 14.21GB/19.54GB 10.62GB/16.02GB 6.2.12-37 OK </span></span></code></pre> </div> <h2 id="node-maintenance_mode-off"> <code> node maintenance_mode off </code> </h2> <p> Turns maintenance mode off and returns the node to its previous state. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin node &lt;ID&gt; maintenance_mode off </span></span><span class="line"><span class="cl"> <span class="o">[</span> <span class="o">{</span> snapshot_name &lt;name&gt; <span class="p">|</span> skip_shards_restore <span class="o">}</span> <span class="o">]</span> </span></span><span class="line"><span class="cl"> <span class="o">[</span> max_concurrent_actions &lt;integer&gt; <span class="o">]</span> </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> node </td> <td> integer </td> <td> Restores the node back to the previous state </td> </tr> <tr> <td> max_concurrent_actions </td> <td> integer </td> <td> Maximum number of concurrent actions during node maintenance </td> </tr> <tr> <td> skip_shards_restore </td> <td> </td> <td> Does not restore shards back to the node </td> </tr> <tr> <td> snapshot_name </td> <td> string </td> <td> Restores the node back to a state stored in the specified snapshot </td> </tr> </tbody> </table> <h3 id="returns-1"> Returns </h3> <p> Returns <code> OK </code> if the node was restored successfully. </p> <p> Use <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/status/#status-nodes"> <code> rladmin status nodes </code> </a> to verify the node was restored. </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 node <span class="m">2</span> maintenance_mode off </span></span><span class="line"><span class="cl">Performing maintenance_off action on node:2: 0% </span></span><span class="line"><span class="cl">Found snapshot: NodeSnapshot&lt;<span class="nv">name</span><span class="o">=</span>maintenance_mode_2022-05-12_20-25-37,time<span class="o">=</span>2022-05-12T20:25:37Z,node_uid<span class="o">=</span>2&gt; </span></span><span class="line"><span class="cl">Performing maintenance_off action on node:2: 0% </span></span><span class="line"><span class="cl">migrate redis:12 to node:2: executing </span></span><span class="line"><span class="cl">Performing maintenance_off action on node:2: 0% </span></span><span class="line"><span class="cl">migrate redis:12 to node:2: finished </span></span><span class="line"><span class="cl">Performing maintenance_off action on node:2: 0% </span></span><span class="line"><span class="cl">migrate redis:17 to node:2: executing </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">migrate redis:15 to node:2: executing </span></span><span class="line"><span class="cl">Performing maintenance_off action on node:2: 0% </span></span><span class="line"><span class="cl">migrate redis:17 to node:2: finished </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">migrate redis:15 to node:2: finished </span></span><span class="line"><span class="cl">Performing maintenance_off action on node:2: 0% </span></span><span class="line"><span class="cl">failover redis:16: executing </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">failover redis:14: executing </span></span><span class="line"><span class="cl">Performing maintenance_off action on node:2: 0% </span></span><span class="line"><span class="cl">failover redis:16: finished </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">failover redis:14: finished </span></span><span class="line"><span class="cl">Performing maintenance_off action on node:2: 0% </span></span><span class="line"><span class="cl">failover redis:18: executing </span></span><span class="line"><span class="cl">Performing maintenance_off action on node:2: 0% </span></span><span class="line"><span class="cl">failover redis:18: finished </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">migrate redis:21 to node:2: executing </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">migrate redis:19 to node:2: executing </span></span><span class="line"><span class="cl">Performing maintenance_off action on node:2: 0% </span></span><span class="line"><span class="cl">migrate redis:21 to node:2: finished </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">migrate redis:19 to node:2: finished </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl">failover redis:20: executing </span></span><span class="line"><span class="cl">Performing maintenance_off action on node:2: 0% </span></span><span class="line"><span class="cl">failover redis:20: finished </span></span><span class="line"><span class="cl">Performing maintenance_off action on node:2: 0% </span></span><span class="line"><span class="cl">rebind endpoint:6:1: executing </span></span><span class="line"><span class="cl">Performing maintenance_off action on node:2: 0% </span></span><span class="line"><span class="cl">rebind endpoint:6:1: finished </span></span><span class="line"><span class="cl">Performing maintenance_off action on node:2: 100% </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">$ rladmin status nodes </span></span><span class="line"><span class="cl">CLUSTER NODES: </span></span><span class="line"><span class="cl">NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS </span></span><span class="line"><span class="cl">*node:1 master 192.0.2.12 198.51.100.1 3d99db1fdf4b 5/100 <span class="m">6</span> 14.2GB/19.54GB 10.61GB/16.02GB 6.2.12-37 OK </span></span><span class="line"><span class="cl">node:2 slave 192.0.2.13 198.51.100.2 fc7a3d332458 5/100 <span class="m">6</span> 14.2GB/19.54GB 10.61GB/16.02GB 6.2.12-37 OK </span></span><span class="line"><span class="cl">node:4 slave 192.0.2.14 6d754fe12cb9 0/100 <span class="m">6</span> 14.2GB/19.54GB 10.69GB/16.02GB 6.2.12-37 OK </span></span></code></pre> </div> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/node/maintenance-mode/"/> <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-2-8-october-2021/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise Software Release Notes 6.2.8 (October 2021) </h1> <p class="text-lg -mt-5 mb-10"> RHEL 8 support. Set backup start time. </p> <p> <a href="https://redislabs.com/redis-enterprise-software/download-center/software/"> Redis Enterprise Software version 6.2.8 </a> is now available! </p> <h2 id="features-and-enhancements"> Features and enhancements </h2> <p> This version features: </p> <ul> <li> Support for Red Hat Linux Edition (RHEL) 8 </li> <li> You can now set the start time for <a href="/docs/latest/operate/rs/databases/import-export/schedule-backups/"> 12- and 24-hour backups </a> </li> <li> Compatibility with version of <a href="https://github.com/redis/redis/releases/tag/6.2.3"> open source Redis 6.2.3 </a> (starting with <a href="/docs/latest/operate/rs/release-notes/rs-6-2-4-august-2021/"> Redis Enterprise Software v6.2.4 </a> ) </li> <li> Compatibility with the security fixes of the latest <a href="https://github.com/redis/redis/releases/tag/6.2.6"> open source Redis 6.2.6 </a> </li> <li> Enhancements and bug fixes </li> </ul> <h2 id="version-changes"> Version changes </h2> <h3 id="prerequisites-and-notes"> Prerequisites and notes </h3> <ul> <li> <p> You can <a href="/docs/latest/operate/rs/installing-upgrading/upgrading/"> upgrade to v6.2.8 </a> from Redis Enterprise Software v6.0 and later. </p> </li> <li> <p> Refer to the <a href="/docs/latest/operate/rs/release-notes/rs-6-2-4-august-2021/"> v6.2.4 release notes </a> for important notes regarding the upgrade process. </p> </li> <li> <p> When upgrading a cluster from Redis Enterprise 6.0.8 and earlier to 6.2.8 only, the DMC proxy might crash when proxy certificates contain additional text as comments. Redis removes these comments during upgrade, but a change to the v6.2.8 internal upgrade action sequence might cause this problem. </p> <p> If you plan to upgrade from a pre-6.0.8 release to 6.2.8, check whether your proxy certificate includes additional comments and manually remove them. The change was reverted in 6.2.10. </p> </li> <li> <p> Upgrades from versions earlier than v6.0 are not supported. </p> </li> </ul> <h3 id="product-lifecycle-updates"> Product lifecycle updates </h3> <p> As of 31 October 2021, Redis Enterprise Software v5.6.0 is end of life (EOF). </p> <p> To learn more, see the Redis Enterprise Software <a href="/docs/latest/operate/rs/installing-upgrading/product-lifecycle/"> product lifecycle </a> , which details the release number and the end-of-life schedule for Redis Enterprise Software. </p> <p> Redis Enterprise modules have individual release numbers <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/modules-lifecycle/"> and lifecycles </a> . </p> <h3 id="redis-modules"> Redis modules </h3> <p> Redis Enterprise Software v6.2.8 includes the following Redis modules: </p> <ul> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-2.0-release-notes/"> RediSearch v2.0.11 </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisjson/redisjson-1.0-release-notes/"> RedisJSON v1.0.8 </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisbloom/redisbloom-2.2-release-notes/"> RedisBloom v2.2.6 </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisgraph/redisgraph-2.4-release-notes/"> RedisGraph v2.4.7 </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redistimeseries/redistimeseries-1.4-release-notes/"> RedisTimeSeries v1.4.10 </a> </li> </ul> <p> To learn more, see <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module/"> Upgrade the module for a database </a> . </p> <h2 id="resolved-issues"> Resolved issues </h2> <h3 id="user-interface-fixes"> User interface fixes </h3> <ul> <li> RS58804 - Display an error message in case of a login attempt with an LDAP user </li> <li> RS56680 - Notify that SASLAUTHD should be disabled prior to enabling LDAP </li> <li> RS55844 - Use the correct password and mask it on LDAP password update </li> <li> RS60877 - Fixed reset of Active-Active database compression level, in cases where the compression level wasn’t set to default, when changing any other configuration via the DB configuration page </li> <li> RS43999 - Fixed UI database configuration to allow changes when SFTP SSH key is customized </li> <li> RS59861 - Fixed the UI to display an explanation error message when password complexity does not meet requirements </li> <li> RS57734 - Fixed inaccessible UI after cluster upgrade due to missing certificate </li> <li> RS43041 - Mask secret keys for backup destination for view and edit in the UI </li> </ul> <h3 id="additional-fixes"> Additional fixes </h3> <ul> <li> RS60068 / RS59146 - Fixed unresolved endpoint due to PDNS issues </li> <li> RS52812 - Expand API wrapper to return API 405 errors as JSON/XML </li> <li> RS57666 - Fixed false shard migration message when the shard fails to bind the port </li> <li> RS57444, RS55294, RS4903 - Fixed false “backup finished successfully” message when the backup failed due to restricted access to the backup destination </li> </ul> <h3 id="fixes-on-build-53"> Fixes on build #53 </h3> <ul> <li> RS67829 - Fixed a bug that caused Modules' auxiliary field not to get replicated between the primary and the replica shards. Applicable for RediSearch, RedisGraph and RedisGears and happening only at following scenarios: - (A) On the destination databases of a Replica Of upon a full sync operation - (B) Upon import operation </li> </ul> <h2 id="known-limitations"> Known limitations </h2> <p> -RS81463 - A shard may crash when resharding an Active-Active database with Auto Tiering . Specifically, the shard will crash when volatile keys or Active-Active tombstone keys reside in Flash memory. </p> <ul> <li> <p> RS63258 - Redis Enterprise Software 6.2.8 is not supported on RHEL 8 with FIPS enabled. </p> <p> FIPS changes system-generated keys, which can limit secure access to the cluster or the admin console via port 8443. </p> </li> <li> <p> RS63375 - RHEL 7 clusters cannot be directly upgraded to RHEL 8 when hosting databases using modules. </p> <p> Due to binary differences in modules between the two operating systems, you cannot directly update RHEL 7 clusters to RHEL 8 when those clusters host databases using modules. Instead, you need to create a new cluster on RHEL 8 and then migrate existing data from your RHEL 7 cluster. This does not apply to clusters that do not use modules. </p> </li> </ul> <p> All <a href="/docs/latest/operate/rs/release-notes/rs-6-2-4-august-2021/#known-limitations"> known limitations </a> from v6.2.4 have been fixed. </p> <h3 id="installation-limitations"> Installation limitations </h3> <p> Several Redis Enterprise Software installation reference files are installed to the directory <code> /etc/opt/redislabs/ </code> even if you use <a href="/docs/latest/operate/rs/installing-upgrading/install/customize-install-directories/"> custom installation directories </a> . </p> <p> As a workaround to install Redis Enterprise Software without using any root directories, do the following before installing Redis Enterprise Software: </p> <ol> <li> <p> Create all custom, non-root directories you want to use with Redis Enterprise Software. </p> </li> <li> <p> Mount <code> /etc/opt/redislabs </code> to one of the custom, non-root directories. </p> </li> </ol> <h2 id="known-issues"> Known issues </h2> <ul> <li> <p> A new command was added as part of Redis 6.2: <a href="/docs/latest/commands/xautoclaim/"> <code> XAUTOCLAIM </code> </a> . When used in an Active-Active configuration, this command may cause Redis shards to crash, potentially resulting in data loss. The issue is fixed in Redis Enterprise Software version 6.2.12. Additionally, we recommend enabling AOF persistence for all Active-Active configurations. </p> </li> <li> <p> The <code> ZRANGESTORE </code> command, with a special <code> zset-max-ziplist-entries </code> configuration can crash Redis 6.2. See <a href="https://github.com/redis/redis/pull/10767"> Redis repository 10767 </a> for more details. </p> </li> <li> <p> RS40641 - API requests are redirected to an internal IP in case the request arrives from a node which is not the master. To avoid this issue, use <a href="/docs/latest/operate/rs/references/cli-utilities/rladmin/cluster/config/"> <code> rladmin cluster config </code> </a> to configure <code> handle_redirects </code> or <code> handle_metrics_redirects </code> . </p> </li> </ul> <h2 id="security"> Security </h2> <h3 id="open-source-redis-security-fix-compatibility"> Open source Redis security fix compatibility </h3> <p> As part of its commitment to security, Redis Enterprise Software implements the latest <a href="https://github.com/redis/redis/releases"> security fixes </a> available with open source Redis. </p> <p> The following <a href="https://github.com/redis/redis"> open source Redis </a> <a href="https://github.com/redis/redis/security/advisories"> CVEs </a> do not affect Redis Enterprise: </p> <ul> <li> <p> <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-32625"> CVE-2021-32625 </a> - Redis Enterprise is not impacted by the CVE that was found and fixed in open source Redis since Redis Enterprise does not implement <code> LCS </code> . Additional information about the open source Redis fix is on <a href="https://github.com/redis/redis/releases"> the Redis GitHub page </a> (Redis 6.2.4, Redis 6.0.14) </p> </li> <li> <p> <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-32672"> CVE-2021-32672 </a> - Redis Enterprise is not impacted by the CVE that was found and fixed in open source Redis because the LUA debugger is unsupported in Redis Enterprise. Additional information about the open source Redis fix is on <a href="https://github.com/redis/redis/releases"> the Redis GitHub page </a> (Redis 6.2.6, Redis 6.0.16) </p> </li> <li> <p> <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-32675"> CVE-2021-32675 </a> - Redis Enterprise is not impacted by the CVE that was found and fixed in open source Redis because the proxy in Redis Enterprise does not forward unauthenticated requests. Additional information about the open source Redis fix is on <a href="https://github.com/redis/redis/releases"> the Redis GitHub page </a> (Redis 6.2.6, Redis 6.0.16) </p> </li> <li> <p> <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-32762"> CVE-2021-32762 </a> - Redis Enterprise is not impacted by the CVE that was found and fixed in open source Redis because the memory allocator used in Redis Enterprise is not vulnerable. Additional information about the open source Redis fix is on <a href="https://github.com/redis/redis/releases"> the Redis GitHub page </a> (Redis 6.2.6, Redis 6.0.16) </p> </li> <li> <p> <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-41099"> CVE-2021-41099 </a> - Redis Enterprise is not impacted by the CVE that was found and fixed in open source Redis because the proto-max-bulk-len CONFIG is blocked in Redis Enterprise. Additional information about the open source Redis fix is on <a href="https://github.com/redis/redis/releases"> the Redis GitHub page </a> (Redis 6.2.6, Redis 6.0.16) </p> </li> </ul> <p> Some CVEs announced for Open Source Redis do not affect Redis Enterprise due to functionality that is either different from (or not available in) open source Redis. </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-6-2-8-october-2021/"/> <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.strlen/.html
<section class="prose w-full py-12"> <h1 class="command-name"> JSON.STRLEN </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">JSON.STRLEN 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(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key </dd> </dl> <p> Report the length of the JSON String at <code> path </code> in <code> key </code> </p> <p> <a href="#examples"> Examples </a> </p> <h2 id="required-arguments"> Required arguments </h2> <details open=""> <summary> <code> key </code> </summary> <p> is key to parse. </p> </details> <h2 id="optional-arguments"> Optional arguments </h2> <details open=""> <summary> <code> path </code> </summary> <p> is JSONPath to specify. Default is root <code> $ </code> , if not provided. Returns null if the <code> key </code> or <code> path </code> do not exist. </p> </details> <h2 id="return"> Return </h2> <p> JSON.STRLEN returns by recursive descent an array of integer replies for each path, the string's length, or <code> nil </code> , if the matching JSON value is not a string. For more information about replies, see <a href="/docs/latest/develop/reference/protocol-spec/"> Redis serialization protocol specification </a> . </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; JSON.SET doc $ <span class="s1">'{"a":"foo", "nested": {"a": "hello"}, "nested2": {"a": 31}}'</span> </span></span><span class="line"><span class="cl">OK </span></span><span class="line"><span class="cl">redis&gt; JSON.STRLEN doc $..a </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">3</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>nil<span class="o">)</span></span></span></code></pre> </div> <h2 id="see-also"> See also </h2> <p> <a href="/docs/latest/commands/json.arrlen/"> <code> JSON.ARRLEN </code> </a> | <a href="/docs/latest/commands/json.arrinsert/"> <code> JSON.ARRINSERT </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.strlen/"/> <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/quit/.html
<section class="prose w-full py-12"> <h1 class="command-name"> QUIT <span class="text-base"> (deprecated) </span> </h1> <div class="border-l-8 pl-4"> <p> As of Redis version 7.2.0, this command is regarded as deprecated. </p> <p> It can be replaced by just closing the connection when migrating or writing new code. </p> </div> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">QUIT</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> @fast </code> <span class="mr-1 last:hidden"> , </span> <code> @connection </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Ask the server to close the connection. The connection is closed as soon as all pending replies have been written to the client. </p> <p> <strong> Note: </strong> Clients should not use this command. Instead, clients should simply close the connection when they're not used anymore. Terminating a connection on the client side is preferable, as it eliminates <code> TIME_WAIT </code> lingering sockets on the server side. </p> <h2 id="resp2-reply"> RESP2 Reply </h2> <a href="../../develop/reference/protocol-spec#simple-strings"> Simple string reply </a> : OK. <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/quit/"/> <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/cancel/.html
<section class="prose w-full py-12 max-w-none"> <h1> crdb-cli task cancel </h1> <p class="text-lg -mt-5 mb-10"> Attempts to cancel a specified Active-Active database task. </p> <p> Cancels the Active-Active database task specified by the task ID. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">crdb-cli task cancel &lt;task_id&gt; </span></span></code></pre> </div> <h3 id="parameters"> Parameters </h3> <table> <thead> <tr> <th> Parameter </th> <th> Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> task-id &lt;task_id&gt; </td> <td> string </td> <td> An Active-Active database task ID (required) </td> </tr> </tbody> </table> <h3 id="returns"> Returns </h3> <p> Attempts to cancel an Active-Active database task. </p> <p> Be aware that tasks may complete before they can be cancelled. </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">$ crdb-cli task cancel --task-id 2901c2a3-2828-4717-80c0-6f27f1dd2d7c </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/references/cli-utilities/crdb-cli/task/cancel/"/> <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-2-4-releases/7-2-4-2/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise for Kubernetes release notes 7.2.4-2 (Aug 2023) </h1> <p class="text-lg -mt-5 mb-10"> The primary purpose this release is supporting Redis Enterprise 7.2.4. </p> <h2 id="highlights"> Highlights </h2> <p> The primary purpose this release is supporting <a href="/docs/latest/operate/rs/release-notes/rs-7-2-4-releases/rs-7-2-4-52/"> Redis Enterprise 7.2.4 </a> , which is a major Redis Enterprise Software update. As such, we reduced the scope of changes to support the underlying change of RS 7.2 and a few significant fixes. </p> <p> The following are the notable changes: </p> <ul> <li> <p> Support for <a href="/docs/latest/operate/rs/release-notes/rs-7-2-4-releases/rs-7-2-4-52/"> Redis Enterprise 7.2.4 </a> </p> <ul> <li> New major version of Redis, 7.2 </li> <li> <a href="/docs/latest/operate/rs/release-notes/rs-7-2-4-releases/rs-7-2-4-52/#cluster-recovery-with-manually-uploaded-modules"> Changes to modules and cluster recovery </a> </li> </ul> </li> </ul> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Warning: </div> Redis Enterprise Software 7.2.4-52 includes several issues that also effect Redis Enterprise for Kubernetes and are not listed below. Review the Redis Enterprise Software 7.2.4 <a href="/docs/latest/operate/rs/release-notes/rs-7-2-4-releases/rs-7-2-4-52/#breaking-changes"> breaking changes </a> and <a href="/docs/latest/operate/rs/release-notes/rs-7-2-4-releases/rs-7-2-4-52/#known-limitations"> known limitations. </a> </div> </div> <ul> <li> <p> New default engine, Speedb, for Auto Tiering (formerly Redis on Flash) </p> </li> <li> <p> Changes to <a href="#supported-distributions"> supported Kubernetes distributions </a> </p> </li> </ul> <h2 id="new-in-this-release"> New in this release </h2> <h3 id="enhancements"> Enhancements </h3> <ul> <li> Support for <a href="/docs/latest/operate/rs/release-notes/rs-7-2-4-releases/rs-7-2-4-52/"> Redis Enterprise 7.2.4 </a> (RED-73681) </li> <li> New default engine, Speedb, for Auto Tiering (formerly Redis on Flash) (RED-90850) </li> <li> Security context hardening (RED-98447) </li> </ul> <h3 id="resolved-issues"> Resolved issues </h3> <ul> <li> Fixed: Services or routes from the Active-Active setup might not be removed (RED-77752) </li> <li> Fixed: Admission controller may not alert when patching the REAADB with missing secret or RERC (RED-104463) </li> </ul> <h3 id="api-changes"> API changes </h3> <p> The following fields were added to the RedisEnterpriseCluster (REC) custom resource definition (CRD): </p> <ul> <li> Added <code> status.BundledDatabaseRedisVersions.major </code> as a Boolean field indicating whether the Redis version is major. </li> <li> Added <code> spec.RedisOnFlashSpec.bigStoreDriver </code> to indicate the storage engine used for Auto Tiering (formerly Redis on Flash). </li> </ul> <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-2-4-releases/rs-7-2-4-52/#security"> Redis Enterprise 7.2.4-52 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 to 7.2.4-2. </p> <h4 id="validatingwebhookconfiguration"> ValidatingWebhookConfiguration </h4> <p> Versions 6.4.2-4 and later include a new <code> ValidatingWebhookConfiguration </code> resource to replace the <code> redb-admission </code> webhook resource. To use releases 6.4.2-4 or later, delete the old webhook resource and apply the new file. See <a href="/docs/latest/operate/kubernetes/upgrade/upgrade-redis-cluster/#reapply-webhook"> upgrade Redis cluster </a> for instructions. </p> <h4 id="openshift-scc"> OpenShift SCC </h4> <p> Versions 6.4.2-6 and later include a new SCC ( <code> redis-enterprise-scc-v2 </code> ) that you need to bind to your service account before upgrading. OpenShift clusters running version 6.2.12 or earlier upgrading to version 6.2.18 or later might get stuck if you skip this step. See <a href="/docs/latest/operate/kubernetes/upgrade/upgrade-redis-cluster/#before-upgrading"> upgrade a Redis Enterprise cluster (REC) </a> for instructions. </p> <h3 id="deprecations"> Deprecations </h3> <ul> <li> Gesher (advanced admission control configuration support) previously deprecated, is no longer supported. </li> <li> Deprecated <code> spec.RedisOnFlashSpec.flashStorageEngine </code> field for the RedisEnterpriseCluster. Use <code> bigStoreDriver </code> field to indicate storage engines going forward. </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 title="Warning icon"> ⚠️ </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.22 </strong> </th> <th> <strong> 1.23 </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> </tr> </thead> <tbody> <tr> <td> Community Kubernetes </td> <td> <span title="X icon"> ❌ </span> </td> <td> <span title="X icon"> ❌ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> </tr> <tr> <td> Amazon EKS </td> <td> <span title="End of life"> ❌ </span> </td> <td> <span 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> Azure AKS </td> <td> </td> <td> <span title="X icon"> ❌ </span> </td> <td> <span title="X icon"> ❌ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> </tr> <tr> <td> Google GKE </td> <td> <span title="X icon"> ❌ </span> </td> <td> <span title="Warning icon"> ⚠️ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> </tr> <tr> <td> Rancher 2.6 </td> <td> <span title="X icon"> ❌ </span> </td> <td> <span title="X icon"> ❌ </span> </td> <td> <span title="Warning icon"> ⚠️ </span> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> Rancher 2.7 </td> <td> </td> <td> <span title="Warning icon"> ⚠️ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> <td> </td> <td> </td> </tr> <tr> <td> VMware TKG 1.6 </td> <td> <span title="Warning icon"> ⚠️ </span> </td> <td> <span title="Warning icon"> ⚠️ </span> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> <strong> OpenShift version </strong> </td> <td> <strong> 4.9 </strong> </td> <td> <strong> 4.10 </strong> </td> <td> <strong> 4.11 </strong> </td> <td> <strong> 4.12 </strong> </td> <td> <strong> 4.13 </strong> </td> <td> </td> </tr> <tr> <td> </td> <td> <span title="X icon"> ❌ </span> </td> <td> <span title="Warning icon"> ⚠️ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> <td> </td> </tr> <tr> <td> <strong> VMware TKGI version </strong> </td> <td> <strong> 1.13 </strong> </td> <td> <strong> 1.14 </strong> </td> <td> <strong> 1.15 </strong> </td> <td> <strong> 1.16 </strong> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> <span title="X icon"> ❌ </span> </td> <td> <span title="Warning icon"> ⚠️ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> <td> <span title="Check mark icon"> ✅ </span> </td> <td> </td> <td> </td> </tr> </tbody> </table> <h2 id="downloads"> Downloads </h2> <ul> <li> <strong> Redis Enterprise </strong> : <code> redislabs/redis:7.2.4-52 </code> </li> <li> <strong> Operator </strong> : <code> redislabs/operator:7.2.4-2 </code> </li> <li> <strong> Services Rigger </strong> : <code> redislabs/k8s-controller:7.2.4-2. </code> </li> </ul> <h4 id="openshift-images"> OpenShift images </h4> <ul> <li> <strong> Redis Enterprise </strong> : <code> registry.connect.redhat.com/redislabs/redis-enterprise:7.2.4-52.rhel8-openshift </code> (or <code> redislabs/redis-enterprise:7.2.4-52.rhel7-openshift </code> if upgrading from RHEL 7) </li> <li> <strong> Operator </strong> : <code> registry.connect.redhat.com/redislabs/redis-enterprise-operator:7.2.4-2 </code> </li> <li> <strong> Services Rigger </strong> : <code> registry.connect.redhat.com/redislabs/services-manager:7.2.4-2 </code> </li> </ul> <h4 id="olm-bundle"> OLM bundle </h4> <p> <strong> Redis Enterprise operator bundle </strong> : <code> v7.2.4-2 </code> </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> It is not possible to upgrade your OLM deployment to version 7.2.4 from version 6.2.4-8 (November release). Uninstall 6.2.4-8 and perform a fresh install of 7.2.4. </div> </div> <h2 id="known-limitations"> Known limitations </h2> <p> The limitations below are specific to the Redis Enterprise for Kubernetes product. To view limitations for the supported Redis Enterprise Software version, see the <a href="/docs/latest/operate/rs/release-notes/rs-7-2-4-releases/#known-limitations"> 7.2.4 release notes </a> . </p> <h3 id="new-limitations"> New limitations </h3> <ul> <li> <p> <strong> REDBs created with versions before 6.2.10-4 will automatically upgrade modules when the cluster is upgraded (RED-106834) </strong> </p> </li> <li> <p> <strong> Cannot upgrade or recover clusters if there are databases with manually uploaded modules (RED-107711 RED-106872) </strong> Contact support. </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"> Warning: </div> In version 7.2.4, old module versions and manually uploaded modules are not persisted. If databases are not upgraded after cluster upgrade, and require cluster recovery afterwards, you'll need to contact Redis support. This issue will be fixed in the next maintenance release by moving the stored location of the modules. </div> </div> <ul> <li> <strong> When modifying the database suffix for an Active-Active database, while the service-rigger is in a terminating state, the services-rigger will detele and create the ingress or route resources in a loop (RED-107687) </strong> Wait until the services- rigger pod has finished to terminate it. </li> </ul> <h3 id="existing-limitations"> Existing limitations </h3> <ul> <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> Misleading error appears when a service creation has failed due to service already existing " <code> provided IP is already allocated </code> " (RED-100669) </strong> Delete the service manually. </p> </li> <li> <p> <strong> Existing OpenShift route during REC creation might prevent REC from starting (RED-100668) </strong> Delete the route manually. </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-2-4-releases/7-2-4-2/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/.html
<section class="prose w-full py-12 max-w-none"> <h1> rladmin cluster </h1> <p class="text-lg -mt-5 mb-10"> Manage cluster. </p> <p> Manages cluster configuration and administration. Most <code> rladmin cluster </code> commands are only for clusters that are already configured, while a few others are only for new clusters that have not been configured. </p> <h2 id="commands-for-configured-clusters"> Commands for configured clusters </h2> <table> <thead> <tr> <th style="text-align:left"> Command </th> <th style="text-align:left"> Description </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/certificate/"> certificate </a> </td> <td style="text-align:left"> Sets the cluster certificate. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/config/"> config </a> </td> <td style="text-align:left"> Updates the cluster's configuration. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/debug_info/"> debug_info </a> </td> <td style="text-align:left"> Creates a support package. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/master/"> master </a> </td> <td style="text-align:left"> Identifies or changes the cluster's master node. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/ocsp/"> ocsp </a> </td> <td style="text-align:left"> Manages OCSP. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/reset_password/"> reset_password </a> </td> <td style="text-align:left"> Changes the password for a given email. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/running_actions/"> running_actions </a> </td> <td style="text-align:left"> Lists all active tasks. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/stats_archiver/"> stats_archiver </a> </td> <td style="text-align:left"> Enables/deactivates the stats archiver. </td> </tr> </tbody> </table> <h2 id="commands-for-non-configured-clusters"> Commands for non-configured clusters </h2> <table> <thead> <tr> <th style="text-align:left"> Command </th> <th style="text-align:left"> Description </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/create/"> create </a> </td> <td style="text-align:left"> Creates a new cluster. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/join/"> join </a> </td> <td style="text-align:left"> Adds a node to an existing cluster. </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/recover/"> recover </a> </td> <td style="text-align:left"> Recovers a cluster from a backup file. </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/cluster/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/jvm/classes/gearsbuilder/count/.html
<section class="prose w-full py-12 max-w-none"> <h1> Count </h1> <p class="text-lg -mt-5 mb-10"> Counts the number of records in the pipe. </p> <div class="highlight"> <pre class="chroma"><code class="language-java" data-lang="java"><span class="line"><span class="cl"><span class="kd">public</span> <span class="n">GearsBuilder</span><span class="o">&lt;</span><span class="n">java</span><span class="o">.</span><span class="na">lang</span><span class="o">.</span><span class="na">Integer</span><span class="o">&gt;</span> <span class="nf">count</span><span class="o">()</span> </span></span></code></pre> </div> <p> Counts the number of records in the pipe and returns the total as a single record. </p> <h2 id="parameters"> Parameters </h2> <p> None </p> <h2 id="returns"> Returns </h2> <p> Returns a GearsBuilder object with a new template type of <code> Integer </code> . </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">count</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/count/"/> <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/readonly/.html
<section class="prose w-full py-12"> <h1 class="command-name"> READONLY </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">READONLY</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> @fast </code> <span class="mr-1 last:hidden"> , </span> <code> @connection </code> <span class="mr-1 last:hidden"> , </span> </dd> </dl> <p> Enables read queries for a connection to a Redis Cluster replica node. </p> <p> Normally replica nodes will redirect clients to the authoritative master for the hash slot involved in a given command, however clients can use replicas in order to scale reads using the <code> READONLY </code> command. </p> <p> <code> READONLY </code> tells a Redis Cluster replica node that the client is willing to read possibly stale data and is not interested in running write queries. </p> <p> When the connection is in readonly mode, the cluster will send a redirection to the client only if the operation involves keys not served by the replica's master node. This may happen because: </p> <ol> <li> The client sent a command about hash slots never served by the master of this replica. </li> <li> The cluster was reconfigured (for example resharded) and the replica is no longer able to serve commands for a given hash slot. </li> </ol> <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/readonly/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/develop/interact/.html
<section class="prose w-full py-12 max-w-none"> <h1> Interact with data in Redis </h1> <p class="text-lg -mt-5 mb-10"> How to interact with data in Redis, including queries, triggered functions, transactions, and pub/sub </p> <p> Redis is useful as a key-value store but also gives you other powerful ways to interact with your data: </p> <ul> <li> <a href="#search-and-query"> Redis Query Engine </a> </li> <li> <a href="#programmability"> Programmability </a> </li> <li> <a href="#transactions"> Transactions </a> </li> <li> <a href="#publishsubscribe"> Publish/subscribe </a> </li> </ul> <h2 id="search-and-query-with-the-redis-query-engine"> Search and query with the Redis Query Engine </h2> <p> The <a href="/docs/latest/develop/interact/search-and-query/"> Redis query engine </a> lets you retrieve data by content rather than by key. You can <a href="/docs/latest/develop/interact/search-and-query/indexing/"> index </a> the fields of <a href="/docs/latest/develop/data-types/hashes/"> hash </a> and <a href="/docs/latest/develop/data-types/json/"> JSON </a> objects according to their type and then perform sophisticated <a href="/docs/latest/develop/interact/search-and-query/query/"> queries </a> on those fields. For example, you can use queries to find: </p> <ul> <li> matches in <a href="/docs/latest/develop/interact/search-and-query/query/full-text/"> text fields </a> </li> <li> numeric values that fall within a specified <a href="/docs/latest/develop/interact/search-and-query/query/range/"> range </a> </li> <li> <a href="/docs/latest/develop/interact/search-and-query/query/geo-spatial/"> Geospatial </a> coordinates that fall within a specified area </li> <li> <a href="/docs/latest/develop/interact/search-and-query/query/vector-search/"> Vector matches </a> against <a href="https://en.wikipedia.org/wiki/Word_embedding"> word embeddings </a> calculated from your text data </li> </ul> <h2 id="programmability"> Programmability </h2> <p> Redis has an <a href="/docs/latest/develop/interact/programmability/"> interface </a> for the <a href="https://www.lua.org/"> Lua programming language </a> that lets you store and execute scripts on the server. Use scripts to ensure that different clients always update data using the same logic. You can also reduce network traffic by reimplementing a sequence of related client-side commands as a single server script. </p> <h2 id="transactions"> Transactions </h2> <p> A client will often execute a sequence of commands to make a set of related changes to data objects. However, another client could also modify the same data object with similar commands in between. This situation can create corrupt or inconsistent data. </p> <p> Use a <a href="/docs/latest/develop/interact/transactions/"> transaction </a> to group several commands from a client together as a single unit. The commands in the transaction are guaranteed to execute in sequence without interruptions from other clients' commands. </p> <p> You can also use the <a href="/docs/latest/commands/watch/"> <code> WATCH </code> </a> command to check for changes to the keys used in a transaction just before it executes. If the data you are watching changes while you construct the transaction then execution safely aborts. Use this feature for efficient <a href="https://en.wikipedia.org/wiki/Optimistic_concurrency_control"> optimistic concurrency control </a> in the common case where data is usually accessed only by one client at a time. </p> <h2 id="publishsubscribe"> Publish/subscribe </h2> <p> Redis has a <a href="/docs/latest/develop/interact/pubsub/"> publish/subscribe </a> (Pub/sub) feature that implements the well-known <a href="https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern"> design pattern </a> of the same name. You can <em> publish </em> messages from a particular client connection to a channel maintained by the server. Other connections that have <em> subscribed </em> to the channel will receive the messages in the order you sent them. Use pub/sub to share small amounts of data among clients easily and efficiently. </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/develop/interact/"/> <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-load/.html
<section class="prose w-full py-12"> <h1 class="command-name"> ACL LOAD </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">ACL LOAD</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 configured users. </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> When Redis is configured to use an ACL file (with the <code> aclfile </code> configuration option), this command will reload the ACLs from the file, replacing all the current ACL rules with the ones defined in the file. The command makes sure to have an <em> all or nothing </em> behavior, that is: </p> <ul> <li> If every line in the file is valid, all the ACLs are loaded. </li> <li> If one or more line in the file is not valid, nothing is loaded, and the old ACL rules defined in the server memory continue to be used. </li> </ul> <h2 id="examples"> Examples </h2> <pre tabindex="0"><code>&gt; ACL LOAD +OK &gt; ACL LOAD -ERR /tmp/foo:1: Unknown command or category name in ACL... </code></pre> <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/acl-load/"/> <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/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/7.4/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/7.4/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/7.4/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/commands/groupset.html
<section class="prose w-full py-12"> <h1> Commands </h1> </section>
https://redis.io/docs/latest/develop/tools/insight/release-notes/v.2.44.0/.html
<section class="prose w-full py-12"> <h1> RedisInsight v2.44.0, February 2024 </h1> <p class="text-lg -mt-5 mb-10"> RedisInsight v2.44 </p> <h2 id="244-february-2024"> 2.44 (February 2024) </h2> <p> This is the General Availability (GA) release of RedisInsight 2.44. </p> <h3 id="highlights"> Highlights </h3> <ul> <li> Added support for SSH tunneling for clustered databases, unblocking some users who want to migrate from RESP.app to RedisInsight. </li> <li> UX optimizations in the Browser layout to make it easier to leverage <a href="https://redis.io/docs/interact/search-and-query/?utm_source=redisinsight&amp;utm_medium=main&amp;utm_campaign=redisinsight_release_notes"> search and query </a> indexes. </li> </ul> <h3 id="details"> Details </h3> <p> <strong> Features and improvements </strong> </p> <ul> <li> <a href="https://github.com/RedisInsight/RedisInsight/pull/2711"> #2711 </a> , <a href="https://github.com/RedisInsight/RedisInsight/pull/3040"> #3040 </a> Connect to your clustered Redis database via SSH tunnel using a password or private key in PEM format. </li> <li> <a href="https://github.com/RedisInsight/RedisInsight/pull/3030"> #3030 </a> , <a href="https://github.com/RedisInsight/RedisInsight/pull/3070"> #3070 </a> UX optimizations in the Browser layout to enlarge the "Filter by Key" input field in the Browser and optimize the display of long <a href="https://redis.io/docs/interact/search-and-query/?utm_source=redisinsight&amp;utm_medium=main&amp;utm_campaign=redisinsight_release_notes"> search and query </a> indexes. </li> <li> <a href="https://github.com/RedisInsight/RedisInsight/pull/3033"> #3033 </a> , <a href="https://github.com/RedisInsight/RedisInsight/pull/3036"> #3036 </a> Various improvements for custom <a href="https://github.com/RedisInsight/Tutorials"> tutorials </a> , including visual highlighting of Redis code blocks and strengthening security measures for bulk data uploads by providing an option to download and preview the list of commands for upload. </li> <li> <a href="https://github.com/RedisInsight/RedisInsight/pull/3010"> #3010 </a> Enhancements to prevent authentication errors caused by <a href="https://github.com/RedisInsight/RedisInsight/issues/3019"> certain special characters </a> in database passwords. </li> </ul> <p> <strong> Bugs </strong> </p> <ul> <li> <a href="https://github.com/RedisInsight/RedisInsight/pull/3029"> #3029 </a> A fix for cases when autofill <a href="https://github.com/RedisInsight/RedisInsight/issues/3026"> prevents </a> the form to auto-discover Redis Enterprise Cluster database from being submitted. </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/develop/tools/insight/release-notes/v.2.44.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/oss_and_stack/stack-with-enterprise/release-notes/redisgears/.html
<section class="prose w-full py-12 max-w-none"> <h1> RedisGears release notes </h1> <p class="text-lg -mt-5 mb-10"> RedisGears release notes for version 1.2 and earlier </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"> Min Redis <br/> version </th> <th style="text-align:left"> Min cluster <br/> version </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisgears/redisgears-1.2-release-notes/"> v1.2 (February 2022) </a> </td> <td style="text-align:left"> Plugins and JVM support. Python async await. Override commands API. Register functions on key miss events. Tracks new statistics. Python profiler support. Extended RedisAI integration. </td> <td style="text-align:left"> 6.0.0 </td> <td style="text-align:left"> 6.0.12 </td> </tr> <tr> <td style="text-align:left"> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisgears/redisgears-1.0-release-notes/"> v1.0 (May 2020) </a> </td> <td style="text-align:left"> First GA release of RedisGears. Built-in C-API and Python interpreter. Run a serverless engine in memory next to your Redis data. </td> <td style="text-align:left"> 6.0.0 </td> <td style="text-align:left"> 6.0.0 </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisgears/"/> <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-help/.html
<section class="prose w-full py-12"> <h1 class="command-name"> FT.CONFIG HELP </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">FT.CONFIG HELP 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> Describe 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 HELP returns an array reply of the configuration name and value. </p> <h2 id="examples"> Examples </h2> <details open=""> <summary> <b> Get configuration details </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 HELP 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> Description </span></span><span class="line"><span class="cl"> 3<span class="o">)</span> Query <span class="o">(</span>search<span class="o">)</span> timeout </span></span><span class="line"><span class="cl"> 4<span class="o">)</span> Value </span></span><span class="line"><span class="cl"> 5<span class="o">)</span> <span class="s2">"42"</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-get/"> <code> FT.CONFIG GET </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-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/operate/rs/7.4/clusters/new-cluster-setup/.html
<section class="prose w-full py-12 max-w-none"> <h1> Set up a new cluster </h1> <p class="text-lg -mt-5 mb-10"> How to set up a new cluster using the management UI. </p> <p> A Redis Enterprise Software cluster typically consists of several nodes. For production deployments, we recommend an uneven number of nodes, with a minimum of three. </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 a cluster that consists of only one node, some features and capabilities are not enabled, such as database replication that provides high availability. </div> </div> <p> To set up a new cluster, you must first <a href="/docs/latest/operate/rs/7.4/installing-upgrading/"> install the Redis Enterprise Software package </a> and then set up the cluster as described below. After the cluster is created you can <a href="/docs/latest/operate/rs/7.4/clusters/add-node/"> add multiple nodes to the cluster </a> . </p> <p> To create a cluster: </p> <ol> <li> <p> In a browser, go to <code> https://&lt;name or IP address of the machine with Redis Enterprise Software installed&gt;:8443 </code> . For example, if you installed Redis Enterprise Software on a machine with IP address 10.0.1.34, go to <a href="https://10.0.1.34:8443"> https://10.0.1.34:8443 </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> <ul> <li> The management UI uses a <a href="/docs/latest/operate/rs/7.4/security/certificates/updating-certificates/"> self-signed certificate for TLS encryption </a> . </li> <li> If the machine has both an internal IP address and an external IP address, use the external IP address to access the setup UI. </li> </ul> </div> </div> </li> <li> <p> Select <strong> Create new cluster </strong> . </p> </li> <li> <p> Enter an email and password for the administrator account, then select <strong> Next </strong> to proceed to cluster setup. </p> </li> <li> <p> Enter your cluster license key if you have one. Otherwise, the cluster uses the trial license by default. </p> </li> <li> <p> In the <strong> Configuration </strong> section: </p> <ol> <li> <p> For <strong> FQDN (Fully Qualified Domain Name) </strong> , enter a unique name for the cluster. </p> <p> See the <a href="/docs/latest/operate/rs/7.4/networking/cluster-dns/"> instructions for DNS setup </a> to make sure your cluster is reachable by name. </p> </li> <li> <p> Choose whether to <a href="/docs/latest/operate/rs/7.4/networking/private-public-endpoints/"> <strong> Enable private &amp; public endpoints support </strong> </a> . </p> </li> <li> <p> Choose whether to <a href="/docs/latest/operate/rs/7.4/clusters/configure/rack-zone-awareness/"> <strong> Enable rack-zone awareness </strong> </a> . </p> </li> </ol> </li> <li> <p> Click <strong> Next </strong> . </p> </li> <li> <p> Configure storage and network settings: </p> <ol> <li> <p> Enter a path for <a href="/docs/latest/operate/rs/7.4/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage/"> <em> Ephemeral storage </em> </a> , or leave the default path. </p> </li> <li> <p> Enter a path for <a href="/docs/latest/operate/rs/7.4/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage/"> <em> Persistent storage </em> </a> , or leave the default path. </p> </li> <li> <p> To enable <a href="/docs/latest/operate/rs/7.4/databases/auto-tiering/"> <em> Auto Tiering </em> </a> , select <strong> Enable flash storage </strong> and enter the path to the flash storage. </p> </li> <li> <p> If the cluster is configured to support <a href="/docs/latest/operate/rs/7.4/clusters/configure/rack-zone-awareness/"> rack-zone awareness </a> , set the <strong> Rack-zone ID </strong> for the new node. </p> </li> <li> <p> If your machine has multiple IP addresses, assign a single IPv4 type address for <strong> Node-to-node communication (internal traffic) </strong> and multiple IPv4/IPv6 type addresses for <strong> External traffic </strong> . </p> </li> </ol> </li> <li> <p> Select <strong> Create cluster </strong> . </p> </li> <li> <p> Click <strong> OK </strong> to confirm that you are aware of the replacement of the HTTPS TLS certificate on the node, and proceed through the browser warning. </p> </li> </ol> <p> After a short wait, your cluster is created and you can sign in to the Cluster Manager UI. </p> <p> You can now access any of the management capabilities, including: </p> <ul> <li> <a href="/docs/latest/operate/rs/7.4/databases/create/"> Creating a new database </a> </li> <li> <a href="/docs/latest/operate/rs/7.4/clusters/add-node/"> Joining a new node to a cluster </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/7.4/clusters/new-cluster-setup/"/> <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/planning/.html
<section class="prose w-full py-12 max-w-none"> <h1> Considerations for planning Active-Active databases </h1> <p class="text-lg -mt-5 mb-10"> Information about Active-Active database to take into consideration while planning a deployment, such as compatibility, limitations, and special configuration </p> <p> In Redis Enterprise, Active-Active geo-distribution is based on <a href="https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type"> conflict-free replicated data type (CRDT) technology </a> . Compared to databases without geo-distribution, Active-Active databases have more complex replication and networking, as well as a different data type. </p> <p> Because of the complexities of Active-Active databases, there are special considerations to keep in mind while planning your Active-Active database. </p> <p> See <a href="/docs/latest/operate/rs/7.4/databases/active-active/"> Active-Active Redis </a> for more information about geo-distributed replication. For more info on other high availability features, see <a href="/docs/latest/operate/rs/7.4/databases/durability-ha/"> Durability and high availability </a> . </p> <h2 id="participating-clusters"> Participating clusters </h2> <p> You need at least <a href="/docs/latest/operate/rs/7.4/clusters/new-cluster-setup/"> two participating clusters </a> for an Active-Active database. If your database requires more than ten participating clusters, contact Redis support. You can <a href="/docs/latest/operate/rs/7.4/databases/active-active/manage/#participating-clusters/"> add or remove participating clusters </a> after database creation. </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 an Active-Active database <a href="/docs/latest/operate/rs/7.4/databases/auto-tiering/"> runs on flash memory </a> , you cannot add participating clusters that run on RAM only. </div> </div> <p> Changes made from the Cluster Manager UI to an Active-Active database configuration only apply to the cluster you are editing. For global configuration changes across all clusters, use the <code> crdb-cli </code> command-line utility. </p> <h2 id="memory-limits"> Memory limits </h2> <p> Database memory limits define the maximum size of your database across all database replicas and <a href="/docs/latest/operate/rs/7.4/references/terminology/#redis-instance-shard"> shards </a> on the cluster. Your memory limit also determines the number of shards. </p> <p> Besides your dataset, the memory limit must also account for replication, Active-Active metadata, and module overhead. These features can increase your database size, sometimes increasing it by two times or more. </p> <p> Factors to consider when sizing your database: </p> <ul> <li> <strong> dataset size </strong> : you want your limit to be above your dataset size to leave room for overhead. </li> <li> <strong> database throughput </strong> : high throughput needs more shards, leading to a higher memory limit. </li> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/"> <strong> modules </strong> </a> : using modules with your database can consume more memory. </li> <li> <a href="/docs/latest/operate/rs/7.4/databases/durability-ha/clustering/"> <strong> database clustering </strong> </a> : enables you to spread your data into shards across multiple nodes (scale out). </li> <li> <a href="/docs/latest/operate/rs/7.4/databases/durability-ha/replication/"> <strong> database replication </strong> </a> : enabling replication doubles memory consumption </li> <li> <a href="/docs/latest/operate/rs/7.4/databases/active-active/"> <strong> Active-Active replication </strong> </a> : enabling Active-Active replication requires double the memory of regular replication, which can be up to two times (2x) the original data size per instance. </li> <li> <a href="/docs/latest/operate/rs/7.4/databases/active-active/manage/#replication-backlog/"> <strong> database replication backlog </strong> </a> for synchronization between shards. By default, this is set to 1% of the database size. </li> <li> <a href="/docs/latest/operate/rs/7.4/databases/active-active/manage/"> <strong> Active-Active replication backlog </strong> </a> for synchronization between clusters. By default, this is set to 1% of the database size. </li> </ul> <p> It's also important to know Active-Active databases have a lower threshold for activating the eviction policy, because it requires propagation to all participating clusters. The eviction policy starts to evict keys when one of the Active-Active instances reaches 80% of its memory limit. </p> <p> For more information on memory limits, see <a href="/docs/latest/operate/rs/7.4/databases/memory-performance/"> Memory and performance </a> or <a href="/docs/latest/operate/rs/7.4/databases/memory-performance/memory-limit/"> Database memory limits </a> . </p> <h2 id="networking"> Networking </h2> <p> Network requirements for Active-Active databases include: </p> <ul> <li> A VPN between each network that hosts a cluster with an instance (if your database spans WAN). </li> <li> A network connection to <a href="#network-ports"> several ports </a> on each cluster from all nodes in all participating clusters. </li> <li> A <a href="#network-time-service"> network time service </a> running on each node in all clusters. </li> </ul> <p> Networking between the clusters must be configured before creating an Active-Active database. The setup will fail if there is no connectivity between the clusters. </p> <h3 id="network-ports"> Network ports </h3> <p> Every node must have access to the REST API ports of every other node as well as other ports for proxies, VPNs, and the Cluster Manager UI. See <a href="/docs/latest/operate/rs/7.4/networking/port-configurations/"> Network port configurations </a> for more details. These ports should be allowed through firewalls that may be positioned between the clusters. </p> <h3 id="network-time-service"> Network Time Service </h3> <p> Active-Active databases require a time service like NTP or Chrony to make sure the clocks on all cluster nodes are synchronized. This is critical to avoid problems with internal cluster communications that can impact your data integrity. </p> <p> See <a href="/docs/latest/operate/rs/7.4/clusters/configure/sync-clocks/"> Synchronizing cluster node clocks </a> for more information. </p> <h2 id="redis-modules"> Redis modules </h2> <p> Several Redis modules are compatible with Active-Active databases. Find the list of <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities/"> compatible Redis modules </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> Starting with v6.2.18, you can index, query, and perform full-text searches of nested JSON documents in Active-Active databases by combining RedisJSON and RediSearch. </div> </div> <p> </p> <h2 id="limitations"> Limitations </h2> <p> Active-Active databases have the following limitations: </p> <ul> <li> An existing database can't be changed into an Active-Active database. To move data from an existing database to an Active-Active database, you must <a href="/docs/latest/operate/rs/7.4/databases/active-active/create/"> create a new Active-Active database </a> and <a href="/docs/latest/operate/rs/7.4/databases/import-export/migrate-to-active-active/"> migrate the data </a> . </li> <li> <a href="/docs/latest/operate/rs/7.4/databases/durability-ha/discovery-service/"> Discovery service </a> is not supported with Active-Active databases. Active-Active databases require FQDNs or <a href="/docs/latest/operate/rs/7.4/networking/mdns/"> mDNS </a> . </li> <li> The <code> FLUSH </code> command is not supported from the CLI. To flush your database, use the API or Cluster Manager UI. </li> <li> The <code> UNLINK </code> command is a blocking command for all types of keys. </li> <li> Cross slot multi commands (such as <code> MSET </code> ) are not supported with Active-Active databases. </li> <li> The hashing policy can't be changed after database creation. </li> <li> If an Active-Active database <a href="/docs/latest/operate/rs/7.4/databases/auto-tiering/"> runs on flash memory </a> , you cannot add participating clusters that run on RAM only. </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/planning/"/> <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/nodes/status/.html
<section class="prose w-full py-12 max-w-none"> <h1> Node status requests </h1> <p class="text-lg -mt-5 mb-10"> Requests that return a node's hostname and role. </p> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#get-all-nodes-status"> GET </a> </td> <td> <code> /v1/nodes/status </code> </td> <td> Get the status of all nodes </td> </tr> <tr> <td> <a href="#get-node-status"> GET </a> </td> <td> <code> /v1/nodes/{uid}/status </code> </td> <td> Get a node's status </td> </tr> </tbody> </table> <h2 id="get-all-nodes-status"> Get all node statuses </h2> <pre><code>GET /v1/nodes/status </code></pre> <p> Gets the status of all nodes. Includes each node's hostname and role in the cluster: </p> <ul> <li> <p> Primary nodes return <code> "role": "master" </code> </p> </li> <li> <p> Replica nodes return <code> "role": "slave" </code> </p> </li> </ul> <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_node_info"> view_node_info </a> </td> </tr> </tbody> </table> <h3 id="get-all-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <pre><code>GET /nodes/status </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-all-response"> Response </h3> <p> For each node in the cluster, returns a JSON object that contains each node's hostname, role, and other status details. </p> <p> If a maintenance snapshot exists due to an in-progress or improperly stopped <a href="/docs/latest/operate/rs/clusters/maintenance-mode/"> node maintenance </a> process, the response includes a <code> maintenance_snapshot </code> field. </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">"1"</span><span class="p">:</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cores"</span><span class="p">:</span> <span class="mi">8</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"free_provisional_ram"</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">"free_ram"</span><span class="p">:</span> <span class="mi">3499368448</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"hostname"</span><span class="p">:</span> <span class="s2">"3d99db1fdf4b"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"maintenance_snapshot"</span><span class="p">:</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"created_time"</span><span class="p">:</span> <span class="s2">"2024-09-06 20:47:23"</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">"maintenance_mode_2024-09-06_20-47-23"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"node_uid"</span><span class="p">:</span> <span class="s2">"1"</span> </span></span><span class="line"><span class="cl"> <span class="p">},</span> </span></span><span class="line"><span class="cl"> <span class="nt">"master_shards"</span><span class="p">:</span> <span class="p">[],</span> </span></span><span class="line"><span class="cl"> <span class="nt">"node_overbooking_depth"</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">"node_status"</span><span class="p">:</span> <span class="s2">"active"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"role"</span><span class="p">:</span> <span class="s2">"master"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"slave_shards"</span><span class="p">:</span> <span class="p">[],</span> </span></span><span class="line"><span class="cl"> <span class="nt">"software_version"</span><span class="p">:</span> <span class="s2">"7.4.6-22"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"software_version_sha"</span><span class="p">:</span> <span class="s2">"6c37b1483b5fb6110c8055c1526aa58eec1d29d3519e92310859101419248831"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"total_memory"</span><span class="p">:</span> <span class="mi">6219673600</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"total_provisional_ram"</span><span class="p">:</span> <span class="mi">0</span> </span></span><span class="line"><span class="cl"> <span class="p">},</span> </span></span><span class="line"><span class="cl"> <span class="nt">"2"</span><span class="p">:</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"hostname"</span><span class="p">:</span> <span class="s2">"fc7a3d332458"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"role"</span><span class="p">:</span> <span class="s2">"slave"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="c1">// additional fields </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="p">},</span> </span></span><span class="line"><span class="cl"> <span class="nt">"3"</span><span class="p">:</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"hostname"</span><span class="p">:</span> <span class="s2">"b87cc06c830f"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"role"</span><span class="p">:</span> <span class="s2">"slave"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="c1">// additional fields </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="get-all-status-codes"> Status codes </h3> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1"> 200 OK </a> </td> <td> No error </td> </tr> </tbody> </table> <h2 id="get-node-status"> Get node status </h2> <pre><code>GET /v1/nodes/{int: uid}/status </code></pre> <p> Gets the status of a node. Includes the node's hostname and role in the cluster: </p> <ul> <li> <p> Primary nodes return <code> "role": "master" </code> </p> </li> <li> <p> Replica nodes return <code> "role": "slave" </code> </p> </li> </ul> <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/#view_node_info"> view_node_info </a> </td> </tr> </tbody> </table> <h3 id="get-request"> Request </h3> <h4 id="example-http-request-1"> Example HTTP request </h4> <pre><code>GET /nodes/1/status </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> <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 node's unique ID. </td> </tr> </tbody> </table> <h3 id="get-response"> Response </h3> <p> Returns a JSON object that contains the node's hostname, role, and other status details. </p> <p> If a maintenance snapshot exists due to an in-progress or improperly stopped <a href="/docs/latest/operate/rs/clusters/maintenance-mode/"> node maintenance </a> process, the response includes a <code> maintenance_snapshot </code> field. </p> <h4 id="example-json-body-1"> Example JSON body </h4> <div class="highlight"> <pre class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"cores"</span><span class="p">:</span> <span class="mi">8</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"free_provisional_ram"</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">"free_ram"</span><span class="p">:</span> <span class="mi">3504422912</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"hostname"</span><span class="p">:</span> <span class="s2">"3d99db1fdf4b"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"maintenance_snapshot"</span><span class="p">:</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"created_time"</span><span class="p">:</span> <span class="s2">"2024-09-06 20:47:23"</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">"maintenance_mode_2024-09-06_20-47-23"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"node_uid"</span><span class="p">:</span> <span class="s2">"1"</span> </span></span><span class="line"><span class="cl"> <span class="p">},</span> </span></span><span class="line"><span class="cl"> <span class="nt">"master_shards"</span><span class="p">:</span> <span class="p">[],</span> </span></span><span class="line"><span class="cl"> <span class="nt">"node_overbooking_depth"</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">"node_status"</span><span class="p">:</span> <span class="s2">"active"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"role"</span><span class="p">:</span> <span class="s2">"master"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"slave_shards"</span><span class="p">:</span> <span class="p">[],</span> </span></span><span class="line"><span class="cl"> <span class="nt">"software_version"</span><span class="p">:</span> <span class="s2">"7.4.6-22"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"software_version_sha"</span><span class="p">:</span> <span class="s2">"6c37b1483b5fb6110c8055c1526aa58eec1d29d3519e92310859101419248831"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"total_memory"</span><span class="p">:</span> <span class="mi">6219673600</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"total_provisional_ram"</span><span class="p">:</span> <span class="mi">0</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="get-status-codes"> Status codes </h3> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1"> 200 OK </a> </td> <td> No error </td> </tr> <tr> <td> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5"> 404 Not Found </a> </td> <td> Node UID does not exist </td> </tr> </tbody> </table> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/references/rest-api/requests/nodes/status/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/kubernetes/architecture/deployment-options/.html
<section class="prose w-full py-12 max-w-none"> <h1> Flexible deployment options </h1> <p class="text-lg -mt-5 mb-10"> Redis Enterprise for Kubernetes allows you to deploy to multiple namespaces. This article describes flexible deployment options you can use to meet your specific needs. </p> <p> You can deploy Redis Enterprise for Kubernetes in several different ways depending on your database needs. </p> <p> Multiple RedisEnterpriseDatabase (REDB) resources can be associated with a single Redis Enterprise cluster resource (REC) even if they reside in different namespaces. </p> <p> The Redis Enterprise cluster (REC) custom resource must reside in the same namespace as the Redis Enterprise operator. </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> Multi-namespace installations don't support Active-Active databases (REEADB). Only databases created with the REDB resource are supported in multi-namespace deployments at this time. </div> </div> <h2 id="single-rec-and-single-namespace-one-to-one"> Single REC and single namespace (one-to-one) </h2> <p> The standard and simplest deployment deploys your Redis Enterprise databases (REDB) in the same namespace as the Redis Enterprise cluster (REC). No additional configuration is required for this, since there is no communication required to cross namespaces. See <a href="/docs/latest/operate/kubernetes/deployment/quick-start/"> Deploy Redis Enterprise for Kubernetes </a> . </p> <a href="/docs/latest/images/k8s/k8s-deploy-one-to-one.png" sdata-lightbox="/images/k8s/k8s-deploy-one-to-one.png"> <img src="/docs/latest/images/k8s/k8s-deploy-one-to-one.png"/> </a> <h2 id="single-rec-and-multiple-namespaces-one-to-many"> Single REC and multiple namespaces (one-to-many) </h2> <p> Multiple Redis Enterprise databases (REDB) spread across multiple namespaces within the same K8s cluster can be associated with the same Redis Enterprise cluster (REC). See <a href="/docs/latest/operate/kubernetes/re-clusters/multi-namespace/"> Manage databases in multiple namespaces </a> for more information. </p> <a href="/docs/latest/images/k8s/k8s-deploy-one-to-many.png" sdata-lightbox="/images/k8s/k8s-deploy-one-to-many.png"> <img src="/docs/latest/images/k8s/k8s-deploy-one-to-many.png"/> </a> <h2 id="multiple-recs-and-multiple-namespaces-many-to-many"> Multiple RECs and multiple namespaces (many-to-many) </h2> <p> A single Kubernetes cluster can contain multiple Redis Enterprise clusters (REC), as long as they reside in different namespaces. Each namespace can host only one REC and each operator can only manage one REC. </p> <p> You have the flexibility to create databases in separate namespaces, or in the same namespace as the REC, or combine any of the supported deployment options above. This configuration is geared towards use cases that require multiple Redis Enterprise clusters with greater isolation or different cluster configurations. </p> <p> See <a href="/docs/latest/operate/kubernetes/re-clusters/multi-namespace/"> Manage databases in multiple namespaces </a> for more information. </p> <a href="/docs/latest/images/k8s/k8s-deploy-many-to-many.png" sdata-lightbox="/images/k8s/k8s-deploy-many-to-many.png"> <img src="/docs/latest/images/k8s/k8s-deploy-many-to-many.png"/> </a> <h2 id="unsupported-deployment-patterns"> Unsupported deployment patterns </h2> <h3 id="cross-cluster-operations"> Cross-cluster operations </h3> <p> Redis Enterprise for Kubernetes does not support operations that cross Kubernetes clusters. Redis Enterprise clusters (REC) work inside a single K8s cluster. Crossing clusters could result in functional and security issues. </p> <a href="/docs/latest/images/k8s/k8s-deploy-cross-namespaces.png" sdata-lightbox="/images/k8s/k8s-deploy-cross-namespaces.png"> <img src="/docs/latest/images/k8s/k8s-deploy-cross-namespaces.png"/> </a> <h3 id="multiple-recs-in-one-namespace"> Multiple RECs in one namespace </h3> <p> Redis Enterprise for Kubernetes does not support multiple Redis Enterprise clusters (REC) in the same namespace. Creating more than one REC in the same namespace will result in errors. </p> <a href="/docs/latest/images/k8s/k8s-deploy-multicluster-antipattern.png" sdata-lightbox="/images/k8s/k8s-deploy-multicluster-antipattern.png"> <img src="/docs/latest/images/k8s/k8s-deploy-multicluster-antipattern.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/kubernetes/architecture/deployment-options/"/> <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/configuring/.html
<section class="prose w-full py-12 max-w-none"> <h1> Additional configuration </h1> <p> This section describes additional configuration options for Redis Enterprise Software installation. </p> <nav> <a href="/docs/latest/operate/rs/installing-upgrading/configuring/centos-rhel-firewall/"> Configure CentOS/RHEL firewall </a> <p> Configure firewall rules for Redis Enterprise Software on CentOS or Red Hat Enterprise Linux (RHEL). </p> <a href="/docs/latest/operate/rs/installing-upgrading/configuring/linux-swap/"> Configure swap for Linux </a> <p> Turn off Linux swap space. </p> <a href="/docs/latest/operate/rs/installing-upgrading/configuring/change-location-socket-files/"> Change socket file locations </a> <p> Change socket file locations. </p> </nav> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/installing-upgrading/configuring/"/> <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/ocsp/.html
<section class="prose w-full py-12 max-w-none"> <h1> rladmin cluster ocsp </h1> <p class="text-lg -mt-5 mb-10"> Manages OCSP. </p> <p> Manages OCSP configuration and verifies the status of a server certificate maintained by a third-party <a href="https://en.wikipedia.org/wiki/Certificate_authority"> certificate authority (CA) </a> . </p> <h2 id="ocsp-certificate_compatible"> <code> ocsp certificate_compatible </code> </h2> <p> Checks if the proxy certificate contains an OCSP URI. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster ocsp certificate_compatible </span></span></code></pre> </div> <h3 id="parameters"> Parameters </h3> <p> None </p> <h3 id="returns"> Returns </h3> <p> Returns the OCSP URI if it exists. 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 cluster ocsp certificate_compatible </span></span><span class="line"><span class="cl">Success. OCSP URI is http://responder.ocsp.url.com </span></span></code></pre> </div> <h2 id="ocsp-config"> <code> ocsp config </code> </h2> <p> Displays or updates OCSP configuration. Run the command without the <code> set </code> option to display the current configuration of a parameter. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster ocsp config &lt;OCSP parameter&gt; </span></span><span class="line"><span class="cl"> <span class="o">[</span><span class="nb">set</span> &lt;value&gt;<span class="o">]</span> </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> ocsp_functionality </td> <td> enabled <br/> <br/> disabled </td> <td> Enables or turns off OCSP for the cluster </td> </tr> <tr> <td> query_frequency </td> <td> integer <nobr> (range: 60-86400) </nobr> <nobr> (default: 3600) </nobr> </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> <nobr> (default: 60) </nobr> </td> <td> The time interval in seconds between retries after a failed query </td> </tr> <tr> <td> recovery_max_tries </td> <td> integer <nobr> (range: 1-100) </nobr> <nobr> (default: 5) </nobr> </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 (you cannot manually set this parameter) </td> </tr> <tr> <td> response_timeout </td> <td> integer <nobr> (range: 1-60) </nobr> <nobr> (default: 1) </nobr> </td> <td> The time interval in seconds to wait for a response before timing out </td> </tr> </tbody> </table> <h3 id="returns-1"> Returns </h3> <p> If you run the <code> ocsp config </code> command without the <code> set </code> option, it displays the specified parameter's current configuration. </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 cluster ocsp config recovery_frequency </span></span><span class="line"><span class="cl">Recovery frequency of the OCSP server is <span class="m">60</span> seconds </span></span><span class="line"><span class="cl">$ rladmin cluster ocsp config recovery_frequency <span class="nb">set</span> <span class="m">30</span> </span></span><span class="line"><span class="cl">$ rladmin cluster ocsp config recovery_frequency </span></span><span class="line"><span class="cl">Recovery frequency of the OCSP server is <span class="m">30</span> seconds </span></span></code></pre> </div> <h2 id="ocsp-status"> <code> ocsp status </code> </h2> <p> Returns the latest cached status of the certificate's OCSP response. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster ocsp status </span></span></code></pre> </div> <h3 id="parameters-2"> Parameters </h3> <p> None </p> <h3 id="returns-2"> Returns </h3> <p> Returns the latest cached status of the certificate's OCSP response. </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 cluster ocsp status </span></span><span class="line"><span class="cl">OCSP certificate status is: REVOKED </span></span><span class="line"><span class="cl">produced_at: Wed, <span class="m">22</span> Dec <span class="m">2021</span> 12:50:11 GMT </span></span><span class="line"><span class="cl">responder_url: http://responder.ocsp.url.com </span></span><span class="line"><span class="cl">revocation_time: Wed, <span class="m">22</span> Dec <span class="m">2021</span> 12:50:04 GMT </span></span><span class="line"><span class="cl">this_update: Wed, <span class="m">22</span> Dec <span class="m">2021</span> 12:50:11 GMT </span></span></code></pre> </div> <h2 id="ocsp-test_certificate"> <code> ocsp test_certificate </code> </h2> <p> Queries the OCSP server for the certificate's latest status, then caches and displays the response. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster ocsp test_certificate </span></span></code></pre> </div> <h3 id="parameters-3"> Parameters </h3> <p> None </p> <h3 id="returns-3"> Returns </h3> <p> Returns the latest status of the certificate's OCSP response. </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 cluster ocsp test_certificate </span></span><span class="line"><span class="cl">Initiating a query to OCSP server </span></span><span class="line"><span class="cl">...OCSP certificate status is: REVOKED </span></span><span class="line"><span class="cl">produced_at: Wed, <span class="m">22</span> Dec <span class="m">2021</span> 12:50:11 GMT </span></span><span class="line"><span class="cl">responder_url: http://responder.ocsp.url.com </span></span><span class="line"><span class="cl">revocation_time: Wed, <span class="m">22</span> Dec <span class="m">2021</span> 12:50:04 GMT </span></span><span class="line"><span class="cl">this_update: Wed, <span class="m">22</span> Dec <span class="m">2021</span> 12:50:11 GMT </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/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/commands/function/.html
<section class="prose w-full py-12"> <h1 class="command-name"> FUNCTION </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">FUNCTION</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available since: </dt> <dd class="m-0"> 7.0.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> Depends on subcommand. </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> This is a container command for function commands. </p> <p> To see the list of available commands you can call <a href="/docs/latest/commands/function-help/"> <code> FUNCTION HELP </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/function/"/> <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/.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/7.4/references/cli-utilities/rladmin/"> <code> rladmin </code> </a> for standalone database configuration </p> </li> <li> <p> <a href="/docs/latest/operate/rs/7.4/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/7.4/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/7.4/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> <ul> <li> <p> <strong> Database version </strong> - Select the Redis version when you create a database. </p> </li> <li> <p> <strong> 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/7.4/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/7.4/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> <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="high-availability--durability"> High availability &amp; durability </h3> <ul> <li> <p> <a href="/docs/latest/operate/rs/7.4/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/7.4/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/7.4/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> <li> <p> <a href="/docs/latest/operate/rs/7.4/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> <a href="/docs/latest/operate/rs/7.4/databases/memory-performance/eviction-policy/"> <strong> Data eviction policy </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 in order to make room for new keys. You can select a different data eviction policy. </p> </li> </ul> <h3 id="clustering"> Clustering </h3> <ul> <li> <p> <strong> Sharding </strong> - You can either: </p> <ul> <li> <p> Turn on <strong> Sharding </strong> to enable <a href="/docs/latest/operate/rs/7.4/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/7.4/databases/durability-ha/clustering/"> Multi-key commands </a> . </p> <p> You can increase the number of shards in the database at any time. </p> <p> You can accept the <a href="/docs/latest/operate/rs/7.4/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/7.4/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> Turn off <strong> Sharding </strong> to use only one shard so that you can use <a href="/docs/latest/operate/rs/7.4/databases/durability-ha/clustering/"> Multi-key commands </a> without the limitations. </p> </li> </ul> </li> <li> <p> <a href="/docs/latest/operate/rs/7.4/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> <a href="/docs/latest/operate/rs/7.4/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/7.4/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="replica-of"> Replica Of </h3> <p> With <a href="/docs/latest/operate/rs/7.4/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="scheduled-backup"> Scheduled backup </h3> <p> You can configure <a href="/docs/latest/operate/rs/7.4/databases/import-export/schedule-backups/"> periodic backups </a> of the database, including the interval and backup location parameters. </p> <h3 id="alerts"> Alerts </h3> <p> Select <a href="/docs/latest/operate/rs/7.4/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/7.4/clusters/monitoring/#send-alerts-by-email"> send alerts by email </a> to relevant users. </p> <h3 id="tls"> TLS </h3> <p> You can require <a href="/docs/latest/operate/rs/7.4/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/7.4/security/access-control/create-db-roles/"> user roles </a> that have access to the database and the <a href="/docs/latest/operate/rs/7.4/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/7.4/security/access-control/create-db-roles/"> role </a> to grant database access. </p> </li> <li> <p> Associate a <a href="/docs/latest/operate/rs/7.4/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="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/7.4/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/7.4/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/rc/security/access-control/data-access-control/.html
<section class="prose w-full py-12 max-w-none"> <h1> Data access control </h1> <p class="text-lg -mt-5 mb-10"> Control who can access your databases using the default user database password and role-based access control. </p> <h2 id="default-user"> Default user </h2> <p> When you create a Redis Cloud database, your database is given a randomly generated password called the <a href="/docs/latest/operate/rc/security/access-control/data-access-control/default-user/"> <strong> Default user password </strong> </a> . Learn how to <a href="/docs/latest/operate/rc/security/access-control/data-access-control/default-user/#change-password"> change the default user password </a> or <a href="/docs/latest/operate/rc/security/access-control/data-access-control/default-user/#turn-off-default-user"> turn off default user access </a> . </p> <h2 id="role-based-access-control"> Role-based access control </h2> <p> With <a href="/docs/latest/operate/rc/security/access-control/data-access-control/role-based-access-control/"> role-based access control (RBAC) </a> , you create roles and assign users to those roles to grant different levels of access to the database. </p> <ul> <li> <a href="/docs/latest/operate/rc/security/access-control/data-access-control/role-based-access-control/"> Enable RBAC </a> </li> <li> <a href="/docs/latest/operate/rc/security/access-control/data-access-control/configure-acls/"> Configure ACLs </a> </li> <li> <a href="/docs/latest/operate/rc/security/access-control/data-access-control/create-roles/"> Create roles </a> </li> <li> <a href="/docs/latest/operate/rc/security/access-control/data-access-control/create-assign-users/"> Create and edit database users </a> </li> <li> <a href="/docs/latest/operate/rc/security/access-control/data-access-control/active-active-roles/"> Active-Active roles </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/rc/security/access-control/data-access-control/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-add-context/.html
<section class="prose w-full py-12"> <h1> redis-di add-context </h1> <p class="text-lg -mt-5 mb-10"> Adds a new context </p> <h2 id="usage"> Usage </h2> <pre tabindex="0"><code>Usage: redis-di add-context [OPTIONS] CONTEXT_NAME </code></pre> <h2 id="options"> Options </h2> <ul> <li> <p> <code> context_name </code> (REQUIRED): </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> context-name </code> </li> </ul> </li> <li> <p> <code> log_level </code> : </p> <ul> <li> Type: Choice(['DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']) </li> <li> Default: <code> info </code> </li> <li> Usage: <code> --log-level -l </code> </li> </ul> </li> <li> <p> <code> 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 1&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> rdi_host </code> (REQUIRED): </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-host </code> </li> </ul> <p> Host/IP of RDI Database </p> </li> <li> <p> <code> rdi_port </code> (REQUIRED): </p> <ul> <li> Type: &lt;IntRange 1&lt;=x&lt;=65535&gt; </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-port </code> </li> </ul> <p> Port of RDI Database </p> </li> <li> <p> <code> rdi_user </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-user </code> </li> </ul> <p> RDI Database Username </p> </li> <li> <p> <code> rdi_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> 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 add-context [OPTIONS] CONTEXT_NAME Adds a new context Options: -l, --log-level [DEBUG|INFO|WARN|ERROR|CRITICAL] [default: INFO] --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; 1&lt;=x&lt;=65535; required] --cluster-user TEXT Redis Enterprise Cluster username with either DB Member, Cluster Member or Cluster Admin roles [required] --rdi-host TEXT Host/IP of RDI Database [required] --rdi-port INTEGER RANGE Port of RDI Database [1&lt;=x&lt;=65535; required] --rdi-user TEXT RDI Database Username --rdi-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 --help Show this message and exit. </code></pre> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-add-context/"/> <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/sadd/.html
<section class="prose w-full py-12"> <h1 class="command-name"> SADD </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">SADD 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"> 1.0.0 </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments. </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> Add the specified members to the set stored at <code> key </code> . Specified members that are already a member of this set are ignored. If <code> key </code> does not exist, a new set is created before adding the specified members. </p> <p> An error is returned when the value stored at <code> key </code> is not a set. </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 "Hello" (integer) 1 redis&gt; SADD myset "World" (integer) 1 redis&gt; SADD myset "World" (integer) 0 redis&gt; SMEMBERS myset 1) "Hello" 2) "World" </pre> <div class="prompt" style=""> <span> redis&gt; </span> <input autocomplete="off" name="prompt" spellcheck="false" type="text"/> </div> </form> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <a href="../../develop/reference/protocol-spec#integers"> Integer reply </a> : the number of elements that were added to the set, not including all the elements already present in the set. <br/> <h2> History </h2> <ul> <li> Starting with Redis version 2.4.0: Accepts multiple <code> member </code> arguments. </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/sadd/"/> <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/crdb/modify_request/.html
<section class="prose w-full py-12 max-w-none"> <h1> CRDB modify request object </h1> <p class="text-lg -mt-5 mb-10"> An object to update an Active-Active database </p> <p> An object to update an Active-Active database. </p> <table> <thead> <tr> <th> Name </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> add_instances </td> <td> array of <a href="/docs/latest/operate/rs/references/rest-api/objects/crdb/instance_info/"> CRDB instance_info </a> objects </td> <td> List of new CRDB instances </td> </tr> <tr> <td> crdb </td> <td> <a href="/docs/latest/operate/rs/references/rest-api/objects/crdb/"> CRDB </a> object </td> <td> An object that represents an Active-Active database </td> </tr> <tr> <td> force_update </td> <td> boolean </td> <td> (Warning: This flag can cause unintended and dangerous changes) Force the configuration update and increment the configuration version even if there is no change to the configuration parameters. If you use force, you can mistakenly cause the other instances to update to the configuration version even though it was not changed. </td> </tr> <tr> <td> remove_instances </td> <td> array of integers </td> <td> List of unique instance IDs </td> </tr> <tr> <td> remove_instances.force_remove </td> <td> boolean </td> <td> Force removal of instance from the Active-Active database. Before we remove an instance from an Active-Active database, all of the operations that the instance received from clients must be propagated to the other instances. This is the safe method to remove an instance from the Active-Active database. If the instance does not have connectivity to other instances, the propagation fails and removal fails. To remove an instance that does not have connectivity to other instances, you must use the force flag. The removed instance keeps its data and configuration for the instance. After you remove an instance by force, you must use the purge_instances API on the removed instance. </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/crdb/modify_request/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-reset/.html
<section class="prose w-full py-12"> <h1> redis-di reset </h1> <p class="text-lg -mt-5 mb-10"> Resets the pipeline into initial full sync mode </p> <h2 id="usage"> Usage </h2> <pre tabindex="0"><code>Usage: redis-di reset [OPTIONS] </code></pre> <h2 id="options"> Options </h2> <ul> <li> <p> <code> log_level </code> : </p> <ul> <li> Type: Choice(['DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']) </li> <li> Default: <code> info </code> </li> <li> Usage: <code> --log-level -l </code> </li> </ul> </li> <li> <p> <code> rdi_host </code> (REQUIRED): </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-host </code> </li> </ul> <p> Host/IP of RDI Database </p> </li> <li> <p> <code> rdi_port </code> (REQUIRED): </p> <ul> <li> Type: &lt;IntRange 1&lt;=x&lt;=65535&gt; </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-port </code> </li> </ul> <p> Port of RDI Database </p> </li> <li> <p> <code> rdi_user </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-user </code> </li> </ul> <p> RDI Database Username </p> </li> <li> <p> <code> rdi_password </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-password </code> </li> </ul> <p> RDI Database Password </p> </li> <li> <p> <code> rdi_key </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-key </code> </li> </ul> <p> Private key file to authenticate with </p> </li> <li> <p> <code> rdi_cert </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-cert </code> </li> </ul> <p> Client certificate file to authenticate with </p> </li> <li> <p> <code> rdi_cacert </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-cacert </code> </li> </ul> <p> CA certificate file to verify with </p> </li> <li> <p> <code> rdi_key_password </code> : </p> <ul> <li> Type: STRING </li> <li> Default: <code> none </code> </li> <li> Usage: <code> --rdi-key-password </code> </li> </ul> <p> Password for unlocking an encrypted private key </p> </li> <li> <p> <code> force </code> : </p> <ul> <li> Type: BOOL </li> <li> Default: <code> false </code> </li> <li> Usage: <code> --force -f </code> </li> </ul> <p> Force operation. skips verification prompts </p> </li> <li> <p> <code> pause_for_confirmation </code> : </p> <ul> <li> Type: BOOL </li> <li> Default: <code> false </code> </li> <li> Usage: <code> --pause-for-confirmation </code> </li> </ul> <p> Pause for user confirmation if manual shutdown of collector required </p> </li> <li> <p> <code> help </code> : </p> <ul> <li> Type: BOOL </li> <li> Default: <code> false </code> </li> <li> Usage: <code> --help </code> </li> </ul> <p> Show this message and exit. </p> </li> </ul> <h2 id="cli-help"> CLI help </h2> <pre tabindex="0"><code>Usage: redis-di reset [OPTIONS] Resets the pipeline into initial full sync mode Options: -l, --log-level [DEBUG|INFO|WARN|ERROR|CRITICAL] [default: INFO] --rdi-host TEXT Host/IP of RDI Database [required] --rdi-port INTEGER RANGE Port of RDI Database [1&lt;=x&lt;=65535; required] --rdi-user TEXT RDI Database Username --rdi-password TEXT RDI Database Password --rdi-key TEXT Private key file to authenticate with --rdi-cert TEXT Client certificate file to authenticate with --rdi-cacert TEXT CA certificate file to verify with --rdi-key-password TEXT Password for unlocking an encrypted private key -f, --force Force operation. skips verification prompts --pause-for-confirmation Pause for user confirmation if manual shutdown of collector required --help Show this message and exit. </code></pre> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-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/ts.alter/.html
<section class="prose w-full py-12"> <h1 class="command-name"> TS.ALTER </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">TS.ALTER key [RETENTION retentionPeriod] [CHUNK_SIZE size] [DUPLICATE_POLICY policy] [IGNORE ignoreMaxTimediff ignoreMaxValDiff] [LABELS [label value ...]] </pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available in: </dt> <dd class="m-0"> <a href="/docs/stack"> Redis Stack </a> / <a href="/docs/data-types/timeseries"> TimeSeries 1.0.0 </a> </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(N) where N is the number of labels requested to update </dd> </dl> <p> Update the retention, chunk size, duplicate policy, and labels of an existing time series </p> <p> <a href="#examples"> Examples </a> </p> <h2 id="required-arguments"> Required arguments </h2> <details open=""> <summary> <code> key </code> </summary> <p> is key name for the time series. </p> </details> <p> <note> <b> Note: </b> This command alters only the specified element. For example, if you specify only <code> RETENTION </code> and <code> LABELS </code> , the chunk size and the duplicate policy are not altered. </note> </p> <h2 id="optional-arguments"> Optional arguments </h2> <details open=""> <summary> <code> RETENTION retentionPeriod </code> </summary> <p> is maximum retention period, compared to the maximum existing timestamp, in milliseconds. See <code> RETENTION </code> in <a href="/docs/latest/commands/ts.create/"> <code> TS.CREATE </code> </a> . </p> </details> <details open=""> <summary> <code> CHUNK_SIZE size </code> </summary> <p> is the initial allocation size, in bytes, for the data part of each new chunk. Actual chunks may consume more memory. See <code> CHUNK_SIZE </code> in <a href="/docs/latest/commands/ts.create/"> <code> TS.CREATE </code> </a> . Changing this value does not affect existing chunks. </p> </details> <details open=""> <summary> <code> DUPLICATE_POLICY policy </code> </summary> <p> is policy for handling multiple samples with identical timestamps. See <code> DUPLICATE_POLICY </code> in <a href="/docs/latest/commands/ts.create/"> <code> TS.CREATE </code> </a> . </p> </details> <details open=""> <summary> <code> IGNORE ignoreMaxTimediff ignoreMaxValDiff </code> </summary> <p> is the policy for handling duplicate samples. See <code> IGNORE </code> in <a href="/docs/latest/commands/ts.create/"> <code> TS.CREATE </code> </a> . </p> </details> <details open=""> <summary> <code> LABELS [{label value}...] </code> </summary> <p> is set of label-value pairs that represent metadata labels of the key and serve as a secondary index. </p> <p> If <code> LABELS </code> is specified, the given label list is applied. Labels that are not present in the given list are removed implicitly. Specifying <code> LABELS </code> with no label-value pairs removes all existing labels. See <code> LABELS </code> in <a href="/docs/latest/commands/ts.create/"> <code> TS.CREATE </code> </a> . </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/#simple-strings"> Simple string reply </a> - <code> OK </code> if executed correctly </li> <li> [] on error (invalid arguments, wrong key type, key does not exist, etc.) </li> </ul> <h2 id="examples"> Examples </h2> <details open=""> <summary> <b> Alter a temperature time series </b> </summary> <p> Create a temperature time series. </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 temperature:2:32 RETENTION <span class="m">60000</span> DUPLICATE_POLICY MAX LABELS sensor_id <span class="m">2</span> area_id <span class="m">32</span> </span></span><span class="line"><span class="cl">OK</span></span></code></pre> </div> <p> Alter the labels in the time series. </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.ALTER temperature:2:32 LABELS sensor_id <span class="m">2</span> area_id <span class="m">32</span> sub_area_id <span class="m">15</span> </span></span><span class="line"><span class="cl">OK</span></span></code></pre> </div> </details> <h2 id="see-also"> See also </h2> <p> <a href="/docs/latest/commands/ts.create/"> <code> TS.CREATE </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.alter/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rc/security/access-control/data-access-control/default-user/.html
<section class="prose w-full py-12 max-w-none"> <h1> Default user </h1> <p class="text-lg -mt-5 mb-10"> Learn how to change your default user password or turn off access using the default user password. </p> <p> Password-based authentication is a basic but essential Redis security feature. When you create a Redis Cloud database, your database is given a randomly generated password called the <strong> Default user password </strong> . </p> <p> This password appears in the <strong> Security </strong> section of the <strong> Configuration </strong> tab of the database details screen. </p> <a href="/docs/latest/images/rc/database-fixed-configuration-security.png" sdata-lightbox="/images/rc/database-fixed-configuration-security.png"> <img alt="The Default user password appears in the Security section of the Configuration tab on the database details screen." src="/docs/latest/images/rc/database-fixed-configuration-security.png"/> </a> <p> Use the copy button to copy the password to the clipboard: </p> <a href="/docs/latest/images/rc/button-database-password-copy.png" sdata-lightbox="/images/rc/button-database-password-copy.png"> <img alt="Use the Copy button to copy the default user password." src="/docs/latest/images/rc/button-database-password-copy.png"/> </a> <p> You'll need to use this password whenever you connect to your database using a Redis client. See <a href="/docs/latest/operate/rc/databases/connect/"> Connect to a database </a> for more info. </p> <p> See your <a href="/docs/latest/develop/clients/"> Redis client's documentation </a> to learn how to provide your password when connecting. </p> <h2 id="change-password"> Change password </h2> <p> To change the default user password for your database: </p> <ol> <li> <p> From the database <strong> Configuration </strong> tab, select <strong> Edit database </strong> . </p> <a href="/docs/latest/images/rc/button-database-edit.png" sdata-lightbox="/images/rc/button-database-edit.png"> <img alt="The Edit database button lets you change the database's default user password." src="/docs/latest/images/rc/button-database-edit.png" width="150px"/> </a> </li> <li> <p> Under the <strong> Security </strong> section, enter the new password in the <strong> Default user password </strong> field. Database passwords must be less than 50 characters long. </p> </li> <li> <p> Select <strong> Save database </strong> to update the password. </p> <a href="/docs/latest/images/rc/button-database-save.png" sdata-lightbox="/images/rc/button-database-save.png"> <img alt="Use the Save database button to save the new password." src="/docs/latest/images/rc/button-database-save.png" width="150px"/> </a> </li> </ol> <h2 id="turn-off-default-user"> Turn off default user </h2> <p> After you set up <a href="/docs/latest/operate/rc/security/access-control/data-access-control/role-based-access-control/"> role-based access control </a> to limit who can access your database, we recommend that you turn off default user access. </p> <p> To turn off the default user for a database: </p> <ol> <li> <p> From the database <strong> Configuration </strong> tab, select <strong> Edit database </strong> . </p> <a href="/docs/latest/images/rc/button-database-edit.png" sdata-lightbox="/images/rc/button-database-edit.png"> <img alt="The Edit database button lets you change the database's default user password." src="/docs/latest/images/rc/button-database-edit.png" width="150px"/> </a> </li> <li> <p> Under the <strong> Security </strong> section, select the <strong> Default User </strong> switch to turn it off. </p> </li> <li> <p> Select <strong> Save database </strong> . </p> <a href="/docs/latest/images/rc/button-database-save.png" sdata-lightbox="/images/rc/button-database-save.png"> <img alt="Use the Save database button to save the new password." src="/docs/latest/images/rc/button-database-save.png" width="150px"/> </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/operate/rc/security/access-control/data-access-control/default-user/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/commands/cms.query.html
<section class="prose w-full py-12"> <h1 class="command-name"> CMS.QUERY </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">CMS.QUERY key item [item ...]</pre> <dl class="grid grid-cols-[auto,1fr] gap-2 mb-12"> <dt class="font-semibold text-redis-ink-900 m-0"> Available in: </dt> <dd class="m-0"> <a href="/docs/stack"> Redis Stack </a> / <a href="/docs/data-types/probabilistic"> Bloom 2.0.0 </a> </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(n) where n is the number of items </dd> </dl> <p> Returns the count for one or more items in a sketch. </p> <h3 id="parameters"> Parameters: </h3> <ul> <li> <strong> key </strong> : The name of the sketch. </li> <li> <strong> item </strong> : One or more items for which to return the count. </li> </ul> <h2 id="return"> Return </h2> <p> Count of one or more items </p> <p> <a href="/docs/latest/develop/reference/protocol-spec/#arrays"> Array reply </a> of <a href="/docs/latest/develop/reference/protocol-spec/#integers"> Integer reply </a> with a min-count of each of the items in the sketch. </p> <h2 id="examples"> Examples </h2> <pre tabindex="0"><code>redis&gt; CMS.QUERY test foo bar 1) (integer) 10 2) (integer) 42 </code></pre> <br/> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/commands/cms.query/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/databases/auto-tiering/.html
<section class="prose w-full py-12 max-w-none"> <h1> Auto Tiering </h1> <p class="text-lg -mt-5 mb-10"> Auto Tiering enables your data to span both RAM and dedicated flash memory. </p> <p> Redis Enterprise's auto tiering offers users the unique ability to use solid state drives (SSDs) to extend databases beyond DRAM capacity. Developers can build applications that require large datasets using the same Redis API. Using SSDs can significantly reduce the infrastructure costs compared to only DRAM deployments. </p> <p> Frequently used data, called hot data, belongs in the fastest memory level to deliver a real-time user experience. Data that is accessed less frequently, called warm data, can be kept in a slightly slower memory tier. Redis Enterprise’s Auto tiering maintains hot data in DRAM, keeps warm data in SSDs, and transfers data between tiers automatically. </p> <p> Redis Enterprise’s auto tiering is based on a high-performance storage engine (Speedb) that manages the complexity of using SSDs and DRAM as the total available memory for databases in a Redis Enterprise cluster. This implementation offers a performance boost of up to 10k operations per second per core of the database, doubling the performance of Redis on Flash. </p> <p> Just like all-RAM databases, databases with Auto Tiering enabled are compatible with existing Redis applications. </p> <p> Auto Tiering is also supported on <a href="/docs/latest/operate/rc/"> Redis Cloud </a> and <a href="/docs/latest/operate/rs/"> Redis Enterprise Software for Kubernetes </a> . </p> <h2 id="use-cases"> Use cases </h2> <p> The benefits associated with Auto Tiering are dependent on the use case. </p> <p> Auto Tiering is ideal when your: </p> <ul> <li> working set is significantly smaller than your dataset (high RAM hit rate) </li> <li> average key size is smaller than average value size (all key names are stored in RAM) </li> <li> most recent data is the most frequently used (high RAM hit rate) </li> </ul> <p> Auto Tiering is not recommended for: </p> <ul> <li> Long key names (all key names are stored in RAM) </li> <li> Broad access patterns (any value could be pulled into RAM) </li> <li> Large working sets (working set is stored in RAM) </li> <li> Frequently moved data (moving to and from RAM too often can impact performance) </li> </ul> <p> Auto Tiering is not intended to be used for persistent storage. Redis Enterprise Software database persistent and ephemeral storage should be on different disks, either local or attached. </p> <h2 id="where-is-my-data"> Where is my data? </h2> <p> When using Auto Tiering, RAM storage holds: </p> <ul> <li> All keys (names) </li> <li> Key indexes </li> <li> Dictionaries </li> <li> Hot data (working set) </li> </ul> <p> All data is accessed through RAM. If a value in flash memory is accessed, it becomes part of the working set and is moved to RAM. These values are referred to as “hot data”. </p> <p> Inactive or infrequently accessed data is referred to as “warm data” and stored in flash memory. When more space is needed in RAM, warm data is moved from RAM to flash storage. </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 Auto Tiering with RediSearch, it’s important to note that RediSearch indexes are also stored in RAM. </div> </div> <h2 id="ram-to-flash-ratio"> RAM to Flash ratio </h2> <p> Redis Enterprise Software allows you to configure and tune the ratio of RAM-to-Flash for each database independently, optimizing performance for your specific use case. While this is an online operation requiring no downtime for your database, it is recommended to perform it during maintenance windows as data might move between tiers (RAM &lt;-&gt; Flash). </p> <p> The RAM limit cannot be smaller than 10% of the total memory. We recommend you keep at least 20% of all values in RAM. Do not set the RAM limit to 100%. </p> <h2 id="flash-memory"> Flash memory </h2> <p> Implementing Auto Tiering requires pre planning around memory and sizing. Considerations and requirements for Auto Tiering include: </p> <ul> <li> Flash memory must be locally attached (as opposed to network attached storage (NAS) and storage area networks (SAN)). </li> <li> Flash memory must be dedicated to Auto Tiering and not shared with other parts of the database, such as durability, binaries, or persistence. </li> <li> For the best performance, the SSDs should be NVMe based, but SATA can also be used. </li> <li> The available flash space must be greater than or equal to the total database size (RAM+Flash). The extra space accounts for write buffers and <a href="https://en.wikipedia.org/wiki/Write_amplification"> write amplification </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> The Redis Enterprise Software database persistent and ephemeral storage should be on different disks, either local or attached. </div> </div> <p> Once these requirements are met, you can create and manage both databases with Auto Tiering enabled and all-RAM databases in the same cluster. </p> <p> When you begin planning the deployment of an Auto Tiering enabled database in production, we recommend working closely with the Redis technical team for sizing and performance tuning. </p> <h3 id="cloud-environments"> Cloud environments </h3> <p> When running in a cloud environment: </p> <ul> <li> Flash memory is on the ephemeral SSDs of the cloud instance (for example the local NVMe of AWS i4i instnaces and Azure Lsv2 and Lsv3 series). </li> <li> Persistent database storage needs to be network attached (for example, AWS EBS for AWS). </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> We specifically recommend " <a href="https://aws.amazon.com/ec2/instance-types/#storage-optimized"> Storage Optimized I4i - High I/O Instances </a> " because of the performance of NVMe for flash memory. </div> </div> <h3 id="on-premises-environments"> On-premises environments </h3> <p> When you begin planning the deployment of Auto Tiering in production, we recommend working closely with the Redis technical team for sizing and performance tuning. </p> <p> On-premises environments support more deployment options than other environments such as: </p> <ul> <li> Using Redis Stack features: <ul> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/search/"> Search and query </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/json/"> JSON </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/timeseries/"> Time series </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/bloom/"> Probabilistic data structures </a> </li> </ul> </li> </ul> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> Enabling Auto Tiering for Active-Active distributed databases requires validating and getting the Redis technical team's approval first . </div> </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"> Warning: </div> Auto Tiering is not supported running on network attached storage (NAS), storage area network (SAN), or with local HDD drives. </div> </div> <h2 id="next-steps"> Next steps </h2> <ul> <li> <p> <a href="/docs/latest/operate/rs/references/metrics/auto-tiering/"> Auto Tiering metrics </a> </p> </li> <li> <p> <a href="/docs/latest/operate/rs/databases/auto-tiering/quickstart/"> Auto Tiering quick start </a> </p> </li> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage/"> Ephemeral and persistent storage </a> </p> </li> <li> <p> <a href="/docs/latest/operate/rs/installing-upgrading/install/plan-deployment/hardware-requirements/"> Hardware requirements </a> </p> </li> </ul> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/databases/auto-tiering/"/> <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/python/.html
<section class="prose w-full py-12 max-w-none"> <h1> RedisGears Python plugin </h1> <p class="text-lg -mt-5 mb-10"> The RedisGears Python plugin allows you to run RedisGears functions with Python. </p> <p> With the RedisGears Python plugin, you can write RedisGears functions in <a href="https://www.python.org/"> Python </a> and run them on a <a href="/docs/latest/operate/rs/"> Redis Enterprise </a> cluster. </p> <p> The Python plugin allows both batch processing and event-driven processing. </p> <p> Before you can run RedisGears with Python, you will need to <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/installing-redisgears/#install-redisgears"> install the RedisGears module and the Python plugin </a> on your Redis Enterprise cluster and <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/python/install/"> enable them for your database </a> . </p> <p> Once you have written your code, upload it to a node on your Redis Enterprise cluster. Use the <code> RG.PYEXECUTE </code> command with the <code> redis-cli </code> command-line tool to run your code. </p> <h2 id="more-info"> More info </h2> <ul> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/python/quickstart/"> RedisGears Python quick start </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/python/recipes/"> RedisGears recipes </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/gears-v1/python/"/> <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/syncer/.html
<section class="prose w-full py-12 max-w-none"> <h1> Syncer process </h1> <p class="text-lg -mt-5 mb-10"> Detailed information about the syncer process and its role in distributed databases. </p> <h2 id="syncer-process"> Syncer process </h2> <p> Each node in a cluster containing an instance of an Active-Active database hosts a process called the syncer. The syncer process: </p> <ol> <li> Connects to the proxy on another participating cluster </li> <li> Reads data from that database instance </li> <li> Writes the data to the local cluster's primary(master) shard </li> </ol> <p> Some replication capabilities are also included in <a href="/docs/latest/operate/oss_and_stack/management/replication/"> Redis Community Edition </a> . </p> <p> The primary (also known as master) shard at the top of the primary-replica tree creates a replication ID. This replication ID is identical for all replicas in that tree. When a new primary is appointed, the replication ID changes, but a partial sync from the previous ID is still possible. </p> <p> In a partial sync, the backlog of operations since the offset are transferred as raw operations. In a full sync, the data from the primary is transferred to the replica as an RDB file which is followed by a partial sync. </p> <p> Partial synchronization requires a backlog large enough to store the data operations until connection is restored. See <a href="/docs/latest/operate/rs/7.4/databases/active-active/manage/#replication-backlog"> replication backlog </a> for more info on changing the replication backlog size. </p> <h3 id="syncer-in-active-active-replication"> Syncer in Active-Active replication </h3> <p> In the case of an Active-Active database: </p> <ul> <li> Multiple past replication IDs and offsets are stored to allow for multiple syncs </li> <li> The <a href="/docs/latest/operate/rs/7.4/databases/active-active/manage/#replication-backlog"> Active-Active replication backlog </a> is also sent to the replica during a full sync. </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"> Warning: </div> Full sync triggers heavy data transfers between geo-replicated instances of an Active-Active database. </div> </div> <p> An Active-Active database uses partial synchronization in the following situations: </p> <ul> <li> Failover of primary shard to replica shard </li> <li> Restart or crash of replica shard that requires sync from primary </li> <li> Migrate replica shard to another node </li> <li> Migrate primary shard to another node as a replica using failover and replica migration </li> <li> Migrate primary shard and preserve roles using failover, replica migration, and second failover to return shard to primary </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> Synchronization of data from the primary shard to the replica shard is always a full synchronization. </div> </div> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/7.4/databases/active-active/syncer/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/redisvl/user-guide/.html
<section class="prose w-full py-12 max-w-none"> <h1> RedisVL user guide </h1> <p class="text-lg -mt-5 mb-10"> The RedisVL user guide </p> <nav> <a href="/docs/latest/integrate/redisvl/user-guide/get-started/"> Get started </a> <p> Get started with RedisVL </p> <a href="/docs/latest/integrate/redisvl/user-guide/query-filter/"> Query and filter </a> <p> Query and filter with RedisVL </p> <a href="/docs/latest/integrate/redisvl/user-guide/vectorizers/"> Vectorizers </a> <p> Supported vectorizers </p> <a href="/docs/latest/integrate/redisvl/user-guide/semantic-caching/"> Semantic caching </a> <p> Semantic caching with RedisVL </p> <a href="/docs/latest/integrate/redisvl/user-guide/json-v-hashes/"> JSON vs. hash storage </a> <p> Storing JSON and hashes with RedisVL </p> </nav> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/redisvl/user-guide/"/> <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/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis programming patterns </h1> <p class="text-lg -mt-5 mb-10"> Novel patterns for working with Redis data structures </p> <p> The following documents describe some novel development patterns you can use with Redis. </p> <nav> <a href="/docs/latest/develop/use/patterns/bulk-loading/"> Bulk loading </a> <p> Writing data in bulk using the Redis protocol </p> <a href="/docs/latest/develop/use/patterns/distributed-locks/"> Distributed Locks with Redis </a> <p> A distributed lock pattern with Redis </p> <a href="/docs/latest/develop/use/patterns/indexes/"> Secondary indexing </a> <p> Building secondary indexes in Redis </p> <a href="/docs/latest/develop/use/patterns/twitter-clone/"> Redis patterns example </a> <p> Learn several Redis patterns by building a Twitter clone </p> </nav> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/develop/use/patterns/"/> <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-2-18-releases/rs-6-2-18-58/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Enterprise Software release notes 6.2.18-58 (November 2022) </h1> <p class="text-lg -mt-5 mb-10"> UI support for custom REST API port. Added info level for troubleshooting redis_mgr. </p> <p> This is a maintenance release for ​ <a href="https://redis.com/redis-enterprise-software/download-center/software/"> ​Redis Enterprise Software version 6.2.18 </a> . </p> <p> The following table shows the MD5 checksums for the available packages: </p> <table> <thead> <tr> <th style="text-align:left"> Package </th> <th style="text-align:left"> MD5 checksum (6.2.18-58 November release) </th> </tr> </thead> <tbody> <tr> <td style="text-align:left"> Ubuntu 16 </td> <td style="text-align:left"> <code> 38d974c47004df0808b71c2bd5a96996 </code> </td> </tr> <tr> <td style="text-align:left"> Ubuntu 18 </td> <td style="text-align:left"> <code> 6a5ca7a287f1808a50d13312162aac4b </code> </td> </tr> <tr> <td style="text-align:left"> RedHat Enterprise Linux (RHEL) 7 <br/> Oracle Enterprise Linux (OL) 7 </td> <td style="text-align:left"> <code> d8283a3475a70823641249e3cfe3ab6e </code> </td> </tr> <tr> <td style="text-align:left"> RedHat Enterprise Linux (RHEL) 8 <br/> Oracle Enterprise Linux (OL) 8 </td> <td style="text-align:left"> <code> 040e45c866fde391b35ae85d648a4afa </code> </td> </tr> </tbody> </table> <h2 id="new-features-and-enhancements"> New features and enhancements </h2> <ul> <li> Added support to the UI to work with custom REST API port (RS84428) </li> <li> Added info level print to redis_mgr for troubleshooting (RS85385) </li> </ul> <h4 id="redis-modules"> Redis modules </h4> <p> Redis Enterprise Software v6.2.18-58 (November release) includes newer versions of the following Redis modules: </p> <ul> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-2.4-release-notes#v2414-august-2022"> RediSearch v2.4.14 </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisgraph/redisgraph-2.8-release-notes#v2819-august-2022"> RedisGraph v2.8.19 </a> </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> RS85369 - Fixes umask validation during installation to allow for temporary umask change </li> <li> RS77339 - Fixes the “FROM” email addresses of email alerts </li> <li> RS86005 - Fixes <code> bdbs/&lt;int:uid&gt;/actions/recover </code> API to return the bdb status and not the <code> recovery_plan </code> </li> </ul> <h2 id="known-upgrade-limitations"> Known upgrade limitations </h2> <p> Before you upgrade a cluster that hosts Active-Active databases with modules to v6.2.18, perform the following steps: </p> <ol> <li> <p> Use <code> crdb-cli </code> to verify that the modules ( <code> modules </code> ) and their versions (in <code> module_list </code> ) are as they appear in the database configuration and in the default database configuration: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">crdb-cli crdb get --crdb-guid &lt;crdb-guid&gt; </span></span></code></pre> </div> </li> <li> <p> From the admin console's <strong> redis modules </strong> tab, validate that these modules with their specific versions are loaded to the cluster. </p> </li> <li> <p> If one or more of the modules/versions are missing or if you need help, <a href="https://redis.com/company/support/"> contact Redis support </a> before taking additional steps. </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/release-notes/rs-6-2-18-releases/rs-6-2-18-58/"/> <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/save/.html
<section class="prose w-full py-12"> <h1 class="command-name"> SAVE </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">SAVE</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(N) where N is the total number of keys in all databases </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> SAVE </code> commands performs a <strong> synchronous </strong> save of the dataset producing a <em> point in time </em> snapshot of all the data inside the Redis instance, in the form of an RDB file. </p> <p> You almost never want to call <code> SAVE </code> in production environments where it will block all the other clients. Instead usually <a href="/docs/latest/commands/bgsave/"> <code> BGSAVE </code> </a> is used. However in case of issues preventing Redis to create the background saving child (for instance errors in the fork(2) system call), the <code> SAVE </code> command can be a good last resort to perform the dump of the latest dataset. </p> <p> See the <a href="/docs/latest/operate/oss_and_stack/management/persistence/"> persistence documentation </a> for detailed information. </p> <h2 id="resp2resp3-reply"> RESP2/RESP3 Reply </h2> <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/save/"/> <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/security/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis security </h1> <p class="text-lg -mt-5 mb-10"> Security model and features in Redis </p> <p> This document provides an introduction to the topic of security from the point of view of Redis. It covers the access control provided by Redis, code security concerns, attacks that can be triggered from the outside by selecting malicious inputs, and other similar topics. You can learn more about access control, data protection and encryption, secure Redis architectures, and secure deployment techniques by taking the <a href="https://university.redis.com/courses/ru330/"> Redis University security course </a> . </p> <p> For security-related contacts, open an issue on GitHub, or when you feel it is really important to preserve the security of the communication, use the GPG key at the end of this document. </p> <h2 id="security-model"> Security model </h2> <p> Redis is designed to be accessed by trusted clients inside trusted environments. This means that usually it is not a good idea to expose the Redis instance directly to the internet or, in general, to an environment where untrusted clients can directly access the Redis TCP port or UNIX socket. </p> <p> For instance, in the common context of a web application implemented using Redis as a database, cache, or messaging system, the clients inside the front-end (web side) of the application will query Redis to generate pages or to perform operations requested or triggered by the web application user. </p> <p> In this case, the web application mediates access between Redis and untrusted clients (the user browsers accessing the web application). </p> <p> In general, untrusted access to Redis should always be mediated by a layer implementing ACLs, validating user input, and deciding what operations to perform against the Redis instance. </p> <h2 id="network-security"> Network security </h2> <p> Access to the Redis port should be denied to everybody but trusted clients in the network, so the servers running Redis should be directly accessible only by the computers implementing the application using Redis. </p> <p> In the common case of a single computer directly exposed to the internet, such as a virtualized Linux instance (Linode, EC2, ...), the Redis port should be firewalled to prevent access from the outside. Clients will still be able to access Redis using the loopback interface. </p> <p> Note that it is possible to bind Redis to a single interface by adding a line like the following to the <strong> redis.conf </strong> file: </p> <pre><code>bind 127.0.0.1 </code></pre> <p> Failing to protect the Redis port from the outside can have a big security impact because of the nature of Redis. For instance, a single <a href="/commands/flushall"> <code> FLUSHALL </code> </a> command can be used by an external attacker to delete the whole data set. </p> <h2 id="protected-mode"> Protected mode </h2> <p> Unfortunately, many users fail to protect Redis instances from being accessed from external networks. Many instances are simply left exposed on the internet with public IPs. Since version 3.2.0, Redis enters a special mode called <strong> protected mode </strong> when it is executed with the default configuration (binding all the interfaces) and without any password in order to access it. In this mode, Redis only replies to queries from the loopback interfaces, and replies to clients connecting from other addresses with an error that explains the problem and how to configure Redis properly. </p> <p> We expect protected mode to seriously decrease the security issues caused by unprotected Redis instances executed without proper administration. However, the system administrator can still ignore the error given by Redis and disable protected mode or manually bind all the interfaces. </p> <h2 id="authentication"> Authentication </h2> <p> Redis provides two ways to authenticate clients. The recommended authentication method, introduced in Redis 6, is via Access Control Lists, allowing named users to be created and assigned fine-grained permissions. Read more about Access Control Lists <a href="/docs/latest/operate/oss_and_stack/management/security/acl/"> here </a> . </p> <p> The legacy authentication method is enabled by editing the <strong> redis.conf </strong> file, and providing a database password using the <code> requirepass </code> setting. This password is then used by all clients. </p> <p> When the <code> requirepass </code> setting is enabled, Redis will refuse any query by unauthenticated clients. A client can authenticate itself by sending the <strong> AUTH </strong> command followed by the password. </p> <p> The password is set by the system administrator in clear text inside the redis.conf file. It should be long enough to prevent brute force attacks for two reasons: </p> <ul> <li> Redis is very fast at serving queries. Many passwords per second can be tested by an external client. </li> <li> The Redis password is stored in the <strong> redis.conf </strong> file and inside the client configuration. Since the system administrator does not need to remember it, the password can be very long. </li> </ul> <p> The goal of the authentication layer is to optionally provide a layer of redundancy. If firewalling or any other system implemented to protect Redis from external attackers fail, an external client will still not be able to access the Redis instance without knowledge of the authentication password. </p> <p> Since the <a href="/commands/auth"> <code> AUTH </code> </a> command, like every other Redis command, is sent unencrypted, it does not protect against an attacker that has enough access to the network to perform eavesdropping. </p> <h2 id="tls-support"> TLS support </h2> <p> Redis has optional support for TLS on all communication channels, including client connections, replication links, and the Redis Cluster bus protocol. </p> <h2 id="disallowing-specific-commands"> Disallowing specific commands </h2> <p> It is possible to disallow commands in Redis or to rename them as an unguessable name, so that normal clients are limited to a specified set of commands. </p> <p> For instance, a virtualized server provider may offer a managed Redis instance service. In this context, normal users should probably not be able to call the Redis <strong> CONFIG </strong> command to alter the configuration of the instance, but the systems that provide and remove instances should be able to do so. </p> <p> In this case, it is possible to either rename or completely shadow commands from the command table. This feature is available as a statement that can be used inside the redis.conf configuration file. For example: </p> <pre><code>rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52 </code></pre> <p> In the above example, the <strong> CONFIG </strong> command was renamed into an unguessable name. It is also possible to completely disallow it (or any other command) by renaming it to the empty string, like in the following example: </p> <pre><code>rename-command CONFIG "" </code></pre> <h2 id="attacks-triggered-by-malicious-inputs-from-external-clients"> Attacks triggered by malicious inputs from external clients </h2> <p> There is a class of attacks that an attacker can trigger from the outside even without external access to the instance. For example, an attacker might insert data into Redis that triggers pathological (worst case) algorithm complexity on data structures implemented inside Redis internals. </p> <p> An attacker could supply, via a web form, a set of strings that are known to hash to the same bucket in a hash table in order to turn the O(1) expected time (the average time) to the O(N) worst case. This can consume more CPU than expected and ultimately cause a Denial of Service. </p> <p> To prevent this specific attack, Redis uses a per-execution, pseudo-random seed to the hash function. </p> <p> Redis implements the SORT command using the qsort algorithm. Currently, the algorithm is not randomized, so it is possible to trigger a quadratic worst-case behavior by carefully selecting the right set of inputs. </p> <h2 id="string-escaping-and-nosql-injection"> String escaping and NoSQL injection </h2> <p> The Redis protocol has no concept of string escaping, so injection is impossible under normal circumstances using a normal client library. The protocol uses prefixed-length strings and is completely binary safe. </p> <p> Since Lua scripts executed by the <a href="/commands/eval"> <code> EVAL </code> </a> and <a href="/commands/evalsha"> <code> EVALSHA </code> </a> commands follow the same rules, those commands are also safe. </p> <p> While it would be a strange use case, the application should avoid composing the body of the Lua script from strings obtained from untrusted sources. </p> <h2 id="code-security"> Code security </h2> <p> In a classical Redis setup, clients are allowed full access to the command set, but accessing the instance should never result in the ability to control the system where Redis is running. </p> <p> Internally, Redis uses all the well-known practices for writing secure code to prevent buffer overflows, format bugs, and other memory corruption issues. However, the ability to control the server configuration using the <strong> CONFIG </strong> command allows the client to change the working directory of the program and the name of the dump file. This allows clients to write RDB Redis files to random paths. This is <a href="http://antirez.com/news/96"> a security issue </a> that may lead to the ability to compromise the system and/or run untrusted code as the same user as Redis is running. </p> <p> Redis does not require root privileges to run. It is recommended to run it as an unprivileged <em> redis </em> user that is only used for this purpose. </p> <h2 id="gpg-key"> GPG key </h2> <pre tabindex="0"><code>-----BEGIN PGP PUBLIC KEY BLOCK----- mQINBF9FWioBEADfBiOE/iKpj2EF/cJ/KzFX+jSBKa8SKrE/9RE0faVF6OYnqstL S5ox/o+yT45FdfFiRNDflKenjFbOmCbAdIys9Ta0iq6I9hs4sKfkNfNVlKZWtSVG W4lI6zO2Zyc2wLZonI+Q32dDiXWNcCEsmajFcddukPevj9vKMTJZtF79P2SylEPq mUuhMy/jOt7q1ibJCj5srtaureBH9662t4IJMFjsEe+hiZ5v071UiQA6Tp7rxLqZ O6ZRzuamFP3xfy2Lz5NQ7QwnBH1ROabhJPoBOKCATCbfgFcM1Rj+9AOGfoDCOJKH 7yiEezMqr9VbDrEmYSmCO4KheqwC0T06lOLIQC4nnwKopNO/PN21mirCLHvfo01O H/NUG1LZifOwAURbiFNF8Z3+L0csdhD8JnO+1nphjDHr0Xn9Vff2Vej030pRI/9C SJ2s5fZUq8jK4n06sKCbqA4pekpbKyhRy3iuITKv7Nxesl4T/uhkc9ccpAvbuD1E NczN1IH05jiMUMM3lC1A9TSvxSqflqI46TZU3qWLa9yg45kDC8Ryr39TY37LscQk 9x3WwLLkuHeUurnwAk46fSj7+FCKTGTdPVw8v7XbvNOTDf8vJ3o2PxX1uh2P2BHs 9L+E1P96oMkiEy1ug7gu8V+mKu5PAuD3QFzU3XCB93DpDakgtznRRXCkAQARAQAB tBtSZWRpcyBMYWJzIDxyZWRpc0ByZWRpcy5pbz6JAk4EEwEKADgWIQR5sNCo1OBf WO913l22qvOUq0evbgUCX0VaKgIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAK CRC2qvOUq0evbpZaD/4rN7xesDcAG4ec895Fqzk3w74W1/K9lzRKZDwRsAqI+sAz ZXvQMtWSxLfF2BITxLnHJXK5P+2Y6XlNgrn1GYwC1MsARyM9e1AzwDJHcXFkHU82 2aALIMXGtiZs/ejFh9ZSs5cgRlxBSqot/uxXm9AvKEByhmIeHPZse/Rc6e3qa57v OhCkVZB4ETx5iZrgA+gdmS8N7MXG0cEu5gJLacG57MHi+2WMOCU9Xfj6+Pqhw3qc E6lBinKcA/LdgUJ1onK0JCnOG1YVHjuFtaisfPXvEmUBGaSGE6lM4J7lass/OWps Dd+oHCGI+VOGNx6AiBDZG8mZacu0/7goRnOTdljJ93rKkj31I+6+j4xzkAC0IXW8 LAP9Mmo9TGx0L5CaljykhW6z/RK3qd7dAYE+i7e8J9PuQaGG5pjFzuW4vY45j0V/ 9JUMKDaGbU5choGqsCpAVtAMFfIBj3UQ5LCt5zKyescKCUb9uifOLeeQ1vay3R9o eRSD52YpRBpor0AyYxcLur/pkHB0sSvXEfRZENQTohpY71rHSaFd3q1Hkk7lZl95 m24NRlrJnjFmeSPKP22vqUYIwoGNUF/D38UzvqHD8ltTPgkZc+Y+RRbVNqkQYiwW GH/DigNB8r2sdkt+1EUu+YkYosxtzxpxxpYGKXYXx0uf+EZmRqRt/OSHKnf2GLkC DQRfRVoqARAApffsrDNo4JWjX3r6wHJJ8IpwnGEJ2IzGkg8f1Ofk2uKrjkII/oIx sXC3EeauC1Plhs+m9GP/SPY0LXmZ0OzGD/S1yMpmBeBuXJ0gONDo+xCg1pKGshPs 75XzpbggSOtEYR5S8Z46yCu7TGJRXBMGBhDgCfPVFBBNsnG5B0EeHXM4trqqlN6d PAcwtLnKPz/Z+lloKR6bFXvYGuN5vjRXjcVYZLLCEwdV9iY5/Opqk9sCluasb3t/ c2gcsLWWFnNz2desvb/Y4ADJzxY+Um848DSR8IcdoArSsqmcCTiYvYC/UU7XPVNk Jrx/HwgTVYiLGbtMB3u3fUpHW8SabdHc4xG3sx0LeIvl+JwHgx7yVhNYJEyOQfnE mfS97x6surXgTVLbWVjXKIJhoWnWbLP4NkBc27H4qo8wM/IWH4SSXYNzFLlCDPnw vQZSel21qxdqAWaSxkKcymfMS4nVDhVj0jhlcTY3aZcHMjqoUB07p5+laJr9CCGv 0Y0j0qT2aUO22A3kbv6H9c1Yjv8EI7eNz07aoH1oYU6ShsiaLfIqPfGYb7LwOFWi PSl0dCY7WJg2H6UHsV/y2DwRr/3oH0a9hv/cvcMneMi3tpIkRwYFBPXEsIcoD9xr RI5dp8BBdO/Nt+puoQq9oyialWnQK5+AY7ErW1yxjgie4PQ+XtN+85UAEQEAAYkC NgQYAQoAIBYhBHmw0KjU4F9Y73XeXbaq85SrR69uBQJfRVoqAhsMAAoJELaq85Sr R69uoV0QAIvlxAHYTjvH1lt5KbpVGs5gwIAnCMPxmaOXcaZ8V0Z1GEU+/IztwV+N MYCBv1tYa7OppNs1pn75DhzoNAi+XQOVvU0OZgVJutthZe0fNDFGG9B4i/cxRscI Ld8TPQQNiZPBZ4ubcxbZyBinE9HsYUM49otHjsyFZ0GqTpyne+zBf1GAQoekxlKo tWSkkmW0x4qW6eiAmyo5lPS1bBjvaSc67i+6Bv5QkZa0UIkRqAzKN4zVvc2FyILz +7wVLCzWcXrJt8dOeS6Y/Fjbhb6m7dtapUSETAKu6wJvSd9ndDUjFHD33NQIZ/nL WaPbn01+e/PHtUDmyZ2W2KbcdlIT9nb2uHrruqdCN04sXkID8E2m2gYMA+TjhC0Q JBJ9WPmdBeKH91R6wWDq6+HwOpgc/9na+BHZXMG+qyEcvNHB5RJdiu2r1Haf6gHi Fd6rJ6VzaVwnmKmUSKA2wHUuUJ6oxVJ1nFb7Aaschq8F79TAfee0iaGe9cP+xUHL zBDKwZ9PtyGfdBp1qNOb94sfEasWPftT26rLgKPFcroCSR2QCK5qHsMNCZL+u71w NnTtq9YZDRaQ2JAc6VDZCcgu+dLiFxVIi1PFcJQ31rVe16+AQ9zsafiNsxkPdZcY U9XKndQE028dGZv1E3S5BwpnikrUkWdxcYrVZ4fiNIy5I3My2yCe =J9BD -----END PGP PUBLIC KEY BLOCK----- </code></pre> <nav> <a href="/docs/latest/operate/oss_and_stack/management/security/acl/"> ACL </a> <p> Redis Access Control List </p> <a href="/docs/latest/operate/oss_and_stack/management/security/encryption/"> TLS </a> <p> Redis TLS support </p> </nav> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/oss_and_stack/management/security/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rc/security/access-control/saml-sso/.html
<section class="prose w-full py-12 max-w-none"> <h1> SAML single sign-on </h1> <p class="text-lg -mt-5 mb-10"> Redis Cloud supports both IdP-initiated and SP-initiated single sign-on (SSO) with SAML (Security Assertion Markup Language). You can use any identity provider to integrate with Redis Cloud as long as it supports the SAML protocol, or you can refer to integration guides for a few specific providers. </p> <p> Redis Cloud supports both <a href="#idp-initiated-sso"> IdP-initiated </a> and <a href="#sp-initiated-sso"> SP-initiated </a> <a href="https://en.wikipedia.org/wiki/Single_sign-on"> single sign-on (SSO) </a> with <a href="https://en.wikipedia.org/wiki/Security_Assertion_Markup_Language"> SAML (Security Assertion Markup Language) </a> . </p> <p> You cannot use <a href="https://en.wikipedia.org/wiki/System_for_Cross-domain_Identity_Management"> SCIM (System for Cross-domain Identity Management) </a> to provision Redis Cloud users. However, Redis Cloud supports just-in-time (JIT) user provisioning, which means Redis Cloud automatically creates a user account the first time a new user signs in with SAML SSO. </p> <h2 id="saml-sso-overview"> SAML SSO overview </h2> <p> When SAML SSO is enabled, the <a href="https://en.wikipedia.org/wiki/Identity_provider"> identity provider (IdP) </a> admin handles SAML user management instead of the Redis Cloud account owner. </p> <p> You can use any identity provider to integrate with Redis Cloud as long as it supports the SAML protocol. You can also refer to these integration guides for several popular identity providers: </p> <ul> <li> <a href="/docs/latest/operate/rc/security/access-control/saml-sso/saml-integration-auth0/"> Auth0 SAML integration </a> </li> <li> <a href="/docs/latest/operate/rc/security/access-control/saml-sso/saml-integration-aws-identity-center/"> AWS IAM Identity Center SAML integration </a> </li> <li> <a href="/docs/latest/operate/rc/security/access-control/saml-sso/saml-integration-azure-ad/"> Azure Active Directory SAML integration </a> </li> <li> <a href="/docs/latest/operate/rc/security/access-control/saml-sso/saml-integration-google/"> Google Workspace integration </a> </li> <li> <a href="/docs/latest/operate/rc/security/access-control/saml-sso/saml-integration-okta-generic/"> Okta SAML integration (Generic) </a> </li> <li> <a href="/docs/latest/operate/rc/security/access-control/saml-sso/saml-integration-okta-org2org/"> Okta SAML integration (Org2Org) </a> </li> <li> <a href="/docs/latest/operate/rc/security/access-control/saml-sso/saml-integration-ping-identity/"> PingIdentity SAML integration </a> </li> </ul> <p> After you activate SAML SSO for a Redis Cloud account, all existing local users for the account, except for the user that set up SAML SSO, are converted to SAML users and are required to use SAML SSO to sign in. Before they can sign in to Redis Cloud, the identity provider admin needs to set up these users on the IdP side and configure the <code> redisAccountMapping </code> attribute to map them to the appropriate Redis Cloud accounts and <a href="/docs/latest/operate/rc/security/access-control/access-management/#team-management-roles"> roles </a> . </p> <h3 id="idp-initiated-sso"> IdP-initiated SSO </h3> <p> With IdP-initiated single sign-on, you can select the Redis Cloud application after you sign in to your <a href="https://en.wikipedia.org/wiki/Identity_provider"> identity provider (IdP) </a> . This redirects you to the <a href="https://cloud.redis.io/#/login"> Redis Cloud console </a> and signs you in to your SAML user account. </p> <h3 id="sp-initiated-sso"> SP-initiated SSO </h3> <p> You can also initiate single sign-on from the <a href="https://cloud.redis.io/#/login"> Redis Cloud console </a> . This process is known as <a href="https://en.wikipedia.org/wiki/Service_provider"> service provider (SP) </a> -initiated single sign-on. </p> <ol> <li> <p> From the Redis Cloud console's <a href="https://cloud.redis.io/#/login"> sign-in screen </a> , select <strong> SSO </strong> . </p> <a href="/docs/latest/images/rc/button-sign-in-sso.png" sdata-lightbox="/images/rc/button-sign-in-sso.png"> <img alt="Sign in with SSO button" src="/docs/latest/images/rc/button-sign-in-sso.png" width="150px"/> </a> </li> <li> <p> Enter the email address associated with your SAML user account. </p> </li> <li> <p> Select the <strong> Login </strong> button. </p> <ul> <li> <p> If you already have an active SSO session with your identity provider, this signs you in to your SAML user account. </p> </li> <li> <p> Otherwise, the SSO flow redirects you to your identity provider's sign in screen. Enter your IdP user credentials to sign in. This redirects you back to the Redis Cloud console and automatically signs in to your SAML user account. </p> </li> </ul> </li> </ol> <h3 id="multi-factor-authentication"> Multi-factor authentication </h3> <p> The account owner remains a local user and should set up <a href="/docs/latest/operate/rc/security/access-control/multi-factor-authentication/"> multi-factor authentication (MFA) </a> to help secure their account. After SAML activation, the account owner can set up additional local bypass users with MFA enabled. </p> <p> If MFA enforcement is enabled, note that Redis Cloud does not enforce MFA for SAML users since the identity provider handles MFA management and enforcement. </p> <h2 id="set-up-saml-sso"> Set up SAML SSO </h2> <p> To set up SAML single sign-on for a Redis Cloud account: </p> <ol> <li> <p> <a href="#verify-domain"> Verify domain ownership in Redis Cloud </a> . </p> </li> <li> <p> <a href="#set-up-app"> Set up a SAML app </a> to integrate Redis Cloud with your identity provider. </p> </li> <li> <p> <a href="#configure-idp"> Configure SAML identity provider in Redis Cloud </a> . </p> </li> <li> <p> <a href="#download-sp"> Download service provider metadata </a> and upload it to your identity provider. </p> </li> <li> <p> <a href="#activate-saml-sso"> Activate SAML SSO </a> . </p> </li> </ol> <h3 id="verify-domain"> Verify domain ownership in Redis Cloud </h3> <p> Before you set up SAML SSO in Redis Cloud, you must verify that you own the domain(s) associated with your SAML setup. </p> <ol> <li> <p> Sign in to <a href="https://cloud.redis.io/#/login"> Redis Cloud </a> with the email address associated with the SAML user you set up with your identity provider. </p> </li> <li> <p> Select <strong> Access Management </strong> from the <a href="https://cloud.redis.io"> Redis Cloud console </a> menu. </p> </li> <li> <p> Select <strong> Single Sign-On </strong> . </p> </li> <li> <p> Select the <strong> Setup SAML SSO </strong> button: </p> <a href="/docs/latest/images/rc/button-access-management-sso-setup.png" sdata-lightbox="/images/rc/button-access-management-sso-setup.png"> <img alt="Setup SSO button" src="/docs/latest/images/rc/button-access-management-sso-setup.png" width="120px"/> </a> </li> <li> <p> From the <strong> SAML </strong> screen of the <a href="https://cloud.redis.io"> Redis Cloud console </a> , you must verify you own the domains associated with your SAML configuration. Select <strong> Add domain </strong> to open the <strong> Manage domain bindings </strong> panel. </p> <a href="/docs/latest/images/rc/saml-button-add-domain.png" sdata-lightbox="/images/rc/saml-button-add-domain.png"> <img alt="Add domain button" src="/docs/latest/images/rc/saml-button-add-domain.png" width="120px"/> </a> <a href="/docs/latest/images/rc/saml-manage-domain-bindings.png" sdata-lightbox="/images/rc/saml-manage-domain-bindings.png"> <img alt="The Manage domain bindings panel" src="/docs/latest/images/rc/saml-manage-domain-bindings.png" width="80%"/> </a> </li> <li> <p> Select <strong> Copy </strong> to copy the provided TXT DNS record. For each domain you want to associate with your SAML setup, add the copied TXT record to its DNS records. </p> </li> <li> <p> Select <strong> Add domain </strong> to add a domain. </p> <a href="/docs/latest/images/rc/saml-button-add-domain.png" sdata-lightbox="/images/rc/saml-button-add-domain.png"> <img alt="Add domain button" src="/docs/latest/images/rc/saml-button-add-domain.png" width="120px"/> </a> </li> <li> <p> Enter the domain name and select <a href="/docs/latest/images/rc/saml-button-confirm.png#no-click" sdata-lightbox="/images/rc/saml-button-confirm.png#no-click"> <img alt="The confirm domain button" class="inline" src="/docs/latest/images/rc/saml-button-confirm.png#no-click" width="20px"/> </a> to save it, or select <a href="/docs/latest/images/rc/saml-button-cancel.png#no-click" sdata-lightbox="/images/rc/saml-button-cancel.png#no-click"> <img alt="The cancel button" class="inline" src="/docs/latest/images/rc/saml-button-cancel.png#no-click" width="20px"/> </a> to cancel. </p> <a href="/docs/latest/images/rc/saml-enter-domain.png" sdata-lightbox="/images/rc/saml-enter-domain.png"> <img alt="Enter domain name in the Domain field." src="/docs/latest/images/rc/saml-enter-domain.png" width="80%"/> </a> </li> <li> <p> After you save the domain name, its status is <strong> Pending </strong> . Select <strong> Verify </strong> to verify it. </p> <a href="/docs/latest/images/rc/saml-domain-pending.png" sdata-lightbox="/images/rc/saml-domain-pending.png"> <img alt="The Manage domain bindings panel, with a pending domain" src="/docs/latest/images/rc/saml-domain-pending.png" width="80%"/> </a> <p> We'll check the domain's DNS records for the provided TXT record. If the TXT record does not exist or we can't resolve your domain, we won't be able to verify the domain and users with that domain won't be able to sign in using SAML SSO. </p> <p> Select <a href="/docs/latest/images/rc/saml-button-delete-domain.png#no-click" sdata-lightbox="/images/rc/saml-button-delete-domain.png#no-click"> <img alt="The delete domain button" class="inline" src="/docs/latest/images/rc/saml-button-delete-domain.png#no-click" width="25px"/> </a> to delete a domain if it was added by mistake. </p> <p> If we find the TXT record, the domain's status will change to <strong> Verified </strong> . </p> <a href="/docs/latest/images/rc/saml-domain-verified.png" sdata-lightbox="/images/rc/saml-domain-verified.png"> <img alt="The Manage domain bindings panel, with a verified domain" src="/docs/latest/images/rc/saml-domain-verified.png" width="80%"/> </a> <p> You can select <strong> Add domain </strong> to add another domain. </p> </li> <li> <p> Select <strong> Close </strong> to close the domain binding panel. </p> <a href="/docs/latest/images/rc/saml-button-close.png" sdata-lightbox="/images/rc/saml-button-close.png"> <img alt="Close button" src="/docs/latest/images/rc/saml-button-close.png" width="100px"/> </a> </li> </ol> <p> After you verify at least one domain, you can select <strong> Manage domains </strong> to open the <strong> Manage domain bindings </strong> panel again and add or verify more domains. </p> <h3 id="set-up-app"> Set up SAML app </h3> <p> Set up a SAML app to integrate Redis Cloud with your identity provider: </p> <ol> <li> <p> Sign in to your identity provider's admin console. </p> </li> <li> <p> Create or add a SAML integration app for the service provider Redis Cloud. </p> </li> <li> <p> Set up your SAML service provider app so the SAML assertion contains the following attributes: </p> <table> <thead> <tr> <th> Attribute name <br/> (case-sensitive) </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> FirstName </td> <td> User's first name </td> </tr> <tr> <td> LastName </td> <td> User's last name </td> </tr> <tr> <td> Email </td> <td> User's email address (used as the username in the Redis Cloud console) </td> </tr> <tr> <td> redisAccountMapping </td> <td> Key-value pair of a lowercase <a href="/docs/latest/operate/rc/security/access-control/access-management/#team-management-roles"> role name </a> (owner, member, manager, billing_admin, or viewer) and the user's Redis Cloud <strong> Account number </strong> found in the <a href="/docs/latest/operate/rc/accounts/account-settings/"> account settings </a> </td> </tr> </tbody> </table> <p> For <code> redisAccountMapping </code> , you can add the same user to multiple SAML-enabled accounts using one of these options: </p> <ul> <li> <p> A single string that contains a comma-separated list of account/role pairs </p> <div class="highlight"> <pre class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="nt">&lt;saml2:Attribute</span> <span class="na">Name=</span><span class="s">"redisAccountMapping"</span> <span class="na">NameFormat=</span><span class="s">"urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"</span><span class="nt">&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;saml2:AttributeValue</span> <span class="na">xsi:type=</span><span class="s">"xs:string"</span> <span class="na">xmlns:xs=</span><span class="s">"http://www.w3.org/2001/XMLSchema"</span> <span class="na">xmlns:xsi=</span><span class="s">"http://www.w3.org/2001/XMLSchema-instance"</span><span class="nt">&gt;</span> </span></span><span class="line"><span class="cl"> 12345=owner,54321=manager </span></span><span class="line"><span class="cl"> <span class="nt">&lt;/saml2:AttributeValue&gt;</span> </span></span><span class="line"><span class="cl"><span class="nt">&lt;/saml2:Attribute&gt;</span> </span></span></code></pre> </div> </li> <li> <p> Multiple strings, where each represents a single account/role pair </p> <div class="highlight"> <pre class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="nt">&lt;saml2:Attribute</span> <span class="na">Name=</span><span class="s">"redisAccountMapping"</span> <span class="na">NameFormat=</span><span class="s">"urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"</span><span class="nt">&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;saml2:AttributeValue</span> <span class="na">xsi:type=</span><span class="s">"xs:string"</span> <span class="na">xmlns:xs=</span><span class="s">"http://www.w3.org/2001/XMLSchema"</span> <span class="na">xmlns:xsi=</span><span class="s">"http://www.w3.org/2001/XMLSchema-instance"</span><span class="nt">&gt;</span> </span></span><span class="line"><span class="cl"> 12345=owner </span></span><span class="line"><span class="cl"> <span class="nt">&lt;/saml2:AttributeValue&gt;</span> </span></span><span class="line"><span class="cl"> <span class="nt">&lt;saml2:AttributeValue</span> <span class="na">xsi:type=</span><span class="s">"xs:string"</span> <span class="na">xmlns:xs=</span><span class="s">"http://www.w3.org/2001/XMLSchema"</span> <span class="na">xmlns:xsi=</span><span class="s">"http://www.w3.org/2001/XMLSchema-instance"</span><span class="nt">&gt;</span> </span></span><span class="line"><span class="cl"> 54321=manager </span></span><span class="line"><span class="cl"> <span class="nt">&lt;/saml2:AttributeValue&gt;</span> </span></span><span class="line"><span class="cl"><span class="nt">&lt;/saml2:Attribute&gt;</span> </span></span></code></pre> </div> </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> To confirm the identity provider's SAML assertions contain the required attributes, you can use a SAML-tracer web developer tool to inspect them. </div> </div> </li> <li> <p> Set up any additional configuration required by your identity provider to ensure you can configure the <code> redisAccountMapping </code> attribute for SAML users. </p> <p> If your identity provider lets you configure custom attributes with workflows or group rules, you can set up automation to configure the <code> redisAccountMapping </code> field automatically instead of manually. </p> </li> </ol> <h3 id="configure-idp"> Configure SAML in Redis Cloud </h3> <p> After you set up the SAML integration app and create a SAML user in your identity provider, you need to configure your Redis Cloud account to set up SAML SSO. </p> <ol> <li> <p> Sign in to <a href="https://cloud.redis.io/#/login"> Redis Cloud </a> with the email address associated with the SAML user you set up with your identity provider. </p> </li> <li> <p> Select <strong> Access Management </strong> from the <a href="https://cloud.redis.io"> Redis Cloud console </a> menu. </p> </li> <li> <p> Select <strong> Single Sign-On </strong> . </p> </li> <li> <p> <a href="#verify-domain"> Verify at least one domain </a> if you haven't. </p> </li> <li> <p> Configure the <strong> Identity Provider metadata </strong> settings. </p> <a href="/docs/latest/images/rc/access-management-saml-config.png" sdata-lightbox="/images/rc/access-management-saml-config.png"> <img alt="SAML Single Sign-On configuration screen." src="/docs/latest/images/rc/access-management-saml-config.png"/> </a> <p> To do so, you need the following metadata values from your identity provider: </p> <table> <thead> <tr> <th> Setting </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <strong> Issuer (IdP entity ID) </strong> </td> <td> The unique entity ID for the identity provider </td> </tr> <tr> <td> <strong> IdP server URL </strong> </td> <td> The identity provider's HTTPS URL for SAML SSO </td> </tr> <tr> <td> <strong> Single logout URL </strong> </td> <td> The URL used to sign out of the identity provider and connected apps (optional) </td> </tr> <tr> <td> <strong> Assertion signing certificate </strong> </td> <td> Public SHA-256 certificate used to validate SAML assertions from the identity provider </td> </tr> </tbody> </table> <p> To find these metadata values, see your identity provider's documentation. </p> </li> <li> <p> Select <strong> Enable </strong> . </p> <a href="/docs/latest/images/rc/saml-enable-button.png" sdata-lightbox="/images/rc/saml-enable-button.png"> <img alt="Enable button" src="/docs/latest/images/rc/saml-enable-button.png" width="100px"/> </a> </li> <li> <p> From the <strong> SAML activation </strong> dialog box, select <strong> Continue </strong> . </p> </li> </ol> <h3 id="download-sp"> Download service provider metadata </h3> <p> Next, you need to download the service provider metadata for Redis Cloud and use it to finish configuring the SAML integration app for your identity provider: </p> <ol> <li> <p> Select the <strong> Download </strong> button to download the service provider <a href="https://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf"> metadata </a> in XML format. </p> </li> <li> <p> Sign in to your identity provider's admin console. </p> </li> <li> <p> Configure the Redis Cloud service provider app with the downloaded XML. </p> <ul> <li> <p> Some identity providers let you upload the XML file directly. </p> </li> <li> <p> Others require you to manually configure the service provider app with specific metadata fields, such as: </p> <table> <thead> <tr> <th> XML attribute </th> <th> Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> EntityDescriptor's <strong> entityID </strong> </td> <td> https:// <nobr> auth.redis.com </nobr> /saml2/ <nobr> service-provider </nobr> /&lt;ID&gt; </td> <td> Unique URL that identifies the Redis Cloud service provider </td> </tr> <tr> <td> AssertionConsumerService's <strong> Location </strong> </td> <td> <nobr> https:// </nobr> <nobr> auth.redis.com </nobr> /sso/saml2/&lt;ID&gt; </td> <td> The service provider endpoint where the identity provider sends a SAML assertion that authenticates a user </td> </tr> </tbody> </table> </li> <li> <p> To use <a href="#idp-initiated-sso"> IdP-initiated SSO </a> with certain identity providers, you also need to set the RelayState parameter to the following URL: </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">https://cloud.redis.io/#/login/?idpId<span class="o">=</span>&lt;ID&gt; </span></span></code></pre> </div> <blockquote> <p> Replace <code> &lt;ID&gt; </code> so it matches the <code> AssertionConsumerService Location </code> URL's ID. </p> </blockquote> </li> </ul> <p> To learn more about how to configure service provider apps, see your identity provider's documentation. </p> </li> </ol> <h3 id="activate-saml-sso"> Activate SAML SSO </h3> <p> After you finish the required SAML SSO configuration between your identity provider and Redis Cloud account, you can test and activate SAML SSO. </p> <p> All users associated with the account, excluding the local user you used to set up SAML SSO, are converted to SAML users on successful activation. They can no longer sign in with their previous sign-in method and must use SAML SSO instead. However, you can add local bypass users after SAML SSO activation to allow access to the account in case of identity provider downtime or other issues with SAML SSO. </p> <p> To activate SAML SSO: </p> <ol> <li> <p> Sign out of any active SSO sessions with your identity provider. </p> </li> <li> <p> For <strong> Activate SAML integration </strong> , select the <strong> Activate </strong> button. </p> </li> <li> <p> From the <strong> Logout notification </strong> dialog, select <strong> Continue </strong> . This redirects you to your configured identity provider's sign-in screen. </p> </li> <li> <p> Sign in with your identity provider. </p> </li> <li> <p> When redirected to the Redis Cloud sign-in screen, you can either: </p> <ul> <li> <p> Sign in with your local credentials as usual. </p> </li> <li> <p> Select <strong> SSO </strong> and enter the email address associated with the SAML user configured in your identity provider. Your user converts to a SAML user in Redis Cloud. Don't use this method if you want your user account to remain a local bypass user. </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> If you see a <strong> SAML activation failed </strong> notification when redirected to the Redis Cloud sign-in screen, sign in with your local user credentials and review the SAML configuration for issues. </div> </div> </li> </ol> <p> After you activate SAML SSO, <a href="/docs/latest/operate/rc/security/access-control/access-management/#manage-team-access"> add a few local bypass users </a> from the <strong> Team </strong> tab. Local bypass users should <a href="/docs/latest/operate/rc/security/access-control/multi-factor-authentication/"> set up MFA </a> for additional security. </p> <h2 id="update-config"> Update configuration </h2> <p> If you change certain metadata or configuration settings after you set up SAML SSO, such as the assertion signing certificate, remember to do the following: </p> <ol> <li> <p> <a href="#configure-idp"> Update the SAML SSO configuration </a> with the new values. </p> </li> <li> <p> <a href="#download-sp"> Download the updated service provider metadata </a> and use it to update the Redis Cloud service provider app. </p> </li> </ol> <h2 id="link-other-accounts"> Link other accounts </h2> <p> After you set up SAML SSO for one account, you can link other accounts you own to the existing SAML configuration. This lets you use the same SAML configuration for SSO across multiple accounts. </p> <p> To link other accounts to an existing SAML SSO configuration: </p> <ol> <li> <p> Sign in to the <a href="cloud.redis.io"> Redis Cloud console </a> with the account that has an existing SAML configuration. </p> </li> <li> <p> Go to <strong> Access Management &gt; Single Sign-On </strong> . </p> </li> <li> <p> Select <strong> Get token </strong> . </p> <a href="/docs/latest/images/rc/saml/popup-saml-get-token.png" sdata-lightbox="/images/rc/saml/popup-saml-get-token.png"> <img alt="Get Token popup" src="/docs/latest/images/rc/saml/popup-saml-get-token.png"/> </a> <p> Select <strong> Copy </strong> to copy the linking token. </p> </li> <li> <p> Sign in to the account that you want to link to the SAML configuration. Go to <strong> Access Management &gt; Single Sign-On </strong> and then enter the copied token into the <strong> Join an existing SAML configuration </strong> text box. Select the arrow to confirm. </p> <p> After you do this, the owner of the original account will receive a request to link the new account to the SAML configuration. </p> </li> <li> <p> Sign in with the original account and select <strong> Access Management &gt; Single Sign-On </strong> . You should see the new account in the <strong> Unlinked accounts </strong> list. </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 see and interact with the Redis Cloud account in the <strong> Unlinked accounts </strong> list, you must be an owner of the account. If you are not an owner, the account will not be displayed in the section. </div> </div> </li> <li> <p> Select <strong> Link account </strong> . </p> <a href="/docs/latest/images/rc/saml/button-saml-link-account.png" sdata-lightbox="/images/rc/saml/button-saml-link-account.png"> <img alt="The Link Account button" src="/docs/latest/images/rc/saml/button-saml-link-account.png"/> </a> </li> <li> <p> In the <strong> Convert existing users </strong> dialog, select <strong> Confirm conversion </strong> to finish linking the accounts. </p> <a href="/docs/latest/images/rc/saml/popup-saml-convert-users.png" sdata-lightbox="/images/rc/saml/popup-saml-convert-users.png"> <img alt="The Convert users popup" src="/docs/latest/images/rc/saml/popup-saml-convert-users.png"/> </a> </li> </ol> <h2 id="deactivate-saml-sso"> Deactivate SAML SSO </h2> <p> Before you can deactivate SAML SSO for an account, you must sign in to the account as a local (non-SAML) user with the owner role assigned. </p> <p> Deactivating SAML SSO for an account also removes any existing SAML-type users associated with the account. </p> <p> To deactivate SAML SSO for a specific account: </p> <ol> <li> <p> In the <a href="https://cloud.redis.io"> Redis Cloud console </a> , select your name to display your available accounts. </p> </li> <li> <p> If the relevant account is not already selected, select it from the <strong> Switch account </strong> list. </p> </li> <li> <p> Go to <strong> Access Management &gt; Single Sign-On </strong> . </p> </li> <li> <p> Select <strong> Deactivate SAML </strong> . This only deactivates SAML SSO for the current account. Other linked accounts continue to use this SAML SSO configuration. </p> </li> <li> <p> Select <strong> Deactivate </strong> to confirm deactivation. </p> </li> </ol> <h2 id="deprovision-saml-users"> Deprovision SAML users </h2> <p> When a user is removed from your identity provider, their access to Redis Cloud should also be removed. </p> <p> When you have revoked a user’s access to Redis Cloud, they cannot access the Redis Cloud console, but their API keys remain active. You can <a href="/docs/latest/operate/rc/api/get-started/manage-api-keys/#delete-a-user-key"> delete an API key </a> to remove access. </p> <p> To deprovision SAML users upon deletion, the identity provider admin can set up a webhook to automatically make the appropriate Cloud API requests. For more information about managing users with API requests, see <a href="https://api.redislabs.com/v1/swagger-ui.html#/Users"> Users </a> in the Redis Cloud API documentation. </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rc/security/access-control/saml-sso/"/> <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-list-contexts/.html
<section class="prose w-full py-12 max-w-none"> <h1> redis-di list-contexts </h1> <p class="text-lg -mt-5 mb-10"> Lists all saved contexts </p> <h2 id="usage"> Usage </h2> <pre tabindex="0"><code>Usage: redis-di list-contexts [OPTIONS] </code></pre> <h2 id="options"> Options </h2> <ul> <li> <p> <code> help </code> : </p> <ul> <li> Type: BOOL </li> <li> Default: <code> false </code> </li> <li> Usage: <code> --help </code> </li> </ul> <p> Show this message and exit. </p> </li> </ul> <h2 id="cli-help"> CLI help </h2> <pre tabindex="0"><code>Usage: redis-di list-contexts [OPTIONS] Lists all saved contexts Options: --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-list-contexts/"/> <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.dropindex/.html
<section class="prose w-full py-12"> <h1 class="command-name"> FT.DROPINDEX </h1> <div class="font-semibold text-redis-ink-900"> Syntax </div> <pre class="command-syntax">FT.DROPINDEX index [DD] </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 2.0.0 </a> </dd> <dt class="font-semibold text-redis-ink-900 m-0"> Time complexity: </dt> <dd class="m-0"> O(1) or O(N) if documents are deleted, where N is the number of keys in the keyspace </dd> </dl> <p> Delete an index </p> <p> <a href="#examples"> Examples </a> </p> <h2 id="required-arguments"> Required arguments </h2> <details open=""> <summary> <code> index </code> </summary> <p> is full-text index name. You must first create the index using <a href="/docs/latest/commands/ft.create/"> <code> FT.CREATE </code> </a> . </p> </details> <h2 id="optional-arguments"> Optional arguments </h2> <details open=""> <summary> <code> DD </code> </summary> <p> drop index operation that, if set, deletes the actual document keys. <code> FT.DROPINDEX index DD </code> is an asynchronous operation. </p> <p> By default, FT.DROPINDEX does not delete the documents associated with the index. Adding the <code> DD </code> option deletes the documents as well. If an index creation is still running ( <a href="/docs/latest/commands/ft.create/"> <code> FT.CREATE </code> </a> is running asynchronously), only the document hashes that have already been indexed are deleted. The document hashes left to be indexed remain in the database. To check the completion of the indexing, use <a href="/docs/latest/commands/ft.info/"> <code> FT.INFO </code> </a> . </p> </details> <h2 id="return"> Return </h2> <p> FT.DROPINDEX returns a simple string reply <code> OK </code> if executed correctly, or an error reply otherwise. </p> <h2 id="examples"> Examples </h2> <details open=""> <summary> <b> Delete an index </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.DROPINDEX idx DD </span></span><span class="line"><span class="cl">OK</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.info/"> <code> FT.INFO </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.dropindex/"/> <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/configuration-guide/.html
<section class="prose w-full py-12 max-w-none"> <h1> Write-behind configuration guide </h1> <p class="text-lg -mt-5 mb-10"> Configure write-behind to your database </p> <p> This guide shows you how to configure write-behind target connections. </p> <h2 id="overview"> Overview </h2> <p> Write-behind target connections are the connections established between a Write-behind instance and a target database in a <a href="/docs/latest/integrate/write-behind/quickstart/write-behind-guide/"> write-behind scenario </a> . Write-behind is used to replicate changes captured in a Write-behind-enabled Redis Enterprise database to a target database. The connections must be configured in the <code> config.yaml </code> before deploying any jobs and must follow one of the formats shown below. Multiple connections can be specified in the <code> connections </code> section. </p> <h3 id="for-relational-datastores"> For relational datastores </h3> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">connections</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">my-sql-datastore</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;db-type&gt; </span><span class="w"> </span><span class="c"># mysql | oracle | postgresql | sqlserver</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;db-host&gt; </span><span class="w"> </span><span class="c"># IP address or FQDN of a database host and instance</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;db-port&gt; </span><span class="w"> </span><span class="c"># database port</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;db-name&gt;</span><span class="w"> </span><span class="c"># name of the database</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">user</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;db-user&gt; </span><span class="w"> </span><span class="c"># database user</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;db-password&gt;</span><span class="w"> </span><span class="c"># database password</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># connect_args: # optional connection parameters passed to the driver - these are driver specific</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># query_args: # optional parameters for SQL query execution - typically not required for Write-behind operation</span><span class="w"> </span></span></span></code></pre> </div> <h3 id="for-non-relational-datastores"> For non-relational datastores </h3> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">connections</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">my-nosql-datastore</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;db-type&gt; </span><span class="w"> </span><span class="c"># cassandra</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">hosts</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;db-hosts&gt; </span><span class="w"> </span><span class="c"># array of IP addresses or host names of a datastore nodes</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;db-port&gt; </span><span class="w"> </span><span class="c"># database port</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;db-name&gt;</span><span class="w"> </span><span class="c"># name of the database</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">user</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;db-user&gt; </span><span class="w"> </span><span class="c"># database user</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="l">&lt;db-password&gt;</span><span class="w"> </span><span class="c"># database password</span><span class="w"> </span></span></span></code></pre> </div> <h2 id="microsoft-sql-server"> Microsoft SQL Server </h2> <p> Microsoft SQL Server supports different authentication mechanisms (SQL Server Authentication and Integrated Windows Authentication) and protocols (NTLM and Kerberos). Write-behind can use all of them. However, systems that use Kerberos may require some additional configuration. </p> <h3 id="account-permissions"> Account permissions </h3> <p> To enable Write-behind to work with a SQL Server database, check that the account you specify was assigned at least the <code> db_datawriter </code> role. </p> <h3 id="sql-server-authentication"> SQL Server authentication </h3> <p> To use SQL Server authentication mode, create a user with login credentials and then assign the necessary permissions for the target database to that user. </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">connections</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">mssql2019-sqlauth</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">sqlserver</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="l">ip-10-0-0-5.internal</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="m">1433</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="l">rdi_wb_database</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">user</span><span class="p">:</span><span class="w"> </span><span class="l">rdi_user</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="l">secret</span><span class="w"> </span></span></span></code></pre> </div> <h3 id="windows-authentication"> Windows authentication </h3> <p> To use Windows authentication mode, you need to create a Windows or Active Directory account that has the necessary permissions to access the target database, and is able to log into SQL Server. The Linux machine hosting Write-behind can be configured to support the NTLM authentication protocol. </p> <p> For NTLM: </p> <div class="highlight"> <pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">connections</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">mssql2019-ntlm</span><span class="p">:</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">sqlserver</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="l">ip-10-0-0-5.internal</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="m">1433</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="l">rdi_wb_database</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">user</span><span class="p">:</span><span class="w"> </span><span class="l">MYDOMAIN\rdi_service_account </span><span class="w"> </span><span class="c"># company-domain\service-account</span><span class="w"> </span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="l">secret </span><span class="w"> </span><span class="c"># NTLM requires to provide a password</span><span class="w"> </span></span></span></code></pre> </div> <blockquote> <p> Note: User must be specified with the domain name for Windows Authentication to work correctly. </p> </blockquote> <p> After you configure the Write-behind connection and deploy the write-behind job, run the following SQL query to have the operator check if Write-behind is using the expected authentication mechanism and protocol. Note: this operation may require the <code> sysadmin </code> role. </p> <div class="highlight"> <pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w"> </span><span class="n">session_id</span><span class="p">,</span><span class="w"> </span><span class="n">auth_scheme</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">sys</span><span class="p">.</span><span class="n">dm_exec_connections</span><span class="p">;</span><span class="w"> </span></span></span></code></pre> </div> <p> The results indicate which <code> auth_scheme </code> is used by each session and may take values <code> SQL </code> , <code> NTLM </code> , and <code> Kerberos </code> . </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/write-behind/configuration-guide/"/> <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/install/plan-deployment/file-locations/.html
<section class="prose w-full py-12 max-w-none"> <h1> File locations </h1> <p class="text-lg -mt-5 mb-10"> Redis Enterprise Software file installation locations. </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> To ensure that Redis Enterprise Software functions properly, be careful with the files in the application directories. If you modify or delete the application files, Redis Enterprise Software might not work as expected. </div> </div> <h2 id="application-directories"> Application directories </h2> <p> The directories that Redis Enterprise Software installs into are: </p> <table> <thead> <tr> <th> <strong> Path </strong> </th> <th> <strong> Description </strong> </th> </tr> </thead> <tbody> <tr> <td> /opt/redislabs </td> <td> Main installation directory for all Redis Enterprise Software binaries </td> </tr> <tr> <td> /opt/redislabs/bin </td> <td> Binaries for all the utilities for command-line access and management, such as <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/rladmin/"> <code> rladmin </code> </a> or <a href="/docs/latest/operate/rs/7.4/references/cli-utilities/redis-cli/"> <code> redis-cli </code> </a> </td> </tr> <tr> <td> /opt/redislabs/config </td> <td> System configuration files </td> </tr> <tr> <td> /opt/redislabs/lib </td> <td> System library files </td> </tr> <tr> <td> /opt/redislabs/sbin </td> <td> System binaries for tweaking provisioning </td> </tr> </tbody> </table> <h2 id="configuration-and-data-directories"> Configuration and data directories </h2> <p> The default directories that Redis Enterprise Software uses for data and metadata are: </p> <table> <thead> <tr> <th> <strong> Path </strong> </th> <th> <strong> Description </strong> </th> </tr> </thead> <tbody> <tr> <td> /var/opt/redislabs </td> <td> Default storage location for the cluster data, system logs, backups, and ephemeral, persisted data </td> </tr> <tr> <td> /var/opt/redislabs/log </td> <td> System logs for Redis Enterprise Software </td> </tr> <tr> <td> /var/opt/redislabs/run </td> <td> Socket files for Redis Enterprise Software </td> </tr> <tr> <td> /etc/opt/redislabs </td> <td> Default location for cluster manager configuration and certificates </td> </tr> <tr> <td> /tmp </td> <td> Temporary files </td> </tr> </tbody> </table> <p> You can change these file locations for: </p> <ul> <li> <a href="/docs/latest/operate/rs/7.4/clusters/new-cluster-setup/"> Ephemeral and persistence storage </a> during cluster setup </li> <li> <a href="/docs/latest/operate/rs/7.4/installing-upgrading/configuring/change-location-socket-files/"> Socket files </a> after cluster setup </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/installing-upgrading/install/plan-deployment/file-locations/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/integrate/redisvl/api/vectorizer/.html
<section class="prose w-full py-12 max-w-none"> <h1> Vectorizers </h1> <p class="text-lg -mt-5 mb-10"> The vectorizer APIs </p> <h2 id="hftextvectorizer"> HFTextVectorizer </h2> <p> <a id="hftextvectorizer-api"> </a> </p> <h3 id="class-hftextvectorizermodelsentence-transformersall-mpnet-base-v2--dims-clientnone"> <em> class </em> HFTextVectorizer(model='sentence-transformers/all-mpnet-base-v2', *, dims, client=None) </h3> <p> Bases: <code> BaseVectorizer </code> </p> <p> The HFTextVectorizer class is designed to leverage the power of Hugging Face’s Sentence Transformers for generating text embeddings. This vectorizer is particularly useful in scenarios where advanced natural language processing and understanding are required, and ideal for running on your own hardware (for free). </p> <p> Utilizing this vectorizer involves specifying a pre-trained model from Hugging Face’s vast collection of Sentence Transformers. These models are trained on a variety of datasets and tasks, ensuring versatility and robust performance across different text embedding needs. Additionally, make sure the sentence-transformers library is installed with pip install sentence-transformers==2.2.2. </p> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="c1"># Embedding a single text</span> </span></span><span class="line"><span class="cl"><span class="n">vectorizer</span> <span class="o">=</span> <span class="n">HFTextVectorizer</span><span class="p">(</span><span class="n">model</span><span class="o">=</span><span class="s2">"sentence-transformers/all-mpnet-base-v2"</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="n">embedding</span> <span class="o">=</span> <span class="n">vectorizer</span><span class="o">.</span><span class="n">embed</span><span class="p">(</span><span class="s2">"Hello, world!"</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># Embedding a batch of texts</span> </span></span><span class="line"><span class="cl"><span class="n">embeddings</span> <span class="o">=</span> <span class="n">vectorizer</span><span class="o">.</span><span class="n">embed_many</span><span class="p">([</span><span class="s2">"Hello, world!"</span><span class="p">,</span> <span class="s2">"How are you?"</span><span class="p">],</span> <span class="n">batch_size</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span> </span></span></code></pre> </div> <p> Initialize the Hugging Face text vectorizer. </p> <ul> <li> <strong> Parameters: </strong> <ul> <li> <strong> model </strong> ( <em> str </em> ) – The pre-trained model from Hugging Face’s Sentence Transformers to be used for embedding. Defaults to ‘sentence-transformers/all-mpnet-base-v2’. </li> <li> <strong> dims </strong> ( <em> int </em> ) – </li> <li> <strong> client </strong> ( <em> Any </em> ) – </li> </ul> </li> <li> <strong> Raises: </strong> <ul> <li> <strong> ImportError </strong> – If the sentence-transformers library is not installed. </li> <li> <strong> ValueError </strong> – If there is an error setting the embedding model dimensions. </li> </ul> </li> </ul> <h3 id="embedtext-preprocessnone-as_bufferfalse-kwargs"> embed(text, preprocess=None, as_buffer=False, **kwargs) </h3> <p> Embed a chunk of text using the Hugging Face sentence transformer. </p> <ul> <li> <strong> Parameters: </strong> <ul> <li> <strong> text </strong> ( <em> str </em> ) – Chunk of text to embed. </li> <li> <strong> preprocess </strong> ( <em> Optional </em> *[* <em> Callable </em> <em> ] </em> <em> , </em> <em> optional </em> ) – Optional preprocessing callable to perform before vectorization. Defaults to None. </li> <li> <strong> as_buffer </strong> ( <em> bool </em> <em> , </em> <em> optional </em> ) – Whether to convert the raw embedding to a byte string. Defaults to False. </li> </ul> </li> <li> <strong> Returns: </strong> Embedding. </li> <li> <strong> Return type: </strong> List[float] </li> <li> <strong> Raises: </strong> <strong> TypeError </strong> – If the wrong input type is passed in for the text. </li> </ul> <h3 id="embed_manytexts-preprocessnone-batch_size1000-as_bufferfalse-kwargs"> embed_many(texts, preprocess=None, batch_size=1000, as_buffer=False, **kwargs) </h3> <p> Asynchronously embed many chunks of texts using the Hugging Face sentence transformer. </p> <ul> <li> <strong> Parameters: </strong> <ul> <li> <strong> texts </strong> ( <em> List </em> *[* <em> str </em> <em> ] </em> ) – List of text chunks to embed. </li> <li> <strong> preprocess </strong> ( <em> Optional </em> *[* <em> Callable </em> <em> ] </em> <em> , </em> <em> optional </em> ) – Optional preprocessing callable to perform before vectorization. Defaults to None. </li> <li> <strong> batch_size </strong> ( <em> int </em> <em> , </em> <em> optional </em> ) – Batch size of texts to use when creating embeddings. Defaults to 10. </li> <li> <strong> as_buffer </strong> ( <em> bool </em> <em> , </em> <em> optional </em> ) – Whether to convert the raw embedding to a byte string. Defaults to False. </li> </ul> </li> <li> <strong> Returns: </strong> List of embeddings. </li> <li> <strong> Return type: </strong> List[List[float]] </li> <li> <strong> Raises: </strong> <strong> TypeError </strong> – If the wrong input type is passed in for the test. </li> </ul> <h2 id="openaitextvectorizer"> OpenAITextVectorizer </h2> <p> <a id="openaitextvectorizer-api"> </a> </p> <h3 id="class-openaitextvectorizermodeltext-embedding-ada-002-api_confignone"> <em> class </em> OpenAITextVectorizer(model='text-embedding-ada-002', api_config=None) </h3> <p> Bases: <code> BaseVectorizer </code> </p> <p> The OpenAITextVectorizer class utilizes OpenAI’s API to generate embeddings for text data. </p> <p> This vectorizer is designed to interact with OpenAI’s embeddings API, requiring an API key for authentication. The key can be provided directly in the api_config dictionary or through the OPENAI_API_KEY environment variable. Users must obtain an API key from OpenAI’s website ( <a href="https://platform.openai.com/docs/quickstart"> https://api.openai.com/ </a> ). Additionally, the openai python client must be installed with pip install openai&gt;=1.13.0. </p> <p> The vectorizer supports both synchronous and asynchronous operations, allowing for batch processing of texts and flexibility in handling preprocessing tasks. </p> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="c1"># Synchronous embedding of a single text</span> </span></span><span class="line"><span class="cl"><span class="n">vectorizer</span> <span class="o">=</span> <span class="n">OpenAITextVectorizer</span><span class="p">(</span> </span></span><span class="line"><span class="cl"> <span class="n">model</span><span class="o">=</span><span class="s2">"text-embedding-ada-002"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="n">api_config</span><span class="o">=</span><span class="p">{</span><span class="s2">"api_key"</span><span class="p">:</span> <span class="s2">"your_api_key"</span><span class="p">}</span> <span class="c1"># OR set OPENAI_API_KEY in your env</span> </span></span><span class="line"><span class="cl"><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="n">embedding</span> <span class="o">=</span> <span class="n">vectorizer</span><span class="o">.</span><span class="n">embed</span><span class="p">(</span><span class="s2">"Hello, world!"</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># Asynchronous batch embedding of multiple texts</span> </span></span><span class="line"><span class="cl"><span class="n">embeddings</span> <span class="o">=</span> <span class="k">await</span> <span class="n">vectorizer</span><span class="o">.</span><span class="n">aembed_many</span><span class="p">(</span> </span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">"Hello, world!"</span><span class="p">,</span> <span class="s2">"How are you?"</span><span class="p">],</span> </span></span><span class="line"><span class="cl"> <span class="n">batch_size</span><span class="o">=</span><span class="mi">2</span> </span></span><span class="line"><span class="cl"><span class="p">)</span> </span></span></code></pre> </div> <p> Initialize the OpenAI vectorizer. </p> <ul> <li> <strong> Parameters: </strong> <ul> <li> <strong> model </strong> ( <em> str </em> ) – Model to use for embedding. Defaults to ‘text-embedding-ada-002’. </li> <li> <strong> api_config </strong> ( <em> Optional </em> *[* <em> Dict </em> <em> ] </em> <em> , </em> <em> optional </em> ) – Dictionary containing the API key. Defaults to None. </li> </ul> </li> <li> <strong> Raises: </strong> <ul> <li> <strong> ImportError </strong> – If the openai library is not installed. </li> <li> <strong> ValueError </strong> – If the OpenAI API key is not provided. </li> </ul> </li> </ul> <h3 id="async-aembedtext-preprocessnone-as_bufferfalse-kwargs"> <em> async </em> aembed(text, preprocess=None, as_buffer=False, **kwargs) </h3> <p> Asynchronously embed a chunk of text using the OpenAI API. </p> <ul> <li> <strong> Parameters: </strong> <ul> <li> <strong> text </strong> ( <em> str </em> ) – Chunk of text to embed. </li> <li> <strong> preprocess </strong> ( <em> Optional </em> *[* <em> Callable </em> <em> ] </em> <em> , </em> <em> optional </em> ) – Optional preprocessing callable to perform before vectorization. Defaults to None. </li> <li> <strong> as_buffer </strong> ( <em> bool </em> <em> , </em> <em> optional </em> ) – Whether to convert the raw embedding to a byte string. Defaults to False. </li> </ul> </li> <li> <strong> Returns: </strong> Embedding. </li> <li> <strong> Return type: </strong> List[float] </li> <li> <strong> Raises: </strong> <strong> TypeError </strong> – If the wrong input type is passed in for the test. </li> </ul> <h3 id="async-aembed_manytexts-preprocessnone-batch_size1000-as_bufferfalse-kwargs"> <em> async </em> aembed_many(texts, preprocess=None, batch_size=1000, as_buffer=False, **kwargs) </h3> <p> Asynchronously embed many chunks of texts using the OpenAI API. </p> <ul> <li> <strong> Parameters: </strong> <ul> <li> <strong> texts </strong> ( <em> List </em> *[* <em> str </em> <em> ] </em> ) – List of text chunks to embed. </li> <li> <strong> preprocess </strong> ( <em> Optional </em> *[* <em> Callable </em> <em> ] </em> <em> , </em> <em> optional </em> ) – Optional preprocessing callable to perform before vectorization. Defaults to None. </li> <li> <strong> batch_size </strong> ( <em> int </em> <em> , </em> <em> optional </em> ) – Batch size of texts to use when creating embeddings. Defaults to 10. </li> <li> <strong> as_buffer </strong> ( <em> bool </em> <em> , </em> <em> optional </em> ) – Whether to convert the raw embedding to a byte string. Defaults to False. </li> </ul> </li> <li> <strong> Returns: </strong> List of embeddings. </li> <li> <strong> Return type: </strong> List[List[float]] </li> <li> <strong> Raises: </strong> <strong> TypeError </strong> – If the wrong input type is passed in for the test. </li> </ul> <h3 id="embedtext-preprocessnone-as_bufferfalse-kwargs-1"> embed(text, preprocess=None, as_buffer=False, **kwargs) </h3> <p> Embed a chunk of text using the OpenAI API. </p> <ul> <li> <strong> Parameters: </strong> <ul> <li> <strong> text </strong> ( <em> str </em> ) – Chunk of text to embed. </li> <li> <strong> preprocess </strong> ( <em> Optional </em> *[* <em> Callable </em> <em> ] </em> <em> , </em> <em> optional </em> ) – Optional preprocessing callable to perform before vectorization. Defaults to None. </li> <li> <strong> as_buffer </strong> ( <em> bool </em> <em> , </em> <em> optional </em> ) – Whether to convert the raw embedding to a byte string. Defaults to False. </li> </ul> </li> <li> <strong> Returns: </strong> Embedding. </li> <li> <strong> Return type: </strong> List[float] </li> <li> <strong> Raises: </strong> <strong> TypeError </strong> – If the wrong input type is passed in for the test. </li> </ul> <h3 id="embed_manytexts-preprocessnone-batch_size10-as_bufferfalse-kwargs"> embed_many(texts, preprocess=None, batch_size=10, as_buffer=False, **kwargs) </h3> <p> Embed many chunks of texts using the OpenAI API. </p> <ul> <li> <strong> Parameters: </strong> <ul> <li> <strong> texts </strong> ( <em> List </em> *[* <em> str </em> <em> ] </em> ) – List of text chunks to embed. </li> <li> <strong> preprocess </strong> ( <em> Optional </em> *[* <em> Callable </em> <em> ] </em> <em> , </em> <em> optional </em> ) – Optional preprocessing callable to perform before vectorization. Defaults to None. </li> <li> <strong> batch_size </strong> ( <em> int </em> <em> , </em> <em> optional </em> ) – Batch size of texts to use when creating embeddings. Defaults to 10. </li> <li> <strong> as_buffer </strong> ( <em> bool </em> <em> , </em> <em> optional </em> ) – Whether to convert the raw embedding to a byte string. Defaults to False. </li> </ul> </li> <li> <strong> Returns: </strong> List of embeddings. </li> <li> <strong> Return type: </strong> List[List[float]] </li> <li> <strong> Raises: </strong> <strong> TypeError </strong> – If the wrong input type is passed in for the test. </li> </ul> <h2 id="vertexaitextvectorizer"> VertexAITextVectorizer </h2> <p> <a id="vertexaitextvectorizer-api"> </a> </p> <h3 id="class-vertexaitextvectorizermodeltextembedding-gecko-api_confignone"> <em> class </em> VertexAITextVectorizer(model='textembedding-gecko', api_config=None) </h3> <p> Bases: <code> BaseVectorizer </code> </p> <p> The VertexAITextVectorizer uses Google’s VertexAI Palm 2 embedding model API to create text embeddings. </p> <p> This vectorizer is tailored for use in environments where integration with Google Cloud Platform (GCP) services is a key requirement. </p> <p> Utilizing this vectorizer requires an active GCP project and location (region), along with appropriate application credentials. These can be provided through the api_config dictionary or by setting the corresponding environment variables. Additionally, the vertexai python client must be installed with pip install google-cloud-aiplatform&gt;=1.26. </p> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="c1"># Synchronous embedding of a single text</span> </span></span><span class="line"><span class="cl"><span class="n">vectorizer</span> <span class="o">=</span> <span class="n">VertexAITextVectorizer</span><span class="p">(</span> </span></span><span class="line"><span class="cl"> <span class="n">model</span><span class="o">=</span><span class="s2">"textembedding-gecko"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="n">api_config</span><span class="o">=</span><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="s2">"project_id"</span><span class="p">:</span> <span class="s2">"your_gcp_project_id"</span><span class="p">,</span> <span class="c1"># OR set GCP_PROJECT_ID</span> </span></span><span class="line"><span class="cl"> <span class="s2">"location"</span><span class="p">:</span> <span class="s2">"your_gcp_location"</span><span class="p">,</span> <span class="c1"># OR set GCP_LOCATION</span> </span></span><span class="line"><span class="cl"> <span class="s2">"google_application_credentials"</span><span class="p">:</span> <span class="s2">"path_to_your_creds"</span> </span></span><span class="line"><span class="cl"> <span class="c1"># OR set GOOGLE_APPLICATION_CREDENTIALS</span> </span></span><span class="line"><span class="cl"> <span class="p">})</span> </span></span><span class="line"><span class="cl"><span class="n">embedding</span> <span class="o">=</span> <span class="n">vectorizer</span><span class="o">.</span><span class="n">embed</span><span class="p">(</span><span class="s2">"Hello, world!"</span><span class="p">)</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c1"># Asynchronous batch embedding of multiple texts</span> </span></span><span class="line"><span class="cl"><span class="n">embeddings</span> <span class="o">=</span> <span class="k">await</span> <span class="n">vectorizer</span><span class="o">.</span><span class="n">embed_many</span><span class="p">(</span> </span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="s2">"Hello, world!"</span><span class="p">,</span> <span class="s2">"Goodbye, world!"</span><span class="p">],</span> </span></span><span class="line"><span class="cl"> <span class="n">batch_size</span><span class="o">=</span><span class="mi">2</span> </span></span><span class="line"><span class="cl"><span class="p">)</span> </span></span></code></pre> </div> <p> Initialize the VertexAI vectorizer. </p> <ul> <li> <strong> Parameters: </strong> <ul> <li> <strong> model </strong> ( <em> str </em> ) – Model to use for embedding. Defaults to ‘textembedding-gecko’. </li> <li> <strong> api_config </strong> ( <em> Optional </em> *[* <em> Dict </em> <em> ] </em> <em> , </em> <em> optional </em> ) – Dictionary containing the API key. Defaults to None. </li> </ul> </li> <li> <strong> Raises: </strong> <ul> <li> <strong> ImportError </strong> – If the google-cloud-aiplatform library is not installed. </li> <li> <strong> ValueError </strong> – If the API key is not provided. </li> </ul> </li> </ul> <h3 id="embedtext-preprocessnone-as_bufferfalse-kwargs-2"> embed(text, preprocess=None, as_buffer=False, **kwargs) </h3> <p> Embed a chunk of text using the VertexAI API. </p> <ul> <li> <strong> Parameters: </strong> <ul> <li> <strong> text </strong> ( <em> str </em> ) – Chunk of text to embed. </li> <li> <strong> preprocess </strong> ( <em> Optional </em> *[* <em> Callable </em> <em> ] </em> <em> , </em> <em> optional </em> ) – Optional preprocessing callable to perform before vectorization. Defaults to None. </li> <li> <strong> as_buffer </strong> ( <em> bool </em> <em> , </em> <em> optional </em> ) – Whether to convert the raw embedding to a byte string. Defaults to False. </li> </ul> </li> <li> <strong> Returns: </strong> Embedding. </li> <li> <strong> Return type: </strong> List[float] </li> <li> <strong> Raises: </strong> <strong> TypeError </strong> – If the wrong input type is passed in for the test. </li> </ul> <h3 id="embed_manytexts-preprocessnone-batch_size10-as_bufferfalse-kwargs-1"> embed_many(texts, preprocess=None, batch_size=10, as_buffer=False, **kwargs) </h3> <p> Embed many chunks of texts using the VertexAI API. </p> <ul> <li> <strong> Parameters: </strong> <ul> <li> <strong> texts </strong> ( <em> List </em> *[* <em> str </em> <em> ] </em> ) – List of text chunks to embed. </li> <li> <strong> preprocess </strong> ( <em> Optional </em> *[* <em> Callable </em> <em> ] </em> <em> , </em> <em> optional </em> ) – Optional preprocessing callable to perform before vectorization. Defaults to None. </li> <li> <strong> batch_size </strong> ( <em> int </em> <em> , </em> <em> optional </em> ) – Batch size of texts to use when creating embeddings. Defaults to 10. </li> <li> <strong> as_buffer </strong> ( <em> bool </em> <em> , </em> <em> optional </em> ) – Whether to convert the raw embedding to a byte string. Defaults to False. </li> </ul> </li> <li> <strong> Returns: </strong> List of embeddings. </li> <li> <strong> Return type: </strong> List[List[float]] </li> <li> <strong> Raises: </strong> <strong> TypeError </strong> – If the wrong input type is passed in for the test. </li> </ul> <h2 id="coheretextvectorizer"> CohereTextVectorizer </h2> <p> <a id="coheretextvectorizer-api"> </a> </p> <h3 id="class-coheretextvectorizermodelembed-english-v30-api_confignone"> <em> class </em> CohereTextVectorizer(model='embed-english-v3.0', api_config=None) </h3> <p> Bases: <code> BaseVectorizer </code> </p> <p> The CohereTextVectorizer class utilizes Cohere’s API to generate embeddings for text data. </p> <p> This vectorizer is designed to interact with Cohere’s /embed API, requiring an API key for authentication. The key can be provided directly in the api_config dictionary or through the COHERE_API_KEY environment variable. User must obtain an API key from Cohere’s website ( <a href="https://dashboard.cohere.com/"> https://dashboard.cohere.com/ </a> ). Additionally, the cohere python client must be installed with pip install cohere. </p> <p> The vectorizer supports only synchronous operations, allows for batch processing of texts and flexibility in handling preprocessing tasks. </p> <div class="highlight"> <pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">redisvl.utils.vectorize</span> <span class="kn">import</span> <span class="n">CohereTextVectorizer</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="n">vectorizer</span> <span class="o">=</span> <span class="n">CohereTextVectorizer</span><span class="p">(</span> </span></span><span class="line"><span class="cl"> <span class="n">model</span><span class="o">=</span><span class="s2">"embed-english-v3.0"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="n">api_config</span><span class="o">=</span><span class="p">{</span><span class="s2">"api_key"</span><span class="p">:</span> <span class="s2">"your-cohere-api-key"</span><span class="p">}</span> <span class="c1"># OR set COHERE_API_KEY in your env</span> </span></span><span class="line"><span class="cl"><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="n">query_embedding</span> <span class="o">=</span> <span class="n">vectorizer</span><span class="o">.</span><span class="n">embed</span><span class="p">(</span> </span></span><span class="line"><span class="cl"> <span class="n">text</span><span class="o">=</span><span class="s2">"your input query text here"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="n">input_type</span><span class="o">=</span><span class="s2">"search_query"</span> </span></span><span class="line"><span class="cl"><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="n">doc_embeddings</span> <span class="o">=</span> <span class="n">cohere</span><span class="o">.</span><span class="n">embed_many</span><span class="p">(</span> </span></span><span class="line"><span class="cl"> <span class="n">texts</span><span class="o">=</span><span class="p">[</span><span class="s2">"your document text"</span><span class="p">,</span> <span class="s2">"more document text"</span><span class="p">],</span> </span></span><span class="line"><span class="cl"> <span class="n">input_type</span><span class="o">=</span><span class="s2">"search_document"</span> </span></span><span class="line"><span class="cl"><span class="p">)</span> </span></span></code></pre> </div> <p> Initialize the Cohere vectorizer. </p> <p> Visit <a href="https://cohere.ai/embed"> https://cohere.ai/embed </a> to learn about embeddings. </p> <ul> <li> <strong> Parameters: </strong> <ul> <li> <strong> model </strong> ( <em> str </em> ) – Model to use for embedding. Defaults to ‘embed-english-v3.0’. </li> <li> <strong> api_config </strong> ( <em> Optional </em> *[* <em> Dict </em> <em> ] </em> <em> , </em> <em> optional </em> ) – Dictionary containing the API key. Defaults to None. </li> </ul> </li> <li> <strong> Raises: </strong> <ul> <li> <strong> ImportError </strong> – If the cohere library is not installed. </li> <li> <strong> ValueError </strong> – If the API key is not provided. </li> </ul> </li> </ul> <h3 id="embedtext-preprocessnone-as_bufferfalse-kwargs-3"> embed(text, preprocess=None, as_buffer=False, **kwargs) </h3> <p> Embed a chunk of text using the Cohere Embeddings API. </p> <p> Must provide the embedding input_type as a kwarg to this method that specifies the type of input you’re giving to the model. </p> <dl> <dt> Supported input types: </dt> <dd> <ul> <li> <code> search_document </code> : Used for embeddings stored in a vector database for search use-cases. </li> <li> <code> search_query </code> : Used for embeddings of search queries run against a vector DB to find relevant documents. </li> <li> <code> classification </code> : Used for embeddings passed through a text classifier </li> <li> <code> clustering </code> : Used for the embeddings run through a clustering algorithm. </li> </ul> </dd> </dl> <p> When hydrating your Redis DB, the documents you want to search over should be embedded with input_type= “search_document” and when you are querying the database, you should set the input_type = “search query”. If you want to use the embeddings for a classification or clustering task downstream, you should set input_type= “classification” or “clustering”. </p> <ul> <li> <strong> Parameters: </strong> <ul> <li> <strong> text </strong> ( <em> str </em> ) – Chunk of text to embed. </li> <li> <strong> preprocess </strong> ( <em> Optional </em> *[* <em> Callable </em> <em> ] </em> <em> , </em> <em> optional </em> ) – Optional preprocessing callable to perform before vectorization. Defaults to None. </li> <li> <strong> as_buffer </strong> ( <em> bool </em> <em> , </em> <em> optional </em> ) – Whether to convert the raw embedding to a byte string. Defaults to False. </li> <li> <strong> input_type </strong> ( <em> str </em> ) – Specifies the type of input passed to the model. Required for embedding models v3 and higher. </li> </ul> </li> <li> <strong> Returns: </strong> Embedding. </li> <li> <strong> Return type: </strong> List[float] </li> <li> <strong> Raises: </strong> <strong> TypeError </strong> – In an invalid input_type is provided. </li> </ul> <h3 id="embed_manytexts-preprocessnone-batch_size10-as_bufferfalse-kwargs-2"> embed_many(texts, preprocess=None, batch_size=10, as_buffer=False, **kwargs) </h3> <p> Embed many chunks of text using the Cohere Embeddings API. </p> <p> Must provide the embedding input_type as a kwarg to this method that specifies the type of input you’re giving to the model. </p> <dl> <dt> Supported input types: </dt> <dd> <ul> <li> <code> search_document </code> : Used for embeddings stored in a vector database for search use-cases. </li> <li> <code> search_query </code> : Used for embeddings of search queries run against a vector DB to find relevant documents. </li> <li> <code> classification </code> : Used for embeddings passed through a text classifier </li> <li> <code> clustering </code> : Used for the embeddings run through a clustering algorithm. </li> </ul> </dd> </dl> <p> When hydrating your Redis DB, the documents you want to search over should be embedded with input_type= “search_document” and when you are querying the database, you should set the input_type = “search query”. If you want to use the embeddings for a classification or clustering task downstream, you should set input_type= “classification” or “clustering”. </p> <ul> <li> <strong> Parameters: </strong> <ul> <li> <strong> texts </strong> ( <em> List </em> *[* <em> str </em> <em> ] </em> ) – List of text chunks to embed. </li> <li> <strong> preprocess </strong> ( <em> Optional </em> *[* <em> Callable </em> <em> ] </em> <em> , </em> <em> optional </em> ) – Optional preprocessing callable to perform before vectorization. Defaults to None. </li> <li> <strong> batch_size </strong> ( <em> int </em> <em> , </em> <em> optional </em> ) – Batch size of texts to use when creating embeddings. Defaults to 10. </li> <li> <strong> as_buffer </strong> ( <em> bool </em> <em> , </em> <em> optional </em> ) – Whether to convert the raw embedding to a byte string. Defaults to False. </li> <li> <strong> input_type </strong> ( <em> str </em> ) – Specifies the type of input passed to the model. Required for embedding models v3 and higher. </li> </ul> </li> <li> <strong> Returns: </strong> List of embeddings. </li> <li> <strong> Return type: </strong> List[List[float]] </li> <li> <strong> Raises: </strong> <strong> TypeError </strong> – In an invalid input_type is provided. </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/integrate/redisvl/api/vectorizer/"/> <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-redis/.html
<section class="prose w-full py-12 max-w-none"> <h1> Install Redis </h1> <p class="text-lg -mt-5 mb-10"> Install Redis on Linux, macOS, and Windows </p> <p> This is a an installation guide. You'll learn how to install, run, and experiment with the Redis server process. </p> <p> While you can install Redis on any of the platforms listed below, you might also consider using Redis Cloud by creating a <a href="https://redis.com/try-free?utm_source=redisio&amp;utm_medium=referral&amp;utm_campaign=2023-09-try_free&amp;utm_content=cu-redis_cloud_users"> free account </a> . </p> <h2 id="install-redis"> Install Redis </h2> <p> How you install Redis depends on your operating system and whether you'd like to install it bundled with Redis Stack and Redis UI. See the guide below that best fits your needs: </p> <ul> <li> <a href="/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-linux/"> Install Redis on Linux </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-mac-os/"> Install Redis on macOS </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-windows/"> Install Redis on Windows </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/install/install-stack/"> Install Redis with Redis Stack </a> </li> <li> <a href="/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-from-source/"> Install Redis from Source </a> </li> </ul> <p> Refer to <a href="/docs/latest/operate/oss_and_stack/management/admin/"> Redis Administration </a> for detailed setup tips. </p> <h2 id="test-if-you-can-connect-using-the-cli"> Test if you can connect using the CLI </h2> <p> After you have Redis up and running, you can connect using <code> redis-cli </code> . </p> <p> External programs talk to Redis using a TCP socket and a Redis specific protocol. This protocol is implemented in the Redis client libraries for the different programming languages. However, to make hacking with Redis simpler, Redis provides a command line utility that can be used to send commands to Redis. This program is called <strong> redis-cli </strong> . </p> <p> The first thing to do to check if Redis is working properly is sending a <strong> PING </strong> command using redis-cli: </p> <pre tabindex="0"><code>$ redis-cli ping PONG </code></pre> <p> Running <strong> redis-cli </strong> followed by a command name and its arguments will send this command to the Redis instance running on localhost at port 6379. You can change the host and port used by <code> redis-cli </code> - just try the <code> --help </code> option to check the usage information. </p> <p> Another interesting way to run <code> redis-cli </code> is without arguments: the program will start in interactive mode. You can type different commands and see their replies. </p> <pre tabindex="0"><code>$ redis-cli redis 127.0.0.1:6379&gt; ping PONG </code></pre> <h2 id="securing-redis"> Securing Redis </h2> <p> By default Redis binds to <strong> all the interfaces </strong> and has no authentication at all. If you use Redis in a very controlled environment, separated from the external internet and in general from attackers, that's fine. However, if an unhardened Redis is exposed to the internet, it is a big security concern. If you are not 100% sure your environment is secured properly, please check the following steps in order to make Redis more secure: </p> <ol> <li> Make sure the port Redis uses to listen for connections (by default 6379 and additionally 16379 if you run Redis in cluster mode, plus 26379 for Sentinel) is firewalled, so that it is not possible to contact Redis from the outside world. </li> <li> Use a configuration file where the <code> bind </code> directive is set in order to guarantee that Redis listens on only the network interfaces you are using. For example, only the loopback interface (127.0.0.1) if you are accessing Redis locally from the same computer. </li> <li> Use the <code> requirepass </code> option to add an additional layer of security so that clients will be required to authenticate using the <a href="/commands/auth"> <code> AUTH </code> </a> command. </li> <li> Use <a href="http://www.tarsnap.com/spiped.html"> spiped </a> or another SSL tunneling software to encrypt traffic between Redis servers and Redis clients if your environment requires encryption. </li> </ol> <p> Note that a Redis instance exposed to the internet without any security <a href="http://antirez.com/news/96"> is very simple to exploit </a> , so make sure you understand the above and apply <strong> at least </strong> a firewall layer. After the firewall is in place, try to connect with <code> redis-cli </code> from an external host to confirm that the instance is not reachable. </p> <h2 id="use-redis-from-your-application"> Use Redis from your application </h2> <p> Of course using Redis just from the command line interface is not enough as the goal is to use it from your application. To do so, you need to download and install a Redis client library for your programming language. </p> <p> You'll find a <a href="/docs/latest/develop/clients/"> full list of supported clients for different languages in this page </a> . </p> <h2 id="redis-persistence"> Redis persistence </h2> <p> You can learn <a href="/docs/latest/operate/oss_and_stack/management/persistence/"> how Redis persistence works on this page </a> . It is important to understand that, if you start Redis with the default configuration, Redis will spontaneously save the dataset only from time to time. For example, after at least five minutes if you have at least 100 changes in your data. If you want your database to persist and be reloaded after a restart make sure to call the <strong> SAVE </strong> command manually every time you want to force a data set snapshot. Alternatively, you can save the data on disk before quitting by using the <strong> SHUTDOWN </strong> command: </p> <pre tabindex="0"><code>$ redis-cli shutdown </code></pre> <p> This way, Redis will save the data on disk before quitting. Reading the <a href="/docs/latest/operate/oss_and_stack/management/persistence/"> persistence page </a> is strongly suggested to better understand how Redis persistence works. </p> <h2 id="install-redis-properly"> Install Redis properly </h2> <p> Running Redis from the command line is fine just to hack a bit or for development. However, at some point you'll have some actual application to run on a real server. For this kind of usage you have two different choices: </p> <ul> <li> Run Redis using screen. </li> <li> Install Redis in your Linux box in a proper way using an init script, so that after a restart everything will start again properly. </li> </ul> <p> A proper install using an init script is strongly recommended. </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 available packages for supported Linux distributions already include the capability of starting the Redis server from <code> /etc/init </code> . </div> </div> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> The remainder of this section assumes you've <a href="/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-from-source/"> installed Redis from its source code </a> . If instead you have installed Redis Stack, you will need to download a <a href="https://raw.githubusercontent.com/redis/redis/7.2/utils/redis_init_script"> basic init script </a> and then modify both it and the following instructions to conform to the way Redis Stack was installed on your platform. For example, on Ubuntu 20.04 LTS, Redis Stack is installed in <code> /opt/redis-stack </code> , not <code> /usr/local </code> , so you'll need to adjust accordingly. </div> </div> <p> The following instructions can be used to perform a proper installation using the init script shipped with the Redis source code, <code> /path/to/redis-stable/utils/redis_init_script </code> . </p> <p> If you have not yet run <code> make install </code> after building the Redis source, you will need to do so before continuing. By default, <code> make install </code> will copy the <code> redis-server </code> and <code> redis-cli </code> binaries to <code> /usr/local/bin </code> . </p> <ul> <li> <p> Create a directory in which to store your Redis config files and your data: </p> <pre tabindex="0"><code>sudo mkdir /etc/redis sudo mkdir /var/redis </code></pre> </li> <li> <p> Copy the init script that you'll find in the Redis distribution under the <strong> utils </strong> directory into <code> /etc/init.d </code> . We suggest calling it with the name of the port where you are running this instance of Redis. Make sure the resulting file has <code> 0755 </code> permissions. </p> <pre tabindex="0"><code>sudo cp utils/redis_init_script /etc/init.d/redis_6379 </code></pre> </li> <li> <p> Edit the init script. </p> <pre tabindex="0"><code>sudo vi /etc/init.d/redis_6379 </code></pre> </li> </ul> <p> Make sure to set the <strong> REDISPORT </strong> variable to the port you are using. Both the pid file path and the configuration file name depend on the port number. </p> <ul> <li> <p> Copy the template configuration file you'll find in the root directory of the Redis distribution into <code> /etc/redis/ </code> using the port number as the name, for instance: </p> <pre tabindex="0"><code>sudo cp redis.conf /etc/redis/6379.conf </code></pre> </li> <li> <p> Create a directory inside <code> /var/redis </code> that will work as both data and working directory for this Redis instance: </p> <pre tabindex="0"><code>sudo mkdir /var/redis/6379 </code></pre> </li> <li> <p> Edit the configuration file, making sure to perform the following changes: </p> <ul> <li> Set <strong> daemonize </strong> to yes (by default it is set to no). </li> <li> Set the <strong> pidfile </strong> to <code> /var/run/redis_6379.pid </code> , modifying the port as necessary. </li> <li> Change the <strong> port </strong> accordingly. In our example it is not needed as the default port is already <code> 6379 </code> . </li> <li> Set your preferred <strong> loglevel </strong> . </li> <li> Set the <strong> logfile </strong> to <code> /var/log/redis_6379.log </code> . </li> <li> Set the <strong> dir </strong> to <code> /var/redis/6379 </code> (very important step!). </li> </ul> </li> <li> <p> Finally, add the new Redis init script to all the default runlevels using the following command: </p> <pre tabindex="0"><code>sudo update-rc.d redis_6379 defaults </code></pre> </li> </ul> <p> You are done! Now you can try running your instance with: </p> <pre tabindex="0"><code>sudo /etc/init.d/redis_6379 start </code></pre> <p> Make sure that everything is working as expected: </p> <ol> <li> Try pinging your instance within a <code> redis-cli </code> session using the <a href="/commands/ping"> <code> PING </code> </a> command. </li> <li> Do a test save with <code> redis-cli save </code> and check that a dump file is correctly saved to <code> /var/redis/6379/dump.rdb </code> . </li> <li> Check that your Redis instance is logging to the <code> /var/log/redis_6379.log </code> file. </li> <li> If it's a new machine where you can try it without problems, make sure that after a reboot everything is still working. </li> </ol> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> The above instructions don't include all of the Redis configuration parameters that you could change. For example, to use AOF persistence instead of RDB persistence, or to set up replication, and so forth. </div> </div> <p> You should also read the example <a href="/docs/latest/operate/oss_and_stack/management/config-file/"> redis.conf </a> file, which is heavily annotated to help guide you on making changes. Further details can also be found in the <a href="/docs/latest/operate/oss_and_stack/management/config/"> configuration article on this site </a> . </p> <hr/> <nav> <a href="/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-linux/"> Install Redis on Linux </a> <p> How to install Redis on Linux </p> <a href="/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-mac-os/"> Install Redis on macOS </a> <p> Use Homebrew to install and start Redis on macOS </p> <a href="/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-windows/"> Install Redis on Windows </a> <p> Use Redis on Windows for development </p> <a href="/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-from-source/"> Install Redis from Source </a> <p> Compile and install Redis from source </p> </nav> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/"/> <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/redisearch/redisearch-2.4-release-notes/.html
<section class="prose w-full py-12 max-w-none"> <h1> RediSearch 2.4 release notes </h1> <p class="text-lg -mt-5 mb-10"> Vector Similarity Search (VSS). New query syntax Dialect version 2. Choose between Dialect 1 and Dialect 2 for query parser behavior. Hybrid queries. </p> <h2 id="requirements"> Requirements </h2> <p> RediSearch v2.4.16 requires: </p> <ul> <li> Minimum Redis compatibility version (database): 6.0.0 </li> <li> Minimum Redis Enterprise Software version (cluster): 6.0.0 </li> </ul> <h2 id="v2416-november-2022"> v2.4.16 (November 2022) </h2> <p> This is a maintenance release for RediSearch 2.4 </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/RediSearch/RediSearch/pull/2962"> #2962 </a> Crash upon AOF preload - Use local GC context in periodic callback (MOD-3951) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2863"> #2863 </a> High CPU Utilization - Change MAX_LEV_DISTANCE to 4 (MOD-3563) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/3041"> #3041 </a> , <a href="https://github.com/RediSearch/RediSearch/pull/3063"> #3063 </a> , <a href="https://github.com/RediSearch/RediSearch/pull/3051"> #3051 </a> , <a href="https://github.com/RediSearch/RediSearch/pull/3143"> #3143 </a> Several memory leaks (MOD-4121, MOD-4252) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/3119"> #3119 </a> Crash on intersect iterator GetCriteriaTester (MOD-4200) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/3128"> #3128 </a> Filter rules must be reevaluated per index per document (MOD-4207) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/3127"> #3127 </a> Fix assertion failure on wrong result counting, which leads to a crash (MOD-4214) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/3171"> #3171 </a> Missing implementation of NumericRangeIterator_OnReopen which lead to crash (MOD-4255) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/3191"> #3191 </a> Wrong query iterator casting which resulted in 100% CPU utilization (MOD-4290) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/3197"> #3197 </a> Release failed to create temporary indices on the main thread (MOD-4388) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2981"> #2981 </a> Double freeing in iterators of hybrid queries resulting in crash (MOD-4411) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/3161"> #3161 </a> Latency used to increase over time when combining INKEYS and wildcard query (MOD-4343) </li> </ul> </li> </ul> <h2 id="v2415-october-2022"> v2.4.15 (October 2022) </h2> <p> This is a maintenance release for RediSearch 2.4. </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/RediSearch/RediSearch/pull/3095"> #3095 </a> Replace order of parsing the parameters and query in the coordinator (MOD-4205) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/3012"> #3012 </a> Improved efficiency of LLAPI <code> findInfo </code> , which could reduce stability during upgrade in Redis Enterprise (MOD-4197, MOD-4052) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/3040"> #3040 </a> , <a href="https://github.com/RediSearch/RediSearch/pull/3049"> #3049 </a> Fix for <code> SORTBY </code> numeric field for non-SORTABLE fields on the coordinator (MOD-4115) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/3050"> #3050 </a> Results from fields from a missing value should come last when combined with <code> SORTBY </code> (MOD-4120) </li> </ul> </li> <li> <p> Improvements: </p> <ul> <li> <a href="https://github.com/RediSearch/RediSearch/pull/3047"> #3047 </a> Add <code> strlen </code> string function to <code> FT.AGGREGATE </code> (MOD-4141) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/3038"> #3038 </a> Add <code> number_of_uses </code> to <code> FT.INFO </code> for the number of times the index was queried </li> </ul> </li> </ul> <h2 id="v2414-august-2022"> v2.4.14 (August 2022) </h2> <p> This is a maintenance release for RediSearch 2.4. </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> Improvements: </p> <ul> <li> <a href="https://github.com/RedisAI/VectorSimilarity/releases/tag/v0.3.2"> Vector similarity v0.3.2 </a> </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2955"> #2955 </a> Add timeout during prefix query (MOD-3949) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2957"> #2957 </a> Efficient removal from prefix list for cases with many indices </li> </ul> </li> <li> <p> Bug fixes: </p> <ul> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2937"> #2937 </a> Returning <code> NULL </code> response after encountering an expired document (MOD-3515) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2962"> #2962 </a> Crash upon AOF preload (MOD-3951) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2986"> #2986 </a> Memory leak related to schema prefixes </li> </ul> </li> </ul> <h2 id="v2411-july-2022"> v2.4.11 (July 2022) </h2> <p> This is a maintenance release for RediSearch 2.4. </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/RediSearch/RediSearch/pull/2892"> #2892 </a> Combining <code> SORTBY </code> with <code> MAX </code> on <code> FT.SEARCH </code> (which is not supported) caused an inconsistent response and out-of-memory error (MOD-3540, MOD-3644) </li> <li> <a href="https://github.com/RedisAI/VectorSimilarity/releases/tag/v0.3.1"> VecSim v0.3.1 </a> <ul> <li> HNSW indices: reclaim memory upon deletion - HNSW index's data structures now reclaim memory and shrink upon deletion </li> </ul> </li> </ul> </li> <li> <p> Improvements: </p> <ul> <li> <a href="https://github.com/RedisAI/VectorSimilarity/releases/tag/v0.3.1"> VecSim v0.3.1 </a> <ul> <li> HNSW indices: delete procedure is up to 40% faster </li> <li> More accurate memory consumption reporting for HNSW indices </li> </ul> </li> </ul> </li> </ul> <h2 id="v2410-july-2022"> v2.4.10 (July 2022) </h2> <p> This is a maintenance release for RediSearch 2.4. </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/RediSearch/RediSearch/pull/2863"> #2863 </a> Crash due to too high (Levenshtein) <code> DISTANCE </code> in <code> FT.SPELLCHECK </code> . This fix limits the <code> DISTANCE </code> to 4. (MOD-3563) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2875"> #2875 </a> Not all documents with vector fields were indexed with Auto Tiering (MOD-3584) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2846"> #2846 </a> Enforce Redis Enterprise memory limit for vector indices </li> </ul> </li> </ul> <h2 id="v249-june-2022"> v2.4.9 (June 2022) </h2> <p> This is a maintenance release for RediSearch 2.4. </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/RediSearch/RediSearch/pull/2837"> #2837 </a> , <a href="https://github.com/RediSearch/RediSearch/issues/2836"> #2836 </a> Crash on <code> FT.AGGREGATE </code> "... APPLY '-INF % -1'..." </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2814"> #2814 </a> <code> FT.EXPLAIN </code> without parameters causes a crash </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2790"> #2790 </a> Incorrect <code> num_terms </code> value in <code> FT.INFO </code> after a term is deleted from all the docs (garbage collection) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2804"> #2804 </a> Freeze when <code> OFFSET </code> + <code> LIMIT </code> was greater than <code> maxSearchResults </code> (config) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2791"> #2791 </a> Add <code> BlockedClientMeasureTime </code> to coordinator for more accurate performance stats </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2802"> #2802 </a> Tagged parts of keys (curly brackets <code> {} </code> ) are now returned by <code> FT.SEARCH </code> </li> </ul> </li> <li> <p> Improvements: </p> <ul> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2806"> #2806 </a> Do not load the JSON API when RediSearch is initialized as a library </li> </ul> </li> <li> <p> Minor breaking change: </p> <ul> <li> As pointed out above, <a href="https://github.com/RediSearch/RediSearch/pull/2802"> #2802 </a> is a bug fix. However, if your application relies on RediSearch incorrectly trimming the tagged part of a key (using <code> {} </code> ), this could break your application. This only applies to users who are using RediSearch in clustered databases. </li> </ul> </li> </ul> <h2 id="v248-may-2022"> v2.4.8 (May 2022) </h2> <p> This is a maintenance release for RediSearch 2.4. </p> <p> Update urgency: <code> MODERATE </code> : Program an upgrade of the server, but it's not urgent. However, if you're using Vector Similarity (introduced in RediSearch 2.4), there are some critical bugs that may affect a subset of users. In this case, you should upgrade. </p> <p> Details: </p> <ul> <li> <p> Bug fixes: </p> <ul> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2739"> #2739 </a> Memory leak in coordinator related to Vector Similarity (MOD-3023) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2736"> #2736 </a> , <a href="https://github.com/RediSearch/RediSearch/pull/2782"> #2782 </a> Memory allocation restrictions for Vector Similarity indices (causing OOM) (MOD-3195) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2755"> #2755 </a> Compare the entire vector field name instead of a prefix when creating a new vector index </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2780"> #2780 </a> Initialize all variables in <code> EvalContext </code> (which might have led to crashes in clustered databases) </li> </ul> </li> <li> <p> Improvements: </p> <ul> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2740"> #2740 </a> Performance optimization for hybrid vector queries </li> </ul> </li> </ul> <h2 id="v246-may-2022"> v2.4.6 (May 2022) </h2> <p> This is a maintenance release for RediSearch 2.4. </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/RediSearch/RediSearch/pull/2716"> #2716 </a> Removed assert statement that could cause crashes with replica of (MOD-3008, MOD-3012) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2734"> #2734 </a> <code> ON_TIMEOUT RETURN </code> policy fix: return results obtained until timeout rather than discarding them </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2714"> #2714 </a> Memory leak on non-TLS setup in coordinator </li> </ul> </li> </ul> <h2 id="v245-april-2022"> v2.4.5 (April 2022) </h2> <p> This is a maintenance release for RediSearch 2.4. </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/RediSearch/RediSearch/pull/2702"> #2702 </a> <code> INKEYS </code> combined with Vector Similarity caused server unresponsiveness (MOD-2952) </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2705"> #2705 </a> Incorrect results when deleting a document that was skipped at index time </li> <li> <a href="https://github.com/RediSearch/RediSearch/issues/2698"> #2698 </a> Synonyms in Chinese </li> </ul> </li> <li> <p> Improvements: </p> <ul> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2694"> #2694 </a> Performance: In a <code> TEXT </code> field, skip term iterator if term does not appear in requested field </li> </ul> </li> </ul> <h2 id="v243-march-2022"> v2.4.3 (March 2022) </h2> <p> This is the General Availability release of RediSearch 2.4. </p> <h3 id="headlines"> Headlines </h3> <p> RediSearch 2.4 introduces a new capability, Vector Similarity Search (VSS), which allows indexing and querying vector data stored (as BLOBs) in Redis hashes. </p> <p> It also introduces a new query syntax to address query parser inconsistencies found in previous versions of RediSearch. Users can now choose between Dialect version 1 (to keep existing query parser behavior) or Dialect version 2 (to switch to the updated behavior). </p> <p> All VSS queries or any query using the <code> PARAMS </code> option must use Dialect version 2. </p> <h3 id="whats-new-in-24"> What's new in 2.4 </h3> <ul> <li> <p> <code> FT.CREATE </code> is extended to support the creation of 2 popular types of vector indexes: </p> <ul> <li> <p> <strong> FLAT Index </strong> </p> <p> This type of index is used when the recall is more important than the speed of query execution. A query vector will be compared to all vectors in a flat index. The search results will return the exact top k nearest neighbors to the query vector. </p> </li> <li> <p> <strong> Hierarchical Navigable Small World (HNSW) Index </strong> </p> <p> This index is a modified implementation of the library written by the author of this influential <a href="https://arxiv.org/abs/1603.09320"> academic paper </a> . An HNSW vector index is used when the speed of query execution is preferred over recall. The results returned are approximate nearest neighbors (ANNs). </p> <p> You can try out different HNSW index parameters ( <code> M </code> , <code> EFCONSTRUCTION </code> , <code> EFRUNTIME </code> ) to improve the “recall versus speed” balance. </p> </li> </ul> </li> <li> <p> Use <code> FT.SEARCH </code> to retrieve the top K hashes with the most similar vectors to a given query vector. </p> </li> <li> <p> Hybrid queries in <code> FT.SEARCH </code> : </p> <p> Use hybrid queries to retrieve Redis hashes that match a combination of vector and non-vector search criteria. Non-vector search criteria can include expressions combining <code> NUMERIC </code> , <code> TEXT </code> , <code> TAG </code> , and <code> GEO </code> fields. </p> <p> Hybrid queries are often used in modern ecommerce search applications featuring “visual” similarity plus metadata similarity. For example, you can use a single hybrid query to find products that are visually similar to a given image within a price range and/or geo-location. </p> </li> <li> <p> Use <a href="/docs/latest/commands/ft.config-set"> <code> FT.CONFIG SET </code> </a> to set <code> DEFAULT_DIALECT </code> at the module level. By default, <code> DEFAULT_DIALECT </code> is set to 1. </p> </li> <li> <p> Override <code> DIALECT </code> : </p> <p> It is possible to override the module-level dialect for a specific command at runtime. You can specify the dialect when executing any of the following commands: </p> <ul> <li> <p> <a href="/docs/latest/commands/ft.search"> <code> FT.SEARCH </code> </a> </p> </li> <li> <p> <a href="/docs/latest/commands/ft.aggregate"> <code> FT.AGGREGATE </code> </a> </p> </li> <li> <p> <a href="/docs/latest/commands/ft.explain"> <code> FT.EXPLAIN </code> </a> </p> </li> <li> <p> <a href="/docs/latest/commands/ft.explaincli"> <code> FT.EXPLAINCLI </code> </a> </p> </li> <li> <p> <a href="/docs/latest/commands/ft.spellcheck"> <code> FT.SPELLCHECK </code> </a> </p> </li> </ul> <p> If you do not specify dialect when running any of these commands, they will use the default module-level dialect value. </p> </li> </ul> <h3 id="details"> Details </h3> <ul> <li> <p> Features: </p> <ul> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2671"> #2671 </a> Add Dialect support </li> </ul> </li> <li> <p> Performance enhancements (since 2.4-RC1): </p> <ul> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2647"> #2647 </a> Normalize vector once for ad-hoc flat search </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2638"> #2638 </a> Optimized hybrid query when no scores are required </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2653"> #2653 </a> Updating specific field load optimization rule </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2670"> #2670 </a> Use <code> REDISMODULE_EVENT_SHUTDOWN </code> to clear resources </li> </ul> </li> <li> <p> Security and privacy (since 2.4-RC1): </p> <ul> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2584"> #2584 </a> Fix MOD-2086, added support for TLS passphrase </li> </ul> </li> <li> <p> Bug fixes (since 2.4-RC1): </p> <ul> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2651"> #2651 </a> Fix client freeze on docs expire during query </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2641"> #2641 </a> Memory leak in the coordinator </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2645"> #2645 </a> Ignore NULL value on ingest </li> <li> <a href="https://github.com/RediSearch/RediSearch/pull/2654"> #2654 </a> VecSim hybrid query - return empty iterator for invalid intersection child iterator </li> </ul> </li> </ul> <h3 id="introducing-dialect"> Introducing DIALECT </h3> <p> RediSearch 2.4.3 introduces a new query syntax to address query parser inconsistencies found in previous versions of RediSearch. Users can now choose between: </p> <ul> <li> <p> Dialect version 1 (to keep the query dialect as in RediSearch 2.2) </p> </li> <li> <p> Dialect version 2 (to use the updated dialect) </p> </li> </ul> <p> Existing RediSearch 2.2 users will not have to modify their queries since the default dialect is 1. However, all RediSearch users should gradually update their queries to use dialect version 2. </p> <h4 id="background"> Background </h4> <p> Under certain conditions, some query parsing rules did not behave as originally intended. Queries containing the following operators could return unexpected results: </p> <ul> <li> <code> AND </code> </li> <li> quotes, ~, -, and % (exact, optional, negation, fuzzy) </li> <li> <code> OR </code> </li> </ul> <p> To minimize the impact on existing, unaffected RediSearch users, a DIALECT setting was introduced to allow: </p> <ul> <li> <p> Existing queries to run without any modification (DIALECT 1) </p> </li> <li> <p> New queries to benefit from the updated query-parsing behavior (DIALECT 2) </p> </li> </ul> <h4 id="examples-of-impacted-queries"> Examples of impacted queries </h4> <p> Your existing queries may behave differently under different DIALECT versions, if they fall into any of the following categories: </p> <ul> <li> <p> Your query has a field modifier followed by multiple words. </p> <p> Consider this simple query <nobr> <code> @name:James Brown </code> </nobr> . </p> <p> The field modifier <code> @name </code> is followed by 2 words: <code> James </code> and <code> Brown </code> . </p> <p> With DIALECT 1, the parser interprets this query as "find <code> James Brown </code> in the <code> @name </code> field." </p> <p> With DIALECT 2, the parser interprets it as "find <code> James </code> in the <code> @name </code> field AND <code> Brown </code> in ANY text field." In other words, the query parser interprets it as <nobr> <code> (@name:James) Brown </code> </nobr> . </p> <p> With DIALECT 2, you could achieve the default behavior from DIALECT 1 by updating your query to <nobr> <code> @name:(James Brown) </code> </nobr> . </p> </li> <li> <p> Your query uses quotes, ~, -, % (exact, optional, negation, fuzzy). </p> <p> Consider a simple query with negation <nobr> <code> -hello world </code> </nobr> . </p> <p> With DIALECT 1, the parser interprets this query as "find values in any field that does not contain <code> hello </code> AND does not contain <code> world </code> ." This is the equivalent of <nobr> <code> -(hello world) </code> </nobr> or <nobr> <code> -hello -world </code> </nobr> . </p> <p> With DIALECT 2, the parser interprets it as <code> -hello </code> AND <code> world </code> , so only <code> hello </code> is negated. </p> <p> With DIALECT 2, you could achieve the default behavior from dialect 1 by updating your query to <nobr> <code> -(hello world) </code> </nobr> . </p> </li> </ul> <p> Another example that illustrates the differences in parser behavior is <code> hello world | "goodbye" moon </code> : </p> <ul> <li> <p> With DIALECT 1, the parser interprets this query as searching for <code> (hello world | "goodbye") moon </code> </p> </li> <li> <p> With DIALECT 2, the parser interprets it as searching for either <code> hello world </code> OR <code> "goodbye" moon </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> This is the first GA version of 2.4. The version inside Redis will be 2.4.3 in semantic versioning. Since the version of a module in Redis is numeric, we could not add a GA flag. </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/redisearch/redisearch-2.4-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/operate/rs/clusters/logging/log-security/.html
<section class="prose w-full py-12 max-w-none"> <h1> Manage logs </h1> <p> Redis Enterprise comes with <a href="/docs/latest/operate/rs/clusters/logging/"> a set of logs </a> on the server and available through the user interface to assist users in investigating actions taken on the server and to troubleshoot issues. </p> <h2 id="send-logs-to-a-remote-logging-server"> Send logs to a remote logging server </h2> <p> Redis Enterprise sends logs to syslog by default. You can send these logs to a remote logging server by configuring syslog. </p> <p> To do this, modify the syslog or rsyslog configuration on your operating system to send logs in the <code> $logdir </code> directory ( <code> /var/opt/redislabs/log </code> in default installations) to a remote monitoring server of your choice. See <a href="/docs/latest/operate/rs/clusters/logging/rsyslog-logging/"> rsyslog logging </a> for additional details. </p> <h2 id="log-rotation"> Log rotation </h2> <p> Redis Enterprise Software's job scheduler runs <code> logrotate </code> every five minutes to examine logs stored on the operating system and rotate them based on the log rotation configuration. You can find the log rotation configuration file at <code> $pkgconfdir/logrotate.conf </code> as of Redis Enterprise Software version 7.2 ( <code> pkgconfdir </code> is <code> /opt/redislabs/config </code> by default, but can be changed in a custom installation). </p> <p> By default, log rotation occurs when a log exceeds 200 MB. We recommend sending log files to a remote logging server so you can maintain them more effectively. </p> <p> The following log rotation policy is enabled by default in Redis Enterprise Software, but you can modify it as needed. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl"><span class="si">${</span><span class="nv">logdir</span><span class="si">}</span>/*.log <span class="o">{</span> </span></span><span class="line"><span class="cl"> su <span class="si">${</span><span class="nv">osuser</span><span class="si">}</span> <span class="si">${</span><span class="nv">osgroup</span><span class="si">}</span> </span></span><span class="line"><span class="cl"> maxsize 200M </span></span><span class="line"><span class="cl"> daily </span></span><span class="line"><span class="cl"> missingok </span></span><span class="line"><span class="cl"> copytruncate </span></span><span class="line"><span class="cl"> rotate <span class="m">10</span> </span></span><span class="line"><span class="cl"> maxage <span class="m">7</span> </span></span><span class="line"><span class="cl"> compress </span></span><span class="line"><span class="cl"> notifempty </span></span><span class="line"><span class="cl"> nodateext </span></span><span class="line"><span class="cl"> nosharedscripts </span></span><span class="line"><span class="cl"> prerotate </span></span><span class="line"><span class="cl"> <span class="c1"># copy cluster_wd log to another file that will have longer retention</span> </span></span><span class="line"><span class="cl"> <span class="k">if</span> <span class="o">[</span> <span class="s2">"\$1"</span> <span class="o">=</span> <span class="s2">"</span><span class="si">${</span><span class="nv">logdir</span><span class="si">}</span><span class="s2">/cluster_wd.log"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> </span></span><span class="line"><span class="cl"> cp -p <span class="si">${</span><span class="nv">logdir</span><span class="si">}</span>/cluster_wd.log <span class="si">${</span><span class="nv">logdir</span><span class="si">}</span>/cluster_wd.log.long_retention </span></span><span class="line"><span class="cl"> <span class="k">fi</span> </span></span><span class="line"><span class="cl"> endscript </span></span><span class="line"><span class="cl"><span class="o">}</span> </span></span><span class="line"><span class="cl"><span class="si">${</span><span class="nv">logdir</span><span class="si">}</span>/cluster_wd.log.long_retention <span class="o">{</span> </span></span><span class="line"><span class="cl"> su <span class="si">${</span><span class="nv">osuser</span><span class="si">}</span> <span class="si">${</span><span class="nv">osgroup</span><span class="si">}</span> </span></span><span class="line"><span class="cl"> daily </span></span><span class="line"><span class="cl"> missingok </span></span><span class="line"><span class="cl"> copytruncate </span></span><span class="line"><span class="cl"> rotate <span class="m">30</span> </span></span><span class="line"><span class="cl"> compress </span></span><span class="line"><span class="cl"> notifempty </span></span><span class="line"><span class="cl"> nodateext </span></span><span class="line"><span class="cl"><span class="o">}</span> </span></span></code></pre> </div> <ul> <li> <p> <code> ${logdir}/*.log </code> : <code> logrotate </code> checks the files under the <code> $logdir </code> directory ( <code> /var/opt/redislabs/log/ </code> ) and rotates any files that end with the extension <code> .log </code> . </p> </li> <li> <p> <code> ${logdir}/cluster_wd.log.long_retention </code> : <code> cluster_wd.log </code> is copied to <code> cluster_wd.log.long_retention </code> before rotation. This copy is kept longer than usual, which is 30 days by default. </p> </li> <li> <p> <code> maxsize 200M </code> : Rotate log files that exceed 200 MB. </p> </li> <li> <p> <code> daily </code> : Rotate logs every day regardless of their size. </p> </li> <li> <p> <code> missingok </code> : If there are missing log files, do nothing. </p> </li> <li> <p> <code> copytruncate </code> : Truncate the original log file to zero sizes after creating a copy. </p> </li> <li> <p> <code> rotate 10 </code> : Save a maximum of 10 rotated log files. To keep effectively infinite log files, use <code> rotate 2000 </code> instead. </p> </li> <li> <p> <code> compress </code> : gzip log files. </p> </li> <li> <p> <code> maxage 7 </code> : Keep the rotated log files for 7 days. </p> </li> <li> <p> <code> notifempty </code> : Don't rotate the log file if it is empty. </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> For large scale deployments, you might need to rotate logs at faster intervals than daily. You can also use a cronjob or external vendor solutions. </div> </div> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/rs/clusters/logging/log-security/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/.html
<section class="prose w-full py-12 max-w-none"> <h1> Gears </h1> <p class="text-lg -mt-5 mb-10"> RedisGears supports batch and event-driven processing for Redis data. </p> <h2 id="what-is-redisgears"> What is RedisGears? </h2> <p> RedisGears is an engine for data processing in Redis. RedisGears supports batch and event-driven processing for Redis data. To use RedisGears, you write functions that describe how your data should be processed. You then submit this code to your Redis deployment for remote execution. </p> <h2 id="supported-languages"> Supported languages </h2> <p> As of RedisGears v1.2, you can enable a plugin to select which programming language to use. It currently supports code written in either <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/python/"> Python </a> or <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/jvm/"> Java </a> . </p> <p> Prior to v1.2, RedisGears only supported Python. However, an internal C API exists and can be used by other Redis modules. Support for other languages is being planned. </p> <h2 id="getting-started-with-redisgears"> Getting started with RedisGears </h2> <p> RedisGears is implemented by a Redis module. To use RedisGears, you'll need to make sure that your Redis deployment has the module installed. <a href="https://docs.redislabs.com/latest/rs/"> Redis Enterprise Software </a> supports the module natively. </p> <p> If you're running Redis Community Edition, you'll also need to <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/installing-redisgears/"> install the RedisGears module </a> before using it. </p> <p> To get started with RedisGears, see the quick start tutorial for <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/python/quickstart/"> Python </a> or <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/jvm/quickstart/"> Java </a> . </p> <h2 id="write-behind-caching-patterns"> Write-behind caching patterns </h2> <p> Redis users typically implement caching by using the look-aside pattern. However, with RedisGears, you can implement write-behind caching strategies as well. </p> <p> Redis publishes RedisGears recipes to support write-behind. You can learn how to use these recipes in our write-behind caching guides for <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/python/recipes/write-behind/"> Python </a> and <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/gears-v1/jvm/recipes/write-behind/"> Java </a> . </p> <h2 id="more-info"> More info </h2> <ul> <li> <a href="https://github.com/RedisGears/RedisGears"> RedisGears 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/gears-v1/"/> <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/syncer_state/replica/.html
<section class="prose w-full py-12 max-w-none"> <h1> Replica syncer state requests </h1> <p class="text-lg -mt-5 mb-10"> Replica syncer state requests </p> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#get-syncer-state"> GET </a> </td> <td> <code> /v1/bdbs/{uid}/syncer_state/replica </code> </td> <td> Get a CRDB replica's syncer state </td> </tr> </tbody> </table> <h2 id="get-syncer-state"> Get replica syncer state </h2> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /v1/bdbs/<span class="o">{</span>int: uid<span class="o">}</span>/syncer_state/replica </span></span></code></pre> </div> <p> Get a CRDB replica's syncer state as JSON. </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/#view_bdb_info"> view_bdb_info </a> </td> <td> admin <br/> cluster_member <br/> cluster_viewer <br/> db_member <br/> db_viewer <br/> user_manager </td> </tr> </tbody> </table> <h3 id="get-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">GET /v1/bdbs/1/syncer_state/replica </span></span></code></pre> </div> <h4 id="headers"> Headers </h4> <table> <thead> <tr> <th> Key </th> <th> Value </th> </tr> </thead> <tbody> <tr> <td> Host </td> <td> The domain name or IP of the cluster. </td> </tr> <tr> <td> Accept </td> <td> application/json </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 requested. </td> </tr> </tbody> </table> <h3 id="get-response"> Response </h3> <p> Returns a JSON object that represents the syncer state. </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">"DB"</span><span class="p">:</span> <span class="mi">22</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"RunID"</span><span class="p">:</span> <span class="mi">1584086516</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="c1">// additional fields... </span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="p">}</span> </span></span></code></pre> </div> <h4 id="get-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> OK </td> </tr> <tr> <td> <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5"> 404 Not Found </a> </td> <td> Syncer state key does not exist </td> </tr> <tr> <td> <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1"> 500 Internal Server Error </a> </td> <td> Internal error </td> </tr> <tr> <td> <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4"> 503 Service Unavailable </a> </td> <td> Redis connection error, service unavailable </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/syncer_state/replica/"/> <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/reset_password/.html
<section class="prose w-full py-12 max-w-none"> <h1> rladmin cluster reset_password </h1> <p class="text-lg -mt-5 mb-10"> Changes the password for a given email. </p> <p> Changes the password for the user associated with the specified email address. </p> <p> Enter a new password when prompted. Then enter the same password when prompted a second time to confirm the password change. </p> <div class="highlight"> <pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rladmin cluster reset_password &lt;user email&gt; </span></span></code></pre> </div> <h3 id="parameters"> Parameters </h3> <table> <thead> <tr> <th> Parameter </th> <th> Type/Value </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> user email </td> <td> email address </td> <td> The email address of the user that needs a password reset </td> </tr> </tbody> </table> <h3 id="returns"> Returns </h3> <p> Reports whether the password change succeeded or an error occurred. </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 reset_password [email protected] </span></span><span class="line"><span class="cl">New password: </span></span><span class="line"><span class="cl">New password <span class="o">(</span>again<span class="o">)</span>: </span></span><span class="line"><span class="cl">Password changed. </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/reset_password/"/> <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/replication/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis replication </h1> <p class="text-lg -mt-5 mb-10"> How Redis supports high availability and failover with replication </p> <p> At the base of Redis replication (excluding the high availability features provided as an additional layer by Redis Cluster or Redis Sentinel) there is a <em> leader follower </em> (master-replica) replication that is simple to use and configure. It allows replica Redis instances to be exact copies of master instances. The replica will automatically reconnect to the master every time the link breaks, and will attempt to be an exact copy of it <em> regardless </em> of what happens to the master. </p> <p> This system works using three main mechanisms: </p> <ol> <li> When a master and a replica instance are well-connected, the master keeps the replica updated by sending a stream of commands to the replica to replicate the effects on the dataset happening on the master side due to: client writes, keys expired or evicted, any other action changing the master dataset. </li> <li> When the link between the master and the replica breaks, for network issues or because a timeout is sensed in the master or the replica, the replica reconnects and attempts to proceed with a partial resynchronization: it means that it will try to just obtain the part of the stream of commands it missed during the disconnection. </li> <li> When a partial resynchronization is not possible, the replica will ask for a full resynchronization. This will involve a more complex process in which the master needs to create a snapshot of all its data, send it to the replica, and then continue sending the stream of commands as the dataset changes. </li> </ol> <p> Redis uses by default asynchronous replication, which being low latency and high performance, is the natural replication mode for the vast majority of Redis use cases. However, Redis replicas asynchronously acknowledge the amount of data they receive periodically with the master. So the master does not wait every time for a command to be processed by the replicas, however it knows, if needed, what replica already processed what command. This allows having optional synchronous replication. </p> <p> Synchronous replication of certain data can be requested by the clients using the <a href="/commands/wait"> <code> WAIT </code> </a> command. However <a href="/commands/wait"> <code> WAIT </code> </a> is only able to ensure there are the specified number of acknowledged copies in the other Redis instances, it does not turn a set of Redis instances into a CP system with strong consistency: acknowledged writes can still be lost during a failover, depending on the exact configuration of the Redis persistence. However, <a href="/docs/latest/commands/wait"> WAIT </a> dramatically reduces the probability of losing a write after a failure event to specific hard-to-trigger failure modes. </p> <p> You can check the Redis Sentinel or Redis Cluster documentation for more information about high availability and failover. The rest of this document mainly describes the basic characteristics of Redis basic replication. </p> <h3 id="important-facts-about-redis-replication"> Important facts about Redis replication </h3> <ul> <li> Redis uses asynchronous replication, with asynchronous replica-to-master acknowledges of the amount of data processed. </li> <li> A master can have multiple replicas. </li> <li> Replicas are able to accept connections from other replicas. Aside from connecting a number of replicas to the same master, replicas can also be connected to other replicas in a cascading-like structure. Since Redis 4.0, all the sub-replicas will receive exactly the same replication stream from the master. </li> <li> Redis replication is non-blocking on the master side. This means that the master will continue to handle queries when one or more replicas perform the initial synchronization or a partial resynchronization. </li> <li> Replication is also largely non-blocking on the replica side. While the replica is performing the initial synchronization, it can handle queries using the old version of the dataset, assuming you configured Redis to do so in redis.conf. Otherwise, you can configure Redis replicas to return an error to clients if the replication stream is down. However, after the initial sync, the old dataset must be deleted and the new one must be loaded. The replica will block incoming connections during this brief window (that can be as long as many seconds for very large datasets). Since Redis 4.0 you can configure Redis so that the deletion of the old data set happens in a different thread, however loading the new initial dataset will still happen in the main thread and block the replica. </li> <li> Replication can be used both for scalability, to have multiple replicas for read-only queries (for example, slow O(N) operations can be offloaded to replicas), or simply for improving data safety and high availability. </li> <li> You can use replication to avoid the cost of having the master writing the full dataset to disk: a typical technique involves configuring your master <code> redis.conf </code> to avoid persisting to disk at all, then connect a replica configured to save from time to time, or with AOF enabled. However, this setup must be handled with care, since a restarting master will start with an empty dataset: if the replica tries to sync with it, the replica will be emptied as well. </li> </ul> <h2 id="safety-of-replication-when-master-has-persistence-turned-off"> Safety of replication when master has persistence turned off </h2> <p> In setups where Redis replication is used, it is strongly advised to have persistence turned on in the master and in the replicas. When this is not possible, for example because of latency concerns due to very slow disks, instances should be configured to <strong> avoid restarting automatically </strong> after a reboot. </p> <p> To better understand why masters with persistence turned off configured to auto restart are dangerous, check the following failure mode where data is wiped from the master and all its replicas: </p> <ol> <li> We have a setup with node A acting as master, with persistence turned down, and nodes B and C replicating from node A. </li> <li> Node A crashes, however it has some auto-restart system, that restarts the process. However since persistence is turned off, the node restarts with an empty data set. </li> <li> Nodes B and C will replicate from node A, which is empty, so they'll effectively destroy their copy of the data. </li> </ol> <p> When Redis Sentinel is used for high availability, also turning off persistence on the master, together with auto restart of the process, is dangerous. For example the master can restart fast enough for Sentinel to not detect a failure, so that the failure mode described above happens. </p> <p> Every time data safety is important, and replication is used with master configured without persistence, auto restart of instances should be disabled. </p> <h2 id="how-redis-replication-works"> How Redis replication works </h2> <p> Every Redis master has a replication ID: it is a large pseudo random string that marks a given history of the dataset. Each master also takes an offset that increments for every byte of replication stream that it is produced to be sent to replicas, to update the state of the replicas with the new changes modifying the dataset. The replication offset is incremented even if no replica is actually connected, so basically every given pair of: </p> <pre><code>Replication ID, offset </code></pre> <p> Identifies an exact version of the dataset of a master. </p> <p> When replicas connect to masters, they use the <a href="/commands/psync"> <code> PSYNC </code> </a> command to send their old master replication ID and the offsets they processed so far. This way the master can send just the incremental part needed. However if there is not enough <em> backlog </em> in the master buffers, or if the replica is referring to an history (replication ID) which is no longer known, then a full resynchronization happens: in this case the replica will get a full copy of the dataset, from scratch. </p> <p> This is how a full synchronization works in more details: </p> <p> The master starts a background saving process to produce an RDB file. At the same time it starts to buffer all new write commands received from the clients. When the background saving is complete, the master transfers the database file to the replica, which saves it on disk, and then loads it into memory. The master will then send all buffered commands to the replica. This is done as a stream of commands and is in the same format of the Redis protocol itself. </p> <p> You can try it yourself via telnet. Connect to the Redis port while the server is doing some work and issue the <a href="/commands/sync"> <code> SYNC </code> </a> command. You'll see a bulk transfer and then every command received by the master will be re-issued in the telnet session. Actually <a href="/commands/sync"> <code> SYNC </code> </a> is an old protocol no longer used by newer Redis instances, but is still there for backward compatibility: it does not allow partial resynchronizations, so now <a href="/commands/psync"> <code> PSYNC </code> </a> is used instead. </p> <p> As already said, replicas are able to automatically reconnect when the master-replica link goes down for some reason. If the master receives multiple concurrent replica synchronization requests, it performs a single background save in to serve all of them. </p> <h2 id="replication-id-explained"> Replication ID explained </h2> <p> In the previous section we said that if two instances have the same replication ID and replication offset, they have exactly the same data. However it is useful to understand what exactly is the replication ID, and why instances have actually two replication IDs: the main ID and the secondary ID. </p> <p> A replication ID basically marks a given <em> history </em> of the data set. Every time an instance restarts from scratch as a master, or a replica is promoted to master, a new replication ID is generated for this instance. The replicas connected to a master will inherit its replication ID after the handshake. So two instances with the same ID are related by the fact that they hold the same data, but potentially at a different time. It is the offset that works as a logical time to understand, for a given history (replication ID), who holds the most updated data set. </p> <p> For instance, if two instances A and B have the same replication ID, but one with offset 1000 and one with offset 1023, it means that the first lacks certain commands applied to the data set. It also means that A, by applying just a few commands, may reach exactly the same state of B. </p> <p> The reason why Redis instances have two replication IDs is because of replicas that are promoted to masters. After a failover, the promoted replica requires to still remember what was its past replication ID, because such replication ID was the one of the former master. In this way, when other replicas will sync with the new master, they will try to perform a partial resynchronization using the old master replication ID. This will work as expected, because when the replica is promoted to master it sets its secondary ID to its main ID, remembering what was the offset when this ID switch happened. Later it will select a new random replication ID, because a new history begins. When handling the new replicas connecting, the master will match their IDs and offsets both with the current ID and the secondary ID (up to a given offset, for safety). In short this means that after a failover, replicas connecting to the newly promoted master don't have to perform a full sync. </p> <p> In case you wonder why a replica promoted to master needs to change its replication ID after a failover: it is possible that the old master is still working as a master because of some network partition: retaining the same replication ID would violate the fact that the same ID and same offset of any two random instances mean they have the same data set. </p> <h2 id="diskless-replication"> Diskless replication </h2> <p> Normally a full resynchronization requires creating an RDB file on disk, then reloading the same RDB from disk to feed the replicas with the data. </p> <p> With slow disks this can be a very stressing operation for the master. Redis version 2.8.18 is the first version to have support for diskless replication. In this setup the child process directly sends the RDB over the wire to replicas, without using the disk as intermediate storage. </p> <h2 id="configuration"> Configuration </h2> <p> To configure basic Redis replication is trivial: just add the following line to the replica configuration file: </p> <pre><code>replicaof 192.168.1.1 6379 </code></pre> <p> Of course you need to replace 192.168.1.1 6379 with your master IP address (or hostname) and port. Alternatively, you can call the <a href="/commands/replicaof"> <code> REPLICAOF </code> </a> command and the master host will start a sync with the replica. </p> <p> There are also a few parameters for tuning the replication backlog taken in memory by the master to perform the partial resynchronization. See the example <code> redis.conf </code> shipped with the Redis distribution for more information. </p> <p> Diskless replication can be enabled using the <code> repl-diskless-sync </code> configuration parameter. The delay to start the transfer to wait for more replicas to arrive after the first one is controlled by the <code> repl-diskless-sync-delay </code> parameter. Please refer to the example <code> redis.conf </code> file in the Redis distribution for more details. </p> <h2 id="read-only-replica"> Read-only replica </h2> <p> Since Redis 2.6, replicas support a read-only mode that is enabled by default. This behavior is controlled by the <code> replica-read-only </code> option in the redis.conf file, and can be enabled and disabled at runtime using <a href="/commands/config-set"> <code> CONFIG SET </code> </a> . </p> <p> Read-only replicas will reject all write commands, so that it is not possible to write to a replica because of a mistake. This does not mean that the feature is intended to expose a replica instance to the internet or more generally to a network where untrusted clients exist, because administrative commands like <a href="/commands/debug"> <code> DEBUG </code> </a> or <a href="/commands/config"> <code> CONFIG </code> </a> are still enabled. The <a href="/docs/latest/operate/oss_and_stack/management/security/"> Security </a> page describes how to secure a Redis instance. </p> <p> You may wonder why it is possible to revert the read-only setting and have replica instances that can be targeted by write operations. The answer is that writable replicas exist only for historical reasons. Using writable replicas can result in inconsistency between the master and the replica, so it is not recommended to use writable replicas. To understand in which situations this can be a problem, we need to understand how replication works. Changes on the master is replicated by propagating regular Redis commands to the replica. When a key expires on the master, this is propagated as a DEL command. If a key which exists on the master but is deleted, expired or has a different type on the replica compared to the master will react differently to commands like DEL, INCR or RPOP propagated from the master than intended. The propagated command may fail on the replica or result in a different outcome. To minimize the risks (if you insist on using writable replicas) we suggest you follow these recommendations: </p> <ul> <li> <p> Don't write to keys in a writable replica that are also used on the master. (This can be hard to guarantee if you don't have control over all the clients that write to the master.) </p> </li> <li> <p> Don't configure an instance as a writable replica as an intermediary step when upgrading a set of instances in a running system. In general, don't configure an instance as a writable replica if it can ever be promoted to a master if you want to guarantee data consistency. </p> </li> </ul> <p> Historically, there were some use cases that were considered legitimate for writable replicas. As of version 7.0, these use cases are now all obsolete and the same can be achieved by other means. For example: </p> <ul> <li> <p> Computing slow Set or Sorted set operations and storing the result in temporary local keys using commands like <a href="/commands/sunionstore"> <code> SUNIONSTORE </code> </a> and <a href="/commands/zinterstore"> <code> ZINTERSTORE </code> </a> . Instead, use commands that return the result without storing it, such as <a href="/commands/sunion"> <code> SUNION </code> </a> and <a href="/commands/zinter"> <code> ZINTER </code> </a> . </p> </li> <li> <p> Using the <a href="/commands/sort"> <code> SORT </code> </a> command (which is not considered a read-only command because of the optional STORE option and therefore cannot be used on a read-only replica). Instead, use <a href="/commands/sort_ro"> <code> SORT_RO </code> </a> , which is a read-only command. </p> </li> <li> <p> Using <a href="/commands/eval"> <code> EVAL </code> </a> and <a href="/commands/evalsha"> <code> EVALSHA </code> </a> are also not considered read-only commands, because the Lua script may call write commands. Instead, use <a href="/commands/eval_ro"> <code> EVAL_RO </code> </a> and <a href="/commands/evalsha_ro"> <code> EVALSHA_RO </code> </a> where the Lua script can only call read-only commands. </p> </li> </ul> <p> While writes to a replica will be discarded if the replica and the master resync or if the replica is restarted, there is no guarantee that they will sync automatically. </p> <p> Before version 4.0, writable replicas were incapable of expiring keys with a time to live set. This means that if you use <a href="/commands/expire"> <code> EXPIRE </code> </a> or other commands that set a maximum TTL for a key, the key will leak, and while you may no longer see it while accessing it with read commands, you will see it in the count of keys and it will still use memory. Redis 4.0 RC3 and greater versions are able to evict keys with TTL as masters do, with the exceptions of keys written in DB numbers greater than 63 (but by default Redis instances only have 16 databases). Note though that even in versions greater than 4.0, using <a href="/commands/expire"> <code> EXPIRE </code> </a> on a key that could ever exists on the master can cause inconsistency between the replica and the master. </p> <p> Also note that since Redis 4.0 replica writes are only local, and are not propagated to sub-replicas attached to the instance. Sub-replicas instead will always receive the replication stream identical to the one sent by the top-level master to the intermediate replicas. So for example in the following setup: </p> <pre><code>A ---&gt; B ---&gt; C </code></pre> <p> Even if <code> B </code> is writable, C will not see <code> B </code> writes and will instead have identical dataset as the master instance <code> A </code> . </p> <h2 id="setting-a-replica-to-authenticate-to-a-master"> Setting a replica to authenticate to a master </h2> <p> If your master has a password via <code> requirepass </code> , it's trivial to configure the replica to use that password in all sync operations. </p> <p> To do it on a running instance, use <code> redis-cli </code> and type: </p> <pre><code>config set masterauth &lt;password&gt; </code></pre> <p> To set it permanently, add this to your config file: </p> <pre><code>masterauth &lt;password&gt; </code></pre> <h2 id="allow-writes-only-with-n-attached-replicas"> Allow writes only with N attached replicas </h2> <p> Starting with Redis 2.8, you can configure a Redis master to accept write queries only if at least N replicas are currently connected to the master. </p> <p> However, because Redis uses asynchronous replication it is not possible to ensure the replica actually received a given write, so there is always a window for data loss. </p> <p> This is how the feature works: </p> <ul> <li> Redis replicas ping the master every second, acknowledging the amount of replication stream processed. </li> <li> Redis masters will remember the last time it received a ping from every replica. </li> <li> The user can configure a minimum number of replicas that have a lag not greater than a maximum number of seconds. </li> </ul> <p> If there are at least N replicas, with a lag less than M seconds, then the write will be accepted. </p> <p> You may think of it as a best effort data safety mechanism, where consistency is not ensured for a given write, but at least the time window for data loss is restricted to a given number of seconds. In general bound data loss is better than unbound one. </p> <p> If the conditions are not met, the master will instead reply with an error and the write will not be accepted. </p> <p> There are two configuration parameters for this feature: </p> <ul> <li> min-replicas-to-write <code> &lt;number of replicas&gt; </code> </li> <li> min-replicas-max-lag <code> &lt;number of seconds&gt; </code> </li> </ul> <p> For more information, please check the example <code> redis.conf </code> file shipped with the Redis source distribution. </p> <h2 id="how-redis-replication-deals-with-expires-on-keys"> How Redis replication deals with expires on keys </h2> <p> Redis expires allow keys to have a limited time to live (TTL). Such a feature depends on the ability of an instance to count the time, however Redis replicas correctly replicate keys with expires, even when such keys are altered using Lua scripts. </p> <p> To implement such a feature Redis cannot rely on the ability of the master and replica to have synced clocks, since this is a problem that cannot be solved and would result in race conditions and diverging data sets, so Redis uses three main techniques to make the replication of expired keys able to work: </p> <ol> <li> Replicas don't expire keys, instead they wait for masters to expire the keys. When a master expires a key (or evict it because of LRU), it synthesizes a <a href="/commands/del"> <code> DEL </code> </a> command which is transmitted to all the replicas. </li> <li> However because of master-driven expire, sometimes replicas may still have in memory keys that are already logically expired, since the master was not able to provide the <a href="/commands/del"> <code> DEL </code> </a> command in time. To deal with that the replica uses its logical clock to report that a key does not exist <strong> only for read operations </strong> that don't violate the consistency of the data set (as new commands from the master will arrive). In this way replicas avoid reporting logically expired keys that are still existing. In practical terms, an HTML fragments cache that uses replicas to scale will avoid returning items that are already older than the desired time to live. </li> <li> During Lua scripts executions no key expiries are performed. As a Lua script runs, conceptually the time in the master is frozen, so that a given key will either exist or not for all the time the script runs. This prevents keys expiring in the middle of a script, and is needed to send the same script to the replica in a way that is guaranteed to have the same effects in the data set. </li> </ol> <p> Once a replica is promoted to a master it will start to expire keys independently, and will not require any help from its old master. </p> <h2 id="configuring-replication-in-docker-and-nat"> Configuring replication in Docker and NAT </h2> <p> When Docker, or other types of containers using port forwarding, or Network Address Translation is used, Redis replication needs some extra care, especially when using Redis Sentinel or other systems where the master <a href="/commands/info"> <code> INFO </code> </a> or <a href="/commands/role"> <code> ROLE </code> </a> commands output is scanned to discover replicas' addresses. </p> <p> The problem is that the <a href="/commands/role"> <code> ROLE </code> </a> command, and the replication section of the <a href="/commands/info"> <code> INFO </code> </a> output, when issued into a master instance, will show replicas as having the IP address they use to connect to the master, which, in environments using NAT may be different compared to the logical address of the replica instance (the one that clients should use to connect to replicas). </p> <p> Similarly the replicas will be listed with the listening port configured into <code> redis.conf </code> , that may be different from the forwarded port in case the port is remapped. </p> <p> To fix both issues, it is possible, since Redis 3.2.2, to force a replica to announce an arbitrary pair of IP and port to the master. The two configurations directives to use are: </p> <pre><code>replica-announce-ip 5.5.5.5 replica-announce-port 1234 </code></pre> <p> And are documented in the example <code> redis.conf </code> of recent Redis distributions. </p> <h2 id="the-info-and-role-command"> The INFO and ROLE command </h2> <p> There are two Redis commands that provide a lot of information on the current replication parameters of master and replica instances. One is <a href="/commands/info"> <code> INFO </code> </a> . If the command is called with the <code> replication </code> argument as <code> INFO replication </code> only information relevant to the replication are displayed. Another more computer-friendly command is <a href="/commands/role"> <code> ROLE </code> </a> , that provides the replication status of masters and replicas together with their replication offsets, list of connected replicas and so forth. </p> <h2 id="partial-sync-after-restarts-and-failovers"> Partial sync after restarts and failovers </h2> <p> Since Redis 4.0, when an instance is promoted to master after a failover, it will still be able to perform a partial resynchronization with the replicas of the old master. To do so, the replica remembers the old replication ID and offset of its former master, so can provide part of the backlog to the connecting replicas even if they ask for the old replication ID. </p> <p> However the new replication ID of the promoted replica will be different, since it constitutes a different history of the data set. For example, the master can return available and can continue accepting writes for some time, so using the same replication ID in the promoted replica would violate the rule that a replication ID and offset pair identifies only a single data set. </p> <p> Moreover, replicas - when powered off gently and restarted - are able to store in the <code> RDB </code> file the information needed to resync with their master. This is useful in case of upgrades. When this is needed, it is better to use the <a href="/commands/shutdown"> <code> SHUTDOWN </code> </a> command in order to perform a <code> save &amp; quit </code> operation on the replica. </p> <p> It is not possible to partially sync a replica that restarted via the AOF file. However the instance may be turned to RDB persistence before shutting down it, than can be restarted, and finally AOF can be enabled again. </p> <h2 id="maxmemory-on-replicas"> <code> Maxmemory </code> on replicas </h2> <p> By default, a replica will ignore <code> maxmemory </code> (unless it is promoted to master after a failover or manually). It means that the eviction of keys will be handled by the master, sending the DEL commands to the replica as keys evict in the master side. </p> <p> This behavior ensures that masters and replicas stay consistent, which is usually what you want. However, if your replica is writable, or you want the replica to have a different memory setting, and you are sure all the writes performed to the replica are idempotent, then you may change this default (but be sure to understand what you are doing). </p> <p> Note that since the replica by default does not evict, it may end up using more memory than what is set via <code> maxmemory </code> (since there are certain buffers that may be larger on the replica, or data structures may sometimes take more memory and so forth). Make sure you monitor your replicas, and make sure they have enough memory to never hit a real out-of-memory condition before the master hits the configured <code> maxmemory </code> setting. </p> <p> To change this behavior, you can allow a replica to not ignore the <code> maxmemory </code> . The configuration directives to use is: </p> <pre><code>replica-ignore-maxmemory no </code></pre> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/oss_and_stack/management/replication/"/> <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/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/7.4/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/oss_and_stack/stack-with-enterprise/release-notes/redisgraph/redisgraph-2.0-release-notes.html
<section class="prose w-full py-12 max-w-none"> <h1> RedisGraph 2.0 release notes </h1> <p class="text-lg -mt-5 mb-10"> Enabled graph-aided search and graph visualisation. Cypher coverage. Performance improvements. </p> <h2 id="requirements"> Requirements </h2> <p> RedisGraph v2.0.21 requires: </p> <ul> <li> Minimum Redis compatibility version (database): 5.0.7 </li> <li> Minimum Redis Enterprise Software version (cluster): 5.4.11 </li> </ul> <h2 id="v2021-october-2020"> v2.0.21 (October 2020) </h2> <p> This is a maintenance release for version 2.0. </p> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> <p> Minor enhancements: </p> <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1326"> 1326 </a> , # <a href="https://github.com/RedisGraph/RedisGraph/pull/1330"> 1330 </a> Enable comments in Cypher queries. </li> </ul> </li> <li> <p> Bug fixes: </p> </li> <li> <p> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1338"> 1338 </a> Update parser to support negative values. </p> </li> <li> <p> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1319"> 1319 </a> Replace assertion with runtime error - execution plan building process is unable locate an operation suitable for a filter. </p> </li> <li> <p> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1184"> 1184 </a> EXPLAIN and PROFILE are invalid clauses. They have counterpart commands <code> GRAPH.EXPLAIN </code> and <code> GRAPH.PROFILE </code> </p> </li> <li> <p> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1212"> 1212 </a> Emit error on the creation of undirected edges. </p> </li> </ul> <h2 id="v2020-september-2020"> v2.0.20 (September 2020) </h2> <p> This is a maintenance release for version 2.0. </p> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> <p> Minor updates: </p> <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1315"> 1315 </a> RediSearch 1.8.3 </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1276"> 1276 </a> Graph info is added to Redis crash report. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1265"> 1265 </a> Debug assertion functionality. </li> </ul> </li> </ul> <h2 id="v2019-august-2020"> v2.0.19 (August 2020) </h2> <p> This is a maintenance release for version 2.0. </p> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Minor updates: <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1229"> 1229 </a> Upgrade RediSearch dependency to 1.8.2 </li> </ul> </li> <li> Performance enhancements: <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1218"> 1218 </a> Enable parameters support for ID-based entity retrieval </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1242"> 1242 </a> Improve update logic, update RediSearch indices only once per update </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1226"> 1226 </a> Let RediSearch perform document deletion when replacing a document </li> </ul> </li> <li> Bug Fixes: <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1223"> 1223 </a> Resolve race condition in accessing/updating attribute maps. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1196"> 1196 </a> Enable RediSearch <a href="/docs/latest/develop/interact/search-and-query/administration/gc/"> Garbage Collection </a> </li> </ul> </li> </ul> <h2 id="v2015-25-june-2020"> v2.0.15 (25 June 2020) </h2> <p> This is a maintenance release for version 2.0. </p> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Bug Fixes: <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1159"> 1159 </a> <code> IN </code> operator didn't result in an index array lookup with parameterised array ( <code> IN $param </code> ). </li> </ul> </li> </ul> <h2 id="v2014-22-june-2020"> v2.0.14 (22 June 2020) </h2> <p> This is a maintenance release for version 2.0. </p> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Bug Fixes: <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1157"> 1157 </a> Index search not using query parameters. </li> </ul> </li> </ul> <h2 id="v2013-15-june-2020"> v2.0.13 (15 June 2020) </h2> <p> This is a maintenance release for version 2.0. </p> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Enhancements: <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1118"> 1118 </a> Added module configuration parameters for the number of threads in OpenMP and concurrent queries. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1121"> 1121 </a> <a href="https://github.com/RediSearch/RediSearch/"> RediSearch </a> v1.8.1 </li> </ul> </li> </ul> <h2 id="v2012-may-2020"> v2.0.12 (May 2020) </h2> <p> This is a maintenance release for version 2.0. </p> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Enhancements: <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1103"> 1103 </a> RediSearch 1.8. This upgrade will reduce the resources required for Garbage Collection of indices inside RedisGraph. </li> </ul> </li> </ul> <h2 id="v2011-april-2020"> v2.0.11 (April 2020) </h2> <p> This is a maintenance release for version 2.0. </p> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Minor Enhancements: <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1056"> 1056 </a> Added <code> DISTINCT </code> support for paths and arrays. </li> </ul> </li> <li> Minor Bugfixes: <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1056"> 1056 </a> Streamlined logic for uniquing entities. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/1056"> 1056 </a> Enabled comparison routine for paths. </li> </ul> </li> </ul> <h2 id="v2010-29-march-2020"> v2.0.10 (29 March 2020) </h2> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Minor Enhancements: <ul> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/1035"> 1035 </a> - RediSearch version <a href="https://github.com/RediSearch/RediSearch/releases/tag/v1.6.11"> 1.6.11 </a> . </li> </ul> </li> <li> Bugfixes: <ul> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/1017"> 1017 </a> , # <a href="https://github.com/redisgraph/redisgraph/issues/1019"> 1019 </a> - Algebraic expressions correctness. </li> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/1020"> 1020 </a> - Support parameterised SKIP and LIMIT. </li> </ul> </li> </ul> <h2 id="v209-19-march-2020"> v2.0.9 (19 March 2020) </h2> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Bugfixes: <ul> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/1028"> 1028 </a> Ensure proper placement of Index Scans when partially replacing Filter ops. </li> </ul> </li> </ul> <h2 id="v208-18-march-2020"> v2.0.8 (18 March 2020) </h2> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Bugfixes: <ul> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/1023"> 1023 </a> Fix regression in checking argument counts to GRAPH endpoints. </li> </ul> </li> </ul> <h2 id="v206-15-march-2020"> v2.0.6 (15 March 2020) </h2> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/897"> 897 </a> GRAPH.SLOWLOG </li> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/1004"> 1004 </a> Re-enable GRAPH.PROFILE </li> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/917"> 917 </a> , # <a href="https://github.com/redisgraph/redisgraph/issues/991"> 991 </a> , # <a href="https://github.com/redisgraph/redisgraph/issues/940"> 940 </a> , # <a href="https://github.com/redisgraph/redisgraph/issues/984"> 984 </a> Memory leak fixes </li> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/925"> 925 </a> Bug fix within RediSearch </li> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/1001"> 1001 </a> Bug fix label scan invalid range </li> </ul> <h2 id="v205-23-february-2020"> v2.0.5 (23 February 2020) </h2> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Enhancement: <ul> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/955"> 955 </a> Switch OR,AND boolean semiring to ANY,PAIR. </li> </ul> </li> </ul> <h2 id="v204-23-february-2020"> v2.0.4 (23 February 2020) </h2> <p> Details: </p> <ul> <li> Enhancement: <ul> <li> Reduce GraphBLAS size </li> </ul> </li> </ul> <h2 id="v202-23-february-2020"> v2.0.2 (23 February 2020) </h2> <p> Headlines: </p> <ul> <li> This release improves overall stability and provides fixes for issues found after the previous release. </li> </ul> <p> Details: </p> <ul> <li> Improved error reporting: <ul> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/925"> 925 </a> RediSearch query error reporting </li> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/919"> 919 </a> Added non existing entity runtime error </li> </ul> </li> <li> Enhancements: <ul> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/942"> 942 </a> Update GraphBLAS version (3.2.0) </li> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/922"> 922 </a> Filter tree compaction </li> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/906"> 906 </a> Optimize cartesian product </li> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/898"> 898 </a> Granular matrix locking </li> </ul> </li> <li> Bug fixes: <ul> <li> # <a href="https://github.com/redisgraph/redisgraph/issues/917"> 917 </a> # <a href="https://github.com/redisgraph/redisgraph/issues/940"> 940 </a> Resolve memory leaks </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/pull/938"> 938 </a> Label matrix should be fetch right before eval </li> </ul> </li> </ul> <h2 id="v20-ga-201---january-2020"> v2.0 GA (2.0.1 - January 2020) </h2> <p> This is the General Availability (GA) release of RedisGraph 2.0 (2.0.1)! </p> <p> Headlines: </p> <ul> <li> Full Text Search (FTS) enabling Graph-aided Search. </li> <li> Full graph response enabling visualisation. </li> <li> Substantial amount of Cypher coverage. </li> <li> Performance improvements of up to 4x compared to RedisGraph 1.2. </li> </ul> <p> (We will blog about this release soon including performance improvements results and the link here) </p> <p> Full details: </p> <ul> <li> Major features <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/339"> 339 </a> Full Graph Response. RedisGraph now allows to return Graph entities such as Nodes and Relationships. This feature also enables graph visualisation. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/558"> 558 </a> Indexing functionality replaced by <a href="redisearch.io"> RediSearch </a> . This results in support for <ul> <li> compound indices </li> <li> full text search </li> <li> graph-aided search </li> </ul> </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/691"> 691 </a> RediSearch index is used with <code> IN </code> operator on indexed properties. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/488"> 488 </a> Replace flex/lemon parser with <a href="https://github.com/cleishm/libcypher-parser"> libcypher-parser </a> . </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/574"> 574 </a> Introduction of the array data type. This introduces significant support of Cypher as well as properties can be arrays on both nodes and relationships. </li> <li> Cypher <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/714"> 714 </a> <code> MERGE </code> can be combined with any other clause. <code> MERGE </code> will take into account bounded entities. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/786"> 786 </a> Support for passing all supported graph data types (Node, Relationship, Array,...) as arguments to procedure calls, rather than requiring all arguments to be Strings. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/708"> 708 </a> Named path support. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/717"> 717 </a> <code> count(*) </code> </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/730"> 730 </a> <code> UNION </code> </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/757"> 757 </a> <code> coalesce </code> </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/658"> 658 </a> Support for <code> COUNT DISTINCT </code> </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/574"> 574 </a> with the array data support comes <code> IN </code> , <code> collect </code> , <code> head </code> , <code> range </code> , <code> reverse </code> , <code> size </code> , <code> tail </code> </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/624"> 624 </a> <code> randomUUID() </code> </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/632"> 632 </a> <code> IS NULL </code> and <code> IS NOT NULL </code> . </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/594"> 594 </a> Support dynamic inline properties for <code> CREATE </code> and <code> MERGE </code> patterns. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/583"> 583 </a> <code> NOT </code> Operator. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/569"> 569 </a> <code> timestamp() </code> function. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/586"> 586 </a> <code> CASE WHEN </code> (simple form). </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/582"> 582 </a> <code> contains </code> function. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/596"> 596 </a> <code> indegree </code> and <code> outdegree </code> functions for nodes. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/587"> 587 </a> improved boolean logic. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/539"> 539 </a> Reusable entities in pattern matching. </li> </ul> </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/668"> 668 </a> PageRank support. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/713"> 713 </a> Parameterised queries support. Most client drivers are updated. This enables future performance enhancements for query caching. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/662"> 662 </a> Support for AOF. </li> </ul> </li> <li> Enhancements <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/752"> 752 </a> Use GraphBLAS 3.1.1. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/674"> 674 </a> <code> GRAPH.QUERY </code> will not fail even if graph doesn't exist. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/613"> 613 </a> Runtime arithmetic error handling. </li> </ul> </li> <li> Performance Improvements <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/773"> 773 </a> Bulk deletion of relationships. Deletion of relationships within the same query will be efficiently handled by batch operations in GraphBLAS. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/783"> 783 </a> Better replication support. Only write queries that mutate the graph or create indices will be replicated to AOF and slaves. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/783"> 783 </a> Better commit flow. The Redis Global Lock and RedisGraphs's R/W lock are released once writes are done. Fixed duplicate replications in queries with multiple write segments. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/640"> 640 </a> GraphBlas to support OpenMP. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/532"> 532 </a> # <a href="https://github.com/RedisGraph/RedisGraph/issues/535"> 535 </a> Counting edges of given type by reducing matrices. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/534"> 534 </a> # <a href="https://github.com/RedisGraph/RedisGraph/issues/571"> 571 </a> Query parsing and <code> GRAPH.EXPLAIN </code> in dedicated thread. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/550"> 550 </a> # <a href="https://github.com/RedisGraph/RedisGraph/issues/555"> 555 </a> Optimize cartesian product by reducing to join. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/641"> 641 </a> Cartesian products with multiple incoming streams &gt;2 can now be optimized with "HashJoin". </li> </ul> </li> <li> Bugfixes <ul> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/783"> 783 </a> Master-replica replication - slaves were dropping index mutations caused by procedure calls. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/785"> 785 </a> Solved several major memory leaks. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/795"> 795 </a> The underlying graph object's attributes were not updated on <code> RENAME </code> . </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/720"> 720 </a> Validation of function calls in <code> WITH </code> and <code> CREATE </code> clauses e.g. <code> CREATE (a {v: fake()}) </code> . </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/732"> 732 </a> , # <a href="https://github.com/RedisGraph/RedisGraph/issues/736"> 736 </a> , # <a href="https://github.com/RedisGraph/RedisGraph/issues/747"> 747 </a> Detect cycles in graph and generate algebraic expression. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/734"> 734 </a> Fix access of uninitialised GrB_Info. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/735"> 735 </a> Index scans with <code> IN </code> filters did not compare with strings properly, </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/758"> 758 </a> Validate that during <code> UNION </code> all return clauses are annotated. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/412"> 412 </a> Better handling for <code> GRAPH.DELETE </code> . </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/537"> 537 </a> Wrong row index within expand-into, enabled few TCK tests. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/591"> 591 </a> Emit validation error when an alias refers to both nodes and edges. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/606"> 606 </a> Fix Record ID of edges held in ExpandInto op. </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/607"> 607 </a> All ops NULL-set variables in their free routines (memory). </li> <li> # <a href="https://github.com/RedisGraph/RedisGraph/issues/893"> 893 </a> Preserve the children array order when replacing operations. </li> </ul> </li> </ul> <div class="alert p-3 relative flex flex-row items-center text-base bg-redis-pencil-200 rounded-md"> <div class="p-2 pr-5"> <svg fill="none" height="21" viewbox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"> <circle cx="10.5" cy="10.5" r="9.75" stroke="currentColor" stroke-width="1.5"> </circle> <path d="M10.5 14V16" stroke="currentColor" stroke-width="2"> </path> <path d="M10.5 5V12" stroke="currentColor" stroke-width="2"> </path> </svg> </div> <div class="p-1 pl-6 border-l border-l-redis-ink-900 border-opacity-50"> <div class="font-medium"> Note: </div> The version inside Redis will be 20001 or 2.0.1 in semantic versioning. </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/redisgraph/redisgraph-2.0-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/operate/rs/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/installing-upgrading/quickstarts/redis-enterprise-software-quickstart/"> Redis Enterprise Software </a> </p> </li> <li> <p> <a href="/docs/latest/operate/rs/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/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/databases/durability-ha/consistency/.html
<section class="prose w-full py-12 max-w-none"> <h1> Consistency during replication </h1> <p class="text-lg -mt-5 mb-10"> Explains the order write operations are communicated from app to proxy to shards for both non-blocking Redis write operations and blocking write operations on replication. </p> <p> Redis Enterprise Software comes with the ability to replicate data to another database instance for high availability and persist in-memory data on disk permanently for durability. With the <a href="/docs/latest/commands/wait/"> <code> WAIT </code> </a> command, you can control the consistency and durability guarantees for the replicated and persisted database. </p> <h2 id="non-blocking-redis-write-operation"> Non-blocking Redis write operation </h2> <p> Any updates that are issued to the database are typically performed with the following flow: </p> <ol> <li> The application issues a write. </li> <li> The proxy communicates with the correct primary (also known as master) shard in the system that contains the given key. </li> <li> The shard writes the data and sends an acknowledgment to the proxy. </li> <li> The proxy sends the acknowledgment back to the application. </li> <li> The write is communicated from the primary shard to the replica. </li> <li> The replica acknowledges the write back to the primary shard. </li> <li> The write to a replica is persisted to disk. </li> <li> The write is acknowledged within the replica. </li> </ol> <a href="/docs/latest/images/rs/weak-consistency.png" sdata-lightbox="/images/rs/weak-consistency.png"> <img src="/docs/latest/images/rs/weak-consistency.png"/> </a> <h2 id="blocking-write-operation-on-replication"> Blocking write operation on replication </h2> <p> With the <a href="/docs/latest/commands/wait/"> <code> WAIT </code> </a> or <a href="/docs/latest/commands/waitaof/"> <code> WAITAOF </code> </a> commands, applications can ask to wait for acknowledgments only after replication or persistence is confirmed on the replica. The flow of a write operation with <code> WAIT </code> or <code> WAITAOF </code> is: </p> <ol> <li> The application issues a write. </li> <li> The proxy communicates with the correct primary shard in the system that contains the given key. </li> <li> Replication communicates the update to the replica shard. </li> <li> If using <code> WAITAOF </code> and the AOF every write setting, the replica persists the update to disk before sending the acknowledgment. </li> <li> The acknowledgment is sent back from the replica all the way to the proxy with steps 5 to 8. </li> </ol> <p> The application only gets the acknowledgment from the write after durability is achieved with replication to the replica for <code> WAIT </code> or <code> WAITAOF </code> and to the persistent storage for <code> WAITAOF </code> only. </p> <a href="/docs/latest/images/rs/strong-consistency.png" sdata-lightbox="/images/rs/strong-consistency.png"> <img src="/docs/latest/images/rs/strong-consistency.png"/> </a> <p> The <code> WAIT </code> command always returns the number of replicas that acknowledged the write commands sent by the current client before the <code> WAIT </code> command, both in the case where the specified number of replicas are reached, or when the timeout is reached. In Redis Enterprise Software, the number of replicas for HA enabled databases is always 1. </p> <p> See the <a href="/docs/latest/commands/waitaof/"> <code> WAITAOF </code> </a> command for details for enhanced data safety and durability capabilities introduced with Redis 7.2. </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/durability-ha/consistency/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/develop/interact/programmability/eval-intro.html
<section class="prose w-full py-12"> <h1> Scripting with Lua </h1> <p class="text-lg -mt-5 mb-10"> Executing Lua in Redis </p> <p> Redis lets users upload and execute Lua scripts on the server. Scripts can employ programmatic control structures and use most of the <a href="/docs/latest/commands/"> commands </a> while executing to access the database. Because scripts execute in the server, reading and writing data from scripts is very efficient. </p> <p> Redis guarantees the script's atomic execution. While executing the script, all server activities are blocked during its entire runtime. These semantics mean that all of the script's effects either have yet to happen or had already happened. </p> <p> Scripting offers several properties that can be valuable in many cases. These include: </p> <ul> <li> Providing locality by executing logic where data lives. Data locality reduces overall latency and saves networking resources. </li> <li> Blocking semantics that ensure the script's atomic execution. </li> <li> Enabling the composition of simple capabilities that are either missing from Redis or are too niche to be a part of it. </li> </ul> <p> Lua lets you run part of your application logic inside Redis. Such scripts can perform conditional updates across multiple keys, possibly combining several different data types atomically. </p> <p> Scripts are executed in Redis by an embedded execution engine. Presently, Redis supports a single scripting engine, the <a href="https://www.lua.org/"> Lua 5.1 </a> interpreter. Please refer to the <a href="/docs/latest/develop/interact/programmability/lua-api"> Redis Lua API Reference </a> page for complete documentation. </p> <p> Although the server executes them, Eval scripts are regarded as a part of the client-side application, which is why they're not named, versioned, or persisted. So all scripts may need to be reloaded by the application at any time if missing (after a server restart, fail-over to a replica, etc.). As of version 7.0, <a href="/docs/latest/develop/interact/programmability/functions-intro/"> Redis Functions </a> offer an alternative approach to programmability which allow the server itself to be extended with additional programmed logic. </p> <h2 id="getting-started"> Getting started </h2> <p> We'll start scripting with Redis by using the <a href="/docs/latest/commands/eval/"> <code> EVAL </code> </a> command. </p> <p> Here's our first example: </p> <pre tabindex="0"><code>&gt; EVAL "return 'Hello, scripting!'" 0 "Hello, scripting!" </code></pre> <p> In this example, <a href="/docs/latest/commands/eval/"> <code> EVAL </code> </a> takes two arguments. The first argument is a string that consists of the script's Lua source code. The script doesn't need to include any definitions of Lua function. It is just a Lua program that will run in the Redis engine's context. </p> <p> The second argument is the number of arguments that follow the script's body, starting from the third argument, representing Redis key names. In this example, we used the value <em> 0 </em> because we didn't provide the script with any arguments, whether the names of keys or not. </p> <h2 id="script-parameterization"> Script parameterization </h2> <p> It is possible, although highly ill-advised, to have the application dynamically generate script source code per its needs. For example, the application could send these two entirely different, but at the same time perfectly identical scripts: </p> <pre tabindex="0"><code>redis&gt; EVAL "return 'Hello'" 0 "Hello" redis&gt; EVAL "return 'Scripting!'" 0 "Scripting!" </code></pre> <p> Although this mode of operation isn't blocked by Redis, it is an anti-pattern due to script cache considerations (more on the topic below). Instead of having your application generate subtle variations of the same scripts, you can parametrize them and pass any arguments needed for to execute them. </p> <p> The following example demonstrates how to achieve the same effects as above, but via parameterization: </p> <pre tabindex="0"><code>redis&gt; EVAL "return ARGV[1]" 0 Hello "Hello" redis&gt; EVAL "return ARGV[1]" 0 Parameterization! "Parameterization!" </code></pre> <p> At this point, it is essential to understand the distinction Redis makes between input arguments that are names of keys and those that aren't. </p> <p> While key names in Redis are just strings, unlike any other string values, these represent keys in the database. The name of a key is a fundamental concept in Redis and is the basis for operating the Redis Cluster. </p> <p> <strong> Important: </strong> to ensure the correct execution of scripts, both in standalone and clustered deployments, all names of keys that a script accesses must be explicitly provided as input key arguments. The script <strong> should only </strong> access keys whose names are given as input arguments. Scripts <strong> should never </strong> access keys with programmatically-generated names or based on the contents of data structures stored in the database. </p> <p> Any input to the function that isn't the name of a key is a regular input argument. </p> <p> In the example above, both <em> Hello </em> and <em> Parameterization! </em> regular input arguments for the script. Because the script doesn't touch any keys, we use the numerical argument <em> 0 </em> to specify there are no key name arguments. The execution context makes arguments available to the script through <a href="/docs/latest/develop/interact/programmability/lua-api#the-keys-global-variable"> <em> KEYS </em> </a> and <a href="/docs/latest/develop/interact/programmability/lua-api#the-argv-global-variable"> <em> ARGV </em> </a> global runtime variables. The <em> KEYS </em> table is pre-populated with all key name arguments provided to the script before its execution, whereas the <em> ARGV </em> table serves a similar purpose but for regular arguments. </p> <p> The following attempts to demonstrate the distribution of input arguments between the scripts <em> KEYS </em> and <em> ARGV </em> runtime global variables: </p> <pre tabindex="0"><code>redis&gt; EVAL "return { KEYS[1], KEYS[2], ARGV[1], ARGV[2], ARGV[3] }" 2 key1 key2 arg1 arg2 arg3 1) "key1" 2) "key2" 3) "arg1" 4) "arg2" 5) "arg3" </code></pre> <p> <strong> Note: </strong> as can been seen above, Lua's table arrays are returned as <a href="/docs/latest/develop/reference/protocol-spec/#resp-arrays"> RESP2 array replies </a> , so it is likely that your client's library will convert it to the native array data type in your programming language. Please refer to the rules that govern <a href="/docs/latest/develop/interact/programmability/lua-api#data-type-conversion"> data type conversion </a> for more pertinent information. </p> <h2 id="interacting-with-redis-from-a-script"> Interacting with Redis from a script </h2> <p> It is possible to call Redis commands from a Lua script either via <a href="/docs/latest/develop/interact/programmability/lua-api#redis.call"> <code> redis.call() </code> </a> or <a href="/docs/latest/develop/interact/programmability/lua-api#redis.pcall"> <code> redis.pcall() </code> </a> . </p> <p> The two are nearly identical. Both execute a Redis command along with its provided arguments, if these represent a well-formed command. However, the difference between the two functions lies in the manner in which runtime errors (such as syntax errors, for example) are handled. Errors raised from calling <code> redis.call() </code> function are returned directly to the client that had executed it. Conversely, errors encountered when calling the <code> redis.pcall() </code> function are returned to the script's execution context instead for possible handling. </p> <p> For example, consider the following: </p> <pre tabindex="0"><code>&gt; EVAL "return redis.call('SET', KEYS[1], ARGV[1])" 1 foo bar OK </code></pre> <p> The above script accepts one key name and one value as its input arguments. When executed, the script calls the <a href="/docs/latest/commands/set/"> <code> SET </code> </a> command to set the input key, <em> foo </em> , with the string value "bar". </p> <h2 id="script-cache"> Script cache </h2> <p> Until this point, we've used the <a href="/docs/latest/commands/eval/"> <code> EVAL </code> </a> command to run our script. </p> <p> Whenever we call <a href="/docs/latest/commands/eval/"> <code> EVAL </code> </a> , we also include the script's source code with the request. Repeatedly calling <a href="/docs/latest/commands/eval/"> <code> EVAL </code> </a> to execute the same set of parameterized scripts, wastes both network bandwidth and also has some overheads in Redis. Naturally, saving on network and compute resources is key, so, instead, Redis provides a caching mechanism for scripts. </p> <p> Every script you execute with <a href="/docs/latest/commands/eval/"> <code> EVAL </code> </a> is stored in a dedicated cache that the server keeps. The cache's contents are organized by the scripts' SHA1 digest sums, so the SHA1 digest sum of a script uniquely identifies it in the cache. You can verify this behavior by running <a href="/docs/latest/commands/eval/"> <code> EVAL </code> </a> and calling <a href="/docs/latest/commands/info/"> <code> INFO </code> </a> afterward. You'll notice that the <em> used_memory_scripts_eval </em> and <em> number_of_cached_scripts </em> metrics grow with every new script that's executed. </p> <p> As mentioned above, dynamically-generated scripts are an anti-pattern. Generating scripts during the application's runtime may, and probably will, exhaust the host's memory resources for caching them. Instead, scripts should be as generic as possible and provide customized execution via their arguments. </p> <p> A script is loaded to the server's cache by calling the <a href="/docs/latest/commands/script-load/"> <code> SCRIPT LOAD </code> </a> command and providing its source code. The server doesn't execute the script, but instead just compiles and loads it to the server's cache. Once loaded, you can execute the cached script with the SHA1 digest returned from the server. </p> <p> Here's an example of loading and then executing a cached script: </p> <pre tabindex="0"><code>redis&gt; SCRIPT LOAD "return 'Immabe a cached script'" "c664a3bf70bd1d45c4284ffebb65a6f2299bfc9f" redis&gt; EVALSHA c664a3bf70bd1d45c4284ffebb65a6f2299bfc9f 0 "Immabe a cached script" </code></pre> <h3 id="cache-volatility"> Cache volatility </h3> <p> The Redis script cache is <strong> always volatile </strong> . It isn't considered as a part of the database and is <strong> not persisted </strong> . The cache may be cleared when the server restarts, during fail-over when a replica assumes the master role, or explicitly by <a href="/docs/latest/commands/script-flush/"> <code> SCRIPT FLUSH </code> </a> . That means that cached scripts are ephemeral, and the cache's contents can be lost at any time. </p> <p> Applications that use scripts should always call <a href="/docs/latest/commands/evalsha/"> <code> EVALSHA </code> </a> to execute them. The server returns an error if the script's SHA1 digest is not in the cache. For example: </p> <pre tabindex="0"><code>redis&gt; EVALSHA ffffffffffffffffffffffffffffffffffffffff 0 (error) NOSCRIPT No matching script </code></pre> <p> In this case, the application should first load it with <a href="/docs/latest/commands/script-load/"> <code> SCRIPT LOAD </code> </a> and then call <a href="/docs/latest/commands/evalsha/"> <code> EVALSHA </code> </a> once more to run the cached script by its SHA1 sum. Most of Redis' clients already provide utility APIs for doing that automatically. Please consult your client's documentation regarding the specific details. </p> <h3 id="evalsha-in-the-context-of-pipelining"> <code> EVALSHA </code> in the context of pipelining </h3> <p> Special care should be given executing <a href="/docs/latest/commands/evalsha/"> <code> EVALSHA </code> </a> in the context of a <a href="/docs/latest/develop/use/pipelining/"> pipelined request </a> . The commands in a pipelined request run in the order they are sent, but other clients' commands may be interleaved for execution between these. Because of that, the <code> NOSCRIPT </code> error can return from a pipelined request but can't be handled. </p> <p> Therefore, a client library's implementation should revert to using plain <a href="/docs/latest/commands/eval/"> <code> EVAL </code> </a> of parameterized in the context of a pipeline. </p> <h3 id="script-cache-semantics"> Script cache semantics </h3> <p> During normal operation, an application's scripts are meant to stay indefinitely in the cache (that is, until the server is restarted or the cache being flushed). The underlying reasoning is that the script cache contents of a well-written application are unlikely to grow continuously. Even large applications that use hundreds of cached scripts shouldn't be an issue in terms of cache memory usage. </p> <p> The only way to flush the script cache is by explicitly calling the <a href="/docs/latest/commands/script-flush/"> <code> SCRIPT FLUSH </code> </a> command. Running the command will <em> completely flush </em> the scripts cache, removing all the scripts executed so far. Typically, this is only needed when the instance is going to be instantiated for another customer or application in a cloud environment. </p> <p> Also, as already mentioned, restarting a Redis instance flushes the non-persistent script cache. However, from the point of view of the Redis client, there are only two ways to make sure that a Redis instance was not restarted between two different commands: </p> <ul> <li> The connection we have with the server is persistent and was never closed so far. </li> <li> The client explicitly checks the <code> run_id </code> field in the <a href="/docs/latest/commands/info/"> <code> INFO </code> </a> command to ensure the server was not restarted and is still the same process. </li> </ul> <p> Practically speaking, it is much simpler for the client to assume that in the context of a given connection, cached scripts are guaranteed to be there unless the administrator explicitly invoked the <a href="/docs/latest/commands/script-flush/"> <code> SCRIPT FLUSH </code> </a> command. The fact that the user can count on Redis to retain cached scripts is semantically helpful in the context of pipelining. </p> <h2 id="the-script-command"> The <code> SCRIPT </code> command </h2> <p> The Redis <a href="/docs/latest/commands/script/"> <code> SCRIPT </code> </a> provides several ways for controlling the scripting subsystem. These are: </p> <ul> <li> <p> <a href="/docs/latest/commands/script-flush/"> <code> SCRIPT FLUSH </code> </a> : this command is the only way to force Redis to flush the scripts cache. It is most useful in environments where the same Redis instance is reassigned to different uses. It is also helpful for testing client libraries' implementations of the scripting feature. </p> </li> <li> <p> <a href="/docs/latest/commands/script-exists/"> <code> SCRIPT EXISTS </code> </a> : given one or more SHA1 digests as arguments, this command returns an array of <em> 1 </em> 's and <em> 0 </em> 's. <em> 1 </em> means the specific SHA1 is recognized as a script already present in the scripting cache. <em> 0 </em> 's meaning is that a script with this SHA1 wasn't loaded before (or at least never since the latest call to <a href="/docs/latest/commands/script-flush/"> <code> SCRIPT FLUSH </code> </a> ). </p> </li> <li> <p> <code> SCRIPT LOAD script </code> : this command registers the specified script in the Redis script cache. It is a useful command in all the contexts where we want to ensure that <a href="/docs/latest/commands/evalsha/"> <code> EVALSHA </code> </a> doesn't not fail (for instance, in a pipeline or when called from a <a href="/docs/latest/commands/multi/"> <code> MULTI </code> </a> / <a href="/docs/latest/commands/exec/"> <code> EXEC </code> </a> <a href="/docs/latest/develop/interact/transactions/"> transaction </a> , without the need to execute the script. </p> </li> <li> <p> <a href="/docs/latest/commands/script-kill/"> <code> SCRIPT KILL </code> </a> : this command is the only way to interrupt a long-running script (a.k.a slow script), short of shutting down the server. A script is deemed as slow once its execution's duration exceeds the configured <a href="/docs/latest/develop/interact/programmability/#maximum-execution-time"> maximum execution time </a> threshold. The <a href="/docs/latest/commands/script-kill/"> <code> SCRIPT KILL </code> </a> command can be used only with scripts that did not modify the dataset during their execution (since stopping a read-only script does not violate the scripting engine's guaranteed atomicity). </p> </li> <li> <p> <a href="/docs/latest/commands/script-debug/"> <code> SCRIPT DEBUG </code> </a> : controls use of the built-in <a href="/docs/latest/develop/interact/programmability/lua-debugging/"> Redis Lua scripts debugger </a> . </p> </li> </ul> <h2 id="script-replication"> Script replication </h2> <p> In standalone deployments, a single Redis instance called <em> master </em> manages the entire database. A <a href="/docs/latest/operate/oss_and_stack/management/scaling/"> clustered deployment </a> has at least three masters managing the sharded database. Redis uses <a href="/docs/latest/operate/oss_and_stack/management/replication/"> replication </a> to maintain one or more replicas, or exact copies, for any given master. </p> <p> Because scripts can modify the data, Redis ensures all write operations performed by a script are also sent to replicas to maintain consistency. There are two conceptual approaches when it comes to script replication: </p> <ol> <li> Verbatim replication: the master sends the script's source code to the replicas. Replicas then execute the script and apply the write effects. This mode can save on replication bandwidth in cases where short scripts generate many commands (for example, a <em> for </em> loop). However, this replication mode means that replicas redo the same work done by the master, which is wasteful. More importantly, it also requires <a href="#scripts-with-deterministic-writes"> all write scripts to be deterministic </a> . </li> <li> Effects replication: only the script's data-modifying commands are replicated. Replicas then run the commands without executing any scripts. While potentially lengthier in terms of network traffic, this replication mode is deterministic by definition and therefore doesn't require special consideration. </li> </ol> <p> Verbatim script replication was the only mode supported until Redis 3.2, in which effects replication was added. The <em> lua-replicate-commands </em> configuration directive and <a href="/docs/latest/develop/interact/programmability/lua-api#redis.replicate_commands"> <code> redis.replicate_commands() </code> </a> Lua API can be used to enable it. </p> <p> In Redis 5.0, effects replication became the default mode. As of Redis 7.0, verbatim replication is no longer supported. </p> <h3 id="replicating-commands-instead-of-scripts"> Replicating commands instead of scripts </h3> <p> Starting with Redis 3.2, it is possible to select an alternative replication method. Instead of replicating whole scripts, we can replicate the write commands generated by the script. We call this <strong> script effects replication </strong> . </p> <p> <strong> Note: </strong> starting with Redis 5.0, script effects replication is the default mode and does not need to be explicitly enabled. </p> <p> In this replication mode, while Lua scripts are executed, Redis collects all the commands executed by the Lua scripting engine that actually modify the dataset. When the script execution finishes, the sequence of commands that the script generated are wrapped into a <a href="/docs/latest/commands/multi/"> <code> MULTI </code> </a> / <a href="/docs/latest/commands/exec/"> <code> EXEC </code> </a> <a href="/docs/latest/develop/interact/transactions/"> transaction </a> and are sent to the replicas and AOF. </p> <p> This is useful in several ways depending on the use case: </p> <ul> <li> When the script is slow to compute, but the effects can be summarized by a few write commands, it is a shame to re-compute the script on the replicas or when reloading the AOF. In this case, it is much better to replicate just the effects of the script. </li> <li> When script effects replication is enabled, the restrictions on non-deterministic functions are removed. You can, for example, use the <a href="/docs/latest/commands/time/"> <code> TIME </code> </a> or <a href="/docs/latest/commands/srandmember/"> <code> SRANDMEMBER </code> </a> commands inside your scripts freely at any place. </li> <li> The Lua PRNG in this mode is seeded randomly on every call. </li> </ul> <p> Unless already enabled by the server's configuration or defaults (before Redis 7.0), you need to issue the following Lua command before the script performs a write: </p> <div class="highlight"> <pre class="chroma"><code class="language-lua" data-lang="lua"><span class="line"><span class="cl"><span class="n">redis.replicate_commands</span><span class="p">()</span> </span></span></code></pre> </div> <p> The <a href="/docs/latest/develop/interact/programmability/lua-api#redis.replicate_commands"> <code> redis.replicate_commands() </code> </a> function returns _true) if script effects replication was enabled; otherwise, if the function was called after the script already called a write command, it returns <em> false </em> , and normal whole script replication is used. </p> <p> This function is deprecated as of Redis 7.0, and while you can still call it, it will always succeed. </p> <h3 id="scripts-with-deterministic-writes"> Scripts with deterministic writes </h3> <p> <strong> Note: </strong> Starting with Redis 5.0, script replication is by default effect-based rather than verbatim. In Redis 7.0, verbatim script replication had been removed entirely. The following section only applies to versions lower than Redis 7.0 when not using effect-based script replication. </p> <p> An important part of scripting is writing scripts that only change the database in a deterministic way. Scripts executed in a Redis instance are, by default until version 5.0, propagated to replicas and to the AOF file by sending the script itself -- not the resulting commands. Since the script will be re-run on the remote host (or when reloading the AOF file), its changes to the database must be reproducible. </p> <p> The reason for sending the script is that it is often much faster than sending the multiple commands that the script generates. If the client is sending many scripts to the master, converting the scripts into individual commands for the replica / AOF would result in too much bandwidth for the replication link or the Append Only File (and also too much CPU since dispatching a command received via the network is a lot more work for Redis compared to dispatching a command invoked by Lua scripts). </p> <p> Normally replicating scripts instead of the effects of the scripts makes sense, however not in all the cases. So starting with Redis 3.2, the scripting engine is able to, alternatively, replicate the sequence of write commands resulting from the script execution, instead of replication the script itself. </p> <p> In this section, we'll assume that scripts are replicated verbatim by sending the whole script. Let's call this replication mode <strong> verbatim scripts replication </strong> . </p> <p> The main drawback with the <em> whole scripts replication </em> approach is that scripts are required to have the following property: the script <strong> always must </strong> execute the same Redis <em> write </em> commands with the same arguments given the same input data set. Operations performed by the script can't depend on any hidden (non-explicit) information or state that may change as the script execution proceeds or between different executions of the script. Nor can it depend on any external input from I/O devices. </p> <p> Acts such as using the system time, calling Redis commands that return random values (e.g., <a href="/docs/latest/commands/randomkey/"> <code> RANDOMKEY </code> </a> ), or using Lua's random number generator, could result in scripts that will not evaluate consistently. </p> <p> To enforce the deterministic behavior of scripts, Redis does the following: </p> <ul> <li> Lua does not export commands to access the system time or other external states. </li> <li> Redis will block the script with an error if a script calls a Redis command able to alter the data set <strong> after </strong> a Redis <em> random </em> command like <a href="/docs/latest/commands/randomkey/"> <code> RANDOMKEY </code> </a> , <a href="/docs/latest/commands/srandmember/"> <code> SRANDMEMBER </code> </a> , <a href="/docs/latest/commands/time/"> <code> TIME </code> </a> . That means that read-only scripts that don't modify the dataset can call those commands. Note that a <em> random command </em> does not necessarily mean a command that uses random numbers: any non-deterministic command is considered as a random command (the best example in this regard is the <a href="/docs/latest/commands/time/"> <code> TIME </code> </a> command). </li> <li> In Redis version 4.0, commands that may return elements in random order, such as <a href="/docs/latest/commands/smembers/"> <code> SMEMBERS </code> </a> (because Redis Sets are <em> unordered </em> ), exhibit a different behavior when called from Lua, and undergo a silent lexicographical sorting filter before returning data to Lua scripts. So <code> redis.call("SMEMBERS",KEYS[1]) </code> will always return the Set elements in the same order, while the same command invoked by normal clients may return different results even if the key contains exactly the same elements. However, starting with Redis 5.0, this ordering is no longer performed because replicating effects circumvents this type of non-determinism. In general, even when developing for Redis 4.0, never assume that certain commands in Lua will be ordered, but instead rely on the documentation of the original command you call to see the properties it provides. </li> <li> Lua's pseudo-random number generation function <code> math.random </code> is modified and always uses the same seed for every execution. This means that calling <a href="/docs/latest/develop/interact/programmability/lua-api#runtime-libraries"> <code> math.random </code> </a> will always generate the same sequence of numbers every time a script is executed (unless <code> math.randomseed </code> is used). </li> </ul> <p> All that said, you can still use commands that write and random behavior with a simple trick. Imagine that you want to write a Redis script that will populate a list with N random integers. </p> <p> The initial implementation in Ruby could look like this: </p> <pre tabindex="0"><code>require 'rubygems' require 'redis' r = Redis.new RandomPushScript = &lt;&lt;EOF local i = tonumber(ARGV[1]) local res while (i &gt; 0) do res = redis.call('LPUSH',KEYS[1],math.random()) i = i-1 end return res EOF r.del(:mylist) puts r.eval(RandomPushScript,[:mylist],[10,rand(2**32)]) </code></pre> <p> Every time this code runs, the resulting list will have exactly the following elements: </p> <pre tabindex="0"><code>redis&gt; LRANGE mylist 0 -1 1) "0.74509509873814" 2) "0.87390407681181" 3) "0.36876626981831" 4) "0.6921941534114" 5) "0.7857992587545" 6) "0.57730350670279" 7) "0.87046522734243" 8) "0.09637165539729" 9) "0.74990198051087" 10) "0.17082803611217" </code></pre> <p> To make the script both deterministic and still have it produce different random elements, we can add an extra argument to the script that's the seed to Lua's pseudo-random number generator. The new script is as follows: </p> <pre tabindex="0"><code>RandomPushScript = &lt;&lt;EOF local i = tonumber(ARGV[1]) local res math.randomseed(tonumber(ARGV[2])) while (i &gt; 0) do res = redis.call('LPUSH',KEYS[1],math.random()) i = i-1 end return res EOF r.del(:mylist) puts r.eval(RandomPushScript,1,:mylist,10,rand(2**32)) </code></pre> <p> What we are doing here is sending the seed of the PRNG as one of the arguments. The script output will always be the same given the same arguments (our requirement) but we are changing one of the arguments at every invocation, generating the random seed client-side. The seed will be propagated as one of the arguments both in the replication link and in the Append Only File, guaranteeing that the same changes will be generated when the AOF is reloaded or when the replica processes the script. </p> <p> Note: an important part of this behavior is that the PRNG that Redis implements as <code> math.random </code> and <code> math.randomseed </code> is guaranteed to have the same output regardless of the architecture of the system running Redis. 32-bit, 64-bit, big-endian and little-endian systems will all produce the same output. </p> <h2 id="debugging-eval-scripts"> Debugging Eval scripts </h2> <p> Starting with Redis 3.2, Redis has support for native Lua debugging. The Redis Lua debugger is a remote debugger consisting of a server, which is Redis itself, and a client, which is by default <a href="/docs/latest/develop/tools/cli/"> <code> redis-cli </code> </a> . </p> <p> The Lua debugger is described in the <a href="/docs/latest/develop/interact/programmability/lua-debugging/"> Lua scripts debugging </a> section of the Redis documentation. </p> <h2 id="execution-under-low-memory-conditions"> Execution under low memory conditions </h2> <p> When memory usage in Redis exceeds the <code> maxmemory </code> limit, the first write command encountered in the script that uses additional memory will cause the script to abort (unless <a href="/docs/latest/develop/interact/programmability/lua-api#redis.pcall"> <code> redis.pcall </code> </a> was used). </p> <p> However, an exception to the above is when the script's first write command does not use additional memory, as is the case with (for example, <a href="/docs/latest/commands/del/"> <code> DEL </code> </a> and <a href="/docs/latest/commands/lrem/"> <code> LREM </code> </a> ). In this case, Redis will allow all commands in the script to run to ensure atomicity. If subsequent writes in the script consume additional memory, Redis' memory usage can exceed the threshold set by the <code> maxmemory </code> configuration directive. </p> <p> Another scenario in which a script can cause memory usage to cross the <code> maxmemory </code> threshold is when the execution begins when Redis is slightly below <code> maxmemory </code> , so the script's first write command is allowed. As the script executes, subsequent write commands consume more memory leading to the server using more RAM than the configured <code> maxmemory </code> directive. </p> <p> In those scenarios, you should consider setting the <code> maxmemory-policy </code> configuration directive to any values other than <code> noeviction </code> . In addition, Lua scripts should be as fast as possible so that eviction can kick in between executions. </p> <p> Note that you can change this behaviour by using <a href="#eval-flags"> flags </a> </p> <h2 id="eval-flags"> Eval flags </h2> <p> Normally, when you run an Eval script, the server does not know how it accesses the database. By default, Redis assumes that all scripts read and write data. However, starting with Redis 7.0, there's a way to declare flags when creating a script in order to tell Redis how it should behave. </p> <p> The way to do that is by using a Shebang statement on the first line of the script like so: </p> <pre tabindex="0"><code>#!lua flags=no-writes,allow-stale local x = redis.call('get','x') return x </code></pre> <p> Note that as soon as Redis sees the <code> #! </code> comment, it'll treat the script as if it declares flags, even if no flags are defined, it still has a different set of defaults compared to a script without a <code> #! </code> line. </p> <p> Another difference is that scripts without <code> #! </code> can run commands that access keys belonging to different cluster hash slots, but ones with <code> #! </code> inherit the default flags, so they cannot. </p> <p> Please refer to <a href="/docs/latest/develop/interact/programmability/lua-api#script_flags"> Script flags </a> to learn about the various scripts and the defaults. </p> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/develop/interact/programmability/eval-intro/"/> <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/may-2024/.html
<section class="prose w-full py-12 max-w-none"> <h1> Redis Cloud changelog (May 2024) </h1> <p class="text-lg -mt-5 mb-10"> New features, enhancements, and other changes added to Redis Cloud during May 2024. </p> <h2 id="new-features"> New features </h2> <h3 id="multi-domain-saml-setup"> Multi-domain SAML setup </h3> <p> <a href="/docs/latest/operate/rc/security/access-control/saml-sso/"> SAML single sign-on </a> now supports multiple username domains. Select <strong> Manage domains </strong> on the <strong> Single sign-on </strong> screen to associate additional domains to your SAML setup. </p> <h3 id="saml-domain-verification"> SAML domain verification </h3> <p> We added domain verification to <a href="/docs/latest/operate/rc/security/access-control/saml-sso/"> SAML single sign-on </a> to enhance security. Before you set up SAML in Redis Cloud, you must first <a href="/docs/latest/operate/rc/security/access-control/saml-sso/#verify-domain"> verify domain ownership </a> for any domains associated with your SAML setup. </p> <p> If you have an active SAML configuration, you can still sign in with SAML SSO, but your domains will be set to <strong> Unverified </strong> . You should <a href="/docs/latest/operate/rc/security/access-control/saml-sso/#verify-domain"> verify domain ownership </a> as soon as possible. </p> <h3 id="active-active-search-and-query-support"> Active-Active Search and query support </h3> <p> <a href="/docs/latest/operate/rc/databases/configuration/active-active-redis/"> Active-Active databases </a> on Redis Cloud now support <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/search/"> Search and query </a> . </p> <p> See <a href="/docs/latest/operate/rc/databases/create-database/create-active-active-database/"> Create an Active-Active database </a> to learn how to create an Active-Active database. </p> <p> See <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/search/search-active-active/"> Search and query Active-Active databases </a> to learn how to use Search and query on Active-Active databases. </p> <h2 id="enhancements"> Enhancements </h2> <h3 id="dataset-size"> Dataset size </h3> <p> We now distinguish between dataset size and memory limit to reduce confusion. </p> <p> For Redis Cloud Essentials, the plan size refers to the full memory limit, not the dataset size. If you select high availability for an Essentials database, your dataset size will be half of the plan size. Both the total memory limit and dataset size are listed under <strong> Database details </strong> when you create an Essentials database. </p> <p> For Redis Cloud Pro, you define your dataset size when you create the database, and we calculate your total memory limit automatically based on the features you choose. </p> <p> See <a href="/docs/latest/operate/rc/databases/configuration/clustering/#dataset-size"> Dataset size </a> for more information. </p> <h2 id="deprecations"> Deprecations </h2> <h3 id="end-of-triggers-and-functions-preview"> End of Triggers and Functions preview </h3> <p> Redis has discontinued the "Triggers and Functions" preview feature. You are no longer able to create a database with Triggers and Functions. </p> <ul> <li> Commands such as TFCALL, TFCALLASYNC, and TFUNCTION are now deprecated and will return error messages upon execution. </li> <li> Any JavaScript functions stored in Redis will be automatically removed, and JavaScript-based triggers will be disabled. </li> <li> Lua functions and scripts will remain unaffected by this change. </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/may-2024/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/references/rest-api/requests/shards/actions/migrate/.html
<section class="prose w-full py-12 max-w-none"> <h1> Migrate shards requests </h1> <p class="text-lg -mt-5 mb-10"> REST API requests to migrate database shards </p> <table> <thead> <tr> <th> Method </th> <th> Path </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="#post-multi-shards"> POST </a> </td> <td> <code> /v1/shards/actions/migrate </code> </td> <td> Migrate multiple shards </td> </tr> <tr> <td> <a href="#post-shard"> POST </a> </td> <td> <code> /v1/shards/{uid}/actions/migrate </code> </td> <td> Migrate a specific shard </td> </tr> </tbody> </table> <h2 id="post-multi-shards"> Migrate multiple shards </h2> <pre><code>POST /v1/shards/actions/migrate </code></pre> <p> Migrates the list of given shard UIDs to the node specified by <code> target_node_uid </code> . The shards can be from multiple databases. This request is asynchronous. </p> <p> For more information about shard migration use cases and considerations, see <a href="/docs/latest/operate/rs/databases/migrate-shards/"> Migrate database shards </a> . </p> <h4 id="required-permissions"> Required permissions </h4> <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/#migrate_shard"> migrate_shard </a> </td> <td> admin <br/> cluster_member <br/> db_member </td> </tr> </tbody> </table> <h3 id="post-multi-request"> Request </h3> <h4 id="example-http-request"> Example HTTP request </h4> <pre><code>POST /shards/actions/migrate </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">"shard_uids"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"2"</span><span class="p">,</span><span class="s2">"4"</span><span class="p">,</span><span class="s2">"6"</span><span class="p">],</span> </span></span><span class="line"><span class="cl"> <span class="nt">"target_node_uid"</span><span class="p">:</span> <span class="mi">9</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"override_rack_policy"</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"preserve_roles"</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"max_concurrent_bdb_migrations"</span><span class="p">:</span> <span class="mi">3</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="post-multi-request-body"> Request body </h4> <p> The request body is a JSON object that can contain the following fields: </p> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> shard_uids </td> <td> array of strings </td> <td> List of shard UIDs to migrate. </td> </tr> <tr> <td> target_node_uid </td> <td> integer </td> <td> UID of the node to where the shards should migrate. </td> </tr> <tr> <td> override_rack_policy </td> <td> boolean </td> <td> If true, overrides and ignores rack-aware policy violations. </td> </tr> <tr> <td> dry_run </td> <td> boolean </td> <td> Determines whether the migration is actually done. If true, will just do a dry run. If the dry run succeeds, the request returns a <code> 200 OK </code> status code. Otherwise, it returns a JSON object with an error code and description. </td> </tr> <tr> <td> preserve_roles </td> <td> boolean </td> <td> If true, preserves the migrated shards' roles after migration. </td> </tr> <tr> <td> max_concurrent_bdb_migrations </td> <td> integer </td> <td> The number of concurrent databases that can migrate shards. </td> </tr> </tbody> </table> <h3 id="post-multi-response"> Response </h3> <p> Returns a JSON object with an <code> action_uid </code> . You can track the action's progress with a <a href="/docs/latest/operate/rs/references/rest-api/requests/actions/#get-action"> <code> GET /v1/actions/&lt;action_uid&gt; </code> </a> request. </p> <h4 id="example-json-body-1"> Example JSON body </h4> <div class="highlight"> <pre class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">"action_uid"</span><span class="p">:</span> <span class="s2">"e5e24ddf-a456-4a7e-ad53-4463cd44880e"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"description"</span><span class="p">:</span> <span class="s2">"Migrate was triggered"</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="post-multi-status-codes"> Status codes </h3> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok"> 200 OK </a> </td> <td> No error. </td> </tr> <tr> <td> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request"> 400 Bad Request </a> </td> <td> Conflicting parameters. </td> </tr> <tr> <td> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found"> 404 Not Found </a> </td> <td> A list of shard UIDs is required and not given, a specified shard does not exist, or a node UID is required and not given. </td> </tr> <tr> <td> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-500-internal-server-error"> 500 Internal Server Error </a> </td> <td> Migration failed. </td> </tr> </tbody> </table> <h2 id="post-shard"> Migrate shard </h2> <pre><code>POST /v1/shards/{int: uid}/actions/migrate </code></pre> <p> Migrates the shard with the given <code> shard_uid </code> to the node specified by <code> target_node_uid </code> . If the shard is already on the target node, nothing happens. This request is asynchronous. </p> <p> For more information about shard migration use cases and considerations, see <a href="/docs/latest/operate/rs/databases/migrate-shards/"> Migrate database shards </a> . </p> <h4 id="required-permissions-1"> Required permissions </h4> <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/#migrate_shard"> migrate_shard </a> </td> <td> admin <br/> cluster_member <br/> db_member </td> </tr> </tbody> </table> <h3 id="post-request"> Request </h3> <h4 id="example-http-request-1"> Example HTTP request </h4> <pre><code>POST /shards/1/actions/migrate </code></pre> <h4 id="example-json-body-2"> 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">"target_node_uid"</span><span class="p">:</span> <span class="mi">9</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"override_rack_policy"</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"preserve_roles"</span><span class="p">:</span> <span class="kc">false</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> 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 shard to migrate. </td> </tr> </tbody> </table> <h4 id="post-request-body"> Request body </h4> <p> The request body is a JSON object that can contain the following fields: </p> <table> <thead> <tr> <th> Field </th> <th> Type </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> target_node_uid </td> <td> integer </td> <td> UID of the node to where the shard should migrate. </td> </tr> <tr> <td> override_rack_policy </td> <td> boolean </td> <td> If true, overrides and ignores rack-aware policy violations. </td> </tr> <tr> <td> dry_run </td> <td> boolean </td> <td> Determines whether the migration is actually done. If true, will just do a dry run. If the dry run succeeds, the request returns a <code> 200 OK </code> status code. Otherwise, it returns a JSON object with an error code and description. </td> </tr> <tr> <td> preserve_roles </td> <td> boolean </td> <td> If true, preserves the migrated shards' roles after migration. </td> </tr> </tbody> </table> <h3 id="post-response"> Response </h3> <p> Returns a JSON object with an <code> action_uid </code> . You can track the action's progress with a <a href="/docs/latest/operate/rs/references/rest-api/requests/actions/#get-action"> <code> GET /v1/actions/&lt;action_uid&gt; </code> </a> request. </p> <h4 id="example-json-body-3"> 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">"action_uid"</span><span class="p">:</span> <span class="s2">"e5e24ddf-a456-4a7e-ad53-4463cd44880e"</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="nt">"description"</span><span class="p">:</span> <span class="s2">"Migrate was triggered"</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre> </div> <h3 id="post-status-codes"> Status codes </h3> <table> <thead> <tr> <th> Code </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok"> 200 OK </a> </td> <td> No error. </td> </tr> <tr> <td> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found"> 404 Not Found </a> </td> <td> Shard does not exist, or node UID is required and not given. </td> </tr> <tr> <td> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict"> 409 Conflict </a> </td> <td> Database is currently busy. </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/shards/actions/migrate/"/> <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/redisjson/redisjson-2.2-release-notes/.html
<section class="prose w-full py-12 max-w-none"> <h1> RedisJSON 2.2 release notes </h1> <p class="text-lg -mt-5 mb-10"> Preview of Active-Active support for JSON. </p> <h2 id="requirements"> Requirements </h2> <p> RedisJSON v2.2.0 requires: </p> <ul> <li> Minimum Redis compatibility version (database): 6.0.0 </li> <li> Minimum Redis Enterprise Software version (cluster): 6.2.18 </li> </ul> <h2 id="v220-july-2022"> v2.2.0 (July 2022) </h2> <p> A preview of RedisJSON 2.2 is available for Free and Fixed subscription plans in Redis Cloud. </p> <h3 id="headlines"> Headlines </h3> <p> This release adds support for the JSON data structure as a CRDT (Conflict-free Replicated Data Type) when used with Redis Enterprise <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/json/active-active/"> Active-Active databases </a> . </p> <p> Active-Active JSON requires Redis Enterprise Software v6.2.12. Contact your account manager or support to access the preview of RedisJSON 2.2. </p> <h3 id="details"> Details </h3> <ul> <li> <p> Enhancements: </p> <ul> <li> <a href="https://github.com/RedisJSON/RedisJSON/pull/758"> #758 </a> Add support for <a href="/docs/latest/commands/copy/"> <code> COPY </code> </a> </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/operate/oss_and_stack/stack-with-enterprise/release-notes/redisjson/redisjson-2.2-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/operate/oss_and_stack/stack-with-enterprise/deprecated-features/triggers-and-functions/concepts/triggers/.html
<section class="prose w-full py-12 max-w-none"> <h1> Triggers </h1> <p class="text-lg -mt-5 mb-10"> Different ways of executing JavaScript functions </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> <nav> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/deprecated-features/triggers-and-functions/concepts/triggers/user_functions/"> User functions </a> <p> Execute JavaScript functions via <code> TFCALL </code> or <code> TFCALLASYNC </code> </p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/deprecated-features/triggers-and-functions/concepts/triggers/keyspace_triggers/"> Keyspace triggers </a> <p> Execute a JavaScript function based on a keyspace notification </p> <a href="/docs/latest/operate/oss_and_stack/stack-with-enterprise/deprecated-features/triggers-and-functions/concepts/triggers/stream_triggers/"> Stream triggers </a> <p> Execute a JavaScript function when an item is added to a stream </p> </nav> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/deprecated-features/triggers-and-functions/concepts/triggers/"/> <div class="flex flex-row justify-between"> <div class="grid justify-center"> <span class="font-mono"> RATE THIS PAGE </span> <div class="star-rating"> <input id="5-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="5"/> <label class="star" for="5-stars"> ★ </label> <input id="4-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="4"/> <label class="star" for="4-stars"> ★ </label> <input id="3-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="3"/> <label class="star" for="3-stars"> ★ </label> <input id="2-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="2"/> <label class="star" for="2-stars"> ★ </label> <input id="1-stars" name="rating" onchange="document.querySelector('#feedback-form').classList.remove('hidden')" type="radio" value="1"/> <label class="star" for="1-stars"> ★ </label> </div> </div> <a class="font-mono no-underline" href="#"> Back to top ↑ </a> </div> <div class="hidden" id="feedback-form"> <div class="grid gap-2"> <textarea class="p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md" name="comment" placeholder="Why did you choose this rating?" rows="3"></textarea> <button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit"> Submit </button> </div> </div> </form> <script> document.addEventListener("DOMContentLoaded", function() { const form = document.querySelector("#page-feedback"); form.addEventListener("submit", function(event) { event.preventDefault(); var xhr = new XMLHttpRequest(); var url = "\/docusight\/api\/rate"; var params = new URLSearchParams(new FormData(form)); xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { const responseData = JSON.parse(xhr.responseText); const responseMessage = responseData.response; const newText = document.createTextNode(responseMessage); form.parentNode.replaceChild(newText, form); } }; xhr.send(params); }); }); </script> </section>
https://redis.io/docs/latest/operate/rs/databases/durability-ha/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/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/redisvl/api/searchindex/schema.md.html
<section class="prose w-full py-12 max-w-none"> <h1> API Guide </h1> <p class="text-lg -mt-5 mb-10"> The RedisVL API guide </p> <nav> <a href="/docs/latest/integrate/redisvl/api/schema/"> Schema </a> <p> The schema APIs </p> <a href="/docs/latest/integrate/redisvl/api/query/"> Query </a> <p> The query APIs </p> <a href="/docs/latest/integrate/redisvl/api/searchindex/"> Search index </a> <p> The search index APIs </p> <a href="/docs/latest/integrate/redisvl/api/filter/"> Filter </a> <p> The filter APIs </p> <a href="/docs/latest/integrate/redisvl/api/vectorizer/"> Vectorizers </a> <p> The vectorizer APIs </p> <a href="/docs/latest/integrate/redisvl/api/cache/"> LLMCache </a> <p> The LLMCache APIs </p> </nav> <form class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50" id="page-feedback" name="page-feedback"> <input class="hidden" name="origin" value="https://redis.io/docs/latest/integrate/redisvl/api/"/> <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>