diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aa70155a86..df3a632f21 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,14 +33,21 @@ jobs: echo "ERROR: Invalid branch name ${{ github.ref_name }}!" exit 1 fi - - name: Configure Hugo + + - name: Install dependencies + run: make deps + + - name: Build out all versions run: | + set -x + + function setBaseUrl() { if [[ "${{ github.ref_name }}" == "main" ]] then hugo_root_path=docs/staging/dev elif [[ "${{ github.ref_name }}" == "latest" ]] then - hugo_root_path="docs/latest" + hugo_root_path="docs/latest" elif [[ "${{ endsWith(github.ref_name, '-build') }}" == "true" ]] then hugo_root_path=`echo docs/version/${{ github.ref_name }} | sed 's/-build$//'` @@ -48,8 +55,70 @@ jobs: hugo_root_path=docs/staging/${{ github.ref_name }} fi \ && sed -i "s#baseURL = \"https://redis.io\"#baseURL = \"https://redis.io/$hugo_root_path\"#g" config.toml - - name: Install dependencies and run Hugo - run: make all + } + + setBaseUrl + kubernetes_versions=($(find content/operate/kubernetes/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}')) + rs_versions=($(find content/operate/rs/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}')) + + # build latest + for version in "${kubernetes_versions[@]}"; do + rm -r "content/operate/kubernetes/${version}" + done + for version in "${rs_versions[@]}"; do + rm -r "content/operate/rs/${version}" + done + make all + + git checkout . + + # build all versions + for version in "${kubernetes_versions[@]}"; do + + setBaseUrl + + # for each version, remove all other versions before building + versions_to_remove=($(echo "${kubernetes_versions[@]}" "${version}" | tr ' ' '\n' | sort | uniq -u)) + for version_to_remove in "${versions_to_remove[@]}"; do + rm -r "content/operate/kubernetes/${version_to_remove}" + done + + cp -r "content/operate/kubernetes/${version}"/* content/operate/kubernetes/ + rm -r "content/operate/kubernetes/${version}" + sed -i 's/id="versionSelectorKubernetesValue" class="version-selector-control">latest/id="versionSelectorKubernetesValue" class="version-selector-control">v'"${version}"'/' layouts/partials/docs-nav.html + sed -i 's/linkTitle: '"${version}"'/linkTitle: Redis for Kubernetes/' content/operate/kubernetes/_index.md + + # inject replace command in meta-links to make sure editURL and issuesURL point to right version + sed -i "11i \{\{ \$gh_file = replaceRE \`\^operate\/kubernetes\/\` \"operate\/kubernetes\/$version\/\" \$gh_file }}" layouts/partials/meta-links.html + + hugo -d "kubernetes-${version}" + + git checkout . + done + + for version in "${rs_versions[@]}"; do + + setBaseUrl + + # for each version, remove all other versions before building + versions_to_remove=($(echo "${rs_versions[@]}" "${version}" | tr ' ' '\n' | sort | uniq -u)) + for version_to_remove in "${versions_to_remove[@]}"; do + rm -r "content/operate/rs/${version_to_remove}" + done + + cp -r "content/operate/rs/${version}"/* content/operate/rs/ + rm -r "content/operate/rs/${version}" + sed -i 's/id="versionSelectorRsValue" class="version-selector-control">latest/id="versionSelectorRsValue" class="version-selector-control">v'"${version}"'/' layouts/partials/docs-nav.html + sed -i 's/linkTitle: '"${version}"'/linkTitle: Redis Software/' content/operate/rs/_index.md + + # inject replace command in meta-links to make sure editURL and issuesURL point to right version + sed -i "11i \{\{ \$gh_file = replaceRE \`\^operate\/rs\/\` \"operate\/rs\/$version\/\" \$gh_file }}" layouts/partials/meta-links.html + + hugo -d "rs-${version}" + + git checkout . + done + - name: List client examples run: ls "${{ github.workspace }}/examples" - name: List files to be published @@ -80,5 +149,12 @@ jobs: bucket_path=staging/${{ github.ref_name }} fi \ && ./google-cloud-sdk/bin/gsutil -m rsync -r -c -j html -d ${{ github.workspace }}/public gs://$BUCKET/$bucket_path + + versioned_builds=($(find . -type d -regex ".*[0-9-]" -maxdepth 1 | sed -E 's/^.\///')) + for versioned_build in "${versioned_builds[@]}"; do + product=$(grep -Eo '[a-zA-Z]+' <<< $versioned_build) + gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${versioned_build}/operate/${product}" + done + - name: End run: echo "This job's status is ${{ job.status }}." diff --git a/.github/workflows/update_command_pages.yaml b/.github/workflows/update_command_pages.yaml new file mode 100644 index 0000000000..ceec91d39c --- /dev/null +++ b/.github/workflows/update_command_pages.yaml @@ -0,0 +1,74 @@ +name: update_command_pages + +on: + push: + branches: ['main'] + paths: + - data/commands_core.json # run when data/commands_core.json is updated on main + workflow_dispatch: # or run on manual trigger + +jobs: + update_command_pages: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + actions: write + steps: + - name: 'Checkout' + uses: 'actions/checkout@v3' + + - name: Install dependencies + run: make deps + + - name: 'Run build/update_cmds.py script' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + branch="update_command_pages" + commands_change=false + + # check if remote branch already exists + git fetch --all + set +e + git ls-remote --exit-code --heads origin "refs/heads/${branch}" + if [ "$?" -eq 0 ]; then + set -e + # if it does, create local branch off existing remote branch + git checkout -b "${branch}" "origin/${branch}" + git branch --set-upstream-to="origin/${branch}" "${branch}" + git pull + else + set -e + # otherwise, create local branch from main + git checkout -b "${branch}" + fi + + python3 build/update_cmds.py + + commands_are_different=$(git diff "content/commands/") + + if [[ ! -z $commands_are_different ]]; then + commands_change=true + + git add "content/commands/" + git config user.email "177626021+redisdocsapp[bot]@users.noreply.github.com" + git config user.name "redisdocsapp[bot]" + git commit -m "Update content/commands/" + fi + + if [ "$commands_change" = true ] ; then + git push origin "${branch}" + + # If a pr is not already open, create one + set +e + gh search prs -R redis/docs --state open --match title "update command pages" | grep -q "update command pages" + if [ "$?" -eq 1 ]; then + set -e + gh pr create \ + --body "update command pages" \ + --title "update command pages" \ + --head "$branch" \ + --base "main" + fi + fi \ No newline at end of file diff --git a/build/components/example.py b/build/components/example.py index c55e40e26d..e2a0665924 100644 --- a/build/components/example.py +++ b/build/components/example.py @@ -11,7 +11,7 @@ GO_OUTPUT = 'Output:' TEST_MARKER = { 'java': '@Test', - 'c#': '\[Fact\]' + 'c#': '\[Fact\]|\[SkipIfRedis\(.*\)\]' } PREFIXES = { 'python': '#', @@ -19,9 +19,11 @@ 'java': '//', 'go': '//', 'c#': '//', - 'redisvl': '#' + 'redisvl': '#', + 'php': '//' } + class Example(object): language = None path = None diff --git a/content/apis/_index.md b/content/apis/_index.md index 160cd840e5..0b3243d45c 100644 --- a/content/apis/_index.md +++ b/content/apis/_index.md @@ -18,7 +18,7 @@ Redis comes with a wide range of commands that help you to develop real-time app As a developer, you will likely use one of our supported client libraries for connecting and executing commands. -- [Connect with Redis clients introduction]({{< relref "/develop/connect/clients/" >}}) +- [Connect with Redis clients introduction]({{< relref "/develop/clients" >}}) ### Programmability APIs @@ -45,13 +45,13 @@ Redis Cloud is a fully managed Database as a Service offering and the fastest wa - [Redis Cloud REST API introduction]({{< relref "/operate/rc/api/" >}}) - [Redis Cloud REST API examples]({{< relref "/operate/rc/api/examples/" >}}) -- [Redis Cloud REST API reference]({{< relref "/operate/rs/references/rest-api/" >}}) +- [Redis Cloud REST API reference](https://api.redislabs.com/v1/swagger-ui.html) ### Redis Enterprise Software API If you have installed Redis Enterprise Software, you can automate operations with the Redis Enterprise REST API. -- [Redis Enterprise Software REST API introduction]({{< relref "/operate/rc/api/" >}}) +- [Redis Enterprise Software REST API introduction]({{< relref "/operate/rs/references/rest-api/" >}}) - [Redis Enterprise Software REST API requests]({{< relref "/operate/rs/references/rest-api/requests/" >}}) - [Redis Enterprise Software REST API objects]({{< relref "/operate/rs/references/rest-api/objects/" >}}) diff --git a/content/commands/client-caching/index.md b/content/commands/client-caching/index.md index 44b70c349f..f5c679e640 100644 --- a/content/commands/client-caching/index.md +++ b/content/commands/client-caching/index.md @@ -43,7 +43,7 @@ title: CLIENT CACHING This command controls the tracking of the keys in the next command executed by the connection, when tracking is enabled in `OPTIN` or `OPTOUT` mode. Please check the -[client side caching documentation]({{< relref "/develop/connect/clients/client-side-caching" >}}) for +[client side caching documentation]({{< relref "/develop/clients/client-side-caching" >}}) for background information. When tracking is enabled Redis, using the [`CLIENT TRACKING`]({{< relref "/commands/client-tracking" >}}) command, it is diff --git a/content/commands/client-getredir/index.md b/content/commands/client-getredir/index.md index f596eb21b9..0d43ecd498 100644 --- a/content/commands/client-getredir/index.md +++ b/content/commands/client-getredir/index.md @@ -31,7 +31,7 @@ syntax_str: '' title: CLIENT GETREDIR --- This command returns the client ID we are redirecting our -[tracking]({{< relref "/develop/connect/clients/client-side-caching#tracking" >}}) notifications to. We set a client +[tracking]({{< relref "/develop/clients/client-side-caching#tracking" >}}) notifications to. We set a client to redirect to when using [`CLIENT TRACKING`]({{< relref "/commands/client-tracking" >}}) to enable tracking. However in order to avoid forcing client libraries implementations to remember the ID notifications are redirected to, this command exists in order to improve diff --git a/content/commands/client-tracking/index.md b/content/commands/client-tracking/index.md index 9c91fc8653..3146cc84eb 100644 --- a/content/commands/client-tracking/index.md +++ b/content/commands/client-tracking/index.md @@ -75,7 +75,7 @@ syntax_str: "[REDIRECT\_client-id] [PREFIX\_prefix [PREFIX prefix ...]] [BCAST] title: CLIENT TRACKING --- This command enables the tracking feature of the Redis server, that is used -for [server assisted client side caching]({{< relref "/develop/connect/clients/client-side-caching#tracking" >}}). +for [server assisted client side caching]({{< relref "/develop/clients/client-side-caching#tracking" >}}). When tracking is enabled Redis remembers the keys that the connection requested, in order to send later invalidation messages when such keys are diff --git a/content/commands/client-trackinginfo/index.md b/content/commands/client-trackinginfo/index.md index cb194690f7..361fa74194 100644 --- a/content/commands/client-trackinginfo/index.md +++ b/content/commands/client-trackinginfo/index.md @@ -29,7 +29,7 @@ syntax_fmt: CLIENT TRACKINGINFO syntax_str: '' title: CLIENT TRACKINGINFO --- -The command returns information about the current client connection's use of the [server assisted client side caching]({{< relref "/develop/connect/clients/client-side-caching" >}}) feature. +The command returns information about the current client connection's use of the [server assisted client side caching]({{< relref "/develop/clients/client-side-caching" >}}) feature. Here's the list of tracking information sections and their respective values: diff --git a/content/commands/ft.config-set/index.md b/content/commands/ft.config-set/index.md index c7ffe34c01..e5cd3d1650 100644 --- a/content/commands/ft.config-set/index.md +++ b/content/commands/ft.config-set/index.md @@ -35,7 +35,7 @@ Set the value of a RediSearch configuration parameter. Values set using `FT.CONFIG SET` are not persisted after server restart. -RediSearch configuration parameters are detailed in [Configuration parameters]({{< relref "/develop/interact/search-and-query/administration" >}}). +RediSearch configuration parameters are detailed in [Configuration parameters]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}). {{% alert title="Note" color="warning" %}} As detailed in the link above, not all RediSearch configuration parameters can be set at runtime. diff --git a/content/commands/ft.create/index.md b/content/commands/ft.create/index.md index 11e8fa0b09..574a520376 100644 --- a/content/commands/ft.create/index.md +++ b/content/commands/ft.create/index.md @@ -431,10 +431,6 @@ author_id TAG SORTABLE author_ids TAG title TEXT name TEXT {{< / highlight >}} In this example, keys for author data use the key pattern `author:details:` while keys for book data use the pattern `book:details:`. - - -
-Index a JSON document using a JSON Path expression Index authors whose names start with G. @@ -451,10 +447,14 @@ Index only books that have a subtitle. Index books that have a "categories" attribute where each category is separated by a `;` character. {{< highlight bash >}} -127.0.0.1:6379> FT.CREATE books-idx ON HASH PREFIX 1 book:details FILTER SCHEMA title TEXT categories TAG SEPARATOR ";" +127.0.0.1:6379> FT.CREATE books-idx ON HASH PREFIX 1 book:details SCHEMA title TEXT categories TAG SEPARATOR ";" {{< / highlight >}} +
+ +
+Index a JSON document using a JSON Path expression -Index a JSON document using a JSON Path expression. +The following example uses data similar to the hash examples above but uses JSON instead. {{< highlight bash >}} 127.0.0.1:6379> FT.CREATE idx ON JSON SCHEMA $.title AS title TEXT $.categories AS categories TAG diff --git a/content/commands/ft.profile/index.md b/content/commands/ft.profile/index.md index bb669a6d82..24b3df38eb 100644 --- a/content/commands/ft.profile/index.md +++ b/content/commands/ft.profile/index.md @@ -51,127 +51,351 @@ syntax_str: [LIMITED] QUERY query title: FT.PROFILE --- -Apply [`FT.SEARCH`]({{< baseurl >}}/commands/ft.search/) or [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate/) command to collect performance details - -[Examples](#examples) +Apply [`FT.SEARCH`]({{< baseurl >}}/commands/ft.search/) or [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate/) command to collect performance details. For usage, see [Examples](#examples). ## Required arguments
index -is index name, created using [`FT.CREATE`]({{< baseurl >}}/commands/ft.create/). +is the name of an index created using [`FT.CREATE`]({{< baseurl >}}/commands/ft.create/).
SEARCH | AGGREGATE -is difference between [`FT.SEARCH`]({{< baseurl >}}/commands/ft.search/) and [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate/). +represents the profile type, either [`FT.SEARCH`]({{< baseurl >}}/commands/ft.search/) or [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate/).
LIMITED -removes details of `reader` iterator. +removes details of any `reader` iterators.
QUERY {query} -is query string, sent to [`FT.SEARCH`]({{< baseurl >}}/commands/ft.search/). +is the query string, sent to `FT.SEARCH` or `FT.AGGREGATE`.
-Note: To reduce the size of the output, use `NOCONTENT` or `LIMIT 0 0` to reduce the reply results or `LIMITED` to not reply with details of `reader iterators` inside built-in unions such as `fuzzy` or `prefix`. +Note: To reduce the size of the output, use `NOCONTENT` or `LIMIT 0 0` to reduce the number of reply results, or `LIMITED` to not reply with details of `reader iterators` inside built-in unions, such as `fuzzy` or `prefix` iterators. ## Return -`FT.PROFILE` returns an array reply, with the first array reply identical to the reply of [`FT.SEARCH`]({{< baseurl >}}/commands/ft.search/) and [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate/) and a second array reply with information of time in milliseconds (ms) used to create the query and time and count of calls of iterators and result-processors. +`FT.PROFILE` returns a two-element array reply. The first element contains the results of the provided `FT.SEARCH` or `FT.AGGREGATE` command. +The second element contains information about query creation, iterator profiles, and result processor profiles. +Details of the second element follow in the sections below. + +### Results + +This section contains the search results. + +### Per-shard profiles + +This section contains query execution details for each shard. +When more than one shard is in play, the shards will be labeled `Shard #1`, `Shard #2`, etc. +If there's only one shard, the label will be omitted. + +| Returned field name | Definition | +|:-- |:-- | +| `Total` `profile` `time` | The total run time (ms) of the query. Normally just a few ms. | +| `Parsing` `time` | The time (ms) spent parsing the query and its parameters into a query plan. Normally just a few ms. | +| `Pipeline` `creation` `time` | The creation time (ms) of the execution plan, including iterators, result processors, and reducers creation. Normally just a few ms for `FT.SEARCH` queries, but expect a larger number for `FT.AGGREGATE` queries. | +| `Warning` | Errors that occurred during query execution. | + +### Iterator profiles + +This section contains index iterator information, including `Type`, `Query Type`, `Term` (when applicable), `Time` (in ms), `Counter`, `Child iterator`, and `Size` information. +Each iterator represents an executor for each part of the query plan, nested per the execution plan. The operation types mentioned below (`UNION`, etc) should match up with the provided query. + +Inverted-index iterators also include the number of elements they contain. Hybrid vector iterators return the top results from the vector index in batches, including the number of batches. + +Iterator types include: + +* `INTERSECT` (and) with `Child iterator` +* `UNION` (or) with `Child iterator` +* `NOT` (`-`) with `Child iterator` +* `Child iterator` - details of a sub-query component of a compound query. +* `TEXT` with `Term` +* `TAG` with `Term` +* `NUMERIC` with `Term` +* `VECTOR` +* `EMPTY` +* `WILDCARD` +* `OPTIONAL` + +**Notes on `Counter` and `Size`** + +Counter is the number of times an iterator was interacted with. A very high value in comparison to others is a possible warning flag. `NUMERIC` and `Child interator` types are broken into ranges, and `Counter` will vary depending on the range. For `UNION`, the sum of the counters in child iterators should be equal or greater than the child iterator’s counters. + +`Size` is the size of the document set. `Counter` should always be equal or less than `Size`. -Return value has an array with two elements: +### Result processor profiles -- Results - The normal reply from RediSearch, similar to a cursor. -- Profile - The details in the profile are: - - Total profile time - The total runtime of the query, in ms. - - Parsing time - Parsing time of the query and parameters into an execution plan, in ms. - - Pipeline creation time - Creation time of execution plan including iterators, - result processors, and reducers creation, in ms. - - Iterators profile - Index iterators information including their type, term, count, and time data. - Inverted-index iterators have in addition the number of elements they contain. Hybrid vector iterators returning the top results from the vector index in batches, include the number of batches. - - Result processors profile - Result processors chain with type, count, and time data. +Result processors form a powerful pipeline in Redis Query Engine. They work in stages to gather, filter, score, sort, and return results as efficiently as possible based on complex query needs. Each processor reports `Time` information, which represents the total duration (in milliseconds, or ms) spent by the processor to complete its operation, and `Counter` information, which indicates the number of times the processor was invoked during the query. + +| Type | Definition | +|:-- |:-- | +| `Metrics` `Applier` | The `Metrics Applier` processor calculates or aggregates specific metrics related to the search results. For example, this might include applying a distance or similarity metric to vector search results, or calculating scores based on relevance or other parameters. | +| `Index` | The `Index` processor is responsible for the core retrieval of matching documents from the index based on the initial query criteria (e.g., full-text terms, filters, or numeric ranges). | +| `Scorer` | The `Scorer` processor assigns a relevance score to each document based on the query’s specified scoring function. This function could involve factors like term frequency, inverse document frequency, or other weighted metrics. | +| `Sorter` | The `Sorter` processor arranges the query results based on a specified sorting criterion. This could be a field value (e.g., sorting by price, date, or another attribute) or by the score assigned during the scoring phase. It operates after documents are fetched and scored, ensuring the results are ordered as required by the query (e.g., ascending or descending order). `Scorer` results will always be present in `FT.SEARCH` profiles. | +| `Loader` | The `Loader` processor retrieves the document contents after the results have been sorted and filtered. It ensures that only the fields specified by the query are loaded, which improves efficiency, especially when dealing with large documents where only a few fields are needed. | +| `Highlighter` | The `Highlighter` processor is used to highlight matching terms in the search results. This is especially useful for full-text search applications, where relevant terms are often emphasized in the UI. | +| `Paginator` | The `Paginator` processor is responsible for handling pagination by limiting the results to a specific range (e.g., LIMIT 0 10).It trims down the set of results to fit the required pagination window, ensuring efficient memory usage when dealing with large result sets. | +| `Vector` `Filter` | For vector searches, the `Vector Filter` processor is sometimes used to pre-process results based on vector similarity thresholds before the main scoring and sorting. | + +### Coordinator + +This section is only present when run in a multi-shard environment. + +| Returned field name | Definition | +|:-- |:-- | +| `Total coordinator time` | Time measured from the beginning of query execution until all shards have completed query execution. (ms) | +| `Post-processing time` | The time spent generating the FT.PROFILE output (overhead) (ms). | ## Examples -
-Collect performance information about an index +
+Collect performance information about a simple JSON index. + +Imagine you have (1) a dataset consisting of 10 JSON documents, each with the following structure; + +```json +{ + "pickup_zone": "POLYGON((-74.0610 40.7578, -73.9510 40.7578, -73.9510 40.6678, -74.0610 40.6678, -74.0610 40.7578))", + "store_location": "-74.0060,40.7128", + "brand": "Velorim", + "model": "Jigger", + "price": 270, + "description": "Small and powerful, the Jigger is the best ride for the smallest of tikes! This is the tiniest kids’ pedal bike on the market available without a coaster brake, the Jigger is the vehicle of choice for the rare tenacious little rider raring to go.", + "condition": "new" +} +``` + +And (2) a corresponding index: + +```bash +FT.CREATE idx:bicycle ON JSON PREFIX 1 bicycle: SCORE 1.0 SCHEMA $.pickup_zone AS pickup_zone GEOSHAPE $.store_location AS store_location GEO $.brand AS brand TEXT WEIGHT 1.0 $.model AS model TEXT WEIGHT 1.0 $.description AS description TEXT WEIGHT 1.0 $.price AS price NUMERIC $.condition AS condition TAG SEPARATOR , +``` + +Here's an example of running the `FT.PROFILE` command for a compound query. {{< highlight bash >}} -127.0.0.1:6379> FT.PROFILE idx SEARCH QUERY "hello world" -1) 1) (integer) 1 - 2) "doc1" - 3) 1) "t" - 2) "hello world" +127.0.0.1:6379> ft.profile idx:bicycle search query "@description:(kids | small) @condition:{new | used}" +1) 1) (integer) 3 + 2) "bicycle:0" + 3) 1) "$" + 2) "{\"pickup_zone\":\"POLYGON((-74.0610 40.7578, -73.9510 40.7578, -73.9510 40.6678, -74.0610 40.6678, -74.0610 40.7578))\",\"store_location\":\"-74.0060,40.7128\",\"brand\":\"Velorim\",\"model\":\"Jigger\",\"price\":270,\"description\":\"Small and powerful, the Jigger is the best ride for the smallest of tikes! This is the tiniest kids\xe2\x80\x99 pedal bike on the market available without a coaster brake, the Jigger is the vehicle of choice for the rare tenacious little rider raring to go.\",\"condition\":\"new\"}" + 4) "bicycle:1" + 5) 1) "$" + 2) "{\"pickup_zone\":\"POLYGON((-118.2887 34.0972, -118.1987 34.0972, -118.1987 33.9872, -118.2887 33.9872, -118.2887 34.0972))\",\"store_location\":\"-118.2437,34.0522\",\"brand\":\"Bicyk\",\"model\":\"Hillcraft\",\"price\":1200,\"description\":\"Kids want to ride with as little weight as possible. Especially on an incline! They may be at the age when a 27.5\\\" wheel bike is just too clumsy coming off a 24\\\" bike. The Hillcraft 26 is just the solution they need!\",\"condition\":\"used\"}" + 6) "bicycle:2" + 7) 1) "$" + 2) "{\"pickup_zone\":\"POLYGON((-87.6848 41.9331, -87.5748 41.9331, -87.5748 41.8231, -87.6848 41.8231, -87.6848 41.9331))\",\"store_location\":\"-87.6298,41.8781\",\"brand\":\"Nord\",\"model\":\"Chook air 5\",\"price\":815,\"description\":\"The Chook Air 5 gives kids aged six years and older a durable and uberlight mountain bike for their first experience on tracks and easy cruising through forests and fields. The lower top tube makes it easy to mount and dismount in any situation, giving your kids greater safety on the trails.\",\"condition\":\"used\"}" 2) 1) 1) Total profile time - 2) "0.47199999999999998" + 2) "0" 2) 1) Parsing time - 2) "0.218" + 2) "0" 3) 1) Pipeline creation time - 2) "0.032000000000000001" - 4) 1) Iterators profile + 2) "0" + 4) 1) Warning + 5) 1) Iterators profile 2) 1) Type 2) INTERSECT 3) Time - 4) "0.025000000000000001" + 4) "0" 5) Counter - 6) (integer) 1 + 6) (integer) 6 7) Child iterators 8) 1) Type - 2) TEXT - 3) Term - 4) hello + 2) UNION + 3) Query type + 4) UNION 5) Time - 6) "0.0070000000000000001" + 6) "0" 7) Counter - 8) (integer) 1 - 9) Size - 10) (integer) 1 + 8) (integer) 6 + 9) Child iterators + 10) 1) Type + 2) UNION + 3) Query type + 4) UNION + 5) Time + 6) "0" + 7) Counter + 8) (integer) 4 + 9) Child iterators + 10) 1) Type + 2) TEXT + 3) Term + 4) kids + 5) Time + 6) "0" + 7) Counter + 8) (integer) 4 + 9) Size + 10) (integer) 4 + 11) 1) Type + 2) TEXT + 3) Term + 4) +kid + 5) Time + 6) "0" + 7) Counter + 8) (integer) 4 + 9) Size + 10) (integer) 4 + 11) 1) Type + 2) TEXT + 3) Term + 4) small + 5) Time + 6) "0" + 7) Counter + 8) (integer) 2 + 9) Size + 10) (integer) 2 9) 1) Type - 2) TEXT - 3) Term - 4) world + 2) UNION + 3) Query type + 4) TAG 5) Time - 6) "0.0030000000000000001" + 6) "0" 7) Counter - 8) (integer) 1 - 9) Size - 10) (integer) 1 - 5) 1) Result processors profile + 8) (integer) 6 + 9) Child iterators + 10) 1) Type + 2) TAG + 3) Term + 4) new + 5) Time + 6) "0" + 7) Counter + 8) (integer) 4 + 9) Size + 10) (integer) 10 + 11) 1) Type + 2) TAG + 3) Term + 4) used + 5) Time + 6) "0" + 7) Counter + 8) (integer) 4 + 9) Size + 10) (integer) 8 + 6) 1) Result processors profile 2) 1) Type 2) Index 3) Time - 4) "0.036999999999999998" + 4) "0" 5) Counter - 6) (integer) 1 + 6) (integer) 3 3) 1) Type 2) Scorer 3) Time - 4) "0.025000000000000001" + 4) "0" 5) Counter - 6) (integer) 1 + 6) (integer) 3 4) 1) Type 2) Sorter 3) Time - 4) "0.013999999999999999" + 4) "0" 5) Counter - 6) (integer) 1 + 6) (integer) 3 5) 1) Type 2) Loader 3) Time - 4) "0.10299999999999999" + 4) "0" 5) Counter - 6) (integer) 1 + 6) (integer) 3 {{< / highlight >}}
+
+Collect performance information about a JSON index that includes vector data. + +For this example, you'll create a very simple vector database and index. + +Index: + +```redis +FT.CREATE vss_idx ON JSON PREFIX 1 vec: SCHEMA $.vector AS vector VECTOR FLAT 6 TYPE FLOAT32 DIM 4 DISTANCE_METRIC L2 +``` + +Database: + +```redis +JSON.SET vec:1 $ '{"vector":[1,1,1,1]}' +JSON.SET vec:2 $ '{"vector":[2,2,2,2]}' +JSON.SET vec:3 $ '{"vector":[3,3,3,3]}' +JSON.SET vec:4 $ '{"vector":[4,4,4,4]}' +``` + +Here's an example of running the `FT.PROFILE` command for a vector query. + +{{< highlight bash >}} +127.0.0.1:6379> ft.profile vss_idx search query "*=>[KNN 3 @vector $query_vec]" PARAMS 2 query_vec "\x00\x00\x00@\x00\x00\x00@\x00\x00@@\x00\x00@@" SORTBY __vector_score DIALECT 2 +1) 1) (integer) 3 + 2) "vec:2" + 3) 1) "__vector_score" + 2) "2" + 3) "$" + 4) "{\"vector\":[2,2,2,2]}" + 4) "vec:3" + 5) 1) "__vector_score" + 2) "2" + 3) "$" + 4) "{\"vector\":[3,3,3,3]}" + 6) "vec:1" + 7) 1) "__vector_score" + 2) "10" + 3) "$" + 4) "{\"vector\":[1,1,1,1]}" +2) 1) 1) Total profile time + 2) "0" + 2) 1) Parsing time + 2) "0" + 3) 1) Pipeline creation time + 2) "0" + 4) 1) Warning + 5) 1) Iterators profile + 2) 1) Type + 2) VECTOR + 3) Time + 4) "0" + 5) Counter + 6) (integer) 3 + 6) 1) Result processors profile + 2) 1) Type + 2) Index + 3) Time + 4) "0" + 5) Counter + 6) (integer) 3 + 3) 1) Type + 2) Metrics Applier + 3) Time + 4) "0" + 5) Counter + 6) (integer) 3 + 4) 1) Type + 2) Sorter + 3) Time + 4) "0" + 5) Counter + 6) (integer) 3 + 5) 1) Type + 2) Loader + 3) Time + 4) "0" + 5) Counter + 6) (integer) 3 +{{< /highlight >}} +
+ ## See also [`FT.SEARCH`]({{< baseurl >}}/commands/ft.search/) | [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate/) diff --git a/content/develop/clients/_index.md b/content/develop/clients/_index.md new file mode 100644 index 0000000000..15e5c410c1 --- /dev/null +++ b/content/develop/clients/_index.md @@ -0,0 +1,62 @@ +--- +aliases: /develop/connect/clients +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +hideListLinks: true +description: Connect your application to a Redis database and try an example +linkTitle: Client APIs +title: Connect with Redis client API libraries +weight: 30 +--- + +Use the Redis client libraries to connect to Redis servers from +your own code. We document the following client libraries +for six main languages: + +| Language | Client name | Docs | Supported | +| :-- | :-- | :-- | :-- | +| [Python](https://www.python.org/) | [`redis-py`](https://github.com/redis/redis-py) |[`redis-py` guide]({{< relref "/develop/clients/redis-py" >}}) | Yes | +| [Python](https://www.python.org/) | [`RedisVL`](https://github.com/redis/redis-vl-python) |[RedisVL guide]({{< relref "/integrate/redisvl" >}}) | Yes +| [C#/.NET](https://learn.microsoft.com/en-us/dotnet/csharp/) | [`NRedisStack`](https://github.com/redis/NRedisStack) |[`NRedisStack` guide]({{< relref "/develop/clients/dotnet" >}}) | Yes | +| [JavaScript](https://nodejs.org/en) | [`node-redis`](https://github.com/redis/node-redis) | [`node-redis` guide]({{< relref "/develop/clients/nodejs" >}}) | Yes | +| [Java](https://www.java.com/en/) | [`Jedis`](https://github.com/redis/jedis) | [`Jedis` guide]({{< relref "/develop/clients/jedis" >}}) | Yes | +| [Java](https://www.java.com/en/) | [`Lettuce`](https://github.com/redis/lettuce) | [`Lettuce` guide]({{< relref "/develop/clients/lettuce" >}}) | Yes | +| [Go](https://go.dev/) | [`go-redis`](https://github.com/redis/go-redis) | [`go-redis` guide]({{< relref "/develop/clients/go" >}}) | Yes | +| [PHP](https://www.php.net/)| [`Predis`](https://github.com/predis/predis) | [`Predis` guide]({{< relref "/develop/clients/php" >}}) | No | + +We also provide several higher-level +[object mapping (OM)]({{< relref "/develop/clients/om-clients" >}}) +libraries for [Python]({{< relref "/integrate/redisom-for-python" >}}), +[C#/.NET]({{< relref "/integrate/redisom-for-net" >}}), +[Node.js]({{< relref "/integrate/redisom-for-node-js" >}}), and +[Java/Spring]({{< relref "/integrate/redisom-for-java" >}}). + +## Community-supported clients + +The table below shows the recommended third-party client libraries for languages that +Redis does not document directly: + +| Language | Client name | Github | Docs | +| :-- | :-- | :-- | :-- | +| C | hiredis | https://github.com/redis/hiredis | https://github.com/redis/hiredis | +| [PHP](https://www.php.net/) | PhpRedis extension | https://github.com/phpredis/phpredis | https://github.com/phpredis/phpredis/blob/develop/README.md | +| [Ruby](https://www.ruby-lang.org/en/) | redis-rb | https://github.com/redis/redis-rb | https://rubydoc.info/gems/redis | +| [Rust](https://www.rust-lang.org/) | redis-rs | https://github.com/redis-rs/redis-rs | https://docs.rs/redis/latest/redis/ | +| [C++](https://en.wikipedia.org/wiki/C%2B%2B) | Boost.Redis | https://github.com/boostorg/redis | https://www.boost.org/doc/libs/develop/libs/redis/doc/html/index.html | + +## Requirements + +You will need access to a Redis server to use these libraries. +You can experiment with a local installation of Redis Stack +(see [Install Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}})) or with a free trial of [Redis Cloud]({{< relref "/operate/rc" >}}). +To interact with a Redis server without writing code, use the +[Redis CLI]({{< relref "/develop/tools/cli" >}}) and +[Redis Insight]({{< relref "/develop/tools/insight" >}}) tools. diff --git a/content/develop/connect/clients/client-side-caching.md b/content/develop/clients/client-side-caching.md similarity index 98% rename from content/develop/connect/clients/client-side-caching.md rename to content/develop/clients/client-side-caching.md index 7deb874508..85171c536b 100644 --- a/content/develop/connect/clients/client-side-caching.md +++ b/content/develop/clients/client-side-caching.md @@ -1,4 +1,5 @@ --- +aliases: /develop/connect/clients/client-side-caching categories: - docs - develop @@ -82,7 +83,7 @@ will use cached data, except for the following: [probabilistic data types]({{< relref "/develop/data-types/probabilistic" >}}). These types are designed to be updated frequently, which means that caching has little or no benefit. -- Non-deterministic commands such as [`HGETALL`]({{< relref "/commands/hgetall" >}}), +- Non-deterministic commands such as [`HRANDFIELD`]({{< relref "/commands/hrandfield" >}}), [`HSCAN`]({{< relref "/commands/hscan" >}}), and [`ZRANDMEMBER`]({{< relref "/commands/zrandmember" >}}). By design, these commands give different results each time they are called. diff --git a/content/develop/clients/dotnet/_index.md b/content/develop/clients/dotnet/_index.md new file mode 100644 index 0000000000..e1dd60f62a --- /dev/null +++ b/content/develop/clients/dotnet/_index.md @@ -0,0 +1,91 @@ +--- +aliases: /develop/connect/clients/dotnet +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Connect your .NET application to a Redis database +linkTitle: NRedisStack (C#/.NET) +title: NRedisStack guide (C#/.NET) +weight: 3 +--- + +[NRedisStack](https://github.com/redis/NRedisStack) is the .NET client for Redis. +The sections below explain how to install `NRedisStack` and connect your application +to a Redis database. + +`NRedisStack` requires a running Redis or [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. + +You can also access Redis with an object-mapping client interface. See +[Redis OM for .NET]({{< relref "/integrate/redisom-for-net" >}}) +for more information. + +## Install + +Using the `dotnet` CLI, run: + +```bash +dotnet add package NRedisStack +``` + +## Connect and test + +Connect to localhost on port 6379. + +```csharp +using NRedisStack; +using NRedisStack.RedisStackCommands; +using StackExchange.Redis; +//... +ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("localhost"); +IDatabase db = redis.GetDatabase(); +``` + +You can test the connection by storing and retrieving a simple string. + +```csharp +db.StringSet("foo", "bar"); +Console.WriteLine(db.StringGet("foo")); // prints bar +``` + +Store and retrieve a HashMap. + +```csharp +var hash = new HashEntry[] { + new HashEntry("name", "John"), + new HashEntry("surname", "Smith"), + new HashEntry("company", "Redis"), + new HashEntry("age", "29"), + }; +db.HashSet("user-session:123", hash); + +var hashFields = db.HashGetAll("user-session:123"); +Console.WriteLine(String.Join("; ", hashFields)); +// Prints: +// name: John; surname: Smith; company: Redis; age: 29 +``` +## Redis Stack modules + +To access Redis Stack capabilities, use the appropriate interface like this: + +``` +IBloomCommands bf = db.BF(); +ICuckooCommands cf = db.CF(); +ICmsCommands cms = db.CMS(); +IGraphCommands graph = db.GRAPH(); +ITopKCommands topk = db.TOPK(); +ITdigestCommands tdigest = db.TDIGEST(); +ISearchCommands ft = db.FT(); +IJsonCommands json = db.JSON(); +ITimeSeriesCommands ts = db.TS(); +``` + +## More information + +See the other pages in this section for more information and examples. diff --git a/content/develop/clients/dotnet/connect.md b/content/develop/clients/dotnet/connect.md new file mode 100644 index 0000000000..b9ad530060 --- /dev/null +++ b/content/develop/clients/dotnet/connect.md @@ -0,0 +1,148 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Connect your .NET application to a Redis database +linkTitle: Connect +title: Connect to the server +weight: 2 +--- + +## Basic connection + +You can connect to the server simply by passing a string of the +form "hostname:port" to the `Connect()` method (for example, +"localhost:6379"). However, you can also connect using a +`ConfigurationOptions` parameter. Use this to specify a +username, password, and many other options: + +```csharp +using NRedisStack; +using NRedisStack.RedisStackCommands; +using StackExchange.Redis; + +ConfigurationOptions conf = new ConfigurationOptions { + EndPoints = { "localhost:6379" }, + User = "yourUsername", + Password = "yourPassword" +}; + +ConnectionMultiplexer redis = ConnectionMultiplexer.Connect(conf); +IDatabase db = redis.GetDatabase(); + +db.StringSet("foo", "bar"); +Console.WriteLine(db.StringGet("foo")); // prints bar +``` + +## Connect to a Redis cluster + +The basic connection will use the +[Cluster API]({{< relref "/operate/rs/clusters/optimize/oss-cluster-api" >}}) +if it is available without any special configuration. However, if you know +the addresses and ports of several cluster nodes, you can specify them all +during connection in the `Endpoints` parameter: + +```csharp +ConfigurationOptions options = new ConfigurationOptions +{ + //list of available nodes of the cluster along with the endpoint port. + EndPoints = { + { "localhost", 16379 }, + { "localhost", 16380 }, + // ... + }, +}; + +ConnectionMultiplexer cluster = ConnectionMultiplexer.Connect(options); +IDatabase db = cluster.GetDatabase(); + +db.StringSet("foo", "bar"); +Console.WriteLine(db.StringGet("foo")); // prints bar +``` + +## Connect to your production Redis with TLS + +When you deploy your application, use TLS and follow the [Redis security]({{< relref "/operate/oss_and_stack/management/security/" >}}) guidelines. + +Before connecting your application to the TLS-enabled Redis server, ensure that your certificates and private keys are in the correct format. + +To convert user certificate and private key from the PEM format to `pfx`, use this command: + +```bash +openssl pkcs12 -inkey redis_user_private.key -in redis_user.crt -export -out redis.pfx +``` + +Enter password to protect your `pfx` file. + +Establish a secure connection with your Redis database using this snippet. + +```csharp +ConfigurationOptions options = new ConfigurationOptions +{ + EndPoints = { { "my-redis.cloud.redislabs.com", 6379 } }, + User = "default", // use your Redis user. More info https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/ + Password = "secret", // use your Redis password + Ssl = true, + SslProtocols = System.Security.Authentication.SslProtocols.Tls12 +}; + +options.CertificateSelection += delegate +{ + return new X509Certificate2("redis.pfx", "secret"); // use the password you specified for pfx file +}; +options.CertificateValidation += ValidateServerCertificate; + +bool ValidateServerCertificate( + object sender, + X509Certificate? certificate, + X509Chain? chain, + SslPolicyErrors sslPolicyErrors) +{ + if (certificate == null) { + return false; + } + + var ca = new X509Certificate2("redis_ca.pem"); + bool verdict = (certificate.Issuer == ca.Subject); + if (verdict) { + return true; + } + Console.WriteLine("Certificate error: {0}", sslPolicyErrors); + return false; +} + +ConnectionMultiplexer muxer = ConnectionMultiplexer.Connect(options); + +//Creation of the connection to the DB +IDatabase conn = muxer.GetDatabase(); + +//send SET command +conn.StringSet("foo", "bar"); + +//send GET command and print the value +Console.WriteLine(conn.StringGet("foo")); +``` + +## Multiplexing + +Although example code typically works with a single connection, +real-world code often uses multiple connections at the same time. +Opening and closing connections repeatedly is inefficient, so it is best +to manage open connections carefully to avoid this. + +Several other +Redis client libraries use *connection pools* to reuse a set of open +connections efficiently. NRedisStack uses a different approach called +*multiplexing*, which sends all client commands and responses over a +single connection. NRedisStack manages multiplexing for you automatically. +This gives high performance without requiring any extra coding. +See +[Connection pools and multiplexing]({{< relref "/develop/clients/pools-and-muxing" >}}) +for more information. diff --git a/content/develop/clients/dotnet/queryjson.md b/content/develop/clients/dotnet/queryjson.md new file mode 100644 index 0000000000..922291923f --- /dev/null +++ b/content/develop/clients/dotnet/queryjson.md @@ -0,0 +1,74 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Learn how to use the Redis query engine with JSON +linkTitle: JSON query example +title: Example - Index and query JSON documents +weight: 2 +--- + +This example shows how to create a +[search index]({{< relref "/develop/interact/search-and-query/indexing" >}}) +for [JSON]({{< relref "/develop/data-types/json" >}}) data and +run queries against the index. + +Make sure that you have Redis Stack and `NRedisStack` installed. + +Start by importing dependencies: + +{{< clients-example cs_home_json import >}} +{{< /clients-example >}} + +Connect to the database: + +{{< clients-example cs_home_json connect >}} +{{< /clients-example >}} + +Create some test data to add to the database: + +{{< clients-example cs_home_json create_data >}} +{{< /clients-example >}} + +Create an index. In this example, only JSON documents with the key prefix `user:` are indexed. For more information, see [Query syntax]({{< relref "/develop/interact/search-and-query/query/" >}}). + +{{< clients-example cs_home_json make_index >}} +{{< /clients-example >}} + +Add the three sets of user data to the database as +[JSON]({{< relref "/develop/data-types/json" >}}) objects. +If you use keys with the `user:` prefix then Redis will index the +objects automatically as you add them: + +{{< clients-example cs_home_json add_data >}} +{{< /clients-example >}} + +You can now use the index to search the JSON objects. The +[query]({{< relref "/develop/interact/search-and-query/query" >}}) +below searches for objects that have the text "Paul" in any field +and have an `age` value in the range 30 to 40: + +{{< clients-example cs_home_json query1 >}} +{{< /clients-example >}} + +Specify query options to return only the `city` field: + +{{< clients-example cs_home_json query2 >}} +{{< /clients-example >}} + +Use an +[aggregation query]({{< relref "/develop/interact/search-and-query/query/aggregation" >}}) +to count all users in each city. + +{{< clients-example cs_home_json query3 >}} +{{< /clients-example >}} + +See the [Redis query engine]({{< relref "/develop/interact/search-and-query" >}}) docs +for a full description of all query features with examples. diff --git a/content/develop/clients/go/_index.md b/content/develop/clients/go/_index.md new file mode 100644 index 0000000000..690f449a2e --- /dev/null +++ b/content/develop/clients/go/_index.md @@ -0,0 +1,194 @@ +--- +aliases: /develop/connect/clients/go +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Connect your Go application to a Redis database +linkTitle: go-redis (Go) +title: go-redis guide (Go) +weight: 7 +--- + +[`go-redis`](https://github.com/redis/go-redis) is the [Go](https://go.dev/) client for Redis. +The sections below explain how to install `go-redis` and connect your application to a Redis database. + +`go-redis` requires a running Redis or +[Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. +See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation +instructions. + +## Install + +`go-redis` supports the last two Go versions. You can only use it from within +a Go module, so you must initialize a Go module before you start, or add your code to +an existing module: + +``` +go mod init github.com/my/repo +``` + +Use the `go get` command to install `go-redis/v9`: + +``` +go get github.com/redis/go-redis/v9 +``` + +## Connect + +The following example shows the simplest way to connect to a Redis server: + +```go +import ( + "context" + "fmt" + "github.com/redis/go-redis/v9" +) + +func main() { + client := redis.NewClient(&redis.Options{ + Addr: "localhost:6379", + Password: "", // No password set + DB: 0, // Use default DB + Protocol: 2, // Connection protocol + }) +} +``` + +You can also connect using a connection string: + +```go +opt, err := redis.ParseURL("redis://:@localhost:6379/") +if err != nil { + panic(err) +} + +client := redis.NewClient(opt) +``` + +After connecting, you can test the connection by storing and retrieving +a simple [string]({{< relref "/develop/data-types/strings" >}}): + +```go +ctx := context.Background() + +err := client.Set(ctx, "foo", "bar", 0).Err() +if err != nil { + panic(err) +} + +val, err := client.Get(ctx, "foo").Result() +if err != nil { + panic(err) +} +fmt.Println("foo", val) +``` + +You can also easily store and retrieve a [hash]({{< relref "/develop/data-types/hashes" >}}): + +```go +hashFields := []string{ + "model", "Deimos", + "brand", "Ergonom", + "type", "Enduro bikes", + "price", "4972", +} + +res1, err := rdb.HSet(ctx, "bike:1", hashFields).Result() + +if err != nil { + panic(err) +} + +fmt.Println(res1) // >>> 4 + +res2, err := rdb.HGet(ctx, "bike:1", "model").Result() + +if err != nil { + panic(err) +} + +fmt.Println(res2) // >>> Deimos + +res3, err := rdb.HGet(ctx, "bike:1", "price").Result() + +if err != nil { + panic(err) +} + +fmt.Println(res3) // >>> 4972 + +res4, err := rdb.HGetAll(ctx, "bike:1").Result() + +if err != nil { + panic(err) +} + +fmt.Println(res4) +// >>> map[brand:Ergonom model:Deimos price:4972 type:Enduro bikes] + ``` + + Use + [struct tags](https://stackoverflow.com/questions/10858787/what-are-the-uses-for-struct-tags-in-go) + of the form `redis:""` with the `Scan()` method to parse fields from + a hash directly into corresponding struct fields: + + ```go +type BikeInfo struct { + Model string `redis:"model"` + Brand string `redis:"brand"` + Type string `redis:"type"` + Price int `redis:"price"` +} + +var res4a BikeInfo +err = rdb.HGetAll(ctx, "bike:1").Scan(&res4a) + +if err != nil { + panic(err) +} + +fmt.Printf("Model: %v, Brand: %v, Type: %v, Price: $%v\n", + res4a.Model, res4a.Brand, res4a.Type, res4a.Price) +// >>> Model: Deimos, Brand: Ergonom, Type: Enduro bikes, Price: $4972 + ``` + +## Observability + +`go-redis` supports [OpenTelemetry](https://opentelemetry.io/) instrumentation. +to monitor performance and trace the execution of Redis commands. +For example, the following code instruments Redis commands to collect traces, logs, and metrics: + +```go +import ( + "github.com/redis/go-redis/v9" + "github.com/redis/go-redis/extra/redisotel/v9" +) + +rdb := redis.NewClient(&redis.Options{...}) + +// Enable tracing instrumentation. +if err := redisotel.InstrumentTracing(rdb); err != nil { + panic(err) +} + +// Enable metrics instrumentation. +if err := redisotel.InstrumentMetrics(rdb); err != nil { + panic(err) +} +``` + +See the `go-redis` [GitHub repo](https://github.com/redis/go-redis/blob/master/example/otel/README.md). +for more OpenTelemetry examples. + +## More information + +See the other pages in this section for more information and examples. +Further examples are available at the [`go-redis`](https://redis.uptrace.dev/guide/) website +and the [GitHub repository](https://github.com/redis/go-redis). diff --git a/content/develop/clients/go/connect.md b/content/develop/clients/go/connect.md new file mode 100644 index 0000000000..b75881e833 --- /dev/null +++ b/content/develop/clients/go/connect.md @@ -0,0 +1,128 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Connect your Go application to a Redis database +linkTitle: Connect +title: Connect to the server +weight: 1 +--- + +## Basic connection + +The following example shows the simplest way to connect to a Redis server: + +```go +import ( + "context" + "fmt" + "github.com/redis/go-redis/v9" +) + +func main() { + client := redis.NewClient(&redis.Options{ + Addr: "localhost:6379", + Password: "", // No password set + DB: 0, // Use default DB + Protocol: 2, // Connection protocol + }) +} +``` + +You can also connect using a connection string: + +```go +opt, err := redis.ParseURL("redis://:@localhost:6379/") +if err != nil { + panic(err) +} + +client := redis.NewClient(opt) +``` + +After connecting, you can test the connection by storing and retrieving +a simple [string]({{< relref "/develop/data-types/strings" >}}): + +```go +ctx := context.Background() + +err := client.Set(ctx, "foo", "bar", 0).Err() +if err != nil { + panic(err) +} + +val, err := client.Get(ctx, "foo").Result() +if err != nil { + panic(err) +} +fmt.Println("foo", val) +``` + +## Connect to a Redis cluster + +To connect to a Redis cluster, use `NewClusterClient()`. You can specify +one or more cluster endpoints with the `Addrs` option: + +```go +client := redis.NewClusterClient(&redis.ClusterOptions{ + Addrs: []string{":16379", ":16380", ":16381", ":16382", ":16383", ":16384"}, + + // To route commands by latency or randomly, enable one of the following. + //RouteByLatency: true, + //RouteRandomly: true, +}) +``` + +## Connect to your production Redis with TLS + +When you deploy your application, use TLS and follow the +[Redis security]({{< relref "/operate/oss_and_stack/management/security/" >}}) guidelines. + +Establish a secure connection with your Redis database: + +```go +// Load client cert +cert, err := tls.LoadX509KeyPair("redis_user.crt", "redis_user_private.key") +if err != nil { + log.Fatal(err) +} + +// Load CA cert +caCert, err := os.ReadFile("redis_ca.pem") +if err != nil { + log.Fatal(err) +} +caCertPool := x509.NewCertPool() +caCertPool.AppendCertsFromPEM(caCert) + +client := redis.NewClient(&redis.Options{ + Addr: "my-redis.cloud.redislabs.com:6379", + Username: "default", // use your Redis user. More info https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/ + Password: "secret", // use your Redis password + TLSConfig: &tls.Config{ + MinVersion: tls.VersionTLS12, + Certificates: []tls.Certificate{cert}, + RootCAs: caCertPool, + }, +}) + +//send SET command +err = client.Set(ctx, "foo", "bar", 0).Err() +if err != nil { + panic(err) +} + +//send GET command and print the value +val, err := client.Get(ctx, "foo").Result() +if err != nil { + panic(err) +} +fmt.Println("foo", val) +``` diff --git a/content/develop/clients/go/queryjson.md b/content/develop/clients/go/queryjson.md new file mode 100644 index 0000000000..f648634aa6 --- /dev/null +++ b/content/develop/clients/go/queryjson.md @@ -0,0 +1,160 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Learn how to use the Redis query engine with JSON +linkTitle: JSON query example +title: Example - Index and query JSON documents +weight: 2 +--- +This example shows how to create a +[search index]({{< relref "/develop/interact/search-and-query/indexing" >}}) +for [JSON]({{< relref "/develop/data-types/json" >}}) data and +run queries against the index. + +Make sure that you have Redis Stack and `NRedisStack` installed. + +Start by connecting to the Redis server: + +```go +import ( + "context" + "fmt" + + "github.com/redis/go-redis/v9" +) + +func main() { + ctx := context.Background() + + rdb := redis.NewClient(&redis.Options{ + Addr: "localhost:6379", + Password: "", + DB: 0, + Protocol: 2, + }) + + // ... +} +``` + +Add some `map` objects to store in JSON format in the database: + +```go +user1 := map[string]interface{}{ + "name": "Paul John", + "email": "paul.john@example.com", + "age": 42, + "city": "London", +} + +user2 := map[string]interface{}{ + "name": "Eden Zamir", + "email": "eden.zamir@example.com", + "age": 29, + "city": "Tel Aviv", +} + +user3 := map[string]interface{}{ + "name": "Paul Zamir", + "email": "paul.zamir@example.com", + "age": 35, + "city": "Tel Aviv", +} +``` + +Use the code below to create a search index. The `FTCreateOptions` parameter enables +indexing only for JSON objects where the key has a `user:` prefix. +The +[schema]({{< relref "/develop/interact/search-and-query/indexing" >}}) +for the index has three fields for the user's name, age, and city. +The `FieldName` field of the `FieldSchema` struct specifies a +[JSON path]({{< relref "/develop/data-types/json/path" >}}) +that identifies which data field to index. Use the `As` struct field +to provide an alias for the JSON path expression. You can use +the alias in queries as a short and intuitive way to refer to the +expression, instead of typing it in full: + +```go +_, err := rdb.FTCreate( + ctx, + "idx:users", + // Options: + &redis.FTCreateOptions{ + OnJSON: true, + Prefix: []interface{}{"user:"}, + }, + // Index schema fields: + &redis.FieldSchema{ + FieldName: "$.name", + As: "name", + FieldType: redis.SearchFieldTypeText, + }, + &redis.FieldSchema{ + FieldName: "$.city", + As: "city", + FieldType: redis.SearchFieldTypeTag, + }, + &redis.FieldSchema{ + FieldName: "$.age", + As: "age", + FieldType: redis.SearchFieldTypeNumeric, + }, +).Result() + +if err != nil { + panic(err) +} +``` + +Add the three sets of user data to the database as +[JSON]({{< relref "/develop/data-types/json" >}}) objects. +If you use keys with the `user:` prefix then Redis will index the +objects automatically as you add them: + +```go +_, err = rdb.JSONSet(ctx, "user:1", "$", user1).Result() + +if err != nil { + panic(err) +} + +_, err = rdb.JSONSet(ctx, "user:2", "$", user2).Result() + +if err != nil { + panic(err) +} + +_, err = rdb.JSONSet(ctx, "user:3", "$", user3).Result() + +if err != nil { + panic(err) +} +``` + +You can now use the index to search the JSON objects. The +[query]({{< relref "/develop/interact/search-and-query/query" >}}) +below searches for objects that have the text "Paul" in any field +and have an `age` value in the range 30 to 40: + +```go +searchResult, err := rdb.FTSearch( + ctx, + "idx:users", + "Paul @age:[30 40]", +).Result() + +if err != nil { + panic(err) +} + +fmt.Println(searchResult) +// >>> {1 [{user:3 map[$:{"age":35,"city":"Tel Aviv"... +``` \ No newline at end of file diff --git a/content/develop/clients/jedis/_index.md b/content/develop/clients/jedis/_index.md new file mode 100644 index 0000000000..1ae36dca9d --- /dev/null +++ b/content/develop/clients/jedis/_index.md @@ -0,0 +1,100 @@ +--- +aliases: /develop/connect/clients/java/jedis +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Connect your Java application to a Redis database +linkTitle: Jedis (Java) +title: Jedis guide (Java) +weight: 5 +--- + +[Jedis](https://github.com/redis/jedis) is a synchronous Java client for Redis. +Use [Lettuce]({{< relref "/develop/clients/lettuce" >}}) if you need +a more advanced Java client that also supports asynchronous and reactive connections. +The sections below explain how to install `Jedis` and connect your application +to a Redis database. + +`Jedis` requires a running Redis or [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. + +## Install + +To include `Jedis` as a dependency in your application, edit the dependency file, as follows. + +* If you use **Maven**: + + ```xml + + redis.clients + jedis + 5.2.0 + + ``` + +* If you use **Gradle**: + + ``` + repositories { + mavenCentral() + } + //... + dependencies { + implementation 'redis.clients:jedis:5.2.0' + //... + } + ``` + +* If you use the JAR files, download the latest Jedis and Apache Commons Pool2 JAR files from [Maven Central](https://central.sonatype.com/) or any other Maven repository. + +* Build from [source](https://github.com/redis/jedis) + + +## Connect and test + +The following code opens a basic connection to a local Redis server: + +```java +package org.example; +import redis.clients.jedis.UnifiedJedis; + +public class Main { + public static void main(String[] args) { + UnifiedJedis jedis = new UnifiedJedis("redis://localhost:6379"); + + // Code that interacts with Redis... + + jedis.close(); + } +} +``` + +After you have connected, you can check the connection by storing and +retrieving a simple string value: + +```java +... + +String res1 = jedis.set("bike:1", "Deimos"); +System.out.println(res1); // OK + +String res2 = jedis.get("bike:1"); +System.out.println(res2); // Deimos + +... +``` + +## More information + +`Jedis` has a complete [API reference](https://www.javadoc.io/doc/redis.clients/jedis/latest/index.html) available on [javadoc.io/](https://javadoc.io/). +The `Jedis` [GitHub repository](https://github.com/redis/jedis) also has useful docs +and examples including a page about handling +[failover with Jedis](https://github.com/redis/jedis/blob/master/docs/failover.md) + +See also the other pages in this section for more information and examples: diff --git a/content/develop/connect/clients/java/jedis.md b/content/develop/clients/jedis/connect.md similarity index 70% rename from content/develop/connect/clients/java/jedis.md rename to content/develop/clients/jedis/connect.md index cd8c76e9ad..530660f395 100644 --- a/content/develop/connect/clients/java/jedis.md +++ b/content/develop/clients/jedis/connect.md @@ -10,51 +10,12 @@ categories: - kubernetes - clients description: Connect your Java application to a Redis database -linkTitle: Jedis -title: Jedis guide -weight: 1 +linkTitle: Connect +title: Connect to the server +weight: 2 --- -[Jedis](https://github.com/redis/jedis) is a synchronous Java client for Redis. -Use [Lettuce]({{< relref "/develop/connect/clients/java/lettuce" >}}) if you need -a more advanced Java client that also supports asynchronous and reactive connections. -The sections below explain how to install `Jedis` and connect your application -to a Redis database. - -`Jedis` requires a running Redis or [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. - -## Install - -To include `Jedis` as a dependency in your application, edit the dependency file, as follows. - -* If you use **Maven**: - - ```xml - - redis.clients - jedis - 5.2.0 - - ``` - -* If you use **Gradle**: - - ``` - repositories { - mavenCentral() - } - //... - dependencies { - implementation 'redis.clients:jedis:5.2.0' - //... - } - ``` - -* If you use the JAR files, download the latest Jedis and Apache Commons Pool2 JAR files from [Maven Central](https://central.sonatype.com/) or any other Maven repository. - -* Build from [source](https://github.com/redis/jedis) - -## Connect +## Basic connection The following code opens a basic connection to a local Redis server: @@ -190,7 +151,7 @@ public class Main { Client-side caching is a technique to reduce network traffic between the client and server, resulting in better performance. See -[Client-side caching introduction]({{< relref "/develop/connect/clients/client-side-caching" >}}) +[Client-side caching introduction]({{< relref "/develop/clients/client-side-caching" >}}) for more information about how client-side caching works and how to use it effectively. To enable client-side caching, specify the @@ -231,7 +192,7 @@ client.get("city"); // Retrieved from cache ``` You can see the cache working if you connect to the same Redis database -with [`redis-cli`]({{< relref "/develop/connect/cli" >}}) and run the +with [`redis-cli`]({{< relref "/develop/tools/cli" >}}) and run the [`MONITOR`]({{< relref "/commands/monitor" >}}) command. If you run the code above but without passing `cacheConfig` during the connection, you should see the following in the CLI among the output from `MONITOR`: @@ -313,7 +274,7 @@ one of its open connections. When you subsequently close the same connection, it is not actually closed but simply returned to the pool for reuse. This avoids the overhead of repeated connecting and disconnecting. See -[Connection pools and multiplexing]({{< relref "/develop/connect/clients/pools-and-muxing" >}}) +[Connection pools and multiplexing]({{< relref "/develop/clients/pools-and-muxing" >}}) for more information. Use the following code to connect with a connection pool: @@ -402,82 +363,3 @@ poolConfig.setTimeBetweenEvictionRuns(Duration.ofSeconds(1)); // to prevent connection starvation JedisPooled jedis = new JedisPooled(poolConfig, "localhost", 6379); ``` - -## Production usage - -The following sections explain how to handle situations that may occur -in your production environment. - -### Timeouts - -To set a timeout for a connection, use the `JedisPooled` or `JedisPool` constructor with the `timeout` parameter, or use `JedisClientConfig` with the `socketTimeout` and `connectionTimeout` parameters: - -```java -HostAndPort hostAndPort = new HostAndPort("localhost", 6379); - -JedisPooled jedisWithTimeout = new JedisPooled(hostAndPort, - DefaultJedisClientConfig.builder() - .socketTimeoutMillis(5000) // set timeout to 5 seconds - .connectionTimeoutMillis(5000) // set connection timeout to 5 seconds - .build(), - poolConfig -); -``` - -### Exception handling - -The Jedis Exception Hierarchy is rooted on `JedisException`, which implements `RuntimeException`, and are therefore all unchecked exceptions. - -``` -JedisException -├── JedisDataException -│ ├── JedisRedirectionException -│ │ ├── JedisMovedDataException -│ │ └── JedisAskDataException -│ ├── AbortedTransactionException -│ ├── JedisAccessControlException -│ └── JedisNoScriptException -├── JedisClusterException -│ ├── JedisClusterOperationException -│ ├── JedisConnectionException -│ └── JedisValidationException -└── InvalidURIException -``` - -#### General exceptions - -In general, Jedis can throw the following exceptions while executing commands: - -- `JedisConnectionException` - when the connection to Redis is lost or closed unexpectedly. Configure failover to handle this exception automatically with Resilience4J and the built-in Jedis failover mechanism. -- `JedisAccessControlException` - when the user does not have the permission to execute the command or the user ID and/or password are incorrect. -- `JedisDataException` - when there is a problem with the data being sent to or received from the Redis server. Usually, the error message will contain more information about the failed command. -- `JedisException` - this exception is a catch-all exception that can be thrown for any other unexpected errors. - -Conditions when `JedisException` can be thrown: -- Bad return from a health check with the [`PING`]({{< relref "/commands/ping" >}}) command -- Failure during SHUTDOWN -- Pub/Sub failure when issuing commands (disconnect) -- Any unknown server messages -- Sentinel: can connect to sentinel but master is not monitored or all Sentinels are down. -- MULTI or DISCARD command failed -- Shard commands key hash check failed or no Reachable Shards -- Retry deadline exceeded/number of attempts (Retry Command Executor) -- POOL - pool exhausted, error adding idle objects, returning broken resources to the pool - -All the Jedis exceptions are runtime exceptions and in most cases irrecoverable, so in general bubble up to the API capturing the error message. - -### DNS cache and Redis - -When you connect to a Redis with multiple endpoints, such as [Redis Enterprise Active-Active](https://redis.com/redis-enterprise/technology/active-active-geo-distribution/), it's recommended to disable the JVM's DNS cache to load-balance requests across multiple endpoints. - -You can do this in your application's code with the following snippet: -```java -java.security.Security.setProperty("networkaddress.cache.ttl","0"); -java.security.Security.setProperty("networkaddress.cache.negative.ttl", "0"); -``` - -## Learn more - -* [Jedis API reference](https://www.javadoc.io/doc/redis.clients/jedis/latest/index.html) -* [Failover with Jedis](https://github.com/redis/jedis/blob/master/docs/failover.md) -* [GitHub](https://github.com/redis/jedis) diff --git a/content/develop/clients/jedis/produsage.md b/content/develop/clients/jedis/produsage.md new file mode 100644 index 0000000000..8cf2518859 --- /dev/null +++ b/content/develop/clients/jedis/produsage.md @@ -0,0 +1,91 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Get your Jedis app ready for production +linkTitle: Production usage +title: Production usage +weight: 3 +--- + +The following sections explain how to handle situations that may occur +in your production environment. + +### Timeouts + +To set a timeout for a connection, use the `JedisPooled` or `JedisPool` constructor with the `timeout` parameter, or use `JedisClientConfig` with the `socketTimeout` and `connectionTimeout` parameters: + +```java +HostAndPort hostAndPort = new HostAndPort("localhost", 6379); + +JedisPooled jedisWithTimeout = new JedisPooled(hostAndPort, + DefaultJedisClientConfig.builder() + .socketTimeoutMillis(5000) // set timeout to 5 seconds + .connectionTimeoutMillis(5000) // set connection timeout to 5 seconds + .build(), + poolConfig +); +``` + +### Exception handling + +The Jedis Exception Hierarchy is rooted on `JedisException`, which implements `RuntimeException`, and are therefore all unchecked exceptions. + +``` +JedisException +├── JedisDataException +│ ├── JedisRedirectionException +│ │ ├── JedisMovedDataException +│ │ └── JedisAskDataException +│ ├── AbortedTransactionException +│ ├── JedisAccessControlException +│ └── JedisNoScriptException +├── JedisClusterException +│ ├── JedisClusterOperationException +│ ├── JedisConnectionException +│ └── JedisValidationException +└── InvalidURIException +``` + +#### General exceptions + +In general, Jedis can throw the following exceptions while executing commands: + +- `JedisConnectionException` - when the connection to Redis is lost or closed unexpectedly. Configure failover to handle this exception automatically with Resilience4J and the built-in Jedis failover mechanism. +- `JedisAccessControlException` - when the user does not have the permission to execute the command or the user ID and/or password are incorrect. +- `JedisDataException` - when there is a problem with the data being sent to or received from the Redis server. Usually, the error message will contain more information about the failed command. +- `JedisException` - this exception is a catch-all exception that can be thrown for any other unexpected errors. + +Conditions when `JedisException` can be thrown: +- Bad return from a health check with the [`PING`]({{< relref "/commands/ping" >}}) command +- Failure during SHUTDOWN +- Pub/Sub failure when issuing commands (disconnect) +- Any unknown server messages +- Sentinel: can connect to sentinel but master is not monitored or all Sentinels are down. +- MULTI or DISCARD command failed +- Shard commands key hash check failed or no Reachable Shards +- Retry deadline exceeded/number of attempts (Retry Command Executor) +- POOL - pool exhausted, error adding idle objects, returning broken resources to the pool + +All the Jedis exceptions are runtime exceptions and in most cases irrecoverable, so in general bubble up to the API capturing the error message. + +### DNS cache and Redis + +When you connect to a Redis server with multiple endpoints, such as [Redis Enterprise Active-Active](https://redis.com/redis-enterprise/technology/active-active-geo-distribution/), you *must* +disable the JVM's DNS cache. If a server node or proxy fails, the IP address for any database +affected by the failure will change. When this happens, your app will keep +trying to use the stale IP address if DNS caching is enabled. + +Use the following code to disable the DNS cache: + +```java +java.security.Security.setProperty("networkaddress.cache.ttl","0"); +java.security.Security.setProperty("networkaddress.cache.negative.ttl", "0"); +``` diff --git a/content/develop/clients/lettuce/_index.md b/content/develop/clients/lettuce/_index.md new file mode 100644 index 0000000000..8c8c9b9c6f --- /dev/null +++ b/content/develop/clients/lettuce/_index.md @@ -0,0 +1,93 @@ +--- +aliases: /develop/connect/clients/java/lettuce +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Connect your Lettuce application to a Redis database +linkTitle: Lettuce (Java) +title: Lettuce guide (Java) +weight: 6 +--- + +[Lettuce](https://github.com/redis/lettuce/tree/main/src/main) is an advanced Java client for Redis +that supports synchronous, asynchronous, and reactive connections. +If you only need synchronous connections then you may find the other Java client +[Jedis]({{< relref "/develop/clients/jedis" >}}) easier to use. + +The sections below explain how to install `Lettuce` and connect your application +to a Redis database. + +`Lettuce` requires a running Redis or [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. + +## Install + +To include Lettuce as a dependency in your application, edit the appropriate dependency file as shown below. + +If you use Maven, add the following dependency to your `pom.xml`: + +```xml + + io.lettuce + lettuce-core + 6.3.2.RELEASE + +``` + +If you use Gradle, include this line in your `build.gradle` file: + +``` +dependencies { + compileOnly 'io.lettuce:lettuce-core:6.3.2.RELEASE' +} +``` + +If you wish to use the JAR files directly, download the latest Lettuce and, optionally, Apache Commons Pool2 JAR files from Maven Central or any other Maven repository. + +To build from source, see the instructions on the [Lettuce source code GitHub repo](https://github.com/lettuce-io/lettuce-core). + +## Connect and test + +Connect to a local server using the following code. This example +also stores and retrieves a simple string value to test the connection. + +```java +import io.lettuce.core.*; +import io.lettuce.core.api.StatefulRedisConnection; +import io.lettuce.core.api.sync.RedisCommands; + +public class ConnectBasicTest { + + public void connectBasic() { + RedisURI uri = RedisURI.Builder + .redis("localhost", 6379) + .build(); + + RedisClient client = RedisClient.create(uri); + StatefulRedisConnection connection = client.connect(); + RedisCommands commands = connection.sync(); + + commands.set("foo", "bar"); + String result = commands.get("foo"); + System.out.println(result); // >>> bar + + connection.close(); + + client.shutdown(); + } +} +``` + +## More information + +The [Lettuce reference guide](https://redis.github.io/lettuce/) has more examples +and an API reference. You may also be interested in the +[Project Reactor](https://projectreactor.io/) library that Lettuce uses. + +See also the other pages in this section for more information and examples: diff --git a/content/develop/connect/clients/java/lettuce.md b/content/develop/clients/lettuce/connect.md similarity index 58% rename from content/develop/connect/clients/java/lettuce.md rename to content/develop/clients/lettuce/connect.md index 315a89a72e..c44830ec40 100644 --- a/content/develop/connect/clients/java/lettuce.md +++ b/content/develop/clients/lettuce/connect.md @@ -9,53 +9,44 @@ categories: - oss - kubernetes - clients -description: Connect your Lettuce application to a Redis database -linkTitle: Lettuce -title: Lettuce guide +description: Connect your .NET application to a Redis database +linkTitle: Connect +title: Connect to the server weight: 2 --- -[Lettuce](https://github.com/redis/lettuce/tree/main/src/main) is an advanced Java client for Redis -that supports synchronous, asynchronous, and reactive connections. -If you only need synchronous connections then you may find the other Java client -[Jedis]({{< relref "/develop/connect/clients/java/jedis" >}}) easier to use. - -The sections below explain how to install `Lettuce` and connect your application -to a Redis database. +Start by creating a connection to your Redis server. There are many ways to achieve this using Lettuce. Here are a few. -`Lettuce` requires a running Redis or [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. +## Basic connection -## Install +```java +import io.lettuce.core.*; +import io.lettuce.core.api.StatefulRedisConnection; +import io.lettuce.core.api.sync.RedisCommands; -To include Lettuce as a dependency in your application, edit the appropriate dependency file as shown below. +public class ConnectBasicTest { -If you use Maven, add the following dependency to your `pom.xml`: + public void connectBasic() { + RedisURI uri = RedisURI.Builder + .redis("localhost", 6379) + .withAuthentication("default", "yourPassword") + .build(); + RedisClient client = RedisClient.create(uri); + StatefulRedisConnection connection = client.connect(); + RedisCommands commands = connection.sync(); -```xml - - io.lettuce - lettuce-core - 6.3.2.RELEASE - -``` + commands.set("foo", "bar"); + String result = commands.get("foo"); + System.out.println(result); // >>> bar -If you use Gradle, include this line in your `build.gradle` file: + connection.close(); -``` -dependencies { - compileOnly 'io.lettuce:lettuce-core:6.3.2.RELEASE' + client.shutdown(); + } } ``` -If you wish to use the JAR files directly, download the latest Lettuce and, optionally, Apache Commons Pool2 JAR files from Maven Central or any other Maven repository. - -To build from source, see the instructions on the [Lettuce source code GitHub repo](https://github.com/lettuce-io/lettuce-core). - -## Connect - -Start by creating a connection to your Redis server. There are many ways to achieve this using Lettuce. Here are a few. - -### Asynchronous connection +## Asynchronous connection ```java package org.example; @@ -98,7 +89,7 @@ public class Async { Learn more about asynchronous Lettuce API in [the reference guide](https://redis.github.io/lettuce/#asynchronous-api). -### Reactive connection +## Reactive connection ```java package org.example; @@ -140,7 +131,7 @@ public class Main { Learn more about reactive Lettuce API in [the reference guide](https://redis.github.io/lettuce/#reactive-api). -### Redis Cluster connection +## Connect to a Redis cluster ```java import io.lettuce.core.RedisURI; @@ -180,62 +171,12 @@ RedisClient client = RedisClient.create(redisUri); Lettuce uses `ClientResources` for efficient management of shared resources like event loop groups and thread pools. For connection pooling, Lettuce leverages `RedisClient` or `RedisClusterClient`, which can handle multiple concurrent connections efficiently. -### Timeouts - -Lettuce provides timeouts for many operations, such as command execution, SSL handshake, and Sentinel discovery. By default, Lettuce uses a global timeout value of 60 seconds for these operations, but you can override the global timeout value with individual timeout values for each operation. - -{{% alert title="Tip" color="warning" %}} -Choosing suitable timeout values is crucial for your application's performance and stability and is specific to each environment. -Configuring timeouts is only necessary if you have issues with the default values. -In some cases, the defaults are based on environment-specific settings (e.g., operating system settings), while in other cases, they are built into the Lettuce driver. -For more details on setting specific timeouts, see the [Lettuce reference guide](https://redis.github.io/lettuce/). -{{% /alert %}} - -Below is an example of setting socket-level timeouts. The `TCP_USER_TIMEOUT` setting is useful for scenarios where the server stops responding without acknowledging the last request, while the `KEEPALIVE` setting is good for detecting dead connections where there is no traffic between the client and the server. - -```java -RedisURI redisURI = RedisURI.Builder - .redis("localhost") - // set the global default from the default 60 seconds to 30 seconds - .withTimeout(Duration.ofSeconds(30)) - .build(); - -try (RedisClient client = RedisClient.create(redisURI)) { - // or set specific timeouts for things such as the TCP_USER_TIMEOUT and TCP_KEEPALIVE - - // A good general rule of thumb is to follow the rule - // TCP_USER_TIMEOUT = TCP_KEEP_IDLE+TCP_KEEPINTVL * TCP_KEEPCNT - // in this case, 20 = 5 + 5 * 3 - - SocketOptions.TcpUserTimeoutOptions tcpUserTimeout = SocketOptions.TcpUserTimeoutOptions.builder() - .tcpUserTimeout(Duration.ofSeconds(20)) - .enable().build(); - - SocketOptions.KeepAliveOptions keepAliveOptions = SocketOptions.KeepAliveOptions.builder() - .interval(Duration.ofSeconds(5)) - .idle(Duration.ofSeconds(5)) - .count(3).enable().build(); - - SocketOptions socketOptions = SocketOptions.builder() - .tcpUserTimeout(tcpUserTimeout) - .keepAlive(keepAliveOptions) - .build(); - - client.setOptions(ClientOptions.builder() - .socketOptions(socketOptions) - .build()); - - StatefulRedisConnection connection = client.connect(); - System.out.println(connection.sync().ping()); -} -``` - -### Connection pooling +## Connection pooling A typical approach with Lettuce is to create a single `RedisClient` instance and reuse it to establish connections to your Redis server(s). These connections are multiplexed; that is, multiple commands can be run concurrently over a single or a small set of connections, making explicit pooling less practical. See -[Connection pools and multiplexing]({{< relref "/develop/connect/clients/pools-and-muxing" >}}) +[Connection pools and multiplexing]({{< relref "/develop/clients/pools-and-muxing" >}}) for more information. Lettuce provides pool config to be used with Lettuce asynchronous connection methods. @@ -293,20 +234,3 @@ public class Pool { ``` In this setup, `LettuceConnectionFactory` is a custom class you would need to implement, adhering to Apache Commons Pool's `PooledObjectFactory` interface, to manage lifecycle events of pooled `StatefulRedisConnection` objects. - -## DNS cache and Redis - -When you connect to a Redis database with multiple endpoints, such as Redis Enterprise Active-Active, it's recommended to disable the JVM's DNS cache to load-balance requests across multiple endpoints. - -You can do this in your application's code with the following snippet: - -```java -java.security.Security.setProperty("networkaddress.cache.ttl","0"); -java.security.Security.setProperty("networkaddress.cache.negative.ttl", "0"); -``` - -## Learn more - -- [Lettuce reference documentation](https://redis.github.io/lettuce/) -- [Redis commands]({{< relref "/commands" >}}) -- [Project Reactor](https://projectreactor.io/) diff --git a/content/develop/clients/lettuce/produsage.md b/content/develop/clients/lettuce/produsage.md new file mode 100644 index 0000000000..7931ccd63a --- /dev/null +++ b/content/develop/clients/lettuce/produsage.md @@ -0,0 +1,84 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Get your Lettuce app ready for production +linkTitle: Production usage +title: Production usage +weight: 3 +--- + +The following sections explain how to handle situations that may occur +in your production environment. + +## Timeouts + +Lettuce provides timeouts for many operations, such as command execution, SSL handshake, and Sentinel discovery. By default, Lettuce uses a global timeout value of 60 seconds for these operations, but you can override the global timeout value with individual timeout values for each operation. + +{{% alert title="Tip" color="warning" %}} +Choosing suitable timeout values is crucial for your application's performance and stability and is specific to each environment. +Configuring timeouts is only necessary if you have issues with the default values. +In some cases, the defaults are based on environment-specific settings (e.g., operating system settings), while in other cases, they are built into the Lettuce driver. +For more details on setting specific timeouts, see the [Lettuce reference guide](https://redis.github.io/lettuce/). +{{% /alert %}} + +Below is an example of setting socket-level timeouts. The `TCP_USER_TIMEOUT` setting is useful for scenarios where the server stops responding without acknowledging the last request, while the `KEEPALIVE` setting is good for detecting dead connections where there is no traffic between the client and the server. + +```java +RedisURI redisURI = RedisURI.Builder + .redis("localhost") + // set the global default from the default 60 seconds to 30 seconds + .withTimeout(Duration.ofSeconds(30)) + .build(); + +try (RedisClient client = RedisClient.create(redisURI)) { + // or set specific timeouts for things such as the TCP_USER_TIMEOUT and TCP_KEEPALIVE + + // A good general rule of thumb is to follow the rule + // TCP_USER_TIMEOUT = TCP_KEEP_IDLE+TCP_KEEPINTVL * TCP_KEEPCNT + // in this case, 20 = 5 + 5 * 3 + + SocketOptions.TcpUserTimeoutOptions tcpUserTimeout = SocketOptions.TcpUserTimeoutOptions.builder() + .tcpUserTimeout(Duration.ofSeconds(20)) + .enable().build(); + + SocketOptions.KeepAliveOptions keepAliveOptions = SocketOptions.KeepAliveOptions.builder() + .interval(Duration.ofSeconds(5)) + .idle(Duration.ofSeconds(5)) + .count(3).enable().build(); + + SocketOptions socketOptions = SocketOptions.builder() + .tcpUserTimeout(tcpUserTimeout) + .keepAlive(keepAliveOptions) + .build(); + + client.setOptions(ClientOptions.builder() + .socketOptions(socketOptions) + .build()); + + StatefulRedisConnection connection = client.connect(); + System.out.println(connection.sync().ping()); +} +``` + + +## DNS cache and Redis + +When you connect to a Redis server with multiple endpoints, such as [Redis Enterprise Active-Active](https://redis.com/redis-enterprise/technology/active-active-geo-distribution/), you *must* +disable the JVM's DNS cache. If a server node or proxy fails, the IP address for any database +affected by the failure will change. When this happens, your app will keep +trying to use the stale IP address if DNS caching is enabled. + +Use the following code to disable the DNS cache: + +```java +java.security.Security.setProperty("networkaddress.cache.ttl","0"); +java.security.Security.setProperty("networkaddress.cache.negative.ttl", "0"); +``` diff --git a/content/develop/clients/nodejs/_index.md b/content/develop/clients/nodejs/_index.md new file mode 100644 index 0000000000..8bc77c2ecc --- /dev/null +++ b/content/develop/clients/nodejs/_index.md @@ -0,0 +1,96 @@ +--- +aliases: /develop/connect/clients/nodejs +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Connect your Node.js/JavaScript application to a Redis database +linkTitle: node-redis (JavaScript) +title: node-redis guide (JavaScript) +weight: 4 +--- + +[node-redis](https://github.com/redis/node-redis) is the Redis client for Node.js/JavaScript. +The sections below explain how to install `node-redis` and connect your application +to a Redis database. + +`node-redis` requires a running Redis or [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. + +You can also access Redis with an object-mapping client interface. See +[RedisOM for Node.js]({{< relref "/integrate/redisom-for-node-js" >}}) +for more information. + +## Install + +To install node-redis, run: + +```bash +npm install redis +``` + +## Connect and test + +Connect to localhost on port 6379. + +```js +import { createClient } from 'redis'; + +const client = createClient(); + +client.on('error', err => console.log('Redis Client Error', err)); + +await client.connect(); +``` + +Store and retrieve a simple string. + +```js +await client.set('key', 'value'); +const value = await client.get('key'); +``` + +Store and retrieve a map. + +```js +await client.hSet('user-session:123', { + name: 'John', + surname: 'Smith', + company: 'Redis', + age: 29 +}) + +let userSession = await client.hGetAll('user-session:123'); +console.log(JSON.stringify(userSession, null, 2)); +/* +{ + "surname": "Smith", + "name": "John", + "company": "Redis", + "age": "29" +} + */ +``` + +To connect to a different host or port, use a connection string in the format `redis[s]://[[username][:password]@][host][:port][/db-number]`: + +```js +createClient({ + url: 'redis://alice:foobared@awesome.redis.server:6380' +}); +``` +To check if the client is connected and ready to send commands, use `client.isReady`, which returns a Boolean. `client.isOpen` is also available. This returns `true` when the client's underlying socket is open, and `false` when it isn't (for example, when the client is still connecting or reconnecting after a network error). + +## More information + +The [`node-redis` website](https://redis.js.org/) has more examples. +The [Github repository](https://github.com/redis/node-redis) also has useful +information, including a guide to the +[connection configuration options](https://github.com/redis/node-redis/blob/master/docs/client-configuration.md) you can use. + +See also the other pages in this section for more information and examples: diff --git a/content/develop/clients/nodejs/connect.md b/content/develop/clients/nodejs/connect.md new file mode 100644 index 0000000000..cb1d11e739 --- /dev/null +++ b/content/develop/clients/nodejs/connect.md @@ -0,0 +1,129 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Connect your Node.js application to a Redis database +linkTitle: Connect +title: Connect to the server +weight: 2 +--- + +## Basic connection + +Connect to localhost on port 6379. + +```js +import { createClient } from 'redis'; + +const client = createClient(); + +client.on('error', err => console.log('Redis Client Error', err)); + +await client.connect(); +``` + +Store and retrieve a simple string. + +```js +await client.set('key', 'value'); +const value = await client.get('key'); +``` + +Store and retrieve a map. + +```js +await client.hSet('user-session:123', { + name: 'John', + surname: 'Smith', + company: 'Redis', + age: 29 +}) + +let userSession = await client.hGetAll('user-session:123'); +console.log(JSON.stringify(userSession, null, 2)); +/* +{ + "surname": "Smith", + "name": "John", + "company": "Redis", + "age": "29" +} + */ +``` + +To connect to a different host or port, use a connection string in the format `redis[s]://[[username][:password]@][host][:port][/db-number]`: + +```js +createClient({ + url: 'redis://alice:foobared@awesome.redis.server:6380' +}); +``` +To check if the client is connected and ready to send commands, use `client.isReady`, which returns a Boolean. `client.isOpen` is also available. This returns `true` when the client's underlying socket is open, and `false` when it isn't (for example, when the client is still connecting or reconnecting after a network error). + +### Connect to a Redis cluster + +To connect to a Redis cluster, use `createCluster`. + +```js +import { createCluster } from 'redis'; + +const cluster = createCluster({ + rootNodes: [ + { + url: 'redis://127.0.0.1:16379' + }, + { + url: 'redis://127.0.0.1:16380' + }, + // ... + ] +}); + +cluster.on('error', (err) => console.log('Redis Cluster Error', err)); + +await cluster.connect(); + +await cluster.set('foo', 'bar'); +const value = await cluster.get('foo'); +console.log(value); // returns 'bar' + +await cluster.quit(); +``` + +### Connect to your production Redis with TLS + +When you deploy your application, use TLS and follow the [Redis security]({{< relref "/operate/oss_and_stack/management/security/" >}}) guidelines. + +```js +const client = createClient({ + username: 'default', // use your Redis user. More info https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/ + password: 'secret', // use your password here + socket: { + host: 'my-redis.cloud.redislabs.com', + port: 6379, + tls: true, + key: readFileSync('./redis_user_private.key'), + cert: readFileSync('./redis_user.crt'), + ca: [readFileSync('./redis_ca.pem')] + } +}); + +client.on('error', (err) => console.log('Redis Client Error', err)); + +await client.connect(); + +await client.set('foo', 'bar'); +const value = await client.get('foo'); +console.log(value) // returns 'bar' + +await client.disconnect(); +``` + +You can also use discrete parameters and UNIX sockets. Details can be found in the [client configuration guide](https://github.com/redis/node-redis/blob/master/docs/client-configuration.md). diff --git a/content/develop/clients/nodejs/produsage.md b/content/develop/clients/nodejs/produsage.md new file mode 100644 index 0000000000..32be48680a --- /dev/null +++ b/content/develop/clients/nodejs/produsage.md @@ -0,0 +1,84 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Get your Node.js app ready for production +linkTitle: Production usage +title: Production usage +weight: 3 +--- + +The following sections explain how to handle situations that may occur +in your production environment. + +### Handling errors + +Node-Redis provides [multiple events to handle various scenarios](https://github.com/redis/node-redis?tab=readme-ov-file#events), among which the most critical is the `error` event. + +This event is triggered whenever an error occurs within the client. + +It is crucial to listen for error events. + +If a client does not register at least one error listener and an error occurs, the system will throw that error, potentially causing the Node.js process to exit unexpectedly. +See [the EventEmitter docs](https://nodejs.org/api/events.html#events_error_events) for more details. + +```typescript +const client = createClient({ + // ... client options +}); +// Always ensure there's a listener for errors in the client to prevent process crashes due to unhandled errors +client.on('error', error => { + console.error(`Redis client error:`, error); +}); +``` + +### Handling reconnections + +If network issues or other problems unexpectedly close the socket, the client will reject all commands already sent, since the server might have already executed them. +The rest of the pending commands will remain queued in memory until a new socket is established. +This behaviour is controlled by the `enableOfflineQueue` option, which is enabled by default. + +The client uses `reconnectStrategy` to decide when to attempt to reconnect. +The default strategy is to calculate the delay before each attempt based on the attempt number `Math.min(retries * 50, 500)`. You can customize this strategy by passing a supported value to `reconnectStrategy` option: + + +1. Define a callback `(retries: number, cause: Error) => false | number | Error` **(recommended)** +```typescript +const client = createClient({ + socket: { + reconnectStrategy: function(retries) { + if (retries > 20) { + console.log("Too many attempts to reconnect. Redis connection was terminated"); + return new Error("Too many retries."); + } else { + return retries * 500; + } + } + } +}); +client.on('error', error => console.error('Redis client error:', error)); +``` +In the provided reconnection strategy callback, the client attempts to reconnect up to 20 times with a delay of `retries * 500` milliseconds between attempts. +After approximately two minutes, the client logs an error message and terminates the connection if the maximum retry limit is exceeded. + + +2. Use a numerical value to set a fixed delay in milliseconds. +3. Use `false` to disable reconnection attempts. This option should only be used for testing purposes. + +### Timeouts + +To set a timeout for a connection, use the `connectTimeout` option: +```typescript +const client = createClient({ + // setting a 10-second timeout + connectTimeout: 10000 // in milliseconds +}); +client.on('error', error => console.error('Redis client error:', error)); +``` \ No newline at end of file diff --git a/content/develop/connect/clients/om-clients/_index.md b/content/develop/clients/om-clients/_index.md similarity index 94% rename from content/develop/connect/clients/om-clients/_index.md rename to content/develop/clients/om-clients/_index.md index 8a762ed4df..d1902af7a9 100644 --- a/content/develop/connect/clients/om-clients/_index.md +++ b/content/develop/clients/om-clients/_index.md @@ -1,4 +1,5 @@ --- +aliases: /develop/connect/om-clients categories: - docs - develop @@ -13,7 +14,7 @@ description: Object-Mapper libraries for Redis Stack linkTitle: Object mapping stack: true title: Object-Mapper libraries -weight: 6 +weight: 10 --- Redis OM (pronounced *REDiss OHM*) is a library that provides object mapping for Redis. With the help of Redis OM, you can map Redis data types, specifically Hashes and JSON documents, to objects of your preferred programming language or framework. Redis OM relies on Redis Stack's JSON, query, and search features, allowing you to query and search for objects. diff --git a/content/develop/clients/php/_index.md b/content/develop/clients/php/_index.md new file mode 100644 index 0000000000..2511caf498 --- /dev/null +++ b/content/develop/clients/php/_index.md @@ -0,0 +1,91 @@ +--- +aliases: /develop/connect/clients/php +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Connect your PHP application to a Redis database +linkTitle: Predis (PHP) +title: Predis guide (PHP) +weight: 8 +--- + +[`Predis`](https://github.com/predis/predis) is the recommended [PHP](https://php.net/) +client for Redis. +The sections below explain how to install `Predis` and connect your application to a Redis database. + +{{< note >}}Although we provide basic documentation for `Predis`, it is a third-party +client library and is not developed or supported directly by Redis. +{{< /note >}} + +`Predis` requires a running Redis or +[Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. +See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation +instructions. + +## Install + +Use [Composer](https://getcomposer.org/) to install the `Predis` library +with the following command line: + +```bash +composer require predis/predis +``` + +## Connect and test + +Connect to a locally-running server on the standard port (6379) +with the following code: + +```php +set('foo', 'bar'), PHP_EOL; +// >>> OK + +echo $r->get('foo'), PHP_EOL; +// >>> bar +``` + +Store and retrieve a [hash]({{< relref "/develop/data-types/hashes" >}}) +object: + +```php +$r->hset('user-session:123', 'name', 'John'); +$r->hset('user-session:123', 'surname', 'Smith'); +$r->hset('user-session:123', 'company', 'Redis'); +$r->hset('user-session:123', 'age', 29); + +echo var_export($r->hgetall('user-session:123')), PHP_EOL; +/* >>> +array ( + 'name' => 'John', + 'surname' => 'Smith', + 'company' => 'Redis', + 'age' => '29', +) +*/ +``` + +## More information + +The [Predis wiki on Github](https://github.com/predis/predis/wiki) has +information about the different connection options you can use. + +See also the pages in this section for more information and examples: diff --git a/content/develop/clients/php/connect.md b/content/develop/clients/php/connect.md new file mode 100644 index 0000000000..97352654be --- /dev/null +++ b/content/develop/clients/php/connect.md @@ -0,0 +1,143 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Connect your PHP application to a Redis database +linkTitle: Connect +title: Connect to the server +weight: 2 +--- + +## Basic connection + +Connect to a locally-running server on the standard port (6379) +with the following code: + +```php +set('foo', 'bar'), PHP_EOL; +// >>> OK + +echo $r->get('foo'), PHP_EOL; +// >>> bar +``` + +Store and retrieve a [hash]({{< relref "/develop/data-types/hashes" >}}) +object: + +```php +$r->hset('user-session:123', 'name', 'John'); +$r->hset('user-session:123', 'surname', 'Smith'); +$r->hset('user-session:123', 'company', 'Redis'); +$r->hset('user-session:123', 'age', 29); + +echo var_export($r->hgetall('user-session:123')), PHP_EOL; +/* >>> +array ( + 'name' => 'John', + 'surname' => 'Smith', + 'company' => 'Redis', + 'age' => '29', +) +*/ +``` + +## Connect to a Redis cluster + +To connect to a Redis cluster, specify one or more of the nodes in +the `clusterNodes` parameter and set `'cluster'=>'redis'` in +`options`: + +```php +$clusterNodes = [ + 'tcp://127.0.0.1:30001', // Node 1 + 'tcp://127.0.0.1:30002', // Node 2 + 'tcp://127.0.0.1:30003', // Node 3 +]; +$options = ['cluster' => 'redis']; + +// Create a Predis client for the cluster +$rc = new PredisClient($clusterNodes, $options); + +echo $rc->cluster('nodes'), PHP_EOL; +/* >>> +d8773e888e92d015b7c52fc66798fd6815afefec 127.0.0.1:30004@40004 slave cde97d1f7dce13e9253ace5cafd3fb0aa67cda63 0 1730713764217 1 connected +58fe1346de4c425d60db24e9b153926fbde0d174 127.0.0.1:30002@40002 master - 0 1730713763361 2 connected 5461-10922 +015ecc8148a05377dda22f19921d16efcdd6d678 127.0.0.1:30006@40006 slave c019b75d8b52e83e7e52724eccc716ac553f71d6 0 1730713764218 3 connected +aca365963a72642e6ae0c9503aabf3be5c260806 127.0.0.1:30005@40005 slave 58fe1346de4c425d60db24e9b153926fbde0d174 0 1730713763363 2 connected +c019b75d8b52e83e7e52724eccc716ac553f71d6 127.0.0.1:30003@40003 myself,master - 0 1730713764000 3 connected 10923-16383 +cde97d1f7dce13e9253ace5cafd3fb0aa67cda63 127.0.0.1:30001@40001 master - 0 1730713764113 1 connected 0-5460 +*/ + +echo $rc->set('foo', 'bar'), PHP_EOL; +// >>> OK +echo $rc->get('foo'), PHP_EOL; +// >>> bar +``` + +## Connect to your production Redis with TLS + +When you deploy your application, use TLS and follow the +[Redis security]({{< relref "/operate/oss_and_stack/management/security/" >}}) +guidelines. + +Use the following commands to generate the client certificate and private key: + +```bash +openssl genrsa -out redis_user_private.key 2048 +openssl req -new -key redis_user_private.key -out redis_user.csr +openssl x509 -req -days 365 -in redis_user.csr -signkey redis_user_private.key -out redis_user.crt +``` + +If you have the [Redis source folder](https://github.com/redis/redis) available, +you can also generate the certificate and private key with these commands: + +```bash +./utils/gen-test-certs.sh +./src/redis-server --tls-port 6380 --port 0 --tls-cert-file ./tests/tls/redis.crt --tls-key-file ./tests/tls/redis.key --tls-ca-cert-file ./tests/tls/ca.crt +``` + +Pass this information during connection using the `ssl` section of `options`: + +```php +$options = [ + 'scheme' => 'tls', // Use 'tls' for SSL connections + 'host' => '127.0.0.1', // Redis server hostname + 'port' => 6379, // Redis server port + 'username' => 'default', // Redis username + 'password' => '', // Redis password + 'options' => [ + 'ssl' => [ + 'verify_peer' => true, // Verify the server's SSL certificate + 'cafile' => './redis_ca.pem', // Path to CA certificate + 'local_cert' => './redis_user.crt', // Path to client certificate + 'local_pk' => './redis_user_private.key', // Path to client private key + ], + ], +]; + +$tlsConnection = new PredisClient($options); + +echo $tlsConnection->set('foo', 'bar'), PHP_EOL; +// >>> OK +echo $tlsConnection->get('foo'), PHP_EOL; +// >>> bar +``` \ No newline at end of file diff --git a/content/develop/clients/php/queryjson.md b/content/develop/clients/php/queryjson.md new file mode 100644 index 0000000000..67ed7a6c79 --- /dev/null +++ b/content/develop/clients/php/queryjson.md @@ -0,0 +1,153 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Learn how to use the Redis query engine with JSON +linkTitle: JSON query example +title: Example - Index and query JSON documents +weight: 2 +--- + +This example shows how to index and query Redis JSON data using `predis`. + +Make sure that you have Redis Stack and `predis` installed, as described +in the [Install](#install) section above. + +Start by importing dependencies: + +```php + 'tcp', + 'host' => '127.0.0.1', + 'port' => 6379, + 'password' => '', + 'database' => 0, + ]); +``` + +Create some test data to add to the database: + +```php +$user1 = json_encode([ + 'name' => 'Paul John', + 'email' => 'paul.john@example.com', + 'age' => 42, + 'city' => 'London', +], JSON_THROW_ON_ERROR); + +$user2 = json_encode([ + 'name' => 'Eden Zamir', + 'email' => 'eden.zamir@example.com', + 'age' => 29, + 'city' => 'Tel Aviv', +], JSON_THROW_ON_ERROR); + +$user3 = json_encode([ + 'name' => 'Paul Zamir', + 'email' => 'paul.zamir@example.com', + 'age' => 35, + 'city' => 'Tel Aviv', +], JSON_THROW_ON_ERROR); +``` + +Create an +[index]({{< relref "/develop/interact/search-and-query/indexing" >}}). +In this example, only JSON documents with the key prefix `user:` are indexed. +For more information, see +[Query syntax]({{< relref "/develop/interact/search-and-query/query/" >}}). + +```php +$schema = [ + new TextField('$.name', 'name'), + new TagField('$.city', 'city'), + new NumericField('$.age', "age"), +]; + +try { +$r->ftCreate("idx:users", $schema, + (new CreateArguments()) + ->on('JSON') + ->prefix(["user:"])); +} +catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; +} +``` + +Add the three sets of user data to the database as +[JSON]({{< relref "/develop/data-types/json" >}}) objects. +If you use keys with the `user:` prefix then Redis will index the +objects automatically as you add them: + +```php +$r->jsonset('user:1', '$', $user1); +$r->jsonset('user:2', '$', $user2); +$r->jsonset('user:3', '$', $user3); +``` + +You can now use the index to search the JSON objects. The +[query]({{< relref "/develop/interact/search-and-query/query" >}}) +below searches for objects that have the text "Paul" in any field +and have an `age` value in the range 30 to 40: + +```php +$res = $r->ftSearch("idx:users", "Paul @age:[30 40]"); +echo json_encode($res), PHP_EOL; +// >>> [1,"user:3",["$","{\"name\":\"Paul Zamir\",\"email\":\"paul.zamir@example.com\",\"age\":35,\"city\":\"London\"}"]] +``` + +Specify query options to return only the `city` field: + +```php +$arguments = new SearchArguments(); +$arguments->addReturn(3, '$.city', true, 'thecity'); +$arguments->dialect(2); +$arguments->limit(0, 5); + +$res = $r->ftSearch("idx:users", "Paul", $arguments); + +echo json_encode($res), PHP_EOL; +// >>> [2,"user:1",["thecity","London"],"user:3",["thecity","Tel Aviv"]] +``` + +Use an +[aggregation query]({{< relref "/develop/interact/search-and-query/query/aggregation" >}}) +to count all users in each city. + +```php +$ftAggregateArguments = (new AggregateArguments()) +->groupBy('@city') +->reduce('COUNT', true, 'count'); + +$res = $r->ftAggregate('idx:users', '*', $ftAggregateArguments); +echo json_encode($res), PHP_EOL; +// >>> [2,["city","London","count","1"],["city","Tel Aviv","count","2"]] +``` + +See the [Redis query engine]({{< relref "/develop/interact/search-and-query" >}}) docs +for a full description of all query features with examples. diff --git a/content/develop/connect/clients/pools-and-muxing.md b/content/develop/clients/pools-and-muxing.md similarity index 88% rename from content/develop/connect/clients/pools-and-muxing.md rename to content/develop/clients/pools-and-muxing.md index 82725e34bf..ad4decce0b 100644 --- a/content/develop/connect/clients/pools-and-muxing.md +++ b/content/develop/clients/pools-and-muxing.md @@ -1,4 +1,5 @@ --- +aliases: /develop/connect/clients/pools-and-muxing categories: - docs - develop @@ -12,7 +13,7 @@ categories: description: Manage Redis connections efficiently linkTitle: Pooling/multiplexing title: Connection pools and multiplexing -weight: 10 +weight: 30 --- Redis example code generally opens a connection, demonstrates @@ -26,13 +27,13 @@ code by making as few separate connections as possible. Managing connections in your own code can be tricky, so the Redis client libraries give you some help. The two basic approaches to connection management are called *connection pooling* and *multiplexing*. -The [`redis-py`]({{< relref "/develop/connect/clients/python/redis-py" >}}), -[`jedis`]({{< relref "/develop/connect/clients/java/jedis" >}}), and -[`go-redis`]({{< relref "/develop/connect/clients/go" >}}) clients support +The [`redis-py`]({{< relref "/develop/clients/redis-py" >}}), +[`jedis`]({{< relref "/develop/clients/jedis" >}}), and +[`go-redis`]({{< relref "/develop/clients/go" >}}) clients support connection pooling, while -[`NRedisStack`]({{< relref "/develop/connect/clients/dotnet" >}}) +[`NRedisStack`]({{< relref "/develop/clients/dotnet" >}}) supports multiplexing. -[`Lettuce`]({{< relref "/develop/connect/clients/java/lettuce" >}}) +[`Lettuce`]({{< relref "/develop/clients/lettuce" >}}) supports both approaches. ## Connection pooling diff --git a/content/develop/clients/redis-py/_index.md b/content/develop/clients/redis-py/_index.md new file mode 100644 index 0000000000..7f3b098216 --- /dev/null +++ b/content/develop/clients/redis-py/_index.md @@ -0,0 +1,89 @@ +--- +aliases: /develop/connect/clients/python/redis-py +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Connect your Python application to a Redis database +linkTitle: redis-py (Python) +title: redis-py guide (Python) +weight: 1 +--- + +[redis-py](https://github.com/redis/redis-py) is the Python client for Redis. +The sections below explain how to install `redis-py` and connect your application +to a Redis database. + +`redis-py` requires a running Redis or [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. + +You can also access Redis with an object-mapping client interface. See +[RedisOM for Python]({{< relref "/integrate/redisom-for-python" >}}) +for more information. + +## Install + +To install `redis-py`, enter: + +```bash +pip install redis +``` + +For faster performance, install Redis with [`hiredis`](https://github.com/redis/hiredis) support. This provides a compiled response parser, and for most cases requires zero code changes. By default, if `hiredis` >= 1.0 is available, `redis-py` attempts to use it for response parsing. + +{{% alert title="Note" %}} +The Python `distutils` packaging scheme is no longer part of Python 3.12 and greater. If you're having difficulties getting `redis-py` installed in a Python 3.12 environment, consider updating to a recent release of `redis-py`. +{{% /alert %}} + +```bash +pip install redis[hiredis] +``` + +## Connect and test + +Connect to localhost on port 6379, set a value in Redis, and retrieve it. All responses are returned as bytes in Python. To receive decoded strings, set `decode_responses=True`. For more connection options, see [these examples](https://redis.readthedocs.io/en/stable/examples.html). + +```python +r = redis.Redis(host='localhost', port=6379, decode_responses=True) +``` + +Store and retrieve a simple string. + +```python +r.set('foo', 'bar') +# True +r.get('foo') +# bar +``` + +Store and retrieve a dict. + +```python +r.hset('user-session:123', mapping={ + 'name': 'John', + "surname": 'Smith', + "company": 'Redis', + "age": 29 +}) +# True + +r.hgetall('user-session:123') +# {'surname': 'Smith', 'name': 'John', 'company': 'Redis', 'age': '29'} +``` + + + +## More information + +The [`redis-py`](https://redis-py.readthedocs.io/en/stable/index.html) website +has a [command reference](https://redis-py.readthedocs.io/en/stable/commands.html) +and some [tutorials](https://redis.readthedocs.io/en/stable/examples.html) for +various tasks. There are also some examples in the +[GitHub repository](https://github.com/redis/redis-py) for `redis-py`. + +See also the other pages in this section for more information and examples: \ No newline at end of file diff --git a/content/develop/connect/clients/python/redis-py.md b/content/develop/clients/redis-py/connect.md similarity index 59% rename from content/develop/connect/clients/python/redis-py.md rename to content/develop/clients/redis-py/connect.md index 340a741cfa..b06e3e0399 100644 --- a/content/develop/connect/clients/python/redis-py.md +++ b/content/develop/clients/redis-py/connect.md @@ -10,40 +10,12 @@ categories: - kubernetes - clients description: Connect your Python application to a Redis database -linkTitle: Redis Python library -title: Redis Python library guide -weight: 1 +linkTitle: Connect +title: Connect to the server +weight: 2 --- -[redis-py](https://github.com/redis/redis-py) is the Python client for Redis. -The sections below explain how to install `redis-py` and connect your application -to a Redis database. - -`redis-py` requires a running Redis or [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. - -You can also access Redis with an object-mapping client interface. See -[RedisOM for Python]({{< relref "/integrate/redisom-for-python" >}}) -for more information. - -## Install - -To install `redis-py`, enter: - -```bash -pip install redis -``` - -For faster performance, install Redis with [`hiredis`](https://github.com/redis/hiredis) support. This provides a compiled response parser, and for most cases requires zero code changes. By default, if `hiredis` >= 1.0 is available, `redis-py` attempts to use it for response parsing. - -{{% alert title="Note" %}} -The Python `distutils` packaging scheme is no longer part of Python 3.12 and greater. If you're having difficulties getting `redis-py` installed in a Python 3.12 environment, consider updating to a recent release of `redis-py`. -{{% /alert %}} - -```bash -pip install redis[hiredis] -``` - -## Connect +## Basic connection Connect to localhost on port 6379, set a value in Redis, and retrieve it. All responses are returned as bytes in Python. To receive decoded strings, set `decode_responses=True`. For more connection options, see [these examples](https://redis.readthedocs.io/en/stable/examples.html). @@ -75,7 +47,7 @@ r.hgetall('user-session:123') # {'surname': 'Smith', 'name': 'John', 'company': 'Redis', 'age': '29'} ``` -### Connect to a Redis cluster +## Connect to a Redis cluster To connect to a Redis cluster, use `RedisCluster`. @@ -95,7 +67,7 @@ rc.get('foo') ``` For more information, see [redis-py Clustering](https://redis-py.readthedocs.io/en/stable/clustering.html). -### Connect to your production Redis with TLS +## Connect to your production Redis with TLS When you deploy your application, use TLS and follow the [Redis security]({{< relref "/operate/oss_and_stack/management/security/" >}}) guidelines. @@ -123,7 +95,7 @@ For more information, see [redis-py TLS examples](https://redis-py.readthedocs.i Client-side caching is a technique to reduce network traffic between the client and server, resulting in better performance. See -[Client-side caching introduction]({{< relref "/develop/connect/clients/client-side-caching" >}}) +[Client-side caching introduction]({{< relref "/develop/clients/client-side-caching" >}}) for more information about how client-side caching works and how to use it effectively. To enable client-side caching, add some extra parameters when you connect @@ -160,7 +132,7 @@ cityNameAttempt2 = r.get("city") # Retrieved from cache ``` You can see the cache working if you connect to the same Redis database -with [`redis-cli`]({{< relref "/develop/connect/cli" >}}) and run the +with [`redis-cli`]({{< relref "/develop/tools/cli" >}}) and run the [`MONITOR`]({{< relref "/commands/monitor" >}}) command. If you run the code above with the `cache_config` line commented out, you should see the following in the CLI among the output from `MONITOR`: @@ -242,7 +214,7 @@ one of its open connections. When you subsequently close the same connection, it is not actually closed but simply returned to the pool for reuse. This avoids the overhead of repeated connecting and disconnecting. See -[Connection pools and multiplexing]({{< relref "/develop/connect/clients/pools-and-muxing" >}}) +[Connection pools and multiplexing]({{< relref "/develop/clients/pools-and-muxing" >}}) for more information. Use the following code to connect with a connection pool: @@ -265,110 +237,3 @@ r3.close() pool.close() ``` - -## Example: Indexing and querying JSON documents - -Make sure that you have Redis Stack and `redis-py` installed. Import dependencies: - -```python -import redis -from redis.commands.json.path import Path -import redis.commands.search.aggregation as aggregations -import redis.commands.search.reducers as reducers -from redis.commands.search.field import TextField, NumericField, TagField -from redis.commands.search.indexDefinition import IndexDefinition, IndexType -from redis.commands.search.query import NumericFilter, Query -``` - -Connect to your Redis database. - -```python -r = redis.Redis(host='localhost', port=6379) -``` - -Let's create some test data to add to your database. - -```python -user1 = { - "name": "Paul John", - "email": "paul.john@example.com", - "age": 42, - "city": "London" -} -user2 = { - "name": "Eden Zamir", - "email": "eden.zamir@example.com", - "age": 29, - "city": "Tel Aviv" -} -user3 = { - "name": "Paul Zamir", - "email": "paul.zamir@example.com", - "age": 35, - "city": "Tel Aviv" -} -``` - -Define indexed fields and their data types using `schema`. Use JSON path expressions to map specific JSON elements to the schema fields. - -```python -schema = ( - TextField("$.name", as_name="name"), - TagField("$.city", as_name="city"), - NumericField("$.age", as_name="age") -) -``` - -Create an index. In this example, all JSON documents with the key prefix `user:` will be indexed. For more information, see [Query syntax]({{< relref "/develop/interact/search-and-query/query/" >}}). - -```python -rs = r.ft("idx:users") -rs.create_index( - schema, - definition=IndexDefinition( - prefix=["user:"], index_type=IndexType.JSON - ) -) -# b'OK' -``` - -Use [`JSON.SET`]({{< baseurl >}}/commands/json.set/) to set each user value at the specified path. - -```python -r.json().set("user:1", Path.root_path(), user1) -r.json().set("user:2", Path.root_path(), user2) -r.json().set("user:3", Path.root_path(), user3) -``` - -Let's find user `Paul` and filter the results by age. - -```python -res = rs.search( - Query("Paul @age:[30 40]") -) -# Result{1 total, docs: [Document {'id': 'user:3', 'payload': None, 'json': '{"name":"Paul Zamir","email":"paul.zamir@example.com","age":35,"city":"Tel Aviv"}'}]} -``` - -Query using JSON Path expressions. - -```python -rs.search( - Query("Paul").return_field("$.city", as_field="city") -).docs -# [Document {'id': 'user:1', 'payload': None, 'city': 'London'}, Document {'id': 'user:3', 'payload': None, 'city': 'Tel Aviv'}] -``` - -Aggregate your results using [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate/). - -```python -req = aggregations.AggregateRequest("*").group_by('@city', reducers.count().alias('count')) -print(rs.aggregate(req).rows) -# [[b'city', b'Tel Aviv', b'count', b'2'], [b'city', b'London', b'count', b'1']] -``` - -## Learn more - -* [Command reference](https://redis-py.readthedocs.io/en/stable/commands.html) -* [Tutorials](https://redis.readthedocs.io/en/stable/examples.html) -* [GitHub](https://github.com/redis/redis-py) - diff --git a/content/develop/clients/redis-py/queryjson.md b/content/develop/clients/redis-py/queryjson.md new file mode 100644 index 0000000000..cef016d406 --- /dev/null +++ b/content/develop/clients/redis-py/queryjson.md @@ -0,0 +1,121 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Learn how to use the Redis query engine with JSON +linkTitle: JSON query example +title: Example - Index and query JSON documents +weight: 2 +--- + +This example shows how to create a +[search index]({{< relref "/develop/interact/search-and-query/indexing" >}}) +for [JSON]({{< relref "/develop/data-types/json" >}}) data and +run queries against the index. + +Make sure that you have Redis Stack and `redis-py` installed. + +Import dependencies: + +```python +import redis +from redis.commands.json.path import Path +import redis.commands.search.aggregation as aggregations +import redis.commands.search.reducers as reducers +from redis.commands.search.field import TextField, NumericField, TagField +from redis.commands.search.indexDefinition import IndexDefinition, IndexType +from redis.commands.search.query import NumericFilter, Query +``` + +Connect to your Redis database. + +```python +r = redis.Redis(host='localhost', port=6379) +``` + +Let's create some test data to add to your database. + +```python +user1 = { + "name": "Paul John", + "email": "paul.john@example.com", + "age": 42, + "city": "London" +} +user2 = { + "name": "Eden Zamir", + "email": "eden.zamir@example.com", + "age": 29, + "city": "Tel Aviv" +} +user3 = { + "name": "Paul Zamir", + "email": "paul.zamir@example.com", + "age": 35, + "city": "Tel Aviv" +} +``` + +Define indexed fields and their data types using `schema`. Use JSON path expressions to map specific JSON elements to the schema fields. + +```python +schema = ( + TextField("$.name", as_name="name"), + TagField("$.city", as_name="city"), + NumericField("$.age", as_name="age") +) +``` + +Create an index. In this example, all JSON documents with the key prefix `user:` will be indexed. For more information, see [Query syntax]({{< relref "/develop/interact/search-and-query/query/" >}}). + +```python +rs = r.ft("idx:users") +rs.create_index( + schema, + definition=IndexDefinition( + prefix=["user:"], index_type=IndexType.JSON + ) +) +# b'OK' +``` + +Use [`JSON.SET`]({{< baseurl >}}/commands/json.set/) to set each user value at the specified path. + +```python +r.json().set("user:1", Path.root_path(), user1) +r.json().set("user:2", Path.root_path(), user2) +r.json().set("user:3", Path.root_path(), user3) +``` + +Let's find user `Paul` and filter the results by age. + +```python +res = rs.search( + Query("Paul @age:[30 40]") +) +# Result{1 total, docs: [Document {'id': 'user:3', 'payload': None, 'json': '{"name":"Paul Zamir","email":"paul.zamir@example.com","age":35,"city":"Tel Aviv"}'}]} +``` + +Query using JSON Path expressions. + +```python +rs.search( + Query("Paul").return_field("$.city", as_field="city") +).docs +# [Document {'id': 'user:1', 'payload': None, 'city': 'London'}, Document {'id': 'user:3', 'payload': None, 'city': 'Tel Aviv'}] +``` + +Aggregate your results using [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate/). + +```python +req = aggregations.AggregateRequest("*").group_by('@city', reducers.count().alias('count')) +print(rs.aggregate(req).rows) +# [[b'city', b'Tel Aviv', b'count', b'2'], [b'city', b'London', b'count', b'1']] +``` \ No newline at end of file diff --git a/content/develop/connect/clients/python/redis-vl.md b/content/develop/clients/redis-vl.md similarity index 65% rename from content/develop/connect/clients/python/redis-vl.md rename to content/develop/clients/redis-vl.md index ce7a8807ea..2097546d26 100644 --- a/content/develop/connect/clients/python/redis-vl.md +++ b/content/develop/clients/redis-vl.md @@ -1,4 +1,5 @@ --- +aliases: /develop/connect/clients/python/redis-vl categories: - docs - develop @@ -10,9 +11,9 @@ categories: - kubernetes - clients description: Connect your Python vector application to a Redis vector database -linkTitle: Redis vector library -title: Redis vector library guide -weight: 1 +linkTitle: RedisVL (Python) +title: Redis vector library guide (Python) +weight: 2 --- See the [RedisVL Guide]({{< relref "/integrate/redisvl" >}}) for more information. \ No newline at end of file diff --git a/content/develop/connect/_index.md b/content/develop/connect/_index.md deleted file mode 100644 index 12a49f7591..0000000000 --- a/content/develop/connect/_index.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -categories: -- docs -- develop -- stack -- oss -- rs -- rc -- oss -- kubernetes -- clients -description: Learn how to use user interfaces and client libraries -linkTitle: Connect -title: Connect to Redis -weight: 35 ---- - -You can connect to Redis in the following ways: - -* With the `redis-cli` command line tool -* Use Redis Insight as a graphical user interface -* Via a client library for your programming language - -## Redis command line interface - -The [Redis command line interface]({{< relref "/develop/connect/cli" >}}) (also known as `redis-cli`) is a terminal program that sends commands to and reads replies from the Redis server. It has the following two main modes: - -1. An interactive Read Eval Print Loop (REPL) mode where the user types Redis commands and receives replies. -2. A command mode where `redis-cli` is executed with additional arguments, and the reply is printed to the standard output. - -## Redis Insight - -[Redis Insight]({{< relref "/develop/connect/insight" >}}) combines a graphical user interface with Redis CLI to let you work with any Redis deployment. You can visually browse and interact with data, take advantage of diagnostic tools, learn by example, and much more. Best of all, Redis Insight is free. - -## Client libraries - -It's easy to connect your application to a Redis database. The official client libraries cover the following languages: - -- [Python]({{< relref "/develop/connect/clients/python" >}}) -- [C#/.NET]({{< relref "/develop/connect/clients/dotnet" >}}) -- [Node.js]({{< relref "/develop/connect/clients/nodejs" >}}) -- [Java]({{< relref "/develop/connect/clients/java" >}}) -- [Go]({{< relref "/develop/connect/clients/go" >}}) - - - -
diff --git a/content/develop/connect/clients/_index.md b/content/develop/connect/clients/_index.md deleted file mode 100644 index 959a436fe2..0000000000 --- a/content/develop/connect/clients/_index.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -categories: -- docs -- develop -- stack -- oss -- rs -- rc -- oss -- kubernetes -- clients -description: Connect your application to a Redis database and try an example -linkTitle: Clients -title: Connect with Redis clients -weight: 45 ---- - -Use the Redis client libraries to connect to Redis servers from -your own code. We support client libraries -for five main languages: -- [Python]({{< relref "/develop/connect/clients/python" >}}) -- [C#/.NET]({{< relref "/develop/connect/clients/dotnet" >}}) -- [Node.js]({{< relref "/develop/connect/clients/nodejs" >}}) -- [Java]({{< relref "/develop/connect/clients/java" >}}) -- [Go]({{< relref "/develop/connect/clients/go" >}}) - -We also provide several higher-level -[object mapping (OM)]({{< relref "/develop/connect/clients/om-clients" >}}) -libraries for [Python]({{< relref "/integrate/redisom-for-python" >}}), -[C#/.NET]({{< relref "/integrate/redisom-for-net" >}}), -[Node.js]({{< relref "/integrate/redisom-for-node-js" >}}), and -[Java/Spring]({{< relref "/integrate/redisom-for-java" >}}). - -## Community-supported clients - -The table below shows the recommended third-party client libraries for languages that -Redis does not support directly: - -| Language | Client name | Github | Docs | -| :-- | :-- | :-- | :-- | -| C | hiredis | https://github.com/redis/hiredis | https://github.com/redis/hiredis | -| [PHP](https://www.php.net/) | PhpRedis extension | https://github.com/phpredis/phpredis | https://github.com/phpredis/phpredis/blob/develop/README.md | -| [PHP](https://www.php.net/) | Predis library | https://github.com/predis/predis | https://github.com/predis/predis/wiki | -| [Ruby](https://www.ruby-lang.org/en/) | redis-rb | https://github.com/redis/redis-rb | https://rubydoc.info/gems/redis | -| [Rust](https://www.rust-lang.org/) | redis-rs | https://github.com/redis-rs/redis-rs | https://docs.rs/redis/latest/redis/ | -| [C++](https://en.wikipedia.org/wiki/C%2B%2B) | Boost.Redis | https://github.com/boostorg/redis | https://www.boost.org/doc/libs/develop/libs/redis/doc/html/index.html | - -## Requirements - -You will need access to a Redis server to use these libraries. -You can experiment with a local installation of Redis Stack -(see [Install Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}})) or with a free trial of [Redis Cloud]({{< relref "/operate/rc" >}}). -To interact with a Redis server without writing code, use the -[Redis CLI]({{< relref "/develop/connect/cli" >}}) and -[Redis Insight]({{< relref "/develop/connect/insight" >}}) tools. - -## Client library guides diff --git a/content/develop/connect/clients/dotnet.md b/content/develop/connect/clients/dotnet.md deleted file mode 100644 index d007f8ffaa..0000000000 --- a/content/develop/connect/clients/dotnet.md +++ /dev/null @@ -1,300 +0,0 @@ ---- -categories: -- docs -- develop -- stack -- oss -- rs -- rc -- oss -- kubernetes -- clients -description: Connect your .NET application to a Redis database -linkTitle: C#/.NET -title: C#/.NET guide -weight: 2 ---- - -[NRedisStack](https://github.com/redis/NRedisStack) is the .NET client for Redis. -The sections below explain how to install `NRedisStack` and connect your application -to a Redis database. - -`NRedisStack` requires a running Redis or [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. - -You can also access Redis with an object-mapping client interface. See -[Redis OM for .NET]({{< relref "/integrate/redisom-for-net" >}}) -for more information. - -## Install - -Using the `dotnet` CLI, run: - -```bash -dotnet add package NRedisStack -``` - -## Connect - -Connect to localhost on port 6379. - -```csharp -using NRedisStack; -using NRedisStack.RedisStackCommands; -using StackExchange.Redis; -//... -ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("localhost"); -IDatabase db = redis.GetDatabase(); -``` - -Store and retrieve a simple string. - -```csharp -db.StringSet("foo", "bar"); -Console.WriteLine(db.StringGet("foo")); // prints bar -``` - -Store and retrieve a HashMap. - -```csharp -var hash = new HashEntry[] { - new HashEntry("name", "John"), - new HashEntry("surname", "Smith"), - new HashEntry("company", "Redis"), - new HashEntry("age", "29"), - }; -db.HashSet("user-session:123", hash); - -var hashFields = db.HashGetAll("user-session:123"); -Console.WriteLine(String.Join("; ", hashFields)); -// Prints: -// name: John; surname: Smith; company: Redis; age: 29 -``` - -To access Redis Stack capabilities, use the appropriate interface like this: - -``` -IBloomCommands bf = db.BF(); -ICuckooCommands cf = db.CF(); -ICmsCommands cms = db.CMS(); -IGraphCommands graph = db.GRAPH(); -ITopKCommands topk = db.TOPK(); -ITdigestCommands tdigest = db.TDIGEST(); -ISearchCommands ft = db.FT(); -IJsonCommands json = db.JSON(); -ITimeSeriesCommands ts = db.TS(); -``` - -## Connect to a Redis cluster - -To connect to a Redis cluster, you just need to specify one or all cluster endpoints in the client configuration: - -```csharp -ConfigurationOptions options = new ConfigurationOptions -{ - //list of available nodes of the cluster along with the endpoint port. - EndPoints = { - { "localhost", 16379 }, - { "localhost", 16380 }, - // ... - }, -}; - -ConnectionMultiplexer cluster = ConnectionMultiplexer.Connect(options); -IDatabase db = cluster.GetDatabase(); - -db.StringSet("foo", "bar"); -Console.WriteLine(db.StringGet("foo")); // prints bar -``` - -## Connect to your production Redis with TLS - -When you deploy your application, use TLS and follow the [Redis security]({{< relref "/operate/oss_and_stack/management/security/" >}}) guidelines. - -Before connecting your application to the TLS-enabled Redis server, ensure that your certificates and private keys are in the correct format. - -To convert user certificate and private key from the PEM format to `pfx`, use this command: - -```bash -openssl pkcs12 -inkey redis_user_private.key -in redis_user.crt -export -out redis.pfx -``` - -Enter password to protect your `pfx` file. - -Establish a secure connection with your Redis database using this snippet. - -```csharp -ConfigurationOptions options = new ConfigurationOptions -{ - EndPoints = { { "my-redis.cloud.redislabs.com", 6379 } }, - User = "default", // use your Redis user. More info https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/ - Password = "secret", // use your Redis password - Ssl = true, - SslProtocols = System.Security.Authentication.SslProtocols.Tls12 -}; - -options.CertificateSelection += delegate -{ - return new X509Certificate2("redis.pfx", "secret"); // use the password you specified for pfx file -}; -options.CertificateValidation += ValidateServerCertificate; - -bool ValidateServerCertificate( - object sender, - X509Certificate? certificate, - X509Chain? chain, - SslPolicyErrors sslPolicyErrors) -{ - if (certificate == null) { - return false; - } - - var ca = new X509Certificate2("redis_ca.pem"); - bool verdict = (certificate.Issuer == ca.Subject); - if (verdict) { - return true; - } - Console.WriteLine("Certificate error: {0}", sslPolicyErrors); - return false; -} - -ConnectionMultiplexer muxer = ConnectionMultiplexer.Connect(options); - -//Creation of the connection to the DB -IDatabase conn = muxer.GetDatabase(); - -//send SET command -conn.StringSet("foo", "bar"); - -//send GET command and print the value -Console.WriteLine(conn.StringGet("foo")); -``` - -## Multiplexing - -Although example code typically works with a single connection, -real-world code often uses multiple connections at the same time. -Opening and closing connections repeatedly is inefficient, so it is best -to manage open connections carefully to avoid this. - -Several other -Redis client libraries use *connection pools* to reuse a set of open -connections efficiently. NRedisStack uses a different approach called -*multiplexing*, which sends all client commands and responses over a -single connection. NRedisStack manages multiplexing for you automatically. -This gives high performance without requiring any extra coding. -See -[Connection pools and multiplexing]({{< relref "/develop/connect/clients/pools-and-muxing" >}}) -for more information. - -## Example: Indexing and querying JSON documents - -This example shows how to convert Redis search results to JSON format using `NRedisStack`. - -Make sure that you have Redis Stack and `NRedisStack` installed. - -Import dependencies and connect to the Redis server: - -```csharp -using NRedisStack; -using NRedisStack.RedisStackCommands; -using NRedisStack.Search; -using NRedisStack.Search.Aggregation; -using NRedisStack.Search.Literals.Enums; -using StackExchange.Redis; - -// ... - -ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("localhost"); -``` - -Get a reference to the database and for search and JSON commands. - -```csharp -var db = redis.GetDatabase(); -var ft = db.FT(); -var json = db.JSON(); -``` - -Let's create some test data to add to your database. - -```csharp -var user1 = new { - name = "Paul John", - email = "paul.john@example.com", - age = 42, - city = "London" -}; - -var user2 = new { - name = "Eden Zamir", - email = "eden.zamir@example.com", - age = 29, - city = "Tel Aviv" -}; - -var user3 = new { - name = "Paul Zamir", - email = "paul.zamir@example.com", - age = 35, - city = "Tel Aviv" -}; -``` - -Create an index. In this example, all JSON documents with the key prefix `user:` are indexed. For more information, see [Query syntax]({{< relref "/develop/interact/search-and-query/query/" >}}). - -```csharp -var schema = new Schema() - .AddTextField(new FieldName("$.name", "name")) - .AddTagField(new FieldName("$.city", "city")) - .AddNumericField(new FieldName("$.age", "age")); - -ft.Create( - "idx:users", - new FTCreateParams().On(IndexDataType.JSON).Prefix("user:"), - schema); -``` - -Use [`JSON.SET`]({{< baseurl >}}/commands/json.set/) to set each user value at the specified path. - -```csharp -json.Set("user:1", "$", user1); -json.Set("user:2", "$", user2); -json.Set("user:3", "$", user3); -``` - -Let's find user `Paul` and filter the results by age. - -```csharp -var res = ft.Search("idx:users", new Query("Paul @age:[30 40]")).Documents.Select(x => x["json"]); -Console.WriteLine(string.Join("\n", res)); -// Prints: {"name":"Paul Zamir","email":"paul.zamir@example.com","age":35,"city":"Tel Aviv"} -``` - -Return only the `city` field. - -```csharp -var res_cities = ft.Search("idx:users", new Query("Paul").ReturnFields(new FieldName("$.city", "city"))).Documents.Select(x => x["city"]); -Console.WriteLine(string.Join(", ", res_cities)); -// Prints: London, Tel Aviv -``` - -Count all users in the same city. - -```csharp -var request = new AggregationRequest("*").GroupBy("@city", Reducers.Count().As("count")); -var result = ft.Aggregate("idx:users", request); - -for (var i=0; i}}) server. -See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation -instructions. - -## Install - -`go-redis` supports the last two Go versions. You can only use it from within -a Go module, so you must initialize a Go module before you start, or add your code to -an existing module: - -``` -go mod init github.com/my/repo -``` - -Use the `go get` command to install `go-redis/v9`: - -``` -go get github.com/redis/go-redis/v9 -``` - -## Connect - -The following example shows the simplest way to connect to a Redis server: - -```go -import ( - "context" - "fmt" - "github.com/redis/go-redis/v9" -) - -func main() { - client := redis.NewClient(&redis.Options{ - Addr: "localhost:6379", - Password: "", // No password set - DB: 0, // Use default DB - Protocol: 2, // Connection protocol - }) -} -``` - -You can also connect using a connection string: - -```go -opt, err := redis.ParseURL("redis://:@localhost:6379/") -if err != nil { - panic(err) -} - -client := redis.NewClient(opt) -``` - -After connecting, you can test the connection by storing and retrieving -a simple [string]({{< relref "/develop/data-types/strings" >}}): - -```go -ctx := context.Background() - -err := client.Set(ctx, "foo", "bar", 0).Err() -if err != nil { - panic(err) -} - -val, err := client.Get(ctx, "foo").Result() -if err != nil { - panic(err) -} -fmt.Println("foo", val) -``` - -You can also easily store and retrieve a [hash]({{< relref "/develop/data-types/hashes" >}}): - -```go -hashFields := []string{ - "model", "Deimos", - "brand", "Ergonom", - "type", "Enduro bikes", - "price", "4972", -} - -res1, err := rdb.HSet(ctx, "bike:1", hashFields).Result() - -if err != nil { - panic(err) -} - -fmt.Println(res1) // >>> 4 - -res2, err := rdb.HGet(ctx, "bike:1", "model").Result() - -if err != nil { - panic(err) -} - -fmt.Println(res2) // >>> Deimos - -res3, err := rdb.HGet(ctx, "bike:1", "price").Result() - -if err != nil { - panic(err) -} - -fmt.Println(res3) // >>> 4972 - -res4, err := rdb.HGetAll(ctx, "bike:1").Result() - -if err != nil { - panic(err) -} - -fmt.Println(res4) -// >>> map[brand:Ergonom model:Deimos price:4972 type:Enduro bikes] - ``` - - Use - [struct tags](https://stackoverflow.com/questions/10858787/what-are-the-uses-for-struct-tags-in-go) - of the form `redis:""` with the `Scan()` method to parse fields from - a hash directly into corresponding struct fields: - - ```go -type BikeInfo struct { - Model string `redis:"model"` - Brand string `redis:"brand"` - Type string `redis:"type"` - Price int `redis:"price"` -} - -var res4a BikeInfo -err = rdb.HGetAll(ctx, "bike:1").Scan(&res4a) - -if err != nil { - panic(err) -} - -fmt.Printf("Model: %v, Brand: %v, Type: %v, Price: $%v\n", - res4a.Model, res4a.Brand, res4a.Type, res4a.Price) -// >>> Model: Deimos, Brand: Ergonom, Type: Enduro bikes, Price: $4972 - ``` - -### Connect to a Redis cluster - -To connect to a Redis cluster, use `NewClusterClient()`. - -```go -client := redis.NewClusterClient(&redis.ClusterOptions{ - Addrs: []string{":16379", ":16380", ":16381", ":16382", ":16383", ":16384"}, - - // To route commands by latency or randomly, enable one of the following. - //RouteByLatency: true, - //RouteRandomly: true, -}) -``` - -### Connect to your production Redis with TLS - -When you deploy your application, use TLS and follow the -[Redis security]({{< relref "/operate/oss_and_stack/management/security/" >}}) guidelines. - -Establish a secure connection with your Redis database: - -```go -// Load client cert -cert, err := tls.LoadX509KeyPair("redis_user.crt", "redis_user_private.key") -if err != nil { - log.Fatal(err) -} - -// Load CA cert -caCert, err := os.ReadFile("redis_ca.pem") -if err != nil { - log.Fatal(err) -} -caCertPool := x509.NewCertPool() -caCertPool.AppendCertsFromPEM(caCert) - -client := redis.NewClient(&redis.Options{ - Addr: "my-redis.cloud.redislabs.com:6379", - Username: "default", // use your Redis user. More info https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/ - Password: "secret", // use your Redis password - TLSConfig: &tls.Config{ - MinVersion: tls.VersionTLS12, - Certificates: []tls.Certificate{cert}, - RootCAs: caCertPool, - }, -}) - -//send SET command -err = client.Set(ctx, "foo", "bar", 0).Err() -if err != nil { - panic(err) -} - -//send GET command and print the value -val, err := client.Get(ctx, "foo").Result() -if err != nil { - panic(err) -} -fmt.Println("foo", val) -``` - -## Example: Index and search JSON documents - -Start by connecting to the Redis server: - -```go -import ( - "context" - "fmt" - - "github.com/redis/go-redis/v9" -) - -func main() { - ctx := context.Background() - - rdb := redis.NewClient(&redis.Options{ - Addr: "localhost:6379", - Password: "", - DB: 0, - Protocol: 2, - }) - - // ... -} -``` - -Add some `map` objects to store in JSON format in the database: - -```go -user1 := map[string]interface{}{ - "name": "Paul John", - "email": "paul.john@example.com", - "age": 42, - "city": "London", -} - -user2 := map[string]interface{}{ - "name": "Eden Zamir", - "email": "eden.zamir@example.com", - "age": 29, - "city": "Tel Aviv", -} - -user3 := map[string]interface{}{ - "name": "Paul Zamir", - "email": "paul.zamir@example.com", - "age": 35, - "city": "Tel Aviv", -} -``` - -Use the code below to create a search index. The `FTCreateOptions` parameter enables -indexing only for JSON objects where the key has a `user:` prefix. -The -[schema]({{< relref "/develop/interact/search-and-query/indexing" >}}) -for the index has three fields for the user's name, age, and city. -The `FieldName` field of the `FieldSchema` struct specifies a -[JSON path]({{< relref "/develop/data-types/json/path" >}}) -that identifies which data field to index. Use the `As` struct field -to provide an alias for the JSON path expression. You can use -the alias in queries as a short and intuitive way to refer to the -expression, instead of typing it in full: - -```go -_, err := rdb.FTCreate( - ctx, - "idx:users", - // Options: - &redis.FTCreateOptions{ - OnJSON: true, - Prefix: []interface{}{"user:"}, - }, - // Index schema fields: - &redis.FieldSchema{ - FieldName: "$.name", - As: "name", - FieldType: redis.SearchFieldTypeText, - }, - &redis.FieldSchema{ - FieldName: "$.city", - As: "city", - FieldType: redis.SearchFieldTypeTag, - }, - &redis.FieldSchema{ - FieldName: "$.age", - As: "age", - FieldType: redis.SearchFieldTypeNumeric, - }, -).Result() - -if err != nil { - panic(err) -} -``` - -Add the three sets of user data to the database as -[JSON]({{< relref "/develop/data-types/json" >}}) objects. -If you use keys with the `user:` prefix then Redis will index the -objects automatically as you add them: - -```go -_, err = rdb.JSONSet(ctx, "user:1", "$", user1).Result() - -if err != nil { - panic(err) -} - -_, err = rdb.JSONSet(ctx, "user:2", "$", user2).Result() - -if err != nil { - panic(err) -} - -_, err = rdb.JSONSet(ctx, "user:3", "$", user3).Result() - -if err != nil { - panic(err) -} -``` - -You can now use the index to search the JSON objects. The -[query]({{< relref "/develop/interact/search-and-query/query" >}}) -below searches for objects that have the text "Paul" in any field -and have an `age` value in the range 30 to 40: - -```go -searchResult, err := rdb.FTSearch( - ctx, - "idx:users", - "Paul @age:[30 40]", -).Result() - -if err != nil { - panic(err) -} - -fmt.Println(searchResult) -// >>> {1 [{user:3 map[$:{"age":35,"city":"Tel Aviv"... -``` - -## Example: Index and search hash documents - -Start by connecting to the Redis server as before: - -```go -import ( - "context" - "fmt" - - "github.com/redis/go-redis/v9" -) - -func main() { - ctx := context.Background() - - rdb := redis.NewClient(&redis.Options{ - Addr: "localhost:6379", - Password: "", - DB: 0, - Protocol: 2, - }) - - // ... -} -``` - -In this example, the user objects will be stored as hashes in the database. Use a `string` -array in the form of name-value pairs to supply the data for the -hash fields: - -```go -user1 := []string{ - "name", "Paul John", - "email", "paul.john@example.com", - "age", "42", - "city", "London", -} - -user2 := []string{ - "name", "Eden Zamir", - "email", "eden.zamir@example.com", - "age", "29", - "city", "Tel Aviv", -} - -user3 := []string{ - "name", "Paul Zamir", - "email", "paul.zamir@example.com", - "age", "35", - "city", "Tel Aviv", -} -``` - -It is easier to create the index for hash objects than -for JSON objects. Use the `FTCreateOptions` parameter to enable -indexing only for hash objects, but specify the same `user:` prefix -as before. You don't need the `As:` field in the schema parameters -here because hash fields have simple identifiers. They have no -JSON path expression and don't require an alias: - -```go -_, err := rdb.FTCreate( - ctx, - "idx:users", - // Options: - &redis.FTCreateOptions{ - OnHash: true, - Prefix: []interface{}{"user:"}, - }, - // Index schema fields: - &redis.FieldSchema{ - FieldName: "name", - FieldType: redis.SearchFieldTypeText, - }, - &redis.FieldSchema{ - FieldName: "city", - FieldType: redis.SearchFieldTypeTag, - }, - &redis.FieldSchema{ - FieldName: "age", - FieldType: redis.SearchFieldTypeNumeric, - }, -).Result() - -if err != nil { - panic(err) -} -``` - -Add the user data arrays to the database as hash objects. Redis will -index the hashes automatically because their keys have the -`user:` prefix: - -```go -_, err = rdb.HSet(ctx, "user:1", user1).Result() - -if err != nil { - panic(err) -} - -_, err = rdb.HSet(ctx, "user:2", user2).Result() - -if err != nil { - panic(err) -} - -_, err = rdb.HSet(ctx, "user:2", user3).Result() - -if err != nil { - panic(err) -} -``` - -The hashes have a structure very much like the JSON objects -from the previous example, so you can search the database with the -same query as before: - -```go -searchResult, err := rdb.FTSearch( - ctx, - "idx:users", - "Paul @age:[30 40]", -).Result() - -if err != nil { - panic(err) -} - -fmt.Println(searchResult) -// >>> {1 [{user:2 map[age:35 city:Tel Aviv... -``` - -## Observability - -`go-redis` supports [OpenTelemetry](https://opentelemetry.io/) instrumentation. -to monitor performance and trace the execution of Redis commands. -For example, the following code instruments Redis commands to collect traces, logs, and metrics: - -```go -import ( - "github.com/redis/go-redis/v9" - "github.com/redis/go-redis/extra/redisotel/v9" -) - -rdb := redis.NewClient(&redis.Options{...}) - -// Enable tracing instrumentation. -if err := redisotel.InstrumentTracing(rdb); err != nil { - panic(err) -} - -// Enable metrics instrumentation. -if err := redisotel.InstrumentMetrics(rdb); err != nil { - panic(err) -} -``` - -See the `go-redis` [GitHub repo](https://github.com/redis/go-redis/blob/master/example/otel/README.md). -for more OpenTelemetry examples. - -### Learn more - -* [Documentation](https://redis.uptrace.dev/guide/) -* [GitHub](https://github.com/redis/go-redis) - diff --git a/content/develop/connect/clients/java/_index.md b/content/develop/connect/clients/java/_index.md deleted file mode 100644 index da7dd82898..0000000000 --- a/content/develop/connect/clients/java/_index.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -categories: -- docs -- develop -- stack -- oss -- rs -- rc -- oss -- kubernetes -- clients -hideListLinks: true -description: Connect your application to a Redis database using Java and try an example -linkTitle: Java -title: Connect with Redis Java clients -weight: 4 ---- - -You have two choices of Java clients that you can use with Redis: - -- [Jedis]({{< relref "/develop/connect/clients/java/jedis" >}}), for synchronous applications. -- [Lettuce]({{< relref "/develop/connect/clients/java/lettuce" >}}), - for synchronous, asynchronous, and reactive applications. - -You can also access Redis with an object-mapping client interface. See -[RedisOM for Java]({{< relref "/integrate/redisom-for-java" >}}) -for more information. diff --git a/content/develop/connect/clients/nodejs.md b/content/develop/connect/clients/nodejs.md deleted file mode 100644 index b5704fc752..0000000000 --- a/content/develop/connect/clients/nodejs.md +++ /dev/null @@ -1,226 +0,0 @@ ---- -categories: -- docs -- develop -- stack -- oss -- rs -- rc -- oss -- kubernetes -- clients -description: Connect your Node.js application to a Redis database -linkTitle: Node.js -title: Node.js guide -weight: 3 ---- - -[node-redis](https://github.com/redis/node-redis) is the Redis client for Node.js. -The sections below explain how to install `node-redis` and connect your application -to a Redis database. - -`node-redis` requires a running Redis or [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. - -You can also access Redis with an object-mapping client interface. See -[RedisOM for Node.js]({{< relref "/integrate/redisom-for-node-js" >}}) -for more information. - -## Install - -To install node-redis, run: - -```bash -npm install redis -``` - -## Connect - -Connect to localhost on port 6379. - -```js -import { createClient } from 'redis'; - -const client = createClient(); - -client.on('error', err => console.log('Redis Client Error', err)); - -await client.connect(); -``` - -Store and retrieve a simple string. - -```js -await client.set('key', 'value'); -const value = await client.get('key'); -``` - -Store and retrieve a map. - -```js -await client.hSet('user-session:123', { - name: 'John', - surname: 'Smith', - company: 'Redis', - age: 29 -}) - -let userSession = await client.hGetAll('user-session:123'); -console.log(JSON.stringify(userSession, null, 2)); -/* -{ - "surname": "Smith", - "name": "John", - "company": "Redis", - "age": "29" -} - */ -``` - -To connect to a different host or port, use a connection string in the format `redis[s]://[[username][:password]@][host][:port][/db-number]`: - -```js -createClient({ - url: 'redis://alice:foobared@awesome.redis.server:6380' -}); -``` -To check if the client is connected and ready to send commands, use `client.isReady`, which returns a Boolean. `client.isOpen` is also available. This returns `true` when the client's underlying socket is open, and `false` when it isn't (for example, when the client is still connecting or reconnecting after a network error). - -### Connect to a Redis cluster - -To connect to a Redis cluster, use `createCluster`. - -```js -import { createCluster } from 'redis'; - -const cluster = createCluster({ - rootNodes: [ - { - url: 'redis://127.0.0.1:16379' - }, - { - url: 'redis://127.0.0.1:16380' - }, - // ... - ] -}); - -cluster.on('error', (err) => console.log('Redis Cluster Error', err)); - -await cluster.connect(); - -await cluster.set('foo', 'bar'); -const value = await cluster.get('foo'); -console.log(value); // returns 'bar' - -await cluster.quit(); -``` - -### Connect to your production Redis with TLS - -When you deploy your application, use TLS and follow the [Redis security]({{< relref "/operate/oss_and_stack/management/security/" >}}) guidelines. - -```js -const client = createClient({ - username: 'default', // use your Redis user. More info https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/ - password: 'secret', // use your password here - socket: { - host: 'my-redis.cloud.redislabs.com', - port: 6379, - tls: true, - key: readFileSync('./redis_user_private.key'), - cert: readFileSync('./redis_user.crt'), - ca: [readFileSync('./redis_ca.pem')] - } -}); - -client.on('error', (err) => console.log('Redis Client Error', err)); - -await client.connect(); - -await client.set('foo', 'bar'); -const value = await client.get('foo'); -console.log(value) // returns 'bar' - -await client.disconnect(); -``` - -You can also use discrete parameters and UNIX sockets. Details can be found in the [client configuration guide](https://github.com/redis/node-redis/blob/master/docs/client-configuration.md). - -## Production usage - -The following sections explain how to handle situations that may occur -in your production environment. - -### Handling errors - -Node-Redis provides [multiple events to handle various scenarios](https://github.com/redis/node-redis?tab=readme-ov-file#events), among which the most critical is the `error` event. - -This event is triggered whenever an error occurs within the client. - -It is crucial to listen for error events. - -If a client does not register at least one error listener and an error occurs, the system will throw that error, potentially causing the Node.js process to exit unexpectedly. -See [the EventEmitter docs](https://nodejs.org/api/events.html#events_error_events) for more details. - -```typescript -const client = createClient({ - // ... client options -}); -// Always ensure there's a listener for errors in the client to prevent process crashes due to unhandled errors -client.on('error', error => { - console.error(`Redis client error:`, error); -}); -``` - -### Handling reconnections - -If network issues or other problems unexpectedly close the socket, the client will reject all commands already sent, since the server might have already executed them. -The rest of the pending commands will remain queued in memory until a new socket is established. -This behaviour is controlled by the `enableOfflineQueue` option, which is enabled by default. - -The client uses `reconnectStrategy` to decide when to attempt to reconnect. -The default strategy is to calculate the delay before each attempt based on the attempt number `Math.min(retries * 50, 500)`. You can customize this strategy by passing a supported value to `reconnectStrategy` option: - - -1. Define a callback `(retries: number, cause: Error) => false | number | Error` **(recommended)** -```typescript -const client = createClient({ - socket: { - reconnectStrategy: function(retries) { - if (retries > 20) { - console.log("Too many attempts to reconnect. Redis connection was terminated"); - return new Error("Too many retries."); - } else { - return retries * 500; - } - } - } -}); -client.on('error', error => console.error('Redis client error:', error)); -``` -In the provided reconnection strategy callback, the client attempts to reconnect up to 20 times with a delay of `retries * 500` milliseconds between attempts. -After approximately two minutes, the client logs an error message and terminates the connection if the maximum retry limit is exceeded. - - -2. Use a numerical value to set a fixed delay in milliseconds. -3. Use `false` to disable reconnection attempts. This option should only be used for testing purposes. - -### Timeouts - -To set a timeout for a connection, use the `connectTimeout` option: -```typescript -const client = createClient({ - // setting a 10-second timeout - connectTimeout: 10000 // in milliseconds -}); -client.on('error', error => console.error('Redis client error:', error)); -``` - -## Learn more - -* [Node-Redis Configuration Options](https://github.com/redis/node-redis/blob/master/docs/client-configuration.md) -* [Redis commands](https://redis.js.org/#node-redis-usage-redis-commands) -* [Programmability](https://redis.js.org/#node-redis-usage-programmability) -* [Clustering](https://redis.js.org/#node-redis-usage-clustering) -* [GitHub](https://github.com/redis/node-redis) - diff --git a/content/develop/connect/clients/python/_index.md b/content/develop/connect/clients/python/_index.md deleted file mode 100644 index 5d48a2dc65..0000000000 --- a/content/develop/connect/clients/python/_index.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -categories: -- docs -- develop -- stack -- oss -- rs -- rc -- oss -- kubernetes -- clients -hideListLinks: true -description: Connect your application to a Redis database using Python and try an example -linkTitle: Python -title: Connect with Redis Python clients -weight: 4 ---- - -You have two choices of Python clients that you can use with Redis: - -- [Redis Python library (redis-py)]({{< relref "/develop/connect/clients/python/redis-py" >}}) -- [Redis vector library (RedisVL)]({{< relref "/develop/connect/clients/python/redis-vl" >}}) - -You can also access Redis with an object-mapping client interface. See -[RedisOM for Python]({{< relref "/integrate/redisom-for-python" >}}) -for more information. diff --git a/content/develop/data-types/probabilistic/Configuration.md b/content/develop/data-types/probabilistic/Configuration.md index 2500c0ee7c..0cc9071f90 100644 --- a/content/develop/data-types/probabilistic/Configuration.md +++ b/content/develop/data-types/probabilistic/Configuration.md @@ -28,7 +28,7 @@ In [redis.conf]({{< relref "/operate/oss_and_stack/management/config" >}}): loadmodule ./redisbloom.so [OPT VAL]... ``` -From the [Redis CLI]({{< relref "/develop/connect/cli" >}}), using the [MODULE LOAD]({{< relref "/commands/module-load" >}}) command: +From the [Redis CLI]({{< relref "/develop/tools/cli" >}}), using the [MODULE LOAD]({{< relref "/commands/module-load" >}}) command: ``` 127.0.0.6379> MODULE LOAD redisbloom.so [OPT VAL]... diff --git a/content/develop/data-types/probabilistic/bloom-filter.md b/content/develop/data-types/probabilistic/bloom-filter.md index 10146bdab9..b38a910f4f 100644 --- a/content/develop/data-types/probabilistic/bloom-filter.md +++ b/content/develop/data-types/probabilistic/bloom-filter.md @@ -164,7 +164,7 @@ Checking for an element is O(K) or O(K*n) for stacked filters, where n is the nu ## Academic sources - [Space/Time Trade-offs in Hash Coding with Allowable Errors](http://www.dragonwins.com/domains/getteched/bbc/literature/Bloom70.pdf) by Burton H. Bloom. -- [Scalable Bloom Filters](https://haslab.uminho.pt/cbm/files/dbloom.pdf) +- [Scalable Bloom Filters](https://gsd.di.uminho.pt/members/cbm/ps/dbloom.pdf) ## References ### Webinars diff --git a/content/develop/data-types/strings.md b/content/develop/data-types/strings.md index 81d67b9c94..26cf1a54b3 100644 --- a/content/develop/data-types/strings.md +++ b/content/develop/data-types/strings.md @@ -119,6 +119,7 @@ By default, a single Redis string can be a maximum of 512 MB. ### Managing counters +* [`INCR`]({{< relref "/commands/incr" >}}) atomically increments counters stored at a given key by 1. * [`INCRBY`]({{< relref "/commands/incrby" >}}) atomically increments (and decrements when passing a negative number) counters stored at a given key. * Another command exists for floating point counters: [`INCRBYFLOAT`]({{< relref "/commands/incrbyfloat" >}}). diff --git a/content/develop/data-types/timeseries/clients.md b/content/develop/data-types/timeseries/clients.md index f49401a826..6aafd15239 100644 --- a/content/develop/data-types/timeseries/clients.md +++ b/content/develop/data-types/timeseries/clients.md @@ -21,8 +21,8 @@ The table below shows the client libraries that support Redis time series: | Language | Client | | :-- | :-- | -| Python | [redis-py]({{< relref "/develop/connect/clients/python" >}}) | -| JavaScript | [node-redis]({{< relref "/develop/connect/clients/nodejs" >}}) | -| Java | [Jedis]({{< relref "/develop/connect/clients/java/jedis" >}}) | -| C#/.NET | [NRedisStack]({{< relref "/develop/connect/clients/dotnet" >}}) | +| Python | [redis-py]({{< relref "/develop/clients/redis-py" >}}) | +| JavaScript | [node-redis]({{< relref "/develop/clients/nodejs" >}}) | +| Java | [Jedis]({{< relref "/develop/clients/jedis" >}}) | +| C#/.NET | [NRedisStack]({{< relref "/develop/clients/dotnet" >}}) | | Go | [redistimeseries-go](https://github.com/RedisTimeSeries/redistimeseries-go/) diff --git a/content/develop/data-types/timeseries/configuration.md b/content/develop/data-types/timeseries/configuration.md index 8e6670794a..2ae0b96963 100644 --- a/content/develop/data-types/timeseries/configuration.md +++ b/content/develop/data-types/timeseries/configuration.md @@ -28,7 +28,7 @@ In [redis.conf]({{< relref "/operate/oss_and_stack/management/config" >}}): loadmodule ./redistimeseries.so [OPT VAL]... ``` -From the [Redis CLI]({{< relref "/develop/connect/cli" >}}), using the [MODULE LOAD]({{< relref "/commands/module-load" >}}) command: +From the [Redis CLI]({{< relref "/develop/tools/cli" >}}), using the [MODULE LOAD]({{< relref "/commands/module-load" >}}) command: ``` 127.0.0.6379> MODULE LOAD redistimeseries.so [OPT VAL]... diff --git a/content/develop/get-started/data-store.md b/content/develop/get-started/data-store.md index 2315809cc5..1fbb8ec887 100644 --- a/content/develop/get-started/data-store.md +++ b/content/develop/get-started/data-store.md @@ -37,7 +37,7 @@ You can alternatively follow the [installation guides]({{< relref "/operate/oss_ ## Connect -The first step is to connect to Redis. You can find further details about the connection options in this documentation site's [connection section]({{< relref "/develop/connect" >}}). The following example shows how to connect to a Redis server that runs on localhost (`-h 127.0.0.1`) and listens on the default port (`-p 6379`): +The first step is to connect to Redis. You can find further details about the connection options in this documentation site's [Tools section]({{< relref "/develop/tools" >}}). The following example shows how to connect to a Redis server that runs on localhost (`-h 127.0.0.1`) and listens on the default port (`-p 6379`): {{< clients-example search_quickstart connect >}} > redis-cli -h 127.0.0.1 -p 6379 diff --git a/content/develop/get-started/document-database.md b/content/develop/get-started/document-database.md index c128b83e04..4904a7537d 100644 --- a/content/develop/get-started/document-database.md +++ b/content/develop/get-started/document-database.md @@ -51,7 +51,7 @@ You can alternatively use the [installation guides]({{< relref "/operate/oss_and ## Connect -The first step is to connect to your Redis Stack database. You can find further details about the connection options in this documentation site's [connection section]({{< relref "/develop/connect" >}}). The following example shows how to connect to a Redis Stack server that runs on localhost (`-h 127.0.0.1`) and listens on the default port (`-p 6379`): +The first step is to connect to your Redis Stack database. You can find further details about the connection options in this documentation site's [Tools section]({{< relref "/develop/tools" >}}). The following example shows how to connect to a Redis Stack server that runs on localhost (`-h 127.0.0.1`) and listens on the default port (`-p 6379`): {{< clients-example search_quickstart connect >}} > redis-cli -h 127.0.0.1 -p 6379 diff --git a/content/develop/get-started/vector-database.md b/content/develop/get-started/vector-database.md index cfd739a57c..ec295eb77e 100644 --- a/content/develop/get-started/vector-database.md +++ b/content/develop/get-started/vector-database.md @@ -60,7 +60,7 @@ You need to have the following features configured for your Redis server: JSON a Create a Python virtual environment and install the following dependencies using `pip`: -* `redis`: You can find further details about the `redis-py` client library in the [clients]({{< relref "/develop/connect/clients/python" >}}) section of this documentation site. +* `redis`: You can find further details about the `redis-py` client library in the [clients]({{< relref "/develop/clients/redis-py" >}}) section of this documentation site. * `pandas`: Pandas is a data analysis library. * `sentence-transformers`: You will use the [SentenceTransformers](https://www.sbert.net/) framework to generate embeddings on full text. * `tabulate`: `pandas` uses `tabulate` to render Markdown. diff --git a/content/develop/interact/programmability/eval-intro.md b/content/develop/interact/programmability/eval-intro.md index 319d55154c..331cbafcc3 100644 --- a/content/develop/interact/programmability/eval-intro.md +++ b/content/develop/interact/programmability/eval-intro.md @@ -407,7 +407,7 @@ Note: an important part of this behavior is that the PRNG that Redis implements ## Debugging Eval scripts 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 [`redis-cli`]({{< relref "/develop/connect/cli" >}}). +The Redis Lua debugger is a remote debugger consisting of a server, which is Redis itself, and a client, which is by default [`redis-cli`]({{< relref "/develop/tools/cli" >}}). The Lua debugger is described in the [Lua scripts debugging]({{< relref "/develop/interact/programmability/lua-debugging" >}}) section of the Redis documentation. diff --git a/content/develop/interact/search-and-query/_index.md b/content/develop/interact/search-and-query/_index.md index 72f9373251..396feb6379 100644 --- a/content/develop/interact/search-and-query/_index.md +++ b/content/develop/interact/search-and-query/_index.md @@ -40,7 +40,7 @@ Here are the next steps to get you started: 1. Follow our [quick start guide]({{< relref "/develop/get-started/document-database" >}}) to get some initial hands-on experience. 1. Learn how to [create an index]({{< relref "/develop/interact/search-and-query/indexing/" >}}). 1. Learn how to [query your data]({{< relref "/develop/interact/search-and-query/query/" >}}). -1. [Install Redis Insight]({{< relref "/operate/redisinsight" >}}), connect it to your Redis database, and then use [Redis Copilot]({{< relref "/develop/connect/insight" >}}#redis-copilot) to help you learn how to execute complex queries against your own data using simple, plain language prompts. +1. [Install Redis Insight]({{< relref "/operate/redisinsight" >}}), connect it to your Redis database, and then use [Redis Copilot]({{< relref "/develop/tools/insight" >}}#redis-copilot) to help you learn how to execute complex queries against your own data using simple, plain language prompts. ## Enable the Redis Query Engine diff --git a/content/develop/interact/search-and-query/advanced-concepts/tags.md b/content/develop/interact/search-and-query/advanced-concepts/tags.md index c46a43b4dc..08da7f11cc 100644 --- a/content/develop/interact/search-and-query/advanced-concepts/tags.md +++ b/content/develop/interact/search-and-query/advanced-concepts/tags.md @@ -149,7 +149,7 @@ HSET test:1 tags "Andrew's Top 5,Justin's Top 5" However, when you query for those tags, you must escape the punctuation characters with a backslash (`\`). So, querying for the tag `Andrew's Top 5` in -[`redis-cli`]({{< relref "/develop/connect/cli" >}}) looks like this: +[`redis-cli`]({{< relref "/develop/tools/cli" >}}) looks like this: ``` FT.SEARCH punctuation "@tags:{ Andrew\\'s Top 5 }" diff --git a/content/develop/interact/search-and-query/basic-constructs/configuration-parameters.md b/content/develop/interact/search-and-query/basic-constructs/configuration-parameters.md index 08b2b5a094..53f6ad3458 100644 --- a/content/develop/interact/search-and-query/basic-constructs/configuration-parameters.md +++ b/content/develop/interact/search-and-query/basic-constructs/configuration-parameters.md @@ -29,7 +29,7 @@ In [redis.conf]({{< relref "/operate/oss_and_stack/management/config" >}}): loadmodule ./redisearch.so [OPT VAL]... ``` -From the [Redis CLI]({{< relref "/develop/connect/cli" >}}), using the [MODULE LOAD]({{< relref "/commands/module-load" >}}) command: +From the [Redis CLI]({{< relref "/develop/tools/cli" >}}), using the [MODULE LOAD]({{< relref "/commands/module-load" >}}) command: ``` 127.0.0.6379> MODULE LOAD redisearch.so [OPT VAL]... @@ -90,6 +90,7 @@ The following table summarizes which configuration parameters can be set at modu | [OSS_GLOBAL_PASSWORD](#oss_global_password) | :white_check_mark: | :white_large_square: | | [DEFAULT_DIALECT](#default_dialect) | :white_check_mark: | :white_check_mark: | | [VSS_MAX_RESIZE](#vss_max_resize) | :white_check_mark: | :white_check_mark: | +| [INDEX_CURSOR_LIMIT](#index_cursor_limit) | :white_check_mark: | :white_check_mark: | --- @@ -579,3 +580,25 @@ $ redis-server --loadmodule ./redisearch.so VSS_MAX_RESIZE 52428800 # 50MB * Added in v2.4.8 {{% /alert %}} +### INDEX_CURSOR_LIMIT + +The maximum number of cursors that can be opened, per shard, at any given time. Cursors can be opened by the user via [`FT.AGGREGATE WITHCURSOR`]({{< baseurl >}}/commands/ft.aggregate/). Cursors are also opened internally by the Redis Query Engine for long-running queries. Once `INDEX_CURSOR_LIMIT` is reached, any further attempts at opening a cursor will result in an error. + +{{% alert title="Notes" color="info" %}} + +* Caution should be used in modifying this parameter. Every open cursor results in additional memory usage. +* Cursor usage should be regulated first by use of [`FT.CURSOR DEL`]({{< baseurl >}}/commands/ft.cursor-del/) and/or [`MAXIDLE`]({{< baseurl >}}/commands/ft.aggregate/) prior to modifying `INDEX_CURSOR_LIMIT` +* See [Cursor API]({{< baseurl >}}/develop/interact/search-and-query/advanced-concepts/aggregations#cursor-api) for more details. + +* Added in 2.10.8 +{{% /alert %}} + +#### Default + +128 + +#### Example + +``` +$ redis-server --loadmodule ./redisearch.so INDEX_CURSOR_LIMIT 180 +``` \ No newline at end of file diff --git a/content/develop/reference/client-side-caching.md b/content/develop/reference/client-side-caching.md index c8fe2dd0a9..266226cad8 100644 --- a/content/develop/reference/client-side-caching.md +++ b/content/develop/reference/client-side-caching.md @@ -20,7 +20,7 @@ weight: 2 {{}}This document is intended as an in-depth reference for client-side caching. See -[Client-side caching introduction]({{< relref "/develop/connect/clients/client-side-caching" >}}) +[Client-side caching introduction]({{< relref "/develop/clients/client-side-caching" >}}) for general usage guidelines. {{}} diff --git a/content/develop/reference/eviction/index.md b/content/develop/reference/eviction/index.md index beb17f269e..e10580bde6 100644 --- a/content/develop/reference/eviction/index.md +++ b/content/develop/reference/eviction/index.md @@ -15,97 +15,198 @@ title: Key eviction weight: 6 --- -When Redis is used as a cache, it is often convenient to let it automatically -evict old data as you add new data. This behavior is well known in the -developer community, since it is the default behavior for the popular -*memcached* system. +Redis is commonly used as a cache to speed up read accesses to a slower server +or database. Since cache entries are copies of persistently-stored data, it +is usually safe to evict them when the cache runs out of memory (they can be +cached again in the future if necessary). -This page covers the more general topic of the Redis `maxmemory` directive used to limit the memory usage to a fixed amount. It also extensively covers the LRU eviction algorithm used by Redis, which is actually an approximation of -the exact LRU. +Redis lets you specify an eviction policy to evict keys automatically +when the size of the cache exceeds a set memory limit. Whenever a client +runs a new command that adds more data to the cache, Redis checks the memory usage. +If it is greater than the limit, Redis evicts keys according to the chosen +eviction policy until the total memory used is back below the limit. -## `Maxmemory` configuration directive +Note that when a command adds a lot of data to the cache (for example, a big set +intersection stored into a new key), this might temporarily exceed the limit by +a large amount. -The `maxmemory` configuration directive configures Redis -to use a specified amount of memory for the data set. You can -set the configuration directive using the `redis.conf` file, or later using -the [`CONFIG SET`]({{< relref "/commands/config-set" >}}) command at runtime. +The sections below explain how to [configure the memory limit](#maxmem) for the cache +and also describe the available [eviction policies](#eviction-policies) and when to +use them. -For example, to configure a memory limit of 100 megabytes, you can use the -following directive inside the `redis.conf` file: +## Using the `maxmemory` configuration directive {#maxmem} - maxmemory 100mb +The `maxmemory` configuration directive specifies +the maximum amount of memory to use for the cache data. You can +set `maxmemory` with the [`redis.conf`](https://github.com/redis/redis/blob/7.4.0/redis.conf) +file at startup time. For example, to configure a memory limit of 100 megabytes, +you can use the following directive inside `redis.conf`: -Setting `maxmemory` to zero results into no memory limits. This is the -default behavior for 64 bit systems, while 32 bit systems use an implicit -memory limit of 3GB. - -When the specified amount of memory is reached, how **eviction policies** are configured determines the default behavior. -Redis can return errors for commands that could result in more memory -being used, or it can evict some old data to return back to the -specified limit every time new data is added. - -## Eviction policies - -The exact behavior Redis follows when the `maxmemory` limit is reached is -configured using the `maxmemory-policy` configuration directive. - -The following policies are available: - -* **noeviction**: New values aren’t saved when memory limit is reached. When a database uses replication, this applies to the primary database -* **allkeys-lru**: Keeps most recently used keys; removes least recently used (LRU) keys -* **allkeys-lfu**: Keeps frequently used keys; removes least frequently used (LFU) keys -* **volatile-lru**: Removes least recently used keys with the `expire` field set to `true`. -* **volatile-lfu**: Removes least frequently used keys with the `expire` field set to `true`. -* **allkeys-random**: Randomly removes keys to make space for the new data added. -* **volatile-random**: Randomly removes keys with `expire` field set to `true`. -* **volatile-ttl**: Removes keys with `expire` field set to `true` and the shortest remaining time-to-live (TTL) value. - -The policies **volatile-lru**, **volatile-lfu**, **volatile-random**, and **volatile-ttl** behave like **noeviction** if there are no keys to evict matching the prerequisites. - -Picking the right eviction policy is important depending on the access pattern -of your application, however you can reconfigure the policy at runtime while -the application is running, and monitor the number of cache misses and hits -using the Redis [`INFO`]({{< relref "/commands/info" >}}) output to tune your setup. - -In general as a rule of thumb: - -* Use the **allkeys-lru** policy when you expect a power-law distribution in the popularity of your requests. That is, you expect a subset of elements will be accessed far more often than the rest. **This is a good pick if you are unsure**. - -* Use the **allkeys-random** if you have a cyclic access where all the keys are scanned continuously, or when you expect the distribution to be uniform. - -* Use the **volatile-ttl** if you want to be able to provide hints to Redis about what are good candidate for expiration by using different TTL values when you create your cache objects. - -The **volatile-lru** and **volatile-random** policies are mainly useful when you want to use a single instance for both caching and to have a set of persistent keys. However it is usually a better idea to run two Redis instances to solve such a problem. - -It is also worth noting that setting an `expire` value to a key costs memory, so using a policy like **allkeys-lru** is more memory efficient since there is no need for an `expire` configuration for the key to be evicted under memory pressure. +``` +maxmemory 100mb +``` -## How the eviction process works +You can also use [`CONFIG SET`]({{< relref "/commands/config-set" >}}) to +set `maxmemory` at runtime using [`redis-cli`]({{< relref "/develop/tools/cli" >}}): -It is important to understand that the eviction process works like this: +```bash +> CONFIG SET maxmemory 100mb +``` -* A client runs a new command, resulting in more data added. -* Redis checks the memory usage, and if it is greater than the `maxmemory` limit , it evicts keys according to the policy. -* A new command is executed, and so forth. +Set `maxmemory` to zero to specify that you don't want to limit the memory +for the dataset. This is the default behavior for 64-bit systems, while 32-bit +systems use an implicit memory limit of 3GB. + +When the size of your cache exceeds the limit set by `maxmemory`, Redis will +enforce your chosen [eviction policy](#eviction-policies) to prevent any +further growth of the cache. + +### Setting `maxmemory` for a replicated or persisted instance + +If you are using +[replication]({{< relref "/operate/rs/databases/durability-ha/replication" >}}) +or [persistence]({{< relref "/operate/rs/databases/configure/database-persistence" >}}) +for a server, Redis will use some RAM as a buffer to store the set of updates waiting +to be written to the replicas or AOF files. +The memory used by this buffer is not included in the total that +is compared to `maxmemory` to see if eviction is required. + +This is because the key evictions themselves generate updates that must be added +to the buffer. If the updates were counted among the used +memory then in some circumstances, the memory saved by +evicting keys would be immediately used up by the update data added to the buffer. +This, in turn, would trigger even more evictions and the resulting feedback loop +could evict many items from the cache unnecessarily. + +If you are using replication or persistence, we recommend that you set +`maxmemory` to leave a little RAM free to store the buffers. Note that this is not +necessary for the `noeviction` policy (see [the section below](#eviction-policies) +for more information about eviction policies). + +The [`INFO`]({{< relref "/commands/info" >}}) command returns a +`mem_not_counted_for_evict` value in the `memory` section (you can use +the `INFO memory` option to see just this section). This is the amount of +memory currently used by the buffers. Although the exact amount will vary, +you can use it to estimate how much to subtract from the total available RAM +before setting `maxmemory`. -So we continuously cross the boundaries of the memory limit, by going over it, and then by evicting keys to return back under the limits. +## Eviction policies -If a command results in a lot of memory being used (like a big set intersection stored into a new key) for some time, the memory limit can be surpassed by a noticeable amount. +Use the `maxmemory-policy` configuration directive to select the eviction +policy you want to use when the limit set by `maxmemory` is reached. -## Approximated LRU algorithm +The following policies are available: -Redis LRU algorithm is not an exact implementation. This means that Redis is -not able to pick the *best candidate* for eviction, that is, the key that -was accessed the furthest in the past. Instead it will try to run an approximation -of the LRU algorithm, by sampling a small number of keys, and evicting the -one that is the best (with the oldest access time) among the sampled keys. +- `noeviction`: Keys are not evicted but the server will return an error + when you try to execute commands that cache new data. If your database uses replication + then this condition only applies to the primary database. Note that commands that only + read existing data still work as normal. +- `allkeys-lru`: Evict the [least recently used](#apx-lru) (LRU) keys. +- `allkeys-lfu`: Evict the [least frequently used](#lfu-eviction) (LFU) keys. +- `allkeys-random`: Evict keys at random. +- `volatile-lru`: Evict the least recently used keys that have the `expire` field + set to `true`. +- `volatile-lfu`: Evict the least frequently used keys that have the `expire` field + set to `true`. +- `volatile-random`: Evict keys at random only if they have the `expire` field set + to `true`. +- `volatile-ttl`: Evict keys with the `expire` field set to `true` that have the + shortest remaining time-to-live (TTL) value. + +The `volatile-xxx` policies behave like `noeviction` if no keys have the `expire` +field set to true, or for `volatile-ttl`, if no keys have a time-to-live value set. + +You should choose an eviction policy that fits the way your app +accesses keys. You may be able to predict the access pattern in advance +but you can also use information from the `INFO` command at runtime to +check or improve your choice of policy (see +[Using the `INFO` command](#using-the-info-command) below for more information). + +As a rule of thumb: + +- Use `allkeys-lru` when you expect that a subset of elements will be accessed far + more often than the rest. This is a very common case according to the + [Pareto principle](https://en.wikipedia.org/wiki/Pareto_principle), so + `allkeys-lru` is a good default option if you have no reason to prefer any others. +- Use `allkeys-random` when you expect all keys to be accessed with roughly equal + frequency. An example of this is when your app reads data items in a repeating cycle. +- Use `volatile-ttl` if your code can estimate which keys are good candidates for eviction + and assign short TTLs to them. Note also that if you make good use of + key expiration, then you are less likely to run into the cache memory limit because keys + will often expire before they need to be evicted. + +The `volatile-lru` and `volatile-random` policies are mainly useful when you want to use +a single Redis instance for both caching and for a set of persistent keys. However, +you should consider running two separate Redis instances in a case like this, if possible. + +Also note that setting an `expire` value for a key costs memory, so a +policy like `allkeys-lru` is more memory efficient since it doesn't need an +`expire` value to operate. + +### Using the `INFO` command + +The [`INFO`]({{< relref "/commands/info" >}}) command provides several pieces +of data that are useful for checking the performance of your cache. In particular, +the `INFO stats` section includes two important entries, `keyspace_hits` (the number of +times keys were successfully found in the cache) and `keyspace_misses` (the number +of times a key was requested but was not in the cache). The calculation below gives +the percentage of attempted accesses that were satisfied from the cache: -However, since Redis 3.0 the algorithm was improved to also take a pool of good -candidates for eviction. This improved the performance of the algorithm, making -it able to approximate more closely the behavior of a real LRU algorithm. +``` +keyspace_hits / (keyspace_hits + keyspace_misses) * 100 +``` -What is important about the Redis LRU algorithm is that you **are able to tune** the precision of the algorithm by changing the number of samples to check for every eviction. This parameter is controlled by the following configuration directive: +Check that this is roughly equal to what you would expect for your app +(naturally, a higher percentage indicates better cache performance). + +{{< note >}} When the [`EXISTS`]({{< relref "/commands/exists" >}}) +command reports that a key is absent then this is counted as a keyspace miss. +{{< /note >}} + +If the percentage of hits is lower than expected, then this might +mean you are not using the best eviction policy. For example, if +you believe that a small subset of "hot" data (that will easily fit into the +cache) should account for about 75% of accesses, you could reasonably +expect the percentage of keyspace hits to be around 75%. If the actual +percentage is lower, check the value of `evicted_keys` (also returned by +`INFO stats`). A high proportion of evictions would suggest that the +wrong keys are being evicted too often by your chosen policy +(so `allkeys-lru` might be a good option here). If the +value of `evicted_keys` is low and you are using key expiration, check +`expired_keys` to see how many keys have expired. If this number is high, +you might be using a TTL that is too low or you are choosing the wrong +keys to expire and this is causing keys to disappear from the cache +before they should. + +Other useful pieces of information returned by `INFO` include: + +- `used_memory_dataset`: (`memory` section) The amount of memory used for + cached data. If this is greater than `maxmemory`, then the difference + is the amount by which `maxmemory` has been exceeded. +- `current_eviction_exceeded_time`: (`stats` section) The time since + the cache last started to exceed `maxmemory`. +- `commandstats` section: Among other things, this reports the number of + times each command issued to the server has been rejected. If you are + using `noeviction` or one of the `volatile_xxx` policies, you can use + this to find which commands are being stopped by the `maxmemory` limit + and how often it is happening. + +## Approximated LRU algorithm {#apx-lru} + +The Redis LRU algorithm uses an approximation of the least recently used +keys rather than calculating them exactly. It samples a small number of keys +at random and then evicts the ones with the longest time since last access. + +From Redis 3.0 onwards, the algorithm also tracks a pool of good +candidates for eviction. This improves the performance of the algorithm, making +it a close approximation to a true LRU algorithm. + +You can tune the performance of the algorithm by changing the number of samples to check +before every eviction with the `maxmemory-samples` configuration directive: - maxmemory-samples 5 +``` +maxmemory-samples 5 +``` The reason Redis does not use a true LRU implementation is because it costs more memory. However, the approximation is virtually equivalent for an @@ -139,7 +240,7 @@ difference in your cache misses rate. To experiment in production with different values for the sample size by using the `CONFIG SET maxmemory-samples ` command, is very simple. -## The new LFU mode +## LFU eviction Starting with Redis 4.0, the [Least Frequently Used eviction mode](http://antirez.com/news/109) is available. This mode may work better (provide a better hits/misses ratio) in certain cases. In LFU mode, Redis will try to track diff --git a/content/develop/reference/protocol-spec.md b/content/develop/reference/protocol-spec.md index 3b68eac509..c800d2b75e 100644 --- a/content/develop/reference/protocol-spec.md +++ b/content/develop/reference/protocol-spec.md @@ -482,7 +482,7 @@ Example: (The raw RESP encoding is split into multiple lines for readability). Some client libraries may ignore the difference between this type and the string type and return a native string in both cases. -However, interactive clients, such as command line interfaces (e.g., [`redis-cli`]({{< relref "/develop/connect/cli" >}})), can use this type and know that their output should be presented to the human user as is and without quoting the string. +However, interactive clients, such as command line interfaces (e.g., [`redis-cli`]({{< relref "/develop/tools/cli" >}})), can use this type and know that their output should be presented to the human user as is and without quoting the string. For example, the Redis command [`INFO`]({{< relref "/commands/info" >}}) outputs a report that includes newlines. When using RESP3, `redis-cli` displays it correctly because it is sent as a Verbatim String reply (with its three bytes being "txt"). diff --git a/content/develop/tools/_index.md b/content/develop/tools/_index.md new file mode 100644 index 0000000000..a9421afacd --- /dev/null +++ b/content/develop/tools/_index.md @@ -0,0 +1,41 @@ +--- +categories: +aliases: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Tools to interact with a Redis server +linkTitle: Client tools +hideListLinks: true +title: Client tools +weight: 25 +--- + +You can use several tools to connect to a Redis server, to +manage it and interact with the data: + +* The [`redis-cli`](#redis-command-line-interface-cli) command line tool +* [Redis Insight](#redis-insight) (a graphical user interface tool) +* The Redis [VSCode extension](#redis-vscode-extension) + +## Redis command line interface (CLI) + +The [Redis command line interface]({{< relref "/develop/tools/cli" >}}) (also known as `redis-cli`) is a terminal program that sends commands to and reads replies from the Redis server. It has the following two main modes: + +1. An interactive Read Eval Print Loop (REPL) mode where the user types Redis commands and receives replies. +2. A command mode where `redis-cli` is executed with additional arguments, and the reply is printed to the standard output. + +## Redis Insight + +[Redis Insight]({{< relref "/develop/tools/insight" >}}) combines a graphical user interface with Redis CLI to let you work with any Redis deployment. You can visually browse and interact with data, take advantage of diagnostic tools, learn by example, and much more. Best of all, Redis Insight is free. + +## Redis VSCode extension + +[Redis for VS Code]({{< relref "/develop/tools/redis-for-vscode" >}}) +is an extension that allows you to connect to your Redis databases from within Microsoft Visual Studio Code. After connecting to a database, you can view, add, modify, and delete keys, and interact with your Redis databases using a Redis Insight like UI and also a built-in CLI interface. diff --git a/content/develop/connect/cli.md b/content/develop/tools/cli.md similarity index 99% rename from content/develop/connect/cli.md rename to content/develop/tools/cli.md index 057116fe1f..ff07523d75 100644 --- a/content/develop/connect/cli.md +++ b/content/develop/tools/cli.md @@ -1,4 +1,5 @@ --- +aliases: /develop/connect/cli categories: - docs - develop diff --git a/content/develop/connect/insight/_index.md b/content/develop/tools/insight/_index.md similarity index 92% rename from content/develop/connect/insight/_index.md rename to content/develop/tools/insight/_index.md index e394a55261..6a01462d3a 100644 --- a/content/develop/connect/insight/_index.md +++ b/content/develop/tools/insight/_index.md @@ -1,4 +1,5 @@ --- +aliases: /develop/connect/insight categories: - docs - develop @@ -57,11 +58,11 @@ Here's an example of using Redis Copilot to search data using a simple, natural -See the [Redis Insight Copilot FAQ]({{< relref "/develop/connect/insight/copilot-faq" >}}) for more information. +See the [Redis Insight Copilot FAQ]({{< relref "/develop/tools/insight/copilot-faq" >}}) for more information. ### RDI in Redis Insight -Redis Insight includes Redis Data Integration (RDI) connectivity, which allows you to connect to an RDI management plane, and create, test, and deploy RDI pipelines. Read more about this feature [here]({{< relref "/develop/connect/insight/rdi-connector" >}}). +Redis Insight includes Redis Data Integration (RDI) connectivity, which allows you to connect to an RDI management plane, and create, test, and deploy RDI pipelines. Read more about this feature [here]({{< relref "/develop/tools/insight/rdi-connector" >}}). ### Browser @@ -92,9 +93,15 @@ The CLI is accessible at any time within the application. ### Workbench -Advanced command line interface with intelligent command auto-complete and complex data visualizations. +Workbench is an advanced command line interface with intelligent command auto-complete and complex data visualization support. * Built-in guides: you can conveniently discover Redis and Redis Stack features using the built-in guides. * Command auto-complete support for all features in Redis and Redis Stack. +* Advanced, schema-aware auto-complete for Redis Query Engine, which provides for faster query building with context-sensitive suggestions that recognize indexes, schemas, and fields based on your current query. Start typing any Redis Query Engine command in to try this feature. See below for an example of an in-progress `FT.SEARCH` command. + + + +Workbench also includes: + * Visualizations of your indexes, queries, and aggregations. * Visualizations of your [time series]({{< relref "/develop/data-types/timeseries/" >}}) data. diff --git a/content/develop/connect/insight/copilot-faq.md b/content/develop/tools/insight/copilot-faq.md similarity index 98% rename from content/develop/connect/insight/copilot-faq.md rename to content/develop/tools/insight/copilot-faq.md index 35f8c03e05..81bbb0916d 100644 --- a/content/develop/connect/insight/copilot-faq.md +++ b/content/develop/tools/insight/copilot-faq.md @@ -1,4 +1,5 @@ --- +aliases: /develop/connect/insight/copilot-faq categories: - docs - operate diff --git a/content/develop/connect/insight/debugging.md b/content/develop/tools/insight/debugging.md similarity index 98% rename from content/develop/connect/insight/debugging.md rename to content/develop/tools/insight/debugging.md index 09dcb6f3b5..c604e02eae 100644 --- a/content/develop/connect/insight/debugging.md +++ b/content/develop/tools/insight/debugging.md @@ -1,4 +1,5 @@ --- +aliases: /develop/connect/insight/debugging categories: - docs - develop diff --git a/content/develop/connect/insight/images/Browser.png b/content/develop/tools/insight/images/Browser.png similarity index 100% rename from content/develop/connect/insight/images/Browser.png rename to content/develop/tools/insight/images/Browser.png diff --git a/content/develop/connect/insight/images/CLI.png b/content/develop/tools/insight/images/CLI.png similarity index 100% rename from content/develop/connect/insight/images/CLI.png rename to content/develop/tools/insight/images/CLI.png diff --git a/content/develop/connect/insight/images/Databases.png b/content/develop/tools/insight/images/Databases.png similarity index 100% rename from content/develop/connect/insight/images/Databases.png rename to content/develop/tools/insight/images/Databases.png diff --git a/content/develop/connect/insight/images/Profiler.png b/content/develop/tools/insight/images/Profiler.png similarity index 100% rename from content/develop/connect/insight/images/Profiler.png rename to content/develop/tools/insight/images/Profiler.png diff --git a/content/develop/connect/insight/images/Workbench_Graph.png b/content/develop/tools/insight/images/Workbench_Graph.png similarity index 100% rename from content/develop/connect/insight/images/Workbench_Graph.png rename to content/develop/tools/insight/images/Workbench_Graph.png diff --git a/content/develop/tools/insight/images/Workbench_Search.png b/content/develop/tools/insight/images/Workbench_Search.png new file mode 100644 index 0000000000..0bef99640f Binary files /dev/null and b/content/develop/tools/insight/images/Workbench_Search.png differ diff --git a/content/develop/connect/insight/images/Workbench_TimeSeries.png b/content/develop/tools/insight/images/Workbench_TimeSeries.png similarity index 100% rename from content/develop/connect/insight/images/Workbench_TimeSeries.png rename to content/develop/tools/insight/images/Workbench_TimeSeries.png diff --git a/content/develop/connect/insight/images/bulk_actions.png b/content/develop/tools/insight/images/bulk_actions.png similarity index 100% rename from content/develop/connect/insight/images/bulk_actions.png rename to content/develop/tools/insight/images/bulk_actions.png diff --git a/content/develop/connect/insight/images/copilot-example.png b/content/develop/tools/insight/images/copilot-example.png similarity index 100% rename from content/develop/connect/insight/images/copilot-example.png rename to content/develop/tools/insight/images/copilot-example.png diff --git a/content/develop/connect/insight/images/data_formatting.png b/content/develop/tools/insight/images/data_formatting.png similarity index 100% rename from content/develop/connect/insight/images/data_formatting.png rename to content/develop/tools/insight/images/data_formatting.png diff --git a/content/develop/connect/insight/images/database_analysis.png b/content/develop/tools/insight/images/database_analysis.png similarity index 100% rename from content/develop/connect/insight/images/database_analysis.png rename to content/develop/tools/insight/images/database_analysis.png diff --git a/content/develop/connect/insight/images/ico-redisinsight.svg b/content/develop/tools/insight/images/ico-redisinsight.svg similarity index 100% rename from content/develop/connect/insight/images/ico-redisinsight.svg rename to content/develop/tools/insight/images/ico-redisinsight.svg diff --git a/content/develop/connect/insight/images/ri-rdi-add-endpoint1.png b/content/develop/tools/insight/images/ri-rdi-add-endpoint1.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-add-endpoint1.png rename to content/develop/tools/insight/images/ri-rdi-add-endpoint1.png diff --git a/content/develop/connect/insight/images/ri-rdi-add-endpoint2.png b/content/develop/tools/insight/images/ri-rdi-add-endpoint2.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-add-endpoint2.png rename to content/develop/tools/insight/images/ri-rdi-add-endpoint2.png diff --git a/content/develop/connect/insight/images/ri-rdi-endpoint-added.png b/content/develop/tools/insight/images/ri-rdi-endpoint-added.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-endpoint-added.png rename to content/develop/tools/insight/images/ri-rdi-endpoint-added.png diff --git a/content/develop/connect/insight/images/ri-rdi-job-editor-template.png b/content/develop/tools/insight/images/ri-rdi-job-editor-template.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-job-editor-template.png rename to content/develop/tools/insight/images/ri-rdi-job-editor-template.png diff --git a/content/develop/connect/insight/images/ri-rdi-pl-dl.png b/content/develop/tools/insight/images/ri-rdi-pl-dl.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-pl-dl.png rename to content/develop/tools/insight/images/ri-rdi-pl-dl.png diff --git a/content/develop/connect/insight/images/ri-rdi-pl-dryrun.png b/content/develop/tools/insight/images/ri-rdi-pl-dryrun.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-pl-dryrun.png rename to content/develop/tools/insight/images/ri-rdi-pl-dryrun.png diff --git a/content/develop/connect/insight/images/ri-rdi-pl-editor-autoc.png b/content/develop/tools/insight/images/ri-rdi-pl-editor-autoc.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-pl-editor-autoc.png rename to content/develop/tools/insight/images/ri-rdi-pl-editor-autoc.png diff --git a/content/develop/connect/insight/images/ri-rdi-pl-editor-dlg.png b/content/develop/tools/insight/images/ri-rdi-pl-editor-dlg.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-pl-editor-dlg.png rename to content/develop/tools/insight/images/ri-rdi-pl-editor-dlg.png diff --git a/content/develop/connect/insight/images/ri-rdi-pl-editor-errs.png b/content/develop/tools/insight/images/ri-rdi-pl-editor-errs.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-pl-editor-errs.png rename to content/develop/tools/insight/images/ri-rdi-pl-editor-errs.png diff --git a/content/develop/connect/insight/images/ri-rdi-pl-editor-minibuttons.png b/content/develop/tools/insight/images/ri-rdi-pl-editor-minibuttons.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-pl-editor-minibuttons.png rename to content/develop/tools/insight/images/ri-rdi-pl-editor-minibuttons.png diff --git a/content/develop/connect/insight/images/ri-rdi-pl-editor-sql-minie.png b/content/develop/tools/insight/images/ri-rdi-pl-editor-sql-minie.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-pl-editor-sql-minie.png rename to content/develop/tools/insight/images/ri-rdi-pl-editor-sql-minie.png diff --git a/content/develop/connect/insight/images/ri-rdi-pl-editor-template.png b/content/develop/tools/insight/images/ri-rdi-pl-editor-template.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-pl-editor-template.png rename to content/develop/tools/insight/images/ri-rdi-pl-editor-template.png diff --git a/content/develop/connect/insight/images/ri-rdi-pl-start.png b/content/develop/tools/insight/images/ri-rdi-pl-start.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-pl-start.png rename to content/develop/tools/insight/images/ri-rdi-pl-start.png diff --git a/content/develop/connect/insight/images/ri-rdi-pl-test-cxn.png b/content/develop/tools/insight/images/ri-rdi-pl-test-cxn.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-pl-test-cxn.png rename to content/develop/tools/insight/images/ri-rdi-pl-test-cxn.png diff --git a/content/develop/connect/insight/images/ri-rdi-pl-unsaved.png b/content/develop/tools/insight/images/ri-rdi-pl-unsaved.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-pl-unsaved.png rename to content/develop/tools/insight/images/ri-rdi-pl-unsaved.png diff --git a/content/develop/connect/insight/images/ri-rdi-stats-view.png b/content/develop/tools/insight/images/ri-rdi-stats-view.png similarity index 100% rename from content/develop/connect/insight/images/ri-rdi-stats-view.png rename to content/develop/tools/insight/images/ri-rdi-stats-view.png diff --git a/content/develop/connect/insight/images/search.png b/content/develop/tools/insight/images/search.png similarity index 100% rename from content/develop/connect/insight/images/search.png rename to content/develop/tools/insight/images/search.png diff --git a/content/develop/connect/insight/images/slowlog.png b/content/develop/tools/insight/images/slowlog.png similarity index 100% rename from content/develop/connect/insight/images/slowlog.png rename to content/develop/tools/insight/images/slowlog.png diff --git a/content/develop/connect/insight/images/streams.png b/content/develop/tools/insight/images/streams.png similarity index 100% rename from content/develop/connect/insight/images/streams.png rename to content/develop/tools/insight/images/streams.png diff --git a/content/develop/connect/insight/rdi-connector.md b/content/develop/tools/insight/rdi-connector.md similarity index 99% rename from content/develop/connect/insight/rdi-connector.md rename to content/develop/tools/insight/rdi-connector.md index dc9ad64760..1cbc7a8507 100644 --- a/content/develop/connect/insight/rdi-connector.md +++ b/content/develop/tools/insight/rdi-connector.md @@ -1,4 +1,5 @@ --- +aliases: /develop/connect/insight/rdi-connector categories: - docs - develop diff --git a/content/develop/connect/insight/release-notes/_index.md b/content/develop/tools/insight/release-notes/_index.md similarity index 88% rename from content/develop/connect/insight/release-notes/_index.md rename to content/develop/tools/insight/release-notes/_index.md index 468135d813..f46184b5af 100644 --- a/content/develop/connect/insight/release-notes/_index.md +++ b/content/develop/tools/insight/release-notes/_index.md @@ -1,4 +1,5 @@ --- +aliases: /develop/connect/insight/release-notes categories: - docs - develop diff --git a/content/develop/connect/insight/release-notes/v.2.14.0.md b/content/develop/tools/insight/release-notes/v.2.14.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.14.0.md rename to content/develop/tools/insight/release-notes/v.2.14.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.16.0.md b/content/develop/tools/insight/release-notes/v.2.16.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.16.0.md rename to content/develop/tools/insight/release-notes/v.2.16.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.18.0.md b/content/develop/tools/insight/release-notes/v.2.18.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.18.0.md rename to content/develop/tools/insight/release-notes/v.2.18.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.20.0.md b/content/develop/tools/insight/release-notes/v.2.20.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.20.0.md rename to content/develop/tools/insight/release-notes/v.2.20.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.22.1.md b/content/develop/tools/insight/release-notes/v.2.22.1.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.22.1.md rename to content/develop/tools/insight/release-notes/v.2.22.1.md diff --git a/content/develop/connect/insight/release-notes/v.2.24.0.md b/content/develop/tools/insight/release-notes/v.2.24.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.24.0.md rename to content/develop/tools/insight/release-notes/v.2.24.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.26.0.md b/content/develop/tools/insight/release-notes/v.2.26.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.26.0.md rename to content/develop/tools/insight/release-notes/v.2.26.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.30.0.md b/content/develop/tools/insight/release-notes/v.2.30.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.30.0.md rename to content/develop/tools/insight/release-notes/v.2.30.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.32.0.md b/content/develop/tools/insight/release-notes/v.2.32.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.32.0.md rename to content/develop/tools/insight/release-notes/v.2.32.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.34.0.md b/content/develop/tools/insight/release-notes/v.2.34.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.34.0.md rename to content/develop/tools/insight/release-notes/v.2.34.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.36.0.md b/content/develop/tools/insight/release-notes/v.2.36.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.36.0.md rename to content/develop/tools/insight/release-notes/v.2.36.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.38.0.md b/content/develop/tools/insight/release-notes/v.2.38.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.38.0.md rename to content/develop/tools/insight/release-notes/v.2.38.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.4.0.md b/content/develop/tools/insight/release-notes/v.2.4.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.4.0.md rename to content/develop/tools/insight/release-notes/v.2.4.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.40.0.md b/content/develop/tools/insight/release-notes/v.2.40.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.40.0.md rename to content/develop/tools/insight/release-notes/v.2.40.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.42.0.md b/content/develop/tools/insight/release-notes/v.2.42.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.42.0.md rename to content/develop/tools/insight/release-notes/v.2.42.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.44.0.md b/content/develop/tools/insight/release-notes/v.2.44.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.44.0.md rename to content/develop/tools/insight/release-notes/v.2.44.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.46.0.md b/content/develop/tools/insight/release-notes/v.2.46.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.46.0.md rename to content/develop/tools/insight/release-notes/v.2.46.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.48.0.md b/content/develop/tools/insight/release-notes/v.2.48.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.48.0.md rename to content/develop/tools/insight/release-notes/v.2.48.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.50.0.md b/content/develop/tools/insight/release-notes/v.2.50.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.50.0.md rename to content/develop/tools/insight/release-notes/v.2.50.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.52.0.md b/content/develop/tools/insight/release-notes/v.2.52.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.52.0.md rename to content/develop/tools/insight/release-notes/v.2.52.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.54.0.md b/content/develop/tools/insight/release-notes/v.2.54.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.54.0.md rename to content/develop/tools/insight/release-notes/v.2.54.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.56.0.md b/content/develop/tools/insight/release-notes/v.2.56.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.56.0.md rename to content/develop/tools/insight/release-notes/v.2.56.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.58.0.md b/content/develop/tools/insight/release-notes/v.2.58.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.58.0.md rename to content/develop/tools/insight/release-notes/v.2.58.0.md diff --git a/content/develop/connect/insight/release-notes/v.2.6.0.md b/content/develop/tools/insight/release-notes/v.2.6.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v.2.6.0.md rename to content/develop/tools/insight/release-notes/v.2.6.0.md diff --git a/content/develop/tools/insight/release-notes/v.2.60.0.md b/content/develop/tools/insight/release-notes/v.2.60.0.md new file mode 100644 index 0000000000..1c2bd4b439 --- /dev/null +++ b/content/develop/tools/insight/release-notes/v.2.60.0.md @@ -0,0 +1,25 @@ +--- +Title: Redis Insight v2.60.0, October 2024 +linkTitle: v2.60.0 (October 2024) +date: 2024-10-30 00:00:00 +0000 +description: Redis Insight v2.60 +weight: 1 + +--- +## 2.60 (October 2024) +This is the General Availability (GA) release of Redis Insight 2.60. + +### Highlights +- Advanced and schema-aware command auto-complete for [Redis Query Engine](https://redis.io/docs/latest/develop/interact/search-and-query/?utm_source=redisinsight&utm_medium=main&utm_campaign=release_notes) is now available in Workbench, enabling faster and more accurate query building with smart suggestions for indexes, schemas, and expressions. +- Support for adding multiple elements to the head or tail of lists, for both new or existing keys. +- Multiple UI enhancements for clarity and ease of use when editing Redis Data Integration (RDI) jobs. + +### Details + +**Features and improvements** +- [#3553](https://github.com/RedisInsight/RedisInsight/pull/3553), [#3647](https://github.com/RedisInsight/RedisInsight/pull/3647), [#3669](https://github.com/RedisInsight/RedisInsight/pull/3669) Advanced, schema-aware auto-complete for [Redis Query Engine](https://redis.io/docs/latest/develop/interact/search-and-query/?utm_source=redisinsight&utm_medium=main&utm_campaign=release_notes) in Workbench. Enjoy faster query building with context-sensitive suggestions that recognize indexes, schemas, and fields based on your current query. Start typing any [Redis Query Engine](https://redis.io/docs/latest/commands/?group=search) command in Workbench to try this feature. +- [#3891](https://github.com/RedisInsight/RedisInsight/pull/3891) Allows to easily push multiple elements to the head or tail of list data types, whether creating new or updating existing lists. +- [#3891](https://github.com/RedisInsight/RedisInsight/pull/3891) UX/UI enhancements to provide more details about Redis Data Integration (RDI) job transformation and output results in the dry-run section. +- [#3981](https://github.com/RedisInsight/RedisInsight/pull/3981) Removes confirmation prompts for template insertions in Redis Data Integration jobs, simplifying a workflow. +- [#3827](https://github.com/RedisInsight/RedisInsight/pull/3827) Provides easy-to-understand metrics of network input/output by automatically converting units in Browser Overview. +- [#3982](https://github.com/RedisInsight/RedisInsight/pull/3982), [#3975](https://github.com/RedisInsight/RedisInsight/pull/3975), [#3941](https://github.com/RedisInsight/RedisInsight/pull/3941) Various vulnerabilities have been fixed. diff --git a/content/develop/connect/insight/release-notes/v1.0.0.md b/content/develop/tools/insight/release-notes/v1.0.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v1.0.0.md rename to content/develop/tools/insight/release-notes/v1.0.0.md diff --git a/content/develop/connect/insight/release-notes/v1.1.0.md b/content/develop/tools/insight/release-notes/v1.1.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v1.1.0.md rename to content/develop/tools/insight/release-notes/v1.1.0.md diff --git a/content/develop/connect/insight/release-notes/v1.10.0.md b/content/develop/tools/insight/release-notes/v1.10.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v1.10.0.md rename to content/develop/tools/insight/release-notes/v1.10.0.md diff --git a/content/develop/connect/insight/release-notes/v1.11.0.md b/content/develop/tools/insight/release-notes/v1.11.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v1.11.0.md rename to content/develop/tools/insight/release-notes/v1.11.0.md diff --git a/content/develop/connect/insight/release-notes/v1.12.0.md b/content/develop/tools/insight/release-notes/v1.12.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v1.12.0.md rename to content/develop/tools/insight/release-notes/v1.12.0.md diff --git a/content/develop/connect/insight/release-notes/v1.13.0.md b/content/develop/tools/insight/release-notes/v1.13.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v1.13.0.md rename to content/develop/tools/insight/release-notes/v1.13.0.md diff --git a/content/develop/connect/insight/release-notes/v1.14.0.md b/content/develop/tools/insight/release-notes/v1.14.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v1.14.0.md rename to content/develop/tools/insight/release-notes/v1.14.0.md diff --git a/content/develop/connect/insight/release-notes/v1.2.0.md b/content/develop/tools/insight/release-notes/v1.2.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v1.2.0.md rename to content/develop/tools/insight/release-notes/v1.2.0.md diff --git a/content/develop/connect/insight/release-notes/v1.3.0.md b/content/develop/tools/insight/release-notes/v1.3.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v1.3.0.md rename to content/develop/tools/insight/release-notes/v1.3.0.md diff --git a/content/develop/connect/insight/release-notes/v1.4.0.md b/content/develop/tools/insight/release-notes/v1.4.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v1.4.0.md rename to content/develop/tools/insight/release-notes/v1.4.0.md diff --git a/content/develop/connect/insight/release-notes/v1.5.0.md b/content/develop/tools/insight/release-notes/v1.5.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v1.5.0.md rename to content/develop/tools/insight/release-notes/v1.5.0.md diff --git a/content/develop/connect/insight/release-notes/v1.6.0.md b/content/develop/tools/insight/release-notes/v1.6.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v1.6.0.md rename to content/develop/tools/insight/release-notes/v1.6.0.md diff --git a/content/develop/connect/insight/release-notes/v1.7.0.md b/content/develop/tools/insight/release-notes/v1.7.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v1.7.0.md rename to content/develop/tools/insight/release-notes/v1.7.0.md diff --git a/content/develop/connect/insight/release-notes/v1.8.0.md b/content/develop/tools/insight/release-notes/v1.8.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v1.8.0.md rename to content/develop/tools/insight/release-notes/v1.8.0.md diff --git a/content/develop/connect/insight/release-notes/v1.9.0.md b/content/develop/tools/insight/release-notes/v1.9.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v1.9.0.md rename to content/develop/tools/insight/release-notes/v1.9.0.md diff --git a/content/develop/connect/insight/release-notes/v2.0.md b/content/develop/tools/insight/release-notes/v2.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v2.0.md rename to content/develop/tools/insight/release-notes/v2.0.md diff --git a/content/develop/connect/insight/release-notes/v2.10.0.md b/content/develop/tools/insight/release-notes/v2.10.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v2.10.0.md rename to content/develop/tools/insight/release-notes/v2.10.0.md diff --git a/content/develop/connect/insight/release-notes/v2.12.0.md b/content/develop/tools/insight/release-notes/v2.12.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v2.12.0.md rename to content/develop/tools/insight/release-notes/v2.12.0.md diff --git a/content/develop/connect/insight/release-notes/v2.2.0.md b/content/develop/tools/insight/release-notes/v2.2.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v2.2.0.md rename to content/develop/tools/insight/release-notes/v2.2.0.md diff --git a/content/develop/connect/insight/release-notes/v2.28.0.md b/content/develop/tools/insight/release-notes/v2.28.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v2.28.0.md rename to content/develop/tools/insight/release-notes/v2.28.0.md diff --git a/content/develop/connect/insight/release-notes/v2.8.0.md b/content/develop/tools/insight/release-notes/v2.8.0.md similarity index 100% rename from content/develop/connect/insight/release-notes/v2.8.0.md rename to content/develop/tools/insight/release-notes/v2.8.0.md diff --git a/content/develop/connect/insight/tutorials/images/consumer.png b/content/develop/tools/insight/tutorials/images/consumer.png similarity index 100% rename from content/develop/connect/insight/tutorials/images/consumer.png rename to content/develop/tools/insight/tutorials/images/consumer.png diff --git a/content/develop/connect/insight/tutorials/images/insight_streams.png b/content/develop/tools/insight/tutorials/images/insight_streams.png similarity index 100% rename from content/develop/connect/insight/tutorials/images/insight_streams.png rename to content/develop/tools/insight/tutorials/images/insight_streams.png diff --git a/content/develop/connect/insight/tutorials/images/stream.png b/content/develop/tools/insight/tutorials/images/stream.png similarity index 100% rename from content/develop/connect/insight/tutorials/images/stream.png rename to content/develop/tools/insight/tutorials/images/stream.png diff --git a/content/develop/connect/insight/tutorials/insight-stream-consumer.md b/content/develop/tools/insight/tutorials/insight-stream-consumer.md similarity index 99% rename from content/develop/connect/insight/tutorials/insight-stream-consumer.md rename to content/develop/tools/insight/tutorials/insight-stream-consumer.md index 8c7b09a6d2..83b8685fbb 100644 --- a/content/develop/connect/insight/tutorials/insight-stream-consumer.md +++ b/content/develop/tools/insight/tutorials/insight-stream-consumer.md @@ -1,4 +1,5 @@ --- +aliases: /develop/connect/insight/tutorials/insight-stream-consumer categories: - docs - develop diff --git a/content/develop/connect/redis-for-vscode/_index.md b/content/develop/tools/redis-for-vscode/_index.md similarity index 98% rename from content/develop/connect/redis-for-vscode/_index.md rename to content/develop/tools/redis-for-vscode/_index.md index 86a027fc7d..2ce173b76d 100644 --- a/content/develop/connect/redis-for-vscode/_index.md +++ b/content/develop/tools/redis-for-vscode/_index.md @@ -1,4 +1,5 @@ --- +aliases: /develop/connect/redis-for-vscode categories: - docs - develop @@ -48,7 +49,7 @@ Click on the Redis mark (the cursive **R**) in the VS Code menu to begin connect {{< image filename="images/dev/connect/vscode/vscode-initial.png" >}} -Click on the **+ Connect database** button. A dialog will display in the main pane. In the image shown below, all the options have been checked to show the available details for each connection. These connection details are similar to those accessible from [`redis-cli`]({{< relref "/develop/connect/cli" >}}). +Click on the **+ Connect database** button. A dialog will display in the main pane. In the image shown below, all the options have been checked to show the available details for each connection. These connection details are similar to those accessible from [`redis-cli`]({{< relref "/develop/tools/cli" >}}). {{< note >}} In the first release of Redis for VS Code, there is no way to change the logical database after you have selected it. If you need to connect to a different logical database, you need to add a separate database connection. @@ -143,4 +144,4 @@ The connection tool with the boxed `>_` icon opens a Redis CLI window in the **R {{< image filename="images/dev/connect/vscode/vscode-cli.png" >}} -The CLI interface works just like the [`redis-cli`]({{< relref "/develop/connect/cli" >}}) command. +The CLI interface works just like the [`redis-cli`]({{< relref "/develop/tools/cli" >}}) command. diff --git a/content/develop/connect/redis-for-vscode/release-notes/_index.md b/content/develop/tools/redis-for-vscode/release-notes/_index.md similarity index 100% rename from content/develop/connect/redis-for-vscode/release-notes/_index.md rename to content/develop/tools/redis-for-vscode/release-notes/_index.md diff --git a/content/develop/connect/redis-for-vscode/release-notes/v1.0.0.md b/content/develop/tools/redis-for-vscode/release-notes/v1.0.0.md similarity index 100% rename from content/develop/connect/redis-for-vscode/release-notes/v1.0.0.md rename to content/develop/tools/redis-for-vscode/release-notes/v1.0.0.md diff --git a/content/embeds/rc-rs-oss-compatibility.md b/content/embeds/rc-rs-oss-compatibility.md index f0b196560d..9016262b4d 100644 --- a/content/embeds/rc-rs-oss-compatibility.md +++ b/content/embeds/rc-rs-oss-compatibility.md @@ -10,4 +10,4 @@ See [Compatibility with Redis commands]({{< relref "/operate/rs/references/compa ## Redis clients -You can use any standard [Redis client]({{< relref "/develop/connect/clients/" >}}) with Redis Enterprise Software and Redis Cloud. \ No newline at end of file +You can use any standard [Redis client]({{< relref "/develop/clients" >}}) with Redis Enterprise Software and Redis Cloud. \ No newline at end of file diff --git a/content/embeds/rs-quick-db-setup-7-8.md b/content/embeds/rs-quick-db-setup-7-8.md new file mode 100644 index 0000000000..ee2e984599 --- /dev/null +++ b/content/embeds/rs-quick-db-setup-7-8.md @@ -0,0 +1,18 @@ +1. On the **Databases** screen, select **Quick database**. + + {{Select Quick database on the Databases screen.}} + +1. Enter 12000 for the **Port**. + + If port 12000 is not available, enter any available port number between 10000 to 19999 or leave it blank to let the cluster assign a port number for you. You will use this port number to connect to the database. + + {{Create a quick database.}} + +1. Select **Create** to create your database. + +When you see **Database active** appear on the database configuration screen, the database is activated and ready for you to use. + +{{Database active icon.}} + + +You now have a Redis database! \ No newline at end of file diff --git a/content/embeds/rs-upgrade-paths.md b/content/embeds/rs-upgrade-paths.md new file mode 100644 index 0000000000..37b29bae5d --- /dev/null +++ b/content/embeds/rs-upgrade-paths.md @@ -0,0 +1,14 @@ +## Supported upgrade paths + + Supported – You can upgrade directly from the current Redis Software cluster version. + +:x: Not supported – You cannot upgrade directly from the current Redis Software cluster version. You must first upgrade to a supported intermediate version. + +| Current Redis Software cluster version | Upgrade to Redis Software 6.2.x | Upgrade to Redis Software 6.4.x | Upgrade to Redis Software 7.2.x | Upgrade to Redis Software 7.4.x | Upgrade to Redis Software 7.8.x | +|:-----------------------:|:----------------:|:----------------:|:----------------:|:----------------:|:----------------:| +| 6.0.x | | | | :x: | :x: | +| 6.2.4
6.2.8 | – | | | | :x: | +| 6.2.10
6.2.12
6.2.18 | – | | | | | +| 6.4.x | – | – | | | | +| 7.2.x | – | – | – | | | +| 7.4.x | – | – | – | - | | diff --git a/content/embeds/supported-platforms-embed.md b/content/embeds/supported-platforms-embed.md index 8b6980d591..4156f96579 100644 --- a/content/embeds/supported-platforms-embed.md +++ b/content/embeds/supported-platforms-embed.md @@ -7,30 +7,32 @@ Redis Enterprise Software is supported on several operating systems, cloud envi :warning: Deprecation warning – The platform is still supported for this version of Redis Enterprise Software, but support will be removed in a future release. -| Redis Enterprise
major versions | 7.4 | 7.2 | 6.4 | 6.2 | -|---------------------------------|:-----:|:-----:|:-----:|:-----:| -| **Release date** | Feb 2024 | Aug 2023 | Feb 2023 | Aug 2021 | -| [**End-of-life date**]({{< relref "/operate/rs/installing-upgrading/product-lifecycle#endoflife-schedule" >}}) | Determined after
next major release | Feb 2026 | Aug 2025 | Feb 2025 | -| **Platforms** | | | | | -| RHEL 9 &
compatible distros[1](#table-note-1) | | – | – | – | -| RHEL 8 &
compatible distros[1](#table-note-1) | | | | | -| RHEL 7 &
compatible distros[1](#table-note-1) | – | :warning: | | | -| Ubuntu 20.04[2](#table-note-2) | | | | – | -| Ubuntu 18.04[2](#table-note-2) | :warning: | :warning: | | | -| Ubuntu 16.04[2](#table-note-2) | – | :warning: | | | -| Amazon Linux 2 | | | | – | -| Amazon Linux 1 | – | | | | -| Kubernetes[3](#table-note-3) | | | | | -| Docker[4](#table-note-4) | | | | | - -1. The RHEL-compatible distributions CentOS, CentOS Stream, Alma, and Rocky are supported if they have full RHEL compatibility. Oracle Linux running the Red Hat Compatible Kernel (RHCK) is supported, but the Unbreakable Enterprise Kernel (UEK) is not supported. - -2. The server version of Ubuntu is recommended for production installations. The desktop version is only recommended for development deployments. - -3. See the [Redis Enterprise for Kubernetes documentation]({{< relref "/operate/kubernetes/reference/supported_k8s_distributions" >}}) for details about support per version and Kubernetes distribution. - -4. -[Docker images]({{< relref "/operate/rs/installing-upgrading/quickstarts/docker-quickstart" >}}) of Redis Enterprise Software are certified for development and testing only. +| Redis Software
major versions | 7.8 | 7.4 | 7.2 | 6.4 | 6.2 | +|---------------------------------|:-----:|:-----:|:-----:|:-----:|:-----:| +| **Release date** | Nov 2024 | Feb 2024 | Aug 2023 | Feb 2023 | Aug 2021 | +| [**End-of-life date**]({{< relref "/operate/rs/installing-upgrading/product-lifecycle#endoflife-schedule" >}}) | Determined after
next major release | Nov 2026 | Feb 2026 | Aug 2025 | Feb 2025 | +| **Platforms** | | | | | | +| RHEL 9 &
compatible distros[1](#table-note-1) | | | – | – | – | +| RHEL 9
FIPS mode[5](#table-note-5) | | – | – | – | – | +| RHEL 8 &
compatible distros[1](#table-note-1) | | | | | | +| RHEL 7 &
compatible distros[1](#table-note-1) | – | – | :warning: | | | +| Ubuntu 20.04[2](#table-note-2) | | | | | – | +| Ubuntu 18.04[2](#table-note-2) | – | :warning: | :warning: | | | +| Ubuntu 16.04[2](#table-note-2) | – | – | :warning: | | | +| Amazon Linux 2 | | | | | – | +| Amazon Linux 1 | – | – | | | | +| Kubernetes[3](#table-note-3) | | | | | | +| Docker[4](#table-note-4) | | | | | | + +1. The RHEL-compatible distributions CentOS, CentOS Stream, Alma, and Rocky are supported if they have full RHEL compatibility. Oracle Linux running the Red Hat Compatible Kernel (RHCK) is supported, but the Unbreakable Enterprise Kernel (UEK) is not supported. + +2. The server version of Ubuntu is recommended for production installations. The desktop version is only recommended for development deployments. + +3. See the [Redis Enterprise for Kubernetes documentation]({{< relref "/operate/kubernetes/reference/supported_k8s_distributions" >}}) for details about support per version and Kubernetes distribution. + +4. [Docker images]({{< relref "/operate/rs/installing-upgrading/quickstarts/docker-quickstart" >}}) of Redis Enterprise Software are certified for development and testing only. + +5. Supported only if [FIPS was enabled during RHEL installation](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/security_hardening/switching-rhel-to-fips-mode_security-hardening#proc_installing-the-system-with-fips-mode-enabled_switching-rhel-to-fips-mode) to ensure FIPS compliance. The following table shows which Redis Enterprise Software version first tested and added support for each RHEL version: diff --git a/content/get-started/_index.md b/content/get-started/_index.md index 3864059871..ed9fe4e19a 100644 --- a/content/get-started/_index.md +++ b/content/get-started/_index.md @@ -27,7 +27,7 @@ The following quick start guides will show you how to use Redis for the followin - [Retrieval Augmented Generation (RAG) with Redis]({{< relref "/develop/get-started/rag" >}}) ## Data integration tools, libraries, and frameworks -- [Client API libraries]({{< relref "/develop/connect/clients" >}}) +- [Client API libraries]({{< relref "/develop/clients" >}}) - [Redis Data Integration]({{< relref "/integrate/redis-data-integration/" >}}) - [Redis vector library for Python]({{< relref "/integrate/redisvl/" >}}) - [Redis Cloud with Amazon Bedrock]({{< relref "/integrate/amazon-bedrock/" >}}) diff --git a/content/glossary/_index.md b/content/glossary/_index.md index c82c8ab6bd..f1d808bdb3 100644 --- a/content/glossary/_index.md +++ b/content/glossary/_index.md @@ -190,7 +190,7 @@ More info: [Overview of kubectl](https://kubernetes.io/docs/reference/kubectl/ov {{%definition "Lightweight Directory Access Protocol (LDAP)"%}} A protocol for accessing and maintaining distributed directory services over an IP network, often used to authenticate users. -More info: [LDAP wikipedia](https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol/), [LDAP authentication]({{}}) +More info: [LDAP wikipedia](https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol), [LDAP authentication]({{}}) {{%/definition%}} ## M - O {#letter-m} diff --git a/content/integrate/NRedisStack/_index.md b/content/integrate/NRedisStack/_index.md index 37723aaca4..22825ead70 100644 --- a/content/integrate/NRedisStack/_index.md +++ b/content/integrate/NRedisStack/_index.md @@ -18,4 +18,4 @@ weight: 2 Connect your C#/.NET application to a Redis database using the NRedisStack client library. -Refer to the complete [C#/.NET guide]({{< relref "/develop/connect/clients/dotnet" >}}) to install, connect, and use NRedisStack. +Refer to the complete [C#/.NET guide]({{< relref "/develop/clients/dotnet" >}}) to install, connect, and use NRedisStack. diff --git a/content/integrate/amazon-bedrock/set-up-redis.md b/content/integrate/amazon-bedrock/set-up-redis.md index dc10015030..79a00711d7 100644 --- a/content/integrate/amazon-bedrock/set-up-redis.md +++ b/content/integrate/amazon-bedrock/set-up-redis.md @@ -196,7 +196,7 @@ After your Redis Cloud database is set up, create a search index with a vector f ### Redis Insight -[Redis Insight]({{< relref "/develop/connect/insight/" >}}) is a free Redis GUI that allows you to visualize and optimize your data in Redis. +[Redis Insight]({{< relref "/develop/tools/insight" >}}) is a free Redis GUI that allows you to visualize and optimize your data in Redis. To create your vector index in Redis Insight: @@ -250,7 +250,7 @@ To create your vector index in Redis Insight: ### `redis-cli` -The [`redis-cli`]({{< relref "/develop/connect/cli" >}}) command-line utility lets you connect and run Redis commands directly from the command line. To use `redis-cli`, you can [install Redis]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/" >}}). +The [`redis-cli`]({{< relref "/develop/tools/cli" >}}) command-line utility lets you connect and run Redis commands directly from the command line. To use `redis-cli`, you can [install Redis]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/" >}}). Public endpoint and port details are available from the **Databases** list or the database's **Configuration** screen. Select **Connect** to view how to connect to your database with `redis-cli`. diff --git a/content/integrate/jedis/_index.md b/content/integrate/jedis/_index.md index f31a89cb96..a8cf59387b 100644 --- a/content/integrate/jedis/_index.md +++ b/content/integrate/jedis/_index.md @@ -18,4 +18,4 @@ weight: 2 Connect your Java application to a Redis database using the Jedis client library. -Refer to the complete [Jedis guide]({{< relref "/develop/connect/clients/java/jedis" >}}) to install, connect, and use Jedis. +Refer to the complete [Jedis guide]({{< relref "/develop/clients/jedis" >}}) to install, connect, and use Jedis. diff --git a/content/integrate/lettuce/_index.md b/content/integrate/lettuce/_index.md index 87a68c30a7..30657dd99d 100644 --- a/content/integrate/lettuce/_index.md +++ b/content/integrate/lettuce/_index.md @@ -18,4 +18,4 @@ weight: 2 Connect your Java application to a Redis database using the Lettuce client library. -Refer to the complete [Lettuce guide]({{< relref "/develop/connect/clients/java/lettuce" >}}) to install, connect, and use Lettuce. +Refer to the complete [Lettuce guide]({{< relref "/develop/clients/lettuce" >}}) to install, connect, and use Lettuce. diff --git a/content/integrate/node-redis/_index.md b/content/integrate/node-redis/_index.md index 72080263f6..54ddbde38e 100644 --- a/content/integrate/node-redis/_index.md +++ b/content/integrate/node-redis/_index.md @@ -18,4 +18,4 @@ weight: 2 Connect your Node.js application to a Redis database using the node-redis client library. -Refer to the complete [Node.js guide]({{< relref "/develop/connect/clients/nodejs" >}}) to install, connect, and use node-redis. +Refer to the complete [Node.js guide]({{< relref "/develop/clients/nodejs" >}}) to install, connect, and use node-redis. diff --git a/content/integrate/prometheus-with-redis-enterprise/prometheus-metrics-definitions.md b/content/integrate/prometheus-with-redis-enterprise/prometheus-metrics-definitions.md index 0c44afb102..c264ece9ad 100644 --- a/content/integrate/prometheus-with-redis-enterprise/prometheus-metrics-definitions.md +++ b/content/integrate/prometheus-with-redis-enterprise/prometheus-metrics-definitions.md @@ -1,281 +1,176 @@ --- -Title: Metrics in Prometheus +Title: Prometheus metrics v2 preview alwaysopen: false categories: - docs - integrate - rs -description: The metrics available to Prometheus. +description: V2 metrics available to Prometheus as of Redis Enterprise Software version 7.8.2. group: observability -linkTitle: Prometheus metrics -summary: You can use Prometheus and Grafana to collect and visualize your Redis Enterprise - Software metrics. +linkTitle: Prometheus metrics v2 +summary: V2 metrics available to Prometheus as of Redis Enterprise Software version 7.8.2. type: integration weight: 45 --- -The [integration with Prometheus]({{< relref "/integrate/prometheus-with-redis-enterprise/" >}}) -lets you create dashboards that highlight the metrics that are important to you. -Here are the metrics available to Prometheus: +{{}} +While the metrics stream engine is in preview, this document provides only a partial list of v2 metrics. More metrics will be added. +{{}} + +You can [integrate Redis Enterprise Software with Prometheus and Grafana]({{}}) to create dashboards for important metrics. + +The v2 metrics in the following tables are available as of Redis Enterprise Software version 7.8.0. For help transitioning from v1 metrics to v2 PromQL, see [Prometheus v1 metrics and equivalent v2 PromQL]({{}}). ## Database metrics | Metric | Description | -| ------ | :------ | -| bdb_avg_latency | Average latency of operations on the DB (seconds); returned only when there is traffic | -| bdb_avg_latency_max | Highest value of average latency of operations on the DB (seconds); returned only when there is traffic | -| bdb_avg_read_latency | Average latency of read operations (seconds); returned only when there is traffic | -| bdb_avg_read_latency_max | Highest value of average latency of read operations (seconds); returned only when there is traffic | -| bdb_avg_write_latency | Average latency of write operations (seconds); returned only when there is traffic | -| bdb_avg_write_latency_max | Highest value of average latency of write operations (seconds); returned only when there is traffic | -| bdb_bigstore_shard_count | Shard count by database and by storage engine (driver - rocksdb / speedb); Only for databases with Auto Tiering enabled | -| bdb_conns | Number of client connections to DB | -| bdb_egress_bytes | Rate of outgoing network traffic from the DB (bytes/sec) | -| bdb_egress_bytes_max | Highest value of rate of outgoing network traffic from the DB (bytes/sec) | -| bdb_evicted_objects | Rate of key evictions from DB (evictions/sec) | -| bdb_evicted_objects_max | Highest value of rate of key evictions from DB (evictions/sec) | -| bdb_expired_objects | Rate keys expired in DB (expirations/sec) | -| bdb_expired_objects_max | Highest value of rate keys expired in DB (expirations/sec) | -| bdb_fork_cpu_system | % cores utilization in system mode for all redis shard fork child processes of this database | -| bdb_fork_cpu_system_max | Highest value of % cores utilization in system mode for all redis shard fork child processes of this database | -| bdb_fork_cpu_user | % cores utilization in user mode for all redis shard fork child processes of this database | -| bdb_fork_cpu_user_max | Highest value of % cores utilization in user mode for all redis shard fork child processes of this database | -| bdb_ingress_bytes | Rate of incoming network traffic to DB (bytes/sec) | -| bdb_ingress_bytes_max | Highest value of rate of incoming network traffic to DB (bytes/sec) | -| bdb_instantaneous_ops_per_sec | Request rate handled by all shards of DB (ops/sec) | -| bdb_main_thread_cpu_system | % cores utilization in system mode for all redis shard main threads of this database | -| bdb_main_thread_cpu_system_max | Highest value of % cores utilization in system mode for all redis shard main threads of this database | -| bdb_main_thread_cpu_user | % cores utilization in user mode for all redis shard main threads of this database | -| bdb_main_thread_cpu_user_max | Highest value of % cores utilization in user mode for all redis shard main threads of this database | -| bdb_mem_frag_ratio | RAM fragmentation ratio (RSS / allocated RAM) | -| bdb_mem_size_lua | Redis lua scripting heap size (bytes) | -| bdb_memory_limit | Configured RAM limit for the database | -| bdb_monitor_sessions_count | Number of client connected in monitor mode to the DB | -| bdb_no_of_keys | Number of keys in DB | -| bdb_other_req | Rate of other (non read/write) requests on DB (ops/sec) | -| bdb_other_req_max | Highest value of rate of other (non read/write) requests on DB (ops/sec) | -| bdb_other_res | Rate of other (non read/write) responses on DB (ops/sec) | -| bdb_other_res_max | Highest value of rate of other (non read/write) responses on DB (ops/sec) | -| bdb_pubsub_channels | Count the pub/sub channels with subscribed clients | -| bdb_pubsub_channels_max | Highest value of count the pub/sub channels with subscribed clients | -| bdb_pubsub_patterns | Count the pub/sub patterns with subscribed clients | -| bdb_pubsub_patterns_max | Highest value of count the pub/sub patterns with subscribed clients | -| bdb_read_hits | Rate of read operations accessing an existing key (ops/sec) | -| bdb_read_hits_max | Highest value of rate of read operations accessing an existing key (ops/sec) | -| bdb_read_misses | Rate of read operations accessing a non-existing key (ops/sec) | -| bdb_read_misses_max | Highest value of rate of read operations accessing a non-existing key (ops/sec) | -| bdb_read_req | Rate of read requests on DB (ops/sec) | -| bdb_read_req_max | Highest value of rate of read requests on DB (ops/sec) | -| bdb_read_res | Rate of read responses on DB (ops/sec) | -| bdb_read_res_max | Highest value of rate of read responses on DB (ops/sec) | -| bdb_shard_cpu_system | % cores utilization in system mode for all redis shard processes of this database | -| bdb_shard_cpu_system_max | Highest value of % cores utilization in system mode for all redis shard processes of this database | -| bdb_shard_cpu_user | % cores utilization in user mode for the redis shard process | -| bdb_shard_cpu_user_max | Highest value of % cores utilization in user mode for the redis shard process | -| bdb_shards_used | Used shard count by database and by shard type (ram / flash) | -| bdb_total_connections_received | Rate of new client connections to DB (connections/sec) | -| bdb_total_connections_received_max | Highest value of rate of new client connections to DB (connections/sec) | -| bdb_total_req | Rate of all requests on DB (ops/sec) | -| bdb_total_req_max | Highest value of rate of all requests on DB (ops/sec) | -| bdb_total_res | Rate of all responses on DB (ops/sec) | -| bdb_total_res_max | Highest value of rate of all responses on DB (ops/sec) | -| bdb_up | Database is up and running | -| bdb_used_memory | Memory used by db (in bigredis this includes flash) (bytes) | -| bdb_write_hits | Rate of write operations accessing an existing key (ops/sec) | -| bdb_write_hits_max | Highest value of rate of write operations accessing an existing key (ops/sec) | -| bdb_write_misses | Rate of write operations accessing a non-existing key (ops/sec) | -| bdb_write_misses_max | Highest value of rate of write operations accessing a non-existing key (ops/sec) | -| bdb_write_req | Rate of write requests on DB (ops/sec) | -| bdb_write_req_max | Highest value of rate of write requests on DB (ops/sec) | -| bdb_write_res | Rate of write responses on DB (ops/sec) | -| bdb_write_res_max | Highest value of rate of write responses on DB (ops/sec) | -| no_of_expires | Current number of volatile keys in the database | +| :-------- | :---------- | +| endpoint_client_connections | Number of client connection establishment events | +| endpoint_client_disconnections | Number of client disconnections initiated by the client | +| endpoint_client_connection_expired | Total number of client connections with expired TTL (Time To Live) | +| endpoint_client_establishment_failures | Number of client connections that failed to establish properly | +| endpoint_client_expiration_refresh | Number of expiration time changes of clients | +| endpoint_client_tracking_off_requests | Total number of `CLIENT TRACKING OFF` requests | +| endpoint_client_tracking_on_requests | Total number of `CLIENT TRACKING ON` requests | +| endpoint_disconnected_cba_client | Number of certificate-based clients disconnected | +| endpoint_disconnected_ldap_client | Number of LDAP clients disconnected | +| endpoint_disconnected_user_password_client | Number of user&password clients disconnected | +| endpoint_disposed_commands_after_client_caching | Total number of client caching commands that were disposed due to misuse | +| endpoint_egress | Number of egress bytes | +| endpoint_egress_pending | Number of send-pending bytes | +| endpoint_egress_pending_discarded | Number of send-pending bytes that were discarded due to disconnection | +| endpoint_failed_cba_authentication | Number of clients that failed certificate-based authentication | +| endpoint_failed_ldap_authentication | Number of clients that failed LDAP authentication | +| endpoint_failed_user_password_authentication | Number of clients that failed user password authentication | +| endpoint_ingress | Number of ingress bytes | +| endpoint_longest_pipeline_histogram | Client connections with the longest pipeline lengths | +| endpoint_other_requests | Number of other requests | +| endpoint_other_requests_latency_histogram | Latency (in µs) histogram of other commands | +| endpoint_other_requests_latency_histogram_bucket | Latency histograms for commands other than read or write commands. Can be used to represent different latency percentiles.
p99.9 example:
`histogram_quantile(0.999, sum(rate(endpoint_other_requests_latency_histogram_bucket{cluster="$cluster", db="$db"}[$__rate_interval]) ) by (le, db))` | +| endpoint_other_responses | Number of other responses | +| endpoint_proxy_disconnections | Number of client disconnections initiated by the proxy | +| endpoint_read_requests | Number of read requests | +| endpoint_read_requests_latency_histogram | Latency (in µs) histogram of read commands | +| endpoint_read_requests_latency_histogram_bucket | Latency histograms for read commands. Can be used to represent different latency percentiles.
p99.9 example:
`histogram_quantile(0.999, sum(rate(endpoint_read_requests_latency_histogram_bucket{cluster="$cluster", db="$db"}[$__rate_interval]) ) by (le, db))` | +| endpoint_read_responses | Number of read responses | +| endpoint_successful_cba_authentication | Number of clients that successfully authenticated with certificate-based authentication | +| endpoint_successful_ldap_authentication | Number of clients that successfully authenticated with LDAP | +| endpoint_successful_user_password_authentication | Number of clients that successfully authenticated with user&password | +| endpoint_write_requests | Number of write requests | +| endpoint_write_requests_latency_histogram | Latency (in µs) histogram of write commands | +| endpoint_write_requests_latency_histogram_bucket | Latency histograms for write commands. Can be used to represent different latency percentiles.
p99.9 example:
`histogram_quantile(0.999, sum(rate(endpoint_write_requests_latency_histogram_bucket{cluster="$cluster", db="$db"}[$__rate_interval]) ) by (le, db))` | +| endpoint_write_responses | Number of write responses | ## Node metrics | Metric | Description | -| ------ | :------ | -| node_available_flash | Available flash in node (bytes) | -| node_available_flash_no_overbooking | Available flash in node (bytes), without taking into account overbooking | -| node_available_memory | Amount of free memory in node (bytes) that is available for database provisioning | -| node_available_memory_no_overbooking | Available ram in node (bytes) without taking into account overbooking | -| node_avg_latency | Average latency of requests handled by endpoints on the node in milliseconds; returned only when there is traffic | -| node_bigstore_free | Sum of free space of back-end flash (used by flash DB's [BigRedis]) on all cluster nodes (bytes); returned only when BigRedis is enabled | -| node_bigstore_iops | Rate of i/o operations against back-end flash for all shards which are part of a flash based DB (BigRedis) in cluster (ops/sec); returned only when BigRedis is enabled | -| node_bigstore_kv_ops | Rate of value read/write operations against back-end flash for all shards which are part of a flash based DB (BigRedis) in cluster (ops/sec); returned only when BigRedis is enabled | -| node_bigstore_throughput | Throughput i/o operations against back-end flash for all shards which are part of a flash based DB (BigRedis) in cluster (bytes/sec); returned only when BigRedis is enabled | -| node_cert_expiration_seconds | Certificate expiration (in seconds) per given node; read more about [certificates in Redis Enterprise]({{< relref "/operate/rs/security/certificates" >}}) and [monitoring certificates expiration]({{< relref "/operate/rs/security/certificates/monitor-certificates" >}}) | -| node_conns | Number of clients connected to endpoints on node | -| node_cpu_idle | CPU idle time portion (0-1, multiply by 100 to get percent) | -| node_cpu_idle_max | Highest value of CPU idle time portion (0-1, multiply by 100 to get percent) | -| node_cpu_idle_median | Average value of CPU idle time portion (0-1, multiply by 100 to get percent) | -| node_cpu_idle_min | Lowest value of CPU idle time portion (0-1, multiply by 100 to get percent) | -| node_cpu_system | CPU time portion spent in kernel (0-1, multiply by 100 to get percent) | -| node_cpu_system_max | Highest value of CPU time portion spent in kernel (0-1, multiply by 100 to get percent) | -| node_cpu_system_median | Average value of CPU time portion spent in kernel (0-1, multiply by 100 to get percent) | -| node_cpu_system_min | Lowest value of CPU time portion spent in kernel (0-1, multiply by 100 to get percent) | -| node_cpu_user | CPU time portion spent by users-pace processes (0-1, multiply by 100 to get percent) | -| node_cpu_user_max | Highest value of CPU time portion spent by users-pace processes (0-1, multiply by 100 to get percent) | -| node_cpu_user_median | Average value of CPU time portion spent by users-pace processes (0-1, multiply by 100 to get percent) | -| node_cpu_user_min | Lowest value of CPU time portion spent by users-pace processes (0-1, multiply by 100 to get percent) | -| node_cur_aof_rewrites | Number of aof rewrites that are currently performed by shards on this node | -| node_egress_bytes | Rate of outgoing network traffic to node (bytes/sec) | -| node_egress_bytes_max | Highest value of rate of outgoing network traffic to node (bytes/sec) | -| node_egress_bytes_median | Average value of rate of outgoing network traffic to node (bytes/sec) | -| node_egress_bytes_min | Lowest value of rate of outgoing network traffic to node (bytes/sec) | -| node_ephemeral_storage_avail | Disk space available to RLEC processes on configured ephemeral disk (bytes) | -| node_ephemeral_storage_free | Free disk space on configured ephemeral disk (bytes) | -| node_free_memory | Free memory in node (bytes) | -| node_ingress_bytes | Rate of incoming network traffic to node (bytes/sec) | -| node_ingress_bytes_max | Highest value of rate of incoming network traffic to node (bytes/sec) | -| node_ingress_bytes_median | Average value of rate of incoming network traffic to node (bytes/sec) | -| node_ingress_bytes_min | Lowest value of rate of incoming network traffic to node (bytes/sec) | -| node_persistent_storage_avail | Disk space available to RLEC processes on configured persistent disk (bytes) | -| node_persistent_storage_free | Free disk space on configured persistent disk (bytes) | -| node_provisional_flash | Amount of flash available for new shards on this node, taking into account overbooking, max redis servers, reserved flash and provision and migration thresholds (bytes) | -| node_provisional_flash_no_overbooking | Amount of flash available for new shards on this node, without taking into account overbooking, max redis servers, reserved flash and provision and migration thresholds (bytes) | -| node_provisional_memory | Amount of RAM that is available for provisioning to databases out of the total RAM allocated for databases | -| node_provisional_memory_no_overbooking | Amount of RAM that is available for provisioning to databases out of the total RAM allocated for databases, without taking into account overbooking | -| node_total_req | Request rate handled by endpoints on node (ops/sec) | -| node_up | Node is part of the cluster and is connected | +| :-------- | :---------- | +| node_available_flash_bytes | Available flash in the node (bytes) | +| node_available_flash_no_overbooking_bytes | Available flash in the node (bytes), without taking into account overbooking | +| node_available_memory_bytes | Amount of free memory in the node (bytes) that is available for database provisioning | +| node_available_memory_no_overbooking_bytes | Available RAM in the node (bytes) without taking into account overbooking | +| node_bigstore_free_bytes | Sum of free space of back-end flash (used by flash database's [BigRedis]) on all cluster nodes (bytes); returned only when BigRedis is enabled | +| node_cert_expires_in_seconds | Certificate expiration (in seconds) per given node; read more about [certificates in Redis Enterprise]({{< relref "/operate/rs/security/certificates" >}}) and [monitoring certificates]({{< relref "/operate/rs/security/certificates/monitor-certificates" >}}) | +| node_ephemeral_storage_avail_bytes | Disk space available to RLEC processes on configured ephemeral disk (bytes) | +| node_ephemeral_storage_free_bytes | Free disk space on configured ephemeral disk (bytes) | +| node_memory_MemFree_bytes | Free memory in the node (bytes) | +| node_persistent_storage_avail_bytes | Disk space available to RLEC processes on configured persistent disk (bytes) | +| node_persistent_storage_free_bytes | Free disk space on configured persistent disk (bytes) | +| node_provisional_flash_bytes | Amount of flash available for new shards on this node, taking into account overbooking, max Redis servers, reserved flash, and provision and migration thresholds (bytes) | +| node_provisional_flash_no_overbooking_bytes | Amount of flash available for new shards on this node, without taking into account overbooking, max Redis servers, reserved flash, and provision and migration thresholds (bytes) | +| node_provisional_memory_bytes | Amount of RAM that is available for provisioning to databases out of the total RAM allocated for databases | +| node_provisional_memory_no_overbooking_bytes | Amount of RAM that is available for provisioning to databases out of the total RAM allocated for databases, without taking into account overbooking | +| node_metrics_up | Node is part of the cluster and is connected | ## Cluster metrics -| Metric | Description | -| ------ | :------ | -| cluster_shards_limit | Total shard limit by the license by shard type (ram / flash) | - - -## Proxy metrics - -| Metric | Description | -| ------ | :------ | -| listener_acc_latency | Accumulative latency (sum of the latencies) of all types of commands on DB. For the average latency, divide this value by listener_total_res | -| listener_acc_latency_max | Highest value of accumulative latency of all types of commands on DB | -| listener_acc_other_latency | Accumulative latency (sum of the latencies) of commands that are type "other" on DB. For the average latency, divide this value by listener_other_res | -| listener_acc_other_latency_max | Highest value of accumulative latency of commands that are type "other" on DB | -| listener_acc_read_latency | Accumulative latency (sum of the latencies) of commands that are type "read" on DB. For the average latency, divide this value by listener_read_res | -| listener_acc_read_latency_max | Highest value of accumulative latency of commands that are type "read" on DB | -| listener_acc_write_latency | Accumulative latency (sum of the latencies) of commands that are type "write" on DB. For the average latency, divide this value by listener_write_res | -| listener_acc_write_latency_max | Highest value of accumulative latency of commands that are type "write" on DB | -| listener_auth_cmds | Number of memcached AUTH commands sent to the DB | -| listener_auth_cmds_max | Highest value of number of memcached AUTH commands sent to the DB | -| listener_auth_errors | Number of error responses to memcached AUTH commands | -| listener_auth_errors_max | Highest value of number of error responses to memcached AUTH commands | -| listener_cmd_flush | Number of memcached FLUSH_ALL commands sent to the DB | -| listener_cmd_flush_max | Highest value of number of memcached FLUSH_ALL commands sent to the DB | -| listener_cmd_get | Number of memcached GET commands sent to the DB | -| listener_cmd_get_max | Highest value of number of memcached GET commands sent to the DB | -| listener_cmd_set | Number of memcached SET commands sent to the DB | -| listener_cmd_set_max | Highest value of number of memcached SET commands sent to the DB | -| listener_cmd_touch | Number of memcached TOUCH commands sent to the DB | -| listener_cmd_touch_max | Highest value of number of memcached TOUCH commands sent to the DB | -| listener_conns | Number of clients connected to the endpoint | -| listener_egress_bytes | Rate of outgoing network traffic to the endpoint (bytes/sec) | -| listener_egress_bytes_max | Highest value of rate of outgoing network traffic to the endpoint (bytes/sec) | -| listener_ingress_bytes | Rate of incoming network traffic to the endpoint (bytes/sec) | -| listener_ingress_bytes_max | Highest value of rate of incoming network traffic to the endpoint (bytes/sec) | -| listener_last_req_time | Time of last command sent to the DB | -| listener_last_res_time | Time of last response sent from the DB | -| listener_max_connections_exceeded | Number of times the Number of clients connected to the db at the same time has exeeded the max limit | -| listener_max_connections_exceeded_max | Highest value of number of times the Number of clients connected to the db at the same time has exeeded the max limit | -| listener_monitor_sessions_count | Number of client connected in monitor mode to the endpoint | -| listener_other_req | Rate of other (non read/write) requests on the endpoint (ops/sec) | -| listener_other_req_max | Highest value of rate of other (non read/write) requests on the endpoint (ops/sec) | -| listener_other_res | Rate of other (non read/write) responses on the endpoint (ops/sec) | -| listener_other_res_max | Highest value of rate of other (non read/write) responses on the endpoint (ops/sec) | -| listener_other_started_res | Number of responses sent from the DB of type "other" | -| listener_other_started_res_max | Highest value of number of responses sent from the DB of type "other" | -| listener_read_req | Rate of read requests on the endpoint (ops/sec) | -| listener_read_req_max | Highest value of rate of read requests on the endpoint (ops/sec) | -| listener_read_res | Rate of read responses on the endpoint (ops/sec) | -| listener_read_res_max | Highest value of rate of read responses on the endpoint (ops/sec) | -| listener_read_started_res | Number of responses sent from the DB of type "read" | -| listener_read_started_res_max | Highest value of number of responses sent from the DB of type "read" | -| listener_total_connections_received | Rate of new client connections to the endpoint (connections/sec) | -| listener_total_connections_received_max | Highest value of rate of new client connections to the endpoint (connections/sec) | -| listener_total_req | Request rate handled by the endpoint (ops/sec) | -| listener_total_req_max | Highest value of rate of all requests on the endpoint (ops/sec) | -| listener_total_res | Rate of all responses on the endpoint (ops/sec) | -| listener_total_res_max | Highest value of rate of all responses on the endpoint (ops/sec) | -| listener_total_started_res | Number of responses sent from the DB of all types | -| listener_total_started_res_max | Highest value of number of responses sent from the DB of all types | -| listener_write_req | Rate of write requests on the endpoint (ops/sec) | -| listener_write_req_max | Highest value of rate of write requests on the endpoint (ops/sec) | -| listener_write_res | Rate of write responses on the endpoint (ops/sec) | -| listener_write_res_max | Highest value of rate of write responses on the endpoint (ops/sec) | -| listener_write_started_res | Number of responses sent from the DB of type "write" | -| listener_write_started_res_max | Highest value of number of responses sent from the DB of type "write" | +| Metric | Type | Description | +| :-------- | :--- | :---------- | +| generation{cluster_wd=} | gauge| Generation number of the specific cluster_wd| +| has_qourum{cluster_wd=, has_witness_disk=BOOL} | gauge| Has_qourum = 1
No quorum = 0 | +| is_primary{cluster_wd=} | gauge| primary = 1
secondary = 0 | +| license_shards_limit | | Total shard limit by the license by shard type (ram / flash) | +| total_live_nodes_count{cluster_wd=} | gauge| Number of live nodes| +| total_node_count{cluster_wd=} | gauge| Number of nodes | +| total_primary_selection_ended{cluster_wd=} | counter | Monotonic counter for each selection process that ended | +| total_primary_selections{cluster_wd=} | counter | Monotonic counter for each selection process that started| ## Replication metrics | Metric | Description | -| ------ | :------ | -| bdb_replicaof_syncer_ingress_bytes | Rate of compressed incoming network traffic to Replica Of DB (bytes/sec) | -| bdb_replicaof_syncer_ingress_bytes_decompressed | Rate of decompressed incoming network traffic to Replica Of DB (bytes/sec) | -| bdb_replicaof_syncer_local_ingress_lag_time | Lag time between the source and the destination for Replica Of traffic (ms) | -| bdb_replicaof_syncer_status | Syncer status for Replica Of traffic; 0 = in-sync, 1 = syncing, 2 = out of sync | -| bdb_crdt_syncer_ingress_bytes | Rate of compressed incoming network traffic to CRDB (bytes/sec) | -| bdb_crdt_syncer_ingress_bytes_decompressed | Rate of decompressed incoming network traffic to CRDB (bytes/sec) | -| bdb_crdt_syncer_local_ingress_lag_time | Lag time between the source and the destination (ms) for CRDB traffic | -| bdb_crdt_syncer_status | Syncer status for CRDB traffic; 0 = in-sync, 1 = syncing, 2 = out of sync | +| :-------- | :---------- | +| database_syncer_config | Used as a placeholder for configuration labels | +| database_syncer_current_status | Syncer status for traffic; 0 = in-sync, 1 = syncing, 2 = out of sync | +| database_syncer_dst_connectivity_state | Destination connectivity state | +| database_syncer_dst_connectivity_state_ms | Destination connectivity state duration | +| database_syncer_dst_lag | Lag in milliseconds between the syncer and the destination | +| database_syncer_dst_repl_offset | Offset of the last command acknowledged | +| database_syncer_flush_counter | Number of destination flushes | +| database_syncer_ingress_bytes | Number of bytes read from source shard | +| database_syncer_ingress_bytes_decompressed | Number of bytes read from source shard | +| database_syncer_internal_state | Internal state of the syncer | +| database_syncer_lag_ms | Lag time between the source and the destination for traffic in milliseconds | +| database_syncer_rdb_size | The source's RDB size in bytes to be transferred during the syncing phase | +| database_syncer_rdb_transferred | Number of bytes transferred from the source's RDB during the syncing phase | +| database_syncer_src_connectivity_state | Source connectivity state | +| database_syncer_src_connectivity_state_ms | Source connectivity state duration | +| database_syncer_src_repl_offset | Last known source offset | +| database_syncer_state | Internal state of the shard syncer | +| database_syncer_syncer_repl_offset | Offset of the last command handled by the syncer | +| database_syncer_total_requests | Number of destination writes | +| database_syncer_total_responses | Number of destination writes acknowledged | ## Shard metrics | Metric | Description | -| ------ | :------ | -| redis_active_defrag_running | Automatic memory defragmentation current aggressiveness (% cpu) | -| redis_allocator_active | Total used memory including external fragmentation | -| redis_allocator_allocated | Total allocated memory | -| redis_allocator_resident | Total resident memory (RSS) | -| redis_aof_last_cow_size | Last AOFR, CopyOnWrite memory | -| redis_aof_rewrite_in_progress | The number of simultaneous AOF rewrites that are in progress | -| redis_aof_rewrites | Number of AOF rewrites this process executed | -| redis_aof_delayed_fsync | Number of times an AOF fsync caused delays in the redis main thread (inducing latency); This can indicate that the disk is slow or overloaded | -| redis_blocked_clients | Count the clients waiting on a blocking call | -| redis_connected_clients | Number of client connections to the specific shard | -| redis_connected_slaves | Number of connected slaves | -| redis_db0_avg_ttl | Average TTL of all volatile keys | -| redis_db0_expires | Total count of volatile keys | -| redis_db0_keys | Total key count | -| redis_evicted_keys | Keys evicted so far (since restart) | -| redis_expire_cycle_cpu_milliseconds | The cumulative amount of time spent on active expiry cycles | -| redis_expired_keys | Keys expired so far (since restart) | -| redis_forwarding_state | Shard forwarding state (on or off) | -| redis_keys_trimmed | The number of keys that were trimmed in the current or last resharding process | -| redis_keyspace_read_hits | Number of read operations accessing an existing keyspace | -| redis_keyspace_read_misses | Number of read operations accessing an non-existing keyspace | -| redis_keyspace_write_hits | Number of write operations accessing an existing keyspace | -| redis_keyspace_write_misses | Number of write operations accessing an non-existing keyspace | -| redis_master_link_status | Indicates if the replica is connected to its master | -| redis_master_repl_offset | Number of bytes sent to replicas by the shard; Calculate the throughput for a time period by comparing the value at different times | -| redis_master_sync_in_progress | The master shard is synchronizing (1 true | 0 false) | -| redis_max_process_mem | Current memory limit configured by redis_mgr according to node free memory | -| redis_maxmemory | Current memory limit configured by redis_mgr according to db memory limits | -| redis_mem_aof_buffer | Current size of AOF buffer | -| redis_mem_clients_normal | Current memory used for input and output buffers of non-replica clients | -| redis_mem_clients_slaves | Current memory used for input and output buffers of replica clients | -| redis_mem_fragmentation_ratio | Memory fragmentation ratio (1.3 means 30% overhead) | -| redis_mem_not_counted_for_evict | Portion of used_memory (in bytes) that's not counted for eviction and OOM error | -| redis_mem_replication_backlog | Size of replication backlog | -| redis_module_fork_in_progress | A binary value that indicates if there is an active fork spawned by a module (1) or not (0) | -| redis_process_cpu_system_seconds_total | Shard Process system CPU time spent in seconds | -| redis_process_cpu_usage_percent | Shard Process cpu usage precentage | -| redis_process_cpu_user_seconds_total | Shard user CPU time spent in seconds | -| redis_process_main_thread_cpu_system_seconds_total | Shard main thread system CPU time spent in seconds | -| redis_process_main_thread_cpu_user_seconds_total | Shard main thread user CPU time spent in seconds | -| redis_process_max_fds | Shard Maximum number of open file descriptors | -| redis_process_open_fds | Shard Number of open file descriptors | -| redis_process_resident_memory_bytes | Shard Resident memory size in bytes | -| redis_process_start_time_seconds | Shard Start time of the process since unix epoch in seconds | -| redis_process_virtual_memory_bytes | Shard virtual memory in bytes | -| redis_rdb_bgsave_in_progress | Indication if bgsave is currently in progress | -| redis_rdb_last_cow_size | Last bgsave (or SYNC fork) used CopyOnWrite memory | -| redis_rdb_saves | Total count of bgsaves since process was restarted (including replica fullsync and persistence) | -| redis_repl_touch_bytes | Number of bytes sent to replicas as TOUCH commands by the shard as a result of a READ command that was processed; Calculate the throughput for a time period by comparing the value at different times | -| redis_total_commands_processed | Number of commands processed by the shard; Calculate the number of commands for a time period by comparing the value at different times | -| redis_total_connections_received | Number of connections received by the shard; Calculate the number of connections for a time period by comparing the value at different times | -| redis_total_net_input_bytes | Number of bytes received by the shard; Calculate the throughput for a time period by comparing the value at different times | -| redis_total_net_output_bytes | Number of bytes sent by the shard; Calculate the throughput for a time period by comparing the value at different times | -| redis_up | Shard is up and running | -| redis_used_memory | Memory used by shard (in bigredis this includes flash) (bytes) | +| :-------- | :---------- | +| redis_server_active_defrag_running | Automatic memory defragmentation current aggressiveness (% cpu) | +| redis_server_allocator_active | Total used memory, including external fragmentation | +| redis_server_allocator_allocated | Total allocated memory | +| redis_server_allocator_resident | Total resident memory (RSS) | +| redis_server_aof_last_cow_size | Last AOFR, CopyOnWrite memory | +| redis_server_aof_rewrite_in_progress | The number of simultaneous AOF rewrites that are in progress | +| redis_server_aof_rewrites | Number of AOF rewrites this process executed | +| redis_server_aof_delayed_fsync | Number of times an AOF fsync caused delays in the main Redis thread (inducing latency); this can indicate that the disk is slow or overloaded | +| redis_server_blocked_clients | Count the clients waiting on a blocking call | +| redis_server_connected_clients | Number of client connections to the specific shard | +| redis_server_connected_slaves | Number of connected replicas | +| redis_server_db0_avg_ttl | Average TTL of all volatile keys | +| redis_server_expired_keys | Total count of volatile keys | +| redis_server_db0_keys | Total key count | +| redis_server_evicted_keys | Keys evicted so far (since restart) | +| redis_server_expire_cycle_cpu_milliseconds | The cumulative amount of time spent on active expiry cycles | +| redis_server_expired_keys | Keys expired so far (since restart) | +| redis_server_forwarding_state | Shard forwarding state (on or off) | +| redis_server_keys_trimmed | The number of keys that were trimmed in the current or last resharding process | +| redis_server_keyspace_read_hits | Number of read operations accessing an existing keyspace | +| redis_server_keyspace_read_misses | Number of read operations accessing a non-existing keyspace | +| redis_server_keyspace_write_hits | Number of write operations accessing an existing keyspace | +| redis_server_keyspace_write_misses | Number of write operations accessing a non-existing keyspace | +| redis_server_master_link_status | Indicates if the replica is connected to its master | +| redis_server_master_repl_offset | Number of bytes sent to replicas by the shard; calculate the throughput for a time period by comparing the value at different times | +| redis_server_master_sync_in_progress | The master shard is synchronizing (1 true | 0 false) | +| redis_server_max_process_mem | Current memory limit configured by redis_mgr according to node free memory | +| redis_server_maxmemory | Current memory limit configured by redis_mgr according to database memory limits | +| redis_server_mem_aof_buffer | Current size of AOF buffer | +| redis_server_mem_clients_normal | Current memory used for input and output buffers of non-replica clients | +| redis_server_mem_clients_slaves | Current memory used for input and output buffers of replica clients | +| redis_server_mem_fragmentation_ratio | Memory fragmentation ratio (1.3 means 30% overhead) | +| redis_server_mem_not_counted_for_evict | Portion of used_memory (in bytes) that's not counted for eviction and OOM error | +| redis_server_mem_replication_backlog | Size of replication backlog | +| redis_server_module_fork_in_progress | A binary value that indicates if there is an active fork spawned by a module (1) or not (0) | +| namedprocess_namegroup_cpu_seconds_total | Shard process CPU usage percentage | +| namedprocess_namegroup_thread_cpu_seconds_total | Shard main thread CPU time spent in seconds | +| namedprocess_namegroup_open_filedesc | Shard number of open file descriptors | +| namedprocess_namegroup_memory_bytes | Shard memory size in bytes | +| namedprocess_namegroup_oldest_start_time_seconds | Shard start time of the process since unix epoch in seconds | +| redis_server_rdb_bgsave_in_progress | Indication if bgsave is currently in progress | +| redis_server_rdb_last_cow_size | Last bgsave (or SYNC fork) used CopyOnWrite memory | +| redis_server_rdb_saves | Total count of bgsaves since the process was restarted (including replica fullsync and persistence) | +| redis_server_repl_touch_bytes | Number of bytes sent to replicas as TOUCH commands by the shard as a result of a READ command that was processed; calculate the throughput for a time period by comparing the value at different times | +| redis_server_total_commands_processed | Number of commands processed by the shard; calculate the number of commands for a time period by comparing the value at different times | +| redis_server_total_connections_received | Number of connections received by the shard; calculate the number of connections for a time period by comparing the value at different times | +| redis_server_total_net_input_bytes | Number of bytes received by the shard; calculate the throughput for a time period by comparing the value at different times | +| redis_server_total_net_output_bytes | Number of bytes sent by the shard; calculate the throughput for a time period by comparing the value at different times | +| redis_server_up | Shard is up and running | +| redis_server_used_memory | Memory used by shard (in BigRedis this includes flash) (bytes) | diff --git a/content/integrate/prometheus-with-redis-enterprise/prometheus-metrics-v1-to-v2.md b/content/integrate/prometheus-with-redis-enterprise/prometheus-metrics-v1-to-v2.md new file mode 100644 index 0000000000..4453785fae --- /dev/null +++ b/content/integrate/prometheus-with-redis-enterprise/prometheus-metrics-v1-to-v2.md @@ -0,0 +1,279 @@ +--- +Title: Transition from Prometheus v1 to Prometheus v2 +alwaysopen: false +categories: +- docs +- integrate +- rs +description: Transition from v1 metrics to v2 PromQL equivalents. +group: observability +linkTitle: Transition from Prometheus v1 to v2 +summary: Transition from v1 metrics to v2 PromQL equivalents. +type: integration +weight: 45 +--- + +You can [integrate Redis Enterprise Software with Prometheus and Grafana]({{}}) to create dashboards for important metrics. + +As of Redis Enterprise Software version 7.8.2, [PromQL (Prometheus Query Language)](https://prometheus.io/docs/prometheus/latest/querying/basics/) metrics are available, and v1 metrics are deprecated. You can use the following tables to transition from v1 metrics to equivalent v2 PromQL. For a list of all available v2 PromQL metrics, see [Prometheus metrics v2]({{}}). + +## Database metrics + +| V1 metric | Equivalent V2 PromQL | Description | +| --------- | :------------------- | :---------- | +| bdb_avg_latency | `sum by (bdb) (irate(endpoint_acc_latency[1m])) / sum by (bdb) (irate(endpoint_total_started_res[1m])) / 1000000` | Average latency of operations on the database (seconds); returned only when there is traffic | +| bdb_avg_latency_max | `sum by (bdb) (irate(endpoint_acc_latency[1m])) / sum by (bdb) (irate(endpoint_total_started_res[1m])) / 1000000` | Highest value of average latency of operations on the database (seconds); returned only when there is traffic | +| bdb_avg_read_latency | `sum by (bdb) (irate(endpoint_acc_read_latency[1m])) / sum by (bdb) (irate(endpoint_total_started_res[1m])) / 1000000` | Average latency of read operations (seconds); returned only when there is traffic | +| bdb_avg_read_latency_max | `sum by (bdb) (irate(endpoint_acc_read_latency[1m])) / sum by (bdb) (irate(endpoint_total_started_res[1m])) / 1000000` | Highest value of average latency of read operations (seconds); returned only when there is traffic | +| bdb_avg_write_latency | `sum by (bdb) (irate(endpoint_acc_write_latency[1m])) / sum by (bdb) (irate(endpoint_total_started_res[1m])) / 1000000` | Average latency of write operations (seconds); returned only when there is traffic | +| bdb_avg_write_latency_max | `sum by (bdb) (irate(endpoint_acc_write_latency[1m])) / sum by (bdb) (irate(endpoint_total_started_res[1m])) / 1000000` | Highest value of average latency of write operations (seconds); returned only when there is traffic | +| bdb_bigstore_shard_count | `sum((sum(label_replace(label_replace(namedprocess_namegroup_thread_count{groupname=~"redis-\d+", threadname=~"(speedb\|rocksdb).*"}, "redis", "$1", "groupname", "redis-(\d+)"), "driver", "$1", "threadname", "(speedb\|rocksdb).*")) by (redis, driver) > bool 0) * on (redis) group_left(bdb) redis_server_up) by (bdb, driver)` | Shard count by database and by storage engine (driver - rocksdb / speedb); Only for databases with Auto Tiering enabled | +| bdb_conns | `sum by(bdb) (endpoint_conns)` | Number of client connections to database | +| bdb_egress_bytes | `sum by(bdb) (irate(endpoint_egress_bytes[1m]))` | Rate of outgoing network traffic from the database (bytes/sec) | +| bdb_egress_bytes_max | `sum by(bdb) (irate(endpoint_egress_bytes[1m]))` | Highest value of the rate of outgoing network traffic from the database (bytes/sec) | +| bdb_evicted_objects | `sum by (bdb) (irate(redis_server_evicted_keys{role="master"}[1m]))` | Rate of key evictions from database (evictions/sec) | +| bdb_evicted_objects_max | `sum by (bdb) (irate(redis_server_evicted_keys{role="master"}[1m]))` | Highest value of the rate of key evictions from database (evictions/sec) | +| bdb_expired_objects | `sum by (bdb) (irate(redis_server_expired_keys{role="master"}[1m]))` | Rate keys expired in database (expirations/sec) | +| bdb_expired_objects_max | `sum by (bdb) (irate(redis_server_expired_keys{role="master"}[1m]))` | Highest value of the rate keys expired in database (expirations/sec) | +| bdb_fork_cpu_system | `sum by (bdb) (irate(namedprocess_namegroup_thread_cpu_seconds_total{mode="system"}[1m]))` | % cores utilization in system mode for all Redis shard fork child processes of this database | +| bdb_fork_cpu_system_max | `sum by (bdb) (irate(namedprocess_namegroup_thread_cpu_seconds_total{mode="system"}[1m]))` | Highest value of % cores utilization in system mode for all Redis shard fork child processes of this database | +| bdb_fork_cpu_user | `sum by (bdb) (irate(namedprocess_namegroup_thread_cpu_seconds_total{mode="user"}[1m]))` | % cores utilization in user mode for all Redis shard fork child processes of this database | +| bdb_fork_cpu_user_max | `sum by (bdb) (irate(namedprocess_namegroup_thread_cpu_seconds_total{mode="user"}[1m]))` | Highest value of % cores utilization in user mode for all Redis shard fork child processes of this database | +| bdb_ingress_bytes | `sum by(bdb) (irate(endpoint_ingress_bytes[1m]))` | Rate of incoming network traffic to database (bytes/sec) | +| bdb_ingress_bytes_max | `sum by(bdb) (irate(endpoint_ingress_bytes[1m]))` | Highest value of the rate of incoming network traffic to database (bytes/sec) | +| bdb_instantaneous_ops_per_sec | `sum by(bdb) (redis_server_instantaneous_ops_per_sec)` | Request rate handled by all shards of database (ops/sec) | +| bdb_main_thread_cpu_system | `sum by(bdb) (irate(namedprocess_namegroup_thread_cpu_seconds_total{mode="system", threadname=~"redis-server.*"}[1m]))` | % cores utilization in system mode for all Redis shard main threads of this database | +| bdb_main_thread_cpu_system_max | `sum by(bdb) (irate(namedprocess_namegroup_thread_cpu_seconds_total{mode="system", threadname=~"redis-server.*"}[1m]))` | Highest value of % cores utilization in system mode for all Redis shard main threads of this database | +| bdb_main_thread_cpu_user | `sum by(irate(namedprocess_namegroup_thread_cpu_seconds_total{mode="user", threadname=~"redis-server.*"}[1m]))` | % cores utilization in user mode for all Redis shard main threads of this database | +| bdb_main_thread_cpu_user_max | `sum by(irate(namedprocess_namegroup_thread_cpu_seconds_total{mode="user", threadname=~"redis-server.*"}[1m]))` | Highest value of % cores utilization in user mode for all Redis shard main threads of this database | +| bdb_mem_frag_ratio | `avg(redis_server_mem_fragmentation_ratio)` | RAM fragmentation ratio (RSS / allocated RAM) | +| bdb_mem_size_lua | `sum by(bdb) (redis_server_used_memory_lua)` | Redis lua scripting heap size (bytes) | +| bdb_memory_limit | `sum by(bdb) (redis_server_maxmemory)` | Configured RAM limit for the database | +| bdb_monitor_sessions_count | `sum by(bdb) (endpoint_monitor_sessions_count)` | Number of clients connected in monitor mode to the database | +| bdb_no_of_keys | `sum by (bdb) (redis_server_db_keys{role="master"})` | Number of keys in database | +| bdb_other_req | `sum by(bdb) (irate(endpoint_other_req[1m]))` | Rate of other (non read/write) requests on the database (ops/sec) | +| bdb_other_req_max | `sum by(bdb) (irate(endpoint_other_req[1m]))` | Highest value of the rate of other (non read/write) requests on the database (ops/sec) | +| bdb_other_res | `sum by(bdb) (irate(endpoint_other_res[1m]))` | Rate of other (non read/write) responses on the database (ops/sec) | +| bdb_other_res_max | `sum by(bdb) (irate(endpoint_other_res[1m]))` | Highest value of the rate of other (non read/write) responses on the database (ops/sec) | +| bdb_pubsub_channels | `sum by(bdb) (redis_server_pubsub_channels)` | Count the pub/sub channels with subscribed clients | +| bdb_pubsub_channels_max | `sum by(bdb) (redis_server_pubsub_channels)` | Highest value of count the pub/sub channels with subscribed clients | +| bdb_pubsub_patterns | `sum by(bdb) (redis_server_pubsub_patterns)` | Count the pub/sub patterns with subscribed clients | +| bdb_pubsub_patterns_max | `sum by(bdb) (redis_server_pubsub_patterns)` | Highest value of count the pub/sub patterns with subscribed clients | +| bdb_read_hits | `sum by (bdb) (irate(redis_server_keyspace_read_hits{role="master"}[1m]))` | Rate of read operations accessing an existing key (ops/sec) | +| bdb_read_hits_max | `sum by (bdb) (irate(redis_server_keyspace_read_hits{role="master"}[1m]))` | Highest value of the rate of read operations accessing an existing key (ops/sec) | +| bdb_read_misses | `sum by (bdb) (irate(redis_server_keyspace_read_misses{role="master"}[1m]))` | Rate of read operations accessing a non-existing key (ops/sec) | +| bdb_read_misses_max | `sum by (bdb) (irate(redis_server_keyspace_read_misses{role="master"}[1m]))` | Highest value of the rate of read operations accessing a non-existing key (ops/sec) | +| bdb_read_req | `sum by (bdb) (irate(endpoint_read_req[1m]))` | Rate of read requests on the database (ops/sec) | +| bdb_read_req_max | `sum by (bdb) (irate(endpoint_read_req[1m]))` | Highest value of the rate of read requests on the database (ops/sec) | +| bdb_read_res | `sum by(bdb) (irate(endpoint_read_res[1m]))` | Rate of read responses on the database (ops/sec) | +| bdb_read_res_max | `sum by(bdb) (irate(endpoint_read_res[1m]))` | Highest value of the rate of read responses on the database (ops/sec) | +| bdb_shard_cpu_system | `sum by(bdb) (irate(namedprocess_namegroup_thread_cpu_seconds_total{mode="system", role="master"}[1m]))` | % cores utilization in system mode for all Redis shard processes of this database | +| bdb_shard_cpu_system_max | `sum by(bdb) (irate(namedprocess_namegroup_thread_cpu_seconds_total{mode="system", role="master"}[1m]))` | Highest value of % cores utilization in system mode for all Redis shard processes of this database | +| bdb_shard_cpu_user | `sum by(bdb) (irate(namedprocess_namegroup_thread_cpu_seconds_total{mode="user", role="master"}[1m]))` | % cores utilization in user mode for the Redis shard process | +| bdb_shard_cpu_user_max | `sum by(bdb) (irate(namedprocess_namegroup_thread_cpu_seconds_total{mode="user", role="master"}[1m]))` | Highest value of % cores utilization in user mode for the Redis shard process | +| bdb_shards_used | `sum((sum(label_replace(label_replace(label_replace(namedprocess_namegroup_thread_count{groupname=~"redis-\d+"}, "redis", "$1", "groupname", "redis-(\d+)"), "shard_type", "flash", "threadname", "(bigstore).*"), "shard_type", "ram", "shard_type", "")) by (redis, shard_type) > bool 0) * on (redis) group_left(bdb) redis_server_up) by (bdb, shard_type)` | Used shard count by database and by shard type (ram / flash) | +| bdb_total_connections_received | `sum by(bdb) (irate(endpoint_total_connections_received[1m]))` | Rate of new client connections to database (connections/sec) | +| bdb_total_connections_received_max | `sum by(bdb) (irate(endpoint_total_connections_received[1m]))` | Highest value of the rate of new client connections to database (connections/sec) | +| bdb_total_req | `sum by (bdb) (irate(endpoint_total_req[1m]))` | Rate of all requests on the database (ops/sec) | +| bdb_total_req_max | `sum by (bdb) (irate(endpoint_total_req[1m]))` | Highest value of the rate of all requests on the database (ops/sec) | +| bdb_total_res | `sum by(bdb) (irate(endpoint_total_res[1m]))` | Rate of all responses on the database (ops/sec) | +| bdb_total_res_max | `sum by(bdb) (irate(endpoint_total_res[1m]))` | Highest value of the rate of all responses on the database (ops/sec) | +| bdb_up | `min by(bdb) (redis_up)` | Database is up and running | +| bdb_used_memory | `sum by (bdb) (redis_server_used_memory)` | Memory used by database (in BigRedis this includes flash) (bytes) | +| bdb_write_hits | `sum by (bdb) (irate(redis_server_keyspace_write_hits{role="master"}[1m]))` | Rate of write operations accessing an existing key (ops/sec) | +| bdb_write_hits_max | `sum by (bdb) (irate(redis_server_keyspace_write_hits{role="master"}[1m]))` | Highest value of the rate of write operations accessing an existing key (ops/sec) | +| bdb_write_misses | `sum by (bdb) (irate(redis_server_keyspace_write_misses{role="master"}[1m]))` | Rate of write operations accessing a non-existing key (ops/sec) | +| bdb_write_misses_max | `sum by (bdb) (irate(redis_server_keyspace_write_misses{role="master"}[1m]))` | Highest value of the rate of write operations accessing a non-existing key (ops/sec) | +| bdb_write_req | `sum by (bdb) (irate(endpoint_write_req[1m]))` | Rate of write requests on the database (ops/sec) | +| bdb_write_req_max | `sum by (bdb) (irate(endpoint_write_req[1m]))` | Highest value of the rate of write requests on the database (ops/sec) | +| bdb_write_res | `sum by(bdb) (irate(endpoint_write_responses[1m]))` | Rate of write responses on the database (ops/sec) | +| bdb_write_res_max | `sum by(bdb) (irate(endpoint_write_responses[1m]))` | Highest value of the rate of write responses on the database (ops/sec) | +| no_of_expires | `sum by(bdb) (redis_server_db_expires{role="master"})` | Current number of volatile keys in the database | + +## Node metrics + +| V1 metric | Equivalent V2 PromQL | Description | +| --------- | :------------------- | :---------- | +| node_available_flash | `node_available_flash_bytes` | Available flash in the node (bytes) | +| node_available_flash_no_overbooking | `node_available_flash_no_overbooking_bytes` | Available flash in the node (bytes), without taking into account overbooking | +| node_available_memory | `node_available_memory_bytes` | Amount of free memory in the node (bytes) that is available for database provisioning | +| node_available_memory_no_overbooking | `node_available_memory_no_overbooking_bytes` | Available RAM in the node (bytes) without taking into account overbooking | +| node_avg_latency | `sum by (proxy) (irate(endpoint_acc_latency[1m])) / sum by (proxy) (irate(endpoint_total_started_res[1m]))` | Average latency of requests handled by endpoints on the node in milliseconds; returned only when there is traffic | +| node_bigstore_free | `node_bigstore_free_bytes` | Sum of free space of back-end flash (used by flash database's [BigRedis]) on all cluster nodes (bytes); returned only when BigRedis is enabled | +| node_bigstore_iops | `node_flash_reads_total + node_flash_writes_total` | Rate of I/O operations against back-end flash for all shards which are part of a flash-based database (BigRedis) in the cluster (ops/sec); returned only when BigRedis is enabled | +| node_bigstore_kv_ops | `sum by (node) (irate(redis_server_big_io_dels[1m]) + irate(redis_server_big_io_reads[1m]) + irate(redis_server_big_io_writes[1m]))` | Rate of value read/write operations against back-end flash for all shards which are part of a flash-based database (BigRedis) in the cluster (ops/sec); returned only when BigRedis is enabled | +| node_bigstore_throughput | `sum by (node) (irate(redis_server_big_io_read_bytes[1m]) + irate(redis_server_big_io_write_bytes[1m]))` | Throughput I/O operations against back-end flash for all shards which are part of a flash-based database (BigRedis) in the cluster (bytes/sec); returned only when BigRedis is enabled | +| node_cert_expiration_seconds | `node_cert_expires_in_seconds` | Certificate expiration (in seconds) per given node; read more about [certificates in Redis Enterprise]({{< relref "/operate/rs/security/certificates" >}}) and [monitoring certificates]({{< relref "/operate/rs/security/certificates/monitor-certificates" >}}) | +| node_conns | `sum by (node) (endpoint_conns)` | Number of clients connected to endpoints on node | +| node_cpu_idle | `avg by (node) (irate(node_cpu_seconds_total{mode="idle"}[1m]))` | CPU idle time portion (0-1, multiply by 100 to get percent) | +| node_cpu_idle_max | N/A | Highest value of CPU idle time portion (0-1, multiply by 100 to get percent) | +| node_cpu_idle_median | N/A | Average value of CPU idle time portion (0-1, multiply by 100 to get percent) | +| node_cpu_idle_min | N/A | Lowest value of CPU idle time portion (0-1, multiply by 100 to get percent) | +| node_cpu_system | `avg by (node) (irate(node_cpu_seconds_total{mode="system"}[1m]))` | CPU time portion spent in the kernel (0-1, multiply by 100 to get percent) | +| node_cpu_system_max | N/A | Highest value of CPU time portion spent in the kernel (0-1, multiply by 100 to get percent) | +| node_cpu_system_median | N/A | Average value of CPU time portion spent in the kernel (0-1, multiply by 100 to get percent) | +| node_cpu_system_min | N/A | Lowest value of CPU time portion spent in the kernel (0-1, multiply by 100 to get percent) | +| node_cpu_user | `avg by (node) (irate(node_cpu_seconds_total{mode="user"}[1m]))` | CPU time portion spent by user-space processes (0-1, multiply by 100 to get percent) | +| node_cpu_user_max | N/A | Highest value of CPU time portion spent by user-space processes (0-1, multiply by 100 to get percent) | +| node_cpu_user_median | N/A | Average value of CPU time portion spent by user-space processes (0-1, multiply by 100 to get percent) | +| node_cpu_user_min | N/A | Lowest value of CPU time portion spent by user-space processes (0-1, multiply by 100 to get percent) | +| node_cur_aof_rewrites | `sum by (cluster, node) (redis_server_aof_rewrite_in_progress)` | Number of AOF rewrites that are currently performed by shards on this node | +| node_egress_bytes | `irate(node_network_transmit_bytes_total{device=""}[1m])` | Rate of outgoing network traffic to node (bytes/sec) | +| node_egress_bytes_max | N/A | Highest value of the rate of outgoing network traffic to node (bytes/sec) | +| node_egress_bytes_median | N/A | Average value of the rate of outgoing network traffic to node (bytes/sec) | +| node_egress_bytes_min | N/A | Lowest value of the rate of outgoing network traffic to node (bytes/sec) | +| node_ephemeral_storage_avail | `node_ephemeral_storage_avail_bytes` | Disk space available to RLEC processes on configured ephemeral disk (bytes) | +| node_ephemeral_storage_free | `node_ephemeral_storage_free_bytes` | Free disk space on configured ephemeral disk (bytes) | +| node_free_memory | `node_memory_MemFree_bytes` | Free memory in the node (bytes) | +| node_ingress_bytes | `irate(node_network_receive_bytes_total{device=""}[1m])` | Rate of incoming network traffic to node (bytes/sec) | +| node_ingress_bytes_max | N/A | Highest value of the rate of incoming network traffic to node (bytes/sec) | +| node_ingress_bytes_median | N/A | Average value of the rate of incoming network traffic to node (bytes/sec) | +| node_ingress_bytes_min | N/A | Lowest value of the rate of incoming network traffic to node (bytes/sec) | +| node_persistent_storage_avail | `node_persistent_storage_avail_bytes` | Disk space available to RLEC processes on configured persistent disk (bytes) | +| node_persistent_storage_free | `node_persistent_storage_free_bytes` | Free disk space on configured persistent disk (bytes) | +| node_provisional_flash | `node_provisional_flash_bytes` | Amount of flash available for new shards on this node, taking into account overbooking, max Redis servers, reserved flash, and provision and migration thresholds (bytes) | +| node_provisional_flash_no_overbooking | `node_provisional_flash_no_overbooking_bytes` | Amount of flash available for new shards on this node, without taking into account overbooking, max Redis servers, reserved flash, and provision and migration thresholds (bytes) | +| node_provisional_memory | `node_provisional_memory_bytes` | Amount of RAM that is available for provisioning to databases out of the total RAM allocated for databases | +| node_provisional_memory_no_overbooking | `node_provisional_memory_no_overbooking_bytes` | Amount of RAM that is available for provisioning to databases out of the total RAM allocated for databases, without taking into account overbooking | +| node_total_req | `sum by (cluster, node) (irate(endpoint_total_req[1m]))` | Request rate handled by endpoints on node (ops/sec) | +| node_up | `node_metrics_up` | Node is part of the cluster and is connected | + +## Cluster metrics + +| V1 metric | Equivalent V2 PromQL | Description | +| --------- | :------------------- | :---------- | +| cluster_shards_limit | `license_shards_limit` | Total shard limit by the license by shard type (ram / flash) | + +## Proxy metrics + +| V1 metric | Equivalent V2 PromQL | Description | +| --------- | :------------------- | :---------- | +| listener_acc_latency | N/A | Accumulative latency (sum of the latencies) of all types of commands on the database. For the average latency, divide this value by listener_total_res | +| listener_acc_latency_max | N/A | Highest value of accumulative latency of all types of commands on the database | +| listener_acc_other_latency | N/A | Accumulative latency (sum of the latencies) of commands that are a type "other" on the database. For the average latency, divide this value by listener_other_res | +| listener_acc_other_latency_max | N/A | Highest value of accumulative latency of commands that are a type "other" on the database | +| listener_acc_read_latency | N/A | Accumulative latency (sum of the latencies) of commands that are a type "read" on the database. For the average latency, divide this value by listener_read_res | +| listener_acc_read_latency_max | N/A | Highest value of accumulative latency of commands that are a type "read" on the database | +| listener_acc_write_latency | N/A | Accumulative latency (sum of the latencies) of commands that are a type "write" on the database. For the average latency, divide this value by listener_write_res | +| listener_acc_write_latency_max | N/A | Highest value of accumulative latency of commands that are a type "write" on the database | +| listener_auth_cmds | N/A | Number of memcached AUTH commands sent to the database | +| listener_auth_cmds_max | N/A | Highest value of the number of memcached AUTH commands sent to the database | +| listener_auth_errors | N/A | Number of error responses to memcached AUTH commands | +| listener_auth_errors_max | N/A | Highest value of the number of error responses to memcached AUTH commands | +| listener_cmd_flush | N/A | Number of memcached FLUSH_ALL commands sent to the database | +| listener_cmd_flush_max | N/A | Highest value of the number of memcached FLUSH_ALL commands sent to the database | +| listener_cmd_get | N/A | Number of memcached GET commands sent to the database | +| listener_cmd_get_max | N/A | Highest value of the number of memcached GET commands sent to the database | +| listener_cmd_set | N/A | Number of memcached SET commands sent to the database | +| listener_cmd_set_max | N/A | Highest value of the number of memcached SET commands sent to the database | +| listener_cmd_touch | N/A | Number of memcached TOUCH commands sent to the database | +| listener_cmd_touch_max | N/A | Highest value of the number of memcached TOUCH commands sent to the database | +| listener_conns | N/A | Number of clients connected to the endpoint | +| listener_egress_bytes | N/A | Rate of outgoing network traffic to the endpoint (bytes/sec) | +| listener_egress_bytes_max | N/A | Highest value of the rate of outgoing network traffic to the endpoint (bytes/sec) | +| listener_ingress_bytes | N/A | Rate of incoming network traffic to the endpoint (bytes/sec) | +| listener_ingress_bytes_max | N/A | Highest value of the rate of incoming network traffic to the endpoint (bytes/sec) | +| listener_last_req_time | N/A | Time of last command sent to the database | +| listener_last_res_time | N/A | Time of last response sent from the database | +| listener_max_connections_exceeded | `irate(endpoint_maximal_connections_exceeded[1m])` | Number of times the number of clients connected to the database at the same time has exceeded the max limit | +| listener_max_connections_exceeded_max | N/A | Highest value of the number of times the number of clients connected to the database at the same time has exceeded the max limit | +| listener_monitor_sessions_count | N/A | Number of clients connected in monitor mode to the endpoint | +| listener_other_req | N/A | Rate of other (non-read/write) requests on the endpoint (ops/sec) | +| listener_other_req_max | N/A | Highest value of the rate of other (non-read/write) requests on the endpoint (ops/sec) | +| listener_other_res | N/A | Rate of other (non-read/write) responses on the endpoint (ops/sec) | +| listener_other_res_max | N/A | Highest value of the rate of other (non-read/write) responses on the endpoint (ops/sec) | +| listener_other_started_res | N/A | Number of responses sent from the database of type "other" | +| listener_other_started_res_max | N/A | Highest value of the number of responses sent from the database of type "other" | +| listener_read_req | `irate(endpoint_read_requests[1m])` | Rate of read requests on the endpoint (ops/sec) | +| listener_read_req_max | N/A | Highest value of the rate of read requests on the endpoint (ops/sec) | +| listener_read_res | `irate(endpoint_read_responses[1m])` | Rate of read responses on the endpoint (ops/sec) | +| listener_read_res_max | N/A | Highest value of the rate of read responses on the endpoint (ops/sec) | +| listener_read_started_res | N/A | Number of responses sent from the database of type "read" | +| listener_read_started_res_max | N/A | Highest value of the number of responses sent from the database of type "read" | +| listener_total_connections_received | `irate(endpoint_total_connections_received[1m])` | Rate of new client connections to the endpoint (connections/sec) | +| listener_total_connections_received_max | N/A | Highest value of the rate of new client connections to the endpoint (connections/sec) | +| listener_total_req | N/A | Request rate handled by the endpoint (ops/sec) | +| listener_total_req_max | N/A | Highest value of the rate of all requests on the endpoint (ops/sec) | +| listener_total_res | N/A | Rate of all responses on the endpoint (ops/sec) | +| listener_total_res_max | N/A | Highest value of the rate of all responses on the endpoint (ops/sec) | +| listener_total_started_res | N/A | Number of responses sent from the database of all types | +| listener_total_started_res_max | N/A | Highest value of the number of responses sent from the database of all types | +| listener_write_req | `irate(endpoint_write_requests[1m])` | Rate of write requests on the endpoint (ops/sec) | +| listener_write_req_max | N/A | Highest value of the rate of write requests on the endpoint (ops/sec) | +| listener_write_res | `irate(endpoint_write_responses[1m])` | Rate of write responses on the endpoint (ops/sec) | +| listener_write_res_max | N/A | Highest value of the rate of write responses on the endpoint (ops/sec) | +| listener_write_started_res | N/A | Number of responses sent from the database of type "write" | +| listener_write_started_res_max | N/A | Highest value of the number of responses sent from the database of type "write" | + +## Replication metrics + +| V1 metric | Equivalent V2 PromQL | Description | +| --------- | :------------------- | :---------- | +| bdb_replicaof_syncer_ingress_bytes | `rate(replica_src_ingress_bytes[1m])` | Rate of compressed incoming network traffic to a Replica Of database (bytes/sec) | +| bdb_replicaof_syncer_ingress_bytes_decompressed | `rate(replica_src_ingress_bytes_decompressed[1m])` | Rate of decompressed incoming network traffic to a Replica Of database (bytes/sec) | +| bdb_replicaof_syncer_local_ingress_lag_time | `database_syncer_lag_ms{syncer_type="replicaof"}` | Lag time between the source and the destination for Replica Of traffic (ms) | +| bdb_replicaof_syncer_status | `database_syncer_current_status{syncer_type="replicaof"}` | Syncer status for Replica Of traffic; 0 = in-sync, 1 = syncing, 2 = out of sync | +| bdb_crdt_syncer_ingress_bytes | `rate(crdt_src_ingress_bytes[1m])` | Rate of compressed incoming network traffic to CRDB (bytes/sec) | +| bdb_crdt_syncer_ingress_bytes_decompressed | `rate(crdt_src_ingress_bytes_decompressed[1m])` | Rate of decompressed incoming network traffic to CRDB (bytes/sec) | +| bdb_crdt_syncer_local_ingress_lag_time | `database_syncer_lag_ms{syncer_type="crdt"}` | Lag time between the source and the destination (ms) for CRDB traffic | +| bdb_crdt_syncer_status | `database_syncer_current_status{syncer_type="crdt"}` | Syncer status for CRDB traffic; 0 = in-sync, 1 = syncing, 2 = out of sync | + +## Shard metrics + +| V1 metric | Equivalent V2 PromQL | Description | +| --------- | :------------------- | :---------- | +| redis_active_defrag_running | `redis_server_active_defrag_running` | Automatic memory defragmentation current aggressiveness (% cpu) | +| redis_allocator_active | `redis_server_allocator_active` | Total used memory, including external fragmentation | +| redis_allocator_allocated | `redis_server_allocator_allocated` | Total allocated memory | +| redis_allocator_resident | `redis_server_allocator_resident` | Total resident memory (RSS) | +| redis_aof_last_cow_size | `redis_server_aof_last_cow_size` | Last AOFR, CopyOnWrite memory | +| redis_aof_rewrite_in_progress | `redis_server_aof_rewrite_in_progress` | The number of simultaneous AOF rewrites that are in progress | +| redis_aof_rewrites | `redis_server_aof_rewrites` | Number of AOF rewrites this process executed | +| redis_aof_delayed_fsync | `redis_server_aof_delayed_fsync` | Number of times an AOF fsync caused delays in the main Redis thread (inducing latency); this can indicate that the disk is slow or overloaded | +| redis_blocked_clients | `redis_server_blocked_clients` | Count the clients waiting on a blocking call | +| redis_connected_clients | `redis_server_connected_clients` | Number of client connections to the specific shard | +| redis_connected_slaves | `redis_server_connected_slaves` | Number of connected replicas | +| redis_db0_avg_ttl | `redis_server_db0_avg_ttl` | Average TTL of all volatile keys | +| redis_db0_expires | `redis_server_expired_keys` | Total count of volatile keys | +| redis_db0_keys | `redis_server_db0_keys` | Total key count | +| redis_evicted_keys | `redis_server_evicted_keys` | Keys evicted so far (since restart) | +| redis_expire_cycle_cpu_milliseconds | `redis_server_expire_cycle_cpu_milliseconds` | The cumulative amount of time spent on active expiry cycles | +| redis_expired_keys | `redis_server_expired_keys` | Keys expired so far (since restart) | +| redis_forwarding_state | `redis_server_forwarding_state` | Shard forwarding state (on or off) | +| redis_keys_trimmed | `redis_server_keys_trimmed` | The number of keys that were trimmed in the current or last resharding process | +| redis_keyspace_read_hits | `redis_server_keyspace_read_hits` | Number of read operations accessing an existing keyspace | +| redis_keyspace_read_misses | `redis_server_keyspace_read_misses` | Number of read operations accessing a non-existing keyspace | +| redis_keyspace_write_hits | `redis_server_keyspace_write_hits` | Number of write operations accessing an existing keyspace | +| redis_keyspace_write_misses | `redis_server_keyspace_write_misses` | Number of write operations accessing a non-existing keyspace | +| redis_master_link_status | `redis_server_master_link_status` | Indicates if the replica is connected to its master | +| redis_master_repl_offset | `redis_server_master_repl_offset` | Number of bytes sent to replicas by the shard; calculate the throughput for a time period by comparing the value at different times | +| redis_master_sync_in_progress | `redis_server_master_sync_in_progress` | The master shard is synchronizing (1 true | 0 false) | +| redis_max_process_mem | `redis_server_max_process_mem` | Current memory limit configured by redis_mgr according to node free memory | +| redis_maxmemory | `redis_server_maxmemory` | Current memory limit configured by redis_mgr according to database memory limits | +| redis_mem_aof_buffer | `redis_server_mem_aof_buffer` | Current size of AOF buffer | +| redis_mem_clients_normal | `redis_server_mem_clients_normal` | Current memory used for input and output buffers of non-replica clients | +| redis_mem_clients_slaves | `redis_server_mem_clients_slaves` | Current memory used for input and output buffers of replica clients | +| redis_mem_fragmentation_ratio | `redis_server_mem_fragmentation_ratio` | Memory fragmentation ratio (1.3 means 30% overhead) | +| redis_mem_not_counted_for_evict | `redis_server_mem_not_counted_for_evict` | Portion of used_memory (in bytes) that's not counted for eviction and OOM error | +| redis_mem_replication_backlog | `redis_server_mem_replication_backlog` | Size of replication backlog | +| redis_module_fork_in_progress | `redis_server_module_fork_in_progress` | A binary value that indicates if there is an active fork spawned by a module (1) or not (0) | +| redis_process_cpu_system_seconds_total | `namedprocess_namegroup_cpu_seconds_total{mode="system"}` | Shard process system CPU time spent in seconds | +| redis_process_cpu_usage_percent | `namedprocess_namegroup_cpu_seconds_total{mode=~"system\|user"}` | Shard process CPU usage percentage | +| redis_process_cpu_user_seconds_total | `namedprocess_namegroup_cpu_seconds_total{mode="user"}` | Shard user CPU time spent in seconds | +| redis_process_main_thread_cpu_system_seconds_total | `namedprocess_namegroup_thread_cpu_seconds_total{mode="system",threadname="redis-server"}` | Shard main thread system CPU time spent in seconds | +| redis_process_main_thread_cpu_user_seconds_total | `namedprocess_namegroup_thread_cpu_seconds_total{mode="user",threadname="redis-server"}` | Shard main thread user CPU time spent in seconds | +| redis_process_max_fds | `max(namedprocess_namegroup_open_filedesc)` | Shard maximum number of open file descriptors | +| redis_process_open_fds | `namedprocess_namegroup_open_filedesc` | Shard number of open file descriptors | +| redis_process_resident_memory_bytes | `namedprocess_namegroup_memory_bytes{memtype="resident"}` | Shard resident memory size in bytes | +| redis_process_start_time_seconds | `namedprocess_namegroup_oldest_start_time_seconds` | Shard start time of the process since unix epoch in seconds | +| redis_process_virtual_memory_bytes | `namedprocess_namegroup_memory_bytes{memtype="virtual"}` | Shard virtual memory in bytes | +| redis_rdb_bgsave_in_progress | `redis_server_rdb_bgsave_in_progress` | Indication if bgsave is currently in progress | +| redis_rdb_last_cow_size | `redis_server_rdb_last_cow_size` | Last bgsave (or SYNC fork) used CopyOnWrite memory | +| redis_rdb_saves | `redis_server_rdb_saves` | Total count of bgsaves since the process was restarted (including replica fullsync and persistence) | +| redis_repl_touch_bytes | `redis_server_repl_touch_bytes` | Number of bytes sent to replicas as TOUCH commands by the shard as a result of a READ command that was processed; calculate the throughput for a time period by comparing the value at different times | +| redis_total_commands_processed | `redis_server_total_commands_processed` | Number of commands processed by the shard; calculate the number of commands for a time period by comparing the value at different times | +| redis_total_connections_received | `redis_server_total_connections_received` | Number of connections received by the shard; calculate the number of connections for a time period by comparing the value at different times | +| redis_total_net_input_bytes | `redis_server_total_net_input_bytes` | Number of bytes received by the shard; calculate the throughput for a time period by comparing the value at different times | +| redis_total_net_output_bytes | `redis_server_total_net_output_bytes` | Number of bytes sent by the shard; calculate the throughput for a time period by comparing the value at different times | +| redis_up | `redis_server_up` | Shard is up and running | +| redis_used_memory | `redis_server_used_memory` | Memory used by shard (in BigRedis this includes flash) (bytes) | diff --git a/content/integrate/redis-data-integration/architecture.md b/content/integrate/redis-data-integration/architecture.md index f00c12a61d..2b558ee5d3 100644 --- a/content/integrate/redis-data-integration/architecture.md +++ b/content/integrate/redis-data-integration/architecture.md @@ -136,14 +136,29 @@ traffic. The diagram below shows this configuration: {{< image filename="images/rdi/ingest/ingest-active-passive-vms.png" >}} +See [Install on VMs]({{< relref "/integrate/redis-data-integration/installation/install-vm" >}}) +for more information. + ### RDI on Kubernetes -You can run RDI in a namespace on your own Kubernetes cluster with -a separate deployment for each of the control plane -components (REST API, operator, and metrics exporter). The operator -creates and configures deployments for the collector and stream processor -when you start a pipeline from the CLI tool. This means that you must -provide the operator with a service account that has permissions to create and manipulate pods in the namespace. +You can use the RDI [Helm chart](https://helm.sh/docs/topics/charts/) to install +on [Kubernetes (K8s)](https://kubernetes.io/), including Red Hat +[OpenShift](https://docs.openshift.com/). This creates: + +- A K8s [namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) named `rdi`. +- [Deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) for the + [RDI operator]({{< relref "/integrate/redis-data-integration/architecture#how-rdi-is-deployed" >}}), + [metrics exporter]({{< relref "/integrate/redis-data-integration/observability" >}}), and API server. +- A [service account](https://kubernetes.io/docs/concepts/security/service-accounts/) along with a + [role](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#restrictions-on-role-creation-or-update) + and [role binding](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding) for the RDI operator. +- A [Configmap](https://kubernetes.io/docs/concepts/configuration/configmap/) + for the different components with RDI Redis database details. +- [Secrets](https://kubernetes.io/docs/concepts/configuration/secret/) + with the RDI Redis database credentials and TLS certificates. + +See [Install on Kubernetes]({{< relref "/integrate/redis-data-integration/installation/install-k8s" >}}) +for more information. ### Secrets and security considerations diff --git a/content/integrate/redis-data-integration/data-pipelines/data-pipelines.md b/content/integrate/redis-data-integration/data-pipelines/data-pipelines.md index 71c3fab461..d43f98c39f 100644 --- a/content/integrate/redis-data-integration/data-pipelines/data-pipelines.md +++ b/content/integrate/redis-data-integration/data-pipelines/data-pipelines.md @@ -328,81 +328,11 @@ find the preparation guides for the databases that RDI supports in the [Prepare source databases]({{< relref "/integrate/redis-data-integration/data-pipelines/prepare-dbs" >}}) section. -## Set secrets - -Before you deploy your pipeline, you must set the authentication secrets for the -source and target databases. Each secret has a corresponding property name that -you can pass to the -[`redis-di set-secret`]({{< relref "/integrate/redis-data-integration/reference/cli/redis-di-set-secret" >}}) -command to set the property's value. You can then refer to these properties -in `config.yaml` using the syntax "`${PROPERTY_NAME}`" -(the sample [config.yaml file](#the-configyaml-file) shows these properties in use). -For example, you would use the -following command line to set the source database username to `myUserName`: - -```bash -redis-di set-secret SOURCE_DB_USERNAME myUserName -``` - -The table below shows the property name for each secret. Note that the -username and password are required for the source and target, but the other -secrets are only relevant to TLS/mTLS connections. - -| Property name | Description | -| :-- | :-- | -| `SOURCE_DB_USERNAME` | Username for the source database | -| `SOURCE_DB_PASSWORD` | Password for the source database | -| `SOURCE_DB_CACERT` | (For TLS only) Source database trust certificate | -| `SOURCE_DB_KEY` | (For mTLS only) Source database private key | -| `SOURCE_DB_CERT` | (For mTLS only) Source database public key | -| `SOURCE_DB_KEY_PASSWORD` | (For mTLS only) Source database private key password | -| `TARGET_DB_USERNAME` | Username for the target database | -| `TARGET_DB_PASSWORD` | Password for the target database | -| `TARGET_DB_CACERT` | (For TLS only) Target database trust certificate | -| `TARGET_DB_KEY` | (For mTLS only) Target database private key | -| `TARGET_DB_CERT` | (For mTLS only) Target database public key | -| `TARGET_DB_KEY_PASSWORD` | (For mTLS only) Target database private key password | - ## Deploy a pipeline -If you are hosting RDI on your own VMs, you can use the -[`deploy`]({{< relref "/integrate/redis-data-integration/reference/cli/redis-di-deploy" >}}) -command to deploy a configuration, including the jobs, once you have created them. - -If your RDI CLI is deployed as a pod in a Kubernetes cluster, you should perform the following -steps to deploy a pipeline: - -- Create a [ConfigMap](https://kubernetes.io/docs/concepts/configuration/configmap/) from the - YAML files in your `jobs` folder: - - ```bash - kubectl create configmap redis-di-jobs --from-file=jobs/ - ``` - -- Deploy your jobs: - - ```bash - kubectl exec -it pod/redis-di-cli -- redis-di deploy - ``` - -{{< note >}}When you create or modify a ConfigMap, it will be available in the `redis-di-cli` pod -after a short delay. Wait around 30 seconds before running the `redis-di deploy` command.{{< /note >}} - -You have two options to update the ConfigMap: - -- For smaller changes, you can edit the ConfigMap directly with this command: - - ```bash - kubectl edit configmap redis-di-jobs - ``` - -- For bigger changes, such as adding another job file, edit the files in your local `jobs` folder and then run this command: - - ```bash - kubectl create configmap redis-di-jobs --from-file=jobs/ --dry-run=client -o yaml | kubectl apply -f - - ``` - -{{< note >}} You must run `kubectl exec -it pod/redis-di-cli -- redis-di deploy` after updating the ConfigMap with either option.{{< /note >}} +When your configuration is ready, you must deploy it to start using the pipeline. See +[Deploy a pipeline]({{< relref "/integrate/redis-data-integration/data-pipelines/deploy" >}}) +to learn how to do this. ## Ingest pipeline lifecycle diff --git a/content/integrate/redis-data-integration/data-pipelines/deploy.md b/content/integrate/redis-data-integration/data-pipelines/deploy.md new file mode 100644 index 0000000000..88e3dcfc45 --- /dev/null +++ b/content/integrate/redis-data-integration/data-pipelines/deploy.md @@ -0,0 +1,67 @@ +--- +Title: Deploy a pipeline +aliases: /integrate/redis-data-integration/ingest/data-pipelines/data-type-handling/ +alwaysopen: false +categories: +- docs +- integrate +- rs +- rdi +description: Learn how to deploy an RDI pipeline +group: di +linkTitle: Deploy +summary: Redis Data Integration keeps Redis in sync with the primary database in near + real time. +type: integration +weight: 2 +--- + +The sections below explain how to deploy a pipeline after you have created the required +[configuration]({{< relref "/integrate/redis-data-integration/data-pipelines/data-pipelines" >}}). + +## Set secrets + +Before you deploy your pipeline, you must set the authentication secrets for the +source and target databases. Each secret has a corresponding property name that +you can pass to the +[`redis-di set-secret`]({{< relref "/integrate/redis-data-integration/reference/cli/redis-di-set-secret" >}}) +command to set the property's value. You can then refer to these properties +in `config.yaml` using the syntax "`${PROPERTY_NAME}`" +(the sample [config.yaml file](#the-configyaml-file) shows these properties in use). +For example, you would use the +following command line to set the source database username to `myUserName`: + +```bash +redis-di set-secret SOURCE_DB_USERNAME myUserName +``` + +The table below shows the property name for each secret. Note that the +username and password are required for the source and target, but the other +secrets are only relevant to TLS/mTLS connections. + +| Property name | Description | +| :-- | :-- | +| `SOURCE_DB_USERNAME` | Username for the source database | +| `SOURCE_DB_PASSWORD` | Password for the source database | +| `SOURCE_DB_CACERT` | (For TLS only) Source database trust certificate | +| `SOURCE_DB_KEY` | (For mTLS only) Source database private key | +| `SOURCE_DB_CERT` | (For mTLS only) Source database public key | +| `SOURCE_DB_KEY_PASSWORD` | (For mTLS only) Source database private key password | +| `TARGET_DB_USERNAME` | Username for the target database | +| `TARGET_DB_PASSWORD` | Password for the target database | +| `TARGET_DB_CACERT` | (For TLS only) Target database trust certificate | +| `TARGET_DB_KEY` | (For mTLS only) Target database private key | +| `TARGET_DB_CERT` | (For mTLS only) Target database public key | +| `TARGET_DB_KEY_PASSWORD` | (For mTLS only) Target database private key password | + +## Deploy a pipeline + +When you have created your configuration, including the [jobs]({{< relref "/integrate/redis-data-integration/data-pipelines/data-pipelines#job-files" >}}), use the +[`redis-di deploy`]({{< relref "/integrate/redis-data-integration/reference/cli/redis-di-deploy" >}}) +command to deploy them: + +```bash +redis-di deploy --dir +``` + +You can also deploy a pipeline using [Redis Insight]({{< relref "/develop/tools/insight/rdi-connector" >}}). diff --git a/content/integrate/redis-data-integration/data-pipelines/prepare-dbs/my-sql-mariadb.md b/content/integrate/redis-data-integration/data-pipelines/prepare-dbs/my-sql-mariadb.md index e4d38f16f1..2b7c097cc7 100644 --- a/content/integrate/redis-data-integration/data-pipelines/prepare-dbs/my-sql-mariadb.md +++ b/content/integrate/redis-data-integration/data-pipelines/prepare-dbs/my-sql-mariadb.md @@ -37,7 +37,11 @@ and then run the following commands: 1. Grant the required permissions to the user: ```sql + # MySQL GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'user' IDENTIFIED BY 'password'; + + # MySQL v8.0 and above + mysql> GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'user'@'localhost'; ``` 1. Finalize the user's permissions: diff --git a/content/integrate/redis-data-integration/installation/_index.md b/content/integrate/redis-data-integration/installation/_index.md index 5655f16f6e..e5753809f0 100644 --- a/content/integrate/redis-data-integration/installation/_index.md +++ b/content/integrate/redis-data-integration/installation/_index.md @@ -17,337 +17,7 @@ type: integration weight: 2 --- -This guide explains how to install Redis Data Integration (RDI) and integrate it with -your source database. - -{{< note >}}We recommend you use RDI v1.2.8 version instead of v1.2.7. -RDI v1.2.7 had a CoreDNS issue. In some installations, the host DNS could not -resolve hostnames for the RDI components. This meant it couldn't connect to the RDI database -and resume the installation. This problem is fixed in v1.2.8. -{{< /note >}} - -## Install RDI on VMs - -You would normally install RDI on two VMs for high availability (HA) but you can also install -one just one VM if you don't need this. For example, you might not need HA during -development and testing. - -{{< note >}}You can't install RDI on a host where a Redis Enterprise cluster -is also installed, due to incompatible network rules. If you want to install RDI on a -host that you have previously used for Redis Enterprise then you must -use [`iptables`](https://www.netfilter.org/projects/iptables/index.html) to -"clean" the host before installation with the following command line: - -```bash - sudo iptables-save | awk '/^[*]/ { print $1 } - /^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; } - /COMMIT/ { print $0; }' | sudo iptables-restore -``` - -You may encounter problems if you use `iptables` v1.6.1 and earlier in -`nftables` mode. Use `iptables` versions later than v1.6.1 or enable the `iptables` -legacy mode with the following commands: - -```bash -update-alternatives --set iptables /usr/sbin/iptables-legacy -update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy -``` - -Also, `iptables` versions 1.8.0-1.8.4 have known issues that can prevent RDI -from working, especially on RHEL 8. Ideally, use `iptables` v1.8.8, which is -known to work correctly with RDI. -{{< /note >}} - -The supported OS versions for RDI are: - -- RHEL 8 & 9 -- Ubuntu 18.04 & 20.04 - -You must run the RDI installer as a privileged user because it installs -[containerd](https://containerd.io/) and registers services. However, you don't -need any special privileges to run RDI processes for normal operation. - -RDI has a few -requirements for cloud VMs that you must implement before running the -RDI installer, or else installation will fail. The following sections -give full pre-installation instructions for [RHEL](#firewall-rhel) and -[Ubuntu](#firewall-ubuntu). - -### RHEL {#firewall-rhel} - -We recommend you turn off -[`firewalld`](https://firewalld.org/documentation/) -before installation using the command: - -```bash -systemctl disable firewalld --now -``` - -However, if you do need to use `firewalld`, you must add the following rules: - -```bash -firewall-cmd --permanent --add-port=6443/tcp #apiserver -firewall-cmd --permanent --zone=trusted --add-source=10.42.0.0/16 #pods -firewall-cmd --permanent --zone=trusted --add-source=10.43.0.0/16 #services -firewall-cmd --reload -``` - -You should also add [port rules](https://firewalld.org/documentation/howto/open-a-port-or-service.html) -for all the [RDI services]({{< relref "/integrate/redis-data-integration/reference/ports" >}}) -you intend to use: - -```bash -firewall-cmd --permanent --add-port=8080/tcp # (Required) rdi-operator/rdi-api -firewall-cmd --permanent --add-port=9090/tcp # vm-dis-reloader -firewall-cmd --permanent --add-port=9092/tcp # prometheus-service -firewall-cmd --permanent --add-port=9121/tcp # rdi-metric-exporter -``` - -{{}}You may also need to add similar rules to open other ports if your setup requires them. -{{}} - -If you have `nm-cloud-setup.service` enabled, you must disable it and reboot the -node with the following commands: - -```bash -systemctl disable nm-cloud-setup.service nm-cloud-setup.timer -reboot -``` - -### Ubuntu {#firewall-ubuntu} - -We recommend you turn off -[Uncomplicated Firewall](https://wiki.ubuntu.com/UncomplicatedFirewall) (`ufw`) -before installation with the command: - -```bash -ufw disable -``` - -However, if you do need to use `ufw`, you must add the following rules: - -```bash -ufw allow 6443/tcp #apiserver -ufw allow from 10.42.0.0/16 to any #pods -ufw allow from 10.43.0.0/16 to any #services -``` - -You should also add [port rules](https://ubuntu.com/server/docs/firewalls) -for all the [RDI services]({{< relref "/integrate/redis-data-integration/reference/ports" >}}) -you intend to use: - -```bash -ufw allow 8080/tcp # (Required) rdi-operator/rdi-api -ufw allow 9090/tcp # vm-dis-reloader -ufw allow 9092/tcp # prometheus-service -ufw allow 9121/tcp # rdi-metric-exporter -``` - -{{}}You may also need to add similar rules to open other ports if your setup requires them. -{{}} - -## Hardware sizing - -RDI is mainly CPU and network bound. -Each of the RDI VMs should have: - -- CPU: A minimum of 4 CPU cores. You should consider adding - 2-6 extra cores on top of this if your dataset is big and you want to ingest the - baseline snapshot as fast as possible. -- RAM: 2GB -- Disk: 25GB of disk (this includes the OS footprint) -- 10GB or more network interface - -## Installation steps - -Follow the steps below for each of your VMs: - -1. Download the RDI installer from the [Redis download center](https://cloud.redis.io/#/rlec-downloads) - (under the *Modules, Tools & Integration* dropdown) - and extract it to your preferred installation folder. - -1. Go to the installation folder: - - ```bash - cd rdi_install/$RDI_VERSION - ``` - -1. Run the installer as a privileged user: - - ```bash - sudo ./install.sh - ``` -RDI uses a database on your Redis Enterprise cluster to store its state -information. *This requires Redis Enterprise v6.4 or greater*. - -The installer gives you instructions to help you create secrets and create your pipeline. -It will ask you for cluster admin credentials during installation. You should supply -these if you want the installer to create the RDI database for you. - -{{}}The installer does not create the RDI Redis database with -[TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security)/ -[mTLS](https://en.wikipedia.org/wiki/Mutual_authentication#mTLS). -If you want to use TLS or other advanced options then you must create the Redis database -yourself using the Redis Enterprise console.{{}} - -If you don’t want the installation to create the RDI database for you: - -- Use the Redis console to create a database with 250MB RAM with 1 primary and 1 replica. -- If you are deploying RDI for a production environment then secure this database with a password - and TLS. -- Provide the installation with the required RDI database details. - -{{< note >}}If you specify `localhost` as the address of the RDI database server during -installation then the connection will fail if the actual IP address changes for the local -VM. For this reason, we recommend that you don't use `localhost` for the address. However, -if you do encounter this problem, you can fix it using the following commands on the VM -that is running RDI itself: - -```bash -sudo k3s kubectl delete nodes --all -sudo service k3s restart -``` -{{< /note >}} - -After the installation is finished, RDI is ready for use. - -## "Silent" installation - -You can use the -[installer script](#installation-steps) or the -[`redis-di install`]({{< relref "/integrate/redis-data-integration/reference/cli/redis-di-install" >}}) -command with the `--file` option (or the shorter version `-f`) to supply answers -to the installer's questions automatically using properties from a -[TOML](https://toml.io/en/) file: - -```bash -./install.sh --file silent.toml -``` - -### Silent install example - -The following TOML file example shows the properties for a typical -silent install configuration: - -```toml -title = "RDI Silent Installer Config" - -scaffold = true -deploy_directory = "/opt/rdi/config" - -# If you are *not* using an existing RDI database and you want -# the installer to create one then remove the properties in this -# section, apart from : -# - `password` -# - `use_existing_rdi` - set this to `false` -# Also, uncomment the [rdi.cluster] section below. -[rdi.database] -host = "localhost" -port = 12001 -username = "username" -password = "password" -use_existing_rdi = true -ssl = true - -# Uncomment this section and remove properties from the -# [rdi.database] section as described above if you -# are *not* using an existing RDI database and you want -# the installer to create one. -# [rdi.cluster] -# host = "localhost" -# port = 9443 -# username = "username" -# password = "password" - - -# Uncomment the properties in this section only if the RDI -# database uses TLS/mTLS. -# [rdi.database.certificates] -# ca = "/home/ubuntu/rdi/certs/ca.crt" -# cert = "/home/ubuntu/rdi/certs/client.crt" -# key = "/home/ubuntu/rdi/certs/client.key" -# passphrase = "foobar" -``` - -The sections below describe the properties in more detail. - -### Silent install properties - -#### Root - -| Property | Description | -|-- |-- | -| `title` | Text to identify the file. RDI doesn't use use this, so you can use any text you like. | -| `high_availability` | Do you want to enable replication on the RDI database (true/false)? You should only use this if you ask the installer to create the RDI database for you. | -| `scaffold` | Do you want to enable [scaffolding]({{< relref "/integrate/redis-data-integration/reference/cli/redis-di-scaffold" >}}) during the install? (true/false) | -| `db_index` | Integer to specify the source database type for scaffolding. The options are 2 (MySQL/MariaDB), 3 (Oracle), 4 (PostgreSQL), and 5 (SQL Server). | -| `deploy_directory` | Path to the directory where you want to store the RDI configuration. | - -#### `rdi.database` - -Use the properties in this section if you want to use an existing RDI database. -See [`rdi.cluster`](#rdicluster) below if you want the installer to create a new -RDI database. However, you should still supply the `password` in this -section and set `use_existing_rdi` to `false` if the installer creates the -database. - -| Property | Description | -|-- |-- | -| `host` | Hostname for the Redis database to store RDI state. | -| `port` | Port for the RDI database. | -| `username` | Username for the RDI database. | -| `password` | Password for the RDI database. | -| `use_existing_rdi` | Do you want to use an existing RDI instance (true) or create a new one (false)? If you enable SSL (see the property below), this will be set to true, overriding the value you specify here. | -| `ssl` | Is SSL enabled for the RDI database (true/false)? If this is false then RDI will ignore the settings in the [`rdi.database.certificates`](#rdidatabasecertificates) section. | - -#### `rdi.cluster` - -Use the properties in this section if you are *not* using an existing RDI database -and you want the installer to create one. -See [`rdi.database`](#rdidatabase) above if you want to use an existing RDI database. - -| Property | Description | -|-- |-- | -| `host` | Hostname of the Redis cluster to use for RDI. | -| `port` | Port for the cluster. | -| `username` | Username for the cluster. | -| `password` | Password for the cluster. | - -#### `rdi.database.certificates` - -Use these properties only if the RDI database requires -[TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security) or -[mTLS](https://en.wikipedia.org/wiki/Mutual_authentication#mTLS). -You must also set `ssl` to `true` in the -[`rdi.database`](#rdidatabase) section to enable these properties. - -| Property | Description | -|-- |-- | -| `ca` | Path to the CA certificate file. | -| `cert` | Path to the client certificate file. | -| `key` | Path to the key file. | -| `passphrase` | Password for the private key (string). | - -## Prepare your source database - -You must also configure your source database to use the Debezium connector for CDC. See the +The guides in this section explain the options you have for installing RDI. +Before you use RDI, you must also configure your source database to use the CDC connector. See the [Prepare source databases]({{< relref "/integrate/redis-data-integration/data-pipelines/prepare-dbs" >}}) -section to learn how to do this. - -## Uninstall RDI - -If you want to remove your RDI installation, go to the installation folder and run -the uninstall script as a privileged user: - -```bash -sudo ./uninstall.sh -``` - -The script will check you are sure before you proceed: - -``` -This will uninstall RDI and its dependencies, are you sure? [y, N] -``` - -If you type anything other than "y" here, the script will abort without making any changes -to RDI or your source database. +section to learn how to do this. \ No newline at end of file diff --git a/content/integrate/redis-data-integration/installation/install-k8s.md b/content/integrate/redis-data-integration/installation/install-k8s.md new file mode 100644 index 0000000000..a2a5915e71 --- /dev/null +++ b/content/integrate/redis-data-integration/installation/install-k8s.md @@ -0,0 +1,469 @@ +--- +Title: Install on Kubernetes +alwaysopen: false +categories: +- docs +- integrate +- rs +- rdi +description: Learn how to install RDI on Kubernetes +group: di +hideListLinks: false +linkTitle: Install on K8s +summary: Redis Data Integration keeps Redis in sync with the primary database in near + real time. +type: integration +weight: 2 +--- + +This guide explains how to use the RDI [Helm chart](https://helm.sh/docs/topics/charts/) +to install on [Kubernetes](https://kubernetes.io/) (K8s). You can also +[Install RDI on VMs]({{< relref "/integrate/redis-data-integration/installation/install-vm" >}}). + +The installation creates the following K8s objects: + +- A K8s [namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) named `rdi`. +- [Deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) for the + [RDI operator]({{< relref "/integrate/redis-data-integration/architecture#how-rdi-is-deployed" >}}), + [metrics exporter]({{< relref "/integrate/redis-data-integration/observability" >}}), and API server. +- A [service account](https://kubernetes.io/docs/concepts/security/service-accounts/) along with a + [role](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#restrictions-on-role-creation-or-update) + and [role binding](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding) for the RDI operator. +- A [Configmap](https://kubernetes.io/docs/concepts/configuration/configmap/) + for the different components with RDI Redis database details. +- [Secrets](https://kubernetes.io/docs/concepts/configuration/secret/) + with the RDI Redis database credentials and TLS certificates. + +You can use this installation on [OpenShift](https://docs.openshift.com/) and other K8s distributions +including cloud providers' K8s managed clusters. + +You can pull the RDI images from +[Docker Hub](https://hub.docker.com/) or from your own [private image registry](#using-a-private-image-registry). + +## Before you install + +Complete the following steps before running Helm: + +- [Create the RDI database](#create-the-rdi-database) on your Redis Enterprise cluster. +- Create a [user]({{< relref "/operate/rs/security/access-control/create-users" >}}) + for the RDI database if you prefer not to use the default password (see + [Access control]({{< relref "/operate/rs/security/access-control" >}}) for + more information). +- Download the RDI helm chart tar file from the [download center](https://cloud.redis.io/#rlec-downloads). +- If you want to use a private image registry, + [prepare it with the RDI images](#using-a-private-image-registry). + +### Create the RDI database + +RDI uses a database on your Redis Enterprise cluster to store its state +information. *This requires Redis Enterprise v6.4 or greater*. + +- Use the Redis console to create a database with 250MB RAM with one primary and one replica. +- If you are deploying RDI for a production environment then secure this database with a password + and [TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security). + +You should then provide the details of this database in the [`values.yaml`](#the-valuesyaml-file) +file as described below. + +### Using a private image registry + +Add the RDI images from [Docker Hub](https://hub.docker.com/) to your local registry. +The example below shows how to specify the registry and image pull secret in the +[`values.yaml`](#the-valuesyaml-file) file for the Helm chart: + +```yaml +global: + imagePullSecrets: [] + # - name: "image-pull-secret" + + image: + registry: docker.io + repository: redis +``` + +To pull images from a local registry, you must provide the image pull secret and in some cases also set the permissions. Follow the links below to learn how to use a private registry with: + +- [Rancher](https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/kubernetes-resources-setup/kubernetes-and-docker-registries#using-a-private-registry) +- [OpenShift](https://docs.openshift.com/container-platform/4.17/openshift_images/managing_images/using-image-pull-secrets.html) +- [Amazon Elastic Kubernetes Service (EKS)](https://docs.aws.amazon.com/AmazonECR/latest/userguide/ECR_on_EKS.html) +- [Google Kubernetes Engine (GKE)](https://cloud.google.com/artifact-registry/docs/pull-cached-dockerhub-images) +- [Azure Kubernetes Service (AKS)](https://learn.microsoft.com/en-us/azure/aks/cluster-container-registry-integration?tabs=azure-cli) + +## Install the RDI Helm chart + +1. Decompress the tar file: + + ```bash + tar -xvf rdi-k8s-.tar.gz + ``` + +1. Open the `values.yaml` file and set the appropriate values for your installation + (see [The `values.yaml` file](#the-valuesyaml-file) below for the full set of + available values). + +1. Start the installation: + + ```bash + helm install rdi-k8s//helm --create-namespace -n rdi + ``` + +### The `values.yaml` file + +The annotated [`values.yaml`](https://helm.sh/docs/topics/charts/#templates-and-values) +file below describes the values you can set for the RDI Helm installation: + +```yaml +# Default RDI values in YAML format. +# Variables to template configuration. + +global: + # Set this property when using a private image repository. + # Provide an array of image pull secrets. + # Example: + # imagePullSecrets: + # - name: pullSecret1 + # - name: pullSecret2 + imagePullSecrets: + - name: docker-config-jfrog + + # DO NOT modify this value. + vmMode: false + + # Indicates whether the deployment is intended for an OpenShift environment. + openShift: false + + image: + # Overrides the image tag for all RDI components. + tag: 0.0.0 + + # If using a private repository, update the default values accordingly. + # Docker registry. + registry: docker.io + + # Docker image repository. + repository: redis + + # Configuration for the RDI ConfigMap. + rdiSysConfig: + # Log level for all RDI components. Valid options: DEBUG, INFO, ERROR. + # If specific component log levels are not set, this value will be used. + RDI_LOG_LEVEL: INFO + + # Log level for the RDI API. Valid options: DEBUG, INFO, ERROR. + # If not set, RDI_LOG_LEVEL will be used. + # RDI_LOG_LEVEL_API: INFO + + # Log level for the RDI Operator. Valid options: DEBUG, INFO, ERROR. + # If not set, RDI_LOG_LEVEL will be used. + # RDI_LOG_LEVEL_OPERATOR: INFO + + # Log level for the RDI processor. Valid options: DEBUG, INFO, ERROR. + # If not set, RDI_LOG_LEVEL will be used. + # RDI_LOG_LEVEL_PROCESSOR: INFO + + # Specifies whether the RDI is configured to use TLS. + RDI_REDIS_SSL: false + + # RDI_IMAGE_REPO: redis + + # This value must be set to the same tag as global.image.tag. + # RDI_IMAGE_TAG: "" + + # If using a private repository, set this value to the same secret name as in global.imagePullSecrets. + # RDI_IMAGE_PULL_SECRET: [] + + # The service IP of the RDI database. + # RDI_REDIS_HOST: "" + + # The port for the RDI database. + # RDI_REDIS_PORT: "" + + # Enable authentication for the RDI API. + # RDI_API_AUTH_ENABLED: "1" + + # Specifies whether the API Collector should be deployed. + # RDI_API_COLLECTOR_ENABLED: "0" + + # Configuration for the RDI Secret. + rdiSysSecret: + # Username and password for RDI database. + # If using the default password, keep the username as an empty string. + # RDI_REDIS_USERNAME: "" + # RDI_REDIS_PASSWORD: "" + + # Uncomment this property when using a TLS connection from RDI to its Redis database. + # DO NOT modify this value. + # RDI_REDIS_CACERT: /etc/certificates/rdi_db/cacert + + # Uncomment these properties when using a TLS connection from RDI to its Redis database. + # DO NOT modify these values. + # RDI_REDIS_CERT: /etc/certificates/rdi_db/cert + # RDI_REDIS_KEY: /etc/certificates/rdi_db/key + + # The passphrase used to get the private key stored in the secret store when using mTLS. + # RDI_REDIS_KEY_PASSPHRASE: "" + + # The key used to encrypt the JWT token used by RDI API. + # JWT_SECRET_KEY: "" + + rdiDbSSLSecret: + # Set to `true` when using a TLS connection from RDI to its Redis database. + enabled: false + + # The content of the CA certificate PEM file. + # Uncomment and set this property when using a TLS connection from RDI to its Redis database. + # cacert: "" + + # The content of the certificate PEM file. + # Uncomment and set this property when using a TLS connection from RDI to its Redis database. + # cert: "" + + # The content of the private key PEM file. + # Uncomment and set this property when using a TLS connection from RDI to its Redis database. + # key: "" + + # Container default security context. + # ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container + securityContext: + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 1000 + allowPrivilegeEscalation: false + +# Set `isOpenshift` to `true` if deploying on OpenShift. +reloader: + reloader: + isOpenshift: false + deployment: + containerSecurityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + securityContext: + runAsUser: null + +# Configuration of the RDI Operator. +operator: + image: + name: rdi-operator + + # Specify an imagePullPolicy. + # ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images + pullPolicy: IfNotPresent + + # Extra optional options for liveness probe. + # ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ + liveness: + failureThreshold: 6 + periodSeconds: 10 + + # Extra optional options for readiness probe. + # ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ + readiness: + failureThreshold: 6 + periodSeconds: 30 + + # Extra optional options for startup probe. + # ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ + startup: + failureThreshold: 60 + periodSeconds: 5 + +fluentd: + image: + name: rdi-fluentd + + # Specify an imagePullPolicy. + # ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images + pullPolicy: IfNotPresent + + rdiLogsHostPath: "/opt/rdi/logs" + podLogsHostPath: "/var/log/pods" + logrotateMinutes: "5" + +rdiMetricsExporter: + image: + name: rdi-monitor + + # Specify an imagePullPolicy. + # ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images + pullPolicy: IfNotPresent + + # The RDI metrics service is set to ClusterIP, allowing access only from within the cluster. + # ref: http://kubernetes.io/docs/user-guide/services/ + service: + protocol: TCP + port: 9121 + targetPort: 9121 + type: ClusterIP + + # Configure extra options for liveness probe. + # ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes + liveness: + failureThreshold: 6 + periodSeconds: 10 + + # Configure extra options for readiness probe. + # ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes + readiness: + failureThreshold: 6 + periodSeconds: 30 + + # Configure extra options for startupProbe. + # ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes + startup: + failureThreshold: 60 + periodSeconds: 5 + + # Configuration for the ServiceMonitor, which is used to scrape metrics from the RDI metrics service. + serviceMonitor: + # Set to `true` to activate the ServiceMonitor. + enabled: false + + # The endpoint from which Prometheus will scrape metrics. + path: /metrics + +# Configuration of the RDI API. +apiServer: + image: + name: rdi-api + + # Specify an imagePullPolicy. + # ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images + pullPolicy: IfNotPresent + + # The RDI API service is set to ClusterIP, allowing access only from within the cluster. + # ref: http://kubernetes.io/docs/user-guide/services/ + service: + type: ClusterIP + name: rdi-api + port: 8080 + targetPort: 8081 + + # Configure extra options for liveness probe. + # ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes + liveness: + failureThreshold: 6 + periodSeconds: 10 + + # Configure extra options for readiness probe. + # ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes + readiness: + failureThreshold: 6 + periodSeconds: 30 + + # Configure extra options for startupProbe. + # ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes + startup: + failureThreshold: 60 + periodSeconds: 5 + +# Expose the RDI API service to be accessed from outside the cluster. +# ref: http://kubernetes.io/docs/user-guide/services/ +ingress: + # When `enabled` is set to `true`, RDI API Ingress will be created. + enabled: false + + # ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress + # className: "" + + # Ingress resources configure routes based on the requested host. + # The optional Host field defines the hosts for routing. If omitted, it matches all hosts. + # Example: + # hosts: + # - example.com + # - another-example.com + + # Annotations to be added to the IngressClass resource. + # Example: + # annotations: + # kubernetes.io/ingress.class: "nginx" + # nginx.ingress.kubernetes.io/rewrite-target: / + + tls: + # Specifies whether the Ingress should be configured to use TLS. + enabled: false + + # When `enabled` is set to `true`, set this property to the content of the crt file. + # crt: "" + + # When `enabled` is set to `true`, set this property to the content of the key file. + # key: "" + +# When `openShift` is set to `true`, Route will be created automatically. +# Route exposes RDI API outside the cluster. +route: + tls: + # Specifies whether the Route should be configured to use TLS. + enabled: false + + # When `enabled` is set to `true`, set this property to the content of the crt file. + # crt: "" + + # When `enabled` is set to `true`, set this property to the content of the key file. + # key: "" + +collectorSourceMetricsExporter: + # The collector-source metrics service is set to ClusterIP, allowing access only from within the cluster. + # ref: http://kubernetes.io/docs/user-guide/services/ + service: + type: ClusterIP + port: 9092 + targetPort: 19000 + + # Configuration for the ServiceMonitor, which is used to scrape metrics from the collector-source metrics service. + serviceMonitor: + # Set to `true` to activate the ServiceMonitor. + enabled: false + + # The endpoint from which Prometheus will scrape metrics. + path: /metrics +``` + +## Check the installation + +To verify the status of the K8s deployment, run the following command: + +```bash +helm list -n monitoring -n rdi +``` + +The output looks like the following. Check that `` is listed. + +``` +NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION + rdi 1 2024-10-10 16:53... +0300 IDT deployed rdi-1.0.0 +``` + + +Also, check that the following pods have `Running` status: + +```bash +sudo k3s kubectl get pod -n rdi + +NAME READY STATUS RESTARTS AGE +rdi-api- 1/1 Running 0 29m +rdi-metric-l 1/1 Running 0 29m +rdi-operator- 1/1 Running 0 29m +-reloader- 1/1 Running 0 29m +collector-api- 1/1 Running 0 29m +``` + +You can verify that the RDI API works by adding the server in +[Redis Insight]({{< relref "/develop/tools/insight/rdi-connector" >}}). + +## Prepare your source database + +You must also configure your source database to use the CDC connector. See the +[Prepare source databases]({{< relref "/integrate/redis-data-integration/data-pipelines/prepare-dbs" >}}) +section to learn how to do this. + +## Deploy a pipeline + +When the Helm installation is complete, and you have prepared the source database for CDC, +you are ready to start using RDI. See the guides to +[configuring]({{< relref "/integrate/redis-data-integration/data-pipelines/data-pipelines" >}}) and +[deploying]({{< relref "/integrate/redis-data-integration/data-pipelines/deploy" >}}) +RDI pipelines for more information. You can also configure and deploy a pipeline +using [Redis Insight]({{< relref "/develop/tools/insight/rdi-connector" >}}). diff --git a/content/integrate/redis-data-integration/installation/install-vm.md b/content/integrate/redis-data-integration/installation/install-vm.md new file mode 100644 index 0000000000..469c9b6293 --- /dev/null +++ b/content/integrate/redis-data-integration/installation/install-vm.md @@ -0,0 +1,360 @@ +--- +Title: Install on VMs +alwaysopen: false +categories: +- docs +- integrate +- rs +- rdi +description: Learn how to install RDI on one or more VMs +group: di +hideListLinks: false +linkTitle: Install on VMs +summary: Redis Data Integration keeps Redis in sync with the primary database in near + real time. +type: integration +weight: 1 +--- + +This guide explains how to install Redis Data Integration (RDI) on one or more VMs and integrate it with +your source database. You can also +[Install RDI on Kubernetes]({{< relref "/integrate/redis-data-integration/installation/install-k8s" >}}). + +{{< note >}}We recommend you use RDI v1.4.0. The previous version, RDI v1.2.8, +will not work on VMs where IPv6 is disabled. This problem is solved with version 1.4.0. +{{< /note >}} + +## Install RDI on VMs + +You would normally install RDI on two VMs for high availability (HA) but you can also install +one just one VM if you don't need this. For example, you might not need HA during +development and testing. + +{{< note >}}You can't install RDI on a host where a Redis Enterprise cluster +is also installed, due to incompatible network rules. If you want to install RDI on a +host that you have previously used for Redis Enterprise then you must +use [`iptables`](https://www.netfilter.org/projects/iptables/index.html) to +"clean" the host before installation with the following command line: + +```bash + sudo iptables-save | awk '/^[*]/ { print $1 } + /^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; } + /COMMIT/ { print $0; }' | sudo iptables-restore +``` + +You may encounter problems if you use `iptables` v1.6.1 and earlier in +`nftables` mode. Use `iptables` versions later than v1.6.1 or enable the `iptables` +legacy mode with the following commands: + +```bash +update-alternatives --set iptables /usr/sbin/iptables-legacy +update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy +``` + +Also, `iptables` versions 1.8.0-1.8.4 have known issues that can prevent RDI +from working, especially on RHEL 8. Ideally, use `iptables` v1.8.8, which is +known to work correctly with RDI. +{{< /note >}} + +The supported OS versions for RDI are: + +- RHEL 8 & 9 +- Ubuntu 18.04 & 20.04 + +You must run the RDI installer as a privileged user because it installs +[containerd](https://containerd.io/) and registers services. However, you don't +need any special privileges to run RDI processes for normal operation. + +RDI has a few +requirements for cloud VMs that you must implement before running the +RDI installer, or else installation will fail. The following sections +give full pre-installation instructions for [RHEL](#firewall-rhel) and +[Ubuntu](#firewall-ubuntu). + +### RHEL {#firewall-rhel} + +We recommend you turn off +[`firewalld`](https://firewalld.org/documentation/) +before installation using the command: + +```bash +systemctl disable firewalld --now +``` + +However, if you do need to use `firewalld`, you must add the following rules: + +```bash +firewall-cmd --permanent --add-port=6443/tcp #apiserver +firewall-cmd --permanent --zone=trusted --add-source=10.42.0.0/16 #pods +firewall-cmd --permanent --zone=trusted --add-source=10.43.0.0/16 #services +firewall-cmd --reload +``` + +You should also add [port rules](https://firewalld.org/documentation/howto/open-a-port-or-service.html) +for all the [RDI services]({{< relref "/integrate/redis-data-integration/reference/ports" >}}) +you intend to use: + +```bash +firewall-cmd --permanent --add-port=8080/tcp # (Required) rdi-operator/rdi-api +firewall-cmd --permanent --add-port=9090/tcp # vm-dis-reloader +firewall-cmd --permanent --add-port=9092/tcp # prometheus-service +firewall-cmd --permanent --add-port=9121/tcp # rdi-metric-exporter +``` + +{{}}You may also need to add similar rules to open other ports if your setup requires them. +{{}} + +If you have `nm-cloud-setup.service` enabled, you must disable it and reboot the +node with the following commands: + +```bash +systemctl disable nm-cloud-setup.service nm-cloud-setup.timer +reboot +``` + +### Ubuntu {#firewall-ubuntu} + +We recommend you turn off +[Uncomplicated Firewall](https://wiki.ubuntu.com/UncomplicatedFirewall) (`ufw`) +before installation with the command: + +```bash +ufw disable +``` + +However, if you do need to use `ufw`, you must add the following rules: + +```bash +ufw allow 6443/tcp #apiserver +ufw allow from 10.42.0.0/16 to any #pods +ufw allow from 10.43.0.0/16 to any #services +``` + +You should also add [port rules](https://ubuntu.com/server/docs/firewalls) +for all the [RDI services]({{< relref "/integrate/redis-data-integration/reference/ports" >}}) +you intend to use: + +```bash +ufw allow 8080/tcp # (Required) rdi-operator/rdi-api +ufw allow 9090/tcp # vm-dis-reloader +ufw allow 9092/tcp # prometheus-service +ufw allow 9121/tcp # rdi-metric-exporter +``` + +{{}}You may also need to add similar rules to open other ports if your setup requires them. +{{}} + +## Hardware sizing + +RDI is mainly CPU and network bound. +Each of the RDI VMs should have: + +- CPU: A minimum of 4 CPU cores. You should consider adding + 2-6 extra cores on top of this if your dataset is big and you want to ingest the + baseline snapshot as fast as possible. +- RAM: 2GB +- Disk: 25GB of disk (this includes the OS footprint) +- 10GB or more network interface + +## Installation steps + +Follow the steps below for each of your VMs: + +1. Download the RDI installer from the [Redis download center](https://cloud.redis.io/#/rlec-downloads) + (under the *Modules, Tools & Integration* dropdown) + and extract it to your preferred installation folder. + +1. Go to the installation folder: + + ```bash + cd rdi_install/$RDI_VERSION + ``` + +1. Run the installer as a privileged user: + + ```bash + sudo ./install.sh + ``` +RDI uses a database on your Redis Enterprise cluster to store its state +information. *This requires Redis Enterprise v6.4 or greater*. + +The installer gives you instructions to help you create secrets and create your pipeline. +It will ask you for cluster admin credentials during installation. You should supply +these if you want the installer to create the RDI database for you. + +{{}}The installer does not create the RDI Redis database with +[TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security)/ +[mTLS](https://en.wikipedia.org/wiki/Mutual_authentication#mTLS). +If you want to use TLS or other advanced options then you must create the Redis database +yourself using the Redis Enterprise console.{{}} + +If you don’t want the installation to create the RDI database for you: + +- Use the Redis console to create a database with 250MB RAM with 1 primary and 1 replica. +- If you are deploying RDI for a production environment then secure this database with a password + and TLS. +- Provide the installation with the required RDI database details. + +{{< note >}}If you specify `localhost` as the address of the RDI database server during +installation then the connection will fail if the actual IP address changes for the local +VM. For this reason, we recommend that you don't use `localhost` for the address. However, +if you do encounter this problem, you can fix it using the following commands on the VM +that is running RDI itself: + +```bash +sudo k3s kubectl delete nodes --all +sudo service k3s restart +``` +{{< /note >}} + +After the installation is finished, RDI is ready for use. + +## "Silent" installation + +You can use the +[installer script](#installation-steps) or the +[`redis-di install`]({{< relref "/integrate/redis-data-integration/reference/cli/redis-di-install" >}}) +command with the `--file` option (or the shorter version `-f`) to supply answers +to the installer's questions automatically using properties from a +[TOML](https://toml.io/en/) file: + +```bash +./install.sh --file silent.toml +``` + +### Silent install example + +The following TOML file example shows the properties for a typical +silent install configuration: + +```toml +title = "RDI Silent Installer Config" + +scaffold = true +deploy_directory = "/opt/rdi/config" + +# If you are *not* using an existing RDI database and you want +# the installer to create one then remove the properties in this +# section, apart from : +# - `password` +# - `use_existing_rdi` - set this to `false` +# Also, uncomment the [rdi.cluster] section below. +[rdi.database] +host = "localhost" +port = 12001 +username = "username" +password = "password" +use_existing_rdi = true +ssl = true + +# Uncomment this section and remove properties from the +# [rdi.database] section as described above if you +# are *not* using an existing RDI database and you want +# the installer to create one. +# [rdi.cluster] +# host = "localhost" +# port = 9443 +# username = "username" +# password = "password" + + +# Uncomment the properties in this section only if the RDI +# database uses TLS/mTLS. +# [rdi.database.certificates] +# ca = "/home/ubuntu/rdi/certs/ca.crt" +# cert = "/home/ubuntu/rdi/certs/client.crt" +# key = "/home/ubuntu/rdi/certs/client.key" +# passphrase = "foobar" +``` + +The sections below describe the properties in more detail. + +### Silent install properties + +#### Root + +| Property | Description | +|-- |-- | +| `title` | Text to identify the file. RDI doesn't use use this, so you can use any text you like. | +| `high_availability` | Do you want to enable replication on the RDI database (true/false)? You should only use this if you ask the installer to create the RDI database for you. | +| `scaffold` | Do you want to enable [scaffolding]({{< relref "/integrate/redis-data-integration/reference/cli/redis-di-scaffold" >}}) during the install? (true/false) | +| `db_index` | Integer to specify the source database type for scaffolding. The options are 2 (MySQL/MariaDB), 3 (Oracle), 4 (PostgreSQL), and 5 (SQL Server). | +| `deploy_directory` | Path to the directory where you want to store the RDI configuration. | + +#### `rdi.database` + +Use the properties in this section if you want to use an existing RDI database. +See [`rdi.cluster`](#rdicluster) below if you want the installer to create a new +RDI database. However, you should still supply the `password` in this +section and set `use_existing_rdi` to `false` if the installer creates the +database. + +| Property | Description | +|-- |-- | +| `host` | Hostname for the Redis database to store RDI state. | +| `port` | Port for the RDI database. | +| `username` | Username for the RDI database. | +| `password` | Password for the RDI database. | +| `use_existing_rdi` | Do you want to use an existing RDI instance (true) or create a new one (false)? If you enable SSL (see the property below), this will be set to true, overriding the value you specify here. | +| `ssl` | Is SSL enabled for the RDI database (true/false)? If this is false then RDI will ignore the settings in the [`rdi.database.certificates`](#rdidatabasecertificates) section. | + +#### `rdi.cluster` + +Use the properties in this section if you are *not* using an existing RDI database +and you want the installer to create one. +See [`rdi.database`](#rdidatabase) above if you want to use an existing RDI database. + +| Property | Description | +|-- |-- | +| `host` | Hostname of the Redis cluster to use for RDI. | +| `port` | Port for the cluster. | +| `username` | Username for the cluster. | +| `password` | Password for the cluster. | + +#### `rdi.database.certificates` + +Use these properties only if the RDI database requires +[TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security) or +[mTLS](https://en.wikipedia.org/wiki/Mutual_authentication#mTLS). +You must also set `ssl` to `true` in the +[`rdi.database`](#rdidatabase) section to enable these properties. + +| Property | Description | +|-- |-- | +| `ca` | Path to the CA certificate file. | +| `cert` | Path to the client certificate file. | +| `key` | Path to the key file. | +| `passphrase` | Password for the private key (string). | + +## Prepare your source database + +You must also configure your source database to use the CDC connector. See the +[Prepare source databases]({{< relref "/integrate/redis-data-integration/data-pipelines/prepare-dbs" >}}) +section to learn how to do this. + +## Deploy a pipeline + +When the installation is complete, and you have prepared the source database for CDC, +you are ready to start using RDI. See the guides to +[configuring]({{< relref "/integrate/redis-data-integration/data-pipelines/data-pipelines" >}}) and +[deploying]({{< relref "/integrate/redis-data-integration/data-pipelines/deploy" >}}) +RDI pipelines for more information. You can also configure and deploy a pipeline +using [Redis Insight]({{< relref "/develop/tools/insight/rdi-connector" >}}). + +## Uninstall RDI + +If you want to remove your RDI installation, go to the installation folder and run +the uninstall script as a privileged user: + +```bash +sudo ./uninstall.sh +``` + +The script will check you are sure before you proceed: + +``` +This will uninstall RDI and its dependencies, are you sure? [y, N] +``` + +If you type anything other than "y" here, the script will abort without making any changes +to RDI or your source database. diff --git a/content/integrate/redis-data-integration/quick-start-guide.md b/content/integrate/redis-data-integration/quick-start-guide.md index 4a8dc89400..0717daee80 100644 --- a/content/integrate/redis-data-integration/quick-start-guide.md +++ b/content/integrate/redis-data-integration/quick-start-guide.md @@ -15,7 +15,7 @@ In this tutorial you will learn how to install RDI and set up a pipeline to inge - A Redis Enterprise database that will serve as the pipeline target. The dataset that will be ingested is quite small in size, so a single shard database should be enough. RDI also needs to maintain its own database on the cluster to store state information. *This requires Redis Enterprise v6.4 or greater*. -- [Redis Insight]({{< relref "/develop/connect/insight/" >}}) +- [Redis Insight]({{< relref "/develop/tools/insight" >}}) to edit your pipeline - A virtual machine (VM) with one of the following operating systems: - Ubuntu 20.04 or 22.04 @@ -44,7 +44,7 @@ and is already set up for the RDI collector to use. ### Install RDI Install RDI using the instructions in the -[installation guide]({{< relref "/integrate/redis-data-integration/installation" >}}) +[VM installation guide]({{< relref "/integrate/redis-data-integration/installation/install-vm" >}}). RDI will create the pipeline template for your chosen source database type at `/opt/rdi/config`. You will need this pathname later when you prepare the pipeline for deployment @@ -112,7 +112,8 @@ contexts. ### Deploy the pipeline -You can use Redis Insight to deploy the pipeline by adding a connection to the RDI API +You can use [Redis Insight]({{< relref "/develop/tools/insight/rdi-connector" >}}) +to deploy the pipeline by adding a connection to the RDI API endpoint (which has the same IP address as your RDI VM and uses port 8083) and then clicking the **Deploy** button. You can also deploy it with the following command: ```bash @@ -127,6 +128,9 @@ validates your pipeline and then deploys it if the configuration is correct. Once the pipeline is running, you can use Redis Insight to view the data flow using the pipeline metrics. You can also connect to your target database to see the keys that RDI has written there. +See [Deploy a pipeline]({{< relref "/integrate/redis-data-integration/data-pipelines/deploy" >}}) +for more information about deployment settings. + ### View RDI's response to data changes Once the pipeline has loaded a *snapshot* of all the existing data from the source, @@ -145,4 +149,4 @@ To see the RDI pipeline working in CDC mode: - Run [`redis-di status --live`]({{< relref "/integrate/redis-data-integration/reference/cli/redis-di-status" >}}) to see the flow of records. -- User [Redis Insight]({{< relref "/develop/connect/insight" >}}) to look at the data in the target database. +- User [Redis Insight]({{< relref "/develop/tools/insight" >}}) to look at the data in the target database. diff --git a/content/integrate/redis-data-integration/release-notes/rdi-1-4-0.md b/content/integrate/redis-data-integration/release-notes/rdi-1-4-0.md new file mode 100644 index 0000000000..87d7fbe3a4 --- /dev/null +++ b/content/integrate/redis-data-integration/release-notes/rdi-1-4-0.md @@ -0,0 +1,40 @@ +--- +Title: Redis Data Integration release notes 1.4.0 (October 2024) +alwaysopen: false +categories: +- docs +- operate +- rs +description: Installation on Kubernetes with a Helm chart. Improvements for installation on VMs. +linkTitle: 1.4.0 (October 2024) +toc: 'true' +weight: 997 +--- + +> This is a GA version of Redis Data Integration (RDI) that improves the installation of RDI. + +RDI’s mission is to help Redis customers sync Redis Enterprise with live data from their slow disk-based databases to: + +- Meet the required speed and scale of read queries and provide an excellent and predictable user experience. +- Save resources and time when building pipelines and coding data transformations. +- Reduce the total cost of ownership by saving money on expensive database read replicas. + +RDI keeps the Redis cache up to date with changes in the primary database, using a [_Change Data Capture (CDC)_](https://en.wikipedia.org/wiki/Change_data_capture) mechanism. +It also lets you _transform_ the data from relational tables into convenient and fast data structures that match your app's requirements. You specify the transformations using a configuration system, so no coding is required. + +## Headlines + +- Installation on [Kubernetes]({{< relref "/integrate/redis-data-integration/installation/install-k8s" >}}) using a [Helm chart](https://helm.sh/docs/). You can install on [OpenShift](https://docs.openshift.com/) or other flavours of K8s using Helm. + +- Improvements for installation on VMs: + - Installer checks if the OS firewall is enabled on Ubuntu and RHEL. + - Installer verifies DNS resolution from RDI components. + - Installer provides log lines from components that failed during RDI deployment if a problem occurs. + - Improved verification of RDI installation. + - Installer verifies if the RDI database is in use by another instance of RDI. + - Installer checks and warns if any [`iptables`](https://www.netfilter.org/projects/iptables/index.html) rules are set. + - Improved message when RDI tries to connect to its Redis database with invalid TLS keys. + +## Limitations + +RDI can write data to a Redis Active-Active database. However, it doesn't support writing data to two or more Active-Active replicas. Writing data from RDI to several Active-Active replicas could easily harm data integrity as RDI is not synchronous with the source database commits. diff --git a/content/integrate/redis-data-integration/release-notes/rdi-1-4-1.md b/content/integrate/redis-data-integration/release-notes/rdi-1-4-1.md new file mode 100644 index 0000000000..fb33545831 --- /dev/null +++ b/content/integrate/redis-data-integration/release-notes/rdi-1-4-1.md @@ -0,0 +1,46 @@ +--- +Title: Redis Data Integration release notes 1.4.1 (November 2024) +alwaysopen: false +categories: +- docs +- operate +- rs +description: Installation on Kubernetes with a Helm chart. Improvements for installation on VMs. +linkTitle: 1.4.1 (November 2024) +toc: 'true' +weight: 996 +--- + +> This maintenance release replaces the 1.4.0 release. + +RDI’s mission is to help Redis customers sync Redis Enterprise with live data from their slow disk-based databases to: + +- Meet the required speed and scale of read queries and provide an excellent and predictable user experience. +- Save resources and time when building pipelines and coding data transformations. +- Reduce the total cost of ownership by saving money on expensive database read replicas. + +RDI keeps the Redis cache up to date with changes in the primary database, using a [_Change Data Capture (CDC)_](https://en.wikipedia.org/wiki/Change_data_capture) mechanism. +It also lets you _transform_ the data from relational tables into convenient and fast data structures that match your app's requirements. You specify the transformations using a configuration system, so no coding is required. + +## Headlines + +- Installation on [Kubernetes]({{< relref "/integrate/redis-data-integration/installation/install-k8s" >}}) using a [Helm chart](https://helm.sh/docs/). You can install on [OpenShift](https://docs.openshift.com/) or other flavours of K8s using Helm. + +- Improvements for installation on VMs: + - Installer checks if the OS firewall is enabled on Ubuntu and RHEL. + - Installer verifies DNS resolution from RDI components. + - Installer provides log lines from components that failed during RDI deployment if a problem occurs. + - Improved verification of RDI installation. + - Installer verifies if the RDI database is in use by another instance of RDI. + - Installer checks and warns if any [`iptables`](https://www.netfilter.org/projects/iptables/index.html) rules are set. + - Improved message when RDI tries to connect to its Redis database with invalid TLS keys. + +## Issues fixed + +- **RDSC-2806**: Remove incorrectly created deployment. +- **RDSC-2792**: Disable `kubectl run` checks. +- **RDSC-2782**: Fix `coredns` issue. + +## Limitations + +RDI can write data to a Redis Active-Active database. However, it doesn't support writing data to two or more Active-Active replicas. Writing data from RDI to several Active-Active replicas could easily harm data integrity as RDI is not synchronous with the source database commits. diff --git a/content/integrate/redis-py/_index.md b/content/integrate/redis-py/_index.md index a59b6fa57f..ec71ffdf81 100644 --- a/content/integrate/redis-py/_index.md +++ b/content/integrate/redis-py/_index.md @@ -18,4 +18,4 @@ weight: 1 Connect your Python application to a Redis database using the redis-py client library. -Refer to the complete [Python guide]({{< relref "/develop/connect/clients/python" >}}) to install, connect, and use redis-py. +Refer to the complete [Python guide]({{< relref "/develop/clients/redis-py" >}}) to install, connect, and use redis-py. diff --git a/content/integrate/redisom-for-java/_index.md b/content/integrate/redisom-for-java/_index.md index bff5f89740..c084e386a8 100644 --- a/content/integrate/redisom-for-java/_index.md +++ b/content/integrate/redisom-for-java/_index.md @@ -25,7 +25,7 @@ Redis OM Spring provides a robust repository and custom object-mapping abstracti ## What you’ll need: * Redis Stack: See [{{< relref "/operate/oss_and_stack/install/install-stack/" >}}]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) -* [Redis Insight]({{< relref "/develop/connect/insight/" >}}) +* [Redis Insight]({{< relref "/develop/tools/insight" >}}) * Your favorite browser * Java 11 or greater diff --git a/content/operate/kubernetes/architecture/_index.md b/content/operate/kubernetes/architecture/_index.md index d7658d9b3f..d2d72f0615 100644 --- a/content/operate/kubernetes/architecture/_index.md +++ b/content/operate/kubernetes/architecture/_index.md @@ -5,44 +5,155 @@ categories: - docs - operate - kubernetes -description: This section provides an overview of the architecture and considerations - for Redis Enterprise for Kubernetes. +description: Overview of the architecture and components of Redis Enterprise for Kubernetes. hideListLinks: true linkTitle: Architecture -weight: 11 +weight: 1 +aliases: [operate/platforms/kubernetes/kubernetes-architecture/] --- -Redis bases its Kubernetes architecture on several vital concepts. -## Layered architecture +Redis Enterprise for Kubernetes gives you the speed and durability of [Redis Enterprise](https://redis.io/redis-enterprise/advantages/), with the flexibility and ease of [Kubernetes (K8s)](https://kubernetes.io/). Redis Enterprise for Kubernetes uses the Kubernetes operator pattern and custom controllers to bring the best of Redis Enterprise to the Kubernetes platform. -Kubernetes is an excellent orchestration tool, but it was not designed to deal with all the nuances associated with operating Redis Enterprise. Therefore, it can fail to react accurately to internal Redis Enterprise edge cases or failure conditions. Also, Kubernetes orchestration runs outside the Redis Cluster deployment and may fail to trigger failover events, for example, in split network scenarios. +## Lifecycle -To overcome these issues, Redis created a layered architecture approach that splits responsibilities between operations Kubernetes does well, procedures Redis Enterprise Cluster excels at, and the processes both can orchestrate together. The figure below illustrated this layered orchestration architecture: +Kubernetes is a rapidly evolving platform with a short release cycle (around 4 months). This frequent influx of new features, enhancements and bug fixes means Kubernetes distributions move in and out of support quickly. Redis Enterprise is also a fast-moving product, and is compatible and tested only on distributions listed as [supported distributions.]({{}}) -{{< image filename="/images/k8s/kubernetes-overview-layered-orchestration.png" >}} +Each version of Redis Enterprise for Kubernetes is tested to ensure the version of Redis Enterprise works with the [supported Kubernetes distributions]({{}}) at the time. Both the Kubernetes version and the Redis Enterprise version must be supported for the operator to function correctly. We encourage you to upgrade Redis Enterprise for Kubernetes frequently, not only to get the benefit of enhancements and bug fixes, but to keep your software supported. -## Operator based deployment +Supported platforms are listed in the [release notes]({{}}) and in the [supported platforms reference.]({{}}) -Operator allows Redis to maintain a unified deployment solution across various Kubernetes environments, i.e., RedHat OpenShift, VMware Tanzu (Tanzu Kubernetes Grid, and Tanzu Kubernetes Grid Integrated Edition, formerly known as PKS), Google Kubernetes Engine (GKE), Azure Kubernetes Service (AKS), and vanilla (upstream) Kubernetes. Statefulset and anti-affinity guarantee that each Redis Enterprise node resides on a Pod that is hosted on a different VM or physical server. See this setup shown in the figure below: +## Architecture -{{< image filename="/images/k8s/kubernetes-overview-unified-deployment.png" >}} +The image below illustrates the components of a single namespace, three node deployment. -## Network-attached persistent storage {#networkattached-persistent-storage} +{{< image filename="/images/k8s/k8s-arch-v4.png" >}} -Kubernetes and cloud-native environments require that storage volumes be network-attached to the compute instances, to guarantee data durability. Otherwise, if using local storage, data may be lost in a Pod failure event. See the figure below: +## Operator -{{< image filename="/images/k8s/kubernetes-overview-network-attached-persistent-storage.png" >}} +An [operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) is a custom extension of the Kubernetes API designed to manage complex, stateful applications and their components. This operator pattern is commonly used by databases and other applications to extend the cluster's behavior without changing its underlying code. Kubernetes.io/docs has a great explanation of the [operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/). -On the left-hand side (marked #1), Redis Enterprise uses local ephemeral storage for durability. When a Pod fails, Kubernetes launches another Pod as a replacement, but this Pod comes up with empty local ephemeral storage, and the data from the original Pod is now lost. +The operator is a deployment that runs within a [namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) and uses [controllers](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#custom-controllers) to manage [custom resources (CRs)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/), ensuring these resources are continuously monitored and maintained. -On the right-hand side of the figure (marked #2), Redis Enterprise uses network-attached storage for data durability. In this case, when a Pod fails, Kubernetes launches another Pod and automatically connects it to the storage device used by the failed Pod. Redis Enterprise then instructs the Redis Enterprise database instance/s running on the newly created node to load the data from the network-attached storage, which guarantees a durable setup. +When the operator is installed, the following resources are created: -Redis Enterprise is not only great as an in-memory database but also extremely efficient in the way it uses persistent storage, even when the user chooses to configure Redis Enterprise to write every change to the disk. Compared to a disk-based database that requires multiple interactions (in most cases) with a storage device for every read or write operation, Redis Enterprise uses a single IOPS, in most cases, for a write operation and zero IOPS for a read operation. As a result, significant performance improvements are seen in typical Kubernetes environments, as illustrated in the figures below: +- [service account](https://kubernetes.io/docs/concepts/security/service-accounts/) under which the operator will run +- set of [roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole) to define the privileges necessary for the operator to perform its tasks +- set of [role bindings](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding) to authorize the service account +- [CustomResourceDefinition (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) for each Redis Enterprise custom resource +- the operator deployment -{{< image filename="/images/k8s/kubernetes-overview-performance-improvements-read.png" >}}{{< image filename="/images/k8s/kubernetes-overview-performance-improvements-write.png" >}} +## Namespace -## Multiple services on each pod +The Redis Enterprise [operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) is deployed within a [namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/). Each namespace can host only one operator and one [RedisEnterpriseCluster (REC)](#redisenterprisecluster-rec). Namespaces create logical boundaries between resources, allowing organization and security. Some resources are limited to a namespace, while others are cluster-wide. -Each Pod includes multiple Redis Enterprise instances (multiple services). We found that the traditional method of deploying a Redis Enterprise database over Kubernetes, in which each Pod includes only a single Redis Enterprise instance while preserving a dedicated CPU, is notably inefficient. Redis Enterprise is exceptionally fast and in many cases can use just a fraction of the CPU resources to deliver the requested throughput. Furthermore, when running a Redis Enterprise Cluster with multiple Redis Enterprise instances across multiple Pods, the Kubernetes network, with its multiple vSwitches, can quickly become the deployment’s bottleneck. Therefore, Redis took a different approach to managing Redis Enterprise over the Kubernetes environment. Deploying multiple Redis Enterprise database instances on a single Pod allows us to better utilize the hardware resources used by the Pod such as CPU, memory, and network while keeping the same level of isolation. See the figure below: +Redis Enterprise for Kubernetes also supports [multi-namespace deployments]({{}}), meaning the operator can monitor other namespaces (that host applications) for custom resources and apply any changes. -{{< image filename="/images/k8s/kubernetes-overview-multiple-services-per-pod.png" >}} +## Custom resources + +Kubernetes [custom resources (CRs)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) are commonly used by databases and other applications to extend the cluster's behavior without changing its underlying code. [Custom resources (CRs)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) extend the Kubernetes API, enabling users to manage Redis databases the Kubernetes way. Custom resources are created and managed using YAML configuration files. + +This [declarative configuration approach](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/declarative-config/) allows you to specify the desired state for your resources, and the operator makes the necessary changes to achieve that state. This simplifies [installation]({{}}), [upgrades]({{}}), and [scaling]({{}}) both vertically and horizontally. + +The operator continuously monitors CRs for changes, automatically reconciling any differences between the desired state you specified in your YAML configuration file, and the actual state of your resources. Custom resources can also reside in separate namespaces from the operator managing them, such as in [multi-namespace installations]({{}}). + +## Custom resource definitions + +A [custom resource definition (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) is a cluster-wide resource that specifies which settings can be configured via custom resource files. Any setting not defined by the CRD is not managed by the operator. You can still make changes to these unmanaged settings using standard Redis Enterprise Software methods. + +For settings managed by the operator, any changes made outside of the CR YAML files (e.g., through the management UI) will be overwritten by the operator. Ensure that all operator-managed settings are updated using the CR YAML files to prevent conflicts. + +## RedisEnterpriseCluster REC + +A Redis Enterprise cluster is a set of Redis Enterprise nodes pooling resources. Each node is capable of running multiple Redis instances ([shards]({{}})). + +{{< image filename="/images/k8s/k8s-node-arch.png">}} + +A Redis cluster is created and managed by the [RedisEnterpriseCluster (REC)]({{}}) [custom resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/). Changes to the REC configuration file prompt the operator to make changes to the cluster. The REC is required for both standard databases ([REDB](#redisenterprisedatabase-redb)) and Active-Active databases ([REAADB](#redisenterpriseactiveactivedatabase-reaadb)). + +See the [RedisEnterpriseCluster API Reference]({{}}) for a full list of fields and settings. + +## RedisEnterpriseDatabase REDB + +A Redis Enterprise database is a logical entity that manages your entire dataset across multiple Redis instances. A Redis instance is a single-threaded database process ([commonly referred to as a shard]({{}})). + +Redis databases are created and managed by the [RedisEnterpriseDatabase (REDB)]({{}}) [custom resource (CR)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/). Changes to the REDB YAML configuration file prompt the operator to make changes to the database. + +An operator can manage a database in the same namespace, or a different namespace. See ["Flexible deployment"]({{}}) options and ["Manage databases in multiple namespaces"]({{}}) for more information. + +See the [RedisEnterpriseDatabase (REDB) API Reference]({{}}) for a full list of fields and settings. + +## Security + +Redis Enterprise for Kubernetes uses [secrets](https://kubernetes.io/docs/concepts/configuration/secret/) to manage your cluster credentials, cluster certificates, and client certificates. You can configure [LDAP]({{}}) and [internode encryption]({{}}) using the [RedisEnterpriseCluster (REC)](#redisenterprisecluster-rec) spec. + +### REC credentials + +Redis Enterprise for Kubernetes uses the [RedisEnterpriseCluster (REC)]({{}}) [custom resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) to create a Redis Enterprise cluster. During creation it generates random credentials for the operator to use. The credentials are saved in a Kubernetes (K8s) [secret](https://kubernetes.io/docs/concepts/configuration/secret/). The secret name defaults to the name of the cluster. + +See [Manage REC credentials]({{}}) for more details. + +### REC certificates + +By default, Redis Enterprise Software for Kubernetes generates TLS certificates for the cluster during creation. These self-signed certificates are generated on the first node of each Redis Enterprise cluster (REC) and are copied to all other nodes in the cluster. + +See [Manage REC certificates]({{}}) for more details. + +### Client certificates + +For each client certificate you want to use, you need to create a [Kubernetes secret](https://kubernetes.io/docs/concepts/configuration/secret/) to hold it. You can then reference that secret in your [Redis Enterprise database (REDB)](#redisenterprisedatabase-redb) custom resource. + +See [Add client certificates]({{}}) for more details. + +## Storage + +[Persistent storage is mandatory for Redis Enterprise.]({{}}) Redis Enterprise for Kubernetes [requires network-attached storage](https://en.wikipedia.org/wiki/Network-attached_storage). + +Redis Enterprise for Kubernetes uses [PersistentVolumeClaims (PVC)](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims) to manage storage resources. The PVC is an abstract representation of the [PersistentVolume (PV)](https://kubernetes.io/docs/concepts/storage/persistent-volumes) resources used by your Redis pods. PVCs are created by the Redis Enterprise operator and used by the [RedisEnterpriseCluster (REC)](#redisenterprisecluster-rec). + +PVCs are created with a specific size and [can be expanded](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims), if the underlying [storage class](https://kubernetes.io/docs/concepts/storage/storage-classes/) supports it. + +### Auto Tiering + +Redis Enterprise Software for Kubernetes supports [Auto Tiering]({{}}) (previously known as Redis on Flash), which extends your node memory to use both RAM and flash storage. SSDs (solid state drives) can store infrequently used (warm) values while your keys and frequently used (hot) values are still stored in RAM. This improves performance and lowers costs for large datasets. + +NVMe (non-volatile memory express) SSDs are strongly recommended to achieve the best performance. + +## Networking + +By default, Kubernetes doesn't allow you to access your Redis database from outside your K8s cluster. Redis Enterprise for Kubernetes supports several ways to route external traffic to your [Redis Enterprise cluster (REC)](#redisenterprisecluster-rec): + +- Ingress controllers [HAProxy](https://haproxy-ingress.github.io/) and [NGINX](https://kubernetes.github.io/ingress-nginx/) require an `ingress` API resource. +- [Istio](https://istio.io/latest/docs/setup/getting-started/) requires `Gateway` and `VirtualService` API resources. +- OpenShift uses [routes]({{< relref "/operate/kubernetes/networking/routes.md" >}}) to route external traffic. + +The [Active-Active databases](#active-active-databases) require one of above routing methods to be configured in the REC with the [ingressOrRouteSpec field]({{}}). + +## Services Rigger + +The services rigger is responsible for creating and updating services related to database objects. It identifies database objects within the cluster and creates services in accordance with [`redisEnterpriseCluster.Spec.servicesRiggerSpec` setting]({{}}) to allow access to those databases. By default, each database has two services, a `cluster_ip` Service with the same name as the database and a `headless` Service with the same name as the database suffixed with `-headless`. It also creates other types of Services such as Ingress Services or OpenshiftRoutes (defined in `redisEnterpriseCluster.Spec.ingressOrRouteSpec`) meant to provide access to REAADB objects. + +You can view a list of services with the `kubectl get services` command. + +Kubernetes is a dynamic environment, with nodes and pods changing as needed. The services rigger monitors the cluster for these changes and updates the database services to ensure reliable communication with the databases. + +## Active-Active databases + +On Kubernetes, Redis Enterprise [Active-Active]({{< relref "/operate/rs/databases/active-active/" >}}) databases provide read and write access to the same dataset from different Kubernetes clusters. Creating an Active-Active database requires routing [network access]({{< relref "/operate/kubernetes/networking/" >}}) between two Redis Enterprise clusters residing in different Kubernetes clusters. Without the proper access configured for each cluster, syncing between the databases instances will fail.The admission controller is also required for Active-Active databases on Kubernetes, to validate changes to the custom resources. + +For more details and installation information, see [Active-Active databases]({{}}). For more general information about Active-Active, see the [Redis Enterprise Software docs]({{< relref "/operate/rs/databases/active-active/" >}}). + +## RedisEnterpriseRemoteCluster RERC + +The [RedisEnterpriseRemoteCluster (RERC)]({{}}) contains details allowing the REC to link to the RedisEnterpriseActiveActiveDatabase (REAADB). The RERC resource is listed in the [REAADB](#redisenterpriseactiveactivedatabase-reaadb) resource to become a participating cluster for the Active-Active database. + +See the [RERC API reference]({{}}) for a full list of fields and settings. + +## RedisEnterpriseActiveActiveDatabase REAADB + +The RedisEnterpriseActiveActiveDatabase (REAADB) resource creates and manages a database that spans more than one Kubernetes cluster. An REAADB requires [external routing](#networking), at least two [RECs](#redisenterprisecluster-rec), and at least two [RERCs](#redisenterpriseremotecluster-rerc). + +See the [REAADB API reference]({{}}) for a full list of fields and settings. + +## Metrics + +To collect metrics data from your databases and Redis Enterprise cluster (REC), you can [connect your Prometheus]({{}}) server to an endpoint exposed on your REC. Redis Enterprise for Kubernetes creates a dedicated service to expose the `prometheus` port (8070) for data collection. A custom resource called `ServiceMonitor` allows the [Prometheus operator](https://github.com/prometheus-operator/prometheus-operator/tree/main/Documentation) to connect to this port and collect data from Redis Enterprise. diff --git a/content/operate/kubernetes/deployment/deployment-options.md b/content/operate/kubernetes/architecture/deployment-options.md similarity index 94% rename from content/operate/kubernetes/deployment/deployment-options.md rename to content/operate/kubernetes/architecture/deployment-options.md index 4efc469083..c7e48212e2 100644 --- a/content/operate/kubernetes/deployment/deployment-options.md +++ b/content/operate/kubernetes/architecture/deployment-options.md @@ -9,17 +9,17 @@ description: Redis Enterprise for Kubernetes allows you to deploy to multiple na This article describes flexible deployment options you can use to meet your specific needs. linkTitle: Deployment options +aliases: [ /operate/kubernetes/architecture/deployment-options/, ] weight: 12 --- You can deploy Redis Enterprise for Kubernetes in several different ways depending on your database needs. -Multiple Redis Enterprise database resources (REDB) can be associated with single Redis Enterprise cluster resource (REC) even if they reside in different namespaces. +Multiple RedisEnterpriseDatabase (REDB) resources can be associated with a single Redis Enterprise cluster resource (REC) even if they reside in different namespaces. The Redis Enterprise cluster (REC) custom resource must reside in the same namespace as the Redis Enterprise operator. {{}} 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.{{}} - ## Single REC and single namespace (one-to-one) 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 [Deploy Redis Enterprise for Kubernetes]({{< relref "/operate/kubernetes/deployment/quick-start.md" >}}). diff --git a/content/operate/kubernetes/architecture/operator.md b/content/operate/kubernetes/architecture/operator.md deleted file mode 100644 index 7c7d6c6902..0000000000 --- a/content/operate/kubernetes/architecture/operator.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -Title: Redis Enterprise for Kubernetes operator-based architecture -alwaysopen: false -categories: -- docs -- operate -- kubernetes -description: This section provides a description of the design of Redis Enterprise - for Kubernetes. -linkTitle: What is an operator? -weight: 30 ---- -Redis Enterprise is the fastest, most efficient way to -deploy and maintain a Redis Enterprise cluster in Kubernetes. - -## What is an operator? - -An operator is a [Kubernetes custom controller](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#custom-controllers) which extends the native K8s API. - -Operators were developed to handle sophisticated, stateful applications -that the default K8s controllers aren’t able to handle. While stock -Kubernetes controllers—for example, -[StatefulSets](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/)—are -ideal for deploying, maintaining and scaling simple stateless -applications, they are not equipped to handle access to stateful -resources, upgrade, resize and backup of more elaborate, clustered -applications such as databases. - -## What does an operator do? - -In abstract terms, Operators encode human operational knowledge into -software that can reliably manage an application in an extensible, -modular way and do not hinder the basic primitives that comprise the K8s -architecture. - -Redis created an operator that deploys and manages the lifecycle of a Redis Enterprise Cluster. - -The Redis Enterprise operator acts as a custom controller for the custom -resource RedisEnterpriseCluster, or ‘rec’, which is defined through K8s -CRD ([custom resource definition](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#custom-resources)) -and deployed with a yaml file. - -The operator functions include: - -- Validating the deployed Cluster spec (for example, requiring the -deployment of an odd number of nodes) -- Implementing a reconciliation loop to monitor all the applicable -resources -- Logging events -- Enabling a simple mechanism for editing the Cluster spec - -The Redis Enterprise operator functions as the logic “glue” between the -K8s infrastructure and the Redis Enterprise Cluster. - -The operator creates the following resources: - -- Service account -- Service account role -- Service account role binding -- Secret – holds the cluster username, password, and license -- Statefulset – holds Redis Enterprise nodes -- The Services Manager deployment – exposes databases and tags nodes -- The Redis UI service -- The service that runs the REST API + Sentinel -- Pod Disruption Budget -- Optionally: a deployment for the Service Broker, including services and a PVC - -The following diagram shows the high-level architecture of the Redis -Enterprise operator: - -{{< image filename="/images/k8s/k8-high-level-architecture-diagram-of-redis-enterprise.png" >}} diff --git a/content/operate/kubernetes/deployment/_index.md b/content/operate/kubernetes/deployment/_index.md index c9e7da5d93..5aee514767 100644 --- a/content/operate/kubernetes/deployment/_index.md +++ b/content/operate/kubernetes/deployment/_index.md @@ -15,23 +15,6 @@ weight: 11 This section lists the different ways to set up and run Redis Enterprise for Kubernetes. You can deploy on variety of Kubernetes distributions both on-prem and in the cloud via our Redis Enterprise operator for Kubernetes. -## Operator overview {#overview} - -Redis Enterprise for Kubernetes uses [custom resource definitions](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) (CRDs) to create and manage Redis Enterprise clusters (REC) and Redis Enterprise databases (REDB). - -The operator is a deployment that runs within a given namespace. These operator pods must run with sufficient privileges to create the Redis Enterprise cluster resources within that namespace. - -When the operator is installed, the following resources are created: - -* a service account under which the operator will run -* a set of roles to define the privileges necessary for the operator to perform its tasks -* a set of role bindings to authorize the service account for the correct roles (see above) -* the CRD for a Redis Enterprise cluster (REC) -* the CRD for a Redis Enterprise database (REDB) -* the operator itself (a deployment) - -The operator currently runs within a single namespace and is scoped to operate only on the Redis Enterprise cluster in that namespace. - ## Compatibility Before installing, check [Supported Kubernetes distributions]({{< relref "/operate/kubernetes/reference/supported_k8s_distributions" >}}) to see which Redis Enterprise operator version supports your Kubernetes distribution. diff --git a/content/operate/kubernetes/faqs/_index.md b/content/operate/kubernetes/faqs/_index.md index 7e9f38196a..da1bd6ff62 100644 --- a/content/operate/kubernetes/faqs/_index.md +++ b/content/operate/kubernetes/faqs/_index.md @@ -7,6 +7,7 @@ categories: - kubernetes description: null hideListLinks: true +hidden: true linkTitle: FAQs weight: 100 --- @@ -14,7 +15,7 @@ Here are some frequently asked questions about Redis Enterprise on integration p ## What is an Operator? -An operator is a [Kubernetes custom controller](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources#custom-controllers) which extends the native K8s API. Refer to the article [Redis Enterprise K8s Operator-based deployments – Overview]({{< relref "/operate/kubernetes/architecture/operator.md" >}}). +An operator is a [Kubernetes custom controller](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources#custom-controllers) which extends the native K8s API. Refer to the article [Redis Enterprise K8s Operator-based deployments – Overview]({{< relref "/operate/kubernetes/architecture/" >}}). ## Does Redis Enterprise operator support multiple RECs per namespace? diff --git a/content/operate/kubernetes/re-clusters/multi-namespace.md b/content/operate/kubernetes/re-clusters/multi-namespace.md index 23161d62e5..0a72edf9cd 100644 --- a/content/operate/kubernetes/re-clusters/multi-namespace.md +++ b/content/operate/kubernetes/re-clusters/multi-namespace.md @@ -14,7 +14,7 @@ weight: 17 Multiple Redis Enterprise database resources (REDBs) can be associated with a single Redis Enterprise cluster resource (REC) even if they reside in different namespaces. -To learn more about designing a multi-namespace Redis Enterprise cluster, see [flexible deployment options]({{< relref "/operate/kubernetes/deployment/deployment-options.md" >}}). +To learn more about designing a multi-namespace Redis Enterprise cluster, see [flexible deployment options]({{< relref "/operate/kubernetes/architecture/deployment-options.md" >}}). {{}} 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.{{}} diff --git a/content/operate/kubernetes/re-databases/db-controller.md b/content/operate/kubernetes/re-databases/db-controller.md index 88dd6605cf..487d091a37 100644 --- a/content/operate/kubernetes/re-databases/db-controller.md +++ b/content/operate/kubernetes/re-databases/db-controller.md @@ -32,7 +32,7 @@ If the database [custom resource is deleted]({{< relref "/operate/kubernetes/del Databases in multiple namespaces can be managed by the same operator. To learn more, see [Manage databases in multiple namespaces]({{}}). -To learn more about designing a multi-namespace Redis Enterprise cluster, see [flexible deployment options]({{< relref "/operate/kubernetes/deployment/deployment-options.md" >}}). +To learn more about designing a multi-namespace Redis Enterprise cluster, see [flexible deployment options]({{< relref "/operate/kubernetes/architecture/deployment-options.md" >}}). ## Create a database diff --git a/content/operate/kubernetes/reference/redis_enterprise_active_active_database_api.md b/content/operate/kubernetes/reference/redis_enterprise_active_active_database_api.md index b2874e741d..abb0266879 100644 --- a/content/operate/kubernetes/reference/redis_enterprise_active_active_database_api.md +++ b/content/operate/kubernetes/reference/redis_enterprise_active_active_database_api.md @@ -157,7 +157,7 @@ The Active-Active database global configurations, contains the global properties alertSettings object - Settings for database alerts
+ Settings for database alerts. Note - Alert settings are not supported for Active-Active database.
false @@ -278,7 +278,7 @@ The Active-Active database global configurations, contains the global properties redisVersion string - Redis OSS version. Version can be specified via prefix, or via channels - for existing databases - Upgrade Redis OSS version. For new databases - the version which the database will be created with. If set to 'major' - will always upgrade to the most recent major Redis version. If set to 'latest' - will always upgrade to the most recent Redis version. Depends on 'redisUpgradePolicy' - if you want to set the value to 'latest' for some databases, you must set redisUpgradePolicy on the cluster before. Possible values are 'major' or 'latest' When using upgrade - make sure to backup the database before. This value is used only for database type 'redis'
+ Redis OSS version. Version can be specified via prefix, or via channels - for existing databases - Upgrade Redis OSS version. For new databases - the version which the database will be created with. If set to 'major' - will always upgrade to the most recent major Redis version. If set to 'latest' - will always upgrade to the most recent Redis version. Depends on 'redisUpgradePolicy' - if you want to set the value to 'latest' for some databases, you must set redisUpgradePolicy on the cluster before. Possible values are 'major' or 'latest' When using upgrade - make sure to backup the database before. This value is used only for database type 'redis'. Note - Specifying Redis version is currently not supported for Active-Active database.
false @@ -401,7 +401,7 @@ Connection/ association to the Active-Active database. ### spec.globalConfigurations.alertSettings [↩ Parent](#specglobalconfigurations) -Settings for database alerts +Settings for database alerts. Note - Alert settings are not supported for Active-Active database. @@ -1516,6 +1516,15 @@ RedisEnterpriseActiveActiveDatabaseStatus defines the observed state of RedisEnt + + + + + + + + + + @@ -26403,6 +26410,13 @@ Volume represents a named volume in a pod that may be accessed by any container Versions of open source databases bundled by Redis Enterprise Software - please note that in order to use a specific version it should be supported by the ‘upgradePolicy’ - ‘major’ or ‘latest’ according to the desired version (major/minor)
+ + + + + @@ -26509,6 +26523,40 @@ Volume represents a named volume in a pod that may be accessed by any container
clusterCertificatesGenerationinteger + Versions of the cluster's Proxy and Syncer certificates. In Active-Active databases, these are used to detect updates to the certificates, and trigger synchronization across the participating clusters. .
+
+ Format: int64
+
false
guid string diff --git a/content/operate/kubernetes/reference/redis_enterprise_cluster_api.md b/content/operate/kubernetes/reference/redis_enterprise_cluster_api.md index a1c4b58e10..5f5ced4efe 100644 --- a/content/operate/kubernetes/reference/redis_enterprise_cluster_api.md +++ b/content/operate/kubernetes/reference/redis_enterprise_cluster_api.md @@ -1192,6 +1192,13 @@ Cluster-level LDAP configuration, such as server addresses, protocol, authentica The maximum TTL of cached entries.
false
directoryTimeoutSecondsinteger + The connection timeout to the LDAP server when authenticating a user, in seconds
+
false
enabledForControlPlane boolean false
certificatesStatusobject + Stores information about cluster certificates and their update process. In Active-Active databases, this is used to detect updates to the certificates, and trigger synchronization across the participating clusters.
+
false
ingressOrRouteMethodStatus string
+### status.certificatesStatus +[↩ Parent](#status) + +Stores information about cluster certificates and their update process. In Active-Active databases, this is used to detect updates to the certificates, and trigger synchronization across the participating clusters. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
generationinteger + Generation stores the version of the cluster's Proxy and Syncer certificate secrets. In Active-Active databases, when a user updates the proxy or syncer certificate, a crdb-update command needs to be triggered to avoid potential sync issues. This helps the REAADB controller detect a change in a certificate and trigger a crdb-update. The version of the cluster's Proxy certificate secret.
+
+ Format: int64
+
false
updateStatusstring + The status of the cluster's certificates update
+
false
+ + ### status.licenseStatus [↩ Parent](#status) diff --git a/content/operate/kubernetes/reference/redis_enterprise_database_api.md b/content/operate/kubernetes/reference/redis_enterprise_database_api.md index 12e68b195b..5205ddf989 100644 --- a/content/operate/kubernetes/reference/redis_enterprise_database_api.md +++ b/content/operate/kubernetes/reference/redis_enterprise_database_api.md @@ -171,7 +171,7 @@ RedisEnterpriseDatabaseSpec defines the desired state of RedisEnterpriseDatabase modulesList []object - List of modules associated with database. Note - For Active-Active databases this feature is currently in preview. For this feature to take effect for Active-Active databases, set a boolean environment variable with the name "ENABLE_ALPHA_FEATURES" to True. This variable can be set via the redis-enterprise-operator pod spec, or through the operator-environment-config Config Map.
+ List of modules associated with database. Note - For Active-Active databases this feature is currently in preview. For this feature to take effect for Active-Active databases, set a boolean environment variable with the name "ENABLE_ALPHA_FEATURES" to True. This variable can be set via the redis-enterprise-operator pod spec, or through the operator-environment-config Config Map. Note - if you do not want to upgrade to the latest version you must set upgradeSpec -> upgradeModulesToLatest to false. if you specify a version and do not set the upgradeModulesToLatest it can result errors in the operator. in addition, the option to specify specific version is Deprecated and will be deleted in next releases.
false @@ -1154,7 +1154,7 @@ Redis Enterprise Module: https://redislabs.com/redis-enterprise/modules/ version string - Module's semantic version e.g "1.6.12" - optional only in REDB, must be set in REAADB
+ DEPRECATED - Module's semantic version e.g "1.6.12" - optional only in REDB, must be set in REAADB
false @@ -1303,7 +1303,7 @@ Specifications for DB upgrade. upgradeModulesToLatest boolean - Upgrades the modules to the latest version that supportes the DB version during a DB upgrade action, to upgrade the DB version view the 'redisVersion' field. Notes - All modules must be without specifing the version. in addition, This field is currently not supported for Active-Active databases.
+ DEPRECATED Upgrades the modules to the latest version that supports the DB version during a DB upgrade action, to upgrade the DB version view the 'redisVersion' field. Notes - All modules must be without specifying the version. in addition, This field is currently not supported for Active-Active databases. The default is true
true diff --git a/content/operate/kubernetes/reference/redis_enterprise_remote_cluster_api.md b/content/operate/kubernetes/reference/redis_enterprise_remote_cluster_api.md index 5b5d8f7e5b..7a12725358 100644 --- a/content/operate/kubernetes/reference/redis_enterprise_remote_cluster_api.md +++ b/content/operate/kubernetes/reference/redis_enterprise_remote_cluster_api.md @@ -103,6 +103,13 @@ RedisEntepriseRemoteCluster represents a remote participating cluster. The namespace of the REC that the RERC is pointing at
true + + apiPort + integer + + The port number of the cluster's URL used for connectivity/sync
+ + false dbFqdnSuffix string @@ -136,6 +143,13 @@ RedisEntepriseRemoteCluster represents a remote participating cluster. + internalObservedSecretResourceVersion + string + + The observed secret resource version. Used for internal purposes only.
+ + false + local boolean diff --git a/content/operate/kubernetes/release-notes/6-4-2-releases/6-4-2-8-oct24.md b/content/operate/kubernetes/release-notes/6-4-2-releases/6-4-2-8-oct24.md index 7b02686b0f..7216f0b88b 100644 --- a/content/operate/kubernetes/release-notes/6-4-2-releases/6-4-2-8-oct24.md +++ b/content/operate/kubernetes/release-notes/6-4-2-releases/6-4-2-8-oct24.md @@ -57,6 +57,8 @@ See [6.4.2-8 (July 2023) release notes]({{< relref "/operate/kubernetes/release- * **Redis Enterprise operator bundle** : `v6.4.2-8.11` +The OLM version v6.4.2-8.11 replaces the earlier v6.4.2-8.10 release for the same Redis software version, providing only upgrade path fixes. + ## Known limitations See [6.4.2-8 (July 2023) release notes]({{< relref "/operate/kubernetes/release-notes/6-4-2-releases/6-4-2-8#known-limitations" >}}). \ No newline at end of file diff --git a/content/operate/kubernetes/release-notes/7-2-4-releases/7-2-4-12-10-24.md b/content/operate/kubernetes/release-notes/7-2-4-releases/7-2-4-12-10-24.md index aac8a45ec9..1ff1d47ae6 100644 --- a/content/operate/kubernetes/release-notes/7-2-4-releases/7-2-4-12-10-24.md +++ b/content/operate/kubernetes/release-notes/7-2-4-releases/7-2-4-12-10-24.md @@ -93,6 +93,8 @@ Any distribution not listed below is not supported for production workloads. **Redis Enterprise operator bundle** : `v7.2.4-12.22` +The OLM version v7.2.4-12.22 replaces the earlier v7.2.4-12.21 release for the same Redis software version, providing only upgrade path fixes. + ## Known limitations The limitations below are specific to the Redis Enterprise for Kubernetes product. To view limitations for the supported Redis Enterprise Software version, see the [7.2.4 release notes]({{< relref "/operate/rs/release-notes/rs-7-2-4-releases#known-limitations" >}}). diff --git a/content/operate/kubernetes/release-notes/7-4-6-releases/7-4-6-2-october24.md b/content/operate/kubernetes/release-notes/7-4-6-releases/7-4-6-2-october24.md index 3ddbbc957f..d0362af414 100644 --- a/content/operate/kubernetes/release-notes/7-4-6-releases/7-4-6-2-october24.md +++ b/content/operate/kubernetes/release-notes/7-4-6-releases/7-4-6-2-october24.md @@ -16,16 +16,18 @@ This is a maintenance release to support [Redis Enterprise Software version 7.4. ## Downloads -- **Redis Enterprise**: `redislabs/redis:7.4.102` +- **Redis Enterprise**: `redislabs/redis:7.4.6-102` - **Operator**: `redislabs/operator:7.4.6-2` - **Services Rigger**: `redislabs/k8s-controller:7.4.6-2` ### OpenShift images -- **Redis Enterprise**: `registry.connect.redhat.com/redislabs/redis-enterprise:7.4.102.rhel8-openshift` +- **Redis Enterprise**: `registry.connect.redhat.com/redislabs/redis-enterprise:7.4.6-102.rhel8-openshift` - **Operator**: `registry.connect.redhat.com/redislabs/redis-enterprise-operator:7.4.6-2` - **Services Rigger**: `registry.connect.redhat.com/redislabs/services-manager:7.4.6-2` ### OLM bundle -**Redis Enterprise operator bundle** : `v7.4.6-2.3` +**Redis Enterprise operator bundle** : `v7.4.6-2.4` + +The OLM version v7.4.6-2.4 replaces the earlier v7.4.6-2.3 release for the same Redis software version, providing only upgrade path fixes. diff --git a/content/operate/oss_and_stack/install/install-redis/_index.md b/content/operate/oss_and_stack/install/install-redis/_index.md index 28e123b93b..307f02cb98 100644 --- a/content/operate/oss_and_stack/install/install-redis/_index.md +++ b/content/operate/oss_and_stack/install/install-redis/_index.md @@ -66,7 +66,7 @@ Note that a Redis instance exposed to the internet without any security [is very 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. -You'll find a [full list of supported clients for different languages in this page]({{< relref "develop/connect/clients/" >}}). +You'll find a [full list of supported clients for different languages in this page]({{< relref "develop/clients/" >}}). ## Redis persistence diff --git a/content/operate/oss_and_stack/install/install-redis/install-redis-on-linux.md b/content/operate/oss_and_stack/install/install-redis/install-redis-on-linux.md index a3e0332b27..246fe3ae41 100644 --- a/content/operate/oss_and_stack/install/install-redis/install-redis-on-linux.md +++ b/content/operate/oss_and_stack/install/install-redis/install-redis-on-linux.md @@ -58,7 +58,7 @@ Redis will start automatically, but it won't restart at boot time. To do this, r sudo snap set redis service.start=true {{< /highlight >}} -You an use these additional snap-related commands to start, stop, restart, and check the status of Redis: +You can use these additional snap-related commands to start, stop, restart, and check the status of Redis: * `sudo snap start redis` * `sudo snap stop redis` @@ -97,14 +97,14 @@ PONG {{< / highlight >}} You can also test that your Redis server is running using -[Redis Insight]({{< relref "/develop/connect/insight" >}}). +[Redis Insight]({{< relref "/develop/tools/insight" >}}). ## Next steps Once you have a running Redis instance, you may want to: -* Try the [Redis CLI tutorial]({{< relref "/develop/connect/cli" >}}) -* Connect using one of the [Redis clients]({{< relref "/develop/connect/clients" >}}) +* Try the [Redis CLI tutorial]({{< relref "/develop/tools/cli" >}}) +* Connect using one of the [Redis clients]({{< relref "/develop/clients" >}}) * [Install Redis "properly"]({{< relref "/operate/oss_and_stack/install/install-redis#install-redis-properly" >}}) for production use. diff --git a/content/operate/oss_and_stack/install/install-redis/install-redis-on-mac-os.md b/content/operate/oss_and_stack/install/install-redis/install-redis-on-mac-os.md index def9ff0607..01ff568968 100644 --- a/content/operate/oss_and_stack/install/install-redis/install-redis-on-mac-os.md +++ b/content/operate/oss_and_stack/install/install-redis/install-redis-on-mac-os.md @@ -90,14 +90,14 @@ PONG {{< / highlight >}} You can also test that your Redis server is running using -[Redis Insight]({{< relref "/develop/connect/insight" >}}). +[Redis Insight]({{< relref "/develop/tools/insight" >}}). ## Next steps Once you have a running Redis instance, you may want to: -* Try the [Redis CLI tutorial]({{< relref "/develop/connect/cli" >}}) -* Connect using one of the [Redis clients]({{< relref "/develop/connect/clients" >}}) +* Try the [Redis CLI tutorial]({{< relref "/develop/tools/cli" >}}) +* Connect using one of the [Redis clients]({{< relref "/develop/clients" >}}) * [Install Redis "properly"]({{< relref "/operate/oss_and_stack/install/install-redis#install-redis-properly" >}}) for production use. \ No newline at end of file diff --git a/content/operate/oss_and_stack/install/install-redis/install-redis-on-windows.md b/content/operate/oss_and_stack/install/install-redis/install-redis-on-windows.md index b2c4c2c0f9..1ddf3ef398 100644 --- a/content/operate/oss_and_stack/install/install-redis/install-redis-on-windows.md +++ b/content/operate/oss_and_stack/install/install-redis/install-redis-on-windows.md @@ -54,13 +54,13 @@ PONG {{< / highlight >}} You can also test that your Redis server is running using -[Redis Insight]({{< relref "/develop/connect/insight" >}}). +[Redis Insight]({{< relref "/develop/tools/insight" >}}). ## Next steps Once you have a running Redis instance, you may want to: -* Try the [Redis CLI tutorial]({{< relref "/develop/connect/cli" >}}) -* Connect using one of the [Redis clients]({{< relref "/develop/connect/clients" >}}) +* Try the [Redis CLI tutorial]({{< relref "/develop/tools/cli" >}}) +* Connect using one of the [Redis clients]({{< relref "/develop/clients" >}}) * [Install Redis "properly"]({{< relref "/operate/oss_and_stack/install/install-redis#install-redis-properly" >}}) for production use. diff --git a/content/operate/oss_and_stack/install/install-stack/linux.md b/content/operate/oss_and_stack/install/install-stack/linux.md index 5afcaaee97..eb5197f024 100644 --- a/content/operate/oss_and_stack/install/install-stack/linux.md +++ b/content/operate/oss_and_stack/install/install-stack/linux.md @@ -191,13 +191,13 @@ PONG {{< / highlight >}} You can also test that your Redis server is running using -[Redis Insight]({{< relref "/develop/connect/insight" >}}). +[Redis Insight]({{< relref "/develop/tools/insight" >}}). ## Next steps Once you have a running Redis instance, you may want to: -* Try the [Redis CLI tutorial]({{< relref "/develop/connect/cli" >}}) -* Connect using one of the [Redis clients]({{< relref "/develop/connect/clients" >}}) +* Try the [Redis CLI tutorial]({{< relref "/develop/tools/cli" >}}) +* Connect using one of the [Redis clients]({{< relref "/develop/clients" >}}) * [Install Redis "properly"]({{< relref "/operate/oss_and_stack/install/install-redis#install-redis-properly" >}}) for production use. diff --git a/content/operate/oss_and_stack/install/install-stack/mac-os.md b/content/operate/oss_and_stack/install/install-stack/mac-os.md index bddd4c187f..d5a5de2747 100644 --- a/content/operate/oss_and_stack/install/install-stack/mac-os.md +++ b/content/operate/oss_and_stack/install/install-stack/mac-os.md @@ -134,13 +134,13 @@ PONG {{< / highlight >}} You can also test that your Redis server is running using -[Redis Insight]({{< relref "/develop/connect/insight" >}}). +[Redis Insight]({{< relref "/develop/tools/insight" >}}). ## Next steps Once you have a running Redis instance, you may want to: -* Try the [Redis CLI tutorial]({{< relref "/develop/connect/cli" >}}) -* Connect using one of the [Redis clients]({{< relref "/develop/connect/clients" >}}) +* Try the [Redis CLI tutorial]({{< relref "/develop/tools/cli" >}}) +* Connect using one of the [Redis clients]({{< relref "/develop/clients" >}}) * [Install Redis "properly"]({{< relref "/operate/oss_and_stack/install/install-redis#install-redis-properly" >}}) for production use. diff --git a/content/operate/oss_and_stack/management/scaling.md b/content/operate/oss_and_stack/management/scaling.md index 091ffc315b..5886842dd4 100644 --- a/content/operate/oss_and_stack/management/scaling.md +++ b/content/operate/oss_and_stack/management/scaling.md @@ -326,7 +326,7 @@ to run the script. #### Interact with the cluster To connect to Redis Cluster, you'll need a cluster-aware Redis client. -See the [documentation]({{< relref "/develop/connect/clients/" >}}) for your client of choice to determine its cluster support. +See the [documentation]({{< relref "/develop/clients" >}}) for your client of choice to determine its cluster support. You can also test your Redis Cluster using the `redis-cli` command line utility: diff --git a/content/operate/oss_and_stack/stack-with-enterprise/bloom/config.md b/content/operate/oss_and_stack/stack-with-enterprise/bloom/config.md index ed0e99cd3c..abcf8e3360 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/bloom/config.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/bloom/config.md @@ -5,17 +5,34 @@ categories: - docs - operate - stack -description: Probabilistic data structure configuration settings supported by Redis - Enterprise. +description: Probabilistic data structure configuration settings supported by Redis Enterprise Software and Redis Cloud. linkTitle: Configuration toc: 'false' weight: 30 --- +## Configure probabilistic data structures in Redis Software + [Redis Enterprise Software]({{< relref "/operate/rs" >}}) lets you manually change any [RedisBloom configuration setting]({{< relref "/develop/data-types/probabilistic/" >}}configuration/#redisbloom-configuration-parameters). +To change the RedisBloom configuration using the Redis Software Cluster Manager UI: + + 1. From the **Databases** list, select the database, then click **Configuration**. + + 1. Select the **Edit** button. + + 1. In the **Capabilities** section, click **Parameters**. + + 1. After you finish editing the module's configuration parameters, click **Done** to close the parameter editor. + + 1. Click **Save**. + +## Configure probabilistic data structures in Redis Cloud + [Redis Cloud]({{< relref "/operate/rc" >}}) does not let you configure RedisBloom manually. However, if you have a Flexible or Annual [subscription]({{< relref "/operate/rc/subscriptions" >}}), you can contact [support](https://redis.com/company/support/) to request a configuration change. You cannot change RedisBloom configuration for Free or Fixed subscriptions. +## Configuration settings + | Setting | Redis
Enterprise | Redis
Cloud | Notes | |:--------|:----------------------|:-----------------|:------| | [CF_MAX_EXPANSIONS]({{< relref "/develop/data-types/probabilistic/" >}}configuration/#cf_max_expansions) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 32 | diff --git a/content/operate/oss_and_stack/stack-with-enterprise/deprecated-features/graph/graph-quickstart.md b/content/operate/oss_and_stack/stack-with-enterprise/deprecated-features/graph/graph-quickstart.md index 857d9891dd..676ff34d15 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/deprecated-features/graph/graph-quickstart.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/deprecated-features/graph/graph-quickstart.md @@ -215,7 +215,7 @@ Alex's updated friend count: [[1]] ## Visualize graphs with Redis Insight -You can use the [Redis Insight]({{< relref "/develop/connect/insight/" >}}) workbench to visualize the relationships between the nodes of your graph. +You can use the [Redis Insight]({{< relref "/develop/tools/insight" >}}) workbench to visualize the relationships between the nodes of your graph. 1. Connect to your database with Redis Insight. You can [connect manually]({{< baseurl >}}/develop/connect/insight/#add-a-standalone-redis-database) or use the [auto-discovery]({{< baseurl >}}/develop/connect/insight/#auto-discovery-for-redis-cloud-databases) feature. diff --git a/content/operate/oss_and_stack/stack-with-enterprise/deprecated-features/triggers-and-functions/Quick_Start_RI.md b/content/operate/oss_and_stack/stack-with-enterprise/deprecated-features/triggers-and-functions/Quick_Start_RI.md index c498084ad5..0c0e9cadfd 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/deprecated-features/triggers-and-functions/Quick_Start_RI.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/deprecated-features/triggers-and-functions/Quick_Start_RI.md @@ -19,7 +19,7 @@ aliases: Make sure that you have [Redis Stack installed]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) and running. Alternatively, you can create a [free Redis Cloud account](https://redis.com/try-free/?utm_source=redisio&utm_medium=referral&utm_campaign=2023-09-try_free&utm_content=cu-redis_cloud_users). -If you haven't already installed Redis Insight, you can download the latest version [here](https://redis.com/redis-enterprise/redis-insight/?_ga=2.232184223.127667221.1704724457-86137583.1685485233&_gl=1*1gygred*_ga*ODYxMzc1ODMuMTY4NTQ4NTIzMw..*_ga_8BKGRQKRPV*MTcwNDkyMzExMC40MDEuMS4xNzA0OTI3MjQ2LjUyLjAuMA..*_gcl_au*MTQzODY1OTU4OS4xNzAxMTg0MzY0). If this is your first time using Redis Insight, you may wish to read through the [Redis Insight guide]({{< relref "/develop/connect/insight/" >}}) before continuing with this guide. +If you haven't already installed Redis Insight, you can download the latest version [here](https://redis.com/redis-enterprise/redis-insight/?_ga=2.232184223.127667221.1704724457-86137583.1685485233&_gl=1*1gygred*_ga*ODYxMzc1ODMuMTY4NTQ4NTIzMw..*_ga_8BKGRQKRPV*MTcwNDkyMzExMC40MDEuMS4xNzA0OTI3MjQ2LjUyLjAuMA..*_gcl_au*MTQzODY1OTU4OS4xNzAxMTg0MzY0). If this is your first time using Redis Insight, you may wish to read through the [Redis Insight guide]({{< relref "/develop/tools/insight" >}}) before continuing with this guide. ## Connect to Redis Stack diff --git a/content/operate/oss_and_stack/stack-with-enterprise/install/_index.md b/content/operate/oss_and_stack/stack-with-enterprise/install/_index.md index 7b059d3d25..7f68824fed 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/install/_index.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/install/_index.md @@ -11,7 +11,7 @@ linkTitle: Install and upgrade modules weight: 4 --- -Several modules, which provide Redis Stack features, come packaged with [Redis Enterprise]({{< relref "/operate/rs" >}}). As of version 7.4.2, Redis Enterprise includes two feature sets, compatible with different Redis database versions. However, if you want to use additional modules or upgrade a module to a more recent version, you need to: +Several modules, which provide Redis Stack features, come packaged with [Redis Enterprise Software]({{< relref "/operate/rs" >}}). As of version 7.8.2, Redis Enterprise Software includes three feature sets, compatible with different Redis database versions. However, if you want to use additional modules or upgrade a module to a more recent version, you need to: 1. [Install a module package]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster" >}}) on the cluster. 1. [Enable a module]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-database" >}}) for a new database or [upgrade a module]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module" >}}) in an existing database. diff --git a/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster.md b/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster.md index 9ac78e6f55..21c56f5387 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster.md @@ -10,7 +10,7 @@ linkTitle: Install on a cluster weight: 10 --- -[Redis Enterprise]({{< relref "/operate/rs" >}}) comes packaged with several modules. As of version 7.4.2, Redis Enterprise includes two feature sets, compatible with different Redis database versions. You can view the installed modules, their versions, and their minimum compatible Redis database versions from **Cluster > Modules** in the Redis Enterprise Cluster Manager UI. +[Redis Enterprise Software]({{< relref "/operate/rs" >}}) comes packaged with several modules. As of version 7.8.2, Redis Enterprise Software includes three feature sets, compatible with different Redis database versions. You can view the installed modules, their versions, and their minimum compatible Redis database versions from **Cluster > Modules** in the Cluster Manager UI. To use other modules or upgrade an existing module to a more recent version, you need to install the new module package on your cluster. @@ -22,11 +22,9 @@ To use other modules or upgrade an existing module to a more recent version, you ## Get packaged modules -To install or upgrade a module on a [Redis Enterprise]({{< relref "/operate/rs" >}}) cluster, you need a module package. +To install or upgrade a module on a [Redis Enterprise Software]({{< relref "/operate/rs" >}}) cluster, you need a module package. -- For the latest Redis Enterprise modules, download packages from the [Redis download center](https://redislabs.com/download-center/modules/). - -- For earlier versions of Redis Enterprise modules that are no longer available from the Redis download center, [contact support](https://redis.com/company/support/). +- For versions of official Redis modules that are not available from the [Redis download center](https://redislabs.com/download-center/modules/), [contact support](https://redis.com/company/support/). - For custom-packaged modules, download a [custom-packaged module](https://redislabs.com/community/redis-modules-hub/) from the developer. diff --git a/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-database.md b/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-database.md index 0fa3a3fc8e..42f90583dd 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-database.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-database.md @@ -30,7 +30,7 @@ In the Redis Enterprise Cluster Manager UI, follow these steps to add modules to 1. In the **Capabilities** section, select one or more capabilities: - {{Select which capabilities to add to your database.}} + {{Select which capabilities to add to your database.}} {{}} You cannot use RediSearch 1.x and RediSearch 2.x in the same database. diff --git a/content/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module.md b/content/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module.md index 86a4dcae6d..5edebe666a 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module.md @@ -53,17 +53,27 @@ To upgrade a module enabled for a database: - `rladmin status modules` - Shows the latest modules available on the cluster and the modules used by databases. - `rladmin status modules all` - Shows all of the modules available on the cluster and the modules used by databases. -1. To upgrade a database to the latest version of Redis and its modules to the latest version without changing the module arguments, run: +1. To upgrade a database to the latest version of Redis and its modules to the latest version without changing the module arguments: - ```sh - rladmin upgrade db < database_name | database_ID > latest_with_modules - ``` + - For clusters with Redis Enterprise Software versions 7.8.2 or later, run: + + ```sh + rladmin upgrade db < database_name | database_ID > + ``` + + - For clusters with versions earlier than 7.8.2, include the `latest_with_modules` option: + + ```sh + rladmin upgrade db < database_name | database_ID > latest_with_modules + ``` {{}} The upgrade process does not validate the module upgrade arguments, and incorrect arguments can cause unexpected downtime. Test module upgrade commands in a test environment before you upgrade modules in production. {{}} - Use `keep_redis_version` to upgrade the modules without upgrading the database to the latest Redis version. + + `keep_redis_version` is deprecated as of Redis Enterprise Software version 7.8.2. To upgrade modules without upgrading the Redis database version, set `redis_version` to the current Redis database version instead. - To specify the modules to upgrade, add the following for each module: @@ -79,9 +89,25 @@ The upgrade process does not validate the module upgrade arguments, and incorrec - `module_args keep_args` to use the existing module arguments. -## Examples +## Examples for Redis Software v7.8.2 and later + +The following module upgrade examples are supported for Redis Enterprise Software versions 7.8.2 and later: + +- Keep the current Redis database version, which is 7.2 in this example, and upgrade to the latest version of the enabled modules: + + ```sh + rladmin upgrade db shopping_cart redis_version 7.2 + ``` + +- Upgrade the database to use the latest version of Redis and the latest versions of the enabled modules: + + ```sh + rladmin upgrade db shopping_cart + ``` + +## Deprecated examples -Here are some module upgrade examples: +As of Redis Enterprise Software version 7.8.2, the following module upgrade examples are deprecated but still supported. - Keep the current version of Redis and upgrade to the latest version of the enabled modules: diff --git a/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redisstack/_index.md b/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redisstack/_index.md index 60c452f335..169dba2c92 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redisstack/_index.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redisstack/_index.md @@ -5,7 +5,7 @@ categories: - docs - operate - stack -description: Redis Stack release notes for version 7.4 and later +description: Redis Stack release notes for version 7.2 and later hideListLinks: true linkTitle: Redis Stack tags: diff --git a/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redisstack/redisstack-6.2.6-release-notes.md b/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redisstack/redisstack-6.2.6-release-notes.md new file mode 100644 index 0000000000..bf86cf35b4 --- /dev/null +++ b/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redisstack/redisstack-6.2.6-release-notes.md @@ -0,0 +1,1278 @@ +--- +Title: Redis Stack 6.2.6 release notes +alwaysopen: false +categories: +- docs +- operate +- stack +description: Redis Stack 6.2.6 release notes. +linkTitle: v6.2.6-v0 (December 2022) +weight: 100 +--- + +## Redis Stack Server 6.2.6-v17 (October 2024) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `SECURITY`: there are security fixes in the release. + +[Docker](https://hub.docker.com/r/redis/redis-stack) | [Download](https://redis.io/downloads/#stack) + +### Headlines: +This version includes security fixes for the **Redis** server, addressing potential vulnerabilities such as an RCE when using Lua library components, and a denial-of-service (DoS) risk due to unbounded pattern matching. +Additionally, this maintenance release includes the latest version of **Redis Insight**. + +### Details: + **Security and privacy** +* **Redis**: + * (CVE-2024-31449) Lua library commands may lead to stack overflow and potential RCE. + * (CVE-2024-31228) Potential Denial-of-service due to unbounded pattern matching. + +**Redis version** +* [Redis 6.2.16](https://github.com/redis/redis/releases/tag/6.2.16) + +**Module versions** +* __[RediSearch 2.6.20](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.20)__ +* __[RedisJSON 2.4.9](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.9)__ +* __[RedisGraph 2.10.12](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.15)__ +* __[RedisTimeSeries 1.8.14](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.14)__ +* __[RedisBloom 2.4.9](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.9)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.2.0 or greater](https://github.com/redis/jedis/releases/tag/v5.2.0) + * [redis-om-spring 0.9.5 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.9.5) +* Python + * [redis-py 5.1.0 or greater](https://github.com/redis/redis-py/releases/tag/v5.1.0) + * [redis-om-python 0.3.2 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.3.2) +* NodeJS + * [node-redis 4.7.0 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.7.0) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.7.4 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.7.4) + * [NRedisStack 0.13.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.13.0) +* Go + * [go-redis 9.6.1 or greater](https://github.com/redis/go-redis/releases/tag/v9.6.1) + * [rueidis 1.0.47 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.47) + +Compatible with [Redis Insight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [Redis Insight 2.58](https://github.com/RedisInsight/RedisInsight/releases/tag/2.58.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack Server 6.2.6-v16 (August 2024) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `MODERATE`: Program an upgrade of the server, but it's not urgent. + +### Headlines: +The updated **search and query** version introduces several new features and bug fixes. This new release of Redis Stack 6.2.6 also includes updated versions of **JSON** and **time series** data structures, each incorporating several bug fixes. + +This maintenance release also contains the latest version of **RedisInsight**. + + ### Details: + + **Improvements** +* **Search and query**: + * [#4793](https://github.com/RediSearch/RediSearch/pull/4793) - Add character validations to simple string replies and escape it when required(MOD-7258) + * [#4769](https://github.com/RediSearch/RediSearch/pull/4769) - Indicate which value is missing on the error message at the aggregation pipeline (MOD-7201) + * [#4746](https://github.com/RediSearch/RediSearch/pull/4746) - `GROUPBY` recursion cleanup (MOD-7245) + +**Bug Fixes** +* **Search and query**: + * [#4755](https://github.com/RediSearch/RediSearch/pull/4755) - Correct return the maximum value for negative values when using `MAX` reducer (MOD-7252) + * [#4733](https://github.com/RediSearch/RediSearch/pull/4733) - Separators ignored when escaping backslash `\` after the escaped character such as in `hello\\,world` ignoring `,` (MOD-7240) + * [#4717](https://github.com/RediSearch/RediSearch/pull/4717) - Sorting by multiple fields as in `SORTBY 2 @field1 @field2` was ignoring the subsequent field (MOD-7206) + +* **Time series**: + * [#1607](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1607) Potential crash after deleting and recreating a source key of a compaction rule (MOD-7338) + * [#1610](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1610) `COUNT` argument accepts non-positive values (MOD-5413) + +**Redis version** +* [Redis 6.2.14](https://github.com/redis/redis/releases/tag/6.2.14) + +**Module versions** +* __[RediSearch 2.6.20](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.20)__ +* __[RedisJSON 2.4.9](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.9)__ +* __[RedisGraph 2.10.12](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.15)__ +* __[RedisTimeSeries 1.8.14](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.14)__ +* __[RedisBloom 2.4.9](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.9)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.1.4 or greater](https://github.com/redis/jedis/releases/tag/v5.1.4) + * [redis-om-spring 0.9.4 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.9.4) +* Python + * [redis-py 5.0.9 or greater](https://github.com/redis/redis-py/releases/tag/v5.0.9) + * [redis-om-python 0.3.1 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.3.1) +* NodeJS + * [node-redis 4.7.0 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.7.0) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.7.4 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.7.4) + * [NRedisStack 0.12.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.12.0) +* Go + * [go-redis 9.6.1 or greater](https://github.com/redis/go-redis/releases/tag/v9.6.1) + * [rueidis 1.0.43 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.43) + +Compatible with [Redis Insight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [Redis Insight 2.54](https://github.com/RedisInsight/RedisInsight/releases/tag/2.54.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack Server 6.2.6-v15 (June 2024) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `MODERATE`: Program an upgrade of the server, but it's not urgent. + +### Headlines: +Redis Stack 6.2.6-v15 introduces an updated **search and query** capability with several enhancements and bug fixes. +The updated **search and query** version features improved memory reporting that accounts for additional memory consumed by `TAG` and `TEXT` tries. Also, it includes additional fields in the `FT.INFO` command when used within a cluster. +This maintenance release also contains the latest version of **RedisInsight**. + +### Details: + + **Improvements** +* **Search and query**: + * [#4599](https://github.com/RediSearch/RediSearch/pull/4599) - Report additional memory consumed by the `TAG` and `TEXT` tries (MOD-5902) + * [#4688](https://github.com/RediSearch/RediSearch/pull/4688) - Add missing `FT.INFO` fields when used within a cluster (MOD-6920) + +**Bug Fixes** +* **Search and query**: + * [#4616](https://github.com/RediSearch/RediSearch/pull/4616) - Shards become unresponsive when using `FT.AGGREGATE` with `APPLY 'split(...)'`(MOD-6759) + * [#4557](https://github.com/RediSearch/RediSearch/pull/4557) - `FT.EXPLAIN` returns additional `}` when querying using wildcards (MOD-6768) + * [#4647](https://github.com/RediSearch/RediSearch/pull/4647) - `FT.DROPINDEX` with `DD` flag deleted keys in one AA cluster but not the others (MOD-1855) + +**Redis version** +* [Redis 6.2.14](https://github.com/redis/redis/releases/tag/6.2.14) + +**Module versions** +* __[RediSearch 2.6.19](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.19)__ +* __[RedisJSON 2.4.9](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.9)__ +* __[RedisGraph 2.10.12](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.15)__ +* __[RedisTimeSeries 1.8.13](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.13)__ +* __[RedisBloom 2.4.9](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.9)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.1.3 or later](https://github.com/redis/jedis/releases/tag/v5.1.3) + * [redis-om-spring 0.9.1 or later](https://github.com/redis/redis-om-spring/releases/tag/v0.9.1) +* Python + * [redis-py 5.0.5 or later](https://github.com/redis/redis-py/releases/tag/v5.0.5) + * [redis-om-python 0.3.1 or later](https://github.com/redis/redis-om-python/releases/tag/v0.3.1) +* NodeJS + * [node-redis 4.6.14 or later](https://github.com/redis/node-redis/releases/tag/redis%404.6.14) + * [redis-om-node 0.2.0 or later](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.7.1 or later](https://github.com/redis/redis-om-dotnet/releases/tag/v0.7.1) + * [NRedisStack 0.12.0 or later](https://github.com/redis/NRedisStack/releases/tag/v0.12.0) +* Go + * [go-redis 9.5.2 or later](https://github.com/redis/go-redis/releases/tag/v9.5.2) + * [rueidis 1.0.38 or later](https://github.com/redis/rueidis/releases/tag/v1.0.38) + +Compatible with [Redis Insight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [Redis Insight 2.50](https://github.com/RedisInsight/RedisInsight/releases/tag/2.50.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Downloads + +* macOS: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v15.catalina.x86_64.zip), [arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v15.monterey.arm64.zip) +* AppImage: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v15-x86_64.AppImage) +* Ubuntu: [Bionic x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v15.bionic.x86_64.tar.gz), [Bionic arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v15.bionic.arm64.tar.gz), [Focal x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v15.focal.x86_64.tar.gz), [Focal arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v15.focal.arm64.tar.gz), [Snap x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v15.x86_64.snap), [Snap arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v15.arm64.snap), [Jammy x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v15.jammy.x86_64.tar.gz), [Jammy arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v15.jammy.arm64.tar.gz) +* Debian: [Bullseye x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v15.bullseye.x86_64.tar.gz) +* RHEL 7/CentOS Linux 7: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v15.rhel7.x86_64.tar.gz) +* RHEL 8/CentOS Linux 8: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v15.rhel8.x86_64.tar.gz) +* Redis Stack on [Dockerhub](https://hub.docker.com/u/redis): [x86_64 and arm64](https://hub.docker.com/r/redis/redis-stack) +* Redis Stack server on [Dockerhub](https://hub.docker.com/u/redis): [x86_64 and arm64](https://hub.docker.com/r/redis/redis-stack-server) + +## Redis Stack Server 6.2.6-v14 (April 2024) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `HIGH`: There is a critical bug that may affect a subset of users. Upgrade! + +### Headlines: +This version contains the latest **search and query** capability with several improvements and bug fixes, including a critical bug fix. This release also includes the latest **JSON** data structure with a fix for a potential crash, and the **time series** data structure with more detailed LibMR error messages and a fix for a potential crash. It also contains the latest version of **RedisInsight**. + +### Details: + + **Improvements** +* **Search and query**: + * [#4502](https://github.com/RediSearch/RediSearch/pull/4502) Handle error properly when trying to execute Search commands on cluster setup as part of `MULTI`/`EXEC` or LUA script (MOD-6541) + +* **Time series**: + * [#1593](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1593) More detailed LibMR error messages + +**Bug Fixes** +* **Search and query**: + * [#4524](https://github.com/RediSearch/RediSearch/pull/4524) `FT.CURSOR READ` in a numeric query causing a crash (MOD-6597) + * [#4543](https://github.com/RediSearch/RediSearch/pull/4543) `FT.SEARCH` accessing an inexistent memory address causes a crash if using deprecated `FT.ADD` command (MOD-6599) + * [#4535](https://github.com/RediSearch/RediSearch/pull/4535) `FT.PROFILE` with incorrect arguments could cause a crash on cluster setup (MOD-6791) + * [#4540](https://github.com/RediSearch/RediSearch/pull/4540) Unfree memory from an existing RDB while re-indexing loading a new RDB could cause a crash (MOD-6831, 6810) + * [#4485](https://github.com/RediSearch/RediSearch/pull/4485) Some parameter settings using just prefixes instead of full values were working (MOD-6709) + * [#4557](https://github.com/RediSearch/RediSearch/pull/4557) Additional "`}`" on wildcards replies for `FT.EXPLAIN` (MOD-6768) + +* **JSON**: + * [#1192](https://github.com/RedisJSON/RedisJSON/pull/1192) Crashes with numeric values greater than i64::MAX (MOD-6501, MOD-4551, MOD-4856, MOD-5714) + +* **Time series**: + * [LibMR#51](https://github.com/RedisGears/LibMR/pull/51) Crash on SSL initialization failure (MOD-5647) + +**Redis version** +* [Redis 6.2.14](https://github.com/redis/redis/releases/tag/6.2.14) + +**Module versions** +* __[RediSearch 2.6.18](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.18)__ +* __[RedisJSON 2.4.9](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.9)__ +* __[RedisGraph 2.10.12](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.15)__ +* __[RedisTimeSeries 1.8.13](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.13)__ +* __[RedisBloom 2.4.9](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.9)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.1.2 or later](https://github.com/redis/jedis/releases/tag/v5.1.2) + * [redis-om-spring 0.8.9 or later](https://github.com/redis/redis-om-spring/releases/tag/v0.8.9) +* Python + * [redis-py 5.0.3 or later](https://github.com/redis/redis-py/releases/tag/v5.0.3) + * [redis-om-python 0.2.2 or later](https://github.com/redis/redis-om-python/releases/tag/v0.2.2) +* NodeJS + * [node-redis 4.6.13 or later](https://github.com/redis/node-redis/releases/tag/redis%404.6.13) + * [redis-om-node 0.2.0 or later](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.6.1 or later](https://github.com/redis/redis-om-dotnet/releases/tag/v0.6.1) + * [NRedisStack 0.12.0 or later](https://github.com/redis/NRedisStack/releases/tag/v0.12.0) +* Go + * [go-redis 9.5.1 or later](https://github.com/redis/go-redis/releases/tag/v9.5.1) + * [rueidis 1.0.33 or later](https://github.com/redis/rueidis/releases/tag/v1.0.33) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.46](https://github.com/RedisInsight/RedisInsight/releases/tag/2.46.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Downloads + +* macOS: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v14.catalina.x86_64.zip), [arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v14.monterey.arm64.zip) +* AppImage: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v14-x86_64.AppImage) +* Ubuntu: [Bionic x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v14.bionic.x86_64.tar.gz), [Bionic arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v14.bionic.arm64.tar.gz), [Focal x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v14.focal.x86_64.tar.gz), [Focal arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v14.focal.arm64.tar.gz), [Snap x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v14.x86_64.snap), [Snap arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v14.arm64.snap), [Jammy x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v14.jammy.x86_64.tar.gz), [Jammy arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v14.jammy.arm64.tar.gz) +* Debian: [Bullseye x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v14.bullseye.x86_64.tar.gz) +* RHEL 7/CentOS Linux 7: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v14.rhel7.x86_64.tar.gz) +* RHEL 8/CentOS Linux 8: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v14.rhel8.x86_64.tar.gz) +* Redis Stack on [Dockerhub](https://hub.docker.com/u/redis): [x86_64 and arm64](https://hub.docker.com/r/redis/redis-stack) +* Redis Stack server on [Dockerhub](https://hub.docker.com/u/redis): [x86_64 and arm64](https://hub.docker.com/r/redis/redis-stack-server) + +## Redis Stack Server 6.2.6-v13 (March 2024) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `MODERATE`: Program an upgrade of the server, but it's not urgent. + +### Headlines: +This version contains the latest **search and query** capability and **probabilistic** data structures with several bug fixes. It also contains the latest version of **RedisInsight**. + +### Details: + +**Bug Fixes** +* **Search and query**: + * [#4477](https://github.com/RediSearch/RediSearch/pull/4477) Split `INFIX` and `SUFFIX` report on `FT.EXPLAIN` and `FT.EXPLAINCLI` (MOD-6186) + * [#4468](https://github.com/RediSearch/RediSearch/pull/4468) Memory leak upon suffix query for a `TAG` indexed with `WITHSUFFIXTRIE` (MOD-6644) + * [#4407](https://github.com/RediSearch/RediSearch/pull/4407) Clustered `FT.SEARCH` hangs forever without replying when an invalid topology is found (MOD-6557) + * [#4359](https://github.com/RediSearch/RediSearch/pull/4359) Searching for a synonym will iterate in the same group multiple times, causing a performance hit (MOD-6490) + * [#4310](https://github.com/RediSearch/RediSearch/pull/4310) Memory tracking on cluster setups causing high memory usage and potentially Out-of-Memory (MOD-6123, MOD-5639) + +* **Probabilistic data structures**: + * [#753](https://github.com/RedisBloom/RedisBloom/issues/753) Potential crash on `CMS.MERGE` when using invalid arguments + +**Redis version** +* [Redis 6.2.14](https://github.com/redis/redis/releases/tag/6.2.14) + +**Module versions** +* __[RediSearch 2.6.16](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.16)__ +* __[RedisJSON 2.4.8](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.8)__ +* __[RedisGraph 2.10.12](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.15)__ +* __[RedisTimeSeries 1.8.12](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.12)__ +* __[RedisBloom 2.4.9](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.9)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.1.1 or greater](https://github.com/redis/jedis/releases/tag/v5.1.1) + * [redis-om-spring 0.8.8 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.8) +* Python + * [redis-py 5.0.2 or greater](https://github.com/redis/redis-py/releases/tag/v5.0.2) + * [redis-om-python 0.2.1 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.2.1) +* NodeJS + * [node-redis 4.6.13 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.13) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.6.1 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.6.1) + * [NRedisStack 0.11.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.11.0) +* Go + * [go-redis 9.5.1 or greater](https://github.com/redis/go-redis/releases/tag/v9.5.1) + * [rueidis 1.0.31 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.31) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.44](https://github.com/RedisInsight/RedisInsight/releases/tag/2.44.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Downloads + +* macOS: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v13.catalina.x86_64.zip), [arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v13.monterey.arm64.zip) +* AppImage: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v13-x86_64.AppImage) +* Ubuntu: [Bionic x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v13.bionic.x86_64.tar.gz), [Bionic arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v13.bionic.arm64.tar.gz), [Focal x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v13.focal.x86_64.tar.gz), [Focal arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v13.focal.arm64.tar.gz), [Snap x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v13.x86_64.snap), [Snap arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v13.arm64.snap), [Jammy x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v13.jammy.x86_64.tar.gz), [Jammy arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v13.jammy.arm64.tar.gz) +* Debian: [Bullseye x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v13.bullseye.x86_64.tar.gz) +* RHEL 7/CentOS Linux 7: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v13.rhel7.x86_64.tar.gz) +* RHEL 8/CentOS Linux 8: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v13.rhel8.x86_64.tar.gz) +* Redis Stack on [Dockerhub](https://hub.docker.com/u/redis): [x86_64 and arm64](https://hub.docker.com/r/redis/redis-stack) +* Redis Stack server on [Dockerhub](https://hub.docker.com/u/redis): [x86_64 and arm64](https://hub.docker.com/r/redis/redis-stack-server) + +## Redis Stack Server 6.2.6-v12 (January 2024) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `HIGH`: There is a critical bug fixed in the probabilistic data structures that may affect a subset of users. Upgrade! + +### Headlines: +This maintenance release contains the new version of **probabilistic** data structures with a critical bug fix, the new version of **JSON** data structure with added support for CBL-Mariner 2, and a fix to add keyspace notifications for `JSON.TOGGLE`. It also contains the latest version of **RedisInsight**. + +### Details: + + **Improvements** +* **JSON**: + * [#1149](https://github.com/RedisJSON/RedisJSON/pull/1149) Added support for CBL-Mariner 2 + +**Bug Fixes** +* **JSON**: + * [#1025](https://github.com/RedisJSON/RedisJSON/pull/1025) `JSON.TOGGLE` - missing keyspace notification + +* **Probabilistic data structures**: + * [#727](https://github.com/RedisBloom/RedisBloom/pull/727) Potential crash on `CF.LOADCHUNK` (MOD-6344) - Additional fixes + +**Redis version** +* [Redis 6.2.14](https://github.com/redis/redis/releases/tag/6.2.14) + +**Module versions** +* __[RediSearch 2.6.15](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.15)__ +* __[RedisJSON 2.4.8](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.8)__ +* __[RedisGraph 2.10.12](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.12)__ +* __[RedisTimeSeries 1.8.12](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.12)__ +* __[RedisBloom 2.4.8](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.8)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.1.0 or greater](https://github.com/redis/jedis/releases/tag/v5.1.0) + * [redis-om-spring 0.8.8 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.8) +* Python + * [redis-py 5.0.1 or greater](https://github.com/redis/redis-py/releases/tag/v5.0.1) + * [redis-om-python 0.2.1 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.2.1) +* NodeJS + * [node-redis 4.6.12 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.12) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.6.1 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.6.1) + * [NRedisStack 0.11.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.11.0) +* Go + * [go-redis 9.4.0 or greater](https://github.com/redis/go-redis/releases/tag/v9.4.0) + * [rueidis 1.0.27 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.27) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.40](https://github.com/RedisInsight/RedisInsight/releases/tag/2.40.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack Server 6.2.6-v11 (January 2024) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `SECURITY`: there are security fixes in the release. + +### Headlines: +This version contains the latest **time series data** structure with a security fix to not expose internal commands, a fix for potential crashes when using an invalid argument value, and support for CBL-Mariner 2. The new Redis Stack version introduces security fixes for **probabilistic data structures** to avoid potential crashes. It also includes the latest **search and query** capability with several bug fixes and improvements. This version contains the latest version of **RedisInsight**. + +### Details: + + **Security and privacy** +* **Time series**: + * [#1506](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1506)​​ Don’t expose internal commands (MOD-5643) + +* **Probabilistic data structures**: + * [#721](https://github.com/RedisBloom/RedisBloom/issues/721) Potential crash on `CF.RESERVE` (MOD-6343) + * [#722](https://github.com/RedisBloom/RedisBloom/issues/722) Potential crash on `CF.LOADCHUNK` (MOD-6344) + + **Improvements** +* **Search and query**: + * [#4176](https://github.com/RediSearch/RediSearch/pull/4176) Initialization of the maximum numeric value range leading to a better balance of the index leaf splitting (MOD-6232) + * [#4123](https://github.com/RediSearch/RediSearch/pull/4123) Possibly problematic index name alias check-in command multiplexing (MOD-5945) + * [#4195](https://github.com/RediSearch/RediSearch/pull/4195) Query optimisation when predicate contains multiple `INTERSECTION` (AND) of `UNION` (OR) (MOD-5910) + +* **Time series**: + * [#1516](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1516) Added support for CBL-Mariner 2 + +**Bug Fixes** +* **Search and query**: + * [#4244](https://github.com/RediSearch/RediSearch/pull/4244), [#4255](https://github.com/RediSearch/RediSearch/pull/4255) Profiling `FT.AGGREGATE` using the `WITHCURSOR` flag cause a crash due to timeout (MOD-5512) + * [#4238](https://github.com/RediSearch/RediSearch/pull/4238) Memory excessively growing on databases caused by unbalanced nodes on inverted index trie (MOD-5880, MOD-5952, MOD-6003) + * [#3995](https://github.com/RediSearch/RediSearch/pull/3995) `FT.CURSOR READ` with geo queries causing a crash when data is updated between the cursor reads (MOD-5646) + * [#4155](https://github.com/RediSearch/RediSearch/pull/4155) `FT.SEARCH` not responding when using TLS encryption on Amazon Linux 2 (MOD-6012) + +* **Time series**: + * [#1494](https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1494) Potential crash when using an invalid argument value + +**Redis version** +* [Redis 6.2.14](https://github.com/redis/redis/releases/tag/6.2.14) + +**Module versions** +* __[RediSearch 2.6.15](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.15)__ +* __[RedisJSON 2.4.7](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.7)__ +* __[RedisGraph 2.10.12](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.12)__ +* __[RedisTimeSeries 1.8.12](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.12)__ +* __[RedisBloom 2.4.7](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.7)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.1.0 or greater](https://github.com/redis/jedis/releases/tag/v5.1.0) + * [redis-om-spring 0.8.7 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.7) +* Python + * [redis-py 5.0.1 or greater](https://github.com/redis/redis-py/releases/tag/v5.0.1) + * [redis-om-python 0.2.1 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.2.1) +* NodeJS + * [node-redis 4.6.12 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.12) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.6.1 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.6.1) + * [NRedisStack 0.11.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.11.0) +* Go + * [go-redis 9.4.0 or greater](https://github.com/redis/go-redis/releases/tag/v9.4.0) + * [rueidis 1.0.26 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.26) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.40](https://github.com/RedisInsight/RedisInsight/releases/tag/2.40.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack Server 6.2.6-v10 (November 2023) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `SECURITY`: there are security fixes in the release. + +### Headlines: +This version contains a security fix for the Redis server to avoid bypassing desired Unix socket permissions on startup. It also includes the latest Search and Query capability with a fix to limit the maximum phonetic length and several bug fixes. This version contains the latest version of RedisInsight. + +### Details: + + **Security and privacy:** +* **Redis**: + * (CVE-2023-45145) The wrong order of `listen(2)` and `chmod(2)` calls creates a race condition that can be used by another process to bypass desired Unix socket permissions on startup. + +* **Search and Query**: + * [#3844](https://github.com/RediSearch/RediSearch/pull/3844) Limits maximum phonetic length avoiding to be exploited (MOD 5767) + +**Bug Fixes** +* **Search and Query**: + * [#3771](https://github.com/RediSearch/RediSearch/pull/3771) Broken lower and upper `APPLY` functions in `FT.AGGREGATE` on `DIALECT 3` (MOD-5041) + * [#3910](https://github.com/RediSearch/RediSearch/pull/3910) Heavy document updates causing memory growth once memory blocks weren't properly released (MOD-5181) + * [#3853](https://github.com/RediSearch/RediSearch/pull/3853) Queries with `WITHCURSOR` making memory growth since `CURSOR` wasn't invalidated in the shards (MOD-5580) + * [#3752](https://github.com/RediSearch/RediSearch/pull/3752) Setting low `MAXIDLE` parameter value in `FT.AGGREGATE` causes a crash (MOD-5608) + * [#3823](https://github.com/RediSearch/RediSearch/pull/3823) `APPLY` or `FILTER` expression causing a leak (MOD-5751) + * [#3837](https://github.com/RediSearch/RediSearch/pull/3837) Connection using TLS fails on Redis (MOD-5768) + * [#3856](https://github.com/RediSearch/RediSearch/pull/3856) Adding new nodes to OSS cluster causing a crash (MOD-5778) + * [#3854](https://github.com/RediSearch/RediSearch/pull/3854) Vector range query could cause Out-of-Memory due a memory corruption (MOD-5791) + * [#3892](https://github.com/RediSearch/RediSearch/pull/3892) After cleaning the index the GC could cause corruption on unique values (MOD-5815) + + + +**Redis version** +* [Redis 6.2.14](https://github.com/redis/redis/releases/tag/6.2.14) + +**Module versions** +* __[RediSearch 2.6.14](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.14)__ +* __[RedisJSON 2.4.7](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.7)__ +* __[RedisGraph 2.10.12](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.12)__ +* __[RedisTimeSeries 1.8.11](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.11)__ +* __[RedisBloom 2.4.5](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.5)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.0.2 or greater](https://github.com/redis/jedis/releases/tag/v5.0.2) + * [redis-om-spring 0.8.7 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.7) +* Python + * [redis-py 5.0.1 or greater](https://github.com/redis/redis-py/releases/tag/v5.0.1) + * [redis-om-python 0.2.1 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.2.1) +* NodeJS + * [node-redis 4.6.10 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.10) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.5.4 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.5.4) + * [NRedisStack 0.10.1 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.10.1) +* Go + * [go-redis 9.3.0 or greater](https://github.com/redis/go-redis/releases/tag/v9.3.0) + * [rueidis 1.0.22 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.22) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.36](https://github.com/RedisInsight/RedisInsight/releases/tag/2.36.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Downloads + +* macOS: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v10.catalina.x86_64.zip), [arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v10.monterey.arm64.zip) +* AppImage: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v10-x86_64.AppImage) +* Ubuntu: [Bionic x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v10.bionic.x86_64.tar.gz), [Bionic arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v10.bionic.arm64.tar.gz), [Focal x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v10.focal.x86_64.tar.gz), [Focal arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v10.focal.arm64.tar.gz), [Snap x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v10.x86_64.snap), [Snap arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v10.arm64.snap), [Jammy x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v10.jammy.x86_64.tar.gz), [Jammy arm64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v10.jammy.arm64.tar.gz) +* Debian: [Bullseye x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v10.bullseye.x86_64.tar.gz) +* RHEL 7/CentOS Linux 7: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v10.rhel7.x86_64.tar.gz) +* RHEL 8/CentOS Linux 8: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-6.2.6-v10.rhel8.x86_64.tar.gz) +* Redis Stack on [Dockerhub](https://hub.docker.com/u/redis): [x86_64 and arm64](https://hub.docker.com/r/redis/redis-stack) +* Redis Stack server on [Dockerhub](https://hub.docker.com/u/redis): [x86_64 and arm64](https://hub.docker.com/r/redis/redis-stack-server) + +## Redis Stack Server 6.2.6-v9 (July 2023) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `HIGH`: There is a critical bug that may affect a subset of users. Upgrade! + +### Headlines: +This version contains the latest Search and Query capability v. 2.6.12, time series v. 1.8.11, and graph v. 2.10.12 with fixes and improvements. It also includes the latest version of RedisInsight. + +### Details: + + **Improvements** +* **Search and Query**: + * [#3628](https://github.com/RediSearch/RediSearch/pull/3628) Background indexing scanning performance + * [#3259](https://github.com/RediSearch/RediSearch/pull/3259) Allow alias name beginning with `as` + * [#3641](https://github.com/RediSearch/RediSearch/pull/3641) Indexing sanitizing trigger in heavily data updates scenario + +* **Time series**: + * [#1476](https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1476) Significant performance improvement when using multiple label filters (`TS.MGET`, `TS.MRANGE`, `TS.MREVRANGE`, and `TS.QUERYINDEX`) + +**Bug Fixes** +* **Search and Query**: + * [#3557](https://github.com/RediSearch/RediSearch/pull/3557) `TIMEOUT` configuration on `FT.AGGREGATE` query being ignored + * [#3552](https://github.com/RediSearch/RediSearch/pull/3552) `FT.CURSOR READ` on `JSON` numeric queries not returning results + * [#3606](https://github.com/RediSearch/RediSearch/pull/3606) Update numeric inverted index `numEntries` avoiding excessive memory consumption + * [#3597](https://github.com/RediSearch/RediSearch/pull/3597) Duplicating alias as output name on `FT.AGGREGATE` reducer (`REDUCE` argument) isn't return results + * [#3654](https://github.com/RediSearch/RediSearch/pull/3654) Added check for @ prefix on `GROUPBY` fields returnig an error instead of wrong results + +* **Time series**: + * [#1486](https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1486) When using `LATEST`, results may contain samples earlier than `fromTimestamp` (`TS.RANGE`, `TS.REVRANGE`, `TS.MRANGE`, and `TS.MREVRANGE`) + * [#1471](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1471) Potential crash on `TS.MRANGE` when aggregating millions of time series + * [#1469](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1469) Potential memory leak in `TS.MRANGE` after eviction + +* **Graph**: + * [#3129](https://github.com/RedisGraph/RedisGraph/pull/3129) Crash on certain queries (`INDEX SCAN` followed by `DEL` followed by `SET`) + +**Redis version** +* [Redis 6.2.13](https://github.com/redis/redis/blob/6.2.13/00-RELEASENOTES) + +**Module versions** +* __[RediSearch 2.6.12](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.12)__ +* __[RedisJSON 2.4.7](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.7)__ +* __[RedisGraph 2.10.12](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.12)__ +* __[RedisTimeSeries 1.8.11](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.11)__ +* __[RedisBloom 2.4.5](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.5)__ + +**Recommended Client Libraries** +* Java + * [Jedis 4.4.3 or greater ](https://github.com/redis/jedis/releases/tag/v4.4.3) + * [redis-om-spring 0.8.4 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.4) +* Python + * [redis-py 4.6.0 or greater ](https://github.com/redis/redis-py/releases/tag/v4.6.0) + * [redis-om-python 0.1.2 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.1.2) +* NodeJS + * [node-redis 4.6.7 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.7) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.5.2 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.5.2) + * [NRedisStack 0.8.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.8.0) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.28](https://github.com/RedisInsight/RedisInsight/releases/tag/2.28.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack Server 6.2.6-v8 (July 2023) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `SECURITY`: there are security fixes in the release. + +### Headlines: +This version contains security improvements for the Redis server. + +### Details: + + **Improvements** +* **Redis**: + * ([CVE-2022-24834](https://github.com/redis/redis/security/advisories/GHSA-p8x2-9v9q-c838)) A specially crafted Lua script executing in Redis can trigger +a heap overflow in the cjson and cmsgpack libraries, and result in heap +corruption and potentially remote code execution. The problem exists in all +versions of Redis with Lua scripting support, starting from 2.6, and affects +only authenticated and authorized users. + * ([CVE-2023-36824](https://github.com/redis/redis/security/advisories/GHSA-4cfx-h9gq-xpx3)) Extracting key names from a command and a list of arguments +may, in some cases, trigger a heap overflow and result in reading random heap +memory, heap corruption and potentially remote code execution. Specifically: +using COMMAND GETKEYS* and validation of key names in ACL rules. + +**Bug Fixes** +* **Redis**: + * [#12276](https://github.com/redis/redis/pull/12276) Re-enable downscale rehashing while there is a fork child + +**Redis version** +* [Redis 6.2.13](https://github.com/redis/redis/blob/6.2.13/00-RELEASENOTES) + +**Module versions** +* __[RediSearch 2.6.9](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.9)__ +* __[RedisJSON 2.4.7](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.7)__ +* __[RedisGraph 2.10.10](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.10)__ +* __[RedisTimeSeries 1.8.10](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.10)__ +* __[RedisBloom 2.4.5](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.5)__ + +**Recommended Client Libraries** +* Java + * [Jedis 4.3.1 or greater ](https://github.com/redis/jedis/releases/tag/v4.3.1) + * [redis-om-spring](https://github.com/redis/redis-om-spring) +* Python + * [redis-py 4.5.4 or greater ](https://github.com/redis/redis-py/releases/tag/v4.5.4) + * [redis-om-python](https://github.com/redis/redis-om-python) +* NodeJS + * [node-redis 4.6.5 or greater](https://www.npmjs.com/package/redis) + * [redis-om-node](https://github.com/redis/redis-om-node) +* .NET + * [redis-om-dotnet](https://github.com/redis/redis-om-dotnet) + * [NRedisStack](https://github.com/redis/NRedisStack) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight](https://github.com/RedisInsight/RedisInsight/releases/). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack Server 6.2.6-v7 (April 2023) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `SECURITY`: there are security fixes in the release. + +### Headlines: +This version contains the latest RediSearch 2.6.9, RedisJSON 2.4.7, RedisGraph 2.10.10, RedisTimeSeries 1.8.10, and RedisBloom 2.4.5, RedisInsight 2.22 and new Redis server 6.2.12 with fixes to security issues. + +### Details: + +**Improvements**: +* Redis [#12057](https://github.com/redis/redis/pull/12057) Authenticated users can use the [HINCRBYFLOAT](https://redis.io/commands/hincrbyfloat/) command to create an invalid hash field that will crash Redis on access +* RediSearch [#3430](https://github.com/RediSearch/RediSearch/pull/3430) Improve `min-max heap` structure for better readability and performance +* RediSearch [#3450](https://github.com/RediSearch/RediSearch/pull/3450) Display `NOHL` option in `FT.INFO` command +* RediSearch [#3534](https://github.com/RediSearch/RediSearch/pull/3534) Vector Similarity 0.6.1: Improve multi-value index deletion logic [(#346)](https://github.com/RedisAI/VectorSimilarity/pull/346) + +**Bug Fixes** +* RediSearch [#3468](https://github.com/RediSearch/RediSearch/pull/3468) KNN searching for 0 vectors with a filter resulted in crash +* RediSearch [#3499](https://github.com/RediSearch/RediSearch/pull/3499) `MAXSEARCHRESULTS` set to `0` causing `FT.SEARCH` crash +* RediSearch [#3494](https://github.com/RediSearch/RediSearch/pull/3494) Removing `MAXSEARCHRESULTS`limit causes crash on `FT.AGGREGATE` +* RediSearch [#3504](https://github.com/RediSearch/RediSearch/pull/3504) Uninitialised vector similarity query parameter bug +* RedisJSON [#947](https://github.com/RedisJSON/RedisJSON/issues/947) Using array slice operator (`[start:end:step]`) with step `0` causes crash +* RedisGraph [#3038](https://github.com/RedisGraph/RedisGraph/issues/3038) Potential crash when a query with a `UNION` clause sets or modifies an indexed property +* RedisGraph [#2631](https://github.com/RedisGraph/RedisGraph/issues/2631), [#2968](https://github.com/RedisGraph/RedisGraph/issues/2968) Potential crash on certain `MATCH` clauses where label filters are used +* RedisGraph [#2957](https://github.com/RedisGraph/RedisGraph/issues/2957) Label filters in expressions such as `WITH n MATCH (n:X)` are ignored +* RedisGraph [#2931](https://github.com/RedisGraph/RedisGraph/issues/2931), [#3027](https://github.com/RedisGraph/RedisGraph/issues/3027) Wrong overflow error message +* RedisTimeSeries [#1455](https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1455) [TS.ADD](https://redis.io/commands/ts.add/) - optional arguments are not replicated + +**Redis version** +* [Redis 6.2.12](https://github.com/redis/redis/blob/6.2.12/00-RELEASENOTES) + +**Module versions** +* __[RediSearch 2.6.9](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.9)__ +* __[RedisJSON 2.4.7](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.7)__ +* __[RedisGraph 2.10.10](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.10)__ +* __[RedisTimeSeries 1.8.10](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.10)__ +* __[RedisBloom 2.4.5](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.5)__ + +**Recommended Client Libraries** +* Java + * [Jedis 4.3.1 or greater ](https://github.com/redis/jedis/releases/tag/v4.3.1) + * [redis-om-spring](https://github.com/redis/redis-om-spring) +* Python + * [redis-py 4.5.4 or greater ](https://github.com/redis/redis-py/releases/tag/v4.5.4) + * [redis-om-python](https://github.com/redis/redis-om-python) +* NodeJS + * [node-redis 4.6.5 or greater](https://www.npmjs.com/package/redis) + * [redis-om-node](https://github.com/redis/redis-om-node) +* .NET + * [redis-om-dotnet](https://github.com/redis/redis-om-dotnet) + * [NRedisStack](https://github.com/redis/NRedisStack) + +Compatible with the latest [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.22](https://github.com/RedisInsight/RedisInsight/releases/tag/2.22.1). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack Server 6.2.6-v6 (March 2023) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `MODERATE`: Program an upgrade of the server, but it's not urgent. + +### Headlines: +This version contains the latest RedisTimeSeries 1.8.9 with bugs fixed. + +### Details: + +**Bug Fixes** +* RedisTimeSeries [#1421](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1421) Potential crash after deleting from a time series with an `AVG` compaction +* RedisTimeSeries [#1422](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1422) Incorrectly return an error when deleting from a time series with a compaction and with no expiry + + +**Redis version** +* [Redis 6.2.11](https://github.com/redis/redis/blob/6.2.11/00-RELEASENOTES) + + +**Module versions** +* __[RediSearch 2.6.6](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.6)__ +* __[RedisJSON 2.4.6](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.6)__ +* __[RedisGraph 2.10.9](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.9)__ +* __[RedisTimeSeries 1.8.9](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.9)__ +* __[RedisBloom 2.4.5](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.5)__ + +**Recommended Client Libraries** +* Java + * [Jedis 4.3.1 or greater ](https://github.com/redis/jedis/releases/tag/v4.3.1) + * [redis-om-spring](https://github.com/redis/redis-om-spring) +* Python + * [redis-py 4.4.0 or greater ](https://github.com/redis/redis-py/releases/tag/v4.4.0) + * [redis-om-python](https://github.com/redis/redis-om-python) +* NodeJS + * [node-redis 4.5.0 or greater](https://www.npmjs.com/package/redis) + * [redis-om-node](https://github.com/redis/redis-om-node) +* .NET + * [redis-om-dotnet](https://github.com/redis/redis-om-dotnet) + * [NRedisStack](https://github.com/redis/NRedisStack) + +Compatible with the latest [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.20](https://github.com/RedisInsight/RedisInsight/releases/tag/2.20.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack Server 6.2.6-v5 (March 2023) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `HIGH`: There is a critical bug that may affect a subset of users. Upgrade! + +### Headlines: +This version contains the latest RediSearch 2.6.6, RedisJSON 2.4.6, RedisGraph 2.10.9, RedisTimeSeries 1.8.8, RedisBloom 2.4.5, and RedisInsight 2.20 with improvements and bugs fixed. + +### Details: +**Improvements** +* RediSearch [ #3397](https://github.com/RediSearch/RediSearch/pull/3397) Improve the Vecsim initial capacity default value +* RediSearch and RedisJSON [#3418](https://github.com/RediSearch/RediSearch/pull/3418) Add support to OS Amazon Linux 2 +* RediSearch and RedisJSON - Add full OS list on RAMP file +* RedisBloom - Internal changes for supporting future Redis Enterprise releases + +**Bug Fixes** +* RediSearch [#3403](https://github.com/RediSearch/RediSearch/pull/3403) Fix suffix and prefix matching when using `CASESENSITIVE` flag +* RedisJSON [#912](https://github.com/RedisJSON/RedisJSON/pull/912) Fix actual memory usage calculation +* RedisGraph [#2880](https://github.com/RedisGraph/RedisGraph/issues/2880) Potential crash when using `WITH *` expressions +* RedisGraph [#2917](https://github.com/RedisGraph/RedisGraph/issues/2917) Potential crash when using `CASE` expressions +* RedisGraph [#2836](https://github.com/RedisGraph/RedisGraph/issues/2836) Potential crash on `*0` variable-length path +* RedisGraph [#2916](https://github.com/RedisGraph/RedisGraph/issues/2916) Potential crash when executing concurrent queries that utilize full-text indices +* RedisTimeSeries [#1290](https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1290) Potential crash when using `FILTER_BY_TS` +* RedisTimeSeries [#1397](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1397) Memory leak when trying to create an already existing key + +**Redis version** +* [Redis 6.2.11](https://github.com/redis/redis/blob/6.2.11/00-RELEASENOTES) + +**Module versions** +* __[RediSearch 2.6.6](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.6)__ +* __[RedisJSON 2.4.6](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.6)__ +* __[RedisGraph 2.10.9](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.9)__ +* __[RedisTimeSeries 1.8.8](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.8)__ +* __[RedisBloom 2.4.5](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.5)__ + +**Recommended Client Libraries** +* Java + * [Jedis 4.3.1 or greater ](https://github.com/redis/jedis/releases/tag/v4.3.1) + * [redis-om-spring](https://github.com/redis/redis-om-spring) +* Python + * [redis-py 4.4.0 or greater ](https://github.com/redis/redis-py/releases/tag/v4.4.0) + * [redis-om-python](https://github.com/redis/redis-om-python) +* NodeJS + * [node-redis 4.5.0 or greater](https://www.npmjs.com/package/redis) + * [redis-om-node](https://github.com/redis/redis-om-node) +* .NET + * [redis-om-dotnet](https://github.com/redis/redis-om-dotnet) + * [NRedisStack](https://github.com/redis/NRedisStack) + +Compatible with the latest [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.20](https://github.com/RedisInsight/RedisInsight/releases/tag/2.20.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack Server 6.2.6-v4 (February 2023) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `LOW`: No need to upgrade unless there are new features you want to use. + +### Headlines: +This version contains the latest RedisJSON 2.4.5 with support for Ubuntu 20 - Focal Fossa OS. + +**Module versions** +* __[RediSearch 2.6.5](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.5)__ +* __[RedisJSON 2.4.5](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.5)__ +* __[RedisGraph 2.10.8](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.8)__ +* __[RedisTimeSeries 1.8.5](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.5)__ +* __[RedisBloom 2.4.4](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.4)__ + +**Recommended Client Libraries** +* Java + * [Jedis 4.3.1 or greater ](https://github.com/redis/jedis/releases/tag/v4.3.1) + * [redis-om-spring](https://github.com/redis/redis-om-spring) +* Python + * [redis-py 4.4.0 or greater ](https://github.com/redis/redis-py/releases/tag/v4.4.0) + * [redis-om-python](https://github.com/redis/redis-om-python) +* NodeJS + * [node-redis 4.5.0 or greater](https://www.npmjs.com/package/redis) + * [redis-om-node](https://github.com/redis/redis-om-node) +* .NET + * [redis-om-dotnet](https://github.com/redis/redis-om-dotnet) + * [NRedisStack](https://github.com/redis/NRedisStack) + +Compatible with the latest [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.18](https://github.com/RedisInsight/RedisInsight/releases/tag/2.18.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack Server 6.2.6-v3 (February 2023) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `HIGH`: There is a critical bug that may affect a subset of users. Upgrade! + +### Headlines: +This version contains the latest RediSearch 2.6.5, RedisJSON 2.4.4, RedisGraph 2.10.8, RedisBloom 2.4.4, and RedisInsight 2.18 with new features and bugs fixed. + +### Details: +**Improvements** +* RediSearch [#3361](https://github.com/RediSearch/RediSearch/pull/3361) Enable the use of IPv6 for all cluster and module communication +* RedisJSON [#813](https://github.com/RedisJSON/RedisJSON/pull/813) - Improve the errors messages in modules [#725](https://github.com/RedisJSON/RedisJSON/issues/725) +* RedisJSON [#918](https://github.com/RedisJSON/RedisJSON/pull/918) - Add IPv6 on the capability list +* RedisGraph [#2790](https://github.com/RedisGraph/RedisGraph/pull/2790) Improved performance by disabling SuiteSparse:GraphBLAS' global free pool +* RedisGraph [#2758](https://github.com/RedisGraph/RedisGraph/pull/2758) Improved edge deletion performance +* RedisGraph [#2781](https://github.com/RedisGraph/RedisGraph/issues/2781) `indegree` and `outdegree` now also accept an argument which is a list of labels +* RedisBloom [#389](https://github.com/RedisBloom/RedisBloom/issues/389) Introduce `BF.CARD` to retrieve the cardinality of a Bloom filter or 0 when such key does not exist + +**Bug Fixes** +* RediSearch [#3354](https://github.com/RediSearch/RediSearch/pull/3354) Library update preventing a crash during cluster failover +* RediSearch [#3357](https://github.com/RediSearch/RediSearch/pull/3357) Handling division by zero in expressions preventing nodes to restart +* RediSearch [#3332](https://github.com/RediSearch/RediSearch/pull/3332) Fix wildcards * queries on `DIALECT 2` and `DIALECT 3` +* RedisJSON [#919](https://github.com/RedisJSON/RedisJSON/pull/919) Possible failure loading `.rdb` files +* RedisGraph [#2777](https://github.com/RedisGraph/RedisGraph/issues/2777), [#2841](https://github.com/RedisGraph/RedisGraph/issues/2841) Potential crash when sending queries from multiple connections and timeout is not 0 +* RedisGraph [#2844](https://github.com/RedisGraph/RedisGraph/issues/2844) Potential partial results when same parametrized query is running from multiple connections +* RedisGraph [#2739](https://github.com/RedisGraph/RedisGraph/issues/2739), [#2774](https://github.com/RedisGraph/RedisGraph/issues/2774) Paths with exact variable length >1 are not matched +* RedisGraph [#2794](https://github.com/RedisGraph/RedisGraph/issues/2794) `toInteger` and `toIntegerOrNull` don't convert Booleans +* RedisGraph [#2798](https://github.com/RedisGraph/RedisGraph/issues/2798) `right` and `left` should reply with an error when `length` is null +* RedisGraph [#2809](https://github.com/RedisGraph/RedisGraph/issues/2809) `TIMEOUT_MAX` configuration parameter in not enforced when `TIMEOUT_DEFAULT` is 0 +* RedisGraph [#2780](https://github.com/RedisGraph/RedisGraph/issues/2780) `indegree` and `outdegree` - relationships are counted more than once when same relationship type is supplied more than once +* RedisBloom [#609](https://github.com/RedisBloom/RedisBloom/issues/609) `CF.INFO` - incorrect information for large filters + +**Redis version** +* [Redis 6.2.10](https://github.com/redis/redis/blob/6.2.10/00-RELEASENOTES) + +**Module versions** +* __[RediSearch 2.6.5](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.5)__ +* __[RedisJSON 2.4.4](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.4)__ +* __[RedisGraph 2.10.8](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.8)__ +* __[RedisTimeSeries 1.8.5](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.5)__ +* __[RedisBloom 2.4.4](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.4)__ + +**Recommended Client Libraries** +* Java + * [Jedis 4.3.1 or greater ](https://github.com/redis/jedis/releases/tag/v4.3.1) + * [redis-om-spring](https://github.com/redis/redis-om-spring) +* Python + * [redis-py 4.4.0 or greater ](https://github.com/redis/redis-py/releases/tag/v4.4.0) + * [redis-om-python](https://github.com/redis/redis-om-python) +* NodeJS + * [node-redis 4.5.0 or greater](https://www.npmjs.com/package/redis) + * [redis-om-node](https://github.com/redis/redis-om-node) +* .NET + * [nredisstack 0.5.0 or greater](https://www.nuget.org/packages/nredisstack/) + * [redis-om-dotnet](https://github.com/redis/redis-om-dotnet) + +Compatible with the latest [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for is bundled with [RedisInsight 2.18](https://github.com/RedisInsight/RedisInsight/releases/tag/2.18.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack Server 6.2.6-v2 (January 2023) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `HIGH`: There is a critical bug that may affect a subset of users. Upgrade! + +### Headlines: +This version contains the latest RedisInsight 2.16 and RedisTimeSeries 1.8.5 with bugs fixed. + +### Details: +**Bug Fixes** +* RedisTimeSeries [#1388](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1388) Potential crash when upgrading from v1.6 to 1.8 if there are compactions with `min` or `max` aggregation + +**Redis version** (no changes) +* [Redis 6.2.8](https://github.com/redis/redis/blob/6.2.7/00-RELEASENOTES) + +**Module versions** +* __[RediSearch 2.6.4](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.4)__ +* __[RedisJSON 2.4.3](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.3)__ +* __[RedisGraph 2.10.5](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.5)__ +* __[RedisTimeSeries 1.8.5](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.5)__ +* __[RedisBloom 2.4.3](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.3)__ + +**Recommended Client Libraries** +* Java + * [Jedis 4.3.1 or greater ](https://github.com/redis/jedis/releases/tag/v4.3.1) + * [redis-om-spring](https://github.com/redis/redis-om-spring) +* Python + * [redis-py 4.4.0 or greater ](https://github.com/redis/redis-py/releases/tag/v4.4.0) + * [redis-om-python](https://github.com/redis/redis-om-python) +* NodeJS + * [node-redis 4.5.0 or greater](https://www.npmjs.com/package/redis) + * [redis-om-node](https://github.com/redis/redis-om-node) +* .NET + * [redis-om-dotnet](https://github.com/redis/redis-om-dotnet) + +Compatible with the latest [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.16](https://github.com/RedisInsight/RedisInsight/releases/tag/2.16.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack 6.2.6-v1 (January 2023) + +This is a maintenance release for Redis Stack Server 6.2.6 + +Update urgency: `HIGH`: There is a critical bug that may affect a subset of users. Upgrade! + +### Headlines: +This version contains the latest RediSearch 2.6.4, RedisJSON 2.4.3, RedisGraph 2.10.5, and RedisTimeSeries 1.8.4 with new features and bugs fixed. + +### Details: +**Improvements** +* RediSearch [#3256](https://github.com/RediSearch/RediSearch/pull/3256) Support IPv6 on cluster set command +* RediSearch [#3194](https://github.com/RediSearch/RediSearch/pull/3194) Add the query dialects that are in use to `FT.INFO` and `INFO MODULE` commands +* RediSearch [#3258](https://github.com/RediSearch/RediSearch/pull/3258) Add the module version and Redis version to `INFO MODULE` +* RedisJSON [#892](https://github.com/RedisJSON/RedisJSON/pull/892) Allow `JSON.ARRINDEX` with none scalar values +* RedisGraph [#2757](https://github.com/RedisGraph/RedisGraph/pull/2757) Improved performance of `indegree` and `outdegree` +* RedisGraph [#2681](https://github.com/RedisGraph/RedisGraph/issues/2681) Fixed some error messages +* RedisGraph [#2740](https://github.com/RedisGraph/RedisGraph/issues/2740) Don’t show partial results for timed-out [GRAPH.PROFILE](https://redis.io/commands/graph.profile/) +* RedisTimeSeries [#1215](https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1215) OSS cluster: Support TLS and IPv6; Introduce new configuration parameter: [OSS_GLOBAL_PASSWORD](https://redis.io/docs/stack/timeseries/configuration/#oss_global_password) + +**Bug Fixes** +* RediSearch [#3289](https://github.com/RediSearch/RediSearch/pull/3289) Potential crash when querying multiple fields +* RediSearch [#3279](https://github.com/RediSearch/RediSearch/pull/3279) Potential crash when querying using wildcard * on TAG field +* RedisJSON [#890](https://github.com/RedisJSON/RedisJSON/pull/890) JSONPath ignores any filter condition beyond the second +* RedisGraph [#2754](https://github.com/RedisGraph/RedisGraph/pull/2754) Partial sync may hang +* RedisTimeSeries [#1360](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1360) Potential crash when upgrading from v1.6 to 1.8 if there are compactions with `min` or `min` aggregation +* RedisTimeSeries [#1370](https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1370) Potential crash when using [TS.REVRANGE](https://redis.io/commands/ts.revrange/) or [TS.MREVRANGE](https://redis.io/commands/ts.mrevrange/) with aggregation +* RedisTimeSeries [#1347](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1347) When adding samples with [TS.ADD](https://redis.io/commands/ts.add/) or [TS.MADD](https://redis.io/commands/ts.madd/) using * as timestamp, the timestamp could differ between master and replica shards + +**Redis version** (no changes) +* [Redis 6.2.8](https://github.com/redis/redis/blob/6.2.8/00-RELEASENOTES) + +**Module versions** +* __[RediSearch 2.6.4](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.4)__ +* __[RedisJSON 2.4.3](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.3)__ +* __[RedisGraph 2.10.5](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.5)__ +* __[RedisTimeSeries 1.8.4](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.4)__ +* __[RedisBloom 2.4.3 (v2.4.3)](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.3)__ + +**Recommended Client Libraries** +* Java + * [Jedis 4.3.1 or greater ](https://github.com/redis/jedis/releases/tag/v4.3.1) + * [redis-om-spring](https://github.com/redis/redis-om-spring) +* Python + * [redis-py 4.4.0 or greater ](https://github.com/redis/redis-py/releases/tag/v4.4.0) + * [redis-om-python](https://github.com/redis/redis-om-python) +* NodeJS + * [node-redis 4.5.0 or greater](https://www.npmjs.com/package/redis) + * [redis-om-node](https://github.com/redis/redis-om-node) +* .NET + * [redis-om-dotnet](https://github.com/redis/redis-om-dotnet) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.14](https://github.com/RedisInsight/RedisInsight/releases/tag/2.14.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack Server 6.2.6-v0 (December 2022) + +This is a GA release of Redis Stack version 6.2.6 + +### Headlines: +* Query & Search: + - multi-value index and query for: text, tag, numeric, geo and vector! + - suffix search `*vatore` and wildcard search `ant?rez` + - support for FP64 vectors and range queries from a given vector +* New faster JSONPath parser +* New probabilistic data structure: t-digest +* New path-finding algorithms `algo.SPpaths` and `algo.SSpaths` for Graph +* Support for gap filling for Time series + +### Details: +**RediSearch** introduces the following features: +* Support for [wildcard queries](https://redis.io/docs/stack/search/reference/query_syntax/#wildcard-matching) for TEXT and TAG fields, where + - `?` matches any single character + - `*` matches zero or more characters + - use `'` and `\` for escaping, other special characters are ignored + - Optimized wildcard query support (i.e., suffix trie) +* Multi-value indexing and querying + - Multi-value text search - perform full-text search on [array of string or on a JSONPath](https://redis.io/docs/stack/search/indexing_json/#index-json-arrays-as-tag) leading to multiple strings + - Support for Geo, Vector, Numeric, Tag + - Return JSON rather than scalars from multi-value attributes. This is enabled via Dialect 3 in order not to break existing applications. + - Support indexing and querying of multi-value JSONPath attributes and/or arrays (requires JSON >2.4.1) + - Support for `SORTABLE` fields on JSON in an implicit un-normalized form (UNF) +* Vector similarity 0.5.1: + - Better space optimization selection + - Aligning index capacity with block size + - Support FLOAT64 as vector data type + - Range query support + - Support query attributes for vector queries + +**RedisJSON** introduces the following features: +* Add JSONPath filter the regexp match operator +* Support legacy JSONpath with dollar `$` +* A new JSONPath library which enhances the performance of parsing any JSONPath expression in RedisJSON. +* Floating point numbers which become round numbers due to some operation, for example by `JSON.NUMINCRBY`, will now return as a floating point with a trailing `.0`, e.g., instead of just `42`, now `42.0` will be returned. + +**RedisBloom** introduces the following new features: +* A new sketch data structure: t-digest. t-digest is a sketch data structure for estimating quantiles based on a data stream or a large dataset of values. As for other sketch data structures, t-digest requires sublinear space and has controllable space-accuracy tradeoffs. + +**RedisGraph** introduces the following new features: +* New path-finding algorithms: + - The `algo.SPpaths` procedure returns one, _n_, or all minimal-weight, optionally bounded-cost, optionally bounded-length paths between a given pair of nodes. + - The `algo.SSpaths` procedure returns one, _n_, or all minimal-weight, optionally bounded-cost, optionally bounded-length paths from a given node. +* Introduce `SET` for adding node labels and `REMOVE` for removing node labels, node properties, and edge properties +* Support deleting paths with `DELETE` +* Introduce `toBoolean`, `toBooleanOrNull`, `toFloatOrNull`, `toIntegerOrNull`, `toStringOrNull`, `toBooleanList`, `toFloatList`, `toIntegerList`, `toStringList`, `properties`, `split`, `last`, `isEmpty`,`e`, `exp`, `log`, `log10`, `sin`, `cos`, `tan`, `cot`, `asin`, `acos`, `atan`, `atan2`, `degrees`, `radians`, `pi`, and `haversin` functions. +* Graph slow log can be reset with `GRAPH.SLOWLOG g RESET` +* Queries are now atomic (_Atomicity_ is the guarantee that each query either succeeds or fails with no side effects). Whenever a failure occurs, the query effect is rolled-back from an undo-log. + +**RedisTimeSeries** introduces the following new features: +* Introduction of a new aggregator: `twa` (time-weighted average) +* Introduction of a new optional `EMPTY` flag to `TS.RANGE`, `TS.REVRANGE`, `TS.MRANGE`, and `TS.MREVRANGE` to retrieve aggregations for empty buckets as well. +* Gap-filling: Using `EMPTY` when the aggregator is `twa` allows estimating the average of a continuous signal even for empty buckets based on linear interpolation of previous and next samples. Using `EMPTY` when the aggregator is `last` would repeat the value of the previous sample when the bucket is empty. +* Introduction of a new optional `BUCKETTIMESTAMP` parameter to `TS.RANGE`, `TS.REVRANGE`, `TS.MRANGE`, and `TS.MREVRANGE`. It is now possible to report the start time, the end time, or the mid time for each bucket. +* Introduction of a new optional `alignTimestamp` parameter to `TS.CREATERULE` and to `COMPACTION_POLICY` configuration parameter. It is now possible to define alignment for compaction rules, so one can, for example, aggregate daily events from 06:00 to 06:00 the next day. +* Introduction of additional reducer types in `GROUPBY` (`TS.MRANGE`, and `TS.MREVRANGE`): `avg`, `range`, `count`, `std.p`, `std.s`, `var.p`, and `var.s` +* Introduction of a new optional `LATEST` flag to `TS.GET`, `TS.MGET`, `TS.RANGE`, `TS.REVRANGE`, `TS.MRANGE`, and `TS.MREVRANGE`. it is possible to retrieve the latest (possibly partial) bucket as well. + +**Bug Fixes** (since 6.2.6-RC1): +* RediSearch [#3098](https://github.com/RediSearch/RediSearch/pull/3098) Wrong return value in Geo query +* RediSearch [#3230](https://github.com/RediSearch/RediSearch/pull/3230) Precalculated number of replies must be equal to actual number +* RediSearch [#3171](https://github.com/RediSearch/RediSearch/pull/3171) Shard of DB with RedisSearch 2.4.8/11 got restarted by node_wd +* RediSearch [#3197](https://github.com/RediSearch/RediSearch/pull/3197) RediSearch 2.4.15 crashed +* RediSearch [#3197](https://github.com/RediSearch/RediSearch/pull/3197) failure to create temporary indices +* RedisJSON [#850](https://github.com/RedisJSON/RedisJSON/pull/850) Allow repetition of filter relation instead of optional +* RedisGraph [#2695](https://github.com/RedisGraph/RedisGraph/pull/2695) Potential crash on certain write queries +* RedisGraph [#2724](https://github.com/RedisGraph/RedisGraph/pull/2724) Potential crash when setting property values based on nonexistent properties +* RedisGraph [#2460](https://github.com/RedisGraph/RedisGraph/issues/2460), [#2637](https://github.com/RedisGraph/RedisGraph/issues/2637), [#2680](https://github.com/RedisGraph/RedisGraph/issues/2680) Crash on invalid queries +* RedisGraph [#2672](https://github.com/RedisGraph/RedisGraph/pull/2672) Wrong matching result on multiple labels +* RedisGraph [#2643](https://github.com/RedisGraph/RedisGraph/issues/2643) Duplicate reports when matching relationship type `:R|R` +* RedisGraph [#2687](https://github.com/RedisGraph/RedisGraph/issues/2687), [#2414](https://github.com/RedisGraph/RedisGraph/issues/2414) Error when `UNWIND`ing relationships +* RedisGraph [#2636](https://github.com/RedisGraph/RedisGraph/issues/2636) `MERGE` …` ON` ... - cannot remove property by setting it to null +* RedisGraph [#2710](https://github.com/RedisGraph/RedisGraph/pull/2710) Undo-log fix +* RedisGraph [#2435](https://github.com/RedisGraph/RedisGraph/pull/2435) Incorrect result when comparing a value to NaN +* RedisGraph [#2497](https://github.com/RedisGraph/RedisGraph/pull/2497) Incorrect result when comparing a value to null +* RedisGraph [#2676](https://github.com/RedisGraph/RedisGraph/issues/2676) `sqrt`, `log`, `log10` - incorrect result for negative values +* RedisGraph [#2213](https://github.com/RedisGraph/RedisGraph/issues/2213) Division and Modulo by zero - wrong behavior +* RedisTimeSeries [#1333](https://github.com/RedisTimeSeries/RedisTimeSeries/issues/1333) Potential crash when aggregating over a compaction with the `avg` aggregator and the `LATEST` flag + +**Redis version** (no changes) +* [Redis 6.2.7](https://github.com/redis/redis/blob/6.2.7/00-RELEASENOTES) + +**Module versions** +* __[RediSearch 2.6.3](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.3)__ +* __[RedisJSON 2.4.2](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.2)__ +* __[RedisGraph 2.10.4](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.4)__ +* __[RedisTimeSeries 1.8.3](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.3)__ +* __[RedisBloom 2.4.3](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.3)__ + +**Recommended Client Libraries (no changes)** +* Java + * [Jedis 4.2.0 or greater ](https://github.com/redis/jedis/releases/tag/v4.2.0) + * [redis-om-spring](https://github.com/redis/redis-om-spring) +* Python + * [redis-py 4.3.1 or greater ](https://github.com/redis/redis-py/releases/tag/v4.3.1) + * [redis-om-python](https://github.com/redis/redis-om-python) +* NodeJS + * [node-redis 4.4.0 or greater](https://www.npmjs.com/package/redis) + * [redis-om-node](https://github.com/redis/redis-om-node) +* .NET + * [redis-om-dotnet](https://github.com/redis/redis-om-dotnet) + +Compatible with the latest [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.14](https://github.com/RedisInsight/RedisInsight/releases/tag/2.14.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack Server 6.2.6-RC1 (November 2022) + +This is a Release Candidate of Redis Stack Server 6.2.6 + +### Headlines: +* Query & Search: + - multi-value index and query for: text, tag, numeric, geo and vector! + - affix search `*oolman` and wildcard search `y?fta*` + - support for FP64 vectors +* New faster JSONPath parser +* New probabilistic data structure: t-digest +* New path-finding algorithms `algo.SPpaths` and `algo.SSpaths` for Graph +* Support for gap filling for Time series + +### Details: +**RediSearch** introduces the following features: +* the ability to search using wildcard queries for TEXT and TAG fields. This enables the frequently asked feature of affix search and includes optimized wildcard query support : + - `?` matches any single character + - `*` matches zero or more characters + - use `’` and `\` for escaping, other special characters are ignored +* Multi-value indexing and querying of attributes for any attribute type ([Text](https://redis.io/docs/stack/search/indexing_json/#index-json-arrays-as-text), [Tag](https://redis.io/docs/stack/search/indexing_json/#index-json-arrays-as-tag), [Numeric](https://redis.io/docs/stack/search/indexing_json/#index-json-arrays-as-numeric), [Geo](https://redis.io/docs/stack/search/indexing_json/#index-json-arrays-as-geo) and [Vector](https://redis.io/docs/stack/search/indexing_json/#index-json-arrays-as-vector)) defined by a [JSONPath](https://redis.io/docs/stack/json/path/) leading to an array: + - Multi-value text search - perform full-text search on [array of string or on a JSONPath](https://redis.io/docs/stack/search/indexing_json/#index-json-arrays-as-tag) leading to multiple strings + - Return JSON rather than scalars from multi-value attributes. This is enabled via Dialect 3 in order not to break existing applications. + - Support for `SORTABLE` fields on JSON in an implicit un-normalized form (UNF) +* Support for indexing double-precision floating-point vectors and range queries from a given vector: + - Better space optimization selection + - Aligning index capacity with block size + - Support FLOAT64 as vector data type + - Range query support + - Support query attributes for vector queries + +**RedisJSON** introduces the following features: +* A new JSONPath library which enhances the performance of parsing any JSONPath expression in RedisJSON. + +**RedisBloom** introduces the following new features: +* A new sketch data structure: t-digest. t-digest is a sketch data structure for estimating quantiles based on a data stream or a large dataset of values. As for other sketch data structures, t-digest requires sublinear space and has controllable space-accuracy tradeoffs. + +**RedisGraph** introduces the following new features: +* New path-finding algorithms: + - The `algo.SPpaths` procedure returns one, _n_, or all minimal-weight, optionally bounded-cost, optionally bounded-length paths between a given pair of nodes. + - The `algo.SSpaths` procedure returns one, _n_, or all minimal-weight, optionally bounded-cost, optionally bounded-length paths from a given node. +* Introduce `SET` for adding node labels and `REMOVE` for removing node labels, node properties, and edge properties +* Support deleting paths with `DELETE` +* Introduce `toBoolean`, `toBooleanOrNull`, `toFloatOrNull`, `toIntegerOrNull`, `toStringOrNull`, `toBooleanList`, `toFloatList`, `toIntegerList`, `toStringList`, `properties`, `split`, `last`, `isEmpty`,`e`, `exp`, `log`, `log10`, `sin`, `cos`, `tan`, `cot`, `asin`, `acos`, `atan`, `atan2`, `degrees`, `radians`, `pi`, and `haversin` functions. +* Graph slow log can be reset with `GRAPH.SLOWLOG g RESET` (also added in 2.8.20) +* Queries are now atomic (_Atomicity_ is the guarantee that each query either succeeds or fails with no side effects). Whenever a failure occurs, the query effect is rolled-back from an undo-log. + +**RedisTimeSeries** introduces the following new features: +* Introduction of a new aggregator: `twa` (time-weighted average) +* Introduction of a new optional `EMPTY` flag to `TS.RANGE`, `TS.REVRANGE`, `TS.MRANGE`, and `TS.MREVRANGE` to retrieve aggregations for empty buckets as well. +* Gap-filling: Using `EMPTY` when the aggregator is `twa` allows estimating the average of a continuous signal even for empty buckets based on linear interpolation of previous and next samples. Using `EMPTY` when the aggregator is `last` would repeat the value of the previous sample when the bucket is empty. +* Introduction of a new optional `BUCKETTIMESTAMP` parameter to `TS.RANGE`, `TS.REVRANGE`, `TS.MRANGE`, and `TS.MREVRANGE`. It is now possible to report the start time, the end time, or the mid time for each bucket. +* Introduction of a new optional `alignTimestamp` parameter to `TS.CREATERULE` and to `COMPACTION_POLICY` configuration parameter. It is now possible to define alignment for compaction rules, so one can, for example, aggregate daily events from 06:00 to 06:00 the next day. +* Introduction of additional reducer types in `GROUPBY` (`TS.MRANGE`, and `TS.MREVRANGE`): `avg`, `range`, `count`, `std.p`, `std.s`, `var.p`, and `var.s` +* Introduction of a new optional `LATEST` flag to `TS.GET`, `TS.MGET`, `TS.RANGE`, `TS.REVRANGE`, `TS.MRANGE`, and `TS.MREVRANGE`. it is possible to retrieve the latest (possibly partial) bucket as well. + + +**Redis version** (no changes) +* [Redis 6.2.7](https://github.com/redis/redis/blob/6.2.7/00-RELEASENOTES) + + +**Module versions** +* __[RediSearch 2.6.1](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.1)__ +* __[RedisJSON 2.4.0](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.4.0)__ +* __[RedisGraph 2.10-RC1 (v2.10.2)](https://github.com/RedisGraph/RedisGraph/releases/tag/v2.10.2)__ +* __[RedisTimeSeries 1.8-RC3 (v1.8.2)](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.8.2)__ +* __[RedisBloom 2.4-RC3 (v2.4.2)](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.4.2)__ + +**Recommended Client Libraries (no changes)** +* Java + * [Jedis 4.2.0 or greater ](https://github.com/redis/jedis/releases/tag/v4.2.0) + * [redis-om-spring](https://github.com/redis/redis-om-spring) +* Python + * [redis-py 4.3.1 or greater ](https://github.com/redis/redis-py/releases/tag/v4.3.1) + * [redis-om-python](https://github.com/redis/redis-om-python) +* NodeJS + * [node-redis 4.4.0 or greater](https://www.npmjs.com/package/redis) + * [redis-om-node](https://github.com/redis/redis-om-node) +* .NET + * [redis-om-dotnet](https://github.com/redis/redis-om-dotnet) + +Compatible with the latest [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with RedisInsight 2.12.0. + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + diff --git a/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redisstack/redisstack-7.2-release-notes.md b/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redisstack/redisstack-7.2-release-notes.md new file mode 100644 index 0000000000..f40df25e5b --- /dev/null +++ b/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redisstack/redisstack-7.2-release-notes.md @@ -0,0 +1,1243 @@ +--- +Title: Redis Stack 7.2 release notes +alwaysopen: false +categories: +- docs +- operate +- stack +description: Redis Stack 7.2 release notes. +linkTitle: v7.2.0-v0 (August 2023) +weight: 100 +--- +## Redis Stack 7.2.0-v13 (October 2024) + +This is a maintenance release for Redis Stack Server 7.2.0. + +Update urgency: `SECURITY`: there are security fixes in the release. + +[Docker](https://hub.docker.com/r/redis/redis-stack) | [Download](https://redis.io/downloads/#stack) + +### Headlines: +This version includes security fixes for the **Redis** server, addressing potential vulnerabilities such as an RCE when using Lua library components, and a denial-of-service (DoS) risk due to malformed ACL selectors or unbounded pattern matching. +Additionally, this maintenance release contains a bug fix to prevent crashes in cluster mode and includes the latest version of **Redis Insight**. + +### Details: + **Security and privacy** +* **Redis**: + * (CVE-2024-31449) Lua library commands may lead to stack overflow and potential RCE. + * (CVE-2024-31227) Potential Denial-of-service due to malformed ACL selectors. + * (CVE-2024-31228) Potential Denial-of-service due to unbounded pattern matching. + +**Bug Fixes** +* **Redis**: + * [[#13315](https://github.com/redis/redis/pull/13315)](https://github.com/redis/redis/pull/13315) Fixed crashes in cluster mode + +* **Redis version**: + * __[Redis 7.2.6](https://github.com/redis/redis/releases/tag/7.2.6)__ + +**Module versions** +* __[RediSearch 2.8.15](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.15)__ +* __[RedisJSON 2.6.11](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.11)__ +* __[RedisTimeSeries 1.10.13](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.12)__ +* __[RedisBloom 2.6.12](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.12)__ +* __[RedisGears 2.0.23](https://github.com/RedisGears/RedisGears/releases)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.2.0 or greater](https://github.com/redis/jedis/releases/tag/v5.2.0) + * [redis-om-spring 0.9.5 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.9.5) +* Python + * [redis-py 5.1.0 or greater](https://github.com/redis/redis-py/releases/tag/v5.1.0) + * [redis-om-python 0.3.2 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.3.2) +* NodeJS + * [node-redis 4.7.0 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.7.0) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.7.4 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.7.4) + * [NRedisStack 0.13.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.13.0) +* Go + * [go-redis 9.6.1 or greater](https://github.com/redis/go-redis/releases/tag/v9.6.1) + * [rueidis 1.0.47 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.47) + +Compatible with [Redis Insight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [Redis Insight 2.58](https://github.com/RedisInsight/RedisInsight/releases/tag/2.58.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis modules). `b` will consist of a `v` + numeric value. + +## Redis Stack 7.2.0-v12 (August 2024) + +This is a maintenance release for Redis Stack Server 7.2.0. + +Update urgency: `HIGH`: There is a critical bug that may affect a subset of users. Upgrade! + +### Headlines: +The updated **search and query** version introduces several new features and important bug fixes, including a critical one. This new release of Redis Stack 7.2.0 also includes updated versions of **JSON** and **time series** data structures, each incorporating several bug fixes. + +This maintenance release also contains the latest version of **RedisInsight**. + +### Details: + + **Improvements** +* **Search and query**: + * [[#4792](https://github.com/RediSearch/RediSearch/pull/4792)](https://github.com/RediSearch/RediSearch/pull/4792) - Add character validations to simple string replies and escape it when required (MOD-7258) + * [[#4768](https://github.com/RediSearch/RediSearch/pull/4768)](https://github.com/RediSearch/RediSearch/pull/4768) - Indicate which value is missing on the error message at the aggregation pipeline (MOD-7201) + * [[#4745](https://github.com/RediSearch/RediSearch/pull/4745)](https://github.com/RediSearch/RediSearch/pull/4745) - `GROUPBY` recursion cleanup (MOD-7245) + * [[#4823](https://github.com/RediSearch/RediSearch/pull/4823)](https://github.com/RediSearch/RediSearch/pull/4823) - Mechanism of keys expiration during the query execution clearing intermediate results + +**Bug Fixes** +* **Search and query**: + * [[#4754](https://github.com/RediSearch/RediSearch/pull/4754)](https://github.com/RediSearch/RediSearch/pull/4754) - Correct return the maximum value for negative values when using `MAX` reducer (MOD-7252) + * [[#4737](https://github.com/RediSearch/RediSearch/pull/4737)](https://github.com/RediSearch/RediSearch/pull/4737) - Separators ignored when escaping backslash `\` after the escaped character such as in `hello\\,world` ignoring `,` (MOD-7240) + * [[#4717](https://github.com/RediSearch/RediSearch/pull/4717)](https://github.com/RediSearch/RediSearch/pull/4717) - Sorting by multiple fields `SORTBY 2 @field1 @field2` was ignoring the subsequent field(MOD-7206) + * [[#4803](https://github.com/RediSearch/RediSearch/pull/4803)](https://github.com/RediSearch/RediSearch/pull/4803) - Keys expiring during query returning empty array (MOD-7010) + * [[#4794](https://github.com/RediSearch/RediSearch/pull/4794)](https://github.com/RediSearch/RediSearch/pull/4794) - Index sanitiser (GC) trying to clean deleted numeric index could cause a crash (MOD-7303) + +* **JSON**: + * [[#1212](https://github.com/RedisJSON/RedisJSON/pull/1212)](https://github.com/RedisJSON/RedisJSON/pull/1212) `JSON.MSET`- AOF commands are duplicated multiple times (MOD-7293) + +* **Time series**: + * [[#1607](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1607)](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1607) Potential crash after deleting and recreating a source key of a compaction rule (MOD-7338) + * [[#1610](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1610)](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1610) `COUNT` argument accepts non-positive values (MOD-5413) + +* **Redis version**: + * __[Redis 7.2.5](https://github.com/redis/redis/releases/tag/7.2.5)__ + +**Module versions** +* __[RediSearch 2.8.15](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.15)__ +* __[RedisJSON 2.6.11](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.11)__ +* __[RedisTimeSeries 1.10.13](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.12)__ +* __[RedisBloom 2.6.12](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.12)__ +* __[RedisGears 2.0.23](https://github.com/RedisGears/RedisGears/releases)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.1.4 or greater](https://github.com/redis/jedis/releases/tag/v5.1.4) + * [redis-om-spring 0.9.4 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.9.4) +* Python + * [redis-py 5.0.9 or greater](https://github.com/redis/redis-py/releases/tag/v5.0.9) + * [redis-om-python 0.3.1 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.3.1) +* NodeJS + * [node-redis 4.7.0 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.7.0) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.7.4 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.7.4) + * [NRedisStack 0.12.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.12.0) +* Go + * [go-redis 9.6.1 or greater](https://github.com/redis/go-redis/releases/tag/v9.6.1) + * [rueidis 1.0.43 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.43) + +Compatible with [Redis Insight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [Redis Insight 2.54](https://github.com/RedisInsight/RedisInsight/releases/tag/2.54.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack 7.2.0-v11 (June 2024) + +This is a maintenance release for Redis Stack Server 7.2.0. + +Update urgency: `MODERATE`: Program an upgrade of the server, but it's not urgent. + +[Docker](https://hub.docker.com/r/redis/redis-stack) | [Download](https://redis.io/downloads/#stack) + +### Headlines: +Redis Stack 7.2.0-v11 introduces a new version of the **Redis** server with several bug fixes, and an updated **search and query** capability with numerous enhancements and bug fixes. + +The updated **search and query** version features improved memory reporting that accounts for additional memory consumed by `TAG` and `TEXT` tries, as well as enhanced memory counting for inverted indexes. Also, it includes additional fields in the `FT.INFO` command when used within a cluster. + +This maintenance release also contains the latest version of **RedisInsight**. + +### Details: + + **Improvements** +* **Search and query**: + * [[#4595](https://github.com/RediSearch/RediSearch/pull/4595)](https://github.com/RediSearch/RediSearch/pull/4595) - Report memory of the `TAG` and `TEXT` tries (MOD-5902) + * [[#4669](https://github.com/RediSearch/RediSearch/pull/4669)](https://github.com/RediSearch/RediSearch/pull/4669) - Inverted index memory counting (MOD-5977,MOD-5866) + * [[#4687](https://github.com/RediSearch/RediSearch/pull/4687)](https://github.com/RediSearch/RediSearch/pull/4687) - Add missing `FT.INFO` fields when used within a cluster (MOD-6920) + +**Bug Fixes** +* **Redis**: + * [[#12824](https://github.com/redis/redis/pull/12824)](https://github.com/redis/redis/pull/12824) A single shard cluster leaves failed replicas in CLUSTER SLOTS instead of removing them + * [[#12955](https://github.com/redis/redis/pull/12955)](https://github.com/redis/redis/pull/12955) Crash in LSET command when replacing small items and exceeding 4GB + * [[#13004](https://github.com/redis/redis/pull/13004)](https://github.com/redis/redis/pull/13004) Blocking commands timeout is reset due to re-processing command + * [[#13115](https://github.com/redis/redis/pull/13115)](https://github.com/redis/redis/pull/13115) Conversion of numbers in Lua args to redis args can fail. Bug introduced in 7.2.0 + +* **CLI tools**: + * [[#13092](https://github.com/redis/redis/pull/13092)](https://github.com/redis/redis/pull/13092) redis-cli: --count (for --scan, --bigkeys, etc) was ignored unless --pattern was also used + * [[#12958](https://github.com/redis/redis/pull/12958)](https://github.com/redis/redis/pull/12958) redis-check-aof: incorrectly considering data in manifest format as MP-AOF + +* **Search and query**: + * [[#4614](https://github.com/RediSearch/RediSearch/pull/4614)](https://github.com/RediSearch/RediSearch/pull/4614) - Shards become unresponsive when using `FT.AGGREGATE` with `APPLY 'split(...)'`(MOD-6759) + * [[#4556](https://github.com/RediSearch/RediSearch/pull/4556)](https://github.com/RediSearch/RediSearch/pull/4556) - `FT.EXPLAIN` returns additional } when querying using wildcards (MOD-6768) + * [[#4646](https://github.com/RediSearch/RediSearch/pull/4646)](https://github.com/RediSearch/RediSearch/pull/4646) - `FT.DROPINDEX` with `DD` flag deleted keys in one AA cluster but not the others (MOD-1855) + +* **Redis version**: + * __[Redis 7.2.5](https://github.com/redis/redis/releases/tag/7.2.5)__ + +**Module versions** +* __[RediSearch 2.8.14](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.14)__ +* __[RedisJSON 2.6.10](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.10)__ +* __[RedisTimeSeries 1.10.12](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.12)__ +* __[RedisBloom 2.6.12](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.12)__ +* __[RedisGears 2.0.23](https://github.com/RedisGears/RedisGears/releases)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.1.3 or later](https://github.com/redis/jedis/releases/tag/v5.1.3) + * [redis-om-spring 0.9.1 or later](https://github.com/redis/redis-om-spring/releases/tag/v0.9.1) +* Python + * [redis-py 5.0.5 or later](https://github.com/redis/redis-py/releases/tag/v5.0.5) + * [redis-om-python 0.3.1 or later](https://github.com/redis/redis-om-python/releases/tag/v0.3.1) +* NodeJS + * [node-redis 4.6.14 or later](https://github.com/redis/node-redis/releases/tag/redis%404.6.14) + * [redis-om-node 0.2.0 or later](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.7.1 or later](https://github.com/redis/redis-om-dotnet/releases/tag/v0.7.1) + * [NRedisStack 0.12.0 or later](https://github.com/redis/NRedisStack/releases/tag/v0.12.0) +* Go + * [go-redis 9.5.2 or later](https://github.com/redis/go-redis/releases/tag/v9.5.2) + * [rueidis 1.0.38 or later](https://github.com/redis/rueidis/releases/tag/v1.0.38) + +Compatible with [Redis Insight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [Redis Insight 2.50](https://github.com/RedisInsight/RedisInsight/releases/tag/2.50.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack 7.2.0-v10 (April 2024) + +This is a maintenance release for Redis Stack Server 7.2.0. + +Update urgency: `HIGH`: There is a critical bug that may affect a subset of users. Upgrade! + +### Headlines: +This version contains the latest **search and query** capability with several improvements and bug fixes, including critical bug fixes. This release also includes the latest **JSON** data structure with a fix for a potential crash, the **time series** data structure with more detailed LibMR error messages, and the latest version of **triggers and functions** with updated v8 version and a bug fix. It also contains the latest version of **RedisInsight**. + +### Details: + + **Improvements** +* **Search and query**: + * [[#4502](https://github.com/RediSearch/RediSearch/pull/4502)](https://github.com/RediSearch/RediSearch/pull/4502) Handle error properly when trying to execute Search commands on cluster setup as part of `MULTI`/`EXEC` or LUA script (MOD-6541) + * [[#4526](https://github.com/RediSearch/RediSearch/pull/4526)](https://github.com/RediSearch/RediSearch/pull/4526) Adding detailed geometry info on error messages (MOD-6701) + +* **Time series**: + * [[#1593](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1593)](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1593) More detailed LibMR error messages + +* **Triggers and Functions**: + * [[#1100](https://github.com/RedisGears/RedisGears/pull/1100)](https://github.com/RedisGears/RedisGears/pull/1100) Update v8 version to 12.3.219.15 + +**Bug Fixes** +* **Search and query**: + * [[#4481](https://github.com/RediSearch/RediSearch/pull/4481)](https://github.com/RediSearch/RediSearch/pull/4481) Query syntax on `GEOSHAPE` accepting just prefix instead of complete predicate (MOD-6663) + * [[#4513](https://github.com/RediSearch/RediSearch/pull/4513)](https://github.com/RediSearch/RediSearch/pull/4513) `FT.CURSOR READ` in a numeric query causing a crash (MOD-6597) [**critical bug**] + * [[#4534](https://github.com/RediSearch/RediSearch/pull/4534)](https://github.com/RediSearch/RediSearch/pull/4534) `FT.PROFILE` with incorrect arguments could cause a crash on cluster setup (MOD-6791) [**critical bug**] + * [[#4530](https://github.com/RediSearch/RediSearch/pull/4530)](https://github.com/RediSearch/RediSearch/pull/4530) Some parameter settings using just prefixes instead of full values were working (MOD-6709) + * [[#4539](https://github.com/RediSearch/RediSearch/pull/4539)](https://github.com/RediSearch/RediSearch/pull/4539) Unfree memory while re-indexing loading a new RDB could cause a crash (MOD-6831, 6810) [**critical bug**] + * [[#4498](https://github.com/RediSearch/RediSearch/pull/4498)](https://github.com/RediSearch/RediSearch/pull/4498) Vector pre-filtered query (hybrid query) that timeout causing a crash due to deadlock when trying to write a new document(MOD-6510, MOD-6244) [**critical bug**] + * [[#4495](https://github.com/RediSearch/RediSearch/pull/4495)](https://github.com/RediSearch/RediSearch/pull/4495) `FT.SEARCH` accessing an inexistent memory address causes a crash if using the deprecated `FT.ADD` command (MOD-6599) [**critical bug**] + +* **JSON**: + * [[#1192](https://github.com/RedisJSON/RedisJSON/pull/1192)](https://github.com/RedisJSON/RedisJSON/pull/1192) Crashes with numeric values greater than i64::MAX (MOD-6501, MOD-4551, MOD-4856, MOD-5714) + +* **Triggers and Functions**: + * [[#1093](https://github.com/RedisGears/RedisGears/pull/1093)](https://github.com/RedisGears/RedisGears/pull/1093) Crash when logging NULL characters + +**Redis version**: + * __[Redis 7.2.4](https://github.com/redis/redis/releases/tag/7.2.4)__ + +**Module versions** +* __[RediSearch 2.8.13](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.13)__ +* __[RedisJSON 2.6.10](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.10)__ +* __[RedisTimeSeries 1.10.12](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.12)__ +* __[RedisBloom 2.6.12](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.12)__ +* __[RedisGears 2.0.20](https://github.com/RedisGears/RedisGears/releases/tag/v2.0.20-m21)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.1.2 or later](https://github.com/redis/jedis/releases/tag/v5.1.2) + * [redis-om-spring 0.8.9 or later](https://github.com/redis/redis-om-spring/releases/tag/v0.8.9) +* Python + * [redis-py 5.0.3 or later](https://github.com/redis/redis-py/releases/tag/v5.0.3) + * [redis-om-python 0.2.2 or later](https://github.com/redis/redis-om-python/releases/tag/v0.2.2) +* NodeJS + * [node-redis 4.6.13 or later](https://github.com/redis/node-redis/releases/tag/redis%404.6.13) + * [redis-om-node 0.2.0 or later](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.6.1 or later](https://github.com/redis/redis-om-dotnet/releases/tag/v0.6.1) + * [NRedisStack 0.12.0 or later](https://github.com/redis/NRedisStack/releases/tag/v0.12.0) +* Go + * [go-redis 9.5.1 or later](https://github.com/redis/go-redis/releases/tag/v9.5.1) + * [rueidis 1.0.33 or later](https://github.com/redis/rueidis/releases/tag/v1.0.33) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.46](https://github.com/RedisInsight/RedisInsight/releases/tag/2.46.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Downloads + +* macOS: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-7.2.0-v10.catalina.x86_64.zip), [arm64](https://packages.redis.io/redis-stack/redis-stack-server-7.2.0-v10.monterey.arm64.zip) +* AppImage: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-7.2.0-v10-x86_64.AppImage) +* Ubuntu: [Bionic x86_64](https://packages.redis.io/redis-stack/redis-stack-server-7.2.0-v10.bionic.x86_64.tar.gz), [Bionic arm64](https://packages.redis.io/redis-stack/redis-stack-server-7.2.0-v10.bionic.arm64.tar.gz), [Focal x86_64](https://packages.redis.io/redis-stack/redis-stack-server-7.2.0-v10.focal.x86_64.tar.gz), [Focal arm64](https://packages.redis.io/redis-stack/redis-stack-server-7.2.0-v10.focal.arm64.tar.gz), [Snap x86_64](https://packages.redis.io/redis-stack/redis-stack-server-7.2.0-v10.x86_64.snap), [Snap arm64](https://packages.redis.io/redis-stack/redis-stack-server-7.2.0-v10.arm64.snap), [Jammy x86_64](https://packages.redis.io/redis-stack/redis-stack-server-7.2.0-v10.jammy.x86_64.tar.gz), [Jammy arm64](https://packages.redis.io/redis-stack/redis-stack-server-7.2.0-v10.jammy.arm64.tar.gz) +* Debian: [Bullseye x86_64](https://packages.redis.io/redis-stack/redis-stack-server-7.2.0-v10.bullseye.x86_64.tar.gz) +* RHEL 7/CentOS Linux 7: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-7.2.0-v10.rhel7.x86_64.tar.gz) +* RHEL 8/CentOS Linux 8: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-7.2.0-v10.rhel8.x86_64.tar.gz) +* RHEL 9/Rocky Linux 9/CentOS Linux 9: [x86_64](https://packages.redis.io/redis-stack/redis-stack-server-7.2.0-v10.rhel9.x86_64.tar.gz) +* Redis Stack on [Dockerhub](https://hub.docker.com/u/redis): [x86_64 and arm64](https://hub.docker.com/r/redis/redis-stack) +* Redis Stack server on [Dockerhub](https://hub.docker.com/u/redis): [x86_64 and arm64](https://hub.docker.com/r/redis/redis-stack-server) + +## Redis Stack 7.2.0-v9 (March 2024) + +This is a maintenance release for Redis Stack Server 7.2.0. + +Update urgency: `MODERATE`: Program an upgrade of the server, but it's not urgent. + +### Headlines: +This version contains the latest **search and query** capability with an improvement for memory allocation patterns on the memory used to query `GEOSHAPE` types, and several bug fixes. This release also includes the latest **probabilistic** data structures with a fix for a potential crash, and **triggers and functions** capability with an updated v8 version. It also contains the latest version of **RedisInsight**. + +### Details: + + **Improvements** +* **Search and query**: + * [[#4313](https://github.com/RediSearch/RediSearch/pull/4313)](https://github.com/RediSearch/RediSearch/pull/4313) Memory allocation patterns on the memory used to query `GEOSHAPE` types (MOD 6431) + +**Bug Fixes** +* **Search and query**: + * [[#4476](https://github.com/RediSearch/RediSearch/pull/4476)](https://github.com/RediSearch/RediSearch/pull/4476) Split `INFIX` and `SUFFIX` report on `FT.EXPLAIN` and `FT.EXPLAINCLI` (MOD-6186) + * [[#4467](https://github.com/RediSearch/RediSearch/pull/4467)](https://github.com/RediSearch/RediSearch/pull/4467) Memory leak upon suffix query for a `TAG` indexed with `WITHSUFFIXTRIE` (MOD-6644) + * [[#4403](https://github.com/RediSearch/RediSearch/pull/4403)](https://github.com/RediSearch/RediSearch/pull/4403) Clustered `FT.SEARCH` hangs forever without replying when an invalid topology is found (MOD-6557) + * [[#4355](https://github.com/RediSearch/RediSearch/pull/4355)](https://github.com/RediSearch/RediSearch/pull/4355) Searching for a synonym will iterate in the same group multiple times, causing a performance hit (MOD-6490) + +* **Probabilistic data structures**: + * [[#753](https://github.com/RedisBloom/RedisBloom/pull/753)](https://github.com/RedisBloom/RedisBloom/issues/753) Potential crash on `CMS.MERGE` when using invalid arguments + +* **Triggers and Functions**: + * [[#1089](https://github.com/RedisGears/RedisGears/pull/1089)](https://github.com/RedisGears/RedisGears/pull/1089) Update v8 version to 12.2.281.21 + +* **Redis version**: + * __[Redis 7.2.4](https://github.com/redis/redis/releases/tag/7.2.4)__ + +**Module versions** +* __[RediSearch 2.8.12](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.12)__ +* __[RedisJSON 2.6.9](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.9)__ +* __[RedisTimeSeries 1.10.11](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.11)__ +* __[RedisBloom 2.6.12](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.12)__ +* __[RedisGears 2.0.19](https://github.com/RedisGears/RedisGears/releases/tag/v2.0.19-m20)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.1.1 or greater](https://github.com/redis/jedis/releases/tag/v5.1.1) + * [redis-om-spring 0.8.8 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.8) +* Python + * [redis-py 5.0.2 or greater](https://github.com/redis/redis-py/releases/tag/v5.0.2) + * [redis-om-python 0.2.1 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.2.1) +* NodeJS + * [node-redis 4.6.13 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.13) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.6.1 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.6.1) + * [NRedisStack 0.11.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.11.0) +* Go + * [go-redis 9.5.1 or greater](https://github.com/redis/go-redis/releases/tag/v9.5.1) + * [rueidis 1.0.31 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.31) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.44](https://github.com/RedisInsight/RedisInsight/releases/tag/2.44.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack 7.2.0-v8 (January 2024) + +This is a maintenance release for Redis Stack Server 7.2.0. + +Update urgency: `HIGH`: There is a critical bug fixed in the probabilistic data structures that may affect a subset of users. Upgrade! + +### Headlines: +This version contains the latest **probabilistic** data structures with a critical bug fix, as well as the latest **JSON** data structure with a breaking change to revert JSONPath default path value from `$` to `.` under RESP3, and a fix for RediSearch deadlock. This version contains the latest version of **RedisInsight**. + +### Details: + + **Improvements** +* **JSON**: + * [[#1131](https://github.com/RedisJSON/RedisJSON/pull/1131)](https://github.com/RedisJSON/RedisJSON/issues/1131), [[#1143](https://github.com/RedisJSON/RedisJSON/pull/1143)](https://github.com/RedisJSON/RedisJSON/pull/1143) BREAKING - Revert JSONPath default path value from `$` to `.` under RESP3 (MOD-6156) + +**Bug Fixes** +* **JSON**: + * [[#1095](https://github.com/RedisJSON/RedisJSON/pull/1095)](https://github.com/RedisJSON/RedisJSON/pull/1095) Fix for RediSearch deadlock. See RediSearch 2.8.10 release notes (MOD-5895) + +* **Probabilistic data structures**: + * [[#727](https://github.com/RedisBloom/RedisBloom/pull/727)](https://github.com/RedisBloom/RedisBloom/pull/727) Potential crash on CF.LOADCHUNK (MOD-6344) - Additional fixes + +* **Redis version**: + * __[Redis 7.2.4](https://github.com/redis/redis/releases/tag/7.2.4)__ + +**Module versions** +* __[RediSearch 2.8.11](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.11)__ +* __[RedisJSON 2.6.9](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.9)__ +* __[RedisTimeSeries 1.10.11](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.11)__ +* __[RedisBloom 2.6.11](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.11)__ +* __[RedisGears 2.0.16](https://github.com/RedisGears/RedisGears/releases/tag/v2.0.16-m17)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.1.0 or greater](https://github.com/redis/jedis/releases/tag/v5.1.0) + * [redis-om-spring 0.8.8 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.8) +* Python + * [redis-py 5.0.1 or greater](https://github.com/redis/redis-py/releases/tag/v5.0.1) + * [redis-om-python 0.2.1 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.2.1) +* NodeJS + * [node-redis 4.6.12 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.12) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.6.1 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.6.1) + * [NRedisStack 0.11.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.11.0) +* Go + * [go-redis 9.4.0 or greater](https://github.com/redis/go-redis/releases/tag/v9.4.0) + * [rueidis 1.0.27 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.27) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.40](https://github.com/RedisInsight/RedisInsight/releases/tag/2.40.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack 7.2.0-v7 (January 2024) + +This is a maintenance release for Redis Stack Server 7.2.0. + +Update urgency: `SECURITY`: there are security fixes in the release. + +### Headlines: +This version contains security fixes for the **Redis** server to properly handle the resizing of memory buffers, as well as security fixes for **probabilistic data structures** to avoid potential crashes. The new Redis Stack version also contains several improvements and bug fixes for the **Search and query** capability, including fixes of critical bugs. It also offers the latest **time series data structure**, the latest **Triggers and Functions** capability with various improvements and bug fixes, and it contains the latest version of **RedisInsight**. + +### Details: + + **Security and privacy** +* **Redis**: + * (CVE-2023-41056) In some cases, Redis may incorrectly handle resizing of memory buffers which can result in incorrect accounting of buffer sizes and lead to heap overflow and potential remote code execution + +* **Probabilistic data structures**: + * [[#721](https://github.com/RedisBloom/RedisBloom/pull/721)](https://github.com/RedisBloom/RedisBloom/issues/721) Potential crash on `CF.RESERVE` (MOD-6343) + * [[#722](https://github.com/RedisBloom/RedisBloom/pull/722)](https://github.com/RedisBloom/RedisBloom/issues/722) Potential crash on `CF.LOADCHUNK` (MOD-6344) + + **Improvements** +* **Search and query**: + * [[#3682](https://github.com/RediSearch/RediSearch/pull/3682)](https://github.com/RediSearch/RediSearch/pull/3682) Report last key error and field type indexing failures on `FT.INFO` (MOD-5364) + * [[#4236](https://github.com/RediSearch/RediSearch/pull/4236)](https://github.com/RediSearch/RediSearch/pull/4236) Adding Vector index parameters at the `FT.INFO` report (MOD-6198) + * [[#4196](https://github.com/RediSearch/RediSearch/pull/4196)](https://github.com/RediSearch/RediSearch/pull/4196) Check for timeout after results processing in `FT.SEARCH` on cluster setup (MOD-6278) + * [[#4164](https://github.com/RediSearch/RediSearch/pull/4164)](https://github.com/RediSearch/RediSearch/pull/4164) Report `TIMEOUT`, `MAXPREFIXEXPANSION` warnings in RESP3 replies (MOD-6234) + * [[#4165](https://github.com/RediSearch/RediSearch/pull/4165)](https://github.com/RediSearch/RediSearch/pull/4165) Indicate timeout on `FT.PROFILE` report (MOD-6184) + * [[#4149](https://github.com/RediSearch/RediSearch/pull/4149)](https://github.com/RediSearch/RediSearch/pull/4149) Indicate timeout from Cursor on `FAIL` timeout policy (MOD-5990) + * [[#4147](https://github.com/RediSearch/RediSearch/pull/4147)](https://github.com/RediSearch/RediSearch/pull/4147) Initialization of the maximum numeric value range leading to a better balance of the index leaf splitting (MOD-6232) + * [[#3940](https://github.com/RediSearch/RediSearch/pull/3940)](https://github.com/RediSearch/RediSearch/pull/3940) Query optimisation when predicate contains multiple `INTERSECTION` (AND) of `UNION` (OR) (MOD-5910) + * [[#4059](https://github.com/RediSearch/RediSearch/pull/4059)](https://github.com/RediSearch/RediSearch/pull/4059) Return cursor id when experiencing a timeout, when the policy is `ON_TIMEOUT RETURN` (MOD-5966) + * [[#4006](https://github.com/RediSearch/RediSearch/pull/4006)](https://github.com/RediSearch/RediSearch/pull/4006) Possibly problematic index name alias validation (MOD-5945) + * [[#4264](https://github.com/RediSearch/RediSearch/pull/4264)](https://github.com/RediSearch/RediSearch/pull/4264) Granularity of the time reporting counters on `FT.PROFILE` (MOD-6002) + +* **Triggers and Functions**: + * Update v8 version to 12.0/267.13 + +**Bug Fixes** +* **Redis**: + * [[#12805](https://github.com/redis/redis/pull/12805)](https://github.com/redis/redis/pull/12805), [[#12832](https://github.com/redis/redis/pull/12832)](https://github.com/redis/redis/pull/12832) Fix crashes of cluster commands clusters with mixed versions of 7.0 and 7.2 + * [[#12564](https://github.com/redis/redis/pull/12564)](https://github.com/redis/redis/pull/12564) Fix slot ownership not being properly handled when deleting a slot from a node + * [[#12733](https://github.com/redis/redis/pull/12733)](https://github.com/redis/redis/pull/12733) Fix atomicity issues with the RedisModuleEvent_Key module API event + * [[#4324](https://github.com/RediSearch/RediSearch/pull/4324)](https://github.com/RediSearch/RediSearch/pull/4324) Internal cluster mechanism not waiting until all replies from shards causing a crash (MOD-6287) + * [[#4297](https://github.com/RediSearch/RediSearch/pull/4297)](https://github.com/RediSearch/RediSearch/pull/4297) Execution loader when using `FT.AGGREGATE` with `LOAD` stage failing to buffer the right results potentially causing a crash (MOD-6385) + +* **Search and query**: + * [[#4287](https://github.com/RediSearch/RediSearch/pull/4287)](https://github.com/RediSearch/RediSearch/pull/4287) Re-index process while syncing from the replica causes a crash due to internal index variable initialisation +(MOD-6337, MOD-6336) + * [[#4249](https://github.com/RediSearch/RediSearch/pull/4249)](https://github.com/RediSearch/RediSearch/pull/4249) Memory tracking on cluster setups causing high memory usage and potentially Out-of-Memory (MOD-6123, MOD-5639) + * [[#4244](https://github.com/RediSearch/RediSearch/pull/4244)](https://github.com/RediSearch/RediSearch/pull/4244) Profiling `FT.AGGREGATE` using the `WITHCURSOR` flag with - clause causes a crash due to timeout (MOD-5512) + * [[#3916](https://github.com/RediSearch/RediSearch/pull/3916)](https://github.com/RediSearch/RediSearch/pull/3916) Expiring `JSON` documents while querying it causing a crash due to deadlock (MOD-5769, MOD-5895, MOD-6189, MOD-5895) + * [[#4235](https://github.com/RediSearch/RediSearch/pull/4235)](https://github.com/RediSearch/RediSearch/pull/4235) Memory excessively growing on databases caused by unbalanced nodes on inverted index trie (MOD-5880, MOD-5952, MOD-6003) + * [[#4190](https://github.com/RediSearch/RediSearch/pull/4190)](https://github.com/RediSearch/RediSearch/pull/4190) Profiling `FT.AGGREGATE` causes a crash on RESP3 replies (MOD-6250, MOD-6295) + * [[#4148](https://github.com/RediSearch/RediSearch/pull/4148)](https://github.com/RediSearch/RediSearch/pull/4148), [[#4038](https://github.com/RediSearch/RediSearch/pull/4038)](https://github.com/RediSearch/RediSearch/pull/4038) `ON_TIMEOUT FAIL\RETURN` policies in the cluster setup not being respected (MOD-6035, MOD-5948, MOD-6090) + * [[#4110](https://github.com/RediSearch/RediSearch/pull/4110)](https://github.com/RediSearch/RediSearch/pull/4110) Format of error response contains inconsistencies when timing out(MOD-6011, MOD-5965) + * [[#4104](https://github.com/RediSearch/RediSearch/pull/4104)](https://github.com/RediSearch/RediSearch/pull/4104) `FT.SEARCH` not responding when using TLS encryption on Amazon Linux 2 (MOD-6012) + * [[#4009](https://github.com/RediSearch/RediSearch/pull/4009)](https://github.com/RediSearch/RediSearch/pull/4009) In cluster setup does not return a timeout error for `FT.SEARCH` (MOD-5911) + * [[#3920](https://github.com/RediSearch/RediSearch/pull/3920)](https://github.com/RediSearch/RediSearch/pull/3920) In cluster setup does not return a timeout error for `FT.AGGREGATE` (MOD-5209) + * [[#3914](https://github.com/RediSearch/RediSearch/pull/3914)](https://github.com/RediSearch/RediSearch/pull/3914) `FT.CURSOR READ` with geo queries causing a crash when data is updated between the cursor reads (MOD-5646) + * [[#4220](https://github.com/RediSearch/RediSearch/pull/4220)](https://github.com/RediSearch/RediSearch/pull/4220) Server crash when attempting to run the ForkGC (Garbage Collection routine) after dropping the index (MOD-6276) + +* **Time series**: + * [LibMR[#51](https://github.com/RedisGears/libMR/pull/51)](https://github.com/RedisGears/LibMR/pull/51) Crash on SSL initialization failure (MOD-5647) + * [[#1538](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1538)](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1538) Amazon Linux 2: crash on SSL initialization. We now use openssl11-devel instead of openssl-devel (MOD-6015) + +* **Probabilistic data structures**: + * [[#707](https://github.com/RedisBloom/RedisBloom/pull/707)](https://github.com/RedisBloom/RedisBloom/pull/707) Top-K: `TOPK.ADD` and `TOPK.QUERY` crash when an item name is an empty string (RED-114676) + +* **Triggers and Functions**: + * [[#1069](https://github.com/RedisGears/RedisGears/pull/1069)](https://github.com/RedisGears/RedisGears/pull/1069) Fixed an issue where a keyspace notification could be lost + +* **Redis version**: + * __[Redis 7.2.4](https://github.com/redis/redis/releases/tag/7.2.4)__ + +**Module versions** +* __[RediSearch 2.8.11](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.11)__ +* __[RedisJSON 2.6.7](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.7)__ +* __[RedisTimeSeries 1.10.11](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.11)__ +* __[RedisBloom 2.6.10](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.10)__ +* __[RedisGears 2.0.16](https://github.com/RedisGears/RedisGears/releases/tag/v2.0.16-m17)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.1.0 or greater](https://github.com/redis/jedis/releases/tag/v5.1.0) + * [redis-om-spring 0.8.7 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.7) +* Python + * [redis-py 5.0.1 or greater](https://github.com/redis/redis-py/releases/tag/v5.0.1) + * [redis-om-python 0.2.1 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.2.1) +* NodeJS + * [node-redis 4.6.12 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.12) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.6.1 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.6.1) + * [NRedisStack 0.11.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.11.0) +* Go + * [go-redis 9.4.0 or greater](https://github.com/redis/go-redis/releases/tag/v9.4.0) + * [rueidis 1.0.26 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.26) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.40](https://github.com/RedisInsight/RedisInsight/releases/tag/2.40.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack 7.2.0-v5 (October 2023) + +This is a maintenance release for Redis Stack Server 7.2.0. + +Update urgency: `HIGH`: There is a critical bug that may affect a subset of users. Upgrade! + +### Headlines: +This version contains the latest Search and Query with various improvements and fixes for critical bugs, triggers and functions with an updated v8 version, as well as new JSON, time series, and probabilistic data structures with several improvements. The new version introduces support for RHEL 9 and Rocky Linux 9. It also includes the latest version of RedisInsight. + +### Details: + + **Improvements** +* **Search and Query**: + * [[#3938](https://github.com/RediSearch/RediSearch/pull/3938)](https://github.com/RediSearch/RediSearch/pull/3938) Propagating error messages in a multi-shard database, instead of failing silently (MOD-5211) + +* **JSON**: + * [[#1102](https://github.com/RedisJSON/RedisJSON/pull/1102)](https://github.com/RedisJSON/RedisJSON/pull/1102) Added support for CBL-Mariner 2 + +* **Time series**: + * [[#1516](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1516)](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1516) Added support for CBL-Mariner 2 + +* **Probabilistic data structures**: + * [[#684](https://github.com/RedisBloom/RedisBloom/pull/684)](https://github.com/RedisBloom/RedisBloom/pull/684), [[#685](https://github.com/RedisBloom/RedisBloom/pull/685)](https://github.com/RedisBloom/RedisBloom/pull/685) Added support for CBL-Mariner 2 + +**Bug Fixes** +* **Redis**: + * Fix for the "The RDB file contains AUX module data I can't load: no matching module 'graphdata'" [error message](https://github.com/redis/redis/issues/12490) when upgrading Redis Stack + +* **Search and Query**: + * [[#3874](https://github.com/RediSearch/RediSearch/pull/3874)](https://github.com/RediSearch/RediSearch/pull/3874) Heavy document updates cause memory growth once memory blocks aren't properly released (MOD-5181) + * [[#3967](https://github.com/RediSearch/RediSearch/pull/3967)](https://github.com/RediSearch/RediSearch/pull/3967) Resharding optimizations cause the process to get stuck (MOD-5874, MOD-5864) + * [[#3892](https://github.com/RediSearch/RediSearch/pull/3892)](https://github.com/RediSearch/RediSearch/pull/3892) After cleaning the index the GC could cause corruption on unique values (MOD-5815) + * [[#3853](https://github.com/RediSearch/RediSearch/pull/3853)](https://github.com/RediSearch/RediSearch/pull/3853) Queries with `WITHCURSOR` making memory growth since `CURSOR` wasn't invalidated in the shards (MOD-5580) + +* **Triggers and Functions**: + * Update v8 version to 11.8.172.15 + +**Redis version** +* __[Redis 7.2.2](https://github.com/redis/redis/releases/tag/7.2.2)__ + +**Module versions** +* __[RediSearch 2.8.9](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.9)__ +* __[RedisJSON 2.6.7](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.7)__ +* __[RedisTimeSeries 1.10.9](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.9)__ +* __[RedisBloom 2.6.8](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.8)__ +* __[RedisGears 2.0.14](https://github.com/RedisGears/RedisGears/releases/tag/v2.0.14-m15)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.0.2 or greater](https://github.com/redis/jedis/releases/tag/v5.0.2) + * [redis-om-spring 0.8.7 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.7) +* Python + * [redis-py 5.0.1 or greater ](https://github.com/redis/redis-py/releases/tag/v5.0.1) + * [redis-om-python 0.2.1 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.2.1) +* NodeJS + * [node-redis 4.6.10 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.10) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.5.3 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.5.3) + * [NRedisStack 0.10.1 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.10.1) +* Go + * [go-redis 9.2.1 or greater](https://github.com/redis/go-redis/releases/tag/v9.2.1) + * [rueidis 1.0.20 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.20) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.36](https://github.com/RedisInsight/RedisInsight/releases/tag/2.36.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack 7.2.0-v4 (October 2023) + +This is a maintenance release for Redis Stack Server 7.2.0. + +Update urgency: `SECURITY`: There are security fixes in the release. + +### Headlines: +This version contains a security fix for the Redis server to avoid bypassing desired Unix socket permissions on startup, as well as several improvements and bug fixes. + +### Details: + +**Security and privacy** +* **Redis**: + * (CVE-2023-45145) The wrong order of `listen(2)` and `chmod(2)` calls creates a +race condition that can be used by another process to bypass desired Unix +socket permissions on startup. + + **Improvements** +* **Redis**: + * [[#12611](https://github.com/redis/redis/pull/12611)](https://github.com/redis/redis/pull/12611) Fix compilation error on MacOS 13 + * [[#12604](https://github.com/redis/redis/pull/12604)](https://github.com/redis/redis/pull/12604) Fix crash when running rebalance command in a mixed cluster of 7.0 and 7.2 +Nodes + * [[#12561](https://github.com/redis/redis/pull/12561)](https://github.com/redis/redis/pull/12561) Fix the return type of the slot number in cluster shards to integer, which +makes it consistent with past behavior + * [[#12569](https://github.com/redis/redis/pull/12569)](https://github.com/redis/redis/pull/12569) Fix CLUSTER commands are called from modules or scripts to return TLS info +appropriately + * [[#12571](https://github.com/redis/redis/pull/12571)](https://github.com/redis/redis/pull/12571) redis-cli, fix crash on reconnect when in SUBSCRIBE mode + * [[#12474](https://github.com/redis/redis/pull/12474)](https://github.com/redis/redis/pull/12474) Fix overflow calculation for next timer event + +**Bug Fixes** +* **Redis**: + * [[#12620](https://github.com/redis/redis/pull/12620)](https://github.com/redis/redis/pull/12620) WAITAOF could timeout in the absence of write traffic in case a new AOF is +created and an AOF rewrite can't immediately start + +**Redis version** +* __[Redis 7.2.2](https://github.com/redis/redis/releases/tag/7.2.2)__ + +**Module versions** +* __[RediSearch 2.8.8](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.8)__ +* __[RedisJSON 2.6.6](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.6)__ +* __[RedisTimeSeries 1.10.6](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.6)__ +* __[RedisBloom 2.6.3](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.3)__ +* __[RedisGears 2.0.13](https://github.com/RedisGears/RedisGears/releases/tag/v2.0.13-m14)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.0.1 or greater](https://github.com/redis/jedis/releases/tag/v5.0.1) + * [redis-om-spring 0.8.7 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.7) +* Python + * [redis-py 5.0.1 or greater ](https://github.com/redis/redis-py/releases/tag/v5.0.1) + * [redis-om-python 0.2.1 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.2.1) +* NodeJS + * [node-redis 4.6.10 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.10) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.5.3 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.5.3) + * [NRedisStack 0.9.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.9.0) +* Go + * [go-redis 9.2.1 or greater](https://github.com/redis/go-redis/releases/tag/v9.2.1) + * [rueidis 1.0.20 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.20) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.34](https://github.com/RedisInsight/RedisInsight/releases/tag/2.34.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack 7.2.0-v3 (October 2023) + +This is a maintenance release for Redis Stack Server 7.2.0. + +Update urgency: `SECURITY`: There are security fixes in the release. + +### Headlines: +This version contains the latest Search and Query capability v. 2.8.8, and triggers and functions v. 2.0.13 with various improvements, security fixes for Search and Query, and several bug fixes. It also includes the latest version of RedisInsight. + +### Details: + +**Security and privacy** +* **Search and Query**: + * [[#3788](https://github.com/RediSearch/RediSearch/pull/3788)](https://github.com/RediSearch/RediSearch/pull/3788) Don’t expose internal cluster commands + * [[#3844](https://github.com/RediSearch/RediSearch/pull/3844)](https://github.com/RediSearch/RediSearch/pull/3844) Limits maximum phonetic length avoiding to be exploited + + **Improvements** +* **Search and Query**: + * [[#3534](https://github.com/RediSearch/RediSearch/pull/3534)](https://github.com/RediSearch/RediSearch/pull/3534) - Vector Similarity [0.7.1](https://github.com/RedisAI/VectorSimilarity/releases/tag/v0.7.1) + +**Bug Fixes** +* **Search and Query**: + * [[#3771](https://github.com/RediSearch/RediSearch/pull/3771)](https://github.com/RediSearch/RediSearch/pull/3771) Broken `lower()` and `upper()` functions on `APPLY` stage in `FT.AGGREGATE` in `DIALECT 3` + * [[#3752](https://github.com/RediSearch/RediSearch/pull/3752)](https://github.com/RediSearch/RediSearch/pull/3752) Setting a low `MAXIDLE` parameter value in `FT.AGGREGATE` causes a crash + * [[#3780](https://github.com/RediSearch/RediSearch/pull/3780)](https://github.com/RediSearch/RediSearch/pull/3780) Wrong document length calculation causing incorrect score values + * [[#3808](https://github.com/RediSearch/RediSearch/pull/3808)](https://github.com/RediSearch/RediSearch/pull/3808) `LOAD` step after a `FILTER` step could cause a crash on `FT.AGGREGATE` + * [[#3823](https://github.com/RediSearch/RediSearch/pull/3823)](https://github.com/RediSearch/RediSearch/pull/3823) `APPLY` or `FILTER` parser leak + * [[#3837](https://github.com/RediSearch/RediSearch/pull/3837)](https://github.com/RediSearch/RediSearch/pull/3837) Connection using TLS fails on Redis 7.2 + * [[#3856](https://github.com/RediSearch/RediSearch/pull/3856)](https://github.com/RediSearch/RediSearch/pull/3856) Adding new nodes to OSS cluster causing a crash + * [[#3854](https://github.com/RediSearch/RediSearch/pull/3854)](https://github.com/RediSearch/RediSearch/pull/3854) Vector range query could cause Out-of-Memory due a memory corruption + +* **Triggers and Functions**: + * Update v8 version to 11.7.439.17. + +**Redis version** +* __[Redis 7.2.1](https://github.com/redis/redis/releases/tag/7.2.1)__ + +**Module versions** +* __[RediSearch 2.8.8](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.8)__ +* __[RedisJSON 2.6.6](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.6)__ +* __[RedisTimeSeries 1.10.6](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.6)__ +* __[RedisBloom 2.6.3](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.3)__ +* __[RedisGears 2.0.13](https://github.com/RedisGears/RedisGears/releases/tag/v2.0.13-m14)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.0.1 or greater](https://github.com/redis/jedis/releases/tag/v5.0.1) + * [redis-om-spring 0.8.7 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.7) +* Python + * [redis-py 5.0.1 or greater ](https://github.com/redis/redis-py/releases/tag/v5.0.1) + * [redis-om-python 0.2.1 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.2.1) +* NodeJS + * [node-redis 4.6.10 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.10) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.5.3 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.5.3) + * [NRedisStack 0.9.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.9.0) +* Go + * [go-redis 9.2.1 or greater](https://github.com/redis/go-redis/releases/tag/v9.2.1) + * [rueidis 1.0.19 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.19) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.34](https://github.com/RedisInsight/RedisInsight/releases/tag/2.34.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack 7.2.0-v2 (September 2023) + +This is a maintenance release for Redis Stack Server 7.2.0. + +Update urgency: `SECURITY`: There are security fixes in the release. + +### Headlines: +This version contains security improvements for time series to not expose internal commands and several bug fixes for triggers and functions. + +### Details: + +**Security and privacy** + +* **Time series**: + * [[#1506](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1506)](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1506) Don’t expose internal commands + +**Bug Fixes** + +* **Triggers and Functions**: + * [[#1023](https://github.com/RedisGears/RedisGears/pull/1023)](https://github.com/RedisGears/RedisGears/pull/1023) Add TCONFIG_GET and redisgears_2.FORCESHARDSCONNECTION to exclude commands. + * [[#1008](https://github.com/RedisGears/RedisGears/pull/1008)](https://github.com/RedisGears/RedisGears/pull/1008) and [[#1020](https://github.com/RedisGears/RedisGears/pull/1020)](https://github.com/RedisGears/RedisGears/pull/1020) Fix when the data is read when a StreamTrigger is fired. + * [[#1010](https://github.com/RedisGears/RedisGears/pull/1010)](https://github.com/RedisGears/RedisGears/pull/1010) Apply loading timeout on AOF and replication stream. + * Minor patch update for the V8 JavaScript engine. + +**Redis version** +* __[Redis 7.2.1](https://github.com/redis/redis/releases/tag/7.2.1)__ + +**Module versions** +* __[RediSearch 2.8.4](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.4)__ +* __[RedisJSON 2.6.6](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.6)__ +* __[RedisTimeSeries 1.10.6](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.6)__ +* __[RedisBloom 2.6.3](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.3)__ +* __[RedisGears 2.0.12](https://github.com/RedisGears/RedisGears/releases/tag/v2.0.12-m13)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.0.0 or greater](https://github.com/redis/jedis/releases/tag/v5.0.0) + * [redis-om-spring 0.8.7 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.7) +* Python + * [redis-py 5.0.0 or greater ](https://github.com/redis/redis-py/releases/tag/v5.0.0) + * [redis-om-python 0.2.1 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.2.1) +* NodeJS + * [node-redis 4.6.8 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.8) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.5.3 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.5.3) + * [NRedisStack 0.9.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.9.0) +* Go + * [go-redis 9.1.0 or greater](https://github.com/redis/go-redis/releases/tag/v9.1.0) + * [rueidis 1.0.17 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.17) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.32](https://github.com/RedisInsight/RedisInsight/releases/tag/2.32). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack 7.2.0-v1 (September 2023) + +This is a maintenance release for Redis Stack Server 7.2.0 + +Update urgency: `SECURITY`: There are security fixes in the release. + +### Headlines: +This version contains security fixes for the Redis server for cases when users may access keys that are not explicitly authorized by the ACL configuration using the [SORT_RO](https://redis.io/commands/sort_ro/) command. + +### Details: + + **Security Fixes** +* **Redis**: + * (CVE-2023-41053) Redis does not correctly identify keys accessed by SORT_RO and, +as a result, may grant users executing this command access to keys that are not +explicitly authorized by the ACL configuration. + +**Bug Fixes** +* **Redis**: + * [[#12538](https://github.com/redis/redis/pull/12538)](https://github.com/redis/redis/pull/12538) Fix crashes when joining a node to an existing 7.0 Redis Cluster + * [[#12545](https://github.com/redis/redis/pull/12545)](https://github.com/redis/redis/pull/12545), [[#12530](https://github.com/redis/redis/pull/12530)](https://github.com/redis/redis/pull/12530) Correct request_policy and response_policy command tips on for some admin / +configuration commands + +**Redis version** +* __[Redis 7.2.1](https://github.com/redis/redis/releases/tag/7.2.1)__ + +**Module versions** +* __[RediSearch 2.8.4](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.4)__ +* __[RedisJSON 2.6.6](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.6)__ +* __[RedisTimeSeries 1.10.4](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.4)__ +* __[RedisBloom 2.6.3](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.3)__ +* __[RedisGears 2.0.11](https://github.com/RedisGears/RedisGears/releases/tag/v2.0.11-m12)__ + +**Recommended Client Libraries** +* Java + * [Jedis 5.0.0 or greater](https://github.com/redis/jedis/releases/tag/v5.0.0) + * [redis-om-spring 0.8.7 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.7) +* Python + * [redis-py 5.0.0 or greater ](https://github.com/redis/redis-py/releases/tag/v5.0.0) + * [redis-om-python 0.2.1 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.2.1) +* NodeJS + * [node-redis 4.6.8 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.8) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.5.3 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.5.3) + * [NRedisStack 0.9.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.9.0) +* Go + * [go-redis 9.1.0 or greater](https://github.com/redis/go-redis/releases/tag/v9.1.0) + * [rueidis 1.0.17 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.17) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.32](https://github.com/RedisInsight/RedisInsight/releases/tag/2.32). + +Note: version numbers follow the following pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack 7.2.0-v0 (August 2023) + +This is a GA release of Redis Stack version 7.2. + +### Headlines: +Redis server 7.2 introduces significant memory and speed optimizations for lists, sets, and sorted sets, several improvements, including encoding improvements for sets and lists, stream consumer group improvements, and improved durability. +Search and Query brings the frequently asked Geo polygons queries for basic shapes and improved query performance on sorting in different scenarios. +JSON introduces two new commands: [JSON.MERGE](https://redis.io/commands/json.merge/) and [JSON.MSET](https://redis.io/commands/json.mset/) for more efficient data manipulation. +Preview of triggers and functions that allows developers to run JavaScript functions inside the Redis process. +Lastly, 7.2 adds the option to use the new protocol [RESP3](https://github.com/redis/redis-specifications/blob/master/protocol/RESP3.md) improving the response format for all commands. + +**Redis server**: +Redis server 7.2 brings performance and resource utilization improvements, including significant memory and speed optimizations for lists, sets, and sorted sets. This new version adds a new `WITHSCORE` command argument for [ZRANK](https://redis.io/commands/zrank/) and [ZREVRANK](https://redis.io/commands/zrevrank/), new commands, such as [CLIENT NO-TOUCH](https://redis.io/commands/client-no-touch/) for clients to run commands without affecting LRU/LFU of keys, and more. Redis 7.2 brings behavior changes by introducing a new format (version 11) for RDB files, which is incompatible with older versions, changing module API, and other changes. + +**Search and Query**: +This new major version introduces the frequently asked [Geo Polygon](https://redis.io/commands/ft.search/#examples) Search. Adding the [GEOSHAPE](https://redis.io/commands/ft.create/) field type that supports polygon shapes using the [WKT notation](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry). In addition to the existing `GEO` for geo range queries, now an alias for `GEOPOINT`, we add `GEOSHAPE` with the support for `POLYGON` and `POINT` as new shapes formats and polygons operations. + +In addition, 7.2 brings improvements in performance for `SORT BY` operations using [`FT.SEARCH`](https://redis.io/commands/ft.search/#optional-arguments) and [`FT.AGGREGATE`](https://redis.io/commands/ft.aggregate/#optional-arguments), and the new `FORMAT` for better readability and future support for better error handling responses on `FT.SEARCH` and `FT.AGGREGATE` in RESP3 only. + +**JSON**: +JSON introduces two new commands: + - [JSON.MERGE](https://redis.io/commands/json.merge/) merges a given JSON value into matching paths so that the JSON values at the matching paths are updated, deleted, or expanded. + - [JSON.MSET](https://redis.io/commands/json.mset/) sets or updates one or more JSON values according to specified key-path-value triplets. + +**Graph**: + +Graph capabilities are no longer included in Redis Stack. See the [RedisGraph End-of-Life Announcement](https://redis.com/blog/redisgraph-eol/). + +> [!WARNING] +If you are using graph capabilities with an older version of Redis Stack - please don't upgrade. + +**Triggers and functions preview**: +Triggers and functions is part of Redis Stack 7.2 as public preview, any feedback is highly appreciated. + +Triggers and functions provides support for running JavaScript functions inside the Redis process. These functions can be executed on-demand, by an event-driven trigger, or by a stream processing trigger. Triggers and functions empowers developers to build and maintain real-time applications by moving logic closer to the data, ensuring a lower latency whilst delivering the best developer experience. + +Try it out with the [triggers and functions quick start](https://redis.io/docs/interact/programmability/triggers-and-functions/quick_start/). + + +### Details: +Find more details about features and optimizations introduced with Redis Stack 7.2 here: +* [Redis server](https://github.com/redis/redis/blob/7.2/00-RELEASENOTES) +* [Search and Query](https://github.com/RediSearch/RediSearch/releases/) +* [JSON](https://github.com/RedisJSON/RedisJSON/releases) +* [Triggers and functions](https://github.com/RedisGears/RedisGears/releases) + +**Redis version** +* __[Redis 7.2](https://github.com/redis/redis/blob/7.2/00-RELEASENOTES)__ + +**Module versions** +* __[RediSearch 2.8.4](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.4)__ +* __[RedisJSON 2.6.6](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.6)__ +* __[RedisTimeSeries 1.10.4](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.4)__ +* __[RedisBloom 2.6.3](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.3)__ +* __[RedisGears 2.0.11](https://github.com/RedisGears/RedisGears/releases/tag/v2.0.11-m12)__ + +**Recommended Client Libraries** +* Java + * [Jedis 4.4.3 or greater](https://github.com/redis/jedis/releases/tag/v4.4.3) + * [redis-om-spring 0.8.6 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.6) +* Python + * [redis-py 5.0.0 or greater ](https://github.com/redis/redis-py/releases/tag/v5.0.0) + * [redis-om-python 0.2.1 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.2.1) +* NodeJS + * [node-redis 4.6.7 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.7) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.5.2 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.5.2) + * [NRedisStack 0.8.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.8.0) +* Go + * [go-redis 9.0.5 or greater](https://github.com/redis/go-redis/releases/tag/v9.0.5) + * [rueidis 1.0.15 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.15) + +Compatible with the latest [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.30](https://github.com/RedisInsight/RedisInsight/releases/tag/2.30.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack 7.2.0-rc2 (July 2023) + +This is the third release of Redis Stack version 7.2.0. + +Update urgency: `SECURITY`: there are security fixes in the release. + +### Headlines: + +This version contains security improvements for the Redis server. + +### Details: + +**Features** +* **Redis**: + * [[#10362](https://github.com/redis/redis/pull/10362)](https://github.com/redis/redis/pull/10362) Make SENTINEL CONFIG [SET|GET] variadic + * [[#12133](https://github.com/redis/redis/pull/12133)](https://github.com/redis/redis/pull/12133) Add a new loglevel "nothing" to disable logging + * [[#9564](https://github.com/redis/redis/pull/9564)](https://github.com/redis/redis/pull/9564) Add cluster-announce-human-nodename - a unique identifier for a node that is +be used in logs for debugging + + **Improvements** +* **Redis**: + * ([CVE-2022-24834](https://github.com/redis/redis/security/advisories/GHSA-p8x2-9v9q-c838)) A specially crafted Lua script executing in Redis can trigger +a heap overflow in the cjson and cmsgpack libraries, and result in heap +corruption and potentially remote code execution. The problem exists in all +versions of Redis with Lua scripting support, starting from 2.6, and affects +only authenticated and authorized users. + * ([CVE-2023-36824](https://github.com/redis/redis/security/advisories/GHSA-4cfx-h9gq-xpx3)) Extracting key names from a command and a list of arguments +may, in some cases, trigger a heap overflow and result in reading random heap +memory, heap corruption and potentially remote code execution. Specifically: +using COMMAND GETKEYS* and validation of key names in ACL rules. + * [[#12269](https://github.com/redis/redis/pull/12269)](https://github.com/redis/redis/pull/12269) Allow CLUSTER SLOTS / SHARDS commands during loading + * [[#12233](https://github.com/redis/redis/pull/12233)](https://github.com/redis/redis/pull/12233) Support TLS service when "tls-cluster" is not enabled and persist both plain +and TLS port in nodes.conf + * [[#12320](https://github.com/redis/redis/pull/12320)](https://github.com/redis/redis/pull/12320) Update SPOP and RESTORE commands to replicate unlink commands to replicas +when the server is configured to use async server deletes + * [[#12229](https://github.com/redis/redis/pull/12229)](https://github.com/redis/redis/pull/12229) Try lazyfree the temporary zset in ZUNION / ZINTER / ZDIFF + * [[#12298](https://github.com/redis/redis/pull/12298)](https://github.com/redis/redis/pull/12298) Optimize PSUBSCRIBE and PUNSUBSCRIBE from O(N*M) to O(N) + * [[#12209](https://github.com/redis/redis/pull/12209)](https://github.com/redis/redis/pull/12209) Optimize SCAN, SSCAN, HSCAN, ZSCAN commands + * [[#12315](https://github.com/redis/redis/pull/12315)](https://github.com/redis/redis/pull/12315) Set Jemalloc --disable-cache-oblivious to reduce memory overhead + * [[#12229](https://github.com/redis/redis/pull/12229)](https://github.com/redis/redis/pull/12229) Optimize ZINTERCARD to avoid create a temporary zset + * [[#12205](https://github.com/redis/redis/pull/12205)](https://github.com/redis/redis/pull/12205) Optimize HRANDFIELD and ZRANDMEMBER listpack encoded () + * [[#12155](https://github.com/redis/redis/pull/12155)](https://github.com/redis/redis/pull/12155), [[#12082](https://github.com/redis/redis/pull/12082)](https://github.com/redis/redis/pull/12082), [[#11626](https://github.com/redis/redis/pull/11626)](https://github.com/redis/redis/pull/11626), [[#11944](https://github.com/redis/redis/pull/11944)](https://github.com/redis/redis/pull/11944), [[#12316](https://github.com/redis/redis/pull/12316)](https://github.com/redis/redis/pull/12316), [[#12250](https://github.com/redis/redis/pull/12250)](https://github.com/redis/redis/pull/12250), +[[#12177](https://github.com/redis/redis/pull/12177)](https://github.com/redis/redis/pull/12177), [[#12185](https://github.com/redis/redis/pull/12185)](https://github.com/redis/redis/pull/12185) Numerous other optimizations + * [[#12254](https://github.com/redis/redis/pull/12254)](https://github.com/redis/redis/pull/12254) redis-cli: Handle RESP3 double responses that contain a NaN + * [[#11834](https://github.com/redis/redis/pull/11834)](https://github.com/redis/redis/pull/11834) redis-cli: Support URIs with IPv6 + +**Changed Behavior** +* **Redis**: + * [[#10536](https://github.com/redis/redis/pull/10536)](https://github.com/redis/redis/pull/10536), [[#12166](https://github.com/redis/redis/pull/12166)](https://github.com/redis/redis/pull/12166) Cluster SHARD IDs are no longer visible in the cluster nodes output + * [[#12326](https://github.com/redis/redis/pull/12326)](https://github.com/redis/redis/pull/12326) When calling PUBLISH with a RESP3 client that's also subscribed to the same channel, the order is changed and the reply is sent before the published message + * [[#12321](https://github.com/redis/redis/pull/12321)](https://github.com/redis/redis/pull/12321) Align semantics of the new (v7.2 RC2) RM_ReplyWithErrorFormat with RM_ReplyWithError. +This is a breaking change that affects the generated error code + * [[#12304](https://github.com/redis/redis/pull/12304)](https://github.com/redis/redis/pull/12304) Forbid RM_AddPostNotificationJob on loading and on read-only replicas + * [[#12219](https://github.com/redis/redis/pull/12219)](https://github.com/redis/redis/pull/12219) Add ability for module command filter to know which client is being handled + +**Bug Fixes** +* **Redis**: + * [[#12326](https://github.com/redis/redis/pull/12326)](https://github.com/redis/redis/pull/12326) Fix broken protocol when PUBLISH is used inside MULTI when the RESP3 +publishing client is also subscribed for the channel + * [[#12220](https://github.com/redis/redis/pull/12220)](https://github.com/redis/redis/pull/12220) Fix WAIT to be effective after a blocked module command being unblocked + * [[#12276](https://github.com/redis/redis/pull/12276)](https://github.com/redis/redis/pull/12276) Re-enable downscale rehashing while there is a fork child + * [[#12276](https://github.com/redis/redis/pull/12276)](https://github.com/redis/redis/pull/12276) Fix possible hang in HRANDFIELD, SRANDMEMBER, ZRANDMEMBER when used with `` + * [[#12276](https://github.com/redis/redis/pull/12276)](https://github.com/redis/redis/pull/12276) Improve fairness issue in RANDOMKEY, HRANDFIELD, SRANDMEMBER, ZRANDMEMBER, SPOP, and eviction + * [[#12344](https://github.com/redis/redis/pull/12344)](https://github.com/redis/redis/pull/12344) Cluster: fix a race condition where a slot migration may revert on a subsequent failover or node joining + * [[#12301](https://github.com/redis/redis/pull/12301)](https://github.com/redis/redis/pull/12301)Fix XREADGROUP BLOCK with ">" from hanging + * [[#12247](https://github.com/redis/redis/pull/12247)](https://github.com/redis/redis/pull/12247)Fix assertion when a blocked command is rejected when re-processed + * [[#12342](https://github.com/redis/redis/pull/12342)](https://github.com/redis/redis/pull/12342)Fix use after free on a blocking RM_Call + +**Redis version** +* __[Redis 7.2 RC3](https://github.com/redis/redis/blob/7.2/00-RELEASENOTES)__ + + +**Module versions** +* __[RediSearch 2.8.3](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.3)__ +* __[RedisJSON 2.6.2](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.2)__ +* __[RedisTimeSeries 1.10.1](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.1)__ +* __[RedisBloom 2.6.1](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.1)__ +* __[RedisGears 2.0.6](https://github.com/RedisGears/RedisGears/releases/tag/v2.0.6-m07)__ + +**Recommended Client Libraries** +* Java + * [Jedis 4.4.3 or greater](https://github.com/redis/jedis/releases/tag/v4.4.3) + * [redis-om-spring 0.8.1 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.1) +* Python + * [redis-py 4.5.5 or greater ](https://github.com/redis/redis-py/releases/tag/v4.5.5) + * [redis-om-python 0.1.2 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.1.2) +* NodeJS + * [node-redis 4.6.7 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.7) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.5.1 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.5.1) + * [NRedisStack 0.7.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.7.0) +* Go + * [go-redis 9.0.4 or greater](https://github.com/redis/go-redis/releases/tag/v9.0.4) + * [rueidis 1.0.3 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.3) + +Compatible with [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.26](https://github.com/RedisInsight/RedisInsight/releases/tag/2.26.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack 7.2.0-rc2 (June 2023) + +This is the second release of Redis Stack version 7.2.0. + +### Headlines: +This version contains a new capability - **Triggers and Functions**, improvements to the **Search and Query** capability, and improvements to the **JSON**, **time series** and **probabilistic data structures**. It also includes the latest version of **RedisInsight**. + +The new **Search and Query** version introduces new and frequently asked **Geo Polygon Search**. Adding the `GEOSHAPE` field type that supports polygon shapes using [WKT notation](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry). Besides the current `GEO` (alias for `GEOPOINT`) used already geo range queries, we add the support for `POLYGON` as new shapes. In addition, it brings improvements in performance for `SORT BY` operations using `FT.SEARCH` and `FT.AGGREGATE`. + +This release includes a new capability - [Triggers and Functions](https://github.com/RedisGears/RedisGears/tree/master) that brings the ability to execute and trigger business logic inside Redis using JavaScript (JS). Detailed documentation and examples can be found in this [GitHub repository](https://github.com/RedisGears/RedisGears#redisgears-20). The Triggers and Functions commands are aligned with the Redis Functions command. The API is not yet final and might change based on feedback. **Any [feedback](https://github.com/RedisGears/RedisGears) is highly appreciated.** +### Details: +**Features** +* **Search and Query**: + * [[#3553](https://github.com/RediSearch/RediSearch/pull/3553)](https://github.com/RediSearch/RediSearch/pull/3553) Introduce support for Geo-polygon shapes and queries + * [[#3476](https://github.com/RediSearch/RediSearch/pull/3476)](https://github.com/RediSearch/RediSearch/pull/3476), [[#3660](https://github.com/RediSearch/RediSearch/pull/3660)](https://github.com/RediSearch/RediSearch/pull/3660) Adding `GEOSHAPE` [field type](https://redis.io/commands/ft.create/) to map polygons in the `SCHEMA` on `FT.CREATE`. + * Support for polygons `POLYGON` using [WKT notation](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry), for example `POLYGON((x1 y1, x2 y2, ...))`. + * [[#3556](https://github.com/RediSearch/RediSearch/pull/3556)](https://github.com/RediSearch/RediSearch/pull/3556) Adjust the [query syntax](https://redis.io/commands/ft.search/#examples) on `FT.SEARCH` for Polygons using the predicate `@geom:[OPERATOR $poly]` and defining polygon in WKT format as `PARAMS 2 poly "POLYGON((10 20, ...))"` using `DIALECT 3`. + * Initially `WITHIN` and `CONTAINS` operators with `GEOSHAPES` for now. + * [[#3645](https://github.com/RediSearch/RediSearch/pull/3645)](https://github.com/RediSearch/RediSearch/pull/3645) Support multiple coordinate systems cartesian (X,Y) and geographic (lon, lat). Geographic coordinate system using spherical indexing as default (`SPHERICAL`). + * [[#3046](https://github.com/RediSearch/RediSearch/pull/3046)](https://github.com/RediSearch/RediSearch/pull/3046) Introduce performance optimization for sorting operations on `FT.SEARCH` and `FT.AGGREGATE` as default on `DIALECT 4`. It will improve performance in 4 different scenarios, listed below: + * Skip Sorter - applied when there is no sort of any kind. The query can return once it reaches the `LIMIT` requested results. + * Partial Range - applied when there is a `SORTBY` a numeric field, with no filter or filter by the same numeric field, the query iterate on a range large enough to satisfy the `LIMIT` requested results. + * Hybrid - applied when there is a `SORTBY` a numeric field in addition to another non-numeric filter. Some results will get filtered, and the initial range may not be large enough. The iterator then is rewinded with the following ranges, and an additional iteration takes place to collect `LIMIT` requested results. + * No optimization - If there is a sort by score or by non-numeric field, there is no other option but to retrieve all results and compare their values. + * [[#3651](https://github.com/RediSearch/RediSearch/pull/3651)](https://github.com/RediSearch/RediSearch/pull/3651) Add `WITHCOUNT` argument that allow return accurate counts for the query results with sorting. This operation processes all results in order to get accurate count, being less performant than the optimised option (default behaviour on `DIALECT 4`). + + +* **JSON**: + * [[#916](https://github.com/RedisJSON/RedisJSON/pull/916)](https://github.com/RedisJSON/RedisJSON/pull/916) Introduce the new `JSON.MERGE` in compliance with [RFC 7396](https://datatracker.ietf.org/doc/html/rfc7396), supporting: + * Creating new attributes on an existing JSON document + * Updating and replacing values in parent and child attributes + * Deleting existing attributes (giving `null` as value) + * Array update - replacing an entire array with the new value. + * [[#944](https://github.com/RedisJSON/RedisJSON/pull/944)](https://github.com/RedisJSON/RedisJSON/pull/944) Introduce `JSON.MSET`, supporting atomic multiple sets for keys in the same hash slot. + +* **Triggers and Functions**: + * [[#875](https://github.com/RedisGears/RedisGears/pull/875)](https://github.com/RedisGears/RedisGears/pull/875) The api_version was added to the library prologue indicating the minimum required API version. Indicating the library works on the specified API version and later minor versions. +[[#896](https://github.com/RedisGears/RedisGears/pull/896)](https://github.com/RedisGears/RedisGears/pull/896) Additional optional callback on a KeySpace trigger that can perform read operations exactly when the notification happens. + * [[#910](https://github.com/RedisGears/RedisGears/pull/910)](https://github.com/RedisGears/RedisGears/pull/910) The JavaScript API is updated to be inline with JavaScript best practices. Registrations of functions and triggers is done with mandatory arguments and a single optional object. + * [[#935](https://github.com/RedisGears/RedisGears/pull/935)](https://github.com/RedisGears/RedisGears/pull/935) Ability to load an RDB from a Redis Server with the RedisGears module loaded but NOT used into a Redis Server without the RedisGears module. + * Updated commands: + * [[#910](https://github.com/RedisGears/RedisGears/pull/910)](https://github.com/RedisGears/RedisGears/pull/910) `TFUNCTION` and `TFCALL` is used instead of `RG.FUNCTION` and `RG.FCALL`. + * [[#939](https://github.com/RedisGears/RedisGears/pull/939)](https://github.com/RedisGears/RedisGears/pull/939) The commands are updated to match the Redis Functions commands. `TFCALL` combines the library and function in a single argument with '.' separated. Example: `TFCALL .`. + * [[#900](https://github.com/RedisGears/RedisGears/pull/900)](https://github.com/RedisGears/RedisGears/pull/900) rated the ability to run functions as a coroutine in `TFCALLASYNC`. Clients rely on `TFCALL` to never block shared connections so other commands are not delayed on such connections. + + + **Improvements** +* **Search and Query**: + * [[#3641](https://github.com/RediSearch/RediSearch/pull/3641)](https://github.com/RediSearch/RediSearch/pull/3641) Indexing sanitizing trigger in heavily data updates scenario. + * [[#3614](https://github.com/RediSearch/RediSearch/pull/3614)](https://github.com/RediSearch/RediSearch/pull/3614) Several improvements in the aggregations execution pipeline. + +* **Triggers and Functions**: + * [[#906](https://github.com/RedisGears/RedisGears/pull/906)](https://github.com/RedisGears/RedisGears/pull/906) Limit the total memory usage of all combined libraries, the values can be configured during module load. + * [[#940](https://github.com/RedisGears/RedisGears/pull/940)](https://github.com/RedisGears/RedisGears/pull/940) Validate the current memory usage when uploading a new library to not exceed the max memory limit. + + + +**Changed Behavior** +* **Search and Query**: + * [[#3355](https://github.com/RediSearch/RediSearch/pull/3355)](https://github.com/RediSearch/RediSearch/pull/3355), [[#3635](https://github.com/RediSearch/RediSearch/pull/3635)](https://github.com/RediSearch/RediSearch/pull/3635) Expired keys deleted from slave's index, returning an empty array instead of `nil`. + +**Bug Fixes** +* **Search and Query**: + * [[#3597](https://github.com/RediSearch/RediSearch/pull/3597)](https://github.com/RediSearch/RediSearch/pull/3597) Duplicating alias as output name on `FT.AGGREGATE` reducer (`REDUCE` argument) isn't return results. + * [[#3654](https://github.com/RediSearch/RediSearch/pull/3654)](https://github.com/RediSearch/RediSearch/pull/3654) Added check for `@` prefix on `GROUPBY` fields returnig an error instead of wrong results. + * [[#3501](https://github.com/RediSearch/RediSearch/pull/3501)](https://github.com/RediSearch/RediSearch/pull/3501) Sorting by 2 or more fields follow the order not ignoring the second argument. + * [[#3582](https://github.com/RediSearch/RediSearch/pull/3582)](https://github.com/RediSearch/RediSearch/pull/3582) Sorter will set lower rank in documents expired during query time, preventing clients to freeze. + +* **JSON**: + * [[#1025](https://github.com/RedisJSON/RedisJSON/pull/1025)](https://github.com/RedisJSON/RedisJSON/pull/1025) `JSON.TOGGLE` key space notification fix. + +* **Time series**: + * [[#1471](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1471)](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1471) Potential crash on `MRANGE` when aggregating millions of time series. + * [[#1469](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1469)](https://github.com/RedisTimeSeries/RedisTimeSeries/pull/1469) Potential memory leak in `MRANGE` after eviction. + +* **Triggers and Functions**: + * [[#913](https://github.com/RedisGears/RedisGears/pull/913)](https://github.com/RedisGears/RedisGears/pull/913) Do not trigger notifications when Redis is loading from a persistence file. + +**Redis version** +* __[Redis 7.2 RC2](https://github.com/redis/redis/blob/7.2/00-RELEASENOTES)__ + +**Module versions** +* __[RediSearch 2.8.3](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.3)__ +* __[RedisJSON 2.6.2](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.2)__ +* __[RedisTimeSeries 1.10.1](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.1)__ +* __[RedisBloom 2.6.1](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.1)__ +* __[RedisGears 2.0.6](https://github.com/RedisGears/RedisGears/releases/tag/v2.0.6-m07)__ + +**Recommended Client Libraries** +* Java + * [Jedis 4.4.3 or greater](https://github.com/redis/jedis/releases/tag/v4.4.3) + * [redis-om-spring 0.8.1 or greater](https://github.com/redis/redis-om-spring/releases/tag/v0.8.1) +* Python + * [redis-py 4.5.5 or greater ](https://github.com/redis/redis-py/releases/tag/v4.5.5) + * [redis-om-python 0.1.2 or greater](https://github.com/redis/redis-om-python/releases/tag/v0.1.2) +* NodeJS + * [node-redis 4.6.7 or greater](https://github.com/redis/node-redis/releases/tag/redis%404.6.7) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/releases/tag/v0.2.0) +* .NET + * [redis-om-dotnet 0.5.1 or greater](https://github.com/redis/redis-om-dotnet/releases/tag/v0.5.1) + * [NRedisStack 0.7.0 or greater](https://github.com/redis/NRedisStack/releases/tag/v0.7.0) +* Go + * [go-redis 9.0.4 or greater](https://github.com/redis/go-redis/releases/tag/v9.0.4) + * [rueidis 1.0.3 or greater](https://github.com/redis/rueidis/releases/tag/v1.0.3) + +Compatible with the latest [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.26](https://github.com/RedisInsight/RedisInsight/releases/tag/2.26.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. + +## Redis Stack 7.2.0-rc1 (June 2023) + +This is the first release of Redis Stack version 7.2.0. + +### Headlines: +This version contains the latest **Search and Query** capability, **JSON** capability, and a new version of RedisInsight. +The latest **Search and Query** capability introduces new and frequently asked Geo Polygon Search. Adding the `GEOMETRY` field type that supports polygon shapes using [WKT](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry) notation. In addition, it brings improvements in performance for `SORT BY` operations using `FT.SEARCH` and `FT.AGGREGATE`. +The latest **JSON** capability introduces the new `JSON.MERGE` in compliance with [RFC 7396](https://datatracker.ietf.org/doc/html/rfc7396), and `JSON.MSET`, which supports atomic multiple sets for keys in the same hash slot. + +### Details: +**Features** +* **Search and Query**: + * [[#3553](https://github.com/RediSearch/RediSearch/pull/3553)](https://github.com/RediSearch/RediSearch/pull/3553) Introduce support for Geo-polygon shapes and queries + * [[#3476](https://github.com/RediSearch/RediSearch/pull/3476)](https://github.com/RediSearch/RediSearch/pull/3476) Adding `GEOMETRY` [field type](https://redis.io/commands/ft.create/) to map polygons in the `SCHEMA` on `FT.CREATE` + * Adding polygons using [WKT notation](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry), for example `POLYGON((x1 y1, x2 y2, ...))` + * [[#3556](https://github.com/RediSearch/RediSearch/pull/3556)](https://github.com/RediSearch/RediSearch/pull/3556) Adjust the [query syntax](https://redis.io/commands/ft.search/#examples) on `FT.SEARCH` for Polygons using the predicate `@geom:[OPERATOR $poly]` and defining polygon in WKT format as `PARAMS 2 poly "POLYGON((10 20, ...))"` using `DIALECT 3` + * Initially `WITHIN` and `CONTAINS` operators with Geometries only + * [[#3046](https://github.com/RediSearch/RediSearch/pull/3046)](https://github.com/RediSearch/RediSearch/pull/3046) Introduce the `OPTIMIZE` keyword to `SORTBY` queries using `FT.SEARCH` and `FT.AGGREGATE` that improve performance in 4 different scenarios: + * **Skip Sorter** - applied when there is no sort of any kind. The query can return once it reaches the `LIMIT` requested results. + * **Partial Range** - applied when there is a `SORTBY` numeric field, with no filter or filter by the same numeric field, the query iterate on a range large enough to satisfy the `LIMIT` requested results. + * **Hybrid** - applied when there is a `SORTBY` numeric field in addition to another non-numeric filter. Some results will get filtered, and the initial range may not be large enough. The iterator then is rewinded with the following ranges, and an additional iteration takes place to collect the `LIMIT` requested results. + * **No optimization** - If there is a sort by score or non-numeric field, there is no other option but to retrieve all results and compare their values. + +* **JSON**: + * [[#916](https://github.com/RedisJSON/RedisJSON/pull/916)](https://github.com/RedisJSON/RedisJSON/pull/916) Introduce the new `JSON.MERGE` in compliance with [RFC 7396](https://datatracker.ietf.org/doc/html/rfc7396), supporting: + * Creating new attributes on an existing JSON document + * Updating and replacing values in parent and child attributes + * Deleting existing attributes (giving `null` as value) + * Array update - replacing an entire array with the new value + * [[#944](https://github.com/RedisJSON/RedisJSON/pull/944)](https://github.com/RedisJSON/RedisJSON/pull/944) Introduce `JSON.MSET`, supporting atomic multiple sets for keys in the same hash slot + + **Improvements** +* **Search and Query**: + * [[#3628](https://github.com/RediSearch/RediSearch/pull/3628)](https://github.com/RediSearch/RediSearch/pull/3628) Background indexing scanning performance + +**Changed Behavior** +* **Search and Query**: + * [[#3355](https://github.com/RediSearch/RediSearch/pull/3355)](https://github.com/RediSearch/RediSearch/pull/3355) Expired keys deleted from the slave's index, returning an empty array instead of `nil` + +**Bug Fixes** +* **Search and Query**: + * [[#3562](https://github.com/RediSearch/RediSearch/pull/3562)](https://github.com/RediSearch/RediSearch/pull/3562) Index definition may load several times when using `REPLICAOF` causing a failure + * [[#3557](https://github.com/RediSearch/RediSearch/pull/3557)](https://github.com/RediSearch/RediSearch/pull/3557) `TIMEOUT` configuration on `FT.AGGREGATE` query being ignored + * [[#3606](https://github.com/RediSearch/RediSearch/pull/3606)](https://github.com/RediSearch/RediSearch/pull/3606) Update numeric inverted index `numEntries` avoiding excessive memory consumption + * [[#3552](https://github.com/RediSearch/RediSearch/pull/3552)](https://github.com/RediSearch/RediSearch/pull/3552) `FT.CURSOR READ` on `JSON` numeric queries not returning results + +**Redis version** +* __[Redis 7.2 RC2](https://github.com/redis/redis/blob/7.2/00-RELEASENOTES)__ + +**Module versions** +* __[RediSearch 2.8.2](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.2)__ +* __[RedisJSON 2.6.1](https://github.com/RedisJSON/RedisJSON/releases/tag/v2.6.1)__ +* __[RedisTimeSeries 1.10.0](https://github.com/RedisTimeSeries/RedisTimeSeries/releases/tag/v1.10.0)__ +* __[RedisBloom 2.6.0](https://github.com/RedisBloom/RedisBloom/releases/tag/v2.6.0)__ + +**Recommended Client Libraries** +* Java + * [Jedis 4.4.0 or greater](https://github.com/redis/jedis/releases/) + * [redis-om-spring 0.8.1 or greater](https://github.com/redis/redis-om-spring/releases) +* Python + * [redis-py 4.5.5 or greater ](https://github.com/redis/redis-py/releases) + * [redis-om-python 0.1.2 or greater](https://github.com/redis/redis-om-python/releases) +* NodeJS + * [node-redis 4.6.6 or greater](https://github.com/redis/node-redis/releases) + * [redis-om-node 0.2.0 or greater](https://github.com/redis/redis-om-node/tags) +* .NET + * [redis-om-dotnet 0.5.1 or greater](https://github.com/redis/redis-om-dotnet/releases) + * [NRedisStack 0.6.1 or greater](https://github.com/redis/NRedisStack/releases) +* Go + * [go-redis 9.0.4 or greater](https://github.com/redis/go-redis/releases) + * [rueidis 1.0.3 or greater](https://github.com/redis/rueidis/releases) + +Compatible with the latest [RedisInsight](https://redis.io/download). The docker image redis/redis-stack for this version is bundled with [RedisInsight 2.26](https://github.com/RedisInsight/RedisInsight/releases/tag/2.26.0). + +Note: version numbers follow the pattern: + +`x.y.z-b` +* `x.y` Redis major version +* `z` increases with even numbers as a module x.y version increases. +* `b` denotes a patch to Redis or a module (any `z` of Redis or modules). `b` will consist of a `v` + numeric value. diff --git a/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redistimeseries/redistimeseries-1.0-release-notes.md b/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redistimeseries/redistimeseries-1.0-release-notes.md index a7ba6488ba..f1fa79055b 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redistimeseries/redistimeseries-1.0-release-notes.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redistimeseries/redistimeseries-1.0-release-notes.md @@ -1,5 +1,5 @@ --- -Title: RedisTimeSeries 1.0 release rotes +Title: RedisTimeSeries 1.0 release notes alwaysopen: false categories: - docs diff --git a/content/operate/oss_and_stack/stack-with-enterprise/search/config.md b/content/operate/oss_and_stack/stack-with-enterprise/search/config.md index 3b5464fbae..eb43029fbb 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/search/config.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/search/config.md @@ -5,13 +5,15 @@ categories: - docs - operate - stack -description: Search and query configuration settings supported by Redis Enterprise. +description: Search and query configuration settings supported by Redis Enterprise Software and Redis Cloud. linkTitle: Configuration toc: 'false' weight: 15 --- -You cannot use [`FT.CONFIG SET`]({{< baseurl >}}/commands/ft.config-set) to configure RediSearch in [Redis Enterprise Software]({{< relref "/operate/rs" >}}) or [Redis Cloud]({{< relref "/operate/rc" >}}). Instead, use one of the following methods. +To configure RediSearch in [Redis Enterprise Software]({{< relref "/operate/rs" >}}) or [Redis Cloud]({{< relref "/operate/rc" >}}), use one of the following methods instead of [`FT.CONFIG SET`]({{< baseurl >}}/commands/ft.config-set). + +## Configure search in Redis Cloud For Redis Cloud: @@ -19,7 +21,27 @@ For Redis Cloud: - _Free or Fixed subscriptions_: you cannot change RediSearch configuration. -For Redis Enterprise Software, use either: +## Configure search in Redis Software + +For Redis Enterprise Software, use one of the following methods: + +- Cluster Manager UI: + + 1. From the **Databases** list, select the database, then click **Configuration**. + + 1. Select the **Edit** button. + + 1. In the **Capabilities** section, click **Parameters**. + + 1. Enter the setting name and setting value in the **RediSearch** box. + + In the **Query Performance Factor** section, you can configure settings to improve query performance. See [Configure the query performance factor for Redis Query Engine in Redis Enterprise]({{}}) for more information. + + {{The Parameters dialog includes sections to edit RediSearch settings and the Query Performance Factor settings.}} + + 1. After you finish editing the module's configuration parameters, click **Done** to close the parameter editor. + + 1. Click **Save**. - [`rladmin tune db`]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-db" >}}): @@ -42,6 +64,8 @@ For Redis Enterprise Software, use either: } ``` +## Configuration settings + | Setting | Redis
Enterprise | Redis
Cloud | Notes | |:--------|:----------------------|:-----------------|:------| | [CONCURRENT_WRITE_MODE]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: Not enabled | diff --git a/content/operate/oss_and_stack/stack-with-enterprise/search/query-performance-factor.md b/content/operate/oss_and_stack/stack-with-enterprise/search/query-performance-factor.md index 2dced5729a..d6a25ebc37 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/search/query-performance-factor.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/search/query-performance-factor.md @@ -34,9 +34,9 @@ If you do not have a cluster that supports Redis Query Engine, [install Redis En 1. [Determine the query performance factor](#calculate-performance-factor) you want and the required number of CPUs. Unused CPUs, above the 20% necessary for Redis, can be used for the scalable Redis Query Engine. -1. Create a new Redis database with the number of CPUs configured for the Query performance factor. +1. Create a new Redis database with the number of CPUs configured for the query performance factor. -## Calculate performance factor +## Calculate query performance factor ### CPUs for query performance factor @@ -73,11 +73,92 @@ The following table shows the number of CPUs required for each performance facto | Scale factor | 4x | | Minimum CPUs required for scale factor | 6 | -## Configure query performance factor +## Configure query performance factor manually -To configure the query performance factor in Redis Enterprise, use the [REST API]({{}}) to create a new database or update an existing database. +To manually configure the query performance factor in Redis Enterprise Software: -### Create new database +1. [Configure query performance factor parameters](#config-db-ui) when you create a new database or edit an existing database's configuration in the Cluster Manager UI. + +1. If you configure the query performance factor for an existing database, you also need to [restart shards](#restart-shards). Newly created databases can skip this step. + +### Configure query performance factor parameters in the Cluster Manager UI {#config-db-ui} + +You can use the Cluster Manager UI to configure the query performance factor when you [create a new database]({{}}) or [edit an existing database]({{}}) with search enabled. + +1. In the **Capabilities** section of the database configuration screen, click **Parameters**. + +1. If you are creating a new database, select **Search and query**. + +1. Adjust the **RediSearch** parameters to include: + + `MT_MODE MT_MODE_FULL WORKER_THREADS ` + + See [Calculate query performance factor](#calculate-query-performance-factor) to determine the minimum CPUs required to use for ``. + +1. Expand the **Query Performance Factor** section and enter the following values: + + - `mnp` for **Connections routing** + + - `32` for **Connections limit** + + {{Configure search parameters and query performance factor.}} + +1. Click **Done** to close the parameter editor. + +1. Click **Create** or **Save**. + +### Restart shards {#restart-shards} + +After you update the query performance factor for an existing database, restart all shards to apply the new settings. You can migrate shards to restart them. Newly created databases can skip this step. + +1. Use [`rladmin status shards db `]({{}}) to list all shards for your database: + + ```sh + rladmin status shards db db-name + ``` + + Example output: + + ```sh + SHARDS: + DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS + db:2 db-name redis:1 node:1 master 0-16383 1.95MB OK + db:2 db-name redis:2 node:2 slave 0-16383 1.95MB OK + ``` + + Note the following fields for the next steps: + - `ID`: the Redis shard's ID. + - `NODE`: the node on which the shard currently resides. + - `ROLE`: `master` is a primary shard; `slave` is a replica shard. + +1. For each replica shard, use [`rladmin migrate shard`]({{}}) to move it to a different node and restart it: + + ```sh + rladmin migrate shard target_node + ``` + +1. After you migrate the replica shards, migrate the original primary shards. + +1. Rerun `rladmin status shards db ` to verify the shards migrated to different nodes: + + ```sh + rladmin status shards db db-name + ``` + + Example output: + + ```sh + SHARDS: + DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS + db:2 db-name redis:1 node:2 master 0-16383 1.95MB OK + db:2 db-name redis:2 node:1 slave 0-16383 1.95MB OK + ``` + +## Configure query performance factor with the REST API + +You can configure the query performance factor when you [create a new database](#create-db-rest-api) or [update an existing database](#update-db-rest-api) using the Redis Enterprise Software [REST API]({{}}). + +### Create new database with the REST API {#create-db-rest-api} To create a database and configure the query performance factor, use the [create database REST API endpoint]({{}}) with a [BDB object]({{}}) that includes the following parameters: @@ -126,7 +207,7 @@ The following [cURL](https://curl.se/docs/) request creates a new database from curl -k -u ":" https://:9443/v1/bdbs -H "Content-Type:application/json" -d @scalable-search-db.json ``` -### Update existing database +### Update existing database with the REST API {#update-db-rest-api} To configure the query performance factor for an existing database, use the following REST API requests: diff --git a/content/operate/oss_and_stack/stack-with-enterprise/timeseries/config.md b/content/operate/oss_and_stack/stack-with-enterprise/timeseries/config.md index bd874d707b..c44d040f57 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/timeseries/config.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/timeseries/config.md @@ -5,16 +5,34 @@ categories: - docs - operate - stack -description: Time series configuration settings supported by Redis Enterprise. +description: Time series configuration settings supported by Redis Enterprise Software and Redis Cloud. linkTitle: Configuration toc: 'false' weight: 30 --- +## Configure time series in Redis Software + [Redis Enterprise Software]({{< relref "/operate/rs" >}}) lets you manually change any [RedisTimeSeries configuration setting]({{< relref "/develop/data-types/timeseries/" >}}configuration/#redistimeseries-configuration-parameters). +To change RedisTimeSeries configuration using the Redis Software Cluster Manager UI: + + 1. From the **Databases** list, select the database, then click **Configuration**. + + 1. Select the **Edit** button. + + 1. In the **Capabilities** section, click **Parameters**. + + 1. After you finish editing the module's configuration parameters, click **Done** to close the parameter editor. + + 1. Click **Save**. + +## Configure time series in Redis Cloud + [Redis Cloud]({{< relref "/operate/rc" >}}) does not let you configure RedisTimeSeries manually. However, if you have a Flexible or Annual [subscription]({{< relref "/operate/rc/subscriptions" >}}), you can contact [support](https://redis.com/company/support/) to request a configuration change. You cannot change RedisTimeSeries configuration for Free or Fixed subscriptions. +## Configuration settings + | Setting | Redis
Enterprise | Redis
Cloud | Notes | |:--------|:----------------------|:-----------------|:------| | [CHUNK_SIZE_BYTES]({{< relref "/develop/data-types/timeseries/configuration" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: `4096` | diff --git a/content/operate/rc/api/get-started/manage-api-keys.md b/content/operate/rc/api/get-started/manage-api-keys.md index 49c41f9a97..a7d2494308 100644 --- a/content/operate/rc/api/get-started/manage-api-keys.md +++ b/content/operate/rc/api/get-started/manage-api-keys.md @@ -43,7 +43,7 @@ The **Copy** button copies the account key to the Clipboard. **API user keys** (also known as _secret keys_) are used as the value of the `x-api-secret-key` HTTP header used to authenticate a REST API request. -In this context, _user_ refers to the account used to sign in to the Redis Cloud console. Users must be account owners. +In this context, _user_ refers to the account used to sign in to the Redis Cloud console. Users must have an owner (read-write) or viewer (read-only) role. Users can have more than one user key; however, users should not share user keys. @@ -62,7 +62,7 @@ The key name: - Must be between 10 and 50 characters long - Can contain alphanumeric characters, hyphens, and underscores. Spaces are not allowed. -The user name must be an account owner. +The user name must have an owner or viewer role. Select **Create** to create the new key. @@ -123,4 +123,4 @@ To manage the CIDR allow list: Use the **Edit** button to change the address for a rule or the **Delete button** to remove a rule. - {{Use the **Edit** button to change the address for a CIDR allow list rule.}}   {{Use the **Delete** button to remove an address from the CIDR allow list.}} \ No newline at end of file + {{Use the **Edit** button to change the address for a CIDR allow list rule.}}   {{Use the **Delete** button to remove an address from the CIDR allow list.}} diff --git a/content/operate/rc/compatibility.md b/content/operate/rc/compatibility.md index 849c9fded3..f32823050b 100644 --- a/content/operate/rc/compatibility.md +++ b/content/operate/rc/compatibility.md @@ -19,6 +19,10 @@ Both [Redis Enterprise Software]({{< relref "/operate/rs" >}}) and Redis Cloud a Redis Enterprise Software and Redis Cloud support RESP2 and RESP3. In Redis Cloud, you can choose between RESP2 and RESP3 when you [create a database]({{< relref "/operate/rc/databases/create-database" >}}) and you can change it when you [edit a database]({{< relref "/operate/rc/databases/view-edit-database" >}}). For more information about the different RESP versions, see the [Redis serialization protocol specification]({{< relref "/develop/reference/protocol-spec" >}}#resp-versions). +## Client-side caching compatibility + +Redis Software and Redis Cloud support [client-side caching]({{}}) for databases with Redis versions 7.4 or later. See [Client-side caching compatibility with Redis Software and Redis Cloud]({{}}) for more information about compatibility. + ## Compatibility with Redis Cluster API Redis Cloud supports [Redis Cluster API]({{< relref "/operate/rc/databases/configuration/clustering#oss-cluster-api" >}}) on Redis Cloud Pro if it is enabled for a database. Review [Redis Cluster API architecture]({{< relref "/operate/rs/clusters/optimize/oss-cluster-api" >}}) to determine if you should enable this feature for your database. \ No newline at end of file diff --git a/content/operate/rc/databases/connect.md b/content/operate/rc/databases/connect.md index 5a6c96f0bf..35b3796995 100644 --- a/content/operate/rc/databases/connect.md +++ b/content/operate/rc/databases/connect.md @@ -35,19 +35,19 @@ The connection wizard provides the following database connection methods: ## Redis Insight {#using-redisinsight} -[Redis Insight]({{< relref "/develop/connect/insight/" >}}) is a free Redis GUI that is available for macOS, Windows, and Linux. +[Redis Insight]({{< relref "/develop/tools/insight" >}}) is a free Redis GUI that is available for macOS, Windows, and Linux. 1. If you haven't downloaded Redis Insight, select **Download** under **Redis Insight** in the Connection wizard to download it. -1. [Install Redis Insight]({{< relref "/develop/connect/insight/" >}}). +1. [Install Redis Insight]({{< relref "/develop/tools/insight" >}}). 1. Once installed, select **Open with Redis Insight**. 1. A pop-up asks if you wish to open the link with Redis Insight. Select **Open Redis Insight** to connect to your database with Redis Insight. -If you get an error when connecting with Redis Insight, [manually connect to your database]({{< relref "/develop/connect/insight/" >}}) from Redis Insight. +If you get an error when connecting with Redis Insight, [manually connect to your database]({{< relref "/develop/tools/insight" >}}) from Redis Insight. -You can use Redis Insight to view your data, run Redis commands, and analyze database performance. See the [Redis Insight docs]({{< relref "/develop/connect/insight/" >}}) for more info. +You can use Redis Insight to view your data, run Redis commands, and analyze database performance. See the [Redis Insight docs]({{< relref "/develop/tools/insight" >}}) for more info. ## Redis client {#using-redis-client} @@ -55,28 +55,28 @@ A Redis client is a software library or tool that enables applications to intera The connection wizard provides code snippets to connect to your database with the following programming languages: -- node.js using [node-redis](https://github.com/redis/node-redis/blob/master/README.md) +- node.js using [node-redis]({{< relref "/develop/clients/nodejs" >}}) - .NET using [StackExchange.Redis](https://stackexchange.github.io/StackExchange.Redis/) -- Python using [redis-py](https://github.com/redis/redis-py#redis-py) -- Java using [Jedis](https://github.com/redis/jedis#jedis) +- Python using [redis-py]({{< relref "/develop/clients/redis-py" >}}) +- Java using [Jedis]({{< relref "/develop/clients/jedis" >}}) {{The connection wizard clients.}} If the username and password are not already filled in, replace `` and `` with your username and password. -See [Clients]({{< relref "/develop/connect/clients/" >}}) to learn how to connect with the official Redis clients. +See [Clients]({{< relref "/develop/clients" >}}) to learn how to connect with the official Redis clients. ### redis-cli {#using-rediscli} -The [`redis-cli`]({{< relref "/develop/connect/cli" >}}) utility is installed when you install Redis. It provides a command-line interface that lets you work with your database using core [Redis commands]({{< relref "/commands" >}}). +The [`redis-cli`]({{< relref "/develop/tools/cli" >}}) utility is installed when you install Redis. It provides a command-line interface that lets you work with your database using core [Redis commands]({{< relref "/commands" >}}). To run `redis-cli`, [install Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) on your machine. After it's installed, copy the `redis-cli` command under **Redis CLI** in the connection wizard and enter it into your terminal. If the username and password are not already filled in, replace `` and `` with your username and password. -See [Redis CLI]({{< relref "/develop/connect/cli" >}}) to learn how to use `redis-cli`. +See [Redis CLI]({{< relref "/develop/tools/cli" >}}) to learn how to use `redis-cli`. ## More info -- [Connect your application]({{< relref "/develop/connect/clients/" >}}) +- [Connect your application]({{< relref "/develop/clients" >}}) - [Connect with TLS]({{< relref "/operate/rc/security/database-security/tls-ssl#connect-over-tls" >}}) - [Default user]({{< relref "/operate/rc/security/access-control/data-access-control/default-user" >}}) - [Role-based access control]({{< relref "/operate/rc/security/access-control/data-access-control/role-based-access-control" >}}) \ No newline at end of file diff --git a/content/operate/rc/databases/flush-data.md b/content/operate/rc/databases/flush-data.md index 5c2f2e1d38..313c264b4b 100644 --- a/content/operate/rc/databases/flush-data.md +++ b/content/operate/rc/databases/flush-data.md @@ -47,7 +47,7 @@ redis-cli -h redis-12345.server.cloud.redislabs.example.com -p 12345 -a xyz flus ### Redis Insight -If you install [Redis Insight]({{< relref "/develop/connect/insight/" >}}) and [add your database]({{< relref "/operate/rc/rc-quickstart#using-redisinsight" >}}), you can use the Redis Insight workbench to run commands: +If you install [Redis Insight]({{< relref "/develop/tools/insight" >}}) and [add your database]({{< relref "/operate/rc/rc-quickstart#using-redisinsight" >}}), you can use the Redis Insight workbench to run commands: 1. Start Redis Insight and connect to your database. diff --git a/content/operate/rc/databases/monitor-performance.md b/content/operate/rc/databases/monitor-performance.md index 3913c0113e..73cd756380 100644 --- a/content/operate/rc/databases/monitor-performance.md +++ b/content/operate/rc/databases/monitor-performance.md @@ -59,7 +59,7 @@ Several metric graphs are available: | [Expired objects/sec]({{< relref "/operate/rs/references/metrics/database-operations#expired-objectssec" >}}) | Number of expired objects per second. An expired object is an object with expired TTL that was deleted from the database. | | [Hit ratio]({{< relref "/operate/rs/references/metrics/database-operations#hit-ratio" >}}) | Percent of operations on existing keys out of the total number database operations | -For more detailed analysis, consider using [Redis Insight]({{< relref "/develop/connect/insight/" >}}) or [Prometheus and Grafana]({{< relref "/integrate/prometheus-with-redis-cloud/" >}}). +For more detailed analysis, consider using [Redis Insight]({{< relref "/develop/tools/insight" >}}) or [Prometheus and Grafana]({{< relref "/integrate/prometheus-with-redis-cloud/" >}}). ## Configure metric alerts diff --git a/content/operate/rc/rc-quickstart.md b/content/operate/rc/rc-quickstart.md index 5a88764406..2c94686214 100644 --- a/content/operate/rc/rc-quickstart.md +++ b/content/operate/rc/rc-quickstart.md @@ -96,18 +96,18 @@ The connection wizard provides the following database connection methods: ### Redis Insight{#using-redisinsight} -[Redis Insight]({{< relref "/develop/connect/insight/" >}}) is a free Redis GUI that is available for macOS, Windows, and Linux. +[Redis Insight]({{< relref "/develop/tools/insight" >}}) is a free Redis GUI that is available for macOS, Windows, and Linux. 1. In the connection wizard, under **Redis Insight**, select **Download** to download Redis Insight. -1. [Install Redis Insight]({{< relref "/develop/connect/insight/" >}}). +1. [Install Redis Insight]({{< relref "/develop/tools/insight" >}}). 1. Once installed, select **Open with Redis Insight**. 1. A pop-up asks if you wish to open the link with Redis Insight. Select **Open Redis Insight** to connect to your database with Redis Insight. -See the [Redis Insight docs]({{< relref "/develop/connect/insight/" >}}) for more info. +See the [Redis Insight docs]({{< relref "/develop/tools/insight" >}}) for more info. ### Redis client{#using-redis-client} @@ -115,26 +115,26 @@ A Redis client is a software library or tool that enables applications to intera The connection wizard provides code snippets to connect to your database with the following programming languages: -- node.js using [node-redis](https://github.com/redis/node-redis/blob/master/README.md) +- node.js using [node-redis]({{< relref "/develop/clients/nodejs" >}}) - .NET using [StackExchange.Redis](https://stackexchange.github.io/StackExchange.Redis/) -- Python using [redis-py](https://github.com/redis/redis-py#redis-py) -- Java using [Jedis](https://github.com/redis/jedis#jedis) +- Python using [redis-py]({{< relref "/develop/clients/redis-py" >}}) +- Java using [Jedis]({{< relref "/develop/clients/jedis" >}}) {{The connection wizard clients.}} -See [Clients]({{< relref "/develop/connect/clients/" >}}) to learn how to connect with the official Redis clients. +See [Clients]({{< relref "/develop/clients" >}}) to learn how to connect with the official Redis clients. ### redis-cli {#using-rediscli} -The [`redis-cli`]({{< relref "/develop/connect/cli" >}}) utility is installed when you install Redis. It provides a command-line interface that lets you work with your database using core [Redis commands]({{< relref "/commands" >}}). +The [`redis-cli`]({{< relref "/develop/tools/cli" >}}) utility is installed when you install Redis. It provides a command-line interface that lets you work with your database using core [Redis commands]({{< relref "/commands" >}}). To run `redis-cli`, [install Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) on your machine. -See [Redis CLI]({{< relref "/develop/connect/cli" >}}) to learn how to use `redis-cli`. +See [Redis CLI]({{< relref "/develop/tools/cli" >}}) to learn how to use `redis-cli`. ## More info -- [Connect your application]({{< relref "/develop/connect/clients/" >}}) +- [Connect your application]({{< relref "/develop/clients" >}}) - [Import data]({{< relref "/operate/rc/databases/import-data.md" >}}) - [Manage databases]({{< relref "/operate/rc/databases" >}}) - [Data persistence]({{< relref "/operate/rc/databases/configuration/data-persistence.md" >}}) diff --git a/content/operate/rc/resilient-apps.md b/content/operate/rc/resilient-apps.md index 1da2ea05ca..5622b0e8fb 100644 --- a/content/operate/rc/resilient-apps.md +++ b/content/operate/rc/resilient-apps.md @@ -58,19 +58,19 @@ A Redis Cloud Essentials database has a set maintenance window based on the regi When you're developing your apps, it is best to use specific Redis Client features to connect to Redis Cloud if they are available for your preferred client. -See [Clients]({{< relref "/develop/connect/clients/" >}}) to learn how to connect with the official Redis clients. +See [Clients]({{< relref "/develop/clients" >}}) to learn how to connect with the official Redis clients. ### Re-attempt connections Some clients allow you to re-try connecting to your database if the connection fails. For these clients, we recommend that you implement connection re-attempts to ensure high availability and connection stability. -View your [client's docs]({{< relref "/develop/connect/clients/" >}}) to learn more. +View your [client's docs]({{< relref "/develop/clients" >}}) to learn more. ### Refresh DNS Your application may disconnect from your database either during planned maintenance or for other, unplanned reasons. Most Redis clients are set to refresh their DNS address when they reconnect to the database, and you will not be required to perform any further action. If you encounter connectivity problems for more than a minute during maintenance then you should refresh your DNS entries. -Depending on the client, you may be recommended to turn off the DNS cache entirely. Refer to your [client's docs]({{< relref "/develop/connect/clients/" >}}) to learn more. +Depending on the client, you may be recommended to turn off the DNS cache entirely. Refer to your [client's docs]({{< relref "/develop/clients" >}}) to learn more. ### Use the WAIT and WAITAOF commands @@ -80,6 +80,6 @@ For more info, see [Use the WAIT command for strong consistency]({{< relref "/op ## More info -- [Redis Clients]({{< relref "/develop/connect/clients/" >}}) +- [Redis Clients]({{< relref "/develop/clients" >}}) - [Active-Active Redis]({{< relref "/operate/rc/databases/configuration/active-active-redis" >}}) - [Active-Active Redis applications]({{< relref "/operate/rs/databases/active-active/develop" >}}) \ No newline at end of file diff --git a/content/operate/rc/security/access-control/data-access-control/default-user.md b/content/operate/rc/security/access-control/data-access-control/default-user.md index cf71adfbe9..c89901aa71 100644 --- a/content/operate/rc/security/access-control/data-access-control/default-user.md +++ b/content/operate/rc/security/access-control/data-access-control/default-user.md @@ -21,14 +21,9 @@ Use the copy button to copy the password to the clipboard: {{Use the Copy button to copy the default user password.}} -You'll need to use this password whenever you connect to your database using a Redis client. For example, -in the Redis CLI, you use the AUTH command to provide this password: +You'll need to use this password whenever you connect to your database using a Redis client. See [Connect to a database]({{< relref "/operate/rc/databases/connect" >}}) for more info. -```sh -AUTH 4kTtH2ddXfN2sFmXE6sowOLukxiaJhN8n -``` - -See your Redis client's documentation to learn how to provide your password when connecting. +See your [Redis client's documentation]({{< relref "/develop/clients" >}}) to learn how to provide your password when connecting. ## Change password diff --git a/content/operate/rc/subscriptions/view-pro-subscription.md b/content/operate/rc/subscriptions/view-pro-subscription.md index 2fdc07d34c..ccdeb8b7b5 100644 --- a/content/operate/rc/subscriptions/view-pro-subscription.md +++ b/content/operate/rc/subscriptions/view-pro-subscription.md @@ -95,7 +95,9 @@ The **Overview** summarizes the options use to created the subscription. Select the **Edit payment method** button to change the credit card associated with this subscription. - {{< image filename="/images/rc/icon-subscription-detail-change-payment-flexible.png" alt="The update credit card button." >}} + {{< image filename="/images/rc/icon-subscription-detail-change-payment-flexible.png" alt="The edit payment method button, selected and showing two credit cards." width=400px >}} + + Select **Add credit card** to add a new credit card. - The **Maintenance Window** panel shows your current [maintenance window settings]({{< relref "/operate/rc/subscriptions/maintenance/set-maintenance-windows" >}}). diff --git a/content/operate/redisinsight/_index.md b/content/operate/redisinsight/_index.md index dc2f95d0a2..61d124e7d8 100644 --- a/content/operate/redisinsight/_index.md +++ b/content/operate/redisinsight/_index.md @@ -4,4 +4,4 @@ description: Install and manage Redis Insight linkTitle: Redis Insight --- -For information on using Redis Insight, see [these pages]({{< relref "/develop/connect/insight" >}}). \ No newline at end of file +For information on using Redis Insight, see [these pages]({{< relref "/develop/tools/insight" >}}). \ No newline at end of file diff --git a/content/operate/rs/7.4/_index.md b/content/operate/rs/7.4/_index.md new file mode 100644 index 0000000000..0d1f67d315 --- /dev/null +++ b/content/operate/rs/7.4/_index.md @@ -0,0 +1,64 @@ +--- +Title: Redis Enterprise Software +alwaysopen: false +categories: +- docs +- operate +- rs +description: The self-managed, enterprise-grade version of Redis. +hideListLinks: true +weight: 10 +url: '/operate/rs/7.4/' +linkTitle: 7.4 +--- + +[Redis Enterprise](https://redis.io/enterprise/) is a self-managed, enterprise-grade version of Redis. + +With Redis Enterprise, you get many enterprise-grade capabilities, including: +- Linear scalability +- High availability, backups, and recovery +- Predictable performance +- 24/7 support + +You can run self-managed Redis Enterprise Software in an on-premises data center or on your preferred cloud platform. + +If you prefer a fully managed Redis database-as-a-service, available on major public cloud services, consider setting up a [Redis Cloud]({{}}) subscription. You can [try Redis Cloud](https://redis.io/try-free/) for free. + +## Get started +Build a small-scale cluster with the Redis Enterprise Software container image. +- [Linux quickstart]({{< relref "/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart" >}}) +- [Docker quickstart]({{< relref "/operate/rs/installing-upgrading/quickstarts/docker-quickstart" >}}) +- [Get started with Active-Active]({{< relref "/operate/rs/databases/active-active/get-started" >}}) + +## Install & setup +[Install & set up]({{< relref "/operate/rs/installing-upgrading" >}}) a Redis Enterprise Software cluster. +- [Networking]({{< relref "/operate/rs/networking" >}}) +- [Set up]({{< relref "/operate/rs/clusters/new-cluster-setup" >}}) & [configure]({{< relref "/operate/rs/clusters/configure" >}}) a [cluster]({{< relref "/operate/rs/clusters" >}}) +- [Release notes]({{< relref "/operate/rs/release-notes" >}}) + +## Databases +Create and manage a [Redis database]({{< relref "/operate/rs/databases" >}}) on a cluster. +- [Create a Redis Enterprise Software database]({{< relref "/operate/rs/databases/create" >}}) +- [Configure database]({{< relref "/operate/rs/databases/configure" >}}) +- [Create Active-Active database]({{< relref "/operate/rs/databases/active-active/create" >}}) +- [Edit Active-Active database]({{< relref "/operate/rs/databases/active-active/manage.md" >}}) + +## Security +[Manage secure connections]({{< relref "/operate/rs/security" >}}) to the cluster and databases. +- [Access control]({{< relref "/operate/rs/security/access-control" >}}) +- [Users]({{< relref "/operate/rs/security/access-control/manage-users" >}}) & [roles]({{< relref "/operate/rs/security/access-control" >}}) +- [Certificates]({{< relref "/operate/rs/security/certificates" >}}) +- [TLS]({{< relref "/operate/rs/security/encryption/tls" >}}) & [Encryption]({{< relref "/operate/rs/security/encryption" >}}) + +## Reference +Use command-line utilities and the REST API to manage the cluster and databases. +- [rladmin]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}), [crdb-cli]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}}), & [other utilities]({{< relref "/operate/rs/references/cli-utilities" >}}) +- [REST API reference]({{< relref "/operate/rs/references/rest-api" >}}) & [examples]({{< relref "/operate/rs/references/rest-api/quick-start" >}}) +- [Redis commands]({{< relref "/commands" >}}) + +## Related info +- [Redis Cloud]({{< relref "/operate/rc" >}}) +- [Redis Community Edition]({{< relref "/operate/oss_and_stack" >}}) +- [Redis Stack]({{< relref "/operate/oss_and_stack/stack-with-enterprise" >}}) +- [Glossary]({{< relref "/glossary" >}}) + diff --git a/content/operate/rs/7.4/clusters/_index.md b/content/operate/rs/7.4/clusters/_index.md new file mode 100644 index 0000000000..7b801c1418 --- /dev/null +++ b/content/operate/rs/7.4/clusters/_index.md @@ -0,0 +1,20 @@ +--- +Title: Manage clusters +alwaysopen: false +categories: +- docs +- operate +- rs +description: Administrative tasks and information related to the Redis Enterprise + cluster. +hideListLinks: false +linktitle: Clusters +weight: 36 +url: '/operate/rs/7.4/clusters/' +--- + +You can manage your Redis Enterprise Software clusters with several different tools: + +- Cluster Manager UI (the web-based user interface) +- Command-line tools ([rladmin]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}), [redis-cli]({{< relref "/develop/connect/cli" >}}), [crdb-cli]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}})) +- [REST API]({{< relref "/operate/rs/references/rest-api/_index.md" >}}) diff --git a/content/operate/rs/7.4/clusters/add-node.md b/content/operate/rs/7.4/clusters/add-node.md new file mode 100644 index 0000000000..9a2d4823d8 --- /dev/null +++ b/content/operate/rs/7.4/clusters/add-node.md @@ -0,0 +1,82 @@ +--- +Title: Add a cluster node +alwaysopen: false +categories: +- docs +- operate +- rs +description: Add a node to your existing Redis Enterprise cluster. +linktitle: Add a node +weight: 20 +url: '/operate/rs/7.4/clusters/add-node/' +--- +When you install Redis Enterprise Software on the first node of a cluster, you create the new cluster. +After you install the first node, you can add more nodes to the cluster. + +{{< note >}} +Before you add a node to the cluster: + +- The clocks on all nodes must always be [synchronized]({{< relref "/operate/rs/clusters/configure/sync-clocks.md" >}}). + + If the clock in the node you are trying to join to the cluster is not synchronized with the nodes already in the cluster, + the action fails and an error message is shown indicating that you must synchronize the clocks first. + +- You must [update the DNS records]({{< relref "/operate/rs/networking/cluster-dns" >}}) + each time a node is added or replaced. + +- We recommend that you add nodes one after the other rather than in parallel + to avoid errors that occur because the connection to the other nodes in the cluster cannot be verified. +{{< /note >}} + +To add a node to an existing cluster: + +1. [Install the Redis Enterprise Software installation package]({{< relref "/operate/rs/installing-upgrading" >}}) on a clean installation + of a [supported operating system]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/supported-platforms.md" >}}). + +1. To connect to the Cluster Manager UI of the new Redis Enterprise Software installation, go to: + + For example, if you installed Redis Enterprise Software on a machine with IP address 10.0.1.34, go to `https://10.0.1.34:8443`. + + {{< tip >}} +The management UI uses TLS encryption with a default certificate. +You can also [replace the TLS certificate]({{< relref "/operate/rs/security/certificates/updating-certificates" >}}) +with a custom certificate. + {{< /tip >}} + +1. Select **Join cluster**. + +1. For **Cluster identification**, enter the internal IP address or DNS name of a node that is a cluster member. + + If the node only has one IP address, enter that IP address. + +1. For **Cluster sign in**, enter the credentials of the cluster administrator. + + The cluster administrator is the user account that you create when you configure the first node in the cluster. + +1. Click **Next**. + +1. Configure storage and network settings: + + 1. Enter a path for [*Ephemeral storage*]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage" >}}), or leave the default path. + + 1. Enter a path for [*Persistent storage*]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage" >}}), + or leave the default path. + + 1. To enable [*Auto Tiering*]({{< relref "/operate/rs/databases/auto-tiering/" >}}), + select **Enable flash storage** and enter the path to the flash storage. + + 1. If the cluster is configured to support [rack-zone awareness]({{< relref "/operate/rs/clusters/configure/rack-zone-awareness.md" >}}), set the **Rack-zone ID** for the new node. + + 1. If your machine has multiple IP addresses, assign a single IPv4 type address for **Node-to-node communication (internal traffic)** and multiple IPv4/IPv6 type addresses for **External traffic**. + +1. Select **Join cluster**. + +The node is added to the cluster. +You can see it in the list of nodes in the cluster. + +If you see an error when you add the node, try adding the node again. + +{{< tip >}} +We recommend that you run the [rlcheck utility]({{< relref "/operate/rs/references/cli-utilities/rlcheck" >}}) to verify that the node is functioning properly. +{{< /tip >}} + diff --git a/content/operate/rs/7.4/clusters/cluster-recovery.md b/content/operate/rs/7.4/clusters/cluster-recovery.md new file mode 100644 index 0000000000..b36c225ce9 --- /dev/null +++ b/content/operate/rs/7.4/clusters/cluster-recovery.md @@ -0,0 +1,115 @@ +--- +Title: Recover a failed cluster +alwaysopen: false +categories: +- docs +- operate +- rs +description: How to use the cluster configuration file and database data to recover + a failed cluster. +linktitle: Recover a cluster +weight: 70 +url: '/operate/rs/7.4/clusters/cluster-recovery/' +--- +When a Redis Enterprise Software cluster fails, +you must use the cluster configuration file and database data to recover the cluster. + +{{< note >}} +For cluster recovery in a Kubernetes deployment, see [Recover a Redis Enterprise cluster on Kubernetes]({{< relref "/operate/kubernetes/re-clusters/cluster-recovery" >}}). +{{< /note >}} + +Cluster failure can be caused by: + +- A hardware or software failure that causes the cluster to be unresponsive to client requests or administrative actions. +- More than half of the cluster nodes lose connection with the cluster, resulting in quorum loss. + +To recover a cluster and re-create it as it was before the failure, +you must restore the cluster configuration `ccs-redis.rdb` to the cluster nodes. +To recover databases in the new cluster, you must restore the databases from persistence files such as backup files, append-only files (AOF), or RDB snapshots. +These files are stored in the [persistent storage location]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage" >}}). + +The cluster recovery process includes: + +1. Install Redis Enterprise Software on the nodes of the new cluster. +1. Mount the persistent storage with the recovery files from the original cluster to the nodes of the new cluster. +1. Recover the cluster configuration on the first node in the new cluster. +1. Join the remaining nodes to the new cluster. +1. [Recover the databases]({{< relref "/operate/rs/databases/recover.md" >}}). + +## Prerequisites + +- We recommend that you recover the cluster to clean nodes. + If you use the original nodes, + make sure there are no Redis processes running on any nodes in the new cluster. +- We recommend that you use clean persistent storage drives for the new cluster. + If you use the original storage drives, + make sure you back up the files on the original storage drives to a safe location. +- Identify the cluster configuration file that you want to use as the configuration for the recovered cluster. + The cluster configuration file is `/css/ccs-redis.rdb` on the persistent storage for each node. + +## Recover the cluster + +1. (Optional) If you want to recover the cluster to the original cluster nodes, uninstall Redis Enterprise Software from the nodes. + +1. [Install Redis Enterprise Software]({{< relref "/operate/rs/installing-upgrading/install/install-on-linux" >}}) on the new cluster nodes. + + The new servers must have the same basic hardware and software configuration as the original servers, including: + + - The same number of nodes + - At least the same amount of memory + - The same Redis Enterprise Software version + - The same installation user and paths + + {{< note >}} +The cluster recovery can fail if these requirements are not met. + {{< /note >}} + +1. Mount the persistent storage drives with the recovery files to the new nodes. + These drives must contain the cluster configuration backup files and database persistence files. + + {{< note >}} +Make sure that the user redislabs has permissions to access the storage location +of the configuration and persistence files on each of the nodes. + {{< /note >}} + + If you use local persistent storage, place all of the recovery files on each of the cluster nodes. + +1. To recover the original cluster configuration, run [`rladmin cluster recover`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/recover" >}}) on the first node in the new cluster: + + ```sh + rladmin cluster recover filename [ | ] node_uid rack_id + ``` + + For example: + + ```sh + rladmin cluster recover filename /tmp/persist/ccs/ccs-redis.rdb node_uid 1 rack_id 5 + ``` + + When the recovery command succeeds, + this node is configured as the node from the old cluster that has ID 1. + +1. To join the remaining servers to the new cluster, run [`rladmin cluster join`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/join" >}}) from each new node: + + ```sh + rladmin cluster join nodes username password replace_node + ``` + + For example: + + ```sh + rladmin cluster join nodes 10.142.0.4 username admin@example.com password mysecret replace_node 2 + ``` + +1. Run [`rladmin status`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status" >}}) to verify the recovered nodes are now active and the databases are pending recovery: + + ```sh + rladmin status + ``` + + {{< note >}} +Make sure that you update your [DNS records]({{< relref "/operate/rs/networking/cluster-dns" >}}) +with the IP addresses of the new nodes. + {{< /note >}} + +After the cluster is recovered, you must [recover the databases]({{< relref "/operate/rs/databases/recover.md" >}}). diff --git a/content/operate/rs/7.4/clusters/configure/_index.md b/content/operate/rs/7.4/clusters/configure/_index.md new file mode 100644 index 0000000000..9a3203bb47 --- /dev/null +++ b/content/operate/rs/7.4/clusters/configure/_index.md @@ -0,0 +1,21 @@ +--- +Title: Configure clusters +alwaysopen: false +categories: +- docs +- operate +- rs +description: Configuration options for your Redis Enterprise cluster. +hideListLinks: false +linktitle: Configure +weight: 50 +url: '/operate/rs/7.4/clusters/configure/' +--- +You can manage your Redis Enterprise Software clusters with several different tools: + +- Cluster Manager UI (the web-based user interface) +- Command-line tools ([rladmin]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}), [redis-cli]({{< relref "/develop/connect/cli" >}}), [crdb-cli]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}})) +- [REST API]({{< relref "/operate/rs/references/rest-api/_index.md" >}}) + + + diff --git a/content/operate/rs/7.4/clusters/configure/cluster-settings.md b/content/operate/rs/7.4/clusters/configure/cluster-settings.md new file mode 100644 index 0000000000..00bee60f60 --- /dev/null +++ b/content/operate/rs/7.4/clusters/configure/cluster-settings.md @@ -0,0 +1,64 @@ +--- +Title: Cluster settings +alwaysopen: false +categories: +- docs +- operate +- rs +description: You can view and set various cluster settings such as cluster name, email + service, time zone, and license. +linktitle: Cluster settings +toc: 'true' +weight: 10 +url: '/operate/rs/7.4/clusters/configure/cluster-settings/' +--- +You can view and set various cluster settings, such as cluster name, email service, time zone, and license, on the **Cluster > Configuration** page. + +## General configuration tab + +### Upload cluster license key + +After purchasing a cluster license and if your account has the "Admin" role, +you can upload the cluster license key, either during initial +cluster creation or at any time afterward. The license key defines various +cluster settings, such as the maximum number of shards you can have in +the cluster. For more detailed information see [Cluster license +keys]({{< relref "/operate/rs/clusters/configure/license-keys.md" >}}). + +### View max number of allowed shards + +The maximum number of allowed shards, which is determined by the cluster license +key, appears in the **Max number of shards** field in the **License** section. + +### View cluster name + +The cluster name appears in the **Cluster name** field in the **License** section. This gives a +common name that your team or Redis support can refer to. It is +especially helpful if you have multiple clusters. + +### Set time zone + +You can change the **Time zone** field to ensure the date, time fields, and log entries in the Cluster Manager UI are shown in your preferred time zone. This setting doesn't affect other system logs or services. + +## Alert settings tab + +The **Alert Settings** tab lets you configure alerts that are relevant to the entire cluster, such as alerts for cluster utilization, nodes, node utilization, security, and database utilization. + +You can also configure email server settings and [send alerts by email]({{< relref "/operate/rs/clusters/monitoring#send-alerts-by-email" >}}) to relevant users. + +### Configure email server settings + +To enable email alerts: + +1. Enter your email +server details in the **Email server settings** section. + +1. Select a connection security method: + + - TLS/SSL + + - STARTTLS + + - None + +1. Send a test email to verify your email server settings. diff --git a/content/operate/rs/7.4/clusters/configure/license-keys.md b/content/operate/rs/7.4/clusters/configure/license-keys.md new file mode 100644 index 0000000000..f12048aaa5 --- /dev/null +++ b/content/operate/rs/7.4/clusters/configure/license-keys.md @@ -0,0 +1,108 @@ +--- +Title: Cluster license keys +alwaysopen: false +categories: +- docs +- operate +- rs +description: The cluster key (or license) enables features and capacity within Redis + Enterprise Software +linktitle: License keys +weight: 20 +url: '/operate/rs/7.4/clusters/configure/license-keys/' +--- +The cluster license key enables Redis Enterprise Software features and determines shard usage and limits. +You can add or update a cluster key at any time. + +## Trial mode + +Trial mode allows all features to be enabled during the trial period. + +Trial mode is limited to 30 days and 4 shards, including master and replica shards. A new Redis Enterprise Software installation starts its 30-day trial period from the day you set up the cluster on the first node. + +Trial mode requires a trial license. If you do not provide a license when you create a cluster using the Cluster Manager UI or a [bootstrapping REST API request]({{< relref "/operate/rs/references/rest-api/requests/bootstrap#post-bootstrap" >}}), a trial cluster license is generated by default. + +## View cluster license key + +To view the cluster license key, use: + +- Cluster Manager UI + + 1. Go to **Cluster > Configuration > General > License** to see the cluster license details. + + 1. Select **Change** to view the cluster license key. + +- REST API - [`GET /v1/license`]({{< relref "/operate/rs/references/rest-api/requests/license#get-license" >}}) + + For a list of returned fields, see the [response section]({{< relref "/operate/rs/references/rest-api/requests/license#get-response" >}}). + +{{}} +As of version 7.2, Redis Enterprise enforces shard limits by shard types, RAM or flash, instead of the total number of shards. The flash shards limit only appears in the UI if Auto Tiering is enabled. +{{}} + +## Update cluster license + +{{< note >}} +After you add a cluster key, you cannot remove the key to return the cluster to trial mode. +{{< /note >}} + +You can update the cluster license key: + +- During cluster setup using the Cluster Manager UI or CLI + +- After cluster setup using the Cluster Manager UI: + + 1. Go to **Cluster > Configuration > General > License**. + + 1. Select **Change**. + + 1. Upload or enter your cluster license key. + + 1. Select **Save**. + +You can update an existing cluster key at any time. +Redis Enterprise checks its validity for the following: +- Cluster name +- Activation and expiration dates +- Shard usage and limits +- Features + +If saving a new cluster key fails, the operation returns an error with the failure's cause. +In this case, the existing key stays in effect. + +## Expired cluster license + +When the license is expired: + +- You cannot do these actions: + + - Change database settings, including security and configuration options. + + - Add a database. + +- You can do these actions: + + - Sign in to the Cluster Manager UI and view settings and metrics at all resolutions for the cluster, nodes, and databases. + + - Change cluster settings, including the license key, security for administrators, and cluster alerts. + + - Fail over when a node fails and explicitly migrate shards between nodes. + + - Upgrade a node to a new version of Redis Enterprise Software. + +## Monitor cluster license + +As of version 7.2, Redis Enterprise exposes the license quotas and the shards consumption metrics in the Cluster Manager UI or via the [Prometheus integration]({{< relref "/integrate/prometheus-with-redis-enterprise/" >}}). + +The `cluster_shards_limit` metric displays the total shard limit by shard type. + +Examples: +- `cluster_shards_limit{cluster="mycluster.local",shard_type="ram"} 100.0` +- `cluster_shards_limit{cluster="mycluster.local",shard_type="flash"} 50.0` + +The `bdb_shards_used` metric displays the used shard count by database and shard type. + +Examples: +- `bdb_shards_used{bdb="2",cluster="mycluster.local",shard_type="ram"} 86.0` +- `bdb_shards_used{bdb="3",cluster="mycluster.local",shard_type="flash"} 23.0` + diff --git a/content/operate/rs/7.4/clusters/configure/rack-zone-awareness.md b/content/operate/rs/7.4/clusters/configure/rack-zone-awareness.md new file mode 100644 index 0000000000..19c5a7be2f --- /dev/null +++ b/content/operate/rs/7.4/clusters/configure/rack-zone-awareness.md @@ -0,0 +1,157 @@ +--- +Title: Rack-zone awareness in Redis Enterprise Software +alwaysopen: false +categories: +- docs +- operate +- rs +- kubernetes +description: Rack-zone awareness ensures high availability in the event of a rack + or zone failure. +linkTitle: Rack-zone awareness +weight: 70 +url: '/operate/rs/7.4/clusters/configure/rack-zone-awareness/' +--- +Rack-zone awareness helps ensure high availability in the event of a rack or zone failure. + +When you enable rack-zone awareness in a Redis Enterprise Software cluster, you assign +a [rack-zone ID](#rack-zone-id-rules) to each node. This ID is used to map the node to a +physical rack or logical zone. The cluster can then ensure that master shards, corresponding replica shards, and associated endpoints are placed on [nodes in different racks or zones](#node-layout-guidelines). + +In the event of a rack or zone failure, the replicas and endpoints in the remaining racks and zones are promoted. This ensures high availability when a rack or zone fails. + +There is no limitation on the number of racks and zones per cluster. Each +node can belong to a different rack or multiple nodes can belong to the +same rack. + +Rack-zone awareness affects various cluster, node, and database actions, such as node rebalancing, node removal, node replacement, shard and endpoint migration, and database failover. + +## Rack-zone ID rules + +The rack-zone ID must comply with the following rules: + +- Maximum length of 63 characters. +- Characters consist of letters, digits, and hyphens ('-'). Underscores ('_') are also accepted as of Redis Enterprise Software [6.4.2-61]({{< relref "/operate/rs/release-notes/rs-6-4-2-releases/rs-6-4-2-61" >}}). +- ID starts with a letter and ends with a letter or a digit. + +{{< note >}} +Rack-zone IDs are **case-insensitive** (uppercase and lowercase letter are treated as the same). +{{< /note >}} + +## Node layout guidelines + +Avoid placing the majority of nodes in one availability zone. + +If a Redis Enterprise Software cluster consists of three nodes (the recommended minimum), follow these guidelines: + +- For high availability, the three nodes must be distributed across three *distinct* racks or zones. + +- When using availability zones, all three zones should exist within the same *region* to avoid potential latency issues. + +## Set up rack-zone awareness + +To enable rack-zone awareness, you need to configure it for the +cluster, nodes, and [databases](#enable-database-rack-zone-awareness). + +### New cluster + +You can set up rack-zone awareness for the cluster and its nodes during [cluster creation]({{< relref "/operate/rs/clusters/new-cluster-setup" >}}): + +1. In the **Cluster** screen's **Configuration** section, enable **Rack zone awareness**. + +1. Select **Next** to continue to the **Node** configuration screen. + +1. Enter a **Rack-zone ID** for the current node. + +1. Finish [cluster setup]({{< relref "/operate/rs/clusters/new-cluster-setup" >}}). + +1. For every [node you add to the cluster]({{< relref "/operate/rs/clusters/add-node" >}}), assign a different **Rack-zone ID**. + +### Existing cluster + +If you did not configure rack-zone awareness during cluster creation, you can configure rack-zone awareness for existing clusters using the [REST API]({{< relref "/operate/rs/references/rest-api" >}}): + +1. For each node in the cluster, assign a different rack-zone ID using the REST API to [update the node]({{< relref "/operate/rs/references/rest-api/requests/nodes#put-node" >}}): + + ```sh + PUT /v1/nodes/ + { "rack_id": "rack-zone-ID" } + ``` + +1. [Update the cluster policy]({{< relref "/operate/rs/references/rest-api/requests/cluster/policy#put-cluster-policy" >}}) to enable rack-zone awareness: + + ```sh + PUT /v1/cluster/policy + { "rack_aware": true } + ``` + +## Enable database rack-zone awareness + +Before you can enable rack-zone awareness for a database, you must configure rack-zone awareness for the cluster and its nodes. For more information, see [set up rack-zone awareness](#set-up-rack-zone-awareness). + + + +To enable rack-zone awareness for a database, use a [REST API request]({{< relref "/operate/rs/references/rest-api/requests/bdbs#put-bdbs" >}}): + +```sh +PUT /v1/bdbs/ +{ "rack_aware": true } +``` + +### Rearrange database shards + +After you enable rack-zone awareness for an existing database, you should generate an optimized shard placement blueprint using the [REST API]({{< relref "/operate/rs/references/rest-api" >}}) and use it to rearrange the shards in different racks or zones. + +1. [Generate an optimized shard placement blueprint]({{< relref "/operate/rs/references/rest-api/requests/bdbs/actions/optimize_shards_placement#get-bdbs-actions-optimize-shards-placement" >}}): + + 1. Send the following `GET` request: + + ```sh + GET /v1/bdbs//actions/optimize_shards_placement + ``` + + 1. Copy the `cluster-state-id` from the response headers. + + 1. Copy the JSON response body, which represents the new shard placement blueprint. + +1. [Rearrange the database shards]({{< relref "/operate/rs/references/rest-api/requests/bdbs/actions/optimize_shards_placement#put-bdbs-rearrange-shards" >}}) according to the new shard placement blueprint: + + 1. In the request headers, include the `cluster-state-id` from the `optimize_shards_placement` response. + + 1. Add the following JSON in the request body and replace `` with the new blueprint: + + ```sh + { + "shards_blueprint": + } + ``` + + 1. Send the following `PUT` request to rearrange the shards: + + ```sh + PUT /v1/bdbs/ + ``` + +## Shard placement without rack-zone awareness + +Even if a database has rack-zone awareness turned off, the cluster still ensures that master and replica shards are placed on distinct nodes. diff --git a/content/operate/rs/7.4/clusters/configure/sync-clocks.md b/content/operate/rs/7.4/clusters/configure/sync-clocks.md new file mode 100644 index 0000000000..b240fa2682 --- /dev/null +++ b/content/operate/rs/7.4/clusters/configure/sync-clocks.md @@ -0,0 +1,134 @@ +--- +Title: Synchronize cluster node clocks +alwaysopen: false +categories: +- docs +- operate +- rs +description: Sync node clocks to avoid problems with internal custer communication. +linktitle: Sync node clocks +weight: 30 +url: '/operate/rs/7.4/clusters/configure/sync-clocks/' +--- +To avoid problems with internal cluster communications that can impact your data integrity, +make sure that the clocks on all of the cluster nodes are synchronized using Chrony and/or NTP. + +When you install Redis Enterprise Software, +the install script checks if Chrony or NTP is running. +If they are not, the installation process asks for permission to configure a scheduled Cron job. +This should make sure that the node's clock is always synchronized. +If you did not confirm configuring this job during the installation process, +you must use the Network Time Protocol (NTP) regularly to make sure that all server clocks are synchronized. + +To synchronize the server clock, run the command that is appropriate for your operating system. + +## Set up NTP synchronization + +To set up NTP synchronization, see the following sections for instructions for specific operating systems. + +### Ubuntu 18.04 and Ubuntu 20.04 + +1. Install Chrony, a replacement for NTP: + ```sh + sudo apt install chrony + ``` + +1. Edit the Chrony configuration file: + ```sh + sudo nano /etc/chrony/chrony.conf + ``` + +1. Add `server pool.ntp.org` to the file, replace `pool.ntp.org` with your own NTP server, then save. + +1. Restart the Chrony service: + ```sh + sudo systemctl restart chrony + ``` + +1. Check the Chrony service status: + ```sh + sudo systemctl status chrony + ``` + +For more details, refer to the official [Ubuntu 20.04 documentation](https://ubuntu.com/server/docs/network-ntp). + +### RHEL 7 + +1. Install Chrony, a replacement for NTP: + ```sh + sudo yum install chrony + ``` + +1. Edit the Chrony configuration file: + ```sh + sudo nano /etc/chrony.conf + ``` + +1. Add `server pool.ntp.org` to the file, replace `pool.ntp.org` with your own NTP server, then save. + +1. Enable and start the Chrony service: + ```sh + sudo systemctl enable chronyd && sudo systemctl start chronyd + ``` + +1. Check the Chrony service status: + ```sh + sudo systemctl status chronyd + ``` + +For more details, refer to the official [RHEL 7 documentation](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_ntp_using_the_chrony_suite#sect-Using_chrony). + +### RHEL 8 and RHEL 9 + +1. Install Chrony, a replacement for NTP: + ```sh + sudo dnf install chrony + ``` + +1. Edit the Chrony configuration file: + ```sh + sudo nano /etc/chrony.conf + ``` + +1. Add `server pool.ntp.org` to the file, replace `pool.ntp.org` with your own NTP server, then save. + +1. Enable and start the Chrony service: + ```sh + sudo systemctl enable chronyd && sudo systemctl start chronyd + ``` + +1. Check the Chrony service status: + ```sh + sudo systemctl status chronyd + ``` + +For more details, refer to the official [RHEL 8 and 9 documentation](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/configuring-time-synchronization_configuring-basic-system-settings). + +### Amazon Linux 2 + +1. Install Chrony, a replacement for NTP: + ```sh + sudo yum install chrony + ``` + +1. Edit the Chrony configuration file: + ```sh + sudo nano /etc/chrony.conf + ``` + +1. Add `server pool.ntp.org` to the file, replace `pool.ntp.org` with your own NTP server, then save. + +1. Enable and start the Chrony service: + ```sh + sudo systemctl enable chronyd && sudo systemctl start chronyd + ``` + +1. Check the Chrony service status: + ```sh + sudo systemctl status chronyd + ``` + +For more details, refer to the official [Amazon Linux 2 documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-time.html). + +If you are using Active-Active databases, you must use [Network Time Service (ntpd)]({{< relref "/operate/rs/databases/active-active/_index.md#network-time-service-ntp-or-chrony" >}}) +to synchronize OS clocks consistently across clusters to handle conflict resolution according to the OS time. diff --git a/content/operate/rs/7.4/clusters/logging/_index.md b/content/operate/rs/7.4/clusters/logging/_index.md new file mode 100644 index 0000000000..79b0be04d1 --- /dev/null +++ b/content/operate/rs/7.4/clusters/logging/_index.md @@ -0,0 +1,56 @@ +--- +Title: Logging events +alwaysopen: false +categories: +- docs +- operate +- rs +description: Management actions performed with Redis Enterprise are logged to make + sure system management tasks are appropriately performed or monitored by administrators + and for compliance with regulatory standards. +hideListLinks: true +linkTitle: Logging +weight: 95 +url: '/operate/rs/7.4/clusters/logging/' +--- +Management actions performed with Redis Enterprise are logged to make sure system management tasks are appropriately performed or monitored by administrators and for compliance with regulatory standards. + +Log entries contain the +following information: + +1. Who performed the action? +1. What exactly was the performed action? +1. When was the action performed? +1. Did the action succeed or not? + +To get the list of logged events, you can use the REST API or +the **Logs** screen in the UI. The **Logs** screen displays the system and user +events regarding alerts, notifications, and configuration. + +{{Logs screen in the new Cluster Manager UI.}} + +You can use the **Logs** screen to review what actions a user has performed, such as editing a database's configuration. + +- [Redis slow + log]({{< relref "/operate/rs/clusters/logging/redis-slow-log.md" >}}) +- [rsyslog logging]({{< relref "/operate/rs/clusters/logging/rsyslog-logging/" >}}) + +## View logs in the UI + +Redis Enterprise provides log files for auditing cluster management actions and troubleshooting. You can view these logs in the UI and on the host operating system. + +To view event logs in the new Cluster Manager UI, go to **Cluster > Logs**. + +## View logs on the server + +Server logs can be found by default in the directory `/var/opt/redislabs/log/`. + +These log files are used by the Redis support team to troubleshoot issues. The logs you will most frequently interact with is 'event_log.log'. This log file is where logs of configuration actions within Redis are stored and is useful to determine events that occur within Redis Enterprise. + +## Configure log timestamps + +Redis Enterprise allows you to configure log timestamps. To configure log timestamps in the new Cluster Manager UI: + +1. Go to **Cluster > Configuration > General**. + +1. Change the **Time zone** for the logs based on your location. diff --git a/content/operate/rs/7.4/clusters/logging/alerts-events.md b/content/operate/rs/7.4/clusters/logging/alerts-events.md new file mode 100644 index 0000000000..9e91f504e6 --- /dev/null +++ b/content/operate/rs/7.4/clusters/logging/alerts-events.md @@ -0,0 +1,83 @@ +--- +Title: Alerts and events +alwaysopen: false +categories: +- docs +- operate +- rs +description: Logged alerts and events +linkTitle: Alerts and events +weight: 50 +aliases: + - /operate/rs/clusters/logging/rsyslog-logging/cluster-events/ + - /operate/rs/clusters/logging/rsyslog-logging/bdb-events/ + - /operate/rs/clusters/logging/rsyslog-logging/node-events/ + - /operate/rs/clusters/logging/rsyslog-logging/user-events/ +url: '/operate/rs/7.4/clusters/logging/alerts-events/' +--- + +The following alerts and events can appear in `syslog` and the Cluster Manager UI logs. + +| Alert/Event | UI message | Severity | Notes | +|-----------------------------------|----------------------------------------------------------------|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------| +| aof_slow_disk_io | Redis performance is degraded as a result of disk I/O limits | True: error, False: info | node alert | +| authentication_err | | error | bdb event; Replica of - error authenticating with the source database | +| backup_delayed | Periodic backup has been delayed for longer than `` minutes | True: warning, False: info | bdb alert; Has threshold parameter in the data: section of the log entry. | +| backup_failed | | error | bdb event | +| backup_started | | info | bdb event | +| backup_succeeded | | info | bdb event | +| bdb_created | | info | bdb event | +| bdb_deleted | | info | bdb event | +| bdb_updated | | info | bdb event; Indicates that a bdb configuration has been updated | +| checks_error | | error | node event; Indicates that one or more node checks have failed | +| cluster_updated | | info | cluster event; Indicates that cluster settings have been updated | +| compression_unsup_err | | error | bdb event; Replica of - Compression not supported by sync destination | +| crossslot_err | | error | bdb event; Replica of - sharded destination does not support operation executed on source | +| cpu_utilization | CPU utilization has reached ``% | True: warning, False: info | node alert; Has global_threshold parameter in the key/value section of the log entry. | +| even_node_count | True high availability requires an odd number of nodes | True: warning, False: info | cluster alert | +| ephemeral_storage | Ephemeral storage has reached ``% of its capacity | True: warning, False: info | node alert; Has global_threshold parameter in the key/value section of the log entry. | +| export_failed | | error | bdb event | +| export_started | | info | bdb event | +| export_succeeded | | info | bdb event | +| failed | Node failed | critical | node alert | +| free_flash | Flash storage has reached ``% of its capacity | True: warning, False: info | node alert; Has global_threshold parameter in the key/value section of the log entry. | +| high_latency | Latency is higher than `` milliseconds | True: warning, False: info | bdb alert; Has threshold parameter in the key/value section of the log entry. | +| high_syncer_lag | Replica of - sync lag is higher than `` seconds | True: warning, False: info | bdb alert; Has threshold parameter in the key/value section of the log entry. | +| high_throughput | Throughput is higher than `` RPS (requests per second) | True: warning, False: info | bdb alert; Has threshold parameter in the key/value section of the log entry. | +| import_failed | | error | bdb event | +| import_started | | info | bdb event | +| import_succeeded | | info | bdb event | +| inconsistent_redis_sw | Not all databases are running the same open source version | True: warning, False: info | cluster alert | +| inconsistent_rl_sw | Not all nodes in the cluster are running the same Redis Labs Enterprise Cluster version | True: warning, False: info | cluster alert | +| insufficient_disk_aofrw | Node has insufficient disk space for AOF rewrite | True: error, False: info | node alert | +| internal_bdb | Issues with internal cluster databases | True: warning, False: info | cluster alert | +| license_added | | info | cluster event | +| license_deleted | | info | cluster event | +| license_updated | | info | cluster event | +| low_throughput | Throughput is lower than `` RPS (requests per second) | True: warning, False: info | bdb alert; Has threshold parameter in the key/value section of the log entry. | +| memory | Node memory has reached ``% of its capacity | True: warning, False: info | node alert; Has global_threshold parameter in the key/value section of the log entry. | +| multiple_nodes_down | Multiple cluster nodes are down - this might cause data loss | True: warning, False: info | cluster alert | +| net_throughput | Network throughput has reached ``MB/s | True: warning, False: info | node alert; Has global_threshold parameter in the key/value section of the log entry. | +| node_abort_remove_request | | info | node event | +| node_joined | Node joined | info | cluster event | +| node_operation_failed | Node operation failed | error | cluster event | +| node_remove_abort_completed | Node removed | info | cluster event; The remove node is a process that can fail and can also be aborted. If aborted, the abort can succeed or fail. | +| node_remove_abort_failed | Node removed | error | cluster event; The remove node is a process that can fail and can also be aborted. If aborted, the abort can succeed or fail. | +| node_remove_completed | Node removed | info | cluster event; The remove node is a process that can fail and can also be aborted. If aborted, the abort can succeed or fail. | +| node_remove_failed | Node removed | error | cluster event; The remove node is a process that can fail and can also be aborted. If aborted, the abort can succeed or fail. | +| node_remove_request | | info | node event | +| ocsp_query_failed | Failed querying OCSP server | True: error, False: info | cluster alert | +| ocsp_status_revoked | OCSP status revoked | True: error, False: info | cluster alert | +| oom_err | | error | bdb event; Replica of - Replication source/target out of memory | +| persistent_storage | Persistent storage has reached ``% of its capacity | True: warning, False: info | node alert; Has global_threshold parameter in the key/value section of the log entry. | +| ram_dataset_overhead | RAM Dataset overhead in a shard has reached ``% of its RAM limit | True: warning, False: info | bdb alert; Has threshold parameter in the key/value section of the log entry. | +| ram_overcommit | Cluster capacity is less than total memory allocated to its databases | True: error, False: info | cluster alert | +| ram_values | Percent of values in a shard's RAM is lower than ``% of its key count | True: warning, False: info | bdb alert; Has threshold parameter in the key/value section of the log entry. | +| shard_num_ram_values | Number of values in a shard's RAM is lower than `` values | True: warning, False: info | bdb alert; Has threshold parameter in the key/value section of the log entry. | +| size | Dataset size has reached ``% of the memory limit | True: warning, False: info | bdb alert; Has threshold parameter in the key/value section of the log entry. | +| syncer_connection_error | | error | bdb alert | +| syncer_general_error | | error | bdb alert | +| too_few_nodes_for_replication | Database replication requires at least two nodes in cluster | True: warning, False: info | cluster alert | +| user_created | | info | user event | +| user_deleted | | info | user event | +| user_updated | | info | user event; Indicates that a user configuration has been updated | diff --git a/content/operate/rs/7.4/clusters/logging/log-security.md b/content/operate/rs/7.4/clusters/logging/log-security.md new file mode 100644 index 0000000000..82bbe5d571 --- /dev/null +++ b/content/operate/rs/7.4/clusters/logging/log-security.md @@ -0,0 +1,81 @@ +--- +Title: Manage logs +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +linktitle: Manage logs +weight: 50 +url: '/operate/rs/7.4/clusters/logging/log-security/' +--- +Redis Enterprise comes with [a set of logs]({{< relref "/operate/rs/clusters/logging" >}}) on the server and available through the user interface to assist users in investigating actions taken on the server and to troubleshoot issues. + +## Send logs to a remote logging server + +Redis Enterprise sends logs to syslog by default. You can send these logs to a remote logging server by configuring syslog. + +To do this, modify the syslog or rsyslog configuration on your operating system to send logs in the `$logdir` directory (`/var/opt/redislabs/log` in default installations) to a remote monitoring server of your choice. See [rsyslog logging]({{< relref "/operate/rs/clusters/logging/rsyslog-logging/" >}}) for additional details. + +## Log rotation + +Redis Enterprise Software's job scheduler runs `logrotate` 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 `$pkgconfdir/logrotate.conf` as of Redis Enterprise Software version 7.2 (`pkgconfdir` is `/opt/redislabs/config` by default, but can be changed in a custom installation). + +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. + +The following log rotation policy is enabled by default in Redis Enterprise Software, but you can modify it as needed. + +```sh +/var/opt/redislabs/log/*.log { + su ${osuser} ${osgroup} + size 200M + missingok + copytruncate + # 2000 is logrotate's way of saying 'infinite' + rotate 2000 + maxage 7 + compress + notifempty + nodateext + nosharedscripts + prerotate + # copy cluster_wd log to another file that will have longer retention + if [ "\$1" = "/var/opt/redislabs/log/cluster_wd.log" ]; then + cp -p /var/opt/redislabs/log/cluster_wd.log /var/opt/redislabs/log/cluster_wd.log.long_retention + fi + endscript +} +/var/opt/redislabs/log/cluster_wd.log.long_retention { + su ${osuser} ${osgroup} + daily + missingok + copytruncate + rotate 30 + compress + notifempty + nodateext +} +``` + +- `/var/opt/redislabs/log/*.log` - `logrotate` checks the files under the `$logdir` directory (`/var/opt/redislabs/log/`) and rotates any files that end with the extension `.log`. + +- `/var/opt/redislabs/log/cluster_wd.log.long_retention` - The contents of `cluster_wd.log` is copied to `cluster_wd.log.long_retention` before rotation, and this copy is kept for longer than normal (30 days). + +- `size 200M` - Rotate log files that exceed 200 MB. + +- `missingok` - If there are missing log files, do nothing. + +- `copytruncate` - Truncate the original log file to zero sizes after creating a copy. + +- `rotate 2000` - Keep up to 2000 (effectively infinite) log files. + +- `compress` - gzip log files. + +- `maxage 7` - Keep the rotated log files for 7 days. + +- `notifempty` - Don't rotate the log file if it is empty. + +{{}} +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. +{{}} diff --git a/content/operate/rs/7.4/clusters/logging/redis-slow-log.md b/content/operate/rs/7.4/clusters/logging/redis-slow-log.md new file mode 100644 index 0000000000..590b1fa2e3 --- /dev/null +++ b/content/operate/rs/7.4/clusters/logging/redis-slow-log.md @@ -0,0 +1,73 @@ +--- +Title: View Redis slow log +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +linkTitle: Slow log +weight: $weight +url: '/operate/rs/7.4/clusters/logging/redis-slow-log/' +--- +On the **Databases** \> **Slowlog** page, you can view Slow Log details +for Redis Enterprise Software databases. + +[Redis Slow Log](http://redis.io/commands/slowlog) is one of the best +tools for debugging and tracing your Redis database, especially if you +experience high latency and high CPU usage with Redis operations. +Because Redis is based on a single threaded architecture, Redis Slow Log +can be much more useful than slow log mechanisms of multi-threaded +database systems such as MySQL Slow Query Log. + +Unlike tools that introduce lock overhead (which complicates the debugging +process), Redis Slow Log is highly effective at showing the actual processing time of each command. + +Redis Enterprise Software includes enhancements to the standard Redis +Slow Log capabilities that allow you to analyze the execution time +complexity of each command. This enhancement can help you better analyze +Redis operations, allowing you to compare the differences between +execution times of the same command, observe spikes in CPU usage, and +more. + +This is especially useful with complex commands such as +[ZUNIONSTORE](http://redis.io/commands/zunionstore), +[ZINTERSTORE](http://redis.io/commands/zinterstore) and +[ZRANGEBYSCORE](http://redis.io/commands/zrangebyscore). + +The enhanced Redis Enterprise Software Slow Log adds the **Complexity info** field to the +output data. + +View the complexity info data by its respective command in the table +below: + +| Command | Value of interest | Complexity | +|------------|-----------------|-----------------| +| LINSERT | N - list len | O(N) | +| LREM | N - list len | O(N) | +| LTRIM | N - number of removed elements | O(N) | +| PUBLISH | N - number of channel subscribers
M - number of subscribed patterns | O(N+M) | +| PSUBSCRIBE | N - number of patterns client is subscribed to
argc - number of arguments passed to the command | O(argc\*N) | +| PUNSUBSCRIBE | N - number of patterns client is subscribed to
M - total number of subscribed patterns
argc - number of arguments passed to the command | O(argc\*(N+M)) | +| SDIFF | N - total number of elements in all sets | O(N) | +| SDIFFSTORE | N - total number of elements in all sets | O(N) | +| SINTER | N - number of elements in smallest set
argc - number of arguments passed to the command | O(argc\*N) | +| SINTERSTORE | N - number of elements in smallest set
argc - number of arguments passed to the command | O(argc\*N) | +| SMEMBERS | N - number of elements in a set | O(N) | +| SORT | N - number of elements in the when no sorting list/set/zset
M - number of elements in result | O(N+M\*log(M))O(N) | +| SUNION | N - number of elements in all sets | O(N) | +| SUNIONSTORE | N - number of elements in all sets | O(N) | +| UNSUBSCRIBE | N - total number of clients subscribed to all channels | O(N) | +| ZADD | N - number of elements in the zset | O(log(N)) | +| ZCOUNT | N - number of elements in the zset
M - number of elements between min and max | O(log(N)+M) | +| ZINCRBY | N - number of elements in the zset | O(log(N)) | +| ZINTERSTORE | N – number of elements in the smallest zset
K – number of zsets
M – number of elements in the results set | O(N\*K)+O(M\*log(M)) | +| ZRANGE | N – number of elements in the zset
M – number of results | O(log(N)+M) | +| ZRANGEBYSCORE | N – number of elements in the zset
M – number of results | O(log(N)+M) | +| ZRANK | N – number of elements in the zset | O(log(N)) | +| ZREM | N – number of elements in the zset
argc – number of arguments passed to the command | O(argc\*log(N)) | +| ZREMRANGEBYRANK | N – number of elements in the zset
argc – number of arguments passed to the command | O(log(N)+M) | +| ZREMRANGEBYSCORE | N – number of elements in the zset
M – number of elements removed | O(log(N)+M) | +| ZREVRANGE | N – number of elements in the zset
M – number of results | O(log(N)+M) | +| ZREVRANK | N – number of elements in the zset | O(log(N)) | +| ZUNIONSTORE | N – sum of element counts of all zsets
M – element count of result | O(N)+O(M\*log(M)) | diff --git a/content/operate/rs/7.4/clusters/logging/rsyslog-logging/_index.md b/content/operate/rs/7.4/clusters/logging/rsyslog-logging/_index.md new file mode 100644 index 0000000000..2179a55229 --- /dev/null +++ b/content/operate/rs/7.4/clusters/logging/rsyslog-logging/_index.md @@ -0,0 +1,269 @@ +--- +Title: rsyslog logging +alwaysopen: false +categories: +- docs +- operate +- rs +description: This document explains the structure of Redis Enterprise Software log + entries in `rsyslog` and how to use these log entries to identify events. +hideListLinks: true +linktitle: rsyslog +weight: $weight +url: '/operate/rs/7.4/clusters/logging/rsyslog-logging/' +--- + +## Log concepts + +Redis Enterprise Software logs information from a variety of components in response to actions and events that occur within the cluster. + +In some cases, a single action, such as removing a node from the cluster, may actually consist of several events. These actions may generate multiple log entries. + +All log entries displayed in the Cluster Manager UI are also written to `syslog`. You can configure `rsyslog` to monitor `syslog`. Enabled alerts are logged to `syslog` and appear with other log entries. + +You can also [manage your logs]({{< relref "/operate/rs/clusters/logging/log-security" >}}) with a remote logging server and log rotation. + +### Types of log entries + +Log entries are categorized into events and alerts. Both types of entries appear in the logs, but alert log entries also include a boolean `"state"` parameter that indicates whether the alert is enabled or disabled. + +Log entries include information about the specific event that occurred. See the log entry tables for [alerts and events]({{< relref "/operate/rs/clusters/logging/alerts-events" >}}) for more details. + +### Severity + +You can also configure `rsyslog` to add other information, such as the event severity. + +Since `rsyslog` entries do not include severity by default, you can follow these steps to enable it: + +1. Add the following line to `/etc/rsyslog.conf`: + ``` + $template TraditionalFormatWithPRI,"%pri-text%: %timegenerated% %HOSTNAME% %syslogtag%%msg:::drop-last-lf%\n" + ``` + +2. Modify `$ActionFileDefaultTemplate` to use your new template `$ActionFileDefaultTemplateTraditionalFormatWithPRI` + +3. Save these changes and restart `rsyslog` to apply them + +You can see the log entries for alerts and events in the `/var/log/messages` file. + +**Command components:** + +- `%pri­text%` ­adds the severity +- `%timegenerated%` ­adds the timestamp +- `%HOSTNAME%` ­adds the machine name +- `%syslogtag%` adds ­the Redis Enterprise Software message. See the [log entry structure](#log-entry-structure) section for more details. +- `%msg:::drop­last­lf%n` ­removes duplicated log entries + +## Log entry structure + +The log entries have the following basic structure: + + event_log[]:{} + +- **event_log**:­ Plain static text is always shown at the beginning of the entry. +- **process id­**: The ID of the logging process +- **list of key-value pairs in any order**:­ A list of key-value pairs that describe the specific event. They can appear in any order. Some key­-value pairs are always shown, and some appear depending on the specific event. + - **Key-­value pairs that always appear:** + - `"type"`: A unique code­ name for the logged event. For the list of codenames, see the [logged alerts and events]({{< relref "/operate/rs/clusters/logging/alerts-events" >}}) tables. + - `"object"`: Defines the object type and ID (if relevant) of the object this event relates to, such as cluster, node with ID, BDB with ID, etc. Has the format of `[:]`. + - `"time"`: Unix epoch time but can be ignored in this context. + - **Key-­value pairs that might appear depending on the specific entry:** + - `"state"`: A boolean where `true` means the alert is enabled, and `false` means the alert is disabled. This is only relevant for alert log entries. + - `"global_threshold"`: The value of a threshold for alerts related to cluster or node objects. + - `"threshold"`: The value of a threshold for alerts related to a BDB object + +## Log entry samples + +This section provides examples of log entries that include the [`rsyslog` configuration](#severity) to add the severity, timestamp, and machine name. + +### Ephemeral storage passed threshold + +#### "Alert on" log entry sample + +``` +daemon.warning: Jun 14 14:49:20 node1 event_log[3464]: +{ + "storage_util": 90.061643120001, + "global_threshold": "70", + "object": "node:1", + "state": true, + "time": 1434282560, + "type": "ephemeral_storage" +} +``` + +In this example, the storage utilization on node 1 reached the value of ~90%, which triggered the alert for "Ephemeral storage has reached 70% of its capacity." + +**Log entry components:** + +- `daemon.warning` -­ Severity of entry is `warning` +- `Jun 14 14:49:20` -­ The timestamp of the event +- `node1`:­ Machine name +- `event_log` -­ Static text that always appears +- `[3464]­` - Process ID +- `"storage_util":90.061643120001` - Current ephemeral storage utilization +- `"global_threshold":"70"` - The user-configured threshold above which the alert is raised +- `"object":"node:1"`­ - The object related to this alert +- `"state":true­` - Current state of the alert +- `"time":1434282560­` - Can be ignored +- `"type":"ephemeral_storage"` - The code name of this specific event. See [logged alerts and events]({{< relref "/operate/rs/clusters/logging/alerts-events" >}}) for more details. + +#### "Alert off" log entry sample + +``` +daemon.info: Jun 14 14:51:35 node1 event_log[3464]: +{ + "storage_util":60.051723520008, + "global_threshold": "70", + "object": "node:1", + "state":false, + "time": 1434283480, + "type": "ephemeral_storage" +} +``` + +This log entry is an example of when the alert for the node with ID 1 "Ephemeral storage has reached 70% of its capacity" has been turned off as result of storage utilization reaching the value of ~60%. + +**Log entry components**: + +- `daemon.info` -­ Severity of entry is `info` +- `Jun 14 14:51:35` -­ The timestamp of the event +- `node1` -­ Machine name +- `event_log` -­ Static text that always appears +- `[3464]` -­ Process ID +- `"storage_util":60.051723520008­` - Current ephemeral storage utilization +- `"global_threshold":"70"` - The user configured threshold above which the alert is raised (70% in this case) +- `"object":"node:1"` -­ The object related to this alert +- `"state":false­` - Current state of the alert +- `"time":1434283480­` - Can be ignored +- `"type":"ephemeral_storage"` -­ The code name identifier of this specific event. See [logged alerts and events]({{< relref "/operate/rs/clusters/logging/alerts-events" >}}) for more details. + +### Odd number of nodes with a minimum of three nodes alert + +#### "Alert on" log entry sample + +``` +daemon.warning: Jun 14 15:25:00 node1 event_log[8310]: +{ + "object":"cluster", + "state": true, + "time": 1434284700, + "node_count": 1, + "type":"even_node_count" +} +``` + +This log entry is an example of when the alert for "True high availability requires an odd number of nodes with a minimum of three nodes" has been turned on as result of the cluster having only one node. + +**Log entry components:** + +- `daemon.warning­` - Severity of entry is warning +- `Jun 14 15:25:00` - The timestamp of the event +- `node1­` - Machine name +- `event_log` -­ Static text that always appears +- `[8310]­` - Process ID +- `"object":"cluster"­` - The object related to this alert +- `"state":true` -­ Current state of the alert +- `"time":1434284700­` - Can be ignored +- `"node_count":1­` - The number of nodes in the cluster +- `"type":"even_node_count"­` - The code name identifier of this specific event. See [logged alerts and events]({{< relref "/operate/rs/clusters/logging/alerts-events" >}}) for more details. + +#### "Alert off" log entry sample + +``` +daemon.warning: Jun 14 15:30:40 node1 event_log[8310]: +{ + "object":"cluster", + "state": false, + "time": 1434285200, + "node_count": 3, + "type":"even_node_count" +} +``` + +This log entry is an example of when the alert for "True high availability requires an odd number of nodes with a minimum of three nodes" has been turned off as result of the cluster having 3 nodes. + +**Log entry components:** + +- `daemon.warning` - Severity of entry is warning +- `Jun 14 15:30:40` -­ The timestamp of the event +- `node1­` - Machine name +- `event_log­` - Static text that always appears +- `[8310]` -­ Process ID +- `"object":"cluster"` -­ The object related to this alert +- `"state":false­` - Current state of the alert +- `"time":1434285200­` - Can be ignored +- `"node_count":3­` - The number of nodes in the cluster +- `"type":"even_node_count"` -­ The code name of this specific event. See [logged alerts and events]({{< relref "/operate/rs/clusters/logging/alerts-events" >}}) for more details. + +### Node has insufficient disk space for AOF rewrite + +#### "Alert on" log entry sample + +``` +daemon.err: Jun 15 13:51:23 node1 event_log[34252]: +{ + "used": 23457188, + "missing": 604602126, + "object": "node:1", + "free": 9867264, + "needed":637926578, + "state": true, + "time": 1434365483, + "disk": 705667072, + "type":"insufficient_disk_aofrw" +} +``` + +This log entry is an example of when the alert for "Node has insufficient disk space for AOF rewrite" has been turned on as result of not having enough persistent storage disk space for AOF rewrite purposes. It is missing 604602126 bytes. + +**Log entry components:** + +- `daemon.err`­ - Severity of entry is error +- `Jun 15 13:51:23` - The timestamp of the event +- `node1­` - Machine name +- `event_log` -­ Static text that always appears +- `[34252]` -­ Process ID +- `"used":23457188­` - The amount of disk space in bytes currently used for AOF files +- `"missing":604602126­` - The amount of disk space in bytes that is currently missing for AOF rewrite purposes +- `"object":"node:1″` -­ The object related to this alert +- `"free":9867264­` - The amount of disk space in bytes that is currently + free +- `"needed":637926578­` - The amount of total disk space in bytes that is needed for AOF rewrite purposes +- `"state":true­` - Current state of the alert +- `"time":1434365483` -­ Can be ignored +- `"disk":705667072­` - The total size in bytes of the persistent storage +- `"type":"insufficient_disk_aofrw"­` - The code name of this specific event. See [logged alerts and events]({{< relref "/operate/rs/clusters/logging/alerts-events" >}}) for more details. + +#### "Alert off" log entry sample + +``` +daemon.info: Jun 15 13:51:11 node1 event_log[34252]: +{ + "used": 0, "missing":-21614592, + "object": "node:1", + "free": 21614592, + "needed": 0, + "state":false, + "time": 1434365471, + "disk": 705667072, + "type":"insufficient_disk_aofrw" +} +``` + +**Log entry components:** + +- `daemon.info­` - Severity of entry is info +- `Jun 15 13:51:11` - The timestamp of the event +- `node1­` - Machine name +- `event_log` -­ Static text that always appears +- `[34252]­` - Process ID +- `"used":0­` - The amount of disk space in bytes currently used for AOF files +- `"missing":‐21614592­` - The amount of disk space in bytes that is currently missing for AOF rewrite purposes. In this case, it is not missing because the number is negative. +- `"object":"node:1″` -­ The object related to this alert +- `"free":21614592` -­ The amount of disk space in bytes that is currently free +- `"needed":0­` - The amount of total disk space in bytes that is needed for AOF rewrite purposes. In this case, no space is needed. +- `"state":false­` - Current state of the alert +- `"time":1434365471­` - Can be ignored +- `"disk":705667072­` - The total size in bytes of the persistent storage +- `"type":"insufficient_disk_aofrw"`­ - The code name of this specific event. See [logged alerts and events]({{< relref "/operate/rs/clusters/logging/alerts-events" >}}) for more details. diff --git a/content/operate/rs/7.4/clusters/maintenance-mode.md b/content/operate/rs/7.4/clusters/maintenance-mode.md new file mode 100644 index 0000000000..ffd3536a08 --- /dev/null +++ b/content/operate/rs/7.4/clusters/maintenance-mode.md @@ -0,0 +1,248 @@ +--- +Title: Maintenance mode for cluster nodes +alwaysopen: false +categories: +- docs +- operate +- rs +description: Prepare a cluster node for maintenance. +linkTitle: Maintenance mode +weight: 60 +url: '/operate/rs/7.4/clusters/maintenance-mode/' +--- + +Use maintenance mode to prevent data loss during hardware patching or operating system maintenance on Redis Enterprise servers. When maintenance mode is on, all shards move off of the node under maintenance and migrate to another available node. + +## Activate maintenance mode + +When you activate maintenance mode, Redis Enterprise does the following: + +1. Checks whether a shut down of the node will cause quorum loss. If so, maintenance mode will not turn on. + + Maintenance mode does not protect against quorum loss. If you activate maintenance mode for the majority of nodes in a cluster and restart them simultaneously, quorum is lost, which can lead to data loss. + +1. If no maintenance mode snapshots already exist or if you use `overwrite_snapshot` when you activate maintenance mode, Redis Enterprise creates a new node snapshot that records the node's shard and endpoint configuration. + +1. Marks the node as a quorum node to prevent shards and endpoints from migrating to it. + + At this point, [`rladmin status`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status" >}}) displays the node's shards field in yellow, which indicates that shards cannot migrate to the node. + + {{< image filename="/images/rs/maintenance_mode.png" >}} + +1. Migrates shards and binds endpoints to other nodes, when space is available. + +Maintenance mode does not demote a master node by default. The cluster elects a new master node when the original master node restarts. + +Add the `demote_node` option to the `rladmin` command to [demote a master node](#demote-a-master-node) when you activate maintenance mode. + +To activate maintenance mode for a node, run the following command: + +```sh +rladmin node maintenance_mode on overwrite_snapshot +``` + +You can start server maintenance if: + +- All shards and endpoints have moved to other nodes + +- Enough nodes are still online to maintain quorum + +### Prevent replica shard migration + +If you do not have enough resources available to move all of the shards to other nodes, you can turn maintenance mode on without migrating the replica shards. + +Before you prevent replica shard migration during maintenance mode, consider the following effects: + +- Replica shards remain on the node during maintenance. + +- If the maintenance node fails, the master shards do not have replica shards to maintain data redundancy and high availability. + +- Replica shards that remain on the node can still be promoted during failover to preserve availability. + +To activate maintenance mode without replica shard migration, run: + +```sh +rladmin node maintenance_mode on evict_ha_replica disabled evict_active_active_replica disabled +``` + +### Demote a master node + +If maintenance might affect connectivity to the master node, you can demote the master node when you activate maintenance mode. This lets the cluster elect a new master node. + +To demote a master node when activating maintenance mode, run: + +```sh +rladmin node maintenance_mode on demote_node +``` + +### Verify maintenance mode activation + +To verify maintenance mode for a node, use `rladmin status` and review the node's shards field. If that value is displayed in yellow (shown earlier), then the node is in maintenance mode. + +Avoid activating maintenance mode when it is already active. Maintenance mode activations stack. If you activate maintenance mode for a node that is already in maintenance mode, you will have to deactivate maintenance mode twice in order to restore full functionality. + +## Deactivate maintenance mode + +When you deactivate maintenance mode, Redis Enterprise: + +1. Loads a [specified node snapshot](#specify-a-snapshot) or defaults to the latest maintenance mode snapshot. + +1. Unmarks the node as a quorum node to allow shards and endpoints to migrate to the node. + +1. Restores the shards and endpoints that were in the node at the time of the snapshot. + +1. Deletes the snapshot. + +To deactivate maintenance mode after server maintenance, run: + +```sh +rladmin node maintenance_mode off +``` + +By default, a snapshot is required to deactivate maintenance mode. If the snapshot cannot be restored, deactivation is cancelled and the node remains in maintenance mode. In such events, it may be necessary to [reset node status](#reset_node_status). + +### Specify a snapshot + +When you turn off maintenance mode, you can restore the node configuration from a maintenance mode snapshot or any snapshots previously created by [`rladmin node snapshot create`]({{< relref "/operate/rs/references/cli-utilities/rladmin/node/snapshot#node-snapshot-create" >}}). If you do not specify a snapshot, Redis Enterprise uses the latest maintenance mode snapshot by default. + +To get a list of available snapshots, run: + +```sh +rladmin node snapshot list +``` + +To specify a snapshot when you turn maintenance mode off, run: + +```sh +rladmin node maintenance_mode off snapshot_name +``` + +{{}} +If an error occurs when you turn on maintenance mode, the snapshot is not deleted. +When you rerun the command, use the snapshot from the initial attempt since it contains the original state of the node. +{{}} + +### Skip shard restoration + +You can prevent the migrated shards and endpoints from returning to the original node after you turn off maintenance mode. + +To turn maintenance mode off and skip shard restoration, run: + +```sh +rladmin node maintenance_mode off skip_shards_restore +``` + +### Reset node status + +In extreme cases, you may need to reset a node's status. Run the following commands to do so: + +``` +$ rladmin tune node max_listeners 100 +$ rladmin tune node quorum_only disabled +``` + +Use these commands with caution. For best results, contact Support before running these commands. + +## Cluster status example + +This example shows how the output of [`rladmin status`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status" >}}) changes when you turn on maintenance mode for a node. + +The cluster status before turning on maintenance mode: + +```sh +redislabs@rp1_node1:/opt$ rladmin status +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS +*node:1 master 172.17.0.2 rp1_node1 2/100 +node:2 slave 172.17.0.4 rp3_node1 2/100 +node:3 slave 172.17.0.3 rp2_node1 0/100 +``` + +The cluster status after turning on maintenance mode: + +```sh +redislabs@rp1_node1:/opt$ rladmin node 2 maintenance_mode on +Performing maintenance_on action on node:2: 0% +created snapshot NodeSnapshot + +node:2 will not accept any more shards +Performing maintenance_on action on node:2: 100% +OK +redislabs@rp1_node1:/opt$ rladmin status +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS +*node:1 master 172.17.0.2 rp1_node1 2/100 +node:2 slave 172.17.0.4 rp3_node1 0/0 +node:3 slave 172.17.0.3 rp2_node1 2/100 +``` + +After turning on maintenance mode for node 2, Redis Enterprise saves a snapshot of its configuration and then moves its shards and endpoints to node 3. + +Now node 2 has `0/0` shards because shards cannot migrate to it while it is in maintenance mode. + +## Maintenance mode REST API + +You can also turn maintenance mode on or off using [REST API requests]({{< relref "/operate/rs/references/rest-api" >}}) to [POST `/nodes/{node_uid}/actions/{action}`]({{< relref "/operate/rs/references/rest-api/requests/nodes/actions#post-node-action" >}}). + +### Activate maintenance mode (REST API) + +Use `POST /nodes/{node_uid}/actions/maintenance_on` to activate maintenance mode: + +```sh +POST https://:9443/v1/nodes//actions/maintenance_on +{ + "overwrite_snapshot": true, + "evict_ha_replica": true, + "evict_active_active_replica": true +} +``` + +You can set `evict_ha_replica` and `evict_active_active_replica` to `false` to [prevent replica shard migration](#prevent-replica-shard-migration). + +The `maintenance_on` request returns a JSON response body: + +```json +{ + "status":"queued", + "task_id":"" +} +``` + +### Deactivate maintenance mode (REST API) + +Use `POST /nodes/{node_uid}/actions/maintenance_off` deactivate maintenance mode: + +```sh +POST https://:9443/v1/nodes//actions/maintenance_off +{ "skip_shards_restore": false } +``` + +The `skip_shards_restore` boolean flag allows the `maintenance_off` action to [skip shard restoration](#skip-shard-restoration) when set to `true`. + +The `maintenance_off` request returns a JSON response body: + +```json +{ + "status":"queued", + "task_id":"" +} +``` + +### Track action status + +You can send a request to [GET `/nodes/{node_uid}/actions/{action}`]({{< relref "/operate/rs/references/rest-api/requests/nodes/actions#get-node-action" >}}) to track the [status]({{< relref "/operate/rs/references/rest-api/objects/action" >}}) of the `maintenance_on` and `maintenance_off` actions. + +This request returns the status of the `maintenance_on` action: + +```sh +GET https://:9443/v1/nodes//actions/maintenance_on +``` + +The response body: + +```json +{ + "status":"completed", + "task_id":"38c7405b-26a7-4379-b84c-cab4b3db706d" +} +``` diff --git a/content/operate/rs/7.4/clusters/monitoring/_index.md b/content/operate/rs/7.4/clusters/monitoring/_index.md new file mode 100644 index 0000000000..d2fb1bf776 --- /dev/null +++ b/content/operate/rs/7.4/clusters/monitoring/_index.md @@ -0,0 +1,86 @@ +--- +Title: Monitoring with metrics and alerts +alwaysopen: false +categories: +- docs +- operate +- rs +- kubernetes +description: Use the metrics that measure the performance of your Redis Enterprise Software clusters, nodes, databases, and shards to track the performance of your databases. +hideListLinks: true +linkTitle: Monitoring +weight: 96 +url: '/operate/rs/7.4/clusters/monitoring/' +--- +You can use the metrics that measure the performance of your Redis Enterprise Software clusters, nodes, databases, and shards +to monitor the performance of your databases. +In the Redis Enterprise Cluster Manager UI, you can see real-time metrics and configure alerts that send notifications based on alert parameters. You can also access metrics and configure alerts through the REST API. + +To integrate Redis Enterprise metrics into your monitoring environment, see the integration guides for [Prometheus and Grafana]({{< relref "/integrate/prometheus-with-redis-enterprise/" >}}) or [Uptrace]({{< relref "/integrate/uptrace-with-redis-enterprise/" >}}). + +Make sure you read the [definition of each metric]({{< relref "/operate/rs/references/metrics/" >}}) +so that you understand exactly what it represents. + +## Real-time metrics + +You can see the metrics of the cluster in: + +- **Cluster > Metrics** +- **Node > Metrics** for each node +- **Database > Metrics** for each database, including the shards for that database + +The scale selector at the top of the page allows you to set the X-axis (time) scale of the graph. + +To choose which metrics to display in the two large graphs at the top of the page: + +1. Hover over the graph you want to show in a large graph. +1. Click on the right or left arrow to choose which side to show the graph. + +We recommend that you show two similar metrics in the top graphs so you can compare them side-by-side. + +## Cluster alerts + +In **Cluster > Alert Settings**, you can enable alerts for node or cluster events, such as high memory usage or throughput. + +Configured alerts are shown: + +- As a notification on the status icon ( {{< image filename="/images/rs/icons/icon_warning.png#no-click" alt="Warning" width="18px" class="inline" >}} ) for the node and cluster +- In the **log** +- In email notifications, if you configure [email alerts](#send-alerts-by-email) + +{{< note >}} +If you enable alerts for "Node joined" or "Node removed" actions, +you must also enable "Receive email alerts" so that the notifications are sent. +{{< /note >}} + +To enable alerts for a cluster: + +1. In **Cluster > Alert Settings**, click **Edit**. +1. Select the alerts that you want to show for the cluster and click **Save**. + +## Database alerts + +For each database, you can enable alerts for database events, such as high memory usage or throughput. + +Configured alerts are shown: + +- As a notification on the status icon ( {{< image filename="/images/rs/icons/icon_warning.png#no-click" alt="Warning" width="18px" class="inline" >}} ) for the database +- In the **log** +- In emails, if you configure [email alerts](#send-alerts-by-email) + +To enable alerts for a database: + +1. In **Configuration** for the database, click **Edit**. +1. Select the **Alerts** section to open it. +1. Select the alerts that you want to show for the database and click **Save**. + +## Send alerts by email + +To send cluster and database alerts by email: + +1. In **Cluster > Alert Settings**, click **Edit**. +1. Select **Set an email** to configure the [email server settings]({{< relref "/operate/rs/clusters/configure/cluster-settings#configuring-email-server-settings" >}}). +1. In **Configuration** for the database, click **Edit**. +1. Select the **Alerts** section to open it. +1. Select **Receive email alerts** and click **Save**. +1. In **Access Control**, select the [database and cluster alerts]({{< relref "/operate/rs/security/access-control/manage-users" >}}) that you want each user to receive. diff --git a/content/operate/rs/7.4/clusters/new-cluster-setup.md b/content/operate/rs/7.4/clusters/new-cluster-setup.md new file mode 100644 index 0000000000..556e3345c7 --- /dev/null +++ b/content/operate/rs/7.4/clusters/new-cluster-setup.md @@ -0,0 +1,78 @@ +--- +Title: Set up a new cluster +alwaysopen: false +categories: +- docs +- operate +- rs +description: How to set up a new cluster using the management UI. +linktitle: Set up cluster +weight: 10 +url: '/operate/rs/7.4/clusters/new-cluster-setup/' +--- +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. + +{{< note >}} +In a cluster that consists of only one node, some features and capabilities are not enabled, +such as database replication that provides high availability. +{{< /note >}} + +To set up a new cluster, you must first [install the Redis Enterprise Software package]({{< relref "/operate/rs/installing-upgrading" >}}) +and then set up the cluster as described below. +After the cluster is created you can [add multiple nodes to the cluster]({{< relref "/operate/rs/clusters/add-node.md" >}}). + +To create a cluster: + +1. In a browser, go to `https://:8443`. + For example, if you installed Redis Enterprise Software on a machine with IP address 10.0.1.34, go to . + + {{< note >}} +- The management UI uses a [self-signed certificate for TLS encryption]({{< relref "/operate/rs/security/certificates/updating-certificates" >}}). +- If the machine has both an internal IP address and an external IP address, use the external IP address to access the setup UI. + {{< /note >}} + +1. Select **Create new cluster**. + +1. Enter an email and password for the administrator account, then select **Next** to proceed to cluster setup. + +1. Enter your cluster license key if you have one. Otherwise, the cluster uses the trial license by default. + +1. In the **Configuration** section: + + 1. For **FQDN (Fully Qualified Domain Name)**, enter a unique name for the cluster. + + See the [instructions for DNS setup]({{< relref "/operate/rs/networking/cluster-dns" >}}) + to make sure your cluster is reachable by name. + + 1. Choose whether to [**Enable private & public endpoints support**]({{< relref "/operate/rs/networking/private-public-endpoints.md" >}}). + + 1. Choose whether to [**Enable rack-zone awareness**]({{< relref "/operate/rs/clusters/configure/rack-zone-awareness.md" >}}). + +1. Click **Next**. + +1. Configure storage and network settings: + + 1. Enter a path for [*Ephemeral storage*]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage" >}}), or leave the default path. + + 1. Enter a path for [*Persistent storage*]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage" >}}), + or leave the default path. + + 1. To enable [*Auto Tiering*]({{< relref "/operate/rs/databases/auto-tiering/" >}}), + select **Enable flash storage** and enter the path to the flash storage. + + 1. If the cluster is configured to support [rack-zone awareness]({{< relref "/operate/rs/clusters/configure/rack-zone-awareness.md" >}}), set the **Rack-zone ID** for the new node. + + 1. If your machine has multiple IP addresses, assign a single IPv4 type address for **Node-to-node communication (internal traffic)** and multiple IPv4/IPv6 type addresses for **External traffic**. + +1. Select **Create cluster**. + +1. Click **OK** to confirm that you are aware of the replacement of the HTTPS TLS certificate on the node, + and proceed through the browser warning. + +After a short wait, your cluster is created and you can sign in to the Cluster Manager UI. + +You can now access any of the management capabilities, including: + +- [Creating a new database]({{< relref "/operate/rs/databases/create.md" >}}) +- [Joining a new node to a cluster]({{< relref "/operate/rs/clusters/add-node.md" >}}) diff --git a/content/operate/rs/7.4/clusters/optimize/_index.md b/content/operate/rs/7.4/clusters/optimize/_index.md new file mode 100644 index 0000000000..3c057b1459 --- /dev/null +++ b/content/operate/rs/7.4/clusters/optimize/_index.md @@ -0,0 +1,14 @@ +--- +Title: Optimize clusters +alwaysopen: false +categories: +- docs +- operate +- rs +description: Configuration changes and information you can use to optimize your performance + and memory usage. +hideListLinks: false +linktitle: Optimize +weight: 50 +url: '/operate/rs/7.4/clusters/optimize/' +--- diff --git a/content/operate/rs/7.4/clusters/optimize/disk-sizing-heavy-write-scenarios.md b/content/operate/rs/7.4/clusters/optimize/disk-sizing-heavy-write-scenarios.md new file mode 100644 index 0000000000..93ce4df237 --- /dev/null +++ b/content/operate/rs/7.4/clusters/optimize/disk-sizing-heavy-write-scenarios.md @@ -0,0 +1,41 @@ +--- +Title: Disk sizing for heavy write scenarios +alwaysopen: false +categories: +- docs +- operate +- rs +description: Sizing considerations for persistent disk space for heavy throughput + databases. +linktitle: Disk sizing +weight: $weight +url: '/operate/rs/7.4/clusters/optimize/disk-sizing-heavy-write-scenarios/' +--- +In extreme write scenarios, when AOF is enabled, the AOF rewrite process +may require considerably more disk space for database persistence. + +To estimate the required persistent disk space in such cases, use the +formula described below. + +**The required persistent disk space for AOF rewrite purposes in extreme +write scenarios, assuming identical shard sizes:** + +**X (1 + 3Y +Y²)** +where: +**X** = each shard size +**Y** = number of shards + +Following are examples of database configurations and the persistence +disk space they would require in this scenario: + +| | Example 1 | Example 2 | Example 3 | Example 4 | +|---|------------|-----------------|------------|-----------------| +| Database size (GB) | 10 | 10 | 40 | 40 | +| Number of shards | 4 | 16 | 5 | 15 | +| Shard size (GB) | 2.5 | 0.625 | 8 | 2.67 | +| Required disk space (GB) | 73 | 191 | 328 | 723 | + +For disk size requirements in standard usage scenarios, refer to the +[Hardware +requirements]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/hardware-requirements.md" >}}) +section. diff --git a/content/operate/rs/7.4/clusters/optimize/memtier-benchmark.md b/content/operate/rs/7.4/clusters/optimize/memtier-benchmark.md new file mode 100644 index 0000000000..3fb0ef2e78 --- /dev/null +++ b/content/operate/rs/7.4/clusters/optimize/memtier-benchmark.md @@ -0,0 +1,64 @@ +--- +Title: Benchmarking Redis Enterprise +alwaysopen: false +categories: +- docs +- operate +- rs +description: Use the `memtier_benchmark` tool to perform a performance benchmark of + Redis Enterprise Software. +linkTitle: Benchmark +weight: $weight +url: '/operate/rs/7.4/clusters/optimize/memtier-benchmark/' +--- + +Use the `memtier_benchmark` tool to perform a performance benchmark of Redis Enterprise Software. + +Prerequisites: + +- Redis Enterprise Software installed +- A cluster configured +- A database created + +For help with the prerequisites, see the [Redis Enterprise Software quickstart]({{< relref "/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart" >}}). + +It is recommended to run memtier_benchmark on a separate node that is +not part of the cluster being tested. If you run it on a node of the +cluster, be mindful that it affects the performance of both the +cluster and memtier_benchmark. + +```sh +/opt/redislabs/bin/memtier_benchmark -s $DB_HOST -p $DB_PORT -a $DB_PASSWORD -t 4 -R --ratio=1:1 +``` + +This command instructs memtier_benchmark to connect to your Redis +Enterprise database and generates a load doing the following: + +- A 50/50 Set to Get ratio +- Each object has random data in the value + +## Populate a database with testing data + +If you need to populate a database with some test data for a proof of +concept, or failover testing, etc. here is an example for you. + +```sh +/opt/redislabs/bin/memtier_benchmark -s $DB_HOST -p $DB_PORT -a $DB_PASSWORD -R -n allkeys -d 500 --key-pattern=P:P --ratio=1:0 +``` + +This command instructs memtier_benchmark to connect to your Redis +Enterprise database and generates a load doing the following: + +- Write objects only, no reads +- A 500 byte object +- Each object has random data in the value +- Each key has a random pattern, then a colon, followed by a + random pattern. + +Run this command until it fills up your database to where you want it +for testing. The easiest way to check is on the database metrics page. + +{{< image filename="/images/rs/memtier_metrics_page.png" >}} + +Another use for memtier_benchmark is to populate a database with data +for failure testing. diff --git a/content/operate/rs/7.4/clusters/optimize/optimization.md b/content/operate/rs/7.4/clusters/optimize/optimization.md new file mode 100644 index 0000000000..ec01f2fc22 --- /dev/null +++ b/content/operate/rs/7.4/clusters/optimize/optimization.md @@ -0,0 +1,54 @@ +--- +Title: Cluster environment optimization +alwaysopen: false +categories: +- docs +- operate +- rs +description: Optimize your cluster environments for better performance. +linktitle: Environment optimization +weight: $weight +url: '/operate/rs/7.4/clusters/optimize/optimization/' +--- +Redis Enterprise Software uses various algorithms to optimize +performance. As part of this process, Redis Enterprise Software examines usage +and load to adjust its runtime configuration. Depending +on your specific usage and load, Redis Enterprise Software might take some +time to adjust for optimal performance. + +To ensure optimal performance, you must run your workload several times +and for a long duration until performance stabilizes. + +## Failure detection sensitivity policies + +You can optimize your cluster's thresholds and timeouts for different environments using the `failure_detection_sensitivity` cluster policy: + +- `high` (previously known as `local-network watchdog_profile`) – high failure detection sensitivity, lower thresholds, and faster failure detection and failover + +- `low` (previously known as `cloud watchdog_profile`) – low failure detection sensitivity and higher tolerance for latency variance (also called network jitter) + +Depending on which policy you choose, Redis Enterprise Software uses different +thresholds to make operation-related decisions. + +The default policy is `high` failure detection sensitivity for `local-network` environments. If you are +running Redis Enterprise in a cloud environment, you should change the +configuration. + +## Change failure detection sensitivity + +To change the cluster's `failure_detection_sensitivity`, run one of the following [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}) commands. + +- For Redis Enterprise Software version 6.4.2-69 and later, run: + + ```sh + rladmin tune cluster failure_detection_sensitivity [ low | high ] + ``` + +- For Redis Enterprise Software version 6.4.2-61 and earlier, run: + + ```sh + rladmin tune cluster watchdog_profile [ cloud | local-network ] + ``` + +If Redis Enterprise Software still +does not meet your performance expectations after following these instructions, [contact support](https://redis.com/company/support/) for help optimizing your environment. diff --git a/content/operate/rs/7.4/clusters/optimize/oss-cluster-api.md b/content/operate/rs/7.4/clusters/optimize/oss-cluster-api.md new file mode 100644 index 0000000000..d8f8d790d3 --- /dev/null +++ b/content/operate/rs/7.4/clusters/optimize/oss-cluster-api.md @@ -0,0 +1,22 @@ +--- +Title: "Redis OSS Cluster API" +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Use the Redis OSS Cluster API to improve performance and keep applications current with cluster topology changes. +linktitle: "Redis OSS Cluster API" +weight: $weight +url: '/operate/rs/7.4/clusters/optimize/oss-cluster-api/' +--- +{{< embed-md "oss-cluster-api-intro.md" >}} + +You can use the Redis OSS Cluster API along with other Redis Enterprise Software high availability +to get high performance with low latency +and let applications stay current with cluster topology changes, including add node, remove node, and node failover. + +For more about working with the OSS Cluster API in Redis Enterprise Software, see [Enable OSS Cluster API]({{< relref "/operate/rs/databases/configure/oss-cluster-api" >}}). + +To learn how to enable OSS Cluster API in Redis Cloud, see [Clustering Redis databases]({{< relref "/operate/rc/databases/configuration/clustering#cluster-api" >}}). diff --git a/content/operate/rs/7.4/clusters/optimize/turn-off-services.md b/content/operate/rs/7.4/clusters/optimize/turn-off-services.md new file mode 100644 index 0000000000..c71a8f07c3 --- /dev/null +++ b/content/operate/rs/7.4/clusters/optimize/turn-off-services.md @@ -0,0 +1,66 @@ +--- +Title: Turn off services to free system memory +alwaysopen: false +categories: +- docs +- operate +- rs +description: Turn off services to free memory and improve performance. +linktitle: Free system memory +weight: $weight +url: '/operate/rs/7.4/clusters/optimize/turn-off-services/' +--- +The Redis Enterprise Software cluster nodes host a range of services that support the cluster processes. +In most deployments, either all of these services are required, +or there are enough memory resources on the nodes for the database requirements. + +In a deployment with limited memory resources, certain services can be disabled from API endpoint to free system memory or using the `rladmin` command. +Before you turn off a service, make sure that your deployment does not depend on that service. +After you turn off a service, you can re-enable in the same way. + +The services that you can turn off are: + +- RS Admin Console - `cm_server` +- Logs in CSV format - `stats_archiver` +- [LDAP authentication]({{< relref "/operate/rs/security/access-control/ldap" >}}) - `saslauthd` +- [Discovery service]({{< relref "/operate/rs/networking/cluster-dns.md" >}})- `mdns_server`, `pdns_server` +- [Active-Active databases]({{< relref "/operate/rs/databases/active-active" >}}) - `crdb_coordinator`, `crdb_worker` +- Alert Manager - `alert_mgr` (For best results, disable only if you have an alternate alert system.) + +To turn off a service with the `rladmin cluster config` command, use the `services` parameter and the name of the service, followed by `disabled`. +```text + rladmin cluster config + [ services ] +``` + +To turn off a service with the API, use the [`PUT /v1/services_configuration`]({{< relref "/operate/rs/references/rest-api/requests/cluster/services_configuration#put-cluster-services_config" >}}) endpoint +with the name of the service and the operating mode (enabled/disabled) in JSON format. + +For example: +- To turn off the Redis Enterprise Cluster Manager UI, use this PUT request: + + ```sh + PUT https://[host][:9443]/v1/cluster/services_configuration + '{ + "cm_server":{ + "operating_mode":"disabled" + } + }' + ``` + +- To turn off the CRDB services and enable the `stats_archiver` for cluster component statistics, use this PUT request: + + ```sh + PUT https://[host][:9443]/v1/cluster/services_configuration + '{ + "crdb_coordinator":{ + "operating_mode":"disabled" + }, + "crdb_worker":{ + "operating_mode":"disabled" + }, + "stats_archiver":{ + "operating_mode":"enabled" + } + }' + ``` diff --git a/content/operate/rs/7.4/clusters/optimize/wait.md b/content/operate/rs/7.4/clusters/optimize/wait.md new file mode 100644 index 0000000000..8f2412e3b8 --- /dev/null +++ b/content/operate/rs/7.4/clusters/optimize/wait.md @@ -0,0 +1,55 @@ +--- +Title: Use the WAIT command to improve data safety and durability +alwaysopen: false +categories: +- docs +- operate +- rs +description: Use the wait command to take full advantage of Redis Enterprise Software's + replication-based durability. +linkTitle: WAIT command +weight: $weight +url: '/operate/rs/7.4/clusters/optimize/wait/' +--- +Redis Enterprise Software comes with the ability to replicate data +to another replica for high availability and persist in-memory data on +disk permanently for durability. With the [`WAIT`]({{}}) command, you can +control the consistency and durability guarantees for the replicated and +persisted database. + +## Non-blocking Redis write operation + +Any updates that are issued to the database are typically performed with the following flow: + +1. Application issues a write. +1. Proxy communicates with the correct primary shard in the system that contains the given key. +1. The acknowledgment is sent to proxy after the write operation completes. +1. The proxy sends the acknowledgment back to the application. + +Independently, the write is communicated from the primary shard to the replica, and +replication acknowledges the write back to the primary shard. These are steps 5 and 6. + +Independently, the write to a replica is also persisted to disk and +acknowledged within the replica. These are steps 7 and 8. + +{{< image filename="/images/rs/weak-consistency.png" >}} + +## Blocking write operation on replication + +With the [`WAIT`]({{}}) or [`WAITAOF`]({{}}) 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 `WAIT` or `WAITAOF` is: + +1. The application issues a write. +1. The proxy communicates with the correct primary shard in the system that contains the given key. +1. Replication communicates the update to the replica shard. +1. If using `WAITAOF` and the AOF every write setting, the replica persists the update to disk before sending the acknowledgment. +1. The acknowledgment is sent back from the replica all the way to the proxy with steps 5 to 8. + +The application only gets the acknowledgment from the write after durability is achieved with replication to the replica for `WAIT` or `WAITAOF` and to the persistent storage for `WAITAOF` only. + +{{< image filename="/images/rs/strong-consistency.png" >}} + +The `WAIT` command always returns the number of replicas that acknowledged the write commands sent by the current client before the `WAIT` 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 is always 1 for databases with high availability enabled. + +See the [`WAITAOF`]({{}}) command for details for enhanced data safety and durability capabilities introduced with Redis 7.2. diff --git a/content/operate/rs/7.4/clusters/remove-node.md b/content/operate/rs/7.4/clusters/remove-node.md new file mode 100644 index 0000000000..eec0942e2d --- /dev/null +++ b/content/operate/rs/7.4/clusters/remove-node.md @@ -0,0 +1,116 @@ +--- +Title: Remove a cluster node +alwaysopen: false +categories: +- docs +- operate +- rs +description: Remove a node from your Redis Enterprise cluster. +linkTitle: Remove node +weight: 80 +url: '/operate/rs/7.4/clusters/remove-node/' +--- +You might want to remove a node from a Redis Enterprise cluster for one of the following reasons: + +- To [permanently remove a node](#permanently-remove-a-node) if you no longer need the extra capacity. +- To [replace a faulty node](#replace-a-faulty-node) with a healthy node. +- To [replace a healthy node](#replace-a-healthy-node) with a different node. + +You can configure [email alerts from the cluster]({{< relref "/operate/rs/clusters/monitoring#cluster-alerts" >}}) to notify you of cluster changes, including when a node is removed. + +{{}} +Read through these explanations thoroughly before taking +any action. +{{}} + +## Permanently remove a node + +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. + +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. + +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. + +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. + +## Replace a faulty node + +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. + +For guidelines, refer to [Replacing a faulty +node]({{< relref "/operate/rs/clusters/replace-node.md" >}}). + +## Replace a healthy node + +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. + +For further guidance, refer to [adding a new node to a +cluster]({{< relref "/operate/rs/clusters/add-node.md" >}}). + +You can migrate resources by using the `rladmin` command-line interface +(CLI). For guidelines, refer to [`rladmin` command-line interface +(CLI)]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}). + +{{< note >}} +The [DNS records]({{< relref "/operate/rs/networking/cluster-dns" >}}) must be updated each time a node is added or replaced. +{{< /note >}} + +## Remove a node + +To remove a node using the Cluster Manager UI: + +1. If you are using the new Cluster Manager UI, switch to the legacy admin console. + + {{Select switch to legacy admin console from the dropdown.}} + +1. On the **nodes** page, select the node you want to remove. + +1. Click **Remove** at the top of the **node** page. + +1. Confirm you want to **Remove** the node when prompted. + +1. Redis Enterprise Software examines the node and the cluster and takes the actions required + to remove the node. + +1. At any point, you can click the **Abort** button to stop the + process. When aborted, the current internal action is completed, and + then the process stops. + +1. Once the process finishes, the node is no longer shown in + the UI. + +To remove a node using the REST API, use [`POST /v1/nodes//actions/remove`]({{< relref "/operate/rs/references/rest-api/requests/nodes/actions#post-node-action" >}}). + +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. + +To change node removal to wait for the creation of new persistence files for all migrated shards, set `wait_for_persistence` to `true` in the request body or [update the cluster policy]({{}}) `persistent_node_removal` to `true` to change the cluster's default behavior. + +For example: + +```sh +POST https://:9443/v1/nodes//actions/remove +{ + "wait_for_persistence": true +} +``` + +{{< note >}} +If you need to add a removed node back to the cluster, +you must [uninstall]({{< relref "/operate/rs/installing-upgrading/uninstalling.md" >}}) +and [reinstall]({{< relref "/operate/rs/installing-upgrading" >}}) the software on that node. +{{< /note >}} diff --git a/content/operate/rs/7.4/clusters/replace-node.md b/content/operate/rs/7.4/clusters/replace-node.md new file mode 100644 index 0000000000..e20b92fa98 --- /dev/null +++ b/content/operate/rs/7.4/clusters/replace-node.md @@ -0,0 +1,38 @@ +--- +Title: Replace a cluster node +alwaysopen: false +categories: +- docs +- operate +- rs +description: Replace a node in your cluster that is down. +linkTitle: Replace node +weight: 90 +url: '/operate/rs/7.4/clusters/replace-node/' +--- +A failed node will appear as `Down` ({{< image filename="/images/rs/icons/node-down-icon.png#no-click" alt="Node down icon" class="inline" >}}) in the **Nodes** list. + +To replace a failed node: + +1. Prepare a new node identical to the old one. + +1. Install and + configure Redis Enterprise Software on the node. See [Install and setup]({{< relref "/operate/rs/installing-upgrading" >}}) for more information. + + {{< note >}} +If you are using [Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering/" >}}), make sure the required flash storage is set up on this new node. + {{< /note >}} + +1. [Add the node]({{< relref "/operate/rs/clusters/add-node" >}}) to the cluster. Make sure the new node has as much available memory as the faulty + node. + + If the new node does not have enough memory, you will be prompted to add a node with enough memory. + +1. A message will appear informing you that the cluster has a faulty node + and that the new node will replace the faulty node. + + {{< note >}} +- If there is a faulty node in the cluster to which you are adding a node, Redis Enterprise Software will use the new node to replace the faulty one. +- Any existing [DNS records]({{< relref "/operate/rs/networking/cluster-dns" >}}) must be updated +each time a node is added or replaced. + {{< /note >}} diff --git a/content/operate/rs/7.4/databases/_index.md b/content/operate/rs/7.4/databases/_index.md new file mode 100644 index 0000000000..22c8d2094b --- /dev/null +++ b/content/operate/rs/7.4/databases/_index.md @@ -0,0 +1,22 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: This page will help you find database management information in the Databases + section. +hideListLinks: false +linktitle: Databases +title: Manage databases +weight: 37 +url: '/operate/rs/7.4/databases/' +--- + +You can manage your Redis Enterprise Software databases with several different tools: + +- Cluster Manager UI (the web-based user interface) +- Command-line tools ([`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}), [`redis-cli`]({{< relref "/develop/connect/cli" >}}), [`crdb-cli`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}})) +- [REST API]({{< relref "/operate/rs/references/rest-api/_index.md" >}}) + + diff --git a/content/operate/rs/7.4/databases/active-active/_index.md b/content/operate/rs/7.4/databases/active-active/_index.md new file mode 100644 index 0000000000..810276ef54 --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/_index.md @@ -0,0 +1,63 @@ +--- +Title: Active-Active geo-distributed Redis +alwaysopen: false +categories: +- docs +- operate +- rs +- kubernetes +description: Overview of the Active-Active database in Redis Enterprise Software +hideListLinks: true +linktitle: Active-Active +weight: 40 +url: '/operate/rs/7.4/databases/active-active/' +--- +In Redis Enterprise, Active-Active geo-distribution is based on [CRDT technology](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type). +The Redis Enterprise implementation of CRDT is called an Active-Active database (formerly known as CRDB). +With Active-Active databases, applications can read and write to the same data set from different geographical locations seamlessly and with latency less than one millisecond (ms), +without changing the way the application connects to the database. + +Active-Active databases also provide disaster recovery and accelerated data read-access for geographically distributed users. + + +## High availability + +The [high availability]({{< relref "/operate/rs/databases/durability-ha/" >}}) that Active-Active replication provides is built upon a number of Redis Enterprise Software features (such as [clustering]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}), [replication]({{< relref "/operate/rs/databases/durability-ha/replication.md" >}}), and [replica HA]({{< relref "/operate/rs/databases/configure/replica-ha.md" >}})) as well as some features unique to Active-Active ([multi-primary replication]({{}}), [automatic conflict resolution]({{}}), and [strong eventual consistency]({{}})). + +Clustering and replication are used together in Active-Active databases to distribute multiple copies of the dataset across multiple nodes and multiple clusters. As a result, a node or cluster is less likely to become a single point of failure. If a primary node or primary shard fails, a replica is automatically promoted to primary. To avoid having one node hold all copies of certain data, the [replica HA]({{< relref "/operate/rs/databases/configure/replica-ha.md" >}}) feature (enabled by default) automatically migrates replica shards to available nodes. + +## Multi-primary replication + +In Redis Enterprise Software, replication copies data from primary shards to replica shards. Active-Active geo-distributed replication also copies both primary and replica shards to other clusters. Each Active-Active database needs to span at least two clusters; these are called participating clusters. + +Each participating cluster hosts an instance of your database, and each instance has its own primary node. Having multiple primary nodes means you can connect to the proxy in any of your participating clusters. Connecting to the closest cluster geographically enables near-local latency. Multi-primary replication (previously referred to as multi-master replication) also means that your users still have access to the database if one of the participating clusters fails. + +{{< note >}} +Active-Active databases do not replicate the entire database, only the data. +Database configurations, LUA scripts, and other support info are not replicated. +{{< /note >}} + +## Syncer + +Keeping multiple copies of the dataset consistent across multiple clusters is no small task. To achieve consistency between participating clusters, Redis Active-Active replication uses a process called the [syncer]({{< relref "/operate/rs/databases/active-active/syncer" >}}). + +The syncer keeps a [replication backlog]({{< relref "/operate/rs/databases/active-active/manage#replication-backlog/" >}}), which stores changes to the dataset that the syncer sends to other participating clusters. The syncer uses partial syncs to keep replicas up to date with changes, or a full sync in the event a replica or primary is lost. + +## Conflict resolution + +Because you can connect to any participating cluster to perform a write operation, concurrent and conflicting writes are always possible. Conflict resolution is an important part of the Active-Active technology. Active-Active databases only use [conflict-free replicated data types (CRDTs)](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type). These data types provide a predictable conflict resolution and don't require any additional work from the application or client side. + +When developing with CRDTs for Active-Active databases, you need to consider some important differences. See [Develop applications with Active-Active databases]({{< relref "/operate/rs/databases/active-active/develop/_index.md" >}}) for related information. + + +## Strong eventual consistency + +Maintaining strong consistency for replicated databases comes with tradeoffs in scalability and availability. Redis Active-Active databases use a strong eventual consistency model, which means that local values may differ across replicas for short periods of time, but they all eventually converge to one consistent state. Redis uses vector clocks and the CRDT conflict resolution to strengthen consistency between replicas. You can also enable the causal consistency feature to preserve the order of operations as they are synchronized among replicas. + +Other Redis Enterprise Software features can also be used to enhance the performance, scalability, or durability of your Active-Active database. These include [data persistence]({{< relref "/operate/rs/databases/configure/database-persistence.md" >}}), [multiple active proxies]({{< relref "/operate/rs/databases/configure/proxy-policy.md" >}}), [distributed synchronization]({{< relref "/operate/rs/databases/active-active/synchronization-mode.md" >}}), [OSS Cluster API]({{< relref "/operate/rs/databases/configure/oss-cluster-api.md" >}}), and [rack-zone awareness]({{< relref "/operate/rs/clusters/configure/rack-zone-awareness.md" >}}). + +## Next steps + +- [Plan your Active-Active deployment]({{< relref "/operate/rs/databases/active-active/planning.md" >}}) +- [Get started with Active-Active]({{< relref "/operate/rs/databases/active-active/get-started.md" >}}) +- [Create an Active-Active database]({{< relref "/operate/rs/databases/active-active/create.md" >}}) diff --git a/content/operate/rs/7.4/databases/active-active/causal-consistency.md b/content/operate/rs/7.4/databases/active-active/causal-consistency.md new file mode 100644 index 0000000000..098a0ab23a --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/causal-consistency.md @@ -0,0 +1,47 @@ +--- +Title: Enable causal consistency +alwaysopen: false +categories: +- docs +- operate +- rs +description: Enable causal consistency in an Active-Active database. +linkTitle: Causal consistency +weight: 70 +url: '/operate/rs/7.4/databases/active-active/causal-consistency/' +--- +When you enable causal consistency in Active-Active databases, +the order of operations on a specific key are maintained across all Active-Active database instances. + +For example, if operations A and B were applied on the same key and the effect of A was observed by the instance that initiated B before B was applied to the key. +All instances of an Active-Active database would then observe the effect of A before observing the effect of B. +This way, any causal relationship between operations on the same key is also observed and maintained by every replica. + +### Enable causal consistency + +When you create an Active-Active database, you can enable causal consistency in the Cluster Manager UI: + +1. In the **Participating clusters** section of the **Create Active-Active database** screen, locate **Causal Consistency**: + + {{The Participating clusters section of the Create Active-Active database screen.}} + +1. Click **Change** to open the **Causal Consistency** dialog. + +1. Select **Enabled**: + + {{Enabled is selected in the Causal Consistency dialog.}} + +1. Click **Change** to confirm your selection. + +After database creation, you can only turn causal consistency on or off using the REST API or `crdb-cli`. +The updated setting only affects commands and operations received after the change. + +### Causal consistency side effects + +When the causal consistency option is enabled, each instance maintains the order of operations it received from another instance +and relays that information to all other N-2 instances, +where N represents the number of instances used by the Active-Active database. + +As a result, network traffic is increased by a factor of (N-2). +The memory consumed by each instance and overall performance are also impacted when causal consistency is activated. + diff --git a/content/operate/rs/7.4/databases/active-active/connect.md b/content/operate/rs/7.4/databases/active-active/connect.md new file mode 100644 index 0000000000..6a939bee65 --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/connect.md @@ -0,0 +1,114 @@ +--- +Title: Connect to your Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +description: How to connect to an Active-Active database using redis-cli or a sample + Python application. +linkTitle: Connect +weight: 26 +url: '/operate/rs/7.4/databases/active-active/connect/' +--- + +With the Redis database created, you are ready to connect to your +database to store data. You can use one of the following ways to test +connectivity to your database: + +- Connect with redis-cli, the built-in command-line tool +- Connect with a _Hello World_ application written in Python + +Remember we have two member Active-Active databases that are available for connections and +concurrent reads and writes. The member Active-Active databases are using bi-directional +replication to for the global Active-Active database. + +{{< image filename="/images/rs/crdb-diagram.png" >}} + +### Connecting using redis-cli {#connecting-using-rediscli} + +redis-cli is a simple command-line tool to interact with redis database. + +1. To use redis-cli on port 12000 from the node 1 terminal, run: + + ```sh + redis-cli -p 12000 + ``` + +1. Store and retrieve a key in the database to test the connection with these + commands: + + - `set key1 123` + - `get key1` + + The output of the command looks like this: + + ```sh + 127.0.0.1:12000> set key1 123 + OK + 127.0.0.1:12000> get key1 + "123" + ``` + +1. Enter the terminal of node 1 in cluster 2, run the redis-cli, and + retrieve key1. + + The output of the commands looks like this: + + ```sh + $ redis-cli -p 12000 + 127.0.0.1:12000> get key1 + "123" + ``` + +### Connecting using _Hello World_ application in Python + +A simple python application running on the host machine can also connect +to the database. + +{{< note >}} +Before you continue, you must have python and +[redis-py](https://github.com/andymccurdy/redis-py#installation) +(python library for connecting to Redis) configured on the host machine +running the container. +{{< /note >}} + +1. In the command-line terminal, create a new file called "redis_test.py" + + ```sh + vi redis_test.py + ``` + +1. Paste this code into the "redis_test.py" file. + + This application stores a value in key1 in cluster 1, gets that value from + key1 in cluster 1, and gets the value from key1 in cluster 2. + + ```py + import redis + rp1 = redis.StrictRedis(host='localhost', port=12000, db=0) + rp2 = redis.StrictRedis(host='localhost', port=12002, db=0) + print ("set key1 123 in cluster 1") + print (rp1.set('key1', '123')) + print ("get key1 cluster 1") + print (rp1.get('key1')) + print ("get key1 from cluster 2") + print (rp2.get('key1')) + ``` + +1. To run the "redis_test.py" application, run: + + ```sh + python redis_test.py + ``` + + If the connection is successful, the output of the application looks like: + + ```sh + set key1 123 in cluster 1 + True + get key1 cluster 1 + "123" + get key1 from cluster 2 + "123" + ``` diff --git a/content/operate/rs/7.4/databases/active-active/create.md b/content/operate/rs/7.4/databases/active-active/create.md new file mode 100644 index 0000000000..fc3dd74363 --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/create.md @@ -0,0 +1,224 @@ +--- +Title: Create an Active-Active geo-replicated database +alwaysopen: false +categories: +- docs +- operate +- rs +description: How to create an Active-Active database and things to consider when setting + it up. +linkTitle: Create +weight: 25 +url: '/operate/rs/7.4/databases/active-active/create/' +--- +[Active-Active geo-replicated databases]({{< relref "/operate/rs/databases/active-active" >}}) (formerly known as CRDBs) give applications write access +to replicas of the dataset in different geographical locations. + +The participating Redis Enterprise Software clusters that host the instances can be distributed in different geographic locations. +Every instance of an Active-Active database can receive write operations, and all operations are [synchronized]({{< relref "/operate/rs/databases/active-active/develop#example-of-synchronization" >}}) to all instances without conflict. + +## Steps to create an Active-Active database + +1. **Create a service account** - On each participating cluster, create a dedicated user account with the Admin role. +1. **Confirm connectivity** - Confirm network connectivity between the participating clusters. +1. **Create Active-Active database** - Connect to one of your clusters and create a new Active-Active database. +1. **Add participating clusters** - Add the participating clusters to the Active-Active database with the user credentials for the service account. +1. **Verify creation** - Log in to each of the participating clusters and verify your Active-Active database was created on them. +1. **Confirm Active-Active database synchronization** - Test writing to one cluster and reading from a different cluster. + +## Prerequisites + +- Two or more machines with the same version of Redis Enterprise Software installed +- Network connectivity and cluster FQDN name resolution between all participating clusters +- [Network time service]({{< relref "/operate/rs/databases/active-active#network-time-service-ntp-or-chrony" >}}) listener (ntpd) configured and running on each node in all clusters + +## Create an Active-Active database + +1. Create service accounts on each participating cluster: + + 1. In a browser, open the Cluster Manager UI for the participating cluster. + + The default address is: `https://:8443` + + 1. Go to the **Access Control > Users** tab: + + {{Add role with name}} + + 1. Click **+ Add user**. + + 1. Enter the username, email, and password for the user. + + 1. Select the **Admin** role. + + 1. Click **Save**. + +1. To verify network connectivity between participating clusters, + run the following `telnet` command from each participating cluster to all other participating clusters: + + ```sh + telnet 9443 + ``` + +1. In a browser, open the Cluster Manager UI of the cluster where you want to create the Active-Active database. + + The default address is: `https://:8443` + +1. Open the **Create database** menu with one of the following methods: + + - Click the **+** button next to **Databases** in the navigation menu: + + {{Create database menu has two options: Single Region and Active-Active database.}} + + - Go to the **Databases** screen and select **Create database**: + + {{Create database menu has two options: Single Region and Active-Active database.}} + +1. Select **Active-Active database**. + +1. Enter the cluster's local admin credentials, then click **Save**: + + {{Enter the cluster's admin username and password.}} + +1. Add participating clusters that will host instances of the Active-Active database: + + 1. In the **Participating clusters** section, go to **Other participating clusters** and click **+ Add cluster**. + + 1. In the **Add cluster** configuration panel, enter the new cluster's URL, port number, and the admin username and password for the new participating cluster: + + {{Add cluster panel.}} + + {{}} +If an Active-Active database [runs on flash memory]({{}}), you cannot add participating clusters that run on RAM only. + {{}} + + 1. Click **Join cluster** to add the cluster to the list of participating clusters. + +1. Enter a **Database name**. + +1. If your cluster supports [Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering/" >}}), in **Runs on** you can select **Flash** so that your database uses Flash memory. We recommend that you use AOF every 1 sec for the best performance during the initial Active-Active database sync of a new replica. + +1. To configure additional database settings, expand each relevant section to make changes. + + See [Configuration settings](#configuration-settings) for more information about each setting. + +1. Click **Create**. + +## Configuration settings + +- **Database version** - The Redis version used by your database. + +- **Database name** - The database name requirements are: + + - Maximum of 63 characters + + - Only letters, numbers, or hyphens (-) are valid characters + + - Must start and end with a letter or digit + + - Case-sensitive + +- **Port** - You can define the port number that clients use to connect to the database. Otherwise, a port is randomly selected. + + {{< note >}} +You cannot change the [port number]({{< relref "/operate/rs/networking/port-configurations.md" >}}) +after the database is created. + {{< /note >}} + +- **Memory limit** - [Database memory limits]({{< relref "/operate/rs/databases/memory-performance/memory-limit.md" >}}) include all database replicas and shards, including replica shards in database replication and database shards in database clustering. + + If the total size of the database in the cluster reaches the memory limit, the data eviction policy for the database is enforced. + + {{< note >}} +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%. + {{< /note >}} + +- [**Capabilities**]({{< relref "/operate/oss_and_stack/stack-with-enterprise" >}}) (previously **Modules**) - 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 [Redis Enterprise and Redis Stack feature compatibility +]({{< relref "/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities" >}}) for compatibility details. + + {{}} +To use Redis Stack capabilities, enable them when you create a new database. +You cannot enable them after database creation. + {{}} + + To add capabilities to the database: + + 1. In the **Capabilities** section, select one or more capabilities. + + 1. To customize capabilities, select **Parameters** and enter the optional custom configuration. + + 1. Select **Done**. + +### TLS + +If you enable TLS when you create the Active-Active database, the nodes use the TLS mode **Require TLS for CRDB communication only** to require TLS authentication and encryption for communications between participating clusters. + +After you create the Active-Active database, you can set the TLS mode to **Require TLS for all communications** so client communication from applications are also authenticated and encryption. + +### High availability & durability + +- [**Replication**]({{< relref "/operate/rs/databases/durability-ha/replication" >}}) - We recommend that all Active-Active database use replication for best intercluster synchronization performance. + + When replication is enabled, every Active-Active database master shard is replicated to a corresponding replica shard. The replica shards are then used to synchronize data between the instances, and the master shards are dedicated to handling client requests. + + We also recommend that you enable [replica HA]({{< relref "/operate/rs/databases/configure/replica-ha" >}}) to ensure that the replica shards are highly-available for this synchronization. + +- [**Data persistence**]({{< relref "/operate/rs/databases/configure/database-persistence.md" >}}) - To protect against loss of data stored in RAM, you can enable data persistence to store a copy of the data on disk. + + Active-Active databases support append-only file (AOF) persistence only. Snapshot persistence is not supported for Active-Active databases. + +- **Eviction policy** - The default eviction policy for Active-Active databases is `noeviction`. Redis Enterprise version 6.0.20 and later support all eviction policies for Active-Active databases, unless [Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering" >}}) is enabled. + +### Clustering + +- In the **Database clustering** option, you can either: + + - Make sure the Database clustering is enabled and select the number of shards + that you want to have in the database. When database clustering is enabled, + databases are subject to limitations on [Multi-key commands]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}). + You can increase the number of shards in the database at any time. + + - Clear the **Database clustering** option to use only one shard so that you + can use [Multi-key commands]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}) + without the limitations. + + {{}} +You cannot enable or turn off database clustering after the Active-Active database is created. + {{}} + +- [**OSS Cluster API**]({{< relref "/operate/rs/databases/configure/oss-cluster-api.md" >}}) - {{< embed-md "oss-cluster-api-intro.md" >}} + +### Access control + +- **Unauthenticated access** - You can access the database as the default user without providing credentials. + +- **Password-only authentication** - When you configure a password for your database's default user, all connections to the database must authenticate with the [AUTH command]({{< relref "/commands/auth" >}}. + + 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. + + Creating a database without ACLs enables a *default* user with full access to the database. You can secure default user access by requiring a password. + +- **Access Control List** - You can specify the [user roles]({{< relref "/operate/rs/security/access-control/create-db-roles" >}}) that have access to the database and the [Redis ACLs]({{< relref "/operate/rs/security/access-control/redis-acl-overview" >}}) that apply to those connections. + + You can only configure access control after the Active-Active database is created. In each participating cluster, add ACLs after database creation. + + To define an access control list for a database: + + 1. In **Security > Access Control > Access Control List**, select **+ Add ACL**. + + 1. Select a [role]({{< relref "/operate/rs/security/access-control/create-db-roles" >}}) to grant database access. + + 1. Associate a [Redis ACL]({{< relref "/operate/rs/security/access-control/create-db-roles" >}}) with the role and database. + + 1. Select the check mark to add the ACL. + +### Causal consistency + +[**Causal consistency**]({{< relref "/operate/rs/databases/active-active/causal-consistency" >}}) in an Active-Active database guarantees that the order of operations on a specific key is maintained across all instances of an Active-Active database. + +To enable causal consistency for an existing Active-Active database, use the REST API. + + +## Test Active-Active database connections + +With the Redis database created, you are ready to connect to your database. See [Connect to Active-Active databases]({{< relref "/operate/rs/databases/active-active/connect.md" >}}) for tutorials and examples of multiple connection methods. diff --git a/content/operate/rs/7.4/databases/active-active/delete.md b/content/operate/rs/7.4/databases/active-active/delete.md new file mode 100644 index 0000000000..cab2dc2a72 --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/delete.md @@ -0,0 +1,29 @@ +--- +Title: Delete Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +description: Considerations while deleting Active-Active databases. +linktitle: Delete +weight: 35 +url: '/operate/rs/7.4/databases/active-active/delete/' +--- + +When you delete an Active-Active database (formerly known as CRDB), +all instances of the Active-Active database are deleted from all participating clusters. + +{{% warning %}} +This action is immediate, non-reversible, and has no rollback. +{{% /warning %}} + +Because Active-Active databases are made up of instances on multiple participating clusters, +to restore a deleted Active-Active database you must create the database again with all of its instances +and then restore the data to the database from backup. + +We recommended that you: + +- Back up your data and test the restore on another database before you delete an Active-Active database. +- Consider [flushing the data]({{< relref "/operate/rs/databases/import-export/flush.md" >}}) from the database + so that you can keep the Active-Active database configuration and restore the data to it if necessary. diff --git a/content/operate/rs/7.4/databases/active-active/develop/_index.md b/content/operate/rs/7.4/databases/active-active/develop/_index.md new file mode 100644 index 0000000000..733c4f3617 --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/develop/_index.md @@ -0,0 +1,68 @@ +--- +Title: Active-Active Redis applications +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: General information to keep in mind while developing applications for + an Active-Active database. +hideListLinks: true +linktitle: Develop applications +weight: 99 +url: '/operate/rs/7.4/databases/active-active/develop/' +--- +Developing globally distributed applications can be challenging, as +developers have to think about race conditions and complex combinations +of events under geo-failovers and cross-region write conflicts. In Redis Enterprise Software (RS), Active-Active databases +simplify developing such applications by directly using built-in smarts +for handling conflicting writes based on the data type in use. Instead +of depending on just simplistic "last-writer-wins" type conflict +resolution, geo-distributed Active-Active databases (formerly known as CRDBs) combines techniques defined in CRDT +(conflict-free replicated data types) research with Redis types to +provide smart and automatic conflict resolution based on the data types +intent. + +An Active-Active database is a globally distributed database that spans multiple Redis +Enterprise Software clusters. Each Active-Active database can have many Active-Active database instances +that come with added smarts for handling globally distributed writes +using the proven +[CRDT](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type) +approach. +[CRDT](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type) +research describes a set of techniques for creating systems that can +handle conflicting writes. CRDBs are powered by Multi-Master Replication +(MMR) provides a straightforward and effective way to replicate your +data between regions and simplify development of complex applications +that can maintain correctness under geo-failovers and concurrent +cross-region writes to the same data. + +{{< image filename="/images/rs/crdbs.png" alt="Geo-replication world map">}} + +Active-Active databases replicate data between multiple Redis Enterprise Software +clusters. Common uses for Active-Active databases include disaster recovery, +geographically redundant applications, and keeping data closer to your +user's locations. MMR is always multi-directional amongst the clusters +configured in the Active-Active database. For unidirectional replication, please see the +Replica Of capabilities in Redis Enterprise Software. + +## Example of synchronization + +In the example below, database writes are concurrent at the point in +times t1 and t2 and happen before a sync can communicate the changes. +However, writes at times t4 and t6 are not concurrent as a sync happened +in between. + +| **Time** | **CRDB Instance1** | **CRDB Instance2** | +| ------: | :------: | :------: | +| t1 | SET key1 “a” | | +| t2 | | SET key1 “b” | +| t3 | — Sync — | — Sync — | +| t4 | SET key1 “c” | | +| t5 | — Sync — | — Sync — | +| t6 | | SET key1 “d” | + +[Learn more about +synchronization]({{< relref "/operate/rs/databases/active-active" >}}) for +each supported data type and [how to develop]({{< relref "/operate/rs/databases/active-active/develop/develop-for-aa.md" >}}) with them on Redis Enterprise Software. diff --git a/content/operate/rs/7.4/databases/active-active/develop/app-failover-active-active.md b/content/operate/rs/7.4/databases/active-active/develop/app-failover-active-active.md new file mode 100644 index 0000000000..d2f87b9175 --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/develop/app-failover-active-active.md @@ -0,0 +1,98 @@ +--- +Title: Application failover with Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: How to failover your application to connect to a remote replica. +linkTitle: App failover +weight: 99 +url: '/operate/rs/7.4/databases/active-active/develop/app-failover-active-active/' +--- +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. + +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. + +## Detecting Failure + +Your application can detect two types of failure: + +1. **Local failures** - The local replica is down or otherwise unavailable +1. **Replication failures** - The local replica is available but fails to replicate to or from remote replicas + +### Local Failures + +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. + +### Replication Failures + +Replication failures are more difficult to detect reliably without causing false positives. Replication failures can include: network split, replication configuration issues, remote replica failures. + +The most reliable method for health-checking replication is by using the Redis publish/subscribe (pub/sub) mechanism. + +{{< note >}} +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. +{{< /note >}} + +When you use the pub/sub data type to detect failures, the application: + +1. Connects to all replicas and subscribes to a dedicated channel for each replica. +1. Connects to all replicas and periodically publishes a uniquely identifiable message. +1. Monitors received messages and ensures that it is able to receive its own messages within a predetermined window of time. + +You can also use known dataset changes to monitor the reliability of the replication stream, +but pub/sub is preferred method because: + +1. It does not involve dataset changes. +1. It does not make any assumptions about the dataset. +1. 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. + +## Impact of sharding on failure detection + +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. + +To make sure that there is at least one key per shard, the application should: + +1. Use the Cluster API to retrieve the database sharding configuration. +1. Compute a number of key names, such that there is one key per shard. +1. Use those key names as channel names for the pub/sub mechanism. + +### Failing over + +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. + +It's best if your application doesn't read its own recent writes. Those writes can be either: + +1. Lost forever, if the local replica has an event such as a double failure or loss of persistent files. +1. Temporarily unavailable, but will be available at a later time if the local replica's failure is temporary. + + + +## Failback decision + +Your application can use the same checks described above to continue monitoring the state of the failed replica after failover. + +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. + +Dataset-based mechanisms are potentially less reliable for several reasons: +1. 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. +1. 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. +1. 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. + +## Replica Configuration Changes + +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. diff --git a/content/operate/rs/7.4/databases/active-active/develop/data-types/_index.md b/content/operate/rs/7.4/databases/active-active/develop/data-types/_index.md new file mode 100644 index 0000000000..b373c70502 --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/develop/data-types/_index.md @@ -0,0 +1,26 @@ +--- +Title: Data types for Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Introduction to differences in data types between standalone and Active-Active + Redis databases. +hideListLinks: true +linktitle: Data types +weight: 90 +url: '/operate/rs/7.4/databases/active-active/develop/data-types/' +--- + + +Active-Active databases use conflict-free replicated data types (CRDTs). From a developer perspective, most supported data types work the same for Active-Active and standard Redis databases. However, a few methods also come with specific requirements in Active-Active databases. + +Even though they look identical to standard Redis data types, there are specific rules that govern the handling of +conflicting concurrent writes for each data type. + +As conflict handling rules differ between data types, some commands have slightly different requirements in Active-Active databases versus standard Redis databases. + +See the following articles for more information + diff --git a/content/operate/rs/7.4/databases/active-active/develop/data-types/hashes.md b/content/operate/rs/7.4/databases/active-active/develop/data-types/hashes.md new file mode 100644 index 0000000000..c9bf60d120 --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/develop/data-types/hashes.md @@ -0,0 +1,43 @@ +--- +Title: Hashes in an Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Information about using hashes with an Active-Active database. +linkTitle: Hashes +weight: $weight +url: '/operate/rs/7.4/databases/active-active/develop/data-types/hashes/' +--- +Hashes are great for structured data that contain a map of fields and +values. They are used for managing distributed user or app session +state, user preferences, form data and so on. Hash fields contain string +type and string types operate just like the standard Redis string types +when it comes to CRDTs. Fields in hashes can be initialized as a string +using HSET or HMSET or can be used to initialize counter types that are +numeric integers using HINCRBY or floats using HINCRBYFLOAT. + +Hashes in Active-Active databases behave the same and maintain additional metadata to +achieve an "OR-Set" behavior to handle concurrent conflicting writes. +With the OR-Set behavior, writes to add new fields across multiple Active-Active database +instances are typically unioned except in cases of conflicts. +Conflicting instance writes can happen when an Active-Active database instance deletes a +field while the other adds the same field. In this case and observed +remove rule is followed. That is, remove can only remove fields it has +already seen and in all other cases element add/update wins. + +Field values behave just like CRDT strings. String values can be types +string, counter integer based on the command used for initialization of +the field value. See "String Data Type in Active-Active databases" and "String Data Type +with Counter Value in Active-Active databases" for more details. + +Here is an example of an "add wins" case: + +| **Time** | **CRDB Instance1** | **CRDB Instance2** | +| ------: | :------: | :------: | +| t1 | HSET key1 field1 “a” | | +| t2 | | HSET key1 field2 “b” | +| t4 | - Sync - | - Sync - | +| t5 | HGETALL key1
1) “field2”
2) “b”
3) “field1”
4) “a” | HGETALL key1
1) “field2”
2) “b”
3) “field1”
4) “a” | diff --git a/content/operate/rs/7.4/databases/active-active/develop/data-types/hyperloglog.md b/content/operate/rs/7.4/databases/active-active/develop/data-types/hyperloglog.md new file mode 100644 index 0000000000..e1f87da558 --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/develop/data-types/hyperloglog.md @@ -0,0 +1,76 @@ +--- +Title: HyperLogLog in Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Information about using hyperloglog with an Active-Active database. +linkTitle: HyperLogLog +weight: $weight +url: '/operate/rs/7.4/databases/active-active/develop/data-types/hyperloglog/' +--- +**HyperLogLog** is an algorithm that addresses the [count-distinct problem](https://en.wikipedia.org/wiki/Count-distinct_problem). +To do this it approximates the numbers of items in a [set](https://en.wikipedia.org/wiki/Multiset). +Determining the _exact_ cardinality of a set requires memory according to the cardinality of the set. +Because it estimates the cardinality by probability, the HyperLogLog algorithm can run with more reasonable memory requirements. + +## HyperLogLog in Redis + +Redis Community Edition implements [HyperLogLog](https://redislabs.com/redis-best-practices/counting/hyperloglog/) (HLL) as a native data structure. +It supports adding elements ([PFADD]({{< relref "/commands/pfadd" >}}) to an HLL, counting elements ([PFCOUNT]({{< relref "/commands/pfcount" >}}) of HLLs, and merging of ([PFMERGE]({{< relref "/commands/pfmerge" >}}) HLLs. + +Here is an example of a simple write case: + +| Time | Replica 1 | Replica 2 | +| ---- | ----------------- | ----------------- | +| t1 | PFADD hll x | | +| t2 | --- sync --- | | +| t3 | | PFADD hll y | +| t4 | --- sync --- | | +| t5 | PFCOUNT hll --> 2 | PFCOUNT hll --> 2 | + +Here is an example of a concurrent add case: + +| Time | Replica 1 | Replica 2 | +| ---- | ----------------- | ----------------- | +| t1 | PFADD hll x | PFADD hll y | +| t2 | PFCOUNT hll --> 1 | PFCOUNT hll --> 1 | +| t3 | --- sync --- | | +| t4 | PFCOUNT hll --> 2 | PFCOUNT hll --> 2 | + +## The DEL-wins approach + +Other collections in the Redis-CRDT implementation use the observed remove method to resolve conflicts. +The CRDT-HLL uses the DEL-wins method. +If a DEL request is received at the same time as any other request (ADD/MERGE/EXPIRE) on the HLL-key +the replicas consistently converge to delete key. +In the observed remove method used by other collections (sets, lists, sorted-sets and hashes), +only the replica that received the DEL request removes the elements, but elements added concurrently in other replicas exist in the consistently converged collection. +We chose to use the DEL-wins method for the CRDT-HLL to maintain the original time and space complexity of the HLL in Redis Community Edition. + +Here is an example of a DEL-wins case: + +| HLL | | | \| | Set | | | +| ---- | --------------- | --------------- | --- | ---- | ------------------- | ------------------- | +| | | | \| | | | | +| Time | Replica 1 | Replica 2 | \| | Time | Replica 1 | Replica 2 | +| | | | \| | | | | +| t1 | PFADD h e1 | | \| | t1 | SADD s e1 | | +| t2 | --- sync --- | | \| | t2 | --- sync --- | | +| t3 | PFCOUNT h --> 1 | PFCOUNT h --> 1 | \| | t3 | SCARD s --> 1 | SCARD s --> 1 | +| t4 | PFADD h e2 | Del h | \| | t4 | SADD s e2 | Del S | +| t5 | PFCOUNT h --> 2 | PFCOUNT h --> 0 | \| | t5 | SCARD s --> 2 | SCARD s --> 0 | +| t6 | --- sync --- | | \| | t6 | --- sync --- | | +| t7 | PFCOUNT h --> 0 | PFCOUNT h --> 0 | \| | t7 | SCARD s --> 1 | SCARD s --> 1 | +| t8 | Exists h --> 0 | Exists h --> 0 | \| | t8 | Exists s --> 1 | Exists s --> 1 | +| | | | \| | t9 | SMEMBERS s --> {e2} | SMEMBERS s --> {e2} | + +## HLL in Active-Active databases versus HLL in Redis Community Edition + +In Active-Active databases, we implemented HLL within the CRDT on the basis of the Redis implementation with a few exceptions: + +- Redis keeps the HLL data structure as an encoded string object + such that you can potentially run any string request can on a key that contains an HLL. In CRDT, only get and set are supported for HLL. +- In CRDT, if you do SET on a key that contains a value encoded as an HLL, then the value will remain an HLL. If the value is not encoded as HLL, then it will be a register. diff --git a/content/operate/rs/7.4/databases/active-active/develop/data-types/json.md b/content/operate/rs/7.4/databases/active-active/develop/data-types/json.md new file mode 100644 index 0000000000..4060709d42 --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/develop/data-types/json.md @@ -0,0 +1,29 @@ +--- +Title: JSON in Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Information about using JSON with an Active-Active database. +linkTitle: JSON +weight: $weight +tocEmbedHeaders: true +url: '/operate/rs/7.4/databases/active-active/develop/data-types/json/' +--- +Active-Active databases support JSON data structures. + +The design is based on [A Conflict-Free Replicated JSON Datatype](https://arxiv.org/abs/1608.03960) by Kleppmann and Beresford, but the implementation includes some changes. Several [conflict resolution rule](#conflict-resolution-rules) examples were adapted from this paper as well. + +## Prerequisites + +To use JSON in an Active-Active database, you must enable JSON during database creation. + +Active-Active Redis Cloud databases add JSON by default. See [Create an Active-Active subscription]({{< relref "/operate/rc/databases/create-database/create-active-active-database#select-capabilities" >}}) in the Redis Cloud documentation for details. + +In Redis Enterprise Software, JSON is not enabled by default for Active-Active databases. See [Create an Active-Active JSON database]({{< relref "/operate/oss_and_stack/stack-with-enterprise/json/active-active#create-an-active-active-json-database" >}}) in the Redis Stack and Redis Enterprise documentation for instructions. + +{{}} + +{{}} diff --git a/content/operate/rs/7.4/databases/active-active/develop/data-types/lists.md b/content/operate/rs/7.4/databases/active-active/develop/data-types/lists.md new file mode 100644 index 0000000000..ed9082b43b --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/develop/data-types/lists.md @@ -0,0 +1,108 @@ +--- +Title: Lists in Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Information about using list with an Active-Active database. +linkTitle: Lists +weight: $weight +url: '/operate/rs/7.4/databases/active-active/develop/data-types/lists/' +--- +Redis lists are simply lists of strings, sorted by insertion order. It +is possible to add elements to a Redis List that push new elements to +the head (on the left) or to the tail (on the right) of the list. Redis +lists can be used to easily implement queues (using LPUSH and RPOP, for +example) and stacks (using LPUSH and LPOP, for +example). + +Lists in Active-Active databases are just the same as regular Redis Lists. See the +following examples to get familiar with Lists' behavior in an +Active-Active database. + +Simple Lists +example: + +| **Time** | **CRDB Instance 1** | **CRDB Instance 2** | +| ------: | :------: | :------: | +| t1 | LPUSH mylist “hello” | | +| t2 | — Sync — | — Sync — | +| t3 | | LPUSH mylist “world” | +| t4 | — Sync — | — Sync — | +| t5 | LRANGE mylist 0 -1 =>“world” “hello” | LRANGE mylist 0 -1 => “world” “hello” | + +**Explanation**: +The final list contains both the "world" and "hello" elements, in that +order (Instance 2 observed "hello" when it added +"world"). + +Example of Lists with Concurrent +Insertions: + +| **Time** | **CRDB Instance 1** | **CRDB Instance 2** | +| ------: | :------: | :------: | +| t1 | LPUSH L x | | +| t2 | — Sync — | — Sync — | +| t3 | LINSERT L AFTER x y1 | | +| t4 | | LINSERT L AFTER x y2 | +| t5 | LRANGE L 0 -1 => x y1 | LRANGE L 0 -1 => x y2 | +| t6 | — Sync — | — Sync — | +| t7 | LRANGE L 0 -1 => x y1 y2 | LRANGE L 0 -1 => x y1 y2 | + +**Explanation**: +Instance 1 added an element y1 after x, and then Instance 2 added element y2 after x. +The final List contains all three elements: x is the first element, after it y1 and then y2. +The Active-Active database resolves the conflict arbitrarily but applies the resolution consistently across all Active-Active database instances. + +Example of Deleting a List while Pushing a New +Element: + +| **Time** | **CRDB Instance 1** | **CRDB Instance 2** | +| ------: | :------: | :------: | +| t1 | LPUSH L x | | +| t2 | — Sync — | — Sync — | +| t3 | LRANGE L 0 -1 => x | LRANGE L 0 -1 => x | +| t4 | LPUSH L y | DEL L | +| t5 | — Sync — | — Sync — | +| t6 | LRANGE L 0 -1 => y | LRANGE L 0 -1 => y | + +**Explanation** +At t4 - t6, DEL deletes only observed elements. This is why L still +contains y. + +Example of Popping Elements from a +List: + +| **Time** | **CRDB Instance 1** | **CRDB Instance 2** | +| ------: | :------: | :------: | +| t1 | LPUSH L x y z | | +| t2 | — Sync — | — Sync — | +| t3 | | RPOP L => x | +| t4 | — Sync — | — Sync — | +| t5 | RPOP L => y | | +| t6 | — Sync — | — Sync — | +| t7 | RPOP L => z | RPOP L => z | + +**Explanation**: +At t1, the operation pushes elements x, y, z to List L. At t3, the +sequential pops behave as expected from a queue. At t7, the concurrent +pop in both instances might show the same result. The instance was not +able to sync regarding the z removal so, from the point of view of each +instance, z is located in the List and can be popped. After syncing, +both lists are empty. + +Be aware of the behavior of Lists in Active-Active databases when using List as a stack +or queue. As seen in the above example, two parallel RPOP operations +performed by two different Active-Active database instances can get the same element in +the case of a concurrent operation. Lists in Active-Active databases guarantee that each +element is POP-ed at least once, but cannot guarantee that each +element is POP-ed only once. Such behavior should be taken into +account when, for example, using Lists in Active-Active databases as building blocks for +inter-process communication systems. + +In that case, if the same element cannot be handled twice by the +applications, it's recommended that the POP operations be performed by +one Active-Active database instance, whereas the PUSH operations can be performed by +multiple instances. diff --git a/content/operate/rs/7.4/databases/active-active/develop/data-types/sets.md b/content/operate/rs/7.4/databases/active-active/develop/data-types/sets.md new file mode 100644 index 0000000000..a2964ed38c --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/develop/data-types/sets.md @@ -0,0 +1,48 @@ +--- +Title: Sets in Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Information about using sets with an Active-Active database. +linkTitle: Sets +weight: $weight +url: '/operate/rs/7.4/databases/active-active/develop/data-types/sets/' +--- +A Redis set is an unordered collection of strings. It is possible to +add, remove, and test for the existence of members with Redis commands. +A Redis set maintains a unique collection of elements. Sets can be great +for maintaining a list of events (click streams), users (in a group +conversation), products (in recommendation lists), engagements (likes, +shares) and so on. + +Sets in Active-Active databases behave the same and maintain additional metadata to +achieve an "OR-Set" behavior to handle concurrent conflicting +writes. With the OR-Set behavior, writes across multiple Active-Active database instances +are typically unioned except in cases of conflicts. Conflicting instance +writes can happen when a Active-Active database instance deletes an element while the +other adds the same element. In this case and observed remove rule is +followed. That is, remove can only remove instances it has already seen +and in all other cases element add wins. + +Here is an example of an "add wins" case: + +| **Time** | **CRDB Instance1** | **CRDB Instance2** | +| ------: | :------: | :------: | +| t1 | SADD key1 “a” | | +| t2 | | SADD key1 “b” | +| t3 | SMEMBERS key1 “a” | SMEMBERS key1 “b” | +| t4 | — Sync — | — Sync — | +| t3 | SMEMBERS key1 “a” “b” | SMEMBERS key1 “a” “b” | + +Here is an example of an "observed remove" case. + +| **Time** | **CRDB Instance1** | **CRDB Instance2** | +| ------: | :------: | :------: | +| t1 | SMEMBERS key1 “a” “b” | SMEMBERS key1 “a” “b” | +| t2 | SREM key1 “a” | SADD key1 “c” | +| t3 | SREM key1 “c” | | +| t4 | — Sync — | — Sync — | +| t3 | SMEMBERS key1 “c” “b” | SMEMBERS key1 “c” “b” | diff --git a/content/operate/rs/7.4/databases/active-active/develop/data-types/sorted-sets.md b/content/operate/rs/7.4/databases/active-active/develop/data-types/sorted-sets.md new file mode 100644 index 0000000000..7e23fb39d6 --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/develop/data-types/sorted-sets.md @@ -0,0 +1,136 @@ +--- +Title: Sorted sets in Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Information about using sorted sets with an Active-Active database. +linkTitle: Sorted sets +weight: $weight +url: '/operate/rs/7.4/databases/active-active/develop/data-types/sorted-sets/' +--- +{{< note >}} +[Redis Geospatial (Geo)]({{< relref "/commands/GEOADD" >}}) is based on Sorted Sets, so the same Active-Active database development instructions apply to Geo. +{{< /note >}} + +Similar to Redis Sets, Redis Sorted Sets are non-repeating collections +of Strings. The difference between the two is that every member of a +Sorted Set is associated with a score used to order the Sorted Set from +lowest to highest. While members are unique, they may have the same +score. + +With Sorted Sets, you can quickly add, remove or update elements as +well as get ranges by score or by rank (position). Sorted Sets in Active-Active databases +behave the same and maintain additional metadata to handle concurrent +conflicting writes. Conflict resolution is done in two +phases: + +1. First, the database resolves conflict at the set level using "OR + Set" (Observed-Remove Set). With OR-Set behavior, writes across + multiple Active-Active database instances are typically unioned except in cases of + conflicts. Conflicting writes can happen when an Active-Active database instance + deletes an element while the other adds or updates the same element. + In this case, an observed Remove rule is followed, and only + instances it has already seen are removed. In all other cases, the + Add / Update element wins. +1. Second, the database resolves conflict at the score level. In this + case, the score is treated as a counter and applies the same + conflict resolution as regular counters. + +See the following examples to get familiar with Sorted Sets' +behavior in Active-Active database: + +Example of Simple Sorted Set with No +Conflict: + +| **Time** | **CRDB Instance 1** | **CRDB Instance 2** | +| ------: | :------: | :------: | +| t1 | ZADD Z 1.1 x | | +| t2 | — Sync — | — Sync — | +| t3 | | ZADD Z 1.2 y | +| t4 | — Sync — | — Sync — | +| t5 | ZRANGE Z 0 -1 => x y | ZRANGE Z 0 -1 => x y | + +**Explanation**: +When adding two different elements to a Sorted Set from different +replicas (in this example, x with score 1.1 was added by Instance 1 to +Sorted Set Z, and y with score 1.2 was added by Instance 2 to Sorted Set +Z) in a non-concurrent manner (i.e. each operation happened separately +and after both instances were in sync), the end result is a Sorted +Set including both elements in each Active-Active database instance. +Example of Sorted Set and Concurrent +Add: + +| **Time** | **CRDB Instance 1** | **CRDB Instance 2** | +| ------: | :------: | :------: | +| t1 | ZADD Z 1.1 x | | +| t2 | | ZADD Z 2.1 x | +| t3 | ZSCORE Z x => 1.1 | ZSCORE Z x => 2.1 | +| t4 | — Sync — | — Sync — | +| t5 | ZSCORE Z x => 2.1 | ZSCORE Z x => 2.1 | + +**Explanation**: +When concurrently adding an element x to a Sorted Set Z by two different +Active-Active database instances (Instance 1 added score 1.1 and Instance 2 added score +2.1), the Active-Active database implements Last Write Win (LWW) to determine the score of +x. In this scenario, Instance 2 performed the ZADD operation at time +t2\>t1 and therefore the Active-Active database sets the score 2.1 to +x. + +Example of Sorted Set with Concurrent Add Happening at the Exact Same +Time: + +| **Time** | **CRDB Instance 1** | **CRDB Instance 2** | +| ------: | :------: | :------: | +| t1 | ZADD Z 1.1 x | ZADD Z 2.1 x | +| t2 | ZSCORE Z x => 1.1 | ZSCORE Z x => 2.1 | +| t3 | — Sync — | — Sync — | +| t4 | ZSCORE Z x => 1.1 | ZSCORE Z x => 1.1 | + +**Explanation**: +The example above shows a relatively rare situation, in which two Active-Active database +instances concurrently added the same element x to a Sorted Set at the +same exact time but with a different score, i.e. Instance 1 added x with +a 1.1 score and Instance 2 added x with a 2.1 score. After syncing, the +Active-Active database realized that both operations happened at the same time and +resolved the conflict by arbitrarily (but consistently across all Active-Active database +instances) giving precedence to Instance 1. +Example of Sorted Set with Concurrent Counter +Increment: + +| **Time** | **CRDB Instance 1** | **CRDB Instance 2** | +| ------: | :------: | :------: | +| t1 | ZADD Z 1.1 x | | +| t2 | — Sync — | — Sync — | +| t3 | ZINCRBY Z 1.0 x | ZINCRBY Z 1.0 x | +| t4 | — Sync — | — Sync — | +| t5 | ZSCORE Z x => 3.1 | ZSCORE Z x => 3.1 | + +**Explanation**: +The result is the sum of all +ZINCRBY +operations performed by all Active-Active database instances. + +Example of Removing an Element from a Sorted +Set: + +| **Time** | **CRDB Instance 1** | **CRDB Instance 2** | +| ------: | :------: | :------: | +| t1 | ZADD Z 4.1 x | | +| t2 | — Sync — | — Sync — | +| t3 | ZSCORE Z x => 4.1 | ZSCORE Z x => 4.1 | +| t4 | ZREM Z x | ZINCRBY Z 2.0 x | +| t5 | ZSCORE Z x => nill | ZSCORE Z x => 6.1 | +| t6 | — Sync — | — Sync — | +| t7 | ZSCORE Z x => 2.0 | ZSCORE Z x => 2.0 | + +**Explanation**: +At t4 - t5, concurrent ZREM and ZINCRBY operations ran on Instance 1 +and Instance 2 respectively. Before the instances were in sync, the ZREM +operation could only delete what had been seen by Instance 1, so +Instance 2 was not affected. Therefore, the ZSCORE operation shows the +local effect on x. At t7, after both instances were in-sync, the Active-Active database +resolved the conflict by subtracting 4.1 (the value of element x in +Instance 1) from 6.1 (the value of element x in Instance 2). diff --git a/content/operate/rs/7.4/databases/active-active/develop/data-types/streams.md b/content/operate/rs/7.4/databases/active-active/develop/data-types/streams.md new file mode 100644 index 0000000000..fc0260bbda --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/develop/data-types/streams.md @@ -0,0 +1,326 @@ +--- +Title: Streams in Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Information about using streams with an Active-Active database. +linkTitle: Streams +weight: $weight +url: '/operate/rs/7.4/databases/active-active/develop/data-types/streams/' +--- +A [Redis Stream]({{< relref "/develop/data-types/streams" >}}) is a data structure that acts like an append-only log. +Each stream entry consists of: + +- A unique, monotonically increasing ID +- A payload consisting of a series key-value pairs + +You add entries to a stream with the XADD command. You access stream entries using the XRANGE, XREADGROUP, and XREAD commands (however, see the caveat about XREAD below). + +## Streams and Active-Active + +Active-Active databases allow you to write to the same logical stream from more than one region. +Streams are synchronized across the regions of an Active-Active database. + +In the example below, we write to a stream concurrently from two regions. Notice that after syncing, both regions have identical streams: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TimeRegion 1Region 2
t1XADD messages * text helloXADD messages * text goodbye
t2XRANGE messages - +
→ [1589929244828-1]
XRANGE messages - +
→ [1589929246795-2]
t3— Sync —— Sync —
t4XRANGE messages - +
→ [1589929244828-1, 1589929246795-2]
XRANGE messages - +
→ [1589929244828-1, 1589929246795-2]
+ +Notice also that the synchronized streams contain no duplicate IDs. As long as you allow the database to generate your stream IDs, you'll never have more than one stream entry with the same ID. + +{{< note >}} +Redis Community Edition uses one radix tree (referred to as `rax` in the code base) to implement each stream. However, Active-Active databases implement a single logical stream using one `rax` per region. +Each region adds entries only to its associated `rax` (but can remove entries from all `rax` trees). +This means that XREAD and XREADGROUP iterate simultaneously over all `rax` trees and return the appropriate entry by comparing the entry IDs from each `rax`. +{{< /note >}} + +### Conflict resolution + +Active-Active databases use an "observed-remove" approach to automatically resolve potential conflicts. + +With this approach, a delete only affects the locally observable data. + +In the example below, a stream, `x`, is created at _t1_. At _t3_, the stream exists in two regions. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TimeRegion 1Region 2
t1XADD messages * text hello
t2— Sync —— Sync —
t3XRANGE messages - +
→ [1589929244828-1]
XRANGE messages - +
→ [1589929244828-1]
t4DEL messagesXADD messages * text goodbye
t5— Sync —— Sync —
t6XRANGE messages - +
→ [1589929246795-2]
XRANGE messages - +
→ [1589929246795-2]
+ +At _t4_, the stream is deleted from Region 1. At the same time, an entry with ID ending in `3700` is added to the same stream at Region 2. After the sync, at _t6_, the entry with ID ending in `3700` exists in both regions. This is because that entry was not visible when the local stream was deleted at _t4_. + +### ID generation modes + +Usually, you should allow Redis streams generate its own stream entry IDs. You do this by specifying `*` as the ID in calls to XADD. However, you _can_ provide your own custom ID when adding entries to a stream. + +Because Active-Active databases replicate asynchronously, providing your own IDs can create streams with duplicate IDs. This can occur when you write to the same stream from multiple regions. + +| Time | Region 1 | Region 2 | +| ---- | ------------------------------- | ------------------------------- | +| _t1_ | `XADD x 100-1 f1 v1` | `XADD x 100-1 f1 v1` | +| _t2_ | _— Sync —_ | _— Sync —_ | +| _t3_ | `XRANGE x - +`
**→ [100-1, 100-1]** | `XRANGE x - +`
**→ [100-1, 100-1]** | + +In this scenario, two entries with the ID `100-1` are added at _t1_. After syncing, the stream `x` contains two entries with the same ID. + +{{< note >}} +Stream IDs in Redis Community Edition consist of two integers separated by a dash ('-'). When the server generates the ID, the first integer is the current time in milliseconds, and the second integer is a sequence number. So, the format for stream IDs is MS-SEQ. +{{< /note >}} + +To prevent duplicate IDs and to comply with the original Redis streams design, Active-Active databases provide three ID modes for XADD: + +1. **Strict**: In _strict_ mode, XADD allows server-generated IDs (using the '`*`' ID specifier) or IDs consisting only of the millisecond (MS) portion. When the millisecond portion of the ID is provided, the ID's sequence number is calculated using the database's region ID. This prevents duplicate IDs in the stream. Strict mode rejects full IDs (that is, IDs containing both milliseconds and a sequence number). +1. **Semi-strict**: _Semi-strict_ mode is just like _strict_ mode except that it allows full IDs (MS-SEQ). Because it allows full IDs, duplicate IDs are possible in this mode. +1. **Liberal**: XADD allows any monotonically ascending ID. When given the millisecond portion of the ID, the sequence number will be set to `0`. This mode may also lead to duplicate IDs. + +The default and recommended mode is _strict_, which prevents duplicate IDs. + +{{% warning %}} +Why do you want to prevent duplicate IDs? First, XDEL, XCLAIM, and other commands can affect more than one entry when duplicate IDs are present in a stream. Second, duplicate entries may be removed if a database is exported or renamed. +{{% /warning %}} + +To change XADD's ID generation mode, use the `rladmin` command-line utility: + +Set _strict_ mode: +```sh +rladmin tune db crdb crdt_xadd_id_uniqueness_mode strict +``` + +Set _semi-strict_ mode: +```sh +rladmin tune db crdb crdt_xadd_id_uniqueness_mode semi-strict +``` + +Set _liberal_ mode: +```sh +rladmin tune db crdb crdt_xadd_id_uniqueness_mode liberal +``` + +### Iterating a stream with XREAD + +In Redis Community Edition and in non-Active-Active databases, you can use XREAD to iterate over the entries in a Redis Stream. However, with an Active-Active database, XREAD may skip entries. This can happen when multiple regions write to the same stream. + +In the example below, XREAD skips entry `115-2`. + +| Time | Region 1 | Region 2 | +| ---- | -------------------------------------------------- | -------------------------------------------------- | +| _t1_ | `XADD x 110 f1 v1` | `XADD x 115 f1 v1` | +| _t2_ | `XADD x 120 f1 v1` | | +| _t3_ | `XADD x 130 f1 v1` | | +| _t4_ | `XREAD COUNT 2 STREAMS x 0`
**→ [110-1, 120-1]** | | +| _t5_ | _— Sync —_ | _— Sync —_ | +| _t6_ | `XREAD COUNT 2 STREAMS x 120-1`
**→ [130-1]** | | +| _t7_ | `XREAD STREAMS x 0`
**→[110-1, 115-2, 120-1, 130-1]** | `XREAD STREAMS x 0`
**→[110-1, 115-2, 120-1, 130-1]** | + + +You can use XREAD to reliably consume a stream only if all writes to the stream originate from a single region. Otherwise, you should use XREADGROUP, which always guarantees reliable stream consumption. + +## Consumer groups + +Active-Active databases fully support consumer groups with Redis Streams. Here is an example of creating two consumer groups concurrently: + +| Time | Region 1 | Region 2 | +| ---- | --------------------------- | --------------------------- | +| _t1_ | `XGROUP CREATE x group1 0` | `XGROUP CREATE x group2 0` | +| _t2_ | `XINFO GROUPS x`
**→ [group1]** | `XINFO GROUPS x`
**→ [group2]** | +| _t3_ | _— Sync —_ | — Sync — | +| _t4_ | `XINFO GROUPS x`
**→ [group1, group2]** | `XINFO GROUPS x`
**→ [group1, group2]** | + + +{{< note >}} +Redis Community Edition uses one radix tree (`rax`) to hold the global pending entries list and another `rax` for each consumer's PEL. +The global PEL is a unification of all consumer PELs, which are disjoint. + +An Active-Active database stream maintains a global PEL and a per-consumer PEL for each region. + +When given an ID different from the special ">" ID, XREADGROUP iterates simultaneously over all of the PELs for all consumers. +It returns the next entry by comparing entry IDs from the different PELs. +{{< /note >}} + +### Conflict resolution + +The "delete wins" approach is a way to automatically resolve conflicts with consumer groups. +In case of concurrent consumer group operations, a delete will "win" over other concurrent operations on the same group. + +In this example, the DEL at _t4_ deletes both the observed `group1` and the non-observed `group2`: + +| Time | Region 1 | Region 2 | +| ---- | ----------------------- | ----------------------- | +| _t1_ | `XGROUP CREATE x group1 0` | | +| _t2_ | _— Sync —_ | _— Sync —_ | +| _t3_ | `XINFO GROUPS x`
**→ [group1]** | `XINFO GROUPS x`
**→ [group1]** | +| _t4_ | `DEL x` | `XGROUP CREATE x group2 0` | +| _t5_ | _— Sync —_ | _— Sync —_ | +| _t6_ | `EXISTS x`
**→ 0** | `EXISTS x`
**→ 0** | + +In this example, the XGROUP DESTROY at _t4_ affects both the observed `group1` created in Region 1 and the non-observed `group1` created in Region 3: + +| time | Region 1 | Region 2 | Region 3 | +| ---- | ----------------------- | ----------------------- | --------------------- | +| _t1_ | `XGROUP CREATE x group1 0` | | | +| _t2_ | _— Sync —_ | _— Sync —_ | | +| _t3_ | `XINFO GROUPS x`
**→ [group1]** | `XINFO GROUPS x`
**→ [group1]** | `XINFO GROUPS x`
**→ []** | +| _t4_ | | `XGROUP DESTROY x group1` | `XGROUP CREATE x group1 0` | +| _t5_ | _— Sync —_ | _— Sync — | — Sync — | +| _t6_ | `EXISTS x`
**→ 0** | `EXISTS x`
**→ 0** | `EXISTS x`
**→ 0** | + +### Group replication + +Calls to XREADGROUP and XACK change the state of a consumer group or consumer. However, it's not efficient to replicate every change to a consumer or consumer group. + +To maintain consumer groups in Active-Active databases with optimal performance: + +1. Group existence (CREATE/DESTROY) is replicated. +1. Most XACK operations are replicated. +1. Other operations, such as XGROUP, SETID, DELCONSUMER, are not replicated. + +For example: + +| Time | Region 1 | Region 2 | +| ---- | ------------------------------------------------- | ------------------------ | +| _t1_ | `XADD messages 110 text hello` | | +| _t2_ | `XGROUP CREATE messages group1 0` | | +| _t3_ | `XREADGROUP GROUP group1 Alice STREAMS messages >`
**→ [110-1]** | | +| _t4_ | _— Sync —_ | _— Sync —_ | +| _t5_ | `XRANGE messages - +`
**→ [110-1]** | XRANGE messages - +
**→ [110-1]** | +| _t6_ | `XINFO GROUPS messages`
**→ [group1]** | XINFO GROUPS messages
**→ [group1]** | +| _t7_ | `XINFO CONSUMERS messages group1`
**→ [Alice]** | XINFO CONSUMERS messages group1
**→ []** | +| _t8_ | `XPENDING messages group1 - + 1`
**→ [110-1]** | XPENDING messages group1 - + 1
**→ []** | + +Using XREADGROUP across regions can result in regions reading the same entries. +This is due to the fact that Active-Active Streams is designed for at-least-once reads or a single consumer. +As shown in the previous example, Region 2 is not aware of any consumer group activity, so redirecting the XREADGROUP traffic from Region 1 to Region 2 results in reading entries that have already been read. + +### Replication performance optimizations + +Consumers acknowledge messages using the XACK command. Each ack effectively records the last consumed message. This can result in a lot of cross-region traffic. To reduce this traffic, we replicate XACK messages only when all of the read entries are acknowledged. + +| Time | Region 1 | Region 2 | Explanation | +| ---- | --------------------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------- | +| _t1_ | `XADD x 110-0 f1 v1` | | | +| _t2_ | `XADD x 120-0 f1 v1` | | | +| _t3_ | `XADD x 130-0 f1 v1` | | | +| _t4_ | `XGROUP CREATE x group1 0` | | | +| _t5_ | `XREADGROUP GROUP group1 Alice STREAMS x >`
**→ [110-0, 120-0, 130-0]** | | | +| _t6_ | `XACK x group1 110-0` | | | +| _t7_ | _— Sync —_ | _— Sync —_ | 110-0 and its preceding entries (none) were acknowledged. We replicate an XACK effect for 110-0. | +| _t8_ | `XACK x group1 130-0` | | | +| _t9_ | _— Sync —_ | _— Sync —_ | 130-0 was acknowledged, but not its preceding entries (120-0). We DO NOT replicate an XACK effect for 130-0 | +| _t10_ | `XACK x group1 120-0` | | | +| _t11_ | _— Sync —_ | _— Sync —_ | 120-0 and its preceding entries (110-0 through 130-0) were acknowledged. We replicate an XACK effect for 130-0. | + +In this scenario, if we redirect the XREADGROUP traffic from Region 1 to Region 2 we do not re-read entries 110-0, 120-0 and 130-0. +This means that the XREADGROUP does not return already-acknowledged entries. + +### Guarantees + +Unlike XREAD, XREADGOUP will never skip stream entries. +In traffic redirection, XREADGROUP may return entries that have been read but not acknowledged. It may also even return entries that have already been acknowledged. + +## Summary + +With Active-Active streams, you can write to the same logical stream from multiple regions. As a result, the behavior of Active-Active streams differs somewhat from the behavior you get with Redis Community Edition. This is summarized below: + +### Stream commands + +1. When using the _strict_ ID generation mode, XADD does not permit full stream entry IDs (that is, an ID containing both MS and SEQ). +1. XREAD may skip entries when iterating a stream that is concurrently written to from more than one region. For reliable stream iteration, use XREADGROUP instead. +1. XSETID fails when the new ID is less than current ID. + +### Consumer group notes + +The following consumer group operations are replicated: + +1. Consecutive XACK operations +1. Consumer group creation and deletion (that is, XGROUP CREATE and XGROUP DESTROY) + +All other consumer group metadata is not replicated. + +A few other notes: + +1. XGROUP SETID and DELCONSUMER are not replicated. +1. Consumers exist locally (XREADGROUP creates a consumer implicitly). +1. Renaming a stream (using RENAME) deletes all consumer group information. diff --git a/content/operate/rs/7.4/databases/active-active/develop/data-types/strings.md b/content/operate/rs/7.4/databases/active-active/develop/data-types/strings.md new file mode 100644 index 0000000000..f347262fe5 --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/develop/data-types/strings.md @@ -0,0 +1,73 @@ +--- +Title: Strings and bitfields in Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Information about using strings and bitfields with an Active-Active database. +linkTitle: Strings and bitfields +weight: $weight +url: '/operate/rs/7.4/databases/active-active/develop/data-types/strings/' +--- +Active-Active databases support both strings and bitfields. + +{{}} +Active-Active **bitfield** support was added in RS version 6.0.20. +{{}} + +Changes to both of these data structures will be replicated across Active-Active member databases. + +## Replication semantics + +Except in the case of [string counters]({{< relref "#string-counter-support" >}}) (see below), both strings and bitfields are replicated using a "last write wins" approach. The reason for this is that strings and bitfields are effectively binary objects. So, unlike with lists, sets, and hashes, the conflict resolution semantics of a given operation on a string or bitfield are undefined. + +### How "last write wins" works + +A wall-clock timestamp (OS time) is stored in the metadata of every string +and bitfield operation. If the replication syncer cannot determine the order of operations, +the value with the latest timestamp wins. This is the only case with Active-Active databases where OS time is used to resolve a conflict. + +Here's an example where an update happening to the same key at a later +time (t2) wins over the update at t1. + +| **Time** | **Region 1** | **Region 2** | +| :------: | :------: | :------: | +| t1 | SET text “a” | | +| t2 | | SET text “b” | +| t3 | — Sync — | — Sync — | +| t4 | SET text “c” | | +| t5 | — Sync — | — Sync — | +| t6 | | SET text “d” | + +### String counter support + +When you're using a string as counter (for instance, with the [INCR]({{< relref "/commands/incr" >}}) or [INCRBY]({{< relref "/commands/incrby" >}}) commands), +then conflicts will be resolved semantically. + +On conflicting writes, counters accumulate the total counter operations +across all member Active-Active databases in each sync. + +Here's an example of how counter +values works when synced between two member Active-Active databases. With +each sync, the counter value accumulates the private increment and +decrements of each site and maintain an accurate counter across +concurrent writes. + +| **Time** | **Region 1** | **Region 2** | +| :------: | :------: | :------: | +| t1 | INCRBY counter 7 | | +| t2 | | INCRBY counter 3 | +| t3 | GET counter
7 | GET counter
3 | +| t4 | — Sync — | — Sync — | +| t5 | GET counter
10 | GET counter
10 | +| t6 | DECRBY counter 3 | | +| t7 | | INCRBY counter 6 | +| t8 | — Sync — | — Sync — | +| t9 | GET counter
13 | GET counter
13 | + +{{< note >}} +Active-Active databases support 59-bit counters. +This limitation is to protect from overflowing a counter in a concurrent operation. +{{< /note >}} diff --git a/content/operate/rs/7.4/databases/active-active/develop/develop-for-aa.md b/content/operate/rs/7.4/databases/active-active/develop/develop-for-aa.md new file mode 100644 index 0000000000..0e730d69e4 --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/develop/develop-for-aa.md @@ -0,0 +1,201 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Overview of how developing applications differs for Active-Active databases + from standalone Redis databases. +linkTitle: Develop for Active-Active +title: Develop applications with Active-Active databases +weight: 10 +url: '/operate/rs/7.4/databases/active-active/develop/develop-for-aa/' +--- +Developing geo-distributed, multi-master applications can be difficult. +Application developers may have to understand a large number of race +conditions between updates to various sites, network, and cluster +failures that could reorder the events and change the outcome of the +updates performed across geo-distributed writes. + +Active-Active databases (formerly known as CRDB) are geo-distributed databases that span multiple Redis Enterprise Software (RS) clusters. +Active-Active databases depend on multi-master replication (MMR) and Conflict-free +Replicated Data Types (CRDTs) to power a simple development experience +for geo-distributed applications. Active-Active databases allow developers to use existing +Redis data types and commands, but understand the developers intent and +automatically handle conflicting concurrent writes to the same key +across multiple geographies. For example, developers can simply use the +INCR or INCRBY method in Redis in all instances of the geo-distributed +application, and Active-Active databases handle the additive nature of INCR to reflect the +correct final value. The following example displays a sequence of events +over time : t1 to t9. This Active-Active database has two member Active-Active databases : member CRDB1 and +member CRDB2. The local operations executing in each member Active-Active database is +listed under the member Active-Active database name. The "Sync" even represent the moment +where synchronization catches up to distribute all local member Active-Active database +updates to other participating clusters and other member Active-Active databases. + +| **Time** | **Member CRDB1** | **Member CRDB2** | +| :------: | :------: | :------: | +| t1 | INCRBY key1 7 | | +| t2 | | INCRBY key1 3 | +| t3 | GET key1
7 | GET key1
3 | +| t4 | — Sync — | — Sync — | +| t5 | GET key1
10 | GET key1
10 | +| t6 | DECRBY key1 3 | | +| t7 | | INCRBY key1 6 | +| t8 | — Sync — | — Sync — | +| t9 | GET key1
13 | GET key1
13 | + +Databases provide various approaches to address some of these concerns: + +- Active-Passive Geo-distributed deployments: With active-passive + distributions, all writes go to an active cluster. Redis Enterprise + provides a "Replica Of" capability that provides a similar approach. + This can be employed when the workload is heavily balanced towards + read and few writes. However, WAN performance and availability + is quite flaky and traveling large distances for writes take away + from application performance and availability. +- Two-phase Commit (2PC): This approach is designed around a protocol + that commits a transaction across multiple transaction managers. + Two-phase commit provides a consistent transactional write across + regions but fails transactions unless all participating transaction + managers are "available" at the time of the transaction. The number + of messages exchanged and its cross-regional availability + requirement make two-phase commit unsuitable for even moderate + throughputs and cross-geo writes that go over WANs. +- Sync update with Quorum-based writes: This approach synchronously + coordinates a write across majority number of replicas across + clusters spanning multiple regions. However, just like two-phase + commit, number of messages exchanged and its cross-regional + availability requirement make geo-distributed quorum writes + unsuitable for moderate throughputs and cross geo writes that go + over WANs. +- Last-Writer-Wins (LWW) Conflict Resolution: Some systems provide + simplistic conflict resolution for all types of writes where the + system clocks are used to determine the winner across conflicting + writes. LWW is lightweight and can be suitable for simpler data. + However, LWW can be destructive to updates that are not necessarily + conflicting. For example adding a new element to a set across two + geographies concurrently would result in only one of these new + elements appearing in the final result with LWW. +- MVCC (multi-version concurrency control): MVCC systems maintain + multiple versions of data and may expose ways for applications to + resolve conflicts. Even though MVCC system can provide a flexible + way to resolve conflicting writes, it comes at a cost of great + complexity in the development of a solution. + +Even though types and commands in Active-Active databases look identical to standard Redis +types and commands, the underlying types in RS are enhanced to maintain +more metadata to create the conflict-free data type experience. This +section explains what you need to know about developing with Active-Active databases on +Redis Enterprise Software. + +## Lua scripts + +Active-Active databases support Lua scripts, but unlike standard Redis, Lua scripts always +execute in effects replication mode. There is currently no way to +execute them in script-replication mode. + +## Eviction + +The default policy for Active-Active databases is _noeviction_ mode. Redis Enterprise version 6.0.20 and later support all eviction policies for Active-Active databases, unless [Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering" >}})(previously known as Redis on Flash) is enabled. +For details, see [eviction for Active-Active databases]({{< relref "/operate/rs/databases/memory-performance/eviction-policy#active-active-database-eviction" >}}). + + +## Expiration + +Expiration is supported with special multi-master semantics. + +If a key's expiration time is changed at the same time on different +members of the Active-Active database, the longer extended time set via TTL on a key is +preserved. As an example: + +If this command was performed on key1 on cluster #1 + +```sh +127.0.0.1:6379> EXPIRE key1 10 +``` + +And if this command was performed on key1 on cluster #2 + +```sh +127.0.0.1:6379> EXPIRE key1 50 +``` + +The EXPIRE command setting the key to 50 would win. + +And if this command was performed on key1 on cluster #3: + +```sh +127.0.0.1:6379> PERSIST key1 +``` + +It would win out of the three clusters hosting the Active-Active database as it sets the +TTL on key1 to an infinite time. + +The replica responsible for the "winning" expire value is also +responsible to expire the key and propagate a DEL effect when this +happens. A "losing" replica is from this point on not responsible +for expiring the key, unless another EXPIRE command resets the TTL. +Furthermore, a replica that is NOT the "owner" of the expired value: + +- Silently ignores the key if a user attempts to access it in READ + mode, e.g. treating it as if it was expired but not propagating a + DEL. +- Expires it (sending a DEL) before making any modifications if a user + attempts to access it in WRITE mode. + + {{< note >}} +Expiration values are in the range of [0, 2^49] for Active-Active databases and [0, 2^64] for non Active-Active databases. + {{< /note >}} + +## Out-of-Memory (OOM) {#outofmemory-oom} + +If a member Active-Active database is in an out of memory situation, that member is marked +"inconsistent" by RS, the member stops responding to user traffic, and +the syncer initiates full reconciliation with other peers in the Active-Active database. + +## Active-Active Database Key Counts + +Keys are counted differently for Active-Active databases: + +- DBSIZE (in `shard-cli dbsize`) reports key header instances + that represent multiple potential values of a key before a replication conflict is resolved. +- expired_keys (in `bdb-cli info`) can be more than the keys count in DBSIZE (in `shard-cli dbsize`) + because expires are not always removed when a key becomes a tombstone. + A tombstone is a key that is logically deleted but still takes memory + until it is collected by the garbage collector. +- The Expires average TTL (in `bdb-cli info`) is computed for local expires only. + +## INFO + +The INFO command has an additional crdt section which provides advanced +troubleshooting information (applicable to support etc.): + +| **Section** | **Field** | **Description** | +| ------ | ------ | ------ | +| **CRDT Context** | crdt_config_version | Currently active Active-Active database configuration version. | +| | crdt_slots | Hash slots assigned and reported by this shard. | +| | crdt_replid | Unique Replica/Shard IDs. | +| | crdt_clock | Clock value of local vector clock. | +| | crdt_ovc | Locally observed Active-Active database vector clock. | +| **Peers** | A list of currently connected Peer Replication peers. This is similar to the slaves list reported by Redis. | | +| **Backlogs** | A list of Peer Replication backlogs currently maintained. Typically in a full mesh topology only a single backlog is used for all peers, as the requested Ids are identical. | | +| **CRDT Stats** | crdt_sync_full | Number of inbound full synchronization processes performed. | +| | crdt_sync_partial_ok | Number of partial (backlog based) re-synchronization processes performed. | +| | crdt_sync_partial-err | Number of partial re-synchronization processes failed due to exhausted backlog. | +| | crdt_merge_reqs | Number of inbound merge requests processed. | +| | crdt_effect_reqs | Number of inbound effect requests processed. | +| | crdt_ovc_filtered_effect_reqs | Number of inbound effect requests filtered due to old vector clock. | +| | crdt_gc_pending | Number of elements pending garbage collection. | +| | crdt_gc_attempted | Number of attempts to garbage collect tombstones. | +| | crdt_gc_collected | Number of tombstones garbaged collected successfully. | +| | crdt_gc_gvc_min | The minimal globally observed vector clock, as computed locally from all received observed clocks. | +| | crdt_stale_released_with_merge | Indicates last stale flag transition was a result of a complete full sync. | +| **CRDT Replicas** | A list of crdt_replica \ entries, each describes the known state of a remote instance with the following fields: | | +| | config_version | Last configuration version reported. | +| | shards | Number of shards. | +| | slots | Total number of hash slots. | +| | slot_coverage | A flag indicating remote shards provide full coverage (i.e. all shards are alive). | +| | max_ops_lag | Number of local operations not yet observed by the least updated remote shard | +| | min_ops_lag | Number of local operations not yet observed by the most updated remote shard | diff --git a/content/operate/rs/7.4/databases/active-active/get-started.md b/content/operate/rs/7.4/databases/active-active/get-started.md new file mode 100644 index 0000000000..e1fbcd90ad --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/get-started.md @@ -0,0 +1,168 @@ +--- +Title: Get started with Redis Enterprise Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +description: Quick start guide to create an Active-Active database for test and development. +linktitle: Get started +weight: 20 +url: '/operate/rs/7.4/databases/active-active/get-started/' +--- + +To get started, this article will help you set up an Active-Active database, formerly known as CRDB (conflict-free replicated database), spanning across two Redis Enterprise Software +clusters for test and development environments. Here are the steps: + +1. Run two Redis Enterprise Software Docker containers. + +1. Set up each container as a cluster. + +1. Create a new Redis Enterprise Active-Active database. + +1. Test connectivity to the Active-Active database. + +To run an Active-Active database on installations from the [Redis Enterprise Software download package]({{< relref "/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart" >}}), +set up two Redis Enterprise Software installations and continue from Step 2. + +{{}} +This getting started guide is for development or demonstration environments. +For production environments, see [Create an Active-Active geo-replicated database]({{< relref "/operate/rs/databases/active-active/create" >}}) for instructions. +{{}} + +## Run two containers + +To spin up two Redis Enterprise Software containers, run these commands: + +```sh +docker run -d --cap-add sys_resource -h rs1_node1 --name rs1_node1 -p 8443:8443 -p 9443:9443 -p 12000:12000 redislabs/redis +``` + +```sh +docker run -d --cap-add sys_resource -h rs2_node1 --name rs2_node1 -p 8445:8443 -p 9445:9443 -p 12002:12000 redislabs/redis +``` + +The **-p** options map the Cluster Manager UI port (8443), REST API port (9443), and +database access port differently for each container to make sure that all +containers can be accessed from the host OS that is running the containers. + +## Set up two clusters + +1. For cluster 1, go to `https://localhost:8443` in a browser on the +host machine to access the Redis Enterprise Software Cluster Manager UI. + + {{}} +Depending on your browser, you may see a certificate error. Continue to the website. + {{}} + +1. Click **Create new cluster**: + + {{When you first install Redis Enterprise Software, you need to set up a cluster.}} + +1. Enter an email and password for the administrator account, then click **Next** to proceed to cluster setup: + + {{Set the credentials for your admin user.}} + +1. Enter your cluster license key if you have one. Otherwise, a trial version is installed. + + {{Enter your cluster license key if you have one.}} + +1. In the **Configuration** section of the **Cluster** settings page, enter a cluster FQDN, for example `cluster1.local`: + + {{Configure the cluster FQDN.}} + +1. On the node setup screen, keep the default settings and click **Create cluster**: + + {{Configure the node specific settings.}} + +1. Click **OK** to confirm that you are aware of the replacement of the HTTPS SSL/TLS + certificate on the node, and proceed through the browser warning. + +1. Repeat the previous steps for cluster 2 with these differences: + + - In your web browser, go to `https://localhost:8445` to set up the cluster 2. + + - For the **Cluster name (FQDN)**, enter a different name, such as `cluster2.local`. + +Now you have two Redis Enterprise Software clusters with FQDNs +`cluster1.local` and `cluster2.local`. + +{{}} +Each Active-Active instance must have a unique fully-qualified domain name (FQDN). +{{}} + +## Create an Active-Active database + +1. Sign in to cluster1.local's Cluster Manager UI at `https://localhost:8443` + +1. Open the **Create database** menu with one of the following methods: + + - Click the **+** button next to **Databases** in the navigation menu: + + {{Create database menu has two options: Single Region and Active-Active database.}} + + - Go to the **Databases** screen and select **Create database**: + + {{Create database menu has two options: Single Region and Active-Active database.}} + +1. Select **Active-Active database**. + +1. Enter the cluster's local admin credentials, then click **Save**: + + {{Enter the cluster's admin username and password.}} + +1. Add participating clusters that will host instances of the Active-Active database: + + 1. In the **Participating clusters** section, go to **Other participating clusters** and click **+ Add cluster**. + + 1. In the **Add cluster** configuration panel, enter the new cluster's URL, port number, and the admin username and password for the new participating cluster: + + In the **Other participating clusters** list, add the address and admin credentials for the other cluster: `https://cluster2.local:9443` + + {{Add cluster panel.}} + + 1. Click **Join cluster** to add the cluster to the list of participating clusters. + +1. Enter `database1` for **Database name** and `12000` for **Port**: + + {{Database name and port text boxes.}} + +1. Configure additional settings: + + 1. In the **High availability & durability** section, turn off **Replication** since each cluster has only one node in this setup: + + {{Turn off replication in the High availability & durability section.}} + + + 1. In the **Clustering** section, either: + + - Make sure that **Sharding** is enabled and select the number of shards you want to have in the database. When database clustering is enabled, + databases are subject to limitations on [Multi-key commands]({{< relref "/operate/rs/databases/durability-ha/clustering" >}}). + You can increase the number of shards in the database at any time. + + - Turn off **Sharding** to use only one shard and avoid [Multi-key command]({{< relref "/operate/rs/databases/durability-ha/clustering" >}}) limitations. + + {{< note >}} +You cannot enable or turn off database clustering after the Active-Active database is created. + {{< /note >}} + +1. Click **Create**. + + {{< note >}} +{{< embed-md "docker-memory-limitation.md" >}} + {{< /note >}} + +1. After the Active-Active database is created, sign in to the Cluster Manager UIs for cluster 1 at `https://localhost:8443` and cluster 2 at `https://localhost:8445`. + +1. Make sure each cluster has an Active-Active database member database with the name `database1`. + + In a real-world deployment, cluster 1 and cluster 2 would most likely be + in separate data centers in different regions. However, for + local testing we created the scale-minimized deployment using two + local clusters running on the same host. + + +## Test connection + +With the Redis database created, you are ready to connect to your +database. See [Connect to Active-Active databases]({{< relref "/operate/rs/databases/active-active/connect" >}}) for tutorials and examples of multiple connection methods. diff --git a/content/operate/rs/7.4/databases/active-active/manage.md b/content/operate/rs/7.4/databases/active-active/manage.md new file mode 100644 index 0000000000..c281b9236c --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/manage.md @@ -0,0 +1,113 @@ +--- +Title: Manage Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manage your Active-Active database settings. +linktitle: Manage +weight: 30 +url: '/operate/rs/7.4/databases/active-active/manage/' +--- + +You can configure and manage your Active-Active database from either the Cluster Manager UI or the command line. + +To change the global configuration of the Active-Active database, use [`crdb-cli`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}}). + +If you need to apply changes locally to one database instance, you use the Cluster Manager UI or [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}). + +## Database settings + +Many Active-Active database settings can be changed after database creation. One notable exception is database clustering. Database clustering can't be turned on or off after the database has been created. + +## Participating clusters + +You can add and remove participating clusters of an Active-Active database to change the topology. +To manage the changes to Active-Active topology, use [`crdb-cli`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli/" >}}) or the participating clusters list in the Cluster Manager UI. + +### Add participating clusters + +All existing participating clusters must be online and in a syncing state when you add new participating clusters. + +New participating clusters create the Active-Active database instance based on the global Active-Active database configuration. +After you add new participating clusters to an existing Active-Active database, +the new database instance can accept connections and read operations. +The new instance does not accept write operations until it is in the syncing state. + +{{}} +If an Active-Active database [runs on flash memory]({{}}), you cannot add participating clusters that run on RAM only. +{{}} + +To add a new participating cluster to an existing Active-Active configuration using the Cluster Manager UI: + +1. Select the Active-Active database from the **Databases** list and go to its **Configuration** screen. + +1. Click **Edit**. + +1. In the **Participating clusters** section, go to **Other participating clusters** and click **+ Add cluster**. + +1. In the **Add cluster** configuration panel, enter the new cluster's URL, port number, and the admin username and password for the new participating cluster: + + {{Add cluster panel.}} + +1. Click **Join cluster** to add the cluster to the list of participating clusters. + +1. Click **Save**. + + +### Remove participating clusters + +All existing participating clusters must be online and in a syncing state when you remove an online participating cluster. +If you must remove offline participating clusters, you can forcefully remove them. +If a forcefully removed participating cluster tries to rejoin the cluster, +its Active-Active database membership will be out of date. +The joined participating clusters reject updates sent from the removed participating cluster. +To prevent rejoin attempts, purge the forcefully removed instance from the participating cluster. + +To remove a participating cluster using the Cluster Manager UI: + +1. Select the Active-Active database from the **Databases** list and go to its **Configuration** screen. + +1. Click **Edit**. + +1. In the **Participating clusters** section, point to the cluster you want to delete in the **Other participating clusters** list: + + {{Edit and delete buttons appear when you point to an entry in the Other participating clusters list.}} + +1. Click {{< image filename="/images/rs/buttons/delete-button.png#no-click" alt="The Delete button" width="25px" class="inline" >}} to remove the cluster. + +1. Click **Save**. + +## Replication backlog + +Redis databases that use [replication for high availability]({{< relref "/operate/rs/databases/durability-ha/replication.md" >}}) maintain a replication backlog (per shard) to synchronize the primary and replica shards of a database. In addition to the database replication backlog, Active-Active databases maintain a backlog (per shard) to synchronize the database instances between clusters. + +By default, both the database and Active-Active replication backlogs are set to one percent (1%) of the database size divided by the number of shards. This can range between 1MB to 250MB per shard for each backlog. + +### Change the replication backlog size + +Use the [`crdb-cli`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}}) utility to control the size of the replication backlogs. You can set it to `auto` or set a specific size. + +Update the database replication backlog configuration with the `crdb-cli` command shown below. + +```text +crdb-cli crdb update --crdb-guid --default-db-config "{\"repl_backlog_size\": }" +``` + +Update the Active-Active (CRDT) replication backlog with the command shown below: + +```text +crdb-cli crdb update --crdb-guid --default-db-config "{\"crdt_repl_backlog_size\": }" +``` + +## Data persistence + +Active-Active supports AOF (Append-Only File) data persistence only. Snapshot persistence is _not_ supported for Active-Active databases and should not be used. + +If an Active-Active database is currently using snapshot data persistence, use `crdb-cli` to switch to AOF persistence: +```text + crdb-cli crdb update --crdb-guid --default-db-config '{"data_persistence": "aof", "aof_policy":"appendfsync-every-sec"}' +``` + + diff --git a/content/operate/rs/7.4/databases/active-active/planning.md b/content/operate/rs/7.4/databases/active-active/planning.md new file mode 100644 index 0000000000..517d429a91 --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/planning.md @@ -0,0 +1,90 @@ +--- +Title: Considerations for planning Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +description: Information about Active-Active database to take into consideration while + planning a deployment, such as compatibility, limitations, and special configuration +linktitle: Planning considerations +weight: 22 +url: '/operate/rs/7.4/databases/active-active/planning/' +--- + +In Redis Enterprise, Active-Active geo-distribution is based on [conflict-free replicated data type (CRDT) technology](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type). Compared to databases without geo-distribution, Active-Active databases have more complex replication and networking, as well as a different data type. + +Because of the complexities of Active-Active databases, there are special considerations to keep in mind while planning your Active-Active database. + +See [Active-Active Redis]({{< relref "/operate/rs/databases/active-active/" >}}) for more information about geo-distributed replication. For more info on other high availability features, see [Durability and high availability]({{< relref "/operate/rs/databases/durability-ha/" >}}). + +## Participating clusters + +You need at least [two participating clusters]({{< relref "/operate/rs/clusters/new-cluster-setup" >}}) for an Active-Active database. If your database requires more than ten participating clusters, contact Redis support. You can [add or remove participating clusters]({{< relref "/operate/rs/databases/active-active/manage#participating-clusters/" >}}) after database creation. + +{{}} +If an Active-Active database [runs on flash memory]({{}}), you cannot add participating clusters that run on RAM only. +{{}} + +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 `crdb-cli` command-line utility. + +## Memory limits + +Database memory limits define the maximum size of your database across all database replicas and [shards]({{< relref "/operate/rs/references/terminology.md#redis-instance-shard" >}}) on the cluster. Your memory limit also determines the number of shards. + +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. + +Factors to consider when sizing your database: + +- **dataset size**: you want your limit to be above your dataset size to leave room for overhead. +- **database throughput**: high throughput needs more shards, leading to a higher memory limit. +- [**modules**]({{< relref "/operate/oss_and_stack/stack-with-enterprise" >}}): using modules with your database can consume more memory. +- [**database clustering**]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}): enables you to spread your data into shards across multiple nodes (scale out). +- [**database replication**]({{< relref "/operate/rs/databases/durability-ha/replication.md" >}}): enabling replication doubles memory consumption +- [**Active-Active replication**]({{< relref "/operate/rs/databases/active-active/_index.md" >}}): 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. +- [**database replication backlog**]({{< relref "/operate/rs/databases/active-active/manage#replication-backlog/" >}}) for synchronization between shards. By default, this is set to 1% of the database size. +- [**Active-Active replication backlog**]({{< relref "/operate/rs/databases/active-active/manage.md" >}}) for synchronization between clusters. By default, this is set to 1% of the database size. + +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. + +For more information on memory limits, see [Memory and performance]({{< relref "/operate/rs/databases/memory-performance/" >}}) or [Database memory limits]({{< relref "/operate/rs/databases/memory-performance/memory-limit.md" >}}). + +## Networking + +Network requirements for Active-Active databases include: + +- A VPN between each network that hosts a cluster with an instance (if your database spans WAN). +- A network connection to [several ports](#network-ports) on each cluster from all nodes in all participating clusters. +- A [network time service](#network-time-service) running on each node in all clusters. + +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. + +### Network ports + +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 [Network port configurations]({{< relref "/operate/rs/networking/port-configurations.md" >}}) for more details. These ports should be allowed through firewalls that may be positioned between the clusters. + +### Network Time Service {#network-time-service} + +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. + +See [Synchronizing cluster node clocks]({{< relref "/operate/rs/clusters/configure/sync-clocks.md" >}}) for more information. + +## Redis modules {#redis-modules} + +Several Redis modules are compatible with Active-Active databases. Find the list of [compatible Redis modules]({{< relref "/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities" >}}). +{{< note >}} +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. +{{< /note >}} + +## Limitations + +Active-Active databases have the following limitations: + +- 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 [create a new Active-Active database]({{< relref "/operate/rs/databases/active-active/create.md" >}}) and [migrate the data]({{< relref "/operate/rs/databases/import-export/migrate-to-active-active.md" >}}). +- [Discovery service]({{< relref "/operate/rs/databases/durability-ha/discovery-service.md" >}}) is not supported with Active-Active databases. Active-Active databases require FQDNs or [mDNS]({{< relref "/operate/rs/networking/mdns.md" >}}). +- The `FLUSH` command is not supported from the CLI. To flush your database, use the API or Cluster Manager UI. +- The `UNLINK` command is a blocking command for all types of keys. +- Cross slot multi commands (such as `MSET`) are not supported with Active-Active databases. +- The hashing policy can't be changed after database creation. +- If an Active-Active database [runs on flash memory]({{}}), you cannot add participating clusters that run on RAM only. diff --git a/content/operate/rs/7.4/databases/active-active/syncer.md b/content/operate/rs/7.4/databases/active-active/syncer.md new file mode 100644 index 0000000000..c4e14a14ac --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/syncer.md @@ -0,0 +1,57 @@ +--- +Title: Syncer process +alwaysopen: false +categories: +- docs +- operate +- rs +description: Detailed information about the syncer process and its role in distributed + databases. +linktitle: Syncer process +weight: 90 +url: '/operate/rs/7.4/databases/active-active/syncer/' +--- + +## Syncer process + +Each node in a cluster containing an instance of an Active-Active database hosts a process called the syncer. +The syncer process: + +1. Connects to the proxy on another participating cluster +1. Reads data from that database instance +1. Writes the data to the local cluster's primary(master) shard + +Some replication capabilities are also included in [Redis Community Edition]({{< relref "/operate/oss_and_stack/management/replication" >}}). + +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. + + +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. + +Partial synchronization requires a backlog large enough to store the data operations until connection is restored. See [replication backlog]({{< relref "/operate/rs/databases/active-active/manage#replication-backlog" >}}) for more info on changing the replication backlog size. + +### Syncer in Active-Active replication + +In the case of an Active-Active database: + +- Multiple past replication IDs and offsets are stored to allow for multiple syncs +- The [Active-Active replication backlog]({{< relref "/operate/rs/databases/active-active/manage#replication-backlog" >}}) is also sent to the replica during a full sync. + +{{< warning >}} +Full sync triggers heavy data transfers between geo-replicated instances of an Active-Active database. +{{< /warning >}} + +An Active-Active database uses partial synchronization in the following situations: + +- Failover of primary shard to replica shard +- Restart or crash of replica shard that requires sync from primary +- Migrate replica shard to another node +- Migrate primary shard to another node as a replica using failover and replica migration +- Migrate primary shard and preserve roles using failover, replica migration, and second failover to return shard to primary + +{{< note >}} +Synchronization of data from the primary shard to the replica shard is always a full synchronization. +{{< /note >}} diff --git a/content/operate/rs/7.4/databases/active-active/synchronization-mode.md b/content/operate/rs/7.4/databases/active-active/synchronization-mode.md new file mode 100644 index 0000000000..98c312972d --- /dev/null +++ b/content/operate/rs/7.4/databases/active-active/synchronization-mode.md @@ -0,0 +1,80 @@ +--- +Title: Configure distributed synchronization +alwaysopen: false +categories: +- docs +- operate +- rs +description: How to configure distributed synchronization so that any available proxy + endpoint can manage synchronization traffic. +linktitle: Distributed synchronization +weight: 80 +url: '/operate/rs/7.4/databases/active-active/synchronization-mode/' +--- +Replicated databases, such as [Replica Of]({{< relref "/operate/rs/databases/import-export/replica-of/" >}}) and [Active-Active]({{< relref "/operate/rs/databases/active-active" >}}) databases, +use proxy endpoints to synchronize database changes with the databases on other participating clusters. + +To improve the throughput and lower the latency for synchronization traffic, +you can configure a replicated database to use distributed synchronization where any available proxy endpoint can manage synchronization traffic. + +Every database by default has one proxy endpoint that manages client and synchronization communication with the database shards, +and that proxy endpoint is used for database synchronization. +This is called centralized synchronization. + +To prepare a database to use distributed synchronization you must first make sure that the database [proxy policy]({{< relref "/operate/rs/databases/configure/proxy-policy.md" >}}) +is defined so that either each node has a proxy endpoint or each primary (master) shard has a proxy endpoint. +After you have multiple proxies for the database, +you can configure the database synchronization to use distributed synchronization. + +## Configure distributed synchronization + +{{< note >}} +You may use the database name in place of `db:` in the following `rladmin` commands. +{{< /note >}} + +To configure distributed synchronization: + +1. To check the proxy policy for the database, run: `rladmin status` + + The output of the status command shows the list of endpoints on the cluster and the proxy policy for the endpoint. + + ```sh + ENDPOINTS: + DB:ID NAME ID NODE ROLE SSL + db:1 db endpoint:1:1 node:1 all-master-shards No + ``` + + If the proxy policy (also known as a _role_) is `single`, configure the policy to `all-nodes` or `all-master-shards` according to your needs with the command: + + ```sh + rladmin bind db db: endpoint policy + ``` + +1. To configure the database to use distributed synchronization, run: + + ```sh + rladmin tune db db: syncer_mode distributed + ``` + + To change back to centralized synchronization, run: + + ```sh + rladmin tune db db: syncer_mode centralized + ``` + +## Verify database synchronization + +Use `rladmin` to verify a database synchronization role: + +```sh +rladmin info db db: +``` + +The current database role is reported as the `syncer_mode` value: + +```sh +$ rladmin info db db: +db: []: + // (Other settings removed) + syncer_mode: centralized +``` diff --git a/content/operate/rs/7.4/databases/auto-tiering/_index.md b/content/operate/rs/7.4/databases/auto-tiering/_index.md new file mode 100644 index 0000000000..31e96e440e --- /dev/null +++ b/content/operate/rs/7.4/databases/auto-tiering/_index.md @@ -0,0 +1,118 @@ +--- +Title: Auto Tiering +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Auto Tiering enables your data to span both RAM and dedicated flash memory. +hideListLinks: true +linktitle: Auto Tiering +weight: 50 +url: '/operate/rs/7.4/databases/auto-tiering/' +--- +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. + +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. + +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. + +Just like all-RAM databases, databases with Auto Tiering enabled are compatible with existing Redis applications. + +Auto Tiering is also supported on [Redis Cloud]({{< relref "/operate/rc/" >}}) and [Redis Enterprise Software for Kubernetes]({{< relref "/operate/rs/" >}}). + +## Use cases + +The benefits associated with Auto Tiering are dependent on the use case. + +Auto Tiering is ideal when your: + +- working set is significantly smaller than your dataset (high RAM hit rate) +- average key size is smaller than average value size (all key names are stored in RAM) +- most recent data is the most frequently used (high RAM hit rate) + +Auto Tiering is not recommended for: + +- Long key names (all key names are stored in RAM) +- Broad access patterns (any value could be pulled into RAM) +- Large working sets (working set is stored in RAM) +- Frequently moved data (moving to and from RAM too often can impact performance) + +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. + +## Where is my data? + +When using Auto Tiering, RAM storage holds: +- All keys (names) +- Key indexes +- Dictionaries +- Hot data (working set) + +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”. + +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. + +{{}} When using Auto Tiering with RediSearch, it’s important to note that RediSearch indexes are also stored in RAM.{{}} + +## RAM to Flash ratio + +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 <-> Flash). + +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%. + +## Flash memory + +Implementing Auto Tiering requires pre planning around memory and sizing. Considerations and requirements for Auto Tiering include: + +- Flash memory must be locally attached (as opposed to network attached storage (NAS) and storage area networks (SAN)). +- Flash memory must be dedicated to Auto Tiering and not shared with other parts of the database, such as durability, binaries, or persistence. +- For the best performance, the SSDs should be NVMe based, but SATA can also be used. +- 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 [write amplification](https://en.wikipedia.org/wiki/Write_amplification). + +{{}} The Redis Enterprise Software database persistent and ephemeral storage should be on different disks, either local or attached. {{}} + +Once these requirements are met, you can create and manage both databases with Auto Tiering enabled and +all-RAM databases in the same cluster. + +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. + +### Cloud environments + +When running in a cloud environment: + +- 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). +- Persistent database storage needs to be network attached (for example, AWS EBS for AWS). + +{{}} +We specifically recommend "[Storage Optimized I4i - High I/O Instances](https://aws.amazon.com/ec2/instance-types/#storage-optimized)" because of the performance of NVMe for flash memory. {{}} + +### On-premises environments + +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. + +On-premises environments support more deployment options than other environments such as: + +- Using Redis Stack features: + - [Search and query]({{< relref "/operate/oss_and_stack/stack-with-enterprise/search" >}}) + - [JSON]({{< relref "/operate/oss_and_stack/stack-with-enterprise/json" >}}) + - [Time series]({{< relref "/operate/oss_and_stack/stack-with-enterprise/timeseries" >}}) + - [Probabilistic data structures]({{< relref "/operate/oss_and_stack/stack-with-enterprise/bloom" >}}) + +{{}} Enabling Auto Tiering for Active-Active distributed databases requires validating and getting the Redis technical team's approval first . {{}} + +{{}} Auto Tiering is not supported running on network attached storage (NAS), storage area network (SAN), or with local HDD drives. {{}} + +## Next steps + +- [Auto Tiering metrics]({{< relref "/operate/rs/references/metrics/auto-tiering" >}}) +- [Auto Tiering quick start]({{< relref "/operate/rs/databases/auto-tiering/quickstart.md" >}}) + +- [Ephemeral and persistent storage]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage" >}}) +- [Hardware requirements]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/hardware-requirements.md" >}}) diff --git a/content/operate/rs/7.4/databases/auto-tiering/quickstart.md b/content/operate/rs/7.4/databases/auto-tiering/quickstart.md new file mode 100644 index 0000000000..f625d05492 --- /dev/null +++ b/content/operate/rs/7.4/databases/auto-tiering/quickstart.md @@ -0,0 +1,126 @@ +--- +Title: Auto Tiering quick start +alwaysopen: false +categories: +- docs +- operate +- rs +description: Get started with Auto Tiering quickly, creating a cluster and database + using flash storage. +linkTitle: Quick start +weight: 80 +url: '/operate/rs/7.4/databases/auto-tiering/quickstart/' +--- +This page guides you through a quick setup of [Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering/" >}}) with a single node for testing and demo purposes. + +For production environments, you can find more detailed installation instructions in the [install and setup]({{< relref "/operate/rs/installing-upgrading" >}}) section. + +The steps to set up a Redis Enterprise Software cluster using Auto Tiering +with a single node are: + +1. Install Redis Enterprise Software or run it in a Docker + container. +1. Set up a Redis Enterprise Software cluster with Auto Tiering. +1. Create a new database with Auto Tiering enabled. +1. Connect to your new database. + +## Install Redis Enterprise Software + +### Bare metal, VM, Cloud instance + +To install on bare metal, a virtual machine, or an instance: + +1. Download the binaries from the [Redis Enterprise download center](https://cloud.redis.io/#/sign-up/software?direct=true). + +1. Upload the binaries to a Linux-based operating system. + +1. Extract the image: + + ```sh + tar -vxf + ``` + +1. After the `tar` command completes, you can find a new `install.sh` script in the current directory: + + ```sh + sudo ./install.sh -y + ``` + +### Docker-based installation {#dockerbased-installation} + +For testing purposes, you can run a Redis Enterprise Software +Docker container on Windows, MacOS, and Linux. + +```sh +docker run -d --cap-add sys_resource --name rp -p 8443:8443 -p 12000:12000 redislabs/redis:latest +``` + +## Prepare and format flash memory + +After you [install Redis Enterprise Software](#install-redis-enterprise-software), use the `prepare_flash` script to prepare and format flash memory: + +```sh +sudo /opt/redislabs/sbin/prepare_flash.sh +``` + +This script finds unformatted disks and mounts them as RAID partitions in `/var/opt/redislabs/flash`. + +To verify the disk configuration, run: + +```sh +sudo lsblk +``` + +## Set up a cluster and enable Auto Tiering + +1. Direct your browser to `https://localhost:8443` on the host machine to +see the Redis Enterprise Software Cluster Manager UI. + + {{}} +Depending on your browser, you may see a certificate error. +Choose "continue to the website" to go to the setup screen. + {{}} + +1. Select **Create new cluster**. + +1. Set up account credentials for a cluster administrator, then select **Next** to proceed to cluster setup. + +1. Enter your cluster license key if you have one. Otherwise, the cluster uses the trial version. + +1. Provide a cluster FQDN such as `mycluster.local`, then select **Next**. + +1. In the **Storage configuration** section, turn on the **Enable flash storage** toggle. + +1. Select **Create cluster**. + +1. Select **OK** to confirm that you are aware of the replacement of the HTTPS TLS +certificate on the node, and proceed through the browser warning. + +## Create a database + +On the **Databases** screen: + +1. Select **Quick database**. + +1. Verify **Flash** is selected for **Runs on**. + + {{Create a quick database with Runs on Flash selected.}} + +1. Enter `12000` for the endpoint **Port** number. + +1. _(Optional)_ Select **Full options** to see available alerts. + +1. Select **Create**. + +You now have a database with Auto Tiering enabled! + +## Connect to your database + +You are ready to connect to your database to store data. See the [test connectivity]({{< relref "/operate/rs/databases/connect/test-client-connectivity.md" >}}) page to learn how to connect to your database. + +## Next steps + +If you want to generate load against the +database or add a bunch of data for cluster testing, see the [memtier_benchmark quick start]({{< relref "/operate/rs/clusters/optimize/memtier-benchmark.md" >}}) for help. + +To see the true performance and scale of Auto Tiering, you must tune your I/O path and set the flash path to the mounted path of SSD or NVMe flash memory as that is what it is designed to run on. For more information, see [Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering/" >}}). diff --git a/content/operate/rs/7.4/databases/auto-tiering/storage-engine.md b/content/operate/rs/7.4/databases/auto-tiering/storage-engine.md new file mode 100644 index 0000000000..7349b39928 --- /dev/null +++ b/content/operate/rs/7.4/databases/auto-tiering/storage-engine.md @@ -0,0 +1,67 @@ +--- +Title: Manage Auto Tiering storage engine +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manage the storage engine used for your database with auto tiering enabled. +linkTitle: Manage storage engine +weight: 100 +url: '/operate/rs/7.4/databases/auto-tiering/storage-engine/' +--- + +## Manage the storage engine + +Redis Enterprise Auto Tiering supports two storage engines: + +* [Speedb](https://www.speedb.io/) (default, recommended) +* [RocksDB](https://rocksdb.org/) + +{{}}Switching between storage engines requires guidance by Redis Support or your Account Manager.{{}} + +### Change the storage engine + +1. Change the cluster level configuration for default storage engine. + + * API: + + ``` sh + curl -k -u : -X PUT -H "Content-Type: application/json" -d '{"bigstore_driver":"speedb"}' https://localhost:9443/v1/cluster + ``` + + * CLI: + + ```sh + rladmin cluster config bigstore_driver {speedb | rocksdb} + ``` + +2. Restart the each database on the cluster one by one. + + ```sh + rladmin restart db { db: | } + ``` + +{{}} We recommend restarting your database at times with low usage and avoiding peak hours. For databases without persistence enabled, we also recommend using export to backup your database first.{{}} + +## Monitor the storage engine + +To get the current cluster level default storage engine run: + +* Use the `rladmin info cluster` command look for ‘bigstore_driver’. + +* Use the REST API: + + ```sh + curl -k -u : -X GET -H "Content-Type: application/json" https://localhost:9443/v1/cluster + ``` + +Versions of Redis Enterprise 7.2 and later provide a metric called `bdb_bigstore_shard_count` to help track the shard count per database, filtered by `bdb_id` and by storage engine as shown below: + + + ```sh + bdb_bigstore_shard_count{bdb="1",cluster="mycluster.local",driver="rocksdb"} 1.0 + bdb_bigstore_shard_count{bdb="1",cluster="mycluster.local",driver="speedb"} 2.0 + ``` + +For more about metrics for Redis Enterprise’s integration with Prometheus, see [Prometheus integration]({{< relref "/integrate/prometheus-with-redis-enterprise/prometheus-metrics-definitions" >}}). diff --git a/content/operate/rs/7.4/databases/configure/_index.md b/content/operate/rs/7.4/databases/configure/_index.md new file mode 100644 index 0000000000..ef8954ad57 --- /dev/null +++ b/content/operate/rs/7.4/databases/configure/_index.md @@ -0,0 +1,180 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: Configure settings specific to each database. +hideListLinks: true +linktitle: Configure +title: Configure database settings +toc: 'true' +weight: 20 +url: '/operate/rs/7.4/databases/configure/' +--- + +You can manage your Redis Enterprise Software databases with several tools: + +- [Cluster Manager UI](#edit-database-settings) (the web-based user interface) + +- Command-line tools: + + - [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) for standalone database configuration + + - [`crdb-cli`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}}) for Active-Active database configuration + + - [`redis-cli`]({{< relref "/develop/connect/cli" >}}) for Redis Community Edition configuration + +- [REST API]({{< relref "/operate/rs/references/rest-api/_index.md" >}}) + +## Edit database settings + +You can change the configuration of a Redis Enterprise Software database at any time. + +To edit the configuration of a database using the Cluster Manager UI: + +1. On the **Databases** screen, select the database you want to edit. + +1. From the **Configuration** tab, select **Edit**. + +1. Change any [configurable database settings](#config-settings). + + {{< note >}} +For [Active-Active database instances]({{< relref "/operate/rs/databases/active-active" >}}), most database settings only apply to the instance that you are editing. + {{< /note >}} + +1. Select **Save**. + +## Configuration settings {#config-settings} + +- **Database version** - Select the Redis version when you create a database. + +- **Name** - The database name requirements are: + + - Maximum of 63 characters + + - Only letters, numbers, or hyphens (-) are valid characters + + - Must start and end with a letter or digit + + - Case-sensitive + +- **Endpoint port number** - You can define the port number that clients use to connect to the database. Otherwise, a port is randomly selected. + + {{< note >}} +You cannot change the [port number]({{< relref "/operate/rs/networking/port-configurations.md" >}}) +after the database is created. + {{< /note >}} + +- **Memory limit** - [Database memory limits]({{< relref "/operate/rs/databases/memory-performance/memory-limit.md" >}}) include all database replicas and shards, including replica shards in database replication and database shards in database clustering. + + If the total size of the database in the cluster reaches the memory limit, the data eviction policy for the database is enforced. + + {{< note >}} +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%. + {{< /note >}} + +- [**Capabilities**]({{< relref "/operate/oss_and_stack/stack-with-enterprise" >}}) (previously **Modules**) - 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 [Redis Enterprise and Redis Stack feature compatibility +]({{< relref "/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities" >}}) for compatibility details. + + {{< note >}} +To use Redis Stack capabilities, enable them when you create a new database. +You cannot enable them after database creation. + {{< /note >}} + + To add capabilities to the database: + + 1. In the **Capabilities** section, select one or more capabilities. + + 1. To customize capabilities, select **Parameters** and enter the optional custom configuration. + + 1. Select **Done**. + +### High availability & durability + +- [**Replication**]({{< relref "/operate/rs/databases/durability-ha/replication.md" >}}) - We recommend you use intra-cluster replication to create replica shards for each database for high availability. + + If the cluster is configured to support [rack-zone awareness]({{< relref "/operate/rs/clusters/configure/rack-zone-awareness.md" >}}), you can also enable rack-zone awareness for the database. + +- [**Replica high availability**]({{< relref "/operate/rs/databases/configure/replica-ha" >}}) - Automatically migrates replica shards to an available node if a replica node fails or is promoted to primary. + +- [**Persistence**]({{< relref "/operate/rs/databases/configure/database-persistence.md" >}}) - 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. + +- [**Data eviction policy**]({{< relref "/operate/rs/databases/memory-performance/eviction-policy.md" >}}) - 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. + +### Clustering + +- **Sharding** - You can either: + - Turn on **Sharding** to enable [database clustering]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}) and select the number of database shards. + + When database clustering is enabled, databases are subject to limitations on [Multi-key commands]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}). + + You can increase the number of shards in the database at any time. + + You can accept the [standard hashing policy]({{< relref "/operate/rs/databases/durability-ha/clustering#standard-hashing-policy" >}}), which is compatible with Redis Community Edition, or define a [custom hashing policy]({{< relref "/operate/rs/databases/durability-ha/clustering#custom-hashing-policy" >}}) to define where keys are located in the clustered database. + + - Turn off **Sharding** to use only one shard so that you can use [Multi-key commands]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}) without the limitations. + +- [**OSS Cluster API**]({{< relref "/operate/rs/databases/configure/oss-cluster-api.md" >}}) - The OSS Cluster API configuration allows access to multiple endpoints for increased throughput. + + 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. + + When you enable the OSS Cluster API, shard placement changes to _Sparse_, and the database proxy policy changes to _All primary shards_ automatically. + + {{}} +You must use a client that supports the cluster API to connect to a database that has the cluster API enabled. + {{}} + +- [**Shards placement**]({{< relref "/operate/rs/databases/memory-performance/shard-placement-policy" >}}) - Determines how to distribute database shards across nodes in the cluster. + + - _Dense_ places shards on the smallest number of nodes. + + - _Sparse_ spreads shards across many nodes. + +- [**Database proxy**]({{< relref "/operate/rs/databases/configure/proxy-policy" >}}) - Determines the number and location of active proxies, which manage incoming database operation requests. + +### Replica Of + +With [**Replica Of**]({{< relref "/operate/rs/databases/import-export/replica-of/create.md" >}}), you can make the database a repository for keys from other databases. + +### Scheduled backup + +You can configure [periodic backups]({{< relref "/operate/rs/databases/import-export/schedule-backups" >}}) of the database, including the interval and backup location parameters. + +### Alerts + +Select [alerts]({{< relref "/operate/rs/clusters/monitoring#database-alerts" >}}) to show in the database status and configure their thresholds. + +You can also choose to [send alerts by email]({{< relref "/operate/rs/clusters/monitoring#send-alerts-by-email" >}}) to relevant users. + +### TLS + +You can require [**TLS**]({{< relref "/operate/rs/security/encryption/tls/" >}}) encryption and authentication for all communications, TLS encryption and authentication for Replica Of communication only, and TLS authentication for clients. + +### Access control + +- **Unauthenticated access** - You can access the database as the default user without providing credentials. + +- **Password-only authentication** - When you configure a password for your database's default user, all connections to the database must authenticate with the [AUTH command]({{< relref "/commands/auth" >}}). + + 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. + + Creating a database without ACLs enables a *default* user with full access to the database. You can secure default user access by requiring a password. + +- **Access Control List** - You can specify the [user roles]({{< relref "/operate/rs/security/access-control/create-db-roles" >}}) that have access to the database and the [Redis ACLs]({{< relref "/operate/rs/security/access-control/redis-acl-overview" >}}) that apply to those connections. + + To define an access control list for a database: + + 1. In **Security > Access Control > Access Control List**, select **+ Add ACL**. + + 1. Select a [role]({{< relref "/operate/rs/security/access-control/create-db-roles" >}}) to grant database access. + + 1. Associate a [Redis ACL]({{< relref "/operate/rs/security/access-control/create-db-roles" >}}) with the role and database. + + 1. Select the check mark to add the ACL. + +### Internode encryption + +Enable **Internode encryption** to encrypt data in transit between nodes for this database. See [Internode encryption]({{< relref "/operate/rs/security/encryption/internode-encryption" >}}) for more information. + diff --git a/content/operate/rs/7.4/databases/configure/database-persistence.md b/content/operate/rs/7.4/databases/configure/database-persistence.md new file mode 100644 index 0000000000..817714e8bc --- /dev/null +++ b/content/operate/rs/7.4/databases/configure/database-persistence.md @@ -0,0 +1,120 @@ +--- +Title: Configure database persistence +alwaysopen: false +categories: +- docs +- operate +- rs +description: How to configure database persistence with either an append-only file + (AOF) or snapshots. +linktitle: Persistence +weight: 30 +url: '/operate/rs/7.4/databases/configure/database-persistence/' +--- +All data is stored and managed exclusively in either RAM or RAM + flash Memory ([Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering/" >}})) and therefore, is at risk of being lost upon a process or server +failure. As Redis Enterprise Software is not just a caching solution, but also a full-fledged database, [persistence](https://redis.com/redis-enterprise/technology/durable-redis/) to disk +is critical. Therefore, Redis Enterprise Software supports persisting data to disk on a per-database basis and in multiple ways. + +[Persistence](https://redis.com/redis-enterprise/technology/durable-redis/) can be configured either during database creation or by editing an existing +database's configuration. While the persistence model can be changed dynamically, it can take time for your database to switch from one persistence model to the other. It depends on what you are switching from and to, but also on the size of your database. + +## Configure database persistence + +You can configure persistence when you [create a database]({{< relref "/operate/rs/databases/create" >}}), or you can edit an existing database's configuration: + +1. From the **Databases** list, select the database, then select **Configuration**. + +1. Select **Edit**. + +1. Expand the **High Availability** section. + +1. For **Persistence**, select an [option](#data-persistence-options) from the list. + +1. Select **Save**. + +## Data persistence options + +There are six options for persistence in Redis Enterprise Software: + +| **Options** | **Description** | +| ------ | ------ | +| None | Data is not persisted to disk at all. | +| Append-only file (AOF) - fsync every write | Data is fsynced to disk with every write. | +| Append-only file (AOF) - fsync every 1 sec | Data is fsynced to disk every second. | +| Snapshot, every 1 hour | A snapshot of the database is created every hour. | +| Snapshot, every 6 hours | A snapshot of the database is created every 6 hours. | +| Snapshot, every 12 hours | A snapshot of the database is created every 12 hours. | + +## Select a persistence strategy + +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. + +Redis also allows snapshots through RDB files for persistence. Within Redis Enterprise, you can configure both snapshots and fsync policies. + +For any high availability needs, use replication to further reduce the risk of data loss. + +**For use cases where data loss has a high cost:** + +Append-only file (AOF) - fsync every write - Redis Enterprise sets the Redis directive `appendfsyncalways`. 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. + +**For use cases where data loss is tolerable only limitedly:** + +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. + +{{< note >}} +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. +{{< /note >}} + +**For use cases where data loss is tolerable or recoverable for extended periods of time:** + +- Snapshot, every 1 hour - Performs a full backup every hour. +- Snapshot, every 6 hour - Performs a full backup every 6 hours. +- Snapshot, every 12 hour - Performs a full backup every 12 hours. +- None - Does not back up or persist data at all. + +## Append-only file (AOF) vs snapshot (RDB) + +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: + +| **Append-only File (AOF)** | **Snapshot (RDB)** | +|------------|-----------------| +| More resource intensive | Less resource intensive | +| Provides better durability (recover the latest point in time) | Less durable | +| Slower time to recover (Larger files) | Faster recovery time | +| More disk space required (files tend to grow large and require compaction) | Requires less resources (I/O once every several hours and no compaction required) | + +## Active-Active data persistence + +Active-Active databases support AOF persistence only. Snapshot persistence is not supported for Active-Active databases. + +If an Active-Active database is using snapshot persistence, use `crdb-cli` to switch to AOF persistence: + +```text +crdb-cli crdb update --crdb-guid --default-db-config \ + '{"data_persistence": "aof", "aof_policy":"appendfsync-every-sec"}' +``` + +## Auto Tiering data persistence + +Auto Tiering flash storage is not considered persistent storage. + +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. + +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. + +There may be times when performance is critical for your use case and +you don't want to risk data persistence adding latency. + +You can enable or turn off data persistence on the master shards using the +following `rladmin` command: + +```sh +rladmin tune db master_persistence +``` diff --git a/content/operate/rs/7.4/databases/configure/db-defaults.md b/content/operate/rs/7.4/databases/configure/db-defaults.md new file mode 100644 index 0000000000..8ec7ecce58 --- /dev/null +++ b/content/operate/rs/7.4/databases/configure/db-defaults.md @@ -0,0 +1,167 @@ +--- +Title: Configure database defaults +alwaysopen: false +categories: +- docs +- operate +- rs +description: Cluster-wide policies that determine default settings when creating new + databases. +linkTitle: Database defaults +toc: 'true' +weight: 10 +url: '/operate/rs/7.4/databases/configure/db-defaults/' +--- + +Database defaults are cluster-wide policies that determine default settings when creating new databases. + +## Edit database defaults + +To edit default database configuration using the Cluster Manager UI: + +1. On the **Databases** screen, select {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="Toggle actions button" width="22px" class="inline" >}} to open a list of additional actions. + +1. Select **Database defaults**. + +1. Configure [database defaults](#db-defaults). + + {{Database defaults configuration panel.}} + +1. Select **Save**. + +## Database defaults {#db-defaults} + +### Endpoint configuration + +You can choose a predefined endpoint configuration to use the recommended database proxy and shards placement policies for your use case. If you want to set these policies manually instead, select **Custom** endpoint configuration. + +| Endpoint configuration | Database proxy | Shards placement | Description | +|-----------|------------|----------------|------------------|------------| +| Enterprise clustering | Single | Dense | Sets up a single endpoint that uses DNS to automatically reflect IP address updates after failover or topology changes. | +| Using a load balancer | All nodes | Sparse | Configure Redis with a load balancer like HAProxy or Nginx for environments without DNS. | +| Multiple endpoints | All primary shards | Sparse | To set up multiple endpoints, enable **OSS Cluster API** in the database settings and ensure client support. Clients initially connect to the primary node to retrieve the cluster topology, which allows direct connections to individual Redis proxies on each node. | +| Custom | Single, all primary shards, or all nodes | Dense or sparse | Manually choose default database proxy and shards placement policies. | + +### Database proxy + +Redis Enterprise Software uses [proxies]({{< relref "/operate/rs/references/terminology#proxy" >}}) to manage and optimize access to database shards. Each node in the cluster runs a single proxy process, which can be active (receives incoming traffic) or passive (waits for failovers). + +You can configure default [proxy policies]({{< relref "/operate/rs/databases/configure/proxy-policy" >}}) to determine which nodes' proxies are active and bound to new databases by default. + +To configure the default database proxy policy using the Cluster Manager UI: + +1. [**Edit database defaults**](#edit-database-defaults). + +1. Select a predefined [**Endpoint Configuration**](#endpoint-configuration) to use a recommended database proxy policy, or choose **Custom** to set the policy manually. Changing the database proxy default in the Cluster Manager UI affects both sharded and non-sharded proxy policies. + + {{The Database defaults panel lets you select Database proxy and Shards placement if Endpoint Configuration is set to Custom.}} + +#### Non-sharded proxy policy + +To configure the default proxy policy for non-sharded databases, use one of the following methods: + +- [rladmin tune cluster]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): + + ```sh + rladmin tune cluster default_non_sharded_proxy_policy { single | all-master-shards | all-nodes } + ``` + +- [Update cluster policy]({{< relref "/operate/rs/references/rest-api/requests/cluster/policy#put-cluster-policy" >}}) REST API request: + + ```sh + PUT /v1/cluster/policy + { "default_non_sharded_proxy_policy": "single | all-master-shards | all-nodes" } + ``` + +#### Sharded proxy policy + +To configure the default proxy policy for sharded databases, use one of the following methods: + +- [rladmin tune cluster]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): + + ```sh + rladmin tune cluster default_sharded_proxy_policy { single | all-master-shards | all-nodes } + ``` + +- [Update cluster policy]({{< relref "/operate/rs/references/rest-api/requests/cluster/policy#put-cluster-policy" >}}) REST API request: + + ```sh + PUT /v1/cluster/policy + { "default_sharded_proxy_policy": "single | all-master-shards | all-nodes" } + ``` + +### Shards placement + +The default [shard placement policy]({{< relref "/operate/rs/databases/memory-performance/shard-placement-policy" >}}) determines the distribution of database shards across nodes in the cluster. + +Shard placement policies include: + +- `dense`: places shards on the smallest number of nodes. + +- `sparse`: spreads shards across many nodes. + +To configure default shard placement, use one of the following methods: + +- Cluster Manager UI: + + 1. [**Edit database defaults**](#edit-database-defaults). + + 1. Select a predefined [**Endpoint Configuration**](#endpoint-configuration) to use a recommended shards placement policy, or choose **Custom** to set the policy manually. + + {{The Database defaults panel lets you select Database proxy and Shards placement if Endpoint Configuration is set to Custom.}} + +- [rladmin tune cluster]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): + + ```sh + rladmin tune cluster default_shards_placement { dense | sparse } + ``` + +- [Update cluster policy]({{< relref "/operate/rs/references/rest-api/requests/cluster/policy#put-cluster-policy" >}}) REST API request: + + ```sh + PUT /v1/cluster/policy + { "default_shards_placement": "dense | sparse" } + ``` + +### Database version + +New databases use the default Redis database version unless you select a different **Database version** when you [create a database]({{}}) in the Cluster Manager UI or specify the `redis_version` in a [create database REST API request]({{< relref "/operate/rs/references/rest-api/requests/bdbs" >}}). + +To configure the Redis database version, use one of the following methods: + +- Cluster Manager UI: Edit **Database version** in [**Database defaults**](#edit-database-defaults) + + +- [rladmin tune cluster]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): + + ```sh + rladmin tune cluster default_redis_version + ``` + +- [Update cluster policy]({{< relref "/operate/rs/references/rest-api/requests/cluster/policy#put-cluster-policy" >}}) REST API request: + + ```sh + PUT /v1/cluster/policy + { "default_provisioned_redis_version": "x.y" } + ``` + +### Internode encryption + +Enable [internode encryption]({{< relref "/operate/rs/security/encryption/internode-encryption" >}}) to encrypt data in transit between nodes for new databases by default. + +To enable or turn off internode encryption by default, use one of the following methods: + +- Cluster Manager UI: Edit **Internode Encryption** in [**Database defaults**](#edit-database-defaults) + +- [rladmin tune cluster]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): + + ```sh + rladmin tune cluster data_internode_encryption { enabled | disabled } + ``` + +- [Update cluster policy]({{< relref "/operate/rs/references/rest-api/requests/cluster/policy#put-cluster-policy" >}}) REST API request: + + ```sh + PUT /v1/cluster/policy + { "data_internode_encryption": } + ``` diff --git a/content/operate/rs/7.4/databases/configure/db-upgrade.md b/content/operate/rs/7.4/databases/configure/db-upgrade.md new file mode 100644 index 0000000000..c5e4deb22b --- /dev/null +++ b/content/operate/rs/7.4/databases/configure/db-upgrade.md @@ -0,0 +1,69 @@ +--- +Title: Change database upgrade configuration +alwaysopen: false +categories: +- docs +- operate +- rs +description: Configure cluster-wide policies that affect default database upgrades. +linkTitle: Upgrade configuration +toc: 'true' +weight: 15 +url: '/operate/rs/7.4/databases/configure/db-upgrade/' +--- + +Database upgrade configuration includes cluster-wide policies that affect default database upgrades. + +## Edit upgrade configuration + +To edit database upgrade configuration using the Cluster Manager UI: + +1. On the **Databases** screen, select {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="Toggle actions button" width="22px" class="inline" >}} to open a list of additional actions. + +1. Select **Upgrade configuration**. + +1. Change database [upgrade configuration settings](#upgrade-config-settings). + +1. Select **Save**. + +## Upgrade configuration settings {#upgrade-config-settings} + +### Database shard parallel upgrade + +To change the number of shards upgraded in parallel during database upgrades, use one of the following methods: + +- Cluster Manager UI – Edit **Database shard parallel upgrade** in [**Upgrade configuration**](#edit-upgrade-configuration) + +- [rladmin tune cluster]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): + + ```sh + rladmin tune cluster parallel_shards_upgrade { all | } + ``` + +- [Update cluster policy]({{< relref "/operate/rs/references/rest-api/requests/cluster/policy#put-cluster-policy" >}}) REST API request: + + ```sh + PUT /v1/cluster/policy + { "parallel_shards_upgrade": } + ``` + +### RESP3 support + +The cluster-wide option `resp3_default` determines the default value of the `resp3` option, which enables or deactivates RESP3 for a database, upon upgrading a database to version 7.2 or later. `resp3_default` is set to `enabled` by default. + +To change `resp3_default` to `disabled`, use one of the following methods: + +- Cluster Manager UI – Edit **RESP3 support** in [**Upgrade configuration**](#edit-upgrade-configuration) + +- [rladmin tune cluster]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): + + ```sh + rladmin tune cluster resp3_default { enabled | disabled } + ``` + +- [Update cluster policy]({{< relref "/operate/rs/references/rest-api/requests/cluster/policy#put-cluster-policy" >}}) REST API request: + + ```sh + PUT /v1/cluster/policy + { "resp3_default": } + ``` diff --git a/content/operate/rs/7.4/databases/configure/oss-cluster-api.md b/content/operate/rs/7.4/databases/configure/oss-cluster-api.md new file mode 100644 index 0000000000..e437ff93c8 --- /dev/null +++ b/content/operate/rs/7.4/databases/configure/oss-cluster-api.md @@ -0,0 +1,144 @@ +--- +Title: Enable OSS Cluster API +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +linkTitle: OSS Cluster API +weight: 20 +aliases: + - /operate/rs/concepts/data-access/oss-cluster-api +url: '/operate/rs/7.4/databases/configure/oss-cluster-api/' +--- + +Review [Redis OSS Cluster API]({{< relref "/operate/rs/clusters/optimize/oss-cluster-api" >}}) to determine if you should enable this feature for your database. + +## Prerequisites + +The Redis OSS Cluster API is supported only when a database meets specific criteria. + +The database must: + +- Use the standard [hashing policy]({{< relref "/operate/rs/databases/durability-ha/clustering#supported-hashing-policies" >}}). +- Have the [proxy policy]({{< relref "/operate/rs/databases/configure/proxy-policy" >}}) set to either `all-master-shards` or `all-nodes`. + +In addition, the database must _not_: + +- Use node `include` or `exclude` in the proxy policy. +- Use [RediSearch]({{< relref "/operate/oss_and_stack/stack-with-enterprise/search" >}}), [RedisTimeSeries]({{< relref "/operate/oss_and_stack/stack-with-enterprise/timeseries" >}}), or [RedisGears]({{< relref "/operate/oss_and_stack/stack-with-enterprise/gears-v1" >}}) modules. + +The OSS Cluster API setting applies to individual databases instead of the entire cluster. + +## Enable OSS Cluster API support + +You can use the Cluster Manager UI or the `rladmin` utility to enable OSS Cluster API support for a database. + +### Cluster Manager UI + +When you use the Cluster Manager UI to enable the OSS Cluster API, it automatically configures the [prerequisites]({{< relref "/operate/rs/databases/configure/oss-cluster-api#prerequisites" >}}). + +To enable the OSS Cluster API for an existing database in the Cluster Manager UI: + +1. From the database's **Configuration** tab, select **Edit**. + +1. Expand the **Clustering** section. + +1. Turn on the **OSS Cluster API** toggle. + + {{Use the *OSS Cluster API* setting to enable the API for the selected database.}} + +1. Select **Save**. + +You can also use the Cluster Manager UI to enable the setting when creating a new database. + +### Command line (`rladmin`) + +You can use the [`rladmin` utility]({{< relref "/operate/rs/references/cli-utilities/rladmin/" >}}) to enable the OSS Cluster API for Redis Enterprise Software databases, including Replica Of databases. + +For Active-Active (CRDB) databases, [use the crdb-cli utility](#active-active-databases). + +Ensure the [prerequisites]({{< relref "/operate/rs/databases/configure/oss-cluster-api#prerequisites" >}}) have been configured. Then, enable the OSS Cluster API for a Redis database from the command line: + +```sh +$ rladmin tune db oss_cluster enabled +``` + +To determine the current setting for a database from the command line, use `rladmin info db` to return the value of the `oss_cluster` setting. + +```sh +$ rladmin info db test | grep oss_cluster: + oss_cluster: enabled +``` + +The OSS Cluster API setting applies to the specified database only; it does not apply to the cluster. + +### Active-Active databases + +Ensure the [prerequisites]({{< relref "/operate/rs/databases/configure/oss-cluster-api#prerequisites" >}}) have been configured. Then, use the `crdb-cli` utility to enable the OSS Cluster API for Active-Active databases: + +```sh +$ crdb-cli crdb update --crdb-guid --oss-cluster true +``` + +For best results, you should do this when you first create the database. + +Here's the basic process: + +1. Create the Active-Active database: + + ```sh + $ crdb-cli crdb create --name \ + --memory-size 10g --port \ + --sharding true --shards-count 2 \ + --replication true --oss-cluster true --proxy-policy all-master-shards \ + --instance fqdn=,username=,password= \ + --instance fqdn=,username=,password= \ + --instance fqdn=,username=,password= + ``` + +1. Obtain the CRDB-GUID ID for the new database: + + ```sh + $ crdb-cli crdb list + CRDB-GUID NAME REPL-ID CLUSTER-FQDN + Test 4 cluster1.local + ``` + +1. Use the CRDB-GUID ID to enable the OSS Cluster API: + + ```sh + $ crdb-cli crdb update --crdb-guid \ + --oss-cluster true + ``` + +The OSS Cluster API setting applies to all of the instances of the Active-Active database. + +## Turn off OSS Cluster API support + +To deactivate OSS Cluster API support for a database, either: + +- Use the Cluster Manager UI to turn off the **OSS Cluster API** toggle from the database **Configuration** settings. + +- Use the appropriate utility to deactivate the OSS Cluster API setting. + + For standard databases, including Replica Of, use `rladmin`: + + ```sh + $ rladmin tune db oss_cluster disabled + ``` + + For Active-Active databases, use `crdb-cli`: + + ```sh + $ crdb-cli crdb update --crdb-guid \ + --oss-cluster false + ``` + +## Multi-key command support + +When you enable the OSS Cluster API for a database, +[multi-key commands]({{< relref "/operate/rc/databases/configuration/clustering#multikey-operations" >}}) are only allowed when all keys are mapped to the same slot. + +To verify that your database meets this requirement, make sure that the `CLUSTER KEYSLOT` reply is the same for all keys affected by the multi-key command. To learn more, see [multi-key operations]({{< relref "/operate/rs/databases/durability-ha/clustering#multikey-operations" >}}). diff --git a/content/operate/rs/7.4/databases/configure/proxy-policy.md b/content/operate/rs/7.4/databases/configure/proxy-policy.md new file mode 100644 index 0000000000..e60f16bf2c --- /dev/null +++ b/content/operate/rs/7.4/databases/configure/proxy-policy.md @@ -0,0 +1,149 @@ +--- +Title: Configure proxy policy +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +linktitle: Proxy policy +weight: 40 +url: '/operate/rs/7.4/databases/configure/proxy-policy/' +--- +Redis Enterprise Software (RS) provides high-performance data access +through a proxy process that manages and optimizes access to shards +within the RS cluster. Each node contains a single proxy process. +Each proxy can be active and take incoming traffic or it can be passive +and wait for failovers. + +## Proxy policies + +A database can have one of these proxy policies: + +| **Proxy Policy** | **Description** | +|------------|-----------------| +| Single | There is only a single proxy that is bound to the database. This is the default database configuration and preferable in most use cases. | +| All Master Shards | There are multiple proxies that are bound to the database, one on each node that hosts a database master shard. This mode fits most use cases that require multiple proxies. | +| All Nodes | There are multiple proxies that are bound to the database, one on each node in the cluster, regardless of whether or not there is a shard from this database on the node. This mode should be used only in special cases, such as [using a load balancer]({{< relref "/operate/rs/networking/cluster-lba-setup.md" >}}). | + +{{< note >}} +Manual intervention is also available via the rladmin bind add and +remove commands. +{{< /note >}} + +## Database configuration + +A database can be configured with a proxy policy using rladmin bind. + +Warning: Any configuration update which causes existing proxies to be +unbounded can cause existing client connections to get disconnected. + +You can run rladmin to control and view the existing settings for proxy +configuration. + +The **info** command on cluster returns the existing proxy policy for +sharded and non-sharded (single shard) databases. + +```sh +$ rladmin info cluster +cluster configuration: +   repl_diskless: enabled + default_non_sharded_proxy_policy: single +   default_sharded_proxy_policy: single +   default_shards_placement: dense +   default_shards_overbooking: disabled +   default_fork_evict_ram: enabled +   default_redis_version: 3.2 +   redis_migrate_node_threshold: 0KB (0 bytes) +   redis_migrate_node_threshold_percent: 8 (%) +   redis_provision_node_threshold: 0KB (0 bytes) +   redis_provision_node_threshold_percent: 12 (%) +   max_simultaneous_backups: 4 +   watchdog profile: local-network +``` + +You can configure the proxy policy using the `bind` command in +rladmin. The following command is an example that changes the bind +policy for a database named "db1" with an endpoint id "1:1" to "All +Master Shards" proxy policy. + +```sh +rladmin bind db db1 endpoint 1:1 policy all-master-shards +``` + +The next command performs the same task using the database id in place of the name. The id of this database is "1". + +```sh +rladmin bind db db:1 endpoint 1:1 policy all-master-shards +``` + +{{< note >}} +You can find the endpoint id for the endpoint argument by running +*status* command for rladmin. Look for the endpoint id information under +the *ENDPOINT* section of the output. +{{< /note >}} + +### Reapply policies after topology changes + +If you want to reapply the policy after topology changes, such as node restarts, +failovers and migrations, run this command to reset the policy: + +```sh +rladmin bind db db: endpoint policy +``` + +This is not required with single policies. + +#### Other implications + +During the regular operation of the cluster different actions might take +place, such as automatic migration or automatic failover, which change +what proxy needs to be bound to what database. When such actions take +place the cluster attempts, as much as possible, to automatically change +proxy bindings to adhere to the defined policies. That said, the cluster +attempts to prevent any existing client connections from being +disconnected, and hence might not entirely enforce the policies. In such +cases, you can enforce the policy using the appropriate rladmin +commands. + +## About multiple active proxy support + +RS allows multiple databases to be created. Each database gets an +endpoint (a unique URL and port on the FQDN). This endpoint receives all +the traffic for all operations for that database. By default, RS binds +this database endpoint to one of the proxies on a single node in the +cluster. This proxy becomes an active proxy and receives all the +operations for the given database. (note that if the node with the +active proxy fails, a new proxy on another node takes over as part of +the failover process automatically). + +In most cases, a single proxy can handle a large number of operations +without consuming additional resources. However, under high load, +network bandwidth or a high rate of packets per second (PPS) on the +single active proxy can become a bottleneck to how fast database +operation can be performed. In such cases, having multiple active +proxies, across multiple nodes, mapped to the same external database +endpoint, can significantly improve throughput. + +With the multiple active proxies capability, RS enables you to configure +a database to have multiple internal proxies in order to improve +performance, in some cases. It is important to note that, even though +multiple active proxies can help improve the throughput of database +operations, configuring multiple active proxies may cause additional +latency in operations as the shards and proxies are spread across +multiple nodes in the cluster. + +{{< note >}} +When the network on a single active proxy becomes the bottleneck, +you might also look into enabling the multiple NIC support in RS. With +nodes that have multiple physical NICs (Network Interface Cards), you +can configure RS to separate internal and external traffic onto +independent physical NICs. For more details, refer to [Multi-IP & +IPv6]({{< relref "/operate/rs/networking/multi-ip-ipv6.md" >}}). +{{< /note >}} + +Having multiple proxies for a database can improve RS's ability for fast +failover in case of proxy and/or node failure. With multiple proxies for +a database, there is no need for a client to wait for the cluster +to spin up another proxy and a DNS change in most cases, the client +just uses the next IP in the list to connect to another proxy. diff --git a/content/operate/rs/7.4/databases/configure/replica-ha.md b/content/operate/rs/7.4/databases/configure/replica-ha.md new file mode 100644 index 0000000000..56c2168e67 --- /dev/null +++ b/content/operate/rs/7.4/databases/configure/replica-ha.md @@ -0,0 +1,174 @@ +--- +Title: Configure high availability for replica shards +alwaysopen: false +categories: +- docs +- operate +- rs +description: Configure high availability for replica shards so that the cluster automatically + migrates the replica shards to an available node. +linkTitle: Replica high availability +weight: 50 +url: '/operate/rs/7.4/databases/configure/replica-ha/' +--- + +When you enable [database replication]({{< relref "/operate/rs/databases/durability-ha/replication.md" >}}), +Redis Enterprise Software creates a replica of each primary (master) shard. The replica shard will always be +located on a different node than the primary shard to make your data highly available. If the primary shard +fails or if the node hosting the primary shard fails, then the replica is promoted to primary. + +Without replica high availability (_replica\_ha_) enabled, the promoted primary shard becomes a single point of failure +as the only copy of the data. + +Enabling _replica\_ha_ configures the cluster to automatically replicate the promoted replica on an available node. +This automatically returns the database to a state where there are two copies of the data: +the former replica shard which has been promoted to primary and a new replica shard. + +An available node: + +1. Meets replica migration requirements, such as [rack-awareness]({{< relref "/operate/rs/clusters/configure/rack-zone-awareness.md" >}}). +1. Has enough available RAM to store the replica shard. +1. Does not also contain the master shard. + +In practice, replica migration creates a new replica shard and copies the data from the master shard to the new replica shard. + +For example: + +1. Node:2 has a master shard and node:3 has the corresponding replica shard. +1. Either: + + - Node:2 fails and the replica shard on node:3 is promoted to master. + - Node:3 fails and the master shard is no longer replicated to the replica shard on the failed node. + +1. If replica HA is enabled, a new replica shard is created on an available node. +1. The data from the master shard is replicated to the new replica shard. + +{{< note >}} +- Replica HA follows all prerequisites of replica migration, such as [rack-awareness]({{< relref "/operate/rs/clusters/configure/rack-zone-awareness.md" >}}). +- Replica HA migrates as many shards as possible based on available DRAM in the target node. When no DRAM is available, replica HA stops migrating replica shards to that node. +{{< /note >}} + +## Configure high availability for replica shards + +If replica high availability is enabled for both the cluster and a database, +the database's replica shards automatically migrate to another node when a master or replica shard fails. +If replica HA is not enabled at the cluster level, +replica HA will not migrate replica shards even if replica HA is enabled for a database. + +Replica high availability is enabled for the cluster by default. + +When you create a database using the Cluster Manager UI, replica high availability is enabled for the database by default if you enable replication. + +{{When you select the Replication checkbox in the High availability & durability section of the database configuration screen, the Replica high availability checkbox is also selected by default.}} + +To use replication without replication high availability, clear the **Replica high availability** checkbox. + +You can also enable or turn off replica high availability for a database using `rladmin` or the REST API. + +{{< note >}} +For Active-Active databases, replica HA is enabled for the database by default to make sure that replica shards are available for Active-Active replication. +{{< /note >}} + +### Configure cluster policy for replica HA + +{{}} +The replica HA cluster policy is deprecated as of Redis Enterprise Software version 7.2.4. +{{}} + +To enable or turn off replica high availability by default for the entire cluster, use one of the following methods: + +- [rladmin tune cluster]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): + + ```sh + rladmin tune cluster slave_ha { enabled | disabled } + ``` + +- [Update cluster policy]({{< relref "/operate/rs/references/rest-api/requests/cluster/policy#put-cluster-policy" >}}) REST API request: + + ```sh + PUT /v1/cluster/policy + { "slave_ha": } + ``` + +### Turn off replica HA for a database + +To turn off replica high availability for a specific database using `rladmin`, run: + +``` text +rladmin tune db db: slave_ha disabled +``` + +You can use the database name in place of `db:` in the preceding command. + + +## Configuration options + +You can see the current configuration options for replica HA with: + +``` text +rladmin info cluster +``` + +### Grace period + +By default, replica HA has a 10-minute grace period after node failure and before new replica shards are created. + +{{}}The default grace period is 30 minutes for containerized applications using [Redis Enterprise Software for Kubernetes]({{< relref "/operate/kubernetes/" >}}).{{}} + +To configure this grace period from rladmin, run: + +``` text +rladmin tune cluster slave_ha_grace_period +``` + + +### Shard priority + +Replica shard migration is based on priority. When memory resources are limited, the most important replica shards are migrated first: + +1. `slave_ha_priority` - Replica shards with higher + integer values are migrated before shards with lower values. + + To assign priority to a database, run: + + ``` text + rladmin tune db db: slave_ha_priority + ``` + + You can use the database name in place of `db:` in the preceding command. + +1. Active-Active databases - Active-Active database synchronization uses replica shards to synchronize between the replicas. +1. Database size - It is easier and more efficient to move replica shards of smaller databases. +1. Database UID - The replica shards of databases with a higher UID are moved first. + +### Cooldown periods + +Both the cluster and the database have cooldown periods. + +After node failure, the cluster cooldown period (`slave_ha_cooldown_period`) prevents another replica migration due to another node failure for any +database in the cluster until the cooldown period ends. The default is one hour. + +After a database is migrated with replica HA, +it cannot go through another migration due to another node failure until the cooldown period for the database (`slave_ha_bdb_cooldown_period`) ends. The default is two hours. + +To configure cooldown periods, use [`rladmin tune cluster`]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): + +- For the cluster: + + ``` text + rladmin tune cluster slave_ha_cooldown_period + ``` + +- For all databases in the cluster: + + ``` text + rladmin tune cluster slave_ha_bdb_cooldown_period + ``` + +### Alerts + +The following alerts are sent during replica HA activation: + +- Shard migration begins after the grace period. +- Shard migration fails because there is no available node (sent hourly). +- Shard migration is delayed because of the cooldown period. diff --git a/content/operate/rs/7.4/databases/configure/shard-placement.md b/content/operate/rs/7.4/databases/configure/shard-placement.md new file mode 100644 index 0000000000..6d130267b1 --- /dev/null +++ b/content/operate/rs/7.4/databases/configure/shard-placement.md @@ -0,0 +1,44 @@ +--- +Title: Configure shard placement +alwaysopen: false +categories: +- docs +- operate +- rs +description: Configure shard placement to improve performance. +linktitle: Shard placement +weight: 60 +url: '/operate/rs/7.4/databases/configure/shard-placement/' +--- +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]({{< relref "/operate/rs/databases/memory-performance/shard-placement-policy.md" >}}) helps to maintain optimal performance and resiliency. + +{{< embed-md "shard-placement-intro.md" >}} + +## Default shard placement policy + +When you create a new cluster, the cluster configuration has a `dense` default shard placement policy. +When you create a database, this default policy is applied to the new database. + +To see the current default shard placement policy, run `rladmin info cluster`: + +{{< image filename="/images/rs/shard_placement_info_cluster.png" >}} + +To change the default shard placement policy so that new databases are created with the `sparse` shard placement policy, run: + +```sh +rladmin tune cluster default_shards_placement [ dense | sparse ] +``` + +## Shard placement policy for a database + +To see the shard placement policy for a database in `rladmin status`. + +{{< image filename="/images/rs/shard_placement_rladmin_status.png" >}} + +To change the shard placement policy for a database, run: + +```sh +rladmin placement db [ database name | database ID ] [ dense | sparse ] +``` diff --git a/content/operate/rs/7.4/databases/connect/_index.md b/content/operate/rs/7.4/databases/connect/_index.md new file mode 100644 index 0000000000..381e305a3b --- /dev/null +++ b/content/operate/rs/7.4/databases/connect/_index.md @@ -0,0 +1,35 @@ +--- +Title: Connect to a database +categories: +- docs +- operate +- rs +description: Learn how to connect your application to a Redis database hosted by Redis + Enterprise Software and test your connection. +hideListLinks: true +linkTitle: Connect +weight: 20 +url: '/operate/rs/7.4/databases/connect/' +--- + +After you [set up a cluster]({{< relref "/operate/rs/clusters/new-cluster-setup" >}}) and [create a Redis database]({{< relref "/operate/rs/databases/create" >}}), you can connect to your database. + +To connect to your database, you need the database endpoint, which includes the cluster name (FQDN) and the database port. To view and copy public and private endpoints for a database in the cluster, see the database’s **Configuration > General** section in the Cluster Manager UI. + +{{View public and private endpoints from the General section of the database's Configuration screen.}} + +If you try to connect with the FQDN, and the database does not respond, try connecting with the IP address. If this succeeds, DNS is not properly configured. To set up DNS, see [Configure cluster DNS]({{< relref "/operate/rs/networking/cluster-dns" >}}). + +If you want to secure your connection, set up [TLS]({{< relref "/operate/rs/security/encryption/tls/" >}}). + +## Connect to a database + +Use one of the following connection methods to connect to your database: + +- [`redis-cli`]({{< relref "/operate/rs/references/cli-utilities/redis-cli/" >}}) utility + +- [Redis Insight](https://redis.com/redis-enterprise/redis-insight/) + +- [Redis client]({{< relref "/develop/connect/clients/" >}}) for your preferred programming language + +For examples, see [Test client connection]({{< relref "/operate/rs/databases/connect/test-client-connectivity" >}}). diff --git a/content/operate/rs/7.4/databases/connect/supported-clients-browsers.md b/content/operate/rs/7.4/databases/connect/supported-clients-browsers.md new file mode 100644 index 0000000000..d989aa08b2 --- /dev/null +++ b/content/operate/rs/7.4/databases/connect/supported-clients-browsers.md @@ -0,0 +1,41 @@ +--- +Title: Supported connection clients +categories: +- docs +- operate +- rs +description: Info about Redis client libraries and supported clients when using the + discovery service. +weight: 10 +url: '/operate/rs/7.4/databases/connect/supported-clients-browsers/' +--- +You can connect to Redis Enterprise Software databases programmatically using client libraries. + +## Redis client libraries + +To connect an application to a Redis database hosted by Redis Enterprise Software, use a [client library]({{< relref "/develop/connect/clients/" >}}) appropriate for your programming language. + +You can also use the `redis-cli` utility to connect to a database from the command line. + +For examples of each approach, see the [Redis Enterprise Software quickstart]({{< relref "/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart" >}}). + +Note: You cannot use client libraries to configure Redis Enterprise Software. Instead, use: + +- The Redis Enterprise Software [Cluster Manager UI]({{< relref "/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart" >}}) +- The [REST API]({{< relref "/operate/rs/references/rest-api" >}}) +- Command-line utilities, such as [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) + +### Discovery service + +We recommend the following clients when using a [discovery service]({{< relref "/operate/rs/databases/durability-ha/discovery-service.md" >}}) based on the Redis Sentinel API: + +- [redis-py]({{< relref "/develop/connect/clients/python" >}}) (Python client) +- [NRedisStack]({{< relref "/develop/connect/clients/dotnet" >}}) (.NET client) +- [Jedis]({{< relref "/develop/connect/clients/java/jedis" >}}) (synchronous Java client) +- [Lettuce]({{< relref "/develop/connect/clients/java/lettuce" >}}) (asynchronous Java client) +- [go-redis]({{< relref "/develop/connect/clients/go" >}}) (Go client) +- [Hiredis](https://github.com/redis/hiredis) (C client) + +If you need to use another client, you can use [Sentinel Tunnel](https://github.com/RedisLabs/sentinel_tunnel) +to discover the current Redis master with Sentinel and create a TCP tunnel between a local port on the client and the master. + diff --git a/content/operate/rs/7.4/databases/connect/test-client-connectivity.md b/content/operate/rs/7.4/databases/connect/test-client-connectivity.md new file mode 100644 index 0000000000..c0fae9b241 --- /dev/null +++ b/content/operate/rs/7.4/databases/connect/test-client-connectivity.md @@ -0,0 +1,153 @@ +--- +Title: Test client connection +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +linktitle: Test connection +weight: 20 +url: '/operate/rs/7.4/databases/connect/test-client-connectivity/' +--- +In various scenarios, such as after creating a new cluster or upgrading +the cluster, you should verify clients can connect to the +database. + +To test client connectivity: + +1. After you [create a Redis database]({{< relref "/operate/rs/databases/create" >}}), copy the database endpoint, which contains the cluster name (FQDN). + + To view and copy endpoints for a database in the cluster, see the database’s **Configuration > General** section in the Cluster Manager UI: + + {{View public and private endpoints from the General section of the database's Configuration screen.}} + +1. Try to connect to the database endpoint from your client of choice, + and run database commands. + +1. If the database does not respond, try to connect to the database + endpoint using the IP address rather than the FQDN. If you + succeed, then DNS is not properly configured. For + additional details, see + [Configure cluster DNS]({{< relref "/operate/rs/networking/cluster-dns" >}}). + +If any issues occur when testing database connections, [contact +support](https://redis.com/company/support/). + +## Test database connections + +After you create a Redis database, you can connect to your +database and store data using one of the following methods: + +- [`redis-cli`]({{< relref "/operate/rs/references/cli-utilities/redis-cli" >}}), the built-in command-line tool + +- [Redis Insight](https://redis.com/redis-enterprise/redis-insight/), a free Redis GUI that is available for macOS, Windows, and Linux + +- An application using a Redis client library, such as [`redis-py`](https://github.com/redis/redis-py) for Python. See the [client list]({{< relref "/develop/connect/clients/" >}}) to view all Redis clients by language. + +### Connect with redis-cli + +Connect to your database with `redis-cli` (located in the `/opt/redislabs/bin` directory), then store and retrieve a key: + +```sh +$ redis-cli -h -p +127.0.0.1:16653> set key1 123 +OK +127.0.0.1:16653> get key1 +"123" +``` + +For more `redis-cli` connection examples, see the [`redis-cli` reference]({{< relref "/operate/rs/references/cli-utilities/redis-cli" >}}). + +### Connect with Redis Insight + +Redis Insight is a free Redis GUI that is available for macOS, Windows, and Linux. + +1. [Install Redis Insight]({{< relref "/develop/connect/insight/" >}}). + +1. Open Redis Insight and select **Add Redis Database**. + +1. Enter the host and port in the **Host** and **Port** fields. + +1. Select **Use TLS** if [TLS]({{< relref "/operate/rs/security/encryption/tls" >}}) is set up. + +1. Select **Add Redis Database** to connect to the database. + +See the [Redis Insight documentation]({{< relref "/develop/connect/insight/" >}}) for more information. + +### Connect with Python + +Python applications can connect +to the database using the `redis-py` client library. For installation instructions, see the +[`redis-py` README](https://github.com/redis/redis-py#readme) on GitHub. + +1. From the command line, create a new file called +`redis_test.py`: + + ```sh + vi redis_test.py + ``` + +1. Paste the following code in `redis_test.py`, and replace `` and `` with your database's endpoint details: + + ```python + import redis + + # Connect to the database + r = redis.Redis(host='', port=) + + # Store a key + print("set key1 123") + print(r.set('key1', '123')) + + # Retrieve the key + print("get key1") + print(r.get('key1')) + ``` + +1. Run the application: + + ```sh + python redis_test.py + ``` + +1. If the application successfully connects to your database, it outputs: + + ```sh + set key1 123 + True + get key1 + 123 + ``` +### Connect with discovery service + +You can also connect a Python application to the database using the discovery service, which complies with the Redis Sentinel API. + +In the IP-based connection method, you only need the database name, not the port number. +The following example uses the discovery service that listens on port 8001 on all nodes of the cluster +to discover the endpoint for the database named "db1". + +```python +from redis.sentinel import Sentinel + +# with IP based connections, a list of known node IP addresses is constructed +# to allow connection even if any one of the nodes in the list is unavailable. +sentinel_list = [ +('10.0.0.44', 8001), +('10.0.0.45', 8001), +('10.0.0.46', 8001) +] + +# change this to the db name you want to connect +db_name = 'db1' + +sentinel = Sentinel(sentinel_list, socket_timeout=0.1) +r = sentinel.master_for(db_name, socket_timeout=0.1) + +# set key "foo" to value "bar" +print(r.set('foo', 'bar')) +# set value for key "foo" +print(r.get('foo')) +``` + +For more `redis-py` connection examples, see the [`redis-py` developer documentation](https://redis-py.readthedocs.io/en/stable/examples/connection_examples.html). diff --git a/content/operate/rs/7.4/databases/connect/troubleshooting-guide.md b/content/operate/rs/7.4/databases/connect/troubleshooting-guide.md new file mode 100644 index 0000000000..82a6e41d96 --- /dev/null +++ b/content/operate/rs/7.4/databases/connect/troubleshooting-guide.md @@ -0,0 +1,296 @@ +--- +Title: Troubleshooting pocket guide for Redis Enterprise Software +alwaysopen: false +categories: +- docs +- operate +- rs +description: Troubleshoot issues with Redis Enterprise Software, including connectivity + issues between the database and clients or applications. +linktitle: Troubleshoot +toc: 'true' +weight: 90 +url: '/operate/rs/7.4/databases/connect/troubleshooting-guide/' +--- + +If your client or application cannot connect to your database, verify the following. + +## Identify Redis host issues + +#### Check resource usage + +- Used disk space should be less than `90%`. To check the host machine's disk usage, run the [`df`](https://man7.org/linux/man-pages/man1/df.1.html) command: + + ```sh + $ df -h + Filesystem Size Used Avail Use% Mounted on + overlay 59G 23G 33G 41% / + /dev/vda1 59G 23G 33G 41% /etc/hosts + ``` + +- RAM and CPU utilization should be less than `80%`, and host resources must be available exclusively for Redis Enterprise Software. You should also make sure that swap memory is not being used or is not configured. + + 1. Run the [`free`](https://man7.org/linux/man-pages/man1/free.1.html) command to check memory usage: + + ```sh + $ free + total used free shared buff/cache available + Mem: 6087028 1954664 993756 409196 3138608 3440856 + Swap: 1048572 0 1048572 + ``` + + 1. Used CPU should be less than `80%`. To check CPU usage, use `top` or `vmstat`. + + Run [`top`](https://man7.org/linux/man-pages/man1/top.1.html): + + ```sh + $ top + Tasks: 54 total, 1 running, 53 sleeping, 0 stopped, 0 zombie + %Cpu(s): 1.7 us, 1.4 sy, 0.0 ni, 96.8 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st + KiB Mem : 6087028 total, 988672 free, 1958060 used, 3140296 buff/cache + KiB Swap: 1048572 total, 1048572 free, 0 used. 3437460 avail Mem + ``` + + Run [`vmstat`](https://man7.org/linux/man-pages/man8/vmstat.8.html): + + ```sh + $ vmstat + procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- + r b swpd free buff cache si so bi bo in cs us sy id wa st + 2 0 0 988868 177588 2962876 0 0 0 6 7 12 1 1 99 0 0 + ``` + + 1. If CPU or RAM usage is greater than 80%, ask your system administrator which process is the culprit. If the process is not related to Redis, terminate it. + +#### Sync clock with time server + +It is recommended to sync the host clock with a time server. + +Verify that time is synchronized with the time server using one of the following commands: + +- `ntpq -p` + +- `chronyc sources` + +- [`timedatectl`](https://man7.org/linux/man-pages/man1/timedatectl.1.html) + +#### Remove https_proxy and http_proxy variables + +1. Run [`printenv`](https://man7.org/linux/man-pages/man1/printenv.1.html) and check if `https_proxy` and `http_proxy` are configured as environment variables: + + ```sh + printenv | grep -i proxy + ``` + +1. If `https_proxy` or `http_proxy` exist, remove them: + + ```sh + unset https_proxy + ``` + ```sh + unset http_proxy + ``` + +#### Review system logs + +Review system logs including the syslog or journal for any error messages, warnings, or critical events. See [Logging]({{< relref "/operate/rs/clusters/logging" >}}) for more information. + +## Identify issues caused by security hardening + +- Temporarily deactivate any security hardening tools (such as selinux, cylance, McAfee, or dynatrace), and check if the problem is resolved. + +- The user `redislabs` must have read and write access to `/tmp` directory. Run the following commands to verify. + + 1. Create a test file in `/tmp` as the `redislabs` user: + ```sh + $ su - redislabs -s /bin/bash -c 'touch /tmp/test' + ``` + + 1. Verify the file was created successfully: + ```sh + $ ls -l /tmp/test + -rw-rw-r-- 1 redislabs redislabs 0 Aug 12 02:06 /tmp/test + ``` + +- Using a non-permissive file mode creation mask (`umask`) can cause issues. + + 1. Check the output of `umask`: + + ```sh + $ umask + 0022 + ``` + + 1. If `umask`'s output differs from the default value `0022`, it might prevent normal operation. Consult your system administrator and revert to the default `umask` setting. + +## Identify cluster issues + +- Use `supervisorctl status` to verify all processes are in a `RUNNING` state: + + ```sh + supervisorctl status + ``` + +- Run `rlcheck` and verify no errors appear: + + ```sh + rlcheck + ``` + +- Run [`rladmin status issues_only`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status" >}}) and verify that no issues appear: + + ```sh + $ rladmin status issues_only + CLUSTER NODES: + NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS + + DATABASES: + DB:ID NAME TYPE STATUS SHARDS PLACEMENT REPLICATION PERSISTENCE ENDPOINT + + ENDPOINTS: + DB:ID NAME ID NODE ROLE SSL + + SHARDS: + DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS + + ``` + +- Run [`rladmin status shards`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-shards" >}}). For each shard, `USED_MEMORY` should be less than 25 GB. + + ```sh + $ rladmin status shards + SHARDS: + DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS + db:1 db1 redis:1 node:1 master 0-16383 2.13MB OK + ``` + +- Run [`rladmin cluster running_actions`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/running_actions" >}}) and confirm that no tasks are currently running (active): + + ```sh + $ rladmin cluster running_actions + No active tasks + ``` + +## Troubleshoot connectivity + +#### Database endpoint resolution + +1. On the client machine, check if the database endpoint can be resolved: + + ```sh + dig + ``` + +1. If endpoint resolution fails on the client machine, check on one of the cluster nodes: + + ```sh + dig @localhost + ``` + +1. If endpoint resolution succeeds on the cluster node but fails on the client machine, review the DNS configuration and fix any errors. + +1. If the endpoint can’t be resolved on the cluster node, [contact support](https://redis.com/company/support/). + +#### Client application issues + +1. To identify possible client application issues, test connectivity from the client machine to the database using [`redis-cli`]({{< relref "/operate/rs/references/cli-utilities/redis-cli" >}}): + + [`INFO`]({{< relref "/commands/info" >}}): + + ```sh + redis-cli -h -p -a INFO + ``` + + [`PING`]({{< relref "/commands/ping" >}}): + + ```sh + redis-cli -h -p -a PING + ``` + + or if TLS is enabled: + + ```sh + redis-cli -h -p -a --tls --insecure --cert --key PING + ``` + +1. If the client machine cannot connect, try to connect to the database from one of the cluster nodes: + + ```sh + redis-cli -h -p -a PING + ``` + +1. If the cluster node is also unable to connect to the database, [contact Redis support](https://redis.com/company/support/). + +1. If the client fails to connect, but the cluster node succeeds, perform health checks on the client and network. + +#### Firewall access + +1. Run one of the following commands to verify that database access is not blocked by a firewall on the client machine or cluster: + + ```sh + iptables -L + ``` + + ```sh + ufw status + ``` + + ```sh + firewall-cmd –list-all + ``` + +1. To resolve firewall issues: + + 1. If a firewall is configured for your database, add the client IP address to the firewall rules. + + 1. Configure third-party firewalls and external proxies to allow the cluster FQDN, database endpoint IP address, and database ports. + +## Troubleshoot latency + +#### Server-side latency + +- Make sure the database's used memory does not reach the configured database max memory limit. For more details, see [Database memory limits]({{< relref "/operate/rs/databases/memory-performance/memory-limit" >}}). + +- Try to correlate the time of the latency with any surge in the following metrics: + + - Number of connections + + - Used memory + + - Evicted keys + + - Expired keys + +- Run [`SLOWLOG GET`]({{< relref "/commands/slowlog-get" >}}) using [`redis-cli`]({{< relref "/operate/rs/references/cli-utilities/redis-cli" >}}) to identify slow commands such as [`KEYS`]({{< relref "/commands/keys" >}}) or [`HGETALL`]({{< relref "/commands/hgetall" >}}: + + ```sh + redis-cli -h -p -a SLOWLOG GET + ``` + + Consider using alternative commands such as [`SCAN`]({{< relref "/commands/scan" >}}), [`SSCAN`]({{< relref "/commands/sscan" >}}), [`HSCAN`]({{< relref "/commands/hscan" >}}) and [`ZSCAN`]({{< relref "/commands/zscan" >}}) + +- Keys with large memory footprints can cause latency. To identify such keys, compare the keys returned by [`SLOWLOG GET`]({{< relref "/commands/slowlog-get" >}}) with the output of the following commands: + + ```sh + redis-cli -h -p -a --memkeys + ``` + + ```sh + redis-cli -h -p -a --bigkeys + ``` + +- For additional diagnostics, see: + + - [Diagnosing latency issues]({{< relref "/operate/oss_and_stack/management/optimization/latency" >}}) + + - [View Redis slow log]({{< relref "/operate/rs/clusters/logging/redis-slow-log" >}}) + +#### Client-side latency + +Verify the following: + +- There is no memory or CPU pressure on the client host. + +- The client uses a connection pool instead of frequently opening and closing connections. + +- The client does not erroneously open multiple connections that can pressure the client or server. diff --git a/content/operate/rs/7.4/databases/create.md b/content/operate/rs/7.4/databases/create.md new file mode 100644 index 0000000000..b8d55b1e24 --- /dev/null +++ b/content/operate/rs/7.4/databases/create.md @@ -0,0 +1,101 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +db_type: database +description: Create a database with Redis Enterprise Software. +linkTitle: Create a database +title: Create a Redis Enterprise Software database +toc: 'true' +weight: 10 +url: '/operate/rs/7.4/databases/create/' +--- +Redis Enterprise Software lets you create databases and distribute them across a cluster of nodes. + +To create a new database: + +1. Sign in to the Cluster Manager UI at `https://:8443` + +1. Use one of the following methods to create a new database: + + - [Quick database](#quick-database) + + - [Create database](#create-database) with additional configuration + +1. If you did not specify a port number for the database, you can find the port number in the **Endpoint** field in the **Databases > Configuration > General** section. + +1. [Test client connectivity]({{< relref "/operate/rs/databases/connect/test-client-connectivity" >}}). + + +{{< note >}} +For databases with Active-Active replication for geo-distributed locations, +see [Create an Active-Active database]({{< relref "/operate/rs/databases/active-active/create.md" >}}). To create and manage Active-Active databases, use the legacy UI. +{{< /note >}} + +## Quick database + +To quickly create a database and skip additional configuration options during initial creation: + +1. On the **Databases** screen, select **Quick database**. + +1. Select a Redis version from the **Database version** list. + +1. Configure settings that are required for database creation but can be changed later: + + - Database name + + - Memory limit (GB) + +2. Configure optional settings that can't be changed after database creation: + + - Endpoint port (set by the cluster if not set manually) + + - Capabilities (previously modules) to enable + +1. Optionally select **Full options** to configure [additional settings]({{< relref "/operate/rs/databases/configure#config-settings" >}}). + +1. Select **Create**. + +## Create database + +To create a new database and configure additional settings: + +1. Open the **Create database** menu with one of the following methods: + + - Click the **+** button next to **Databases** in the navigation menu: + + {{Create database menu has two options: Single Region and Active-Active database.}} + + - Go to the **Databases** screen and select **Create database**: + + {{Create database menu has two options: Single Region and Active-Active database.}} + +1. Select the database type: + + - **Single Region** + + - **Active-Active database** - Multiple participating Redis Enterprise clusters can host instances of the same [Active-Active database]({{< relref "/operate/rs/databases/active-active" >}}) in different geographic locations. Every instance can receive write operations, which are synchronized across all instances without conflict. + + {{}} +For Active-Active databases, see [Create an Active-Active geo-replicated database]({{< relref "/operate/rs/databases/active-active/create" >}}). + {{}} + +1. Select a Redis version from the **Database version** list. + +1. Enter a **Database name**. + + - Maximum of 63 characters + + - Only letters, numbers, or hyphens (-) are valid characters + + - Must start and end with a letter or digit + + - Case-sensitive + +1. To configure additional database settings, expand each relevant section to make changes. + + See [Configuration settings]({{< relref "/operate/rs/databases/configure#config-settings" >}}) for more information about each setting. + +1. Select **Create**. diff --git a/content/operate/rs/7.4/databases/delete.md b/content/operate/rs/7.4/databases/delete.md new file mode 100644 index 0000000000..16d6fc6a5b --- /dev/null +++ b/content/operate/rs/7.4/databases/delete.md @@ -0,0 +1,22 @@ +--- +Title: Delete databases +alwaysopen: false +categories: +- docs +- operate +- rs +description: Delete a database from the Cluster Manager UI. +linktitle: Delete +weight: 36 +url: '/operate/rs/7.4/databases/delete/' +--- + +When you delete a database, both the database configuration and data are removed. + +To delete a database from the Cluster Manager UI: + +1. From the **Databases** list, select the database, then select **Configuration**. + +1. Select {{< image filename="/images/rs/icons/delete-icon.png#no-click" alt="Delete button" width="22px" class="inline" >}} **Delete**. + +1. In the **Delete database** dialog, confirm deletion. diff --git a/content/operate/rs/7.4/databases/durability-ha/_index.md b/content/operate/rs/7.4/databases/durability-ha/_index.md new file mode 100644 index 0000000000..0f074045f7 --- /dev/null +++ b/content/operate/rs/7.4/databases/durability-ha/_index.md @@ -0,0 +1,39 @@ +--- +Title: Durability and high availability +alwaysopen: false +categories: +- docs +- operate +- rs +description: Overview of Redis Enterprise durability features such as replication, + clustering, and rack-zone awareness. +hideListLinks: true +linktitle: Durability and availability +weight: 60 +url: '/operate/rs/7.4/databases/durability-ha/' +--- +Redis Enterprise Software comes with several features that make your data more durable and accessible. The following features can help protect your data in cases of failures or outages and help keep your data available when you need it. + +## Replication + +When you [replicate your database]({{}}), each database instance (shard) is copied one or more times. Your database will have one primary shard and one or more replica shards. When a primary shard fails, Redis Enterprise automatically promotes a replica shard to primary. + +## Clustering + +[Clustering]({{}}) (or sharding) breaks your database into individual instances (shards) and spreads them across several nodes. Clustering lets you add resources to your cluster to scale your database and prevents node failures from causing availability loss. + +## Database persistence + +[Database persistence]({{}}) gives your database durability against process or server failures by saving data to disk at set intervals. + +## Active-Active geo-distributed replication + +[Active-Active Redis Enterprise databases]({{}}) distribute your replicated data across multiple nodes and availability zones. This increases the durability of your database by reducing the likelihood of data or availability loss. It also reduces data access latency. + +## Rack-zone awareness + +[Rack-zone awareness]({{}}) maps each node in your Redis Enterprise cluster to a physical rack or logical zone. The cluster uses this information to distribute primary shards and their replica shards in different racks or zones. This ensures data availability if a rack or zone fails. + +## Discovery service + +The [discovery service]({{}}) provides an IP-based connection management service used when connecting to Redis Enterprise Software databases. It lets your application discover which node hosts the database endpoint. The discovery service API complies with the [Redis Sentinel API]({{< relref "/operate/oss_and_stack/management/sentinel" >}}#sentinel-api). diff --git a/content/operate/rs/7.4/databases/durability-ha/clustering.md b/content/operate/rs/7.4/databases/durability-ha/clustering.md new file mode 100644 index 0000000000..2f130f539d --- /dev/null +++ b/content/operate/rs/7.4/databases/durability-ha/clustering.md @@ -0,0 +1,178 @@ +--- +Title: Database clustering +alwaysopen: false +categories: +- docs +- operate +- rs +description: Clustering to allow customers to spread the load of a Redis process over + multiple cores and the RAM of multiple servers. +linktitle: Clustering +weight: 10 +url: '/operate/rs/7.4/databases/durability-ha/clustering/' +--- +Source available [Redis](https://redislabs.com/redis-features/redis) 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. + +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. + +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. + +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. + +## Terminology + +In clustering, these terms are commonly used: + +- Tag or Hash Tag - A part of the key that is used in the hash calculation. +- Slot or Hash Slot - The result of the hash calculation. +- Shard - Redis process that is part of the Redis clustered database. + +## When to use clustering (sharding) + +Clustering is an efficient way of scaling Redis that should be used when: + +- 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. +- 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. + +## Number of shards + +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. + +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. + +## Supported hashing policies + +### Standard hashing policy + +When using the standard hashing policy, a clustered Redis Enterprise database behaves similarly to a standard [Redis Community Edition cluster]({{< relref "/operate/oss_and_stack/reference/cluster-spec" >}}#hash-tags), 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. + +- **Keys with a hash tag**: a key's hash tag is any substring between + `{` and `}` in the key's name. When a key's name + includes the pattern `{...}`, the hash tag is used as input for the + hashing function. + + For example, the following key names have the same + hash tag and map to the same hash slot: `foo{bar}`, + `{bar}baz`, and `foo{bar}baz`. + +- **Keys without a hash tag**: when a key does not contain the `{...}` + pattern, the entire key's name is used for hashing. + +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. + +### Custom hashing policy + +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. + +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. + +After you enable the custom hashing policy, the following default RegEx +rules are implemented. Update these rules to fit your specific logic: + +| RegEx Rule | Description | +| ------ | ------ | +| .\*{(?\.\*)}.\* | Hashing is done on the substring between the curly braces. | +| (?\.\*) | The entire key's name is used for hashing. | + +You can modify existing rules, add new ones, delete rules, or change +their order to suit your application's requirements. + +### Custom hashing policy notes and limitations + +1. You can define up to 32 RegEx rules, each up to 256 characters. +2. 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. +3. Key names that do not match any of the RegEx rules trigger an + error. +4. The '.\*(?\)' 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. +5. 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. + +## Change the hashing policy + +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. + +Examples of such changes include: + +- Changing the hashing policy from standard to custom or conversely, + custom to standard. +- Changing the order of custom hashing policy rules. +- Adding new rules in the custom hashing policy. +- Deleting rules from the custom hashing policy. + +{{< note >}} +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. +{{< /note >}} + +## Multi-key operations {#multikey-operations} + +Operations on multiple keys in a clustered database are supported with +the following limitations: + +- **Multi-key commands**: 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 **are allowed** across slots: DEL, MSET, MGET, EXISTS, UNLINK, TOUCH + + 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 **are allowed** across slots in Active-Active databases: MGET, EXISTS, and TOUCH. + + Commands that affect all keys or keys that match a specified pattern are allowed + in a clustered database, for example: FLUSHDB, FLUSHALL, KEYS + + {{< note >}} +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. + {{< /note >}} + +- **Geo commands**: For the [GEORADIUS]({{< relref "/commands/georadius" >}}) and + [GEORADIUSBYMEMBER]({{< relref "/commands/georadiusbymember" >}}) commands, the + STORE and STOREDIST options can only be used when all affected keys + reside in the same slot. +- **Transactions**: All operations within a WATCH / MULTI / EXEC block + should be performed on keys that are mapped to the same slot. +- **Lua scripts**: 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. +- **Renaming/Copy keys**: 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. diff --git a/content/operate/rs/7.4/databases/durability-ha/consistency.md b/content/operate/rs/7.4/databases/durability-ha/consistency.md new file mode 100644 index 0000000000..267b6c4be3 --- /dev/null +++ b/content/operate/rs/7.4/databases/durability-ha/consistency.md @@ -0,0 +1,52 @@ +--- +Title: Consistency during replication +alwaysopen: false +categories: +- docs +- operate +- rs +description: 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. +linkTitle: Consistency +weight: 20 +url: '/operate/rs/7.4/databases/durability-ha/consistency/' +--- +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 [`WAIT`]({{}}) command, you can +control the consistency and durability guarantees for the replicated and +persisted database. + +## Non-blocking Redis write operation + +Any updates that are issued to the database are typically performed with the following flow: + +1. The application issues a write. +2. The proxy communicates with the correct primary (also known as master) shard in the system that contains the given key. +3. The shard writes the data and sends an acknowledgment to the proxy. +4. The proxy sends the acknowledgment back to the application. +5. The write is communicated from the primary shard to the replica. +6. The replica acknowledges the write back to the primary shard. +7. The write to a replica is persisted to disk. +8. The write is acknowledged within the replica. + +{{< image filename="/images/rs/weak-consistency.png" >}} + +## Blocking write operation on replication + +With the [`WAIT`]({{}}) or [`WAITAOF`]({{}}) 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 `WAIT` or `WAITAOF` is: + +1. The application issues a write. +2. The proxy communicates with the correct primary shard in the system that contains the given key. +3. Replication communicates the update to the replica shard. +4. If using `WAITAOF` and the AOF every write setting, the replica persists the update to disk before sending the acknowledgment. +5. The acknowledgment is sent back from the replica all the way to the proxy with steps 5 to 8. + +The application only gets the acknowledgment from the write after durability is achieved with replication to the replica for `WAIT` or `WAITAOF` and to the persistent storage for `WAITAOF` only. + +{{< image filename="/images/rs/strong-consistency.png" >}} + +The `WAIT` command always returns the number of replicas that acknowledged the write commands sent by the current client before the `WAIT` 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. + +See the [`WAITAOF`]({{}}) command for details for enhanced data safety and durability capabilities introduced with Redis 7.2. diff --git a/content/operate/rs/7.4/databases/durability-ha/discovery-service.md b/content/operate/rs/7.4/databases/durability-ha/discovery-service.md new file mode 100644 index 0000000000..63b065064e --- /dev/null +++ b/content/operate/rs/7.4/databases/durability-ha/discovery-service.md @@ -0,0 +1,107 @@ +--- +Title: Discovery service +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +linktitle: Discovery service +weight: 30 +url: '/operate/rs/7.4/databases/durability-ha/discovery-service/' +--- +The Discovery Service provides an IP-based connection management service +used when connecting to Redis Enterprise Software databases. When used +in conjunction with Redis Enterprise Software's other high availability +features, the Discovery Service assists an application scope with +topology changes such as adding, removing of nodes, node failovers and +so on. It does this by providing your application with the ability to +easily discover which node hosts the database endpoint. The API used for +discovery service is compliant with the Redis Sentinel API. + +Discovery Service is an alternative for applications that do not want to +depend on DNS name resolution for their connectivity. Discovery Service +and DNS based connectivity are not mutually exclusive. They can be used +side by side in a given cluster where some clients can use Discovery +Service based connection while others can use DNS name resolution when +connecting to databases. + +## How discovery service works + +The Discovery Service is available for querying on each node of the +cluster, listening on port 8001. To employ it, your application utilizes +a [Redis Sentinel enabled client +library]({{< relref "/operate/rs/databases/connect/supported-clients-browsers.md" >}}) +to connect to the Discovery Service and request the endpoint for the +given database. The Discovery Service replies with the database's +endpoint for that database. In case of a node failure, the Discovery +Service is updated by the cluster manager with the new endpoint and +clients unable to connect to the database endpoint due to the failover, +can re-query the discovery service for the new endpoint for the +database. + +The Discovery Service can return either the internal or external +endpoint for a database. If you query the discovery service for the +endpoint of a database named "db1", the Discovery Service returns +the external endpoint information by default. If only an internal +endpoint exists with no external endpoint the default behavior is to +return the internal endpoint. The "\@internal" is added to the end of +the database name to explicitly ask for the internal endpoint. to query +the internal endpoint explicitly with database name "db1", you can pass +in the database name as "db1\@internal". + +If you'd like to examine the metadata returned from Redis Enterprise +Software Discovery Service you can connect to port 8001 with redis-cli +utility and execute "SENTINEL masters". Following is a sample output +from one of the nodes of a Redis Enterprise Software cluster: + +```sh +$ ./redis-cli -p 8001 +127.0.0.1:8001> SENTINEL masters +1) 1) "name" +2) "db1@internal" +3) "ip" +4) "10.0.0.45" +5) "port" +6) "12000" +7) "flags" +8) "master,disconnected" +9) "num-other-sentinels" +10) "0" +2) 1) "name" +2) "db1" +3) "ip" +4) "10.0.0.45" +5) "port" +6) "12000" +7) "flags" +8) "master,disconnected" +9) "num-other-sentinels" +10) "0" +``` + +It is important to note that, the Discovery Service is not a full +implementation of the [Redis Sentinel +protocol]({{< relref "/operate/oss_and_stack/management/sentinel" >}}). There are aspects of the +protocol that are not applicable or would be duplication with existing +technology in Redis Enterprise Software. The Discovery Service +implements only the parts required to provide applications with easy +High Availability, be compatible with the protocol, and not rely on DNS +to derive which node in the cluster to communicate with. + +{{< note >}} +To use Redis Sentinel, every database name must be unique across the cluster. +{{< /note >}} + +## Redis client support + +We recommend these clients that are tested for use with the [Discovery Service]({{< relref "/operate/rs/databases/durability-ha/discovery-service.md" >}}) that uses the Redis Sentinel API: + +{{< embed-md "discovery-clients.md" >}} + +{{< note >}} +Redis Sentinel API can return endpoints for both master and replica +endpoints. +Discovery Service only supports master endpoints and does not +support returning replica endpoints for a database. +{{< /note >}} diff --git a/content/operate/rs/7.4/databases/durability-ha/replication.md b/content/operate/rs/7.4/databases/durability-ha/replication.md new file mode 100644 index 0000000000..79e867ecab --- /dev/null +++ b/content/operate/rs/7.4/databases/durability-ha/replication.md @@ -0,0 +1,95 @@ +--- +Title: Database replication +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +linktitle: Replication +weight: 40 +url: '/operate/rs/7.4/databases/durability-ha/replication/' +--- +Database replication helps ensure high availability. +When replication is enabled, your dataset is replicated to a replica shard, +which is constantly synchronized with the primary shard. If the primary +shard fails, an automatic failover happens and the replica shard is promoted. That is, it becomes the new primary shard. + +When the old primary shard recovers, it becomes +the replica shard of the new primary shard. This auto-failover mechanism +guarantees that data is served with minimal interruption. + +You can tune your high availability configuration with: + +- [Rack/Zone +Awareness]({{< relref "/operate/rs/clusters/configure/rack-zone-awareness.md" >}}) - When rack-zone awareness is used additional logic ensures that master and replica shards never share the same rack, thus ensuring availability even under loss of an entire rack. +- [High Availability for Replica Shards]({{< relref "/operate/rs/databases/configure/replica-ha.md" >}}) - When high availability +for replica shards is used, the replica shard is automatically migrated on node failover to maintain high availability. + +{{< warning >}} +Enabling replication has implications for the total database size, +as explained in [Database memory limits]({{< relref "/operate/rs/databases/memory-performance/memory-limit.md" >}}). +{{< /warning >}} + +## Auto Tiering replication considerations + +We recommend that you set the sequential replication feature using +`rladmin`. This is due to the potential for relatively slow replication +times that can occur with Auto Tiering enabled databases. In some +cases, if sequential replication is not set up, you may run out of memory. + +While it does not cause data loss on the +primary shards, the replication to replica shards may not succeed as long +as there is high write-rate traffic on the primary and multiple +replications at the same time. + +The following `rladmin` command sets the number of primary shards eligible to +be replicated from the same cluster node, as well as the number of replica +shards on the same cluster node that can run the replication process at +any given time. + +The recommended sequential replication configuration is two, i.e.: + +```sh +rladmin tune cluster max_redis_forks 1 max_slave_full_syncs 1 +``` + +{{< note >}} +This means that at any given time, +only one primary and one replica can be part of a full sync replication process. +{{< /note >}} + +## Database replication backlog + +Redis databases that use [replication for high availability]({{< relref "/operate/rs/databases/durability-ha/replication.md" >}}) maintain a replication backlog (per shard) to synchronize the primary and replica shards of a database. +By default, the replication backlog is set to one percent (1%) of the database size divided by the database number of shards and ranges between 1MB to 250MB per shard. +Use the [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) and the [`crdb-cli`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}}) utilities to control the size of the replication backlog. You can set it to `auto` or set a specific size. + +The syntax varies between regular and Active-Active databases. + +For a regular Redis database: +```text +rladmin tune db repl_backlog +``` + +For an Active-Active database: +```text +crdb-cli crdb update --crdb-guid --default-db-config "{\"repl_backlog_size\": }" +``` + +### Active-Active replication backlog + +In addition to the database replication backlog, Active-Active databases maintain a backlog (per shard) to synchronize the database instances between clusters. +By default, the Active-Active replication backlog is set to one percent (1%) of the database size divided by the database number of shards, and ranges between 1MB to 250MB per shard. +Use the [`crdb-cli`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}}) utility to control the size of the CRDT replication backlog. You can set it to `auto` or set a specific size: + +```text +crdb-cli crdb update --crdb-guid --default-db-config "{\"crdt_repl_backlog_size\": }" +``` + +**For Redis Software versions earlier than 6.0.20:** +The replication backlog and the CRDT replication backlog defaults are set to 1MB and cannot be set dynamically with 'auto' mode. +To control the size of the replication log, use [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) to tune the local database instance in each cluster. +```text +rladmin tune db repl_backlog +``` diff --git a/content/operate/rs/7.4/databases/import-export/_index.md b/content/operate/rs/7.4/databases/import-export/_index.md new file mode 100644 index 0000000000..4abf157724 --- /dev/null +++ b/content/operate/rs/7.4/databases/import-export/_index.md @@ -0,0 +1,13 @@ +--- +Title: Import and export data +alwaysopen: false +categories: +- docs +- operate +- rs +description: How to import, export, flush, and migrate your data. +hideListLinks: false +linkTitle: Import and export +weight: 30 +url: '/operate/rs/7.4/databases/import-export/' +--- diff --git a/content/operate/rs/7.4/databases/import-export/export-data.md b/content/operate/rs/7.4/databases/import-export/export-data.md new file mode 100644 index 0000000000..dfad691e2f --- /dev/null +++ b/content/operate/rs/7.4/databases/import-export/export-data.md @@ -0,0 +1,224 @@ +--- +Title: Export data from a database +alwaysopen: false +categories: +- docs +- operate +- rs +description: You can export data to import it into a new database or to make a backup. This + article shows how to do so. +linktitle: Export data +weight: 20 +url: '/operate/rs/7.4/databases/import-export/export-data/' +--- + +You can export the data from a specific database at any time. The following destinations are supported: + +- FTP server +- SFTP server +- Amazon AWS S3 +- Local mount point +- Azure Blob Storage +- Google Cloud Storage + +If you export a database configured for database clustering, export files are created for each shard. + +## Storage space requirements + +Before exporting data, verify that you have enough space available in the storage destination and on the local storage associated with the node hosting the database. + +Export is a two-step process: a temporary copy of the data is saved to the local storage of the node and then copied to the storage destination. (The temporary file is removed after the copy operation.) + +Export fails when there isn't enough space for either step. + +## Export database data + +To export data from a database using the Cluster Manager UI: + +1. On the **Databases** screen, select the database from the list, then select **Configuration**. + +1. Click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="Toggle actions button" width="22px" class="inline" >}} to open a list of additional actions. + +1. Select **Export**. + +1. Select the tab that corresponds to your storage location type and enter the location details. + + See [Supported storage locations](#supported-storage-locations) for more information about each storage location type. + +1. Select **Export**. + +## Supported storage locations {#supported-storage-locations} + +Data can be exported to a local mount point, transferred to [a URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) using FTP/SFTP, or stored on cloud provider storage. + +When saved to a local mount point or a cloud provider, export locations need to be available to [the group and user]({{< relref "/operate/rs/installing-upgrading/install/customize-user-and-group.md" >}}) running Redis Enterprise Software, `redislabs:redislabs` by default. + +Redis Enterprise Software needs the ability to view permissions and update objects in the storage location. Implementation details vary according to the provider and your configuration. To learn more, consult the provider's documentation. + +The following sections provide general guidelines. Because provider features change frequently, use your provider's documentation for the latest info. + +### FTP server + +Before exporting data to an FTP server, verify that: + +- Your Redis Enterprise cluster can connect and authenticate to the FTP server. +- The user specified in the FTP server location has permission to read and write files to the server. + +To export data to an FTP server, set **Path** using the following syntax: + +```sh +[protocol]://[username]:[password]@[host]:[port]/[path]/ +``` + +Where: + +- *protocol*: the server's protocol, can be either `ftp` or `ftps`. +- *username*: your username, if needed. +- *password*: your password, if needed. +- *hostname*: the hostname or IP address of the server. +- *port*: the port number of the server, if needed. +- *path*: the export destination path, if needed. + +Example: `ftp://username:password@10.1.1.1/home/exports/` + +### Local mount point + +Before exporting data to a local mount point, verify that: + +- The node can connect to the server hosting the mount point. +- The `redislabs:redislabs` user has permission to read and write files to the local mount point and to the destination server. +- The export location has enough disk space for your exported data. + +To export to a local mount point: + +1. On each node in the cluster, create the mount point: + 1. Connect to the node's terminal. + 1. Mount the remote storage to a local mount point. + + For example: + + ```sh + sudo mount -t nfs 192.168.10.204:/DataVolume/Public /mnt/Public + ``` + +1. In the path for the export location, enter the mount point. + + For example: `/mnt/Public` + +### SFTP server + +Before exporting data to an SFTP server, make sure that: + +- Your Redis Enterprise cluster can connect and authenticate to the SFTP server. +- The user specified in the SFTP server location has permission to read and write files to the server. +- The SSH private keys are specified correctly. You can use the key generated by the cluster or specify a custom key. + + To use the cluster auto generated key: + + 1. Go to **Cluster > Security > Certificates**. + + 1. Expand **Cluster SSH Public Key**. + + 1. Download or copy the cluster SSH public key to the appropriate location on the SFTP server. + + Use the server documentation to determine the appropriate location for the SSH public key. + +To export data to an SFTP server, enter the SFTP server location in the format: + +```sh +sftp://[username]:[password]@[host]:[port]/[path]/ +``` + +Where: + +- *username*: your username, if needed. +- *password*: your password, if needed. +- *hostname*: the hostname or IP address of the server. +- *port*: the port number of the server, if needed. +- *path*: the export destination path, if needed. + +For example: `sftp://username:password@10.1.1.1/home/exports/` + +### AWS Simple Storage Service + +To export data to an [Amazon Web Services](https://aws.amazon.com/) (AWS) Simple Storage Service (S3) bucket: + +1. Sign in to the [AWS console](https://console.aws.amazon.com/). + +1. [Create an S3 bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html) if you do not already have one. + +1. [Create an IAM User](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_console) with permission to add objects to the bucket. + +1. [Create an access key](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey) for that user if you do not already have one. + +1. In the Redis Enterprise Software Cluster Manager UI, when you enter the export location details: + + - Select **AWS S3**. + + - In the **Path** field, enter the path of your bucket. + + - In the **Access key ID** field, enter the access key ID. + + - In the **Secret access key** field, enter the secret access key. + +You can also connect to a storage service that uses the S3 protocol but is not hosted by Amazon AWS. The storage service must have a valid SSL certificate. To connect to an S3-compatible storage location, run [`rladmin cluster config`]({{}}): + +```sh +rladmin cluster config s3_url +``` + +Replace `` with the hostname or IP address of the S3-compatible storage location. + +### Google Cloud Storage + +To export to a [Google Cloud](https://developers.google.com/console/) storage bucket: + +1. Sign in to the Google Cloud console. + +1. [Create a JSON service account key](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating) if you do not already have one. + +1. [Create a bucket](https://cloud.google.com/storage/docs/creating-buckets#create_a_new_bucket) if you do not already have one. + +1. [Add a principal](https://cloud.google.com/storage/docs/access-control/using-iam-permissions#bucket-add) to your bucket: + + - In the **New principals** field, add the `client_email` from the service account key. + + - Select "Storage Legacy Bucket Writer" from the **Role** list. + +1. In the Redis Enterprise Software Cluster Manager UI, when you enter the export location details: + + - Select **Google Cloud Storage**. + + - In the **Path** field, enter the path of your bucket. + + - In the **Client ID** field, enter the `client_id` from the service account key. + + - In the **Client Email** field, enter the `client_email` from the service account key. + + - In the **Private Key ID** field, enter the `private_key_id` from the service account key. + + - In the **Private key** field, enter the `private_key` from the service account key. + Replace `\n` with new lines. + + +### Azure Blob Storage + +To export to Microsoft Azure Blob Storage, sign in to the Azure portal and then: + +1. [Create an Azure Storage account](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create) if you do not already have one. + +1. [Create a container](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container) if you do not already have one. + +1. [Manage storage account access keys](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage) to find the storage account name and account keys. + +1. In the Redis Enterprise Software Cluster Manager UI, when you enter the export location details: + + - Select **Azure Blob Storage**. + + - In the **Path** field, enter the path of your bucket. + + - In the **Account name** field, enter your storage account name. + + - In the **Account key** field, enter the storage account key. + +To learn more, see [Authorizing access to data in Azure Storage](https://docs.microsoft.com/en-us/azure/storage/common/storage-auth). diff --git a/content/operate/rs/7.4/databases/import-export/flush.md b/content/operate/rs/7.4/databases/import-export/flush.md new file mode 100644 index 0000000000..a19f2d4559 --- /dev/null +++ b/content/operate/rs/7.4/databases/import-export/flush.md @@ -0,0 +1,129 @@ +--- +Title: Flush database data +alwaysopen: false +categories: +- docs +- operate +- rs +description: To delete the data in a database without deleting the database, you can + use Redis CLI to flush it from the database. You can also use Redis CLI, the admin + console, and the Redis Software REST API to flush data from Active-Active databases. +linkTitle: Flush database +weight: 40 +url: '/operate/rs/7.4/databases/import-export/flush/' +--- +To delete the data in a database without deleting the database configuration, +you can flush the data from the database. + +You can use the Cluster Manager UI to flush data from Active-Active databases. + +{{< warning title="Data Loss Warning" >}} +The flush command deletes ALL in-memory and persistence data in the database. +We recommend that you [back up your database]({{< relref "/operate/rs/databases/import-export/schedule-backups.md" >}}) before you flush the data. +{{< /warning >}} + +## Flush data from a database + +From the command line, you can flush a database with the redis-cli command or with your favorite Redis client. + +To flush data from a database with the redis-cli, run: + +```sh +redis-cli -h -p -a flushall +``` + +Example: + +```sh +redis-cli -h redis-12345.cluster.local -p 9443 -a xyz flushall +``` + +{{< note >}} +Port 9443 is the default [port configuration]({{< relref "/operate/rs/networking/port-configurations#https://docs.redis.com/latest/rs/networking/port-configurations#ports-and-port-ranges-used-by-redis-enterprise-software" >}}). +{{< /note >}} + + +## Flush data from an Active-Active database + +When you flush an Active-Active database (formerly known as CRDB), all of the replicas flush their data at the same time. + +To flush data from an Active-Active database: + +- Cluster Manager UI + + 1. If you are using the new Cluster Manager UI, switch to the legacy admin console. + + {{Select switch to legacy admin console from the dropdown.}} + + 1. Go to **database** and select the Active-Active database that you want to flush. + 1. Go to **configuration** and click **Flush** at the bottom of the page. + 1. Enter the name of the Active-Active database to confirm that you want to flush the data. + +- Command line + + 1. To find the ID of the Active-Active database, run: + + ```sh + crdb-cli crdb list + ``` + + For example: + + ```sh + $ crdb-cli crdb list + CRDB-GUID NAME REPL-ID CLUSTER-FQDN + a16fe643-4a7b-4380-a5b2-96109d2e8bca crdb1 1 cluster1.local + a16fe643-4a7b-4380-a5b2-96109d2e8bca crdb1 2 cluster2.local + a16fe643-4a7b-4380-a5b2-96109d2e8bca crdb1 3 cluster3.local + ``` + + 1. To flush the Active-Active database, run: + + ```sh + crdb-cli crdb flush --crdb-guid + ``` + + The command output contains the task ID of the flush task, for example: + + ```sh + $ crdb-cli crdb flush --crdb-guid a16fe643-4a7b-4380-a5b2-96109d2e8bca + Task 63239280-d060-4639-9bba-fc6a242c19fc created + ---> Status changed: queued -> started + ``` + + 1. To check the status of the flush task, run: + + ```sh + crdb-cli task status --task-id + ``` + + For example: + + ```sh + $ crdb-cli task status --task-id 63239280-d060-4639-9bba-fc6a242c19fc + Task-ID: 63239280-d060-4639-9bba-fc6a242c19fc + CRDB-GUID: - + Status: finished + ``` + +- REST API + + 1. To find the ID of the Active-Active database, use [`GET /v1/crdbs`]({{< relref "/operate/rs/references/rest-api/requests/crdbs#get-all-crdbs" >}}): + + ```sh + GET https://[host][:port]/v1/crdbs + ``` + + 1. To flush the Active-Active database, use [`PUT /v1/crdbs/{guid}/flush`]({{< relref "/operate/rs/references/rest-api/requests/crdbs/flush#put-crdbs-flush" >}}): + + ```sh + PUT https://[host][:port]/v1/crdbs//flush + ``` + + The command output contains the task ID of the flush task. + + 1. To check the status of the flush task, use [`GET /v1/crdb_tasks`]({{< relref "/operate/rs/references/rest-api/requests/crdb_tasks#get-crdb_task" >}}): + + ```sh + GET https://[host][:port]/v1/crdb_tasks/ + ``` diff --git a/content/operate/rs/7.4/databases/import-export/import-data.md b/content/operate/rs/7.4/databases/import-export/import-data.md new file mode 100644 index 0000000000..f7b9fc12b0 --- /dev/null +++ b/content/operate/rs/7.4/databases/import-export/import-data.md @@ -0,0 +1,224 @@ +--- +Title: Import data into a database +alwaysopen: false +categories: +- docs +- operate +- rs +description: You can import export or backup files of a specific Redis Enterprise + Software database to restore data. You can either import from a single file or from + multiple files, such as when you want to import from a backup of a clustered database. +linktitle: Import data +weight: 10 +url: '/operate/rs/7.4/databases/import-export/import-data/' +--- +You can import, [export]({{< relref "/operate/rs/databases/import-export/export-data" >}}), +or [backup]({{< relref "/operate/rs/databases/import-export/schedule-backups" >}}) +files of a specific Redis Enterprise Software database to restore data. +You can either import from a single file or from multiple files, +such as when you want to import from a backup of a clustered database. + +{{< warning >}} +Importing data erases all existing content in the database. +{{< /warning >}} + +## Import data into a database + +To import data into a database using the Cluster Manager UI: + +1. On the **Databases** screen, select the database from the list, then select **Configuration**. +1. Click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="Toggle actions button" width="22px" class="inline" >}} to open a list of additional actions. +1. Select **Import**. +1. Select the tab that corresponds to your storage location type and enter the location details. + + See [Supported storage locations](#supported-storage-locations) for more information about each storage location type. +1. Select **Import**. + +## Supported storage locations {#supported-storage-services} + +Data can be imported from a local mount point, transferred to [a URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) using FTP/SFTP, or stored on cloud provider storage. + +When importing from a local mount point or a cloud provider, import locations need to be available to [the group and user]({{< relref "/operate/rs/installing-upgrading/install/customize-user-and-group.md" >}}) running Redis Enterprise Software, `redislabs:redislabs` by default. + +Redis Enterprise Software needs the ability to view objects in the storage location. Implementation details vary according to the provider and your configuration. To learn more, consult the provider's documentation. + +The following sections provide general guidelines. Because provider features change frequently, use your provider's documentation for the latest info. + +### FTP server + +Before importing data from an FTP server, make sure that: + +- Your Redis Enterprise cluster can connect and authenticate to the FTP server. +- The user that you specify in the FTP server location has permission to read files from the server. + +To import data from an FTP server, set **RDB file path/s** using the following syntax: + +```sh +[protocol]://[username]:[password]@[host]:[port]/[path]/[filename].rdb +``` + +Where: + +- *protocol*: the server's protocol, can be either `ftp` or `ftps`. +- *username*: your username, if needed. +- *password*: your password, if needed. +- *hostname*: the hostname or IP address of the server. +- *port*: the port number of the server, if needed. +- *path*: the file's location path. +- *filename*: the name of the file. + +Example: `ftp://username:password@10.1.1.1/home/backups/.rdb` + +Select **Add path** to add another import file path. + +### Local mount point + +Before importing data from a local mount point, make sure that: + +- The node can connect to the server hosting the mount point. + +- The `redislabs:redislabs` user has permission to read files on the local mount point and on the destination server. + +- You must mount the storage in the same path on all cluster nodes. You can also use local storage, but you must copy the imported files manually to all nodes because the import source folders on the nodes are not synchronized. + +To import from a local mount point: + +1. On each node in the cluster, create the mount point: + 1. Connect to the node's terminal. + 1. Mount the remote storage to a local mount point. + + For example: + + ```sh + sudo mount -t nfs 192.168.10.204:/DataVolume/Public /mnt/Public + ``` + +1. In the path for the import location, enter the mount point. + + For example: `/mnt/Public/.rdb` + +As of version 6.2.12, Redis Enterprise reads files directly from the mount point using a [symbolic link](https://en.wikipedia.org/wiki/Symbolic_link) (symlink) instead of copying them to a temporary directory on the node. + +Select **Add path** to add another import file path. + +### SFTP server + +Before importing data from an SFTP server, make sure that: + +- Your Redis Enterprise cluster can connect and authenticate to the SFTP server. +- The user that you specify in the SFTP server location has permission to read files from the server. +- The SSH private keys are specified correctly. You can use the key generated by the cluster or specify a custom key. + + To use the cluster auto generated key: + + 1. Go to **Cluster > Security > Certificates**. + + 1. Expand **Cluster SSH Public Key**. + + 1. Download or copy the cluster SSH public key to the appropriate location on the SFTP server. + + Use the server documentation to determine the appropriate location for the SSH public key. + +To import data from an SFTP server, enter the SFTP server location in the format: + +```sh +[protocol]://[username]:[password]@[host]:[port]/[path]/[filename].rdb +``` + +Where: + +- *protocol*: the server's protocol, can be either `ftp` or `ftps`. +- *username*: your username, if needed. +- *password*: your password, if needed. +- *hostname*: the hostname or IP address of the server. +- *port*: the port number of the server, if needed. +- *path*: the file's location path. +- *filename*: the name of the file. + +Example: `sftp://username:password@10.1.1.1/home/backups/[filename].rdb` + +Select **Add path** to add another import file path. + +### AWS Simple Storage Service {#aws-s3} + +Before you choose to import data from an [Amazon Web Services](https://aws.amazon.com/) (AWS) Simple Storage Service (S3) bucket, make sure you have: + +- The path to the file in your bucket in the format: `s3://[bucketname]/[path]/[filename].rdb` +- [Access key ID and Secret access key](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey) for an [IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_console) with permission to read files from the bucket. + +In the Redis Enterprise Software Cluster Manager UI, when you enter the export location details: + +- Select **AWS S3**. + +- In the **RDB file path/s** field, enter the path of your bucket. Select **Add path** to add another import file path. + +- In the **Access key ID** field, enter the access key ID. + +- In the **Secret access key** field, enter the secret access key. + +You can also connect to a storage service that uses the S3 protocol but is not hosted by Amazon AWS. The storage service must have a valid SSL certificate. To connect to an S3-compatible storage location, run [`rladmin cluster config`]({{}}): + +```sh +rladmin cluster config s3_url +``` + +Replace `` with the hostname or IP address of the S3-compatible storage location. + +### Google Cloud Storage + +Before you import data from a [Google Cloud](https://developers.google.com/console/) storage bucket, make sure you have: + +- Storage location path in the format: `/bucket_name/[path]/[filename].rdb` +- A [JSON service account key](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating) for your account +- A [principal](https://cloud.google.com/storage/docs/access-control/using-iam-permissions#bucket-add) for your bucket with the `client_email` from the service account key and a [role](https://cloud.google.com/storage/docs/access-control/iam-roles) with permissions to get files from the bucket (such as the **Storage Legacy Object Reader** role, which grants `storage.objects.get` permissions) + +In the Redis Enterprise Software Cluster Manager UI, when you enter the import location details: + +- Select **Google Cloud Storage**. + +- In the **RDB file path/s** field, enter the path of your file. Select **Add path** to add another import file path. + +- In the **Client ID** field, enter the `client_id` from the service account key. + +- In the **Client email** field, enter the `client_email` from the service account key. + +- In the **Private key id** field, enter the `private_key_id` from the service account key. + +- In the **Private key** field, enter the `private_key` from the service account key. + Replace `\n` with new lines. + +### Azure Blob Storage + +Before you choose to import from Azure Blob Storage, make sure that you have: + +- Storage location path in the format: `/container_name/[path/]/.rdb` +- Account name +- An authentication token, either an account key or an Azure [shared access signature](https://docs.microsoft.com/en-us/rest/api/storageservices/delegate-access-with-shared-access-signature) (SAS). + + To find the account name and account key, see [Manage storage account access keys](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage). + + Azure SAS support requires Redis Software version 6.0.20. To learn more about Azure SAS, see [Grant limited access to Azure Storage resources using shared access signatures](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview). + +In the Redis Enterprise Software Cluster Manager UI, when you enter the import location details: + +- Select **Azure Blob Storage**. + +- In the **RDB file path/s** field, enter the path of your file. Select **Add path** to add another import file path. + +- In the **Azure Account Name** field, enter your storage account name. + +- In the **Azure Account Key** field, enter the storage account key. + +## Importing into an Active-Active database + +When importing data into an Active-Active database, there are two options: + +- [Flush all data]({{< relref "/operate/rs/databases/import-export/flush#flush-data-from-an-active-active-database" >}}) from the Active-Active database, then import the data into the database. +- Import data but merge it into the existing database. + +Because Active-Active databases have a numeric counter data type, +when you merge the imported data into the existing data RS increments counters by the value that is in the imported data. +The import through the Redis Enterprise Cluster Manager UI handles these data types for you. + +You can import data into an Active-Active database [from the Cluster Manager UI](#import-data-into-a-database). +When you import data into an Active-Active database, there is a special prompt warning that the imported data will be merged into the existing database. diff --git a/content/operate/rs/7.4/databases/import-export/migrate-to-active-active.md b/content/operate/rs/7.4/databases/import-export/migrate-to-active-active.md new file mode 100644 index 0000000000..0b40aa1c7f --- /dev/null +++ b/content/operate/rs/7.4/databases/import-export/migrate-to-active-active.md @@ -0,0 +1,161 @@ +--- +Title: Migrate a database to Active-Active +alwaysopen: false +categories: +- docs +- operate +- rs +description: Use Replica Of to migrate your database to an Active-Active database. +linktitle: Migrate to Active-Active +weight: $weight +url: '/operate/rs/7.4/databases/import-export/migrate-to-active-active/' +--- + +If you have data in a single-region Redis Enterprise Software database that you want to migrate to an [Active-Active database]({{< relref "/operate/rs/databases/active-active" >}}), +you'll need to create a new Active-Active database and migrate the data into the new database as a [Replica Of]({{< relref "/operate/rs/databases/import-export/replica-of/" >}}) the existing database. +This process will gradually populate the data in the Active-Active database. + +Before data migration starts, all data is flushed from the Active-Active database. +The data is migrated to the Active-Active instance where you configured migration, and the data from that instance is copied to the other Active-Active instances. + +When data migration is finished, turn off migration and connect your applications to the Active-Active database. + +{{Active-Active data migration process}} + +## Prerequisites + +- During the migration, any applications that connect to the Active-Active database must be **read-only** to ensure the dataset is identical to the source database during the migration process. However, you can continue to write to the source database during the migration process. + +- If you used the mDNS protocol for the cluster name (FQDN), +the [client mDNS prerequisites]({{< relref "/operate/rs/networking/mdns" >}}) must be met in order to communicate with other clusters. + +## Migrate from a Redis Enterprise cluster + +You can migrate a Redis Enterprise database from the [same cluster](#migrate-from-the-same-cluster) or a [different cluster](#migrate-from-a-different-cluster). + +### Migrate from the same cluster + +To migrate a database to Active-Active in the same Redis Enterprise cluster: + +1. Create a new Active-Active database. For prerequisites and detailed instructions, see [Create an Active-Active geo-replicated database]({{< relref "/operate/rs/databases/active-active/create" >}}). + +1. After the Active-Active database is active, click **Edit** on the **Configuration** screen. + +1. Expand the **Migrate to Active-Active** section: + + {{Migrate to Active-Active section.}} + +1. Click **+ Add source database**. + +1. In the **Migrate to Active-Active** dialog, select **Current cluster**: + + {{Migrate to Active-Active dialog with Current cluster tab selected.}} + +1. Select the source database from the list. + +1. Click **Add source**. + +1. Click **Save**. + +### Migrate from a different cluster + +{{< note >}} +For a source database on a different Redis Enterprise Software cluster, +you can [compress the replication data]({{< relref "/operate/rs/databases/import-export/replica-of#data-compression-for-replica-of" >}}) to save bandwidth. +{{< /note >}} + +To migrate a database to Active-Active in different Redis Enterprise clusters: + +1. Sign in to the Cluster Manager UI of the cluster hosting the source database. + + 1. In **Databases**, select the source database and then select the **Configuration** tab. + + 1. In the **Replica Of** section, select **Use this database as a source for another database**. + + 1. Copy the Replica Of source URL. + + {{Copy the Replica Of source URL from the Connection link to destination dialog.}} + + To change the internal password, select **Regenerate password**. + + If you regenerate the password, replication to existing destinations fails until their credentials are updated with the new password. + +1. Sign in to the Cluster Manager UI of the destination database’s cluster. + +1. Create a new Active-Active database. For prerequisites and detailed instructions, see [Create an Active-Active geo-replicated database]({{< relref "/operate/rs/databases/active-active/create" >}}). + +1. After the Active-Active database is active, click **Edit** on the **Configuration** screen. + +1. Expand the **Migrate to Active-Active** section: + + {{Migrate to Active-Active section.}} + +1. Click **+ Add source database**. + +1. In the **Migrate to Active-Active** dialog, select **External**: + + {{Migrate to Active-Active dialog with External tab selected.}} + +1. For **Source database URL**, enter the Replica Of source URL you copied in step 1. + +1. Click **Add source**. + +1. Click **Save**. + +## Migrate from Redis Community Edition + +To migrate a Redis Community Edition database to Active-Active: + +1. Create a new Active-Active database. For prerequisites and detailed instructions, see [Create an Active-Active geo-replicated database]({{< relref "/operate/rs/databases/active-active/create" >}}). + +1. After the Active-Active database is active, click **Edit** on the **Configuration** screen. + +1. Expand the **Migrate to Active-Active** section: + + {{Migrate to Active-Active section.}} + +1. Click **+ Add source database**. + +1. In the **Migrate to Active-Active** dialog, select **External**: + + {{Migrate to Active-Active dialog with External tab selected.}} + +1. Enter the **Source database URL**: + + - If the database has a password: + + ```sh + redis://:@: + ``` + + Where the password is the Redis password represented with URL encoding escape characters. + + - If the database does not have a password: + + ```sh + redis://: + ``` + +1. Click **Add source**. + +1. Click **Save**. + +## Stop sync after migration + +1. Wait until the migration is complete, indicated by the **Status** _Synced_. + + {{}} +Migration can take minutes to hours to complete depending on the dataset size and network quality. + {{}} + +1. On the Active-Active database's **Configuration** screen, click **Edit**. + +1. In the **Migrate to Active-Active** section, click **Stop sync**: + + {{The Migrate to Active-Active section shows the Active-Active database is synced with the source database.}} + +1. In the **Stop synchronization** dialog, click **Stop** to proceed. + +1. Redirect client connections to the Active-Active database after **Status** changes to _Sync stopped_: + + {{The Migrate to Active-Active section shows the Active-Active database stopped syncing with the source database.}} diff --git a/content/operate/rs/7.4/databases/import-export/replica-of/_index.md b/content/operate/rs/7.4/databases/import-export/replica-of/_index.md new file mode 100644 index 0000000000..bfc2b26f35 --- /dev/null +++ b/content/operate/rs/7.4/databases/import-export/replica-of/_index.md @@ -0,0 +1,222 @@ +--- +Title: Replica Of geo-distributed Redis +alwaysopen: false +categories: +- docs +- operate +- rs +description: Replica Of provides read-only access to replicas of the dataset from different geographical locations. +hideListLinks: true +linkTitle: Replica Of +weight: $weight +url: '/operate/rs/7.4/databases/import-export/replica-of/' +--- +In Redis Enterprise, the Replica Of feature provides active-passive geo-distribution to applications for read-only access +to replicas of the dataset from different geographical locations. +The Redis Enterprise implementation of active-passive replication is called Replica Of. + +In Replica Of, an administrator designates a database as a replica (destination) of one or more databases (sources). +After the initial data load from source to destination is completed, +all write commands are synchronized from the sources to the destination. +Replica Of lets you distribute the read load of your application across multiple databases or +synchronize the database, either within Redis Enterprise or external to Redis Enterprise, to another database. + +You can [create Active-Passive]({{< relref "/operate/rs/databases/import-export/replica-of/create.md" >}}) databases on Redis Enterprise Software or Redis Cloud. + +[Active-Active Geo-Distribution (CRDB)]({{< relref "/operate/rs/databases/active-active" >}}) +provides these benefits and also provides write access to all of the database replicas. + +{{< warning >}} +Configuring a database as a replica of the database that it replicates +creates a cyclical replication and is not supported. +{{< /warning >}} + +The Replica Of is defined in the context of the destination database +by specifying the source databases. + +A destination database can have a maximum of thirty-two (32) source +databases. + +If only one source is defined, then the command execution order in the +source is kept in the destination. However, when multiple sources are +defined, commands that are replicated from the source databases are +executed in the order in which they reach the destination database. As a +result, commands that were executed in a certain order when compared +across source databases might be executed in a different order on the +destination database. + +{{< note >}} +The Replica Of feature should not be confused with the +in-memory [Database +replication]({{< relref "/operate/rs/databases/durability-ha/replication.md" >}}) +feature, which is used for creating a master / replica configuration that +enables ensuring database high-availability. +{{< /note >}} + +## Replication process + +When a database is defined as a replica of another database, all its +existing data is deleted and replaced by data that is loaded from the +source database. + +Once the initial data load is completed, an ongoing synchronization +process takes place to keep the destination always synchronized with its +source. During the ongoing synchronization process, there is a certain +delay between the time when a command was executed on the source and +when it is executed on the destination. This delay is referred to as the +**Lag**. + +When there is a **synchronization error**, **the process might stop** or +it might continue running on the assumption that the error automatically +resolves. The result depends on the error type. See more details below. + +In addition, **the user can manually stop the synchronization process**. + +When the process is in the stopped state - whether stopped by the user +or by the system - the user can restart the process. **Restarting the +process causes the synchronization process to flush the DB and restart +the process from the beginning**. + +### Replica Of status + +The replication process can have the following statuses: + +- **Syncing** - indicates that the synchronization process has + started from scratch. Progress is indicated in percentages (%). +- **Synced** - indicates that the initial synchronization process was + completed and the destination is synchronizing changes on an ongoing + basis. The **Lag** delay in synchronization with the source is + indicated as a time duration. +- **Sync stopped** - indicates that the synchronization process is + currently not running and the user needs to restart it in order for + it to continue running. This status happens if the user stops the + process, or if certain errors arose that prevent synchronization + from continuing without manual intervention. See more details below. + +The statuses above are shown for the source database. In addition, a +timestamp is shown on the source indicating when the last command from +the source was executed on the destination. + +The system also displays the destination database status as an aggregate +of the statuses of all the sources. + +{{< note >}} +If you encounter issues with the Replica Of process, refer +to the troubleshooting section [Replica Of repeatedly +fails]({{< relref "/operate/rs/databases/import-export/replica-of/replicaof-repeatedly-fails.md" >}}). +{{< /note >}} + +### Synchronization errors + +Certain errors that occur during the synchronization process require +user intervention for their resolution. When such errors occur, the +synchronization process is automatically stopped. + +For other errors, the synchronization process continues running on the +assumption that the error automatically resolves. + +Examples of errors that require user intervention for their resolution +and that stop the synchronization process include: + +- Error authenticating with the source database. +- Cross slot violation error while executing a command on a sharded + destination database. +- Out-of-memory error on a source or on the destination + database. + +Example of an error that does not cause the synchronization process to +stop: + +- Connection error with the source database. A connection error might + occur occasionally, for example as result of temporary network + issues that get resolved. Depending on the connection error and its + duration the process might be able to start syncing from the last + point it reached (partial sync) or require a complete + resynchronization from scratch across all sources (full sync). + +## Encryption + +Replica Of supports the ability to encrypt uni-directional replication +communications between source and destination clusters utilizing TLS 1.2 +based encryption. + +## Data compression for Replica Of + +When the Replica Of is defined across different Redis Enterprise +Software clusters, it may be beneficial to compress the data that flows +through the network (depending on where the clusters physically reside +and the available network). + +Compressing the data reduces the traffic and can help: + +- Resolve throughput issues +- Reduce network traffic costs + +Compressing the data does have trade-offs, which is why it should not +always be turned on by default. For example: + +- It uses CPU and disk resources to compress the data before sending + it to the network and decompress it on the other side. +- It takes time to compress and decompress the data which can increase + latency. +- Replication is disk-based and done gradually, shard by shard in the + case of a multi-shard database. This may have an impact on + replication times depending on the speed of the disks and load on + the database. +- If traffic is too fast and the compression takes too much time it + can cause the replication process to fail and be restarted. + +It is advised that you test compression out in a lower environment +before enabling it in production. + +In the Redis Enterprise Software management UI, when designating a +Replica Of source from a different Redis Enterprise Software cluster, +there is also an option to enable compression. When enabled, gzip +compression with level -6 is utilized. + +## Database clustering (sharding) implications + +If a **source** database is sharded, that entire database is treated as +a single source for the destination database. + +If the **destination** database is sharded, when the commands replicated +from the source are executed on the destination database, the +destination database's hashing function is executed to determine to +which shard/s the command refers. + +The source and destination can have different shard counts and functions +for placement of keys. + +### Synchronization in Active-Passive Replication + +In Active-Passive databases, one cluster hosts the source database that receives read-write operations +and the other clusters host destination databases that receive synchronization updates from the source database. + +When there is a significant difference between the source and destination databases, +the destination database flushes all of the data from its memory and starts synchronizing the data again. +This process is called a **full sync**. + +For example, if the database updates for the destination databases +that are stored by the destination database in a synchronization backlog exceed their allocated memory, +the source database starts a full sync. + +{{% warning %}} +When you failover to the destination database for write operations, +make sure that you disable **Replica Of** before you direct clients to the destination database. +This avoids a full sync that can overwrite your data. +{{% /warning %}} + +## Active-Passive replication backlog + +In addition to the [database replication backlog]({{< relref "/operate/rs/databases/durability-ha/replication#database-replication-backlog" >}}), active-passive databases maintain a replication backlog (per shard) to synchronize the database instances between clusters. +By default, the replication backlog is set to one percent (1%) of the database size divided by the database number of shards and ranges between 1MB to 250MB per shard. +Use the [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) utility to control the size of the replication backlog. You can set it to `auto` or set a specific size. + +For an Active-Passive database: +```text +rladmin tune db repl_backlog +``` + +{{}} +On an Active-Passive database, the replication backlog configuration applies to both the replication backlog for shards synchronization and for synchronization of database instances between clusters. +{{}} diff --git a/content/operate/rs/7.4/databases/import-export/replica-of/create.md b/content/operate/rs/7.4/databases/import-export/replica-of/create.md new file mode 100644 index 0000000000..870b7e015b --- /dev/null +++ b/content/operate/rs/7.4/databases/import-export/replica-of/create.md @@ -0,0 +1,175 @@ +--- +Title: Create a database with Replica Of +alwaysopen: false +categories: +- docs +- operate +- rs +description: Create Replica Of database +linkTitle: Create Replica Of database +weight: 10 +url: '/operate/rs/7.4/databases/import-export/replica-of/create/' +--- +Replica databases copy data from source databases (previously known as _master_), which enable read-only connections from apps and clients located in different geographic locations. + +To create a replica connection, you define a database as a replica of a source database. Replica Of databases (also known as _Active-Passive databases_) synchronize in the background. + +Sources databases can be: + +- Located in the same Redis Enterprise Software cluster +- Located in a different Redis Enterprise cluster +- Hosted by a different deployment, e.g. Redis Cloud +- Redis Community Edition databases + +Your apps can connect to the source database to read and write data; they can also use any replica for read-only access. + +Replica Of can model a variety of data relationships, including: + +- One-to-many relationships, where multiple replicas copy a single source database. +- Many-to-one relationships, where a single replica collects data from multiple source databases. + +When you change the replica status of a database by adding, removing, or changing sources, the replica database is synchronized to the new sources. + +## Configure Replica Of + +You can configure a database as a Replica Of, where the source database is in one of the following clusters: + +- [Same Redis Enterprise cluster](#same-cluster) + +- [Different Redis Enterprise cluster](#different-cluster) + +- [Redis Community Edition cluster](#source-available-cluster) + +The order of the multiple Replica Of sources has no material impact on replication. + +For best results when using the [Multicast DNS](https://en.wikipedia.org/wiki/Multicast_DNS) (mDNS) protocol to resolve the fully-qualified domain name (FQDN) of the cluster, verify that your client connections meet the [client mDNS prerequisites]({{< relref "/operate/rs/networking/mdns.md" >}}). + +{{< note >}} +As long as Replica Of is enabled, data in the target database will not expire and will not be evicted regardless of the set [data eviction policy]({{< relref "/operate/rs/databases/memory-performance/eviction-policy.md" >}}). +{{< /note >}} + +### Same Redis Enterprise cluster {#same-cluster} + +To configure a Replica Of database in the same Redis Enterprise cluster as the source database: + +1. [Create a new database]({{< relref "/operate/rs/databases/create" >}}) or select an existing database from the **Databases** screen. + +1. For an existing database, select **Edit** from the **Configuration** tab. + +1. Expand the **Replica Of** section. + +1. Select **+ Add source database**. + +1. In the **Connect a Replica Of source database** dialog, select **Current cluster**. + +1. Select the source database from the list. + +1. Select **Add source**. + +1. Select **Save**. + +### Different Redis Enterprise cluster {#different-cluster} + +To configure a Replica Of database in a different Redis Enterprise cluster from the source database: + +1. Sign in to the Cluster Manager UI of the cluster hosting the source database. + + 1. In **Databases**, select the source database and then select the **Configuration** tab. + + 1. In the **Replica Of** section, select **Use this database as a source for another database**. + + 1. Copy the Replica Of source URL. + + {{Copy the Replica Of source URL from the Connection link to destination dialog.}} + + To change the internal password, select **Regenerate password**. + + If you regenerate the password, replication to existing destinations fails until their credentials are updated with the new password. + +1. Sign in to the Cluster Manager UI of the destination database's cluster. + +1. [Create a new database]({{< relref "/operate/rs/databases/create" >}}) or select an existing database from the **Databases** screen. + +1. For an existing database, select **Edit** from the **Configuration** tab. + +1. Expand the **Replica Of** section. + +1. Select **+ Add source database**. + +1. In the **Connect a Replica Of source database** dialog, select **External**. + +1. Enter the URL of the source database endpoint. + +1. Select **Add source**. + +1. Select **Save**. + +For source databases on different clusters, you can [compress replication data]({{< relref "/operate/rs/databases/import-export/replica-of/#data-compression-for-replica-of" >}}) to save bandwidth. + +### Redis Community Edition cluster {#source-available-cluster} + +To use a database from a Redis Community Edition cluster as a Replica Of source: + +1. [Create a new database]({{< relref "/operate/rs/databases/create" >}}) or select an existing database from the **Databases** screen. + +1. For an existing database, select **Edit** from the **Configuration** tab. + +1. Expand the **Replica Of** section. + +1. Select **+ Add source database**. + +1. In the **Connect a Replica Of source database** dialog, select **External**. + +1. Enter the URL of the source endpoint in one of the following formats: + + - For databases with passwords: + + ```sh + redis://:@: + ``` + + Where the password is the Redis password represented with URL encoding escape characters. + + - For databases without passwords: + + ```sh + redis://: + ``` + +1. Select **Add source**. + +1. Select **Save**. + +## Configure TLS for Replica Of + +When you enable TLS for Replica Of, the Replica Of synchronization traffic uses TLS certificates to authenticate the communication between the source and destination clusters. + +To encrypt Replica Of synchronization traffic, configure encryption for the [source database](#encrypt-source-database-traffic) and the destination [replica database](#encrypt-replica-database-traffic). + +### Encrypt source database traffic + +{{}} + +### Encrypt replica database traffic + +To enable TLS for Replica Of in the destination database: + +1. From the Cluster Manager UI of the cluster hosting the source database: + + 1. Go to **Cluster > Security > Certificates**. + + 1. Expand the **Server authentication (Proxy certificate)** section. + + {{Proxy certificate for server authentication.}} + + 1. Download or copy the proxy certificate. + +1. From the **Configuration** tab of the Replica Of destination database, select **Edit**. + +1. Expand the **Replica Of** section. + +1. Point to the source database entry and select {{< image filename="/images/rs/buttons/edit-button.png#no-click" alt="The Edit button" width="25px" class="inline" >}} to edit it. + +1. Paste or upload the source proxy certificate, then select **Done**. + +1. Select **Save**. diff --git a/content/operate/rs/7.4/databases/import-export/replica-of/replicaof-repeatedly-fails.md b/content/operate/rs/7.4/databases/import-export/replica-of/replicaof-repeatedly-fails.md new file mode 100644 index 0000000000..97a8e5f856 --- /dev/null +++ b/content/operate/rs/7.4/databases/import-export/replica-of/replicaof-repeatedly-fails.md @@ -0,0 +1,33 @@ +--- +Title: Replica Of Repeatedly Fails +alwaysopen: false +categories: +- docs +- operate +- rs +description: Troubleshoot when the Replica Of process repeatedly fails and restarts. +linktitle: Troubleshoot repeat failures +weight: 20 +url: '/operate/rs/7.4/databases/import-export/replica-of/replicaof-repeatedly-fails/' +--- +**Problem**: The Replica Of process repeatedly fails and restarts + +**Diagnostic**: A log entry in the Redis log of the source database shows repeated failures and restarts. + +**Cause**: The Redis "client-output-buffer-limit" setting on the source database +is configured to a relatively small value, which causes the connection drop. + +**Resolution**: Reconfigure the buffer on the source database to a bigger value: + +- If the source is a Redis database on a Redis Enterprise Software cluster, + increase the replica buffer size of the **source database** with: + + `rladmin tune db < db:id | name > slave_buffer < value >` + +- If the source is a Redis database not on a Redis Enterprise Software cluster, + use the [config set](http://redis.io/commands/config-set) command through + `redis-cli` to increase the client output buffer size of the **source database** with: + + `config set client-output-buffer-limit "slave "` + +**Additional information**: [Top Redis Headaches for DevOps - Replication Buffer](https://redislabs.com/blog/top-redis-headaches-for-devops-replication-buffer) diff --git a/content/operate/rs/7.4/databases/import-export/schedule-backups.md b/content/operate/rs/7.4/databases/import-export/schedule-backups.md new file mode 100644 index 0000000000..39917cf761 --- /dev/null +++ b/content/operate/rs/7.4/databases/import-export/schedule-backups.md @@ -0,0 +1,274 @@ +--- +Title: Schedule periodic backups +alwaysopen: false +categories: +- docs +- operate +- rs +description: Schedule backups of your databases to make sure you always have valid backups. +linktitle: Schedule backups +weight: 40 +url: '/operate/rs/7.4/databases/import-export/schedule-backups/' +--- + +Periodic backups provide a way to restore data with minimal data loss. With Redis Enterprise Software, you can schedule periodic backups to occur once a day (every 24 hours), twice a day (every twelve hours), every four hours, or every hour. + +As of v6.2.8, you can specify the start time for 24-hour or 12-hour backups. + +To make an on-demand backup, [export your data]({{< relref "/operate/rs/databases/import-export/export-data.md" >}}). + +You can schedule backups to a variety of locations, including: + +- FTP server +- SFTP server +- Local mount point +- Amazon Simple Storage Service (S3) +- Azure Blob Storage +- Google Cloud Storage + +The backup process creates compressed (.gz) RDB files that you can [import into a database]({{< relref "/operate/rs/databases/import-export/import-data.md" >}}). + +When you back up a database configured for database clustering, +Redis Enterprise Software creates a backup file for each shard in the configuration. All backup files are copied to the storage location. + +{{< note >}} + +- Make sure that you have enough space available in your storage location. + If there is not enough space in the backup location, the backup fails. +- The backup configuration only applies to the database it is configured on. +- To limit the parallel backup for shards, set both [`tune cluster max_simultaneous_backups`]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}) and [`tune node max_redis_forks`]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-node" >}}). `max_simultaneous_backups` is set to 4 by default. + +{{< /note >}} + +## Schedule periodic backups + +Before scheduling periodic backups, verify that your storage location exists and is available to the user running Redis Enterprise Software (`redislabs` by default). You should verify that: + +- Permissions are set correctly. +- The user running Redis Enterprise Software is authorized to access the storage location. +- The authorization credentials work. + +Storage location access is verified before periodic backups are scheduled. + +To schedule periodic backups for a database: + +1. Sign in to the Redis Enterprise Software Cluster Manager UI using admin credentials. + +1. From the **Databases** list, select the database, then select **Configuration**. + +1. Select the **Edit** button. + +1. Expand the **Scheduled backup** section. + +1. Select **Add backup path** to open the **Path configuration** dialog. + +1. Select the tab that corresponds to your storage location type, enter the location details, and select **Done**. + + See [Supported storage locations](#supported-storage-locations) for more information about each storage location type. + +1. Set the backup **Interval** and **Starting time**. + + | Setting | Description | + |--------------|-------------| + | **Interval** | Specifies the frequency of the backup; that is, the time between each backup snapshot.

Supported values include _Every 24 hours_, _Every 12 hours_, _Every 4 hours_, and _Every hour_. | + | **Starting time** | _v6.2.8 or later: _ Specifies the start time for the backup; available when **Interval** is set to _Every 24 hours_ or _Every 12 hours_.

If not specified, defaults to a time selected by Redis Enterprise Software. | + +7. Select **Save**. + +Access to the storage location is verified when you apply your updates. This means the location, credentials, and other details must exist and function before you can enable periodic backups. + +## Default backup start time + +If you do _not_ specify a start time for twenty-four or twelve hour backups, Redis Enterprise Software chooses a random starting time for you. + +This choice assumes that your database is deployed to a multi-tenant cluster containing multiple databases. This means that default start times are staggered (offset) to ensure availability. This is done by calculating a random offset which specifies a number of seconds added to the start time. + +Here's how it works: + +- Assume you're enabling the backup at 4:00 pm (1600 hours). +- You choose to back up your database every 12 hours. +- Because you didn't set a start time, the cluster randomly chooses an offset of 4,320 seconds (or 72 minutes). + +This means your first periodic backup occurs 72 minutes after the time you enabled periodic backups (4:00 pm + 72 minutes). Backups repeat every twelve hours at roughly same time. + +The backup time is imprecise because they're started by a trigger process that runs every five minutes. When the process wakes, it compares the current time to the scheduled backup time. If that time has passed, it triggers a backup. + +If the previous backup fails, the trigger process retries the backup until it succeeds. + +In addition, throttling and resource limits also affect backup times. + +For help with specific backup issues, [contact support](https://redis.com/company/support/). + + +## Supported storage locations {#supported-storage-locations} + +Database backups can be saved to a local mount point, transferred to [a URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) using FTP/SFTP, or stored on cloud provider storage. + +When saved to a local mount point or a cloud provider, backup locations need to be available to [the group and user]({{< relref "/operate/rs/installing-upgrading/install/customize-user-and-group.md" >}}) running Redis Enterprise Software, `redislabs:redislabs` by default. + +Redis Enterprise Software needs the ability to view permissions and update objects in the storage location. Implementation details vary according to the provider and your configuration. To learn more, consult the provider's documentation. + +The following sections provide general guidelines. Because provider features change frequently, use your provider's documentation for the latest info. + +### FTP server + +Before enabling backups to an FTP server, verify that: + +- Your Redis Enterprise cluster can connect and authenticate to the FTP server. +- The user specified in the FTP server location has read and write privileges. + +To store your backups on an FTP server, set its **Backup Path** using the following syntax: + +`ftp://[username]:[password]@[host]:[port]/[path]/` + +Where: + +- *protocol*: the server's protocol, can be either `ftp` or `ftps`. +- *username*: your username, if needed. +- *password*: your password, if needed. +- *hostname*: the hostname or IP address of the server. +- *port*: the port number of the server, if needed. +- *path*: the backup path, if needed. + +Example: `ftp://username:password@10.1.1.1/home/backups/` + +The user account needs permission to write files to the server. + +### SFTP server + +Before enabling backups to an SFTP server, make sure that: + +- Your Redis Enterprise cluster can connect and authenticate to the SFTP server. +- The user specified in the SFTP server location has read and write privileges. +- The SSH private keys are specified correctly. You can use the key generated by the cluster or specify a custom key. + + To use the cluster auto generated key: + + 1. Go to **Cluster > Security > Certificates**. + + 1. Expand **Cluster SSH Public Key**. + + 1. Download or copy the cluster SSH public key to the appropriate location on the SFTP server. + + Use the server documentation to determine the appropriate location for the SSH public key. + +To backup to an SFTP server, enter the SFTP server location in the format: + +```sh +sftp://user:password@host<:custom_port>/path/ +``` + +For example: `sftp://username:password@10.1.1.1/home/backups/` + +### Local mount point + +Before enabling periodic backups to a local mount point, verify that: + +- The node can connect to the destination server, the one hosting the mount point. +- The `redislabs:redislabs` user has read and write privileges on the local mount point +and on the destination server. +- The backup location has enough disk space for your backup files. Backup files +are saved with filenames that include the timestamp, which means that earlier backups are not overwritten. + +To back up to a local mount point: + +1. On each node in the cluster, create the mount point: + 1. Connect to a shell running on Redis Enterprise Software server hosting the node. + 1. Mount the remote storage to a local mount point. + + For example: + + ```sh + sudo mount -t nfs 192.168.10.204:/DataVolume/Public /mnt/Public + ``` + +1. In the path for the backup location, enter the mount point. + + For example: `/mnt/Public` + +1. Verify that the user running Redis Enterprise Software has permissions to access and update files in the mount location. + +### AWS Simple Storage Service + +To store backups in an Amazon Web Services (AWS) Simple Storage Service (S3) [bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html): + +1. Sign in to the [AWS Management Console](https://console.aws.amazon.com/). + +1. [Create an S3 bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html) if you do not already have one. + +1. [Create an IAM User](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_console) with permission to add objects to the bucket. + +1. [Create an access key](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey) for that user if you do not already have one. + +1. In the Redis Enterprise Software Cluster Manager UI, when you enter the backup location details: + + - Select the **AWS S3** tab on the **Path configuration** dialog. + + - In the **Path** field, enter the path of your bucket. + + - In the **Access Key ID** field, enter the access key ID. + + - In the **Secret Access Key** field, enter the secret access key. + +You can also connect to a storage service that uses the S3 protocol but is not hosted by Amazon AWS. The storage service must have a valid SSL certificate. To connect to an S3-compatible storage location, run [`rladmin cluster config`]({{}}): + +```sh +rladmin cluster config s3_url +``` + +Replace `` with the hostname or IP address of the S3-compatible storage location. + +### Google Cloud Storage + +For [Google Cloud](https://developers.google.com/console/) subscriptions, store your backups in a Google Cloud Storage bucket: + +1. Sign in to the Google Cloud Platform console. + +1. [Create a JSON service account key](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating) if you do not already have one. + +1. [Create a bucket](https://cloud.google.com/storage/docs/creating-buckets#create_a_new_bucket) if you do not already have one. + +1. [Add a principal](https://cloud.google.com/storage/docs/access-control/using-iam-permissions#bucket-add) to your bucket: + + - In the **New principals** field, add the `client_email` from the service account key. + + - Select "Storage Legacy Bucket Writer" from the **Role** list. + +1. In the Redis Enterprise Software Cluster Manager UI, when you enter the backup location details: + + - Select the **Google Cloud Storage** tab on the **Path configuration** dialog. + + - In the **Path** field, enter the path of your bucket. + + - In the **Client ID** field, enter the `client_id` from the service account key. + + - In the **Client Email** field, enter the `client_email` from the service account key. + + - In the **Private Key ID** field, enter the `private_key_id` from the service account key. + + - In the **Private Key** field, enter the `private_key` from the service account key. + Replace `\n` with new lines. + +### Azure Blob Storage + +To store your backup in Microsoft Azure Blob Storage, sign in to the Azure portal and then: + +To export to Microsoft Azure Blob Storage, sign in to the Azure portal and then: + +1. [Create an Azure Storage account](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create) if you do not already have one. + +1. [Create a container](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container) if you do not already have one. + +1. [Manage storage account access keys](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage) to find the storage account name and account keys. + +1. In the Redis Enterprise Software Cluster Manager UI, when you enter the backup location details: + + - Select the **Azure Blob Storage** tab on the **Path configuration** dialog. + + - In the **Path** field, enter the path of your bucket. + + - In the **Azure Account Name** field, enter your storage account name. + + - In the **Azure Account Key** field, enter the storage account key. + +To learn more, see [Authorizing access to data in Azure Storage](https://docs.microsoft.com/en-us/azure/storage/common/storage-auth). diff --git a/content/operate/rs/7.4/databases/memory-performance/_index.md b/content/operate/rs/7.4/databases/memory-performance/_index.md new file mode 100644 index 0000000000..99cac1da90 --- /dev/null +++ b/content/operate/rs/7.4/databases/memory-performance/_index.md @@ -0,0 +1,108 @@ +--- +Title: Memory and performance +alwaysopen: false +categories: +- docs +- operate +- rs +description: Learn more about managing your memory and optimizing performance for + your database. +hideListLinks: true +linktitle: Memory and performance +weight: 70 +url: '/operate/rs/7.4/databases/memory-performance/' +--- +Redis Enterprise Software has multiple mechanisms in its +architecture to help optimize storage and performance. + +## Memory limits + +Database memory limits define the maximum size your database can reach across all database replicas and [shards]({{< relref "/glossary#letter-s" >}}) on the cluster. Your memory limit will also determine the number of shards you'll need. + +Besides your dataset, the memory limit must also account for replication, Active-Active overhead, and module overhead, and a number of other factors. These can significantly increase your database size, sometimes increasing it by four times or more. + +For more information on memory limits, see [Database memory limits]({{< relref "/operate/rs/databases/memory-performance/memory-limit.md" >}}). + +## Eviction policies + +When a database exceeds its memory limit, eviction policies determine which data is removed. The eviction policy removes keys based on frequency of use, how recently used, randomly, expiration date, or a combination of these factors. The policy can also be set to `noeviction` to return a memory limit error when trying to insert more data. + +The default eviction policy for databases is `volatile-lru` which evicts the least recently used keys out of all keys with the `expire` field set. The default for Active-Active databases is `noeviction`. + +For more information, see [eviction policies]({{< relref "/operate/rs/databases/memory-performance/eviction-policy.md" >}}). + +## Database persistence + +Both RAM memory and flash memory are at risk of data loss if a server or process fails. Persisting your data to disk helps protect it against loss in those situations. You can configure persistence at the time of database creation, or by editing the database’s configuration. + +There are two main types of persistence strategies in Redis Enterprise Software: append-only files (AoF) and snapshots. + +Append-only files (AoF) keep a record of data changes and writes each change to the end of a file, allowing you to recover the dataset by replaying the writes in the append-only log. + +Snapshots capture all the data as it exists in one moment in time and writes it to disk, allowing you to recover the entire dataset as it existed at that moment in time. + +For more info on data persistence see [Database persistence with Redis Enterprise Software]({{< relref "/operate/rs/databases/configure/database-persistence.md" >}}) or [Durable Redis](https://redis.com/redis-enterprise/technology/durable-redis/). + +## Auto Tiering + +By default, Redis Enterprise Software stores your data entirely in [RAM](https://en.wikipedia.org/wiki/Random-access_memory) for improved performance. The [Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering/" >}}) feature enables your data to span both RAM and [SSD](https://en.wikipedia.org/wiki/Solid-state_drive) storage ([flash memory](https://en.wikipedia.org/wiki/Flash_memory)). Keys are always stored in RAM, but Auto Tiering manages the location of their values. Frequently used (hot) values are stored on RAM, but infrequently used (warm) values are moved to flash memory. This saves on expensive RAM space, which give you comparable performance at a lower cost for large datasets. + +For more info, see [Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering/" >}}). + +## Shard placement + +The location of the primary and replica shards on the cluster nodes can impact your database performance. +Primary shards and their corresponding replica shards are always placed on separate nodes for data resiliency and high availability. +The shard placement policy helps to maintain optimal performance and resiliency. + +Redis Enterprise Software has two shard placement policies available: + +- **dense**: puts as many shards as possible on the smallest number of nodes +- **sparse**: spread the shards across as many nodes as possible + +For more info about the shard placement policy, see [Shard placement policy]({{< relref "/operate/rs/databases/memory-performance/shard-placement-policy.md" >}}) + +## Metrics + +From the Redis Enterprise Software Cluster Manager UI, you can monitor the performance of your clusters, nodes, databases, and shards with real-time metrics. You can also enable alerts for node, cluster, or database events such as high memory usage or throughput. + +With the Redis Enterprise Software API, you can also integrate Redis Enterprise metrics into other monitoring environments, such as Prometheus. + +For more info about monitoring with Redis Enterprise Software, see [Monitoring with metrics and alerts]({{< relref "/operate/rs/clusters/monitoring/_index.md" >}}), and [Memory statistics]({{< relref "/operate/rs/databases/memory-performance/memory-limit#memory-metrics" >}}). + +## Scaling databases + +Each Redis Enterprise cluster can contain multiple databases. In Redis, +databases represent data that belong to a single application, tenant, or +microservice. Redis Enterprise is built to scale to 100s of databases +per cluster to provide flexible and efficient multi-tenancy models. + +Each database can contain few or many Redis shards. Sharding is +transparent to Redis applications. Master shards in the database process +data operations for a given subset of keys. The number of shards per +database is configurable and depend on the throughput needs of the +applications. Databases in Redis Enterprise can be resharded into more +Redis shards to scale throughput while maintaining sub-millisecond +latencies. Resharding is performed without downtime. + +{{< image filename="/images/rs/sharding.png" >}} + +Redis Enterprise places master shards and replicas in separate +nodes, racks, and zones, and uses in-memory replication to protect data +against failures. + +In Redis Enterprise, each database has a quota of RAM. The quota cannot +exceed the limits of the RAM available on the node. However, with Redis +Enterprise Flash, RAM is extended to the local flash drive (SATA, NVMe +SSDs etc). The total quota of the database can take advantage of both +RAM and Flash drive. The administrator can choose the RAM vs Flash ratio +and adjust that anytime in the lifetime of the database without +downtime. + +With Auto Tiering, instead of storing all keys and data for a +given shard in RAM, less frequently accessed values are pushed to flash. +If applications need to access a value that is in flash, Redis +Enterprise automatically brings the value into RAM. Depending on the +flash hardware in use, applications experience slightly higher latency +when bringing values back into RAM from flash. However subsequent +accesses to the same value is fast, once the value is in RAM. diff --git a/content/operate/rs/7.4/databases/memory-performance/eviction-policy.md b/content/operate/rs/7.4/databases/memory-performance/eviction-policy.md new file mode 100644 index 0000000000..7219a08b80 --- /dev/null +++ b/content/operate/rs/7.4/databases/memory-performance/eviction-policy.md @@ -0,0 +1,59 @@ +--- +Title: Eviction policy +alwaysOpen: false +categories: +- docs +- operate +- rs +- kubernetes +description: The eviction policy determines what happens when a database reaches its + memory limit. +linkTitle: Eviction policy +weight: 10 +url: '/operate/rs/7.4/databases/memory-performance/eviction-policy/' +--- + +The eviction policy determines what happens when a database reaches its memory limit. + +To make room for new data, older data is _evicted_ (removed) according to the selected policy. + +To prevent this from happening, make sure your database is large enough to hold all desired keys. + +| **Eviction Policy** | **Description** | +|------------|-----------------| +|  noeviction | New values aren't saved when memory limit is reached

When a database uses replication, this applies to the primary database | +|  allkeys-lru | Keeps most recently used keys; removes least recently used (LRU) keys | +|  allkeys-lfu | Keeps frequently used keys; removes least frequently used (LFU) keys | +|  allkeys-random | Randomly removes keys | +|  volatile-lru | Removes least recently used keys with `expire` field set to true | +|  volatile-lfu | Removes least frequently used keys with `expire` field set to true | +|  volatile-random | Randomly removes keys with `expire` field set to true | +|  volatile-ttl | Removes least frequently used keys with `expire` field set to true and the shortest remaining time-to-live (TTL) value | + +## Eviction policy defaults + +`volatile-lru` is the default eviction policy for most databases. + +The default policy for [Active-Active databases]({{< relref "/operate/rs/databases/active-active" >}}) is _noeviction_ policy. + +## Active-Active database eviction + +The eviction policy mechanism for Active-Active databases kicks in earlier than for standalone databases 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. If memory usage continues to rise while the keys are being evicted, the rate of eviction will increase to prevent reaching the Out-of-Memory state. +As with standalone Redis Enterprise databases, Active-Active eviction is calculated per shard. +To prevent over eviction, internal heuristics might prevent keys from being evicted when the shard reaches the 80% memory limit. In such cases, keys will get evicted only when shard memory reaches 100%. + +In case of network issues between Active-Active instances, memory can be freed only when all instances are in sync. If there is no communication between participating clusters, it can result in eviction of all keys and the instance reaching an Out-of-Memory state. + +{{< note >}} +Data eviction policies are not supported for Active-Active databases with Auto Tiering . +{{< /note >}} + +## Avoid data eviction + +To avoid data eviction, make sure your database is large enough to hold required values. + +For larger databases, consider using [Auto Tiering ]({{< relref "/operate/rs/databases/auto-tiering/" >}}). + +Auto Tiering stores actively-used data (also known as _hot data_) in RAM and the remaining data in flash memory (SSD). +This lets you retain more data while ensuring the fastest access to the most critical data. diff --git a/content/operate/rs/7.4/databases/memory-performance/memory-limit.md b/content/operate/rs/7.4/databases/memory-performance/memory-limit.md new file mode 100644 index 0000000000..8514c139ae --- /dev/null +++ b/content/operate/rs/7.4/databases/memory-performance/memory-limit.md @@ -0,0 +1,90 @@ +--- +Title: Database memory limits +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: When you set a database's memory limit, you define the maximum size the + database can reach. +linkTitle: Memory limits +weight: 20 +url: '/operate/rs/7.4/databases/memory-performance/memory-limit/' +--- +When you set a database's memory limit, you define the maximum size the +database can reach in the cluster, across all database replicas and +shards, including both primary and replica shards. + +If the total size of the database in the cluster reaches the memory +limit, the data eviction policy is +applied. + +## Factors for sizing + +Factors to consider when sizing your database: + +- **dataset size**: you want your limit to be above your dataset size to leave room for overhead. +- **database throughput**: high throughput needs more shards, leading to a higher memory limit. +- [**modules**]({{< relref "/operate/oss_and_stack/stack-with-enterprise" >}}): using modules with your database consumes more memory. +- [**database clustering**]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}): enables you to spread your data into shards across multiple nodes. +- [**database replication**]({{< relref "/operate/rs/databases/durability-ha/replication.md" >}}): enabling replication doubles memory consumption. + +Additional factors for Active-Active databases: + +- [**Active-Active replication**]({{< relref "/operate/rs/databases/active-active/_index.md" >}}): 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. +- [**database replication backlog**]({{< relref "/operate/rs/databases/active-active/manage#replication-backlog/" >}}) for synchronization between shards. By default, this is set to 1% of the database size. +- [**Active-Active replication backlog**]({{< relref "/operate/rs/databases/active-active/manage.md" >}}) for synchronization between clusters. By default, this is set to 1% of the database size. + + 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. + +Additional factors for databases with Auto Tiering enabled: + +- 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 [write amplification](https://en.wikipedia.org/wiki/Write_amplification). + +- [**database persistence**]({{< relref "/operate/rs/databases/configure/database-persistence.md" >}}): Auto Tiering uses dual database persistence where both the primary and replica shards persist to disk. This may add some processor and network overhead, especially in cloud configurations with network attached storage. + +## What happens when Redis Enterprise Software is low on RAM? + +Redis Enterprise Software manages node memory so that data is entirely in RAM (unless using Auto Tiering). If not enough RAM is available, Redis Enterprise prevents adding more data into the databases. + +Redis Enterprise Software protects the existing data and prevents the database from being able to store data into the shards. + +You can configure the cluster to move the data to another node, or even discard it according to the [eviction policy]({{< relref "/operate/rs/databases/memory-performance/eviction-policy.md" >}}) set on each database by the administrator. + +[Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering/" >}}) +manages memory so that you can also use flash memory (SSD) to store data. + +### Order of events for low RAM + +1. If there are other nodes available, your shards migrate to other nodes. +2. If the eviction policy allows eviction, shards start to release memory, +which can result in data loss. +3. If the eviction policy does not allow eviction, you'll receive +out of memory (OOM) messages. +4. If shards can't free memory, Redis Enterprise relies on the OS processes to stop replicas, +but tries to avoid stopping primary shards. + +We recommend that you have a [monitoring platform]({{< relref "/operate/rs/clusters/monitoring/" >}}) that alerts you before a system gets low on RAM. +You must maintain sufficient free memory to make sure that you have a healthy Redis Enterprise installation. + +## Memory metrics + +The Cluster Manager UI provides metrics that can help you evaluate your memory use. + +- Free RAM +- RAM fragmentation +- Used memory +- Memory usage +- Memory limit + +See [console metrics]({{< relref "/operate/rs/references/metrics" >}}) for more detailed information. + +## Related info + +- [Memory and performance]({{< relref "/operate/rs/databases/memory-performance" >}}) +- [Disk sizing for heavy write scenarios]({{< relref "/operate/rs/clusters/optimize/disk-sizing-heavy-write-scenarios.md" >}}) +- [Turn off services to free system memory]({{< relref "/operate/rs/clusters/optimize/turn-off-services.md" >}}) +- [Eviction policy]({{< relref "/operate/rs/databases/memory-performance/eviction-policy.md" >}}) +- [Shard placement policy]({{< relref "/operate/rs/databases/memory-performance/shard-placement-policy.md " >}}) +- [Database persistence]({{< relref "/operate/rs/databases/configure/database-persistence.md" >}}) diff --git a/content/operate/rs/7.4/databases/memory-performance/shard-placement-policy.md b/content/operate/rs/7.4/databases/memory-performance/shard-placement-policy.md new file mode 100644 index 0000000000..1b5266c03e --- /dev/null +++ b/content/operate/rs/7.4/databases/memory-performance/shard-placement-policy.md @@ -0,0 +1,55 @@ +--- +Title: Shard placement policy +alwaysopen: false +categories: +- docs +- operate +- rs +description: Detailed info about the shard placement policy. +linkTitle: Shard placement policy +weight: 30 +url: '/operate/rs/7.4/databases/memory-performance/shard-placement-policy/' +--- +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. + +{{< embed-md "shard-placement-intro.md" >}} + +## Shard placement policies + +### Dense shard placement policy + +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. + +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. + +For Redis on RAM databases without the OSS cluster API enabled, use the dense policy to optimize performance. + +{{< image filename="/images/rs/dense_placement.png" >}} + +*Figure: Three nodes with two master shards (red) and two replica shards (white) with a dense placement policy* + +### Sparse shard placement policy + +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. + +For example, for a database with two master and two replica shards on a cluster with three nodes and a sparse shard placement policy: + +- Node 1 hosts one of the master shards +- Node 2 hosts the replica for the first master shard +- Node 3 hosts the second master shard +- Node 1 hosts for the replica shard for master shard 2 + +For Redis on RAM databases with OSS cluster API enabled and for databases with Auto Tiering enabled, use the sparse policy to optimize performance. + +{{< image filename="/images/rs/sparse_placement.png" >}} + +*Figure: Three nodes with two master shards (red) and two replica shards (white) with a sparse placement policy* + +## Related articles + +You can [configure the shard placement policy]({{< relref "/operate/rs/databases/configure/shard-placement.md" >}}) for each database. diff --git a/content/operate/rs/7.4/databases/migrate-shards.md b/content/operate/rs/7.4/databases/migrate-shards.md new file mode 100644 index 0000000000..720da06332 --- /dev/null +++ b/content/operate/rs/7.4/databases/migrate-shards.md @@ -0,0 +1,145 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +db_type: database +description: How to migrate database shards to other nodes in a Redis Software cluster. +linkTitle: Migrate shards +title: Migrate database shards +toc: 'true' +weight: 32 +url: '/operate/rs/7.4/databases/migrate-shards/' +--- + +To migrate database shards to other nodes in the cluster, you can use the [`rladmin migrate`]({{}}) command or [REST API requests]({{}}). + +## Use cases for shard migration + +Migrate database shards to a different node in the following scenarios: + +- Before node removal. + +- To balance the database manually in case of latency issues or uneven load distribution across nodes. + +- To manage node resources, such as memory usage. + +## Considerations for shard migration + +For databases with replication: + +- Migrating a shard will not cause disruptions since a primary shard will still be available. + +- If you try to migrate a primary shard, it will be demoted to a replica shard and a replica shard will be promoted to primary before the migration. If you set `"preserve_roles": true` in the request, a second failover will occur after the migration finishes to change the migrated shard's role back to primary. + +For databases without replication, the migrated shard will not be available until the migration is done. + +Connected clients shouldn't be disconnected in either case. + +If too many primary shards are placed on the same node, it can impact database performance. + +## Migrate specific shard + +To migrate a specific database shard, use one of the following methods: + +- [`rladmin migrate shard`]({{}}): + + ```sh + rladmin migrate shard target_node + ``` + +- [Migrate shard]({{}}) REST API request: + + Specify the ID of the shard to migrate in the request path and the destination node's ID as the `target_node_uid` in the request body. See the [request reference]({{}}) for more options. + + ```sh + POST /v1/shards//actions/migrate + { + "target_node_uid": + } + ``` + + Example JSON response body: + + ```json + { + "action_uid": "", + "description": "Migrate was triggered" + } + ``` + + You can track the action's progress with a [`GET /v1/actions/`]({{}}) request. + +## Migrate multiple shards + +To migrate multiple database shards, use one of the following methods: + +- [`rladmin migrate shard`]({{}}): + + ```sh + rladmin migrate shard target_node + ``` + +- [Migrate multiple shards]({{}}) REST API request: + + Specify the IDs of the shards to migrate in the `shard_uids` list and the destination node's ID as the `target_node_uid` in the request body. See the [request reference]({{}}) for more options. + + ```sh + POST /v1/shards/actions/migrate + { + "shard_uids": ["","",""], + "target_node_uid": + } + ``` + + Example JSON response body: + + ```json + { + "action_uid": "", + "description": "Migrate was triggered" + } + ``` + + You can track the action's progress with a [`GET /v1/actions/`]({{}}) request. + +## Migrate all shards from a node + +To migrate all shards from a specific node to another node, run [`rladmin migrate all_shards`]({{}}): + +```sh +rladmin migrate node all_shards target_node +``` + +## Migrate primary shards + +You can use the [`rladmin migrate all_master_shards`]({{}}) command to migrate all primary shards for a specific database or node to another node in the cluster. + +To migrate a specific database's primary shards: + +```sh +rladmin migrate db db: all_master_shards target_node +``` + +To migrate all primary shards from a specific node: + +```sh +rladmin migrate node all_master_shards target_node +``` + +## Migrate replica shards + +You can use the [`rladmin migrate all_slave_shards`]({{}}) command to migrate all replica shards for a specific database or node to another node in the cluster. + +To migrate a specific database's replica shards: + +```sh +rladmin migrate db db: all_slave_shards target_node +``` + +To migrate all replica shards from a specific node: + +```sh +rladmin migrate node all_slave_shards target_node +``` diff --git a/content/operate/rs/7.4/databases/recover.md b/content/operate/rs/7.4/databases/recover.md new file mode 100644 index 0000000000..e91487494b --- /dev/null +++ b/content/operate/rs/7.4/databases/recover.md @@ -0,0 +1,147 @@ +--- +Title: Recover a failed database +alwaysopen: false +categories: +- docs +- operate +- rs +- kubernetes +description: Recover a database after the cluster fails or the database is corrupted. +linktitle: Recover +weight: 35 +url: '/operate/rs/7.4/databases/recover/' +--- +When a cluster fails or a database is corrupted, you must: + +1. [Restore the cluster configuration]({{< relref "/operate/rs/clusters/cluster-recovery.md" >}}) from the CCS files +1. Recover the databases with their previous configuration and data + +To restore data to databases in the new cluster, +you must restore the database persistence files (backup, AOF, or snapshot files) to the databases. +These files are stored in the [persistence storage location]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage" >}}). + +The database recovery process includes: + +1. If the cluster failed, [recover the cluster]({{< relref "/operate/rs/clusters/cluster-recovery.md" >}}). +1. Identify recoverable databases. +1. Restore the database data. +1. Verify that the databases are active. + +## Prerequisites + +- Before you start database recovery, make sure that the cluster that hosts the database is healthy. + In the case of a cluster failure, + you must [recover the cluster]({{< relref "/operate/rs/clusters/cluster-recovery.md" >}}) before you recover the databases. + +- We recommend that you allocate new persistent storage drives for the new cluster nodes. + If you use the original storage drives, + make sure to back up all files on the old persistent storage drives to another location. + +## Recover databases + +After you prepare the cluster that hosts the database, +you can run the recovery process from the [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) +command-line interface (CLI). + +To recover the database: + +1. Mount the persistent storage drives with the recovery files to the new nodes. + These drives must contain the cluster configuration backup files and database persistence files. + + {{< note >}} +Make sure that the user `redislabs` has permissions to access the storage location +of the configuration and persistence files on each of the nodes. + {{< /note >}} + + If you use local persistent storage, place all of the recovery files on each of the cluster nodes. + +1. To see which databases are recoverable, run: + + ```sh + rladmin recover list + ``` + + The status for each database can be either ready for recovery or missing files. + An indication of missing files in any of the databases can result from: + + - The storage location is not found - Make sure the recovery path is set correctly on all nodes in the cluster. + - Files are not found in the storage location - Move the files to the storage location. + - No permission to read the files - Change the file permissions so that redislabs:redislabs has 640 permissions. + - Files are corrupted - Locate copies of the files that are not corrupted. + + If you cannot resolve the issues, contact [Redis support](https://redis.com/company/support/). + +1. Recover the database using one of the following [`rladmin recover`]({{< relref "/operate/rs/references/cli-utilities/rladmin/recover" >}}) commands: + + - Recover all databases from the persistence files located in the persistent storage drives: + + ```sh + rladmin recover all + ``` + + - Recover a single database from the persistence files located in the persistent storage drives: + + - By database ID: + + ```sh + rladmin recover db db: + ``` + + - By database name: + + ```sh + rladmin recover db + ``` + + - Recover only the database configuration for a single database (without the data): + + ```sh + rladmin recover db only_configuration + ``` + + {{< note >}} +- If persistence was not configured for the database, the database is restored empty. +- For Active-Active databases that still have live instances, we recommend that you recover the configuration for the failed instances and let the data update from the other instances. +- For Active-Active databases where all instances need to be recovered, we recommend you recover one instance with the data and only recover the configuration for the other instances. + The empty instances then update from the recovered data. +- If the persistence files of the databases from the old cluster are not stored in the persistent storage location of the new node, + you must first map the recovery path of each node to the location of the old persistence files. + To do this, run the `node recovery_path set` command in rladmin. + The persistence files for each database are located in the persistent storage path of the nodes from the old cluster, usually under `/var/opt/redislabs/persist/redis`. + {{< /note >}} + +1. To verify that the recovered databases are now active, run: + + ```sh + rladmin status + ``` + +After the databases are recovered, make sure your Redis clients can successfully connect to the databases. + +## Configure automatic recovery + +If you enable the automatic recovery cluster policy, Redis Enterprise tries to quickly recover as much data as possible from before the disaster. + +To enable automatic recovery, [update the cluster policy]({{< relref "/operate/rs/references/rest-api/requests/cluster/policy#put-cluster-policy" >}}) using the REST API: + +```sh +PUT /v1/cluster/policy +{ + "auto_recovery": true +} +``` + +Redis Enterprise tries to recover databases from the best existing persistence files. If a persistence file isn't available, which can happen if its host node is down, the automatic recovery process waits for it to become available. + +For each database, you can set the `recovery_wait_time` to define how many seconds the database waits for a persistence file to become available before recovery. After the wait time elapses, the recovery process continues, which can result in partial or full data loss. The default value is `-1`, which means to wait forever. Short wait times can increase the risk of potential data loss. + +To change `recovery_wait_time` for an existing database using the REST API: + +```sh +PUT /v1/bdbs/ +{ + "recovery_wait_time": 3600 +} +``` + +You can also set `recovery_wait_time` when you [create a database]({{< relref "/operate/rs/references/rest-api/requests/bdbs#post-bdbs-v1" >}}) using the REST API. diff --git a/content/operate/rs/7.4/installing-upgrading/_index.md b/content/operate/rs/7.4/installing-upgrading/_index.md new file mode 100644 index 0000000000..b956bb1acc --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/_index.md @@ -0,0 +1,74 @@ +--- +Title: Install, set up, and upgrade Redis Enterprise Software +alwaysopen: false +categories: +- docs +- operate +- rs +description: Learn how to install, set up, and upgrade Redis Enterprise Software. +hideListLinks: true +linkTitle: Install and upgrade +toc: 'true' +weight: 35 +url: '/operate/rs/7.4/installing-upgrading/' +--- + +You can run self-managed Redis Enterprise Software in an on-premises data center or on your preferred cloud platform. + +If you prefer a fully managed Redis database-as-a-service, available on major public cloud services, consider setting up a [Redis Cloud]({{}}) subscription. You can [try Redis Cloud](https://redis.io/try-free/) for free. + +## Quickstarts + +If you want to try out Redis Enterprise Software, see the following quickstarts: + +- [Redis Enterprise Software quickstart]({{< relref "/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart" >}}) + +- [Docker quickstart for Redis Enterprise Software]({{< relref "/operate/rs/installing-upgrading/quickstarts/docker-quickstart" >}}) + +## Install Redis Enterprise Software + +To install Redis Enterprise Software on a [supported platform]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/supported-platforms" >}}), you need to: + +1. [Plan your deployment]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment" >}}). + +1. [Prepare to install]({{< relref "/operate/rs/installing-upgrading/install/prepare-install" >}}). + +1. [Perform the install]({{< relref "/operate/rs/installing-upgrading/install" >}}). + +Depending on your needs, you may also want to [customize the installation](#more-info-and-options). + +## Upgrade existing deployment + +If you already installed Redis Enterprise Software, you can: + +- [Upgrade a cluster]({{< relref "/operate/rs/installing-upgrading/upgrading/upgrade-cluster" >}}) + +- [Upgrade a database]({{< relref "/operate/rs/installing-upgrading/upgrading/upgrade-database" >}}) + +- [Upgrade an Active-Active database]({{< relref "/operate/rs/installing-upgrading/upgrading/upgrade-active-active" >}}) + +## Uninstall Redis Enterprise Software + +- [Uninstall existing deployment]({{< relref "/operate/rs/installing-upgrading/uninstalling" >}}) + +## More info and options + +More information is available to help with customization and related questions: + +- [CentOS/RHEL firewall configuration]({{< relref "/operate/rs/installing-upgrading/configuring/centos-rhel-firewall.md" >}}) +- [Change socket file location]({{< relref "/operate/rs/installing-upgrading/configuring/change-location-socket-files.md" >}}) +- [Cluster DNS configuration]({{< relref "/operate/rs/networking/cluster-dns.md" >}}) +- [Cluster load balancer setup]({{< relref "/operate/rs/networking/cluster-lba-setup.md" >}}) +- [File locations]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/file-locations.md" >}}) +- [Linux swap space configuration]({{< relref "/operate/rs/installing-upgrading/configuring/linux-swap.md" >}}) +- [mDNS client prerequisites]({{< relref "/operate/rs/networking/mdns.md" >}}) +- [User and group ownership]({{< relref "/operate/rs/installing-upgrading/install/customize-user-and-group.md" >}}) + +## Next steps + +After you install Redis Enterprise Software and set up your cluster, you can: + +- [Add users]({{< relref "/operate/rs/security/access-control/create-users" >}}) to the cluster with specific permissions. To begin, start with [Access control]({{< relref "/operate/rs/security/access-control" >}}). + +- [Create databases]({{< relref "/operate/rs/databases/create" >}}) to use with your applications. + diff --git a/content/operate/rs/7.4/installing-upgrading/configuring/_index.md b/content/operate/rs/7.4/installing-upgrading/configuring/_index.md new file mode 100644 index 0000000000..ccd6745e96 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/configuring/_index.md @@ -0,0 +1,15 @@ +--- +Title: Additional configuration +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +hideListLinks: false +weight: 80 +url: '/operate/rs/7.4/installing-upgrading/configuring/' +--- +This section describes additional configuration options for Redis Enterprise Software installation. + + diff --git a/content/operate/rs/7.4/installing-upgrading/configuring/centos-rhel-firewall.md b/content/operate/rs/7.4/installing-upgrading/configuring/centos-rhel-firewall.md new file mode 100644 index 0000000000..2b76dec88f --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/configuring/centos-rhel-firewall.md @@ -0,0 +1,33 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: Configure firewall rules for Redis Enterprise Software on CentOS or Red + Hat Enterprise Linux (RHEL). +linkTitle: CentOS/RHEL firewall +title: Configure CentOS/RHEL firewall +weight: $weight +url: '/operate/rs/7.4/installing-upgrading/configuring/centos-rhel-firewall/' +--- +CentOS and Red Hat Enterprise Linux (RHEL) distributions use [**firewalld**](https://firewalld.org/) by default to manage the firewall and configure [iptables](https://en.wikipedia.org/wiki/Iptables). +The default configuration assigns the network interfaces to the **public** zone and blocks all ports except port 22, which is used for [SSH](https://en.wikipedia.org/wiki/Secure_Shell). + +When you install Redis Enterprise Software on CentOS or RHEL, it automatically creates two firewalld system services: + +- A service named **redislabs**, which includes all ports and protocols needed for communication between cluster nodes. +- A service named **redislabs-clients**, which includes the ports and protocols needed for external communication (outside of the cluster). + +These services are defined but not allowed through the firewall by default. +During Redis Enterprise Software installation, the [installer prompts]({{< relref "/operate/rs/installing-upgrading/install/manage-installation-questions" >}}) you to confirm auto-configuration of a default (public) zone +to allow the **redislabs** service. + +Although automatic firewall configuration simplifies installation, your deployment might not be secure if you did not use other methods to secure the host machine's network, such as external firewall rules or security groups. +You can use firewalld configuration tools such as **firewall-cmd** (command line) or **firewall-config** (UI) +to create more specific firewall policies that allow these two services through the firewall, as necessary. + +{{}} +If databases are created with non-standard [Redis Enterprise Software ports]({{< relref "/operate/rs/networking/port-configurations" >}}), +you need to explicitly configure firewalld to make sure those ports are not blocked. +{{}} diff --git a/content/operate/rs/7.4/installing-upgrading/configuring/change-location-socket-files.md b/content/operate/rs/7.4/installing-upgrading/configuring/change-location-socket-files.md new file mode 100644 index 0000000000..2325670086 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/configuring/change-location-socket-files.md @@ -0,0 +1,65 @@ +--- +LinkTitle: Socket file location +Title: Change socket file locations +alwaysopen: false +categories: +- docs +- operate +- rs +description: Change socket file locations. +weight: $weight +url: '/operate/rs/7.4/installing-upgrading/configuring/change-location-socket-files/' +--- + +## Default socket file locations + +There are two default locations for the socket files in Redis Enterprise Software: + +- `/tmp` - In clean installations of Redis Enterprise Software version earlier than 5.2.2 +- `/var/opt/redislabs/run` - In clean installations of Redis Enterprise Software version 5.2.2 and later + + {{}} +The default location was changed in case you run any maintenance procedures that delete the `/tmp` directory. + {{}} + +When you upgrade Redis Enterprise Software from an earlier version to 5.2.2 or later, the socket files +are not moved to the new location by default. You need to either specify a custom location +for the socket files during [installation]({{< relref "/operate/rs/installing-upgrading" >}}) or use the [following procedure](#change-socket-file-locations) after installation. + +## Change socket file locations + +To change the location of the socket files: + +1. On each node in the cluster, run: + + ```sh + sudo rlutil create_socket_path socket_path=/var/opt/redislabs/run + ``` + +1. Identify the node with the `master` role by running the following command on any node in the cluster: + + ```sh + rladmin status nodes + ``` + +1. On the master node, change the socket file location: + + ```sh + sudo rlutil set_socket_path socket_path=/var/opt/redislabs/run + ``` + +1. To update the socket file location for all other nodes, restart Redis Enterprise Software on each node in the cluster, one at a time: + + ```sh + sudo service rlec_supervisor restart + ``` + +1. Restart each database in the cluster to update the socket file location: + + ```sh + rladmin restart db + ``` + + {{< warning >}} +Restarting databases can cause interruptions in data traffic. + {{< /warning >}} diff --git a/content/operate/rs/7.4/installing-upgrading/configuring/linux-swap.md b/content/operate/rs/7.4/installing-upgrading/configuring/linux-swap.md new file mode 100644 index 0000000000..511f68feb1 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/configuring/linux-swap.md @@ -0,0 +1,35 @@ +--- +Title: Configure swap for Linux +alwaysopen: false +categories: +- docs +- operate +- rs +description: Turn off Linux swap space. +linkTitle: Linux swap configuration +weight: $weight +url: '/operate/rs/7.4/installing-upgrading/configuring/linux-swap/' +--- +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 [memory limits]({{< relref "/operate/rs/databases/memory-performance/memory-limit.md" >}}). The +recommendation is to turn off Linux swap completely in the OS. + +When you install or build the OS on the machine intended to host your Redis Enterprise Software cluster, avoid configuring swap partitions if possible. + +## Turn off swap + +To turn off swap in the OS of an existing server, VM, or instance, you +must have `sudo` access or be a root user to run the following commands: + +1. Turn off swap: + + ```sh + sudo swapoff -a + ``` + +1. Comment out the swap partitions configured in the OS so swap remains off even after a reboot: + + ```sh + sudo sed -i.bak '/ swap / s/^(.*)$/#1/g' /etc/fstab + ``` diff --git a/content/operate/rs/7.4/installing-upgrading/creating-support-package.md b/content/operate/rs/7.4/installing-upgrading/creating-support-package.md new file mode 100644 index 0000000000..452da105b7 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/creating-support-package.md @@ -0,0 +1,185 @@ +--- +Title: Create a support package +alwaysopen: false +categories: +- docs +- operate +- rs +description: Create a support package that gathers essential information to help debug + issues. +linkTitle: Create support package +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/installing-upgrading/creating-support-package/' +--- +If you encounter any issues that you are not able to resolve yourself +and need to [contact Redis support](https://redis.io/support/) for assistance, you can [create a support package](#create-support-package) that gathers all essential information to help debug +your issues. + +{{< note >}} +The process of creating the support package can take several minutes and generates load on the system. +{{< /note >}} + +## Support package files + +The support package is a zip file that contains all cluster configuration and logs. + +When downloaded from the Cluster Manager UI, the support package's name is `debuginfo.tar.gz`. + +### Database support package files + +Cluster and database support packages collect database details in `database_` directories, where `` is the database ID, and Redis shard details in `` directories. + +The following table describes the included files: + +| File | Description | +|------|-------------| +| ccs-redis.json | Primary node's local cluster configuration store (CCS). | +| /database_/ | Directory that includes files for a specific database. is the database ID. | +| database__ccs_info.txt | Database information from the cluster configuration store (CCS). Includes settings for databases, endpoints, shards, replicas, and CRDB. | +| database_.clientlist | List of clients connected to the database when the support package was created. | +| database_.info | Redis information and statistics for the database. See [`INFO`]({{}}) for details about the collected fields. | +| database_.rladmin | Database information. See [`rladmin info db`]({{}}) for an example of collected fields. Also includes creation time, last changed time, Redis version, memory limit, persistence type, eviction policy, hashing policy, and whether SSL, backups, and email alerts are enabled. | +| database_.slowlog | Contains slowlog output, which includes commands that took longer than 10 milliseconds. Only included if `slowlog_in_sanitized_support` is `true` in cluster settings. | +| /node_/redis_.txt | For each shard of the specified database only. Includes shard configuration and [information]({{}}), slowlog information, and latency information. | + +### Node support package files + +Cluster and node support packages collect node details in `node_` directories, where `` is the node ID. + +The following table describes the included files: + +| File | Description | +|------|-------------| +| ccs-redis.json | The node's local cluster configuration store (CCS). | +| /conf/ | Directory that contains configuration files. | +| /logs/ | Directory that includes logs. | +| node_.ccs | Includes cluster configuration, node configuration, and DMC proxy configuration. | +| node__envoy_config.json | Envoy configuration. | +| node_.rladmin | Information about the cluster's nodes, databases, endpoints, and shards. See [`rladmin status`]({{}}) for example output. | +| node__sys_info.txt | Node's system information including:
• Socket files list
• Log files list
• Processes running on the node
• Disk usage
• Persistent files list
• Memory usage
• Network interfaces
• Installed packages
• Active iptables
• OS and platform
• Network connection
• Status of Redis processes | +| redis_.txt | For each shard of the specified database only. Includes shard configuration and [information]({{}}), slowlog information, and latency information. | + +Each node's `/conf/` directory contains the following files: + +- bootstrap_status.json +- ccs-paths.conf +- config.json +- envoy.yaml +- gossip_envoy.yaml +- heartbeatd-config.json +- last_bootstrap.json +- local_addr.conf +- node.id +- node_local_config.json +- redislabs_env_config.sh +- socket.conf +- supervisord_alert_mgr.conf +- supervisord_cm_server.conf +- supervisord_crdb_coordinator.conf +- supervisord_crdb_worker.conf +- supervisord_mdns_server.conf +- supervisord_pdns_server.conf + +Each node's `/conf/` directory also contains the following key and cert modulus files: + +- api_cert.modulus +- api_key.modulus +- ccs_internode_encryption_cert.modulus +- ccs_internode_encryption_key.modulus +- cm_cert.modulus +- cm_key.modulus +- data_internode_encryption_cert.modulus +- data_internode_encryption_key.modulus +- gossip_ca_signed_cert.modulus +- gossip_ca_signed_key.modulus +- mesh_ca_signed_cert.modulus +- mesh_ca_signed_key.modulus +- metrics_exporter_cert.modulus +- metrics_exporter_key.modulus +- proxy_cert.modulus +- proxy_key.modulus +- syncer_cert.modulus +- syncer_key.modulus + +## Create support package + +### Cluster Manager UI method + +To create a support package from the Cluster Manager UI: + +1. In the navigation menu, select **Support**. + + {{Select Support and create a support package.}} + +1. Select **Proceed**. + +1. In the **Create support package** dialog, select **Run process**. + +1. The package is created and downloaded by your browser. + +### Command-line method + +If package creation fails with `internal error` or if you cannot access the UI, create a support package for the cluster from the command line on any node in the cluster using the [`rladmin cluster debug_info`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/debug_info" >}}) command: + +```sh +/opt/redislabs/bin/rladmin cluster debug_info +``` + +- If `rladmin cluster debug_info` fails for lack of space in the `/tmp` directory, you can: + + 1. Change the storage location where the support package is saved: + + ```sh + rladmin cluster config debuginfo_path + ``` + + The `redislabs` user must have write access to the storage location on all cluster nodes. + + 1. On any node in the cluster, run: + + ```sh + rladmin cluster debug_info + ``` + +- If `rladmin cluster debug_info` fails for another reason, you can create a support package for the cluster from the command line on each node in the cluster with the command: + + ```sh + /opt/redislabs/bin/debuginfo + ``` + +Upload the tar file to [Redis support](https://redis.com/company/support/). The path to the archive is shown in the command output. + +### REST API method + +You can also use `debuginfo` [REST API]({{< relref "/operate/rs/references/rest-api" >}}) requests to create and download support packages. + +To download debug info from all nodes and databases: + +```sh +GET /v1/cluster/debuginfo +``` + +To download debug info from all nodes: + +```sh +GET /v1/nodes/debuginfo +``` + +To download debug info from a specific node, replace `` in the following request with the node ID: + +```sh +GET /v1/nodes//debuginfo +``` + +To download debug info from all databases: + +```sh +GET /v1/bdbs/debuginfo +``` + +To download debug info from a specific database, replace `` in the following request with the database ID: + +```sh +GET /v1/bdbs//debuginfo +``` diff --git a/content/operate/rs/7.4/installing-upgrading/install/GPG-KEY-redislabs-packages.gpg b/content/operate/rs/7.4/installing-upgrading/install/GPG-KEY-redislabs-packages.gpg new file mode 100644 index 0000000000..4374a1f680 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/GPG-KEY-redislabs-packages.gpg @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBF7XxBIBEAC+BsRrLfyUQASgj9+7axRPY72wSFFaTx2mNPDtg4BGXX3Vxw+Q +mJuJeU3j1gUdJKOg8bEnJBgQzdqauVKmmmQjU4EvzT5Tan/gGTJrjN02M401LeHE +cFlQCJQdiuDuSSf1iodCQio1rHZj8vwGQjtmAvGAWhkAYsVJA+VIe5InhFcl1Z69 +JzAFxVl58qMW7Rj3HK7kBMhpXPdfGop1t8qWJxp0z9F/lELqyumWsogLqQsxaT3B ++D93ykiTmydA9g2nZ2QOz/6Ud9PqhKvbCwVBsgRsiaMj7IUFlwGSDAIuo+HyYt9D +NLECKsCAKa1NLcDvhzBs48pIymWF1mk6laX/HsLsSIbXaqay5pV7fFyCku8Lz1aL ++yF/J0ej2wEufbvQV8+twWc9iiJmGdtFfh0khzlEBEjGdhWurfprmiXyI1NAUMoY +gFVvoLLfMGyWZ/l03kokxDDJMb6xxGjnTOrD0Vy+jaakSzT6c6zTJRq7CQSBpe0U +FVcFj///1K1m7Bvq5dErSDe8+5pKuxcoyNHx9SGxzAk60iRtcuIUUqZDtfpZtfl+ +/u2I14obtSnXkYAtuux+DeE7Gol27Aj3PCzMVVO2/GxKGhNw27PXD+dSvG3ETWVm +6lRCrehu6iLIbiZG/+aJEXzZs/qyyQxAvo5QOj+LaRd1OdAnEwZtZuPYVQARAQAB +tD1SZWRpcyBMYWJzIFBhY2thZ2UgU2lnbmluZyBLZXkgKDIwMjApIDxzdXBwb3J0 +QHJlZGlzbGFicy5jb20+iQJOBBMBCgA4FiEEXo76JAnlxE+1Kb4g7F7Fk9fRUp8F +Al7XxBICGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ7F7Fk9fRUp/cnA// +UD0u4ePM8qZzKsu7IYY6kR77YujF1Qw9/PrwpMPjlGLUw4qo2KL3L1167JWfDaSZ +Vhr2wz7uNJEcCGc06UDRUIkg0p5eXBNcw/inzj7e3uYoDfB1/QnZ7e6qKzfXPZmn +dSJNChHAOqthPAQRPdLqPwgMvD6XjQsEBgSBX4vi8TskrZKK3tpqqkabjXsZxpxh +Y9z+EcRRKcSV2hYFBJ00XzoS7HMj27ksAUjbrg2lz/8YRyihV9x/2/XoQixcCyZ2 +44roMgvaI/llgKk/giFJQ7A0cfsAHZDb5McB+36ITr3KEVH/btLGuqyh11XoUEb3 +psEAKqwy0zFIbSDaDlkvoCRCfeg0RJeXl9lsBOhAqLYVBkH3O+HLkRnPlV/P8nF1 +pF3htHKKx2CxJVnjN3nA64TIalOR5+kVD5ECyZEMcVYru5cIoQoEd1bh565rr7JT +xS6BufqD1hBKoh3qNye6UpWRDcbksocSmq+e0KggHnwTkXVhwxKYMF9628ZeSNYx +CpI+T804HXcC8emHn5VE+XXc2dLM/cRjtcdIXK+Uy9riwch91dgIgNNLRSCiqbCD +54r9DxNTbkJIH6CD2nnBBjcIDvp8hqN3fI2hVFyIHH/s9sLOnZwE7qmWknaMXbbq +H95xAMB7IJ3SuBVlOmGPD/bYumpaqtyFlPvMtbRYOpS5Ag0EXtfEEgEQALyKsnXW +rH5rp+n7lKKSaFjeGTI+8r+kF3gySGATerUKNSAVKXoll2E1IZNn4sm9+HNGnIAy +sYsPpymyZhwnGFoFsBTYw5h/+9rBfaAtjt8h6U0xxaOwlG9ODrRnEIKLQ/eY/OiL +eP2WVhzk1xeZf+zB/bni2xdhslESWRctdd+C7UPB7VPcpLD7jNDmJnHsmkYjtJ96 +txyIz5UBGbSrJGNC58ML/EluzYNW9B+iUZcUrUWkFwvZdtMVk69JLdn4YUtuoWG7 +fPQ9o0SMFcfEJxAFJxs2g/5G9M21UHqAI6UfkUudMNRRk2Na6l5a+B+vVpd+vSpG +KuZQEWmVIW23hjljlGCxyeDbOZ29z1uAuw4fuvcNIqlIgIWqN48wmV7IiXS9TC2E +Q/4ygWexq3t9UxE4nS6n/mLa/q5MNYm9fGygYij+Zh9vWbsXijhn/EUo95XexC/0 +exuu1gTk7BsbXTmVHmJGVoe9jPUxCERbxkKzX84WdyWsI15EPvhF9GBXh+mXRwlQ +Lo7AG3qe2o4DJB3rkzT7RCHvcIZ+3QE/b9usz2wsYf/a38JS9Pjy/+nrplUib02Z +bTQXKpLPVdrqUfiyCi7TiS5czbXaEbpfI9ImPy0GW2Yh0IGl+KiWnn/HA+g68z2Z +XvTpXaTi2ISBc0j87CzKoWRc4AE41Z7hponzABEBAAGJAjYEGAEKACAWIQRejvok +CeXET7UpviDsXsWT19FSnwUCXtfEEgIbDAAKCRDsXsWT19FSn98eD/9pP4r03oIv +zYlCyuCHkRZ51/iZYN8U1nbz9hTNYRMx3WMJYDH2Q2BXParQ4bKtRb2nzzczCWN6 +LSGH2021Wo+2eYs/MxZ3O4+dW4velqWKw2k5vv8jMNwPsIkPkzjETYTStYUaZxEl +TXaSJOPca/ulXnq+tounmed6ale3qy8bLmBs3nF/jYSbZizu9DfZJK+SIot2qiYR +gDvQm2Q5cGwtT4N9ScSWiCYh0RcUlDzaf4TC4w+XShP949k+sARLt+GnRScTd7tD +oyTwdgFbJPsMUu5t0cR4zK36FqyzC+9DXN6/OJqIqHrOd3utFBUAgFmGY714+VLD +8rmhynMsPttLfJKm9b4Io2PQ0rQqSwt8CDE+ktKjQRj77XjmPqQ80nOG315tQcMS +rUrIo4B+MtzCmp4ccgFoOiI7S1+isB0XAmjbWsH5k1CdP4TSidy2VxhOPOim+iJb +8U8oA5SdP3OzIUIVaThWNHch16d25JiMlNbppM+VuIcxPLHQWsaDrenAmcLqf89Y +ebhXJpFeXyBWFgcUaBorQQWxe1XbXIpo/6+WvrGUlAWMM296aLy3tsn3CV3uUUCB +L5SfhR3FXVqauSty+TH/5u7YMs5MAFXPha3NPei8vPF67Mdmk7mmiXL3Pcm9GPwe +CosOTH5D8QCnvmlUY8lqW8OxflBaC6wyqg== +=UQWk +-----END PGP PUBLIC KEY BLOCK----- diff --git a/content/operate/rs/7.4/installing-upgrading/install/_index.md b/content/operate/rs/7.4/installing-upgrading/install/_index.md new file mode 100644 index 0000000000..5feefaa3e9 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/_index.md @@ -0,0 +1,61 @@ +--- +Title: Install Redis Enterprise Software +alwaysopen: false +categories: +- docs +- operate +- rs +description: Install Redis Enterprise Software on Linux. +hideListLinks: true +linkTitle: Install +weight: 35 +url: '/operate/rs/7.4/installing-upgrading/install/' +--- + +After you [plan your deployment]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment" >}}), [download a Redis Enterprise Software installation package]({{< relref "/operate/rs/installing-upgrading/install/prepare-install/download-install-package" >}}), and finish [installation preparation]({{< relref "/operate/rs/installing-upgrading/install/prepare-install" >}}): + +1. [Install the Redis Enterprise Software package]({{< relref "/operate/rs/installing-upgrading/install/install-on-linux" >}}) on one of the nodes in the cluster. + +1. Repeat this process for each node in the cluster. + +For installation on machines without an internet connection, see [Offline installation]({{< relref "/operate/rs/installing-upgrading/install/offline-installation" >}}). + +## Permissions and access + +- Redis Enterprise Software installation creates the `redislabs:redislabs` user and group. + + Assigning other users to the `redislabs` group is optional. Users belonging to the `redislabs` group have permission to read and execute (e.g. use the `rladmin` status command) but are not allowed to write (or delete) files or directories. + +- Redis Enterprise Software is certified to run with permissions set to `750`, an industry standard. + + {{}} +Do not reduce permissions to `700`. This configuration has not been tested and is not supported. + {{}} + +## More info and options + +If you've already installed Redis Enterprise Software, you can also: + +- [Upgrade an existing deployment]({{< relref "/operate/rs/installing-upgrading/upgrading" >}}). + +- [Uninstall an existing deployment]({{< relref "/operate/rs/installing-upgrading/uninstalling.md" >}}). + +To learn more about customization and find answers to related questions, see: + +- [CentOS/RHEL Firewall configuration]({{< relref "/operate/rs/installing-upgrading/configuring/centos-rhel-firewall.md" >}}) +- [Change socket file location]({{< relref "/operate/rs/installing-upgrading/configuring/change-location-socket-files.md" >}}) +- [Cluster DNS configuration]({{< relref "/operate/rs/networking/cluster-dns.md" >}}) +- [Cluster load balancer setup]({{< relref "/operate/rs/networking/cluster-lba-setup.md" >}}) +- [File locations]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/file-locations.md" >}}) +- [Supported platforms]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/supported-platforms.md" >}}) +- [Manage installation questions]({{< relref "/operate/rs/installing-upgrading/install/manage-installation-questions.md" >}}) +- [mDNS client prerequisites]({{< relref "/operate/rs/networking/mdns.md" >}}) +- [User and group ownership]({{< relref "/operate/rs/installing-upgrading/install/customize-user-and-group.md" >}}) + +## Next steps + +After your cluster is set up with nodes, you can: + +- [Add users]({{< relref "/operate/rs/security/access-control/create-users" >}}) to the cluster with specific permissions. To begin, start with [Access control]({{< relref "/operate/rs/security/access-control" >}}). +- [Create databases]({{< relref "/operate/rs/databases/create" >}}) to use with your applications. + diff --git a/content/operate/rs/7.4/installing-upgrading/install/customize-install-directories.md b/content/operate/rs/7.4/installing-upgrading/install/customize-install-directories.md new file mode 100644 index 0000000000..eee022abcb --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/customize-install-directories.md @@ -0,0 +1,65 @@ +--- +Title: Customize installation directories +alwaysopen: false +categories: +- docs +- operate +- rs +description: Customize Redis Enterprise Software installation directories. +linkTitle: Customize install locations +weight: 30 +url: '/operate/rs/7.4/installing-upgrading/install/customize-install-directories/' +--- + +When you install Redis Enterprise Software on Red Hat Enterprise Linux, you can customize the installation directories. + +The files are installed in the `redislabs` directory located in the path that you specify. + +{{< note >}} +- When you install with custom directories, the installation does not run as an RPM file. +- If a `redislabs` directory already exists in the path that you specify, the installation fails. +- All nodes in a cluster must be installed with the same file locations. +- Custom installation directories are not supported for databases using Auto Tiering. +{{< /note >}} + +You can specify these file locations: + +| Files | Installer flag | Example parameter | Example file location | +| ------------------- | -------------- | ----------------- | --------------------- | +| Binaries files | --install-dir | /opt | /opt/redislabs | +| Configuration files | --config-dir | /etc/opt | /etc/opt/redislabs | +| Data and log files | --var-dir | /var/opt | /var/opt/redislabs | + +These files are not in the custom directories: + +- OS files + - /etc/cron.d/redislabs + - /etc/firewalld/services + - /etc/firewalld/services/redislabs-clients.xml + - /etc/firewalld/services/redislabs.xml + - /etc/ld.so.conf.d/redislabs_ldconfig.conf.tmpl + - /etc/logrotate.d/redislabs + - /etc/profile.d/redislabs_env.sh + - /usr/lib/systemd/system/rlec_supervisor.service.tmpl + - /usr/share/selinux/mls/redislabs.pp + - /usr/share/selinux/targeted/redislabs.pp + +- Installation reference files + - /etc/opt/redislabs/redislabs_custom_install_version + - /etc/opt/redislabs/redislabs_env_config.sh + +To specify directories during [installation]({{< relref "/operate/rs/installing-upgrading/install/install-on-linux" >}}), include installer flags as [command-line options]({{< relref "/operate/rs/installing-upgrading/install/install-script" >}}) when you run the `install.sh` script. For example: + +```sh +sudo ./install.sh --install-dir --config-dir --var-dir +``` + +## Limitations + +Several Redis Enterprise Software installation reference files are installed to the directory `/etc/opt/redislabs/` even if you use custom installation directories. + +As a workaround to install Redis Enterprise Software without using any root directories, do the following before installing Redis Enterprise Software: + +1. Create all custom, non-root directories you want to use with Redis Enterprise Software. + +1. Mount `/etc/opt/redislabs` to one of the custom, non-root directories. diff --git a/content/operate/rs/7.4/installing-upgrading/install/customize-user-and-group.md b/content/operate/rs/7.4/installing-upgrading/install/customize-user-and-group.md new file mode 100644 index 0000000000..05f9198e3c --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/customize-user-and-group.md @@ -0,0 +1,32 @@ +--- +Title: Customize system user and group +alwaysopen: false +categories: +- docs +- operate +- rs +description: Specify the user and group who own all Redis Enterprise Software processes. +linkTitle: Customize user and group +weight: 40 +url: '/operate/rs/7.4/installing-upgrading/install/customize-user-and-group/' +--- + +By default, Redis Enterprise Software is installed with the user:group `redislabs:redislabs`. See [Access control]({{< relref "/operate/rs/security/access-control" >}}) for user and group security information. + +During installation, you can specify the user and group that own all Redis Enterprise Software processes. + +If you specify the user only, then installation is run with the primary group that the user belongs to. + +{{< note >}} +- Custom installation user is supported on Red Hat Enterprise Linux. +- When you install with custom directories, the installation does not run as an RPM file. +- You must create the user and group before attempting to install Redis Software. +- You can specify an LDAP user as the installation user. +{{< /note >}} + +To customize the user or group during [installation]({{< relref "/operate/rs/installing-upgrading/install/install-on-linux" >}}), include the `--os-user` or `--os-group` [command-line options]({{< relref "/operate/rs/installing-upgrading/install/install-script" >}}) when you run the `install.sh` script. For example: + +```sh +sudo ./install.sh --os-user --os-group +``` + diff --git a/content/operate/rs/7.4/installing-upgrading/install/install-on-linux.md b/content/operate/rs/7.4/installing-upgrading/install/install-on-linux.md new file mode 100644 index 0000000000..0f5889ec46 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/install-on-linux.md @@ -0,0 +1,138 @@ +--- +Title: Install Redis Enterprise Software on Linux +alwaysopen: false +categories: +- docs +- operate +- rs +description: Install Redis Enterprise Software on Linux. +linkTitle: Install on Linux +weight: 10 +url: '/operate/rs/7.4/installing-upgrading/install/install-on-linux/' +--- + +After you [download a Redis Enterprise Software installation package]({{< relref "/operate/rs/installing-upgrading/install/prepare-install/download-install-package" >}}), install it on one of the nodes in the cluster. + +For installation on machines without an internet connection, see [Offline installation]({{< relref "/operate/rs/installing-upgrading/install/offline-installation" >}}). + +## Install on Linux + +To install Redis Enterprise Software, use the command line: + +1. Copy the installation package to the node. + +1. On the node, change to the directory where the installation package is located and extract the installation files: + + ```sh + tar vxf + ``` + +1. _(Optional)_ Use the {{< download "GPG key file" "../GPG-KEY-redislabs-packages.gpg" >}} to confirm the authenticity of Ubuntu/Debian or RHEL RPM packages: + + - For Ubuntu: + 1. Import the key: + ```sh + gpg --import + ``` + 2. Verify the package signature: + ```sh + dpkg-sig --verify + ``` + + - For RHEL: + 1. Import the key: + ```sh + rpm --import + ``` + 2. Verify the package signature: + ```sh + rpm --checksig + ``` + +1. To start the installation process, run the installation script. See [installation script options]({{< relref "/operate/rs/installing-upgrading/install/install-script" >}}) for a list of command-line options you can add to the following command: + + ```sh + sudo ./install.sh + ``` + + {{< note >}} +- The Redis Enterprise Software files are installed in the default [file locations]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/file-locations.md" >}}). +- By default, Redis Enterprise Software runs on the OS as the `redislabs` user and `redislabs` group. If needed, you can [specify a different user and group]({{< relref "/operate/rs/installing-upgrading/install/customize-user-and-group.md" >}}) during the installation. +- You must either be the root user or use `sudo` to run the installation script. + {{< /note >}} + +1. Answer the [installation questions]({{< relref "/operate/rs/installing-upgrading/install/manage-installation-questions.md" >}}) when shown to complete the installation process. + + {{< note >}} +To skip the installation questions, use one of the following methods: + +- Run `./install.sh -y` to answer yes to all of the questions. +- Create an [answer file]({{< relref "/operate/rs/installing-upgrading/install/manage-installation-questions#configure-file-to-answer" >}}) to answer installation questions automatically. + {{< /note >}} + +1. When installation completes successfully, the output displays the Cluster Manager UI's IP address: + + ```sh + Summary: + ------- + ALL TESTS PASSED. + 2017-04-24 10:54:15 [!] Please logout and login again to make + sure all environment changes are applied. + 2017-04-24 10:54:15 [!] Point your browser at the following + URL to continue: + 2017-04-24 10:54:15 [!] https://:8443 + ``` + +1. Repeat this process for each node in the cluster. + + +## Auto Tiering installation + +If you want to use Auto Tiering for your databases, review the prerequisites, storage requirements, and [other considerations]({{< relref "/operate/rs/databases/auto-tiering/" >}}) for Auto Tiering databases and prepare and format the flash memory. + +After you [install on Linux](#install-on-linux), use the `prepare_flash` script to prepare and format flash memory: + +```sh +sudo /opt/redislabs/sbin/prepare_flash.sh +``` + +This script finds unformatted disks and mounts them as RAID partitions in `/var/opt/redislabs/flash`. + +To verify the disk configuration, run: + +```sh +sudo lsblk +``` + +## More info and options + +To learn more about customization and find answers to related questions, see: + +- [CentOS/RHEL firewall configuration]({{< relref "/operate/rs/installing-upgrading/configuring/centos-rhel-firewall.md" >}}) +- [Change socket file location]({{< relref "/operate/rs/installing-upgrading/configuring/change-location-socket-files.md" >}}) +- [Cluster DNS configuration]({{< relref "/operate/rs/networking/cluster-dns.md" >}}) +- [Cluster load balancer setup]({{< relref "/operate/rs/networking/cluster-lba-setup.md" >}}) +- [mDNS client prerequisites]({{< relref "/operate/rs/networking/mdns.md" >}}) +- [File locations]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/file-locations.md" >}}) +- [Supported platforms]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/supported-platforms.md" >}}) + +## Limitations + +Several Redis Enterprise Software installation reference files are installed to the directory `/etc/opt/redislabs/` even if you use [custom installation directories]({{< relref "/operate/rs/installing-upgrading/install/customize-install-directories" >}}). + +As a workaround to install Redis Enterprise Software without using any root directories, do the following before installing Redis Enterprise Software: + +1. Create all custom, non-root directories you want to use with Redis Enterprise Software. + +1. Mount `/etc/opt/redislabs` to one of the custom, non-root directories. + +## Next steps + +1. [Create]({{< relref "/operate/rs/clusters/new-cluster-setup.md" >}}) + or [join]({{< relref "/operate/rs/clusters/add-node.md" >}}) an existing Redis Enterprise Software cluster. + +1. [Create a database]({{< relref "/operate/rs/databases/create" >}}). + + For geo-distributed Active-Active replication, create an [Active-Active]({{< relref "/operate/rs/databases/active-active/create.md" >}}) database. + +1. [Add users]({{< relref "/operate/rs/security/access-control/create-users" >}}) to the cluster with specific permissions. To begin, start with [Access control]({{< relref "/operate/rs/security/access-control" >}}). diff --git a/content/operate/rs/7.4/installing-upgrading/install/install-script.md b/content/operate/rs/7.4/installing-upgrading/install/install-script.md new file mode 100644 index 0000000000..89c5399538 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/install-script.md @@ -0,0 +1,27 @@ +--- +Title: Installation script command-line options +alwaysopen: false +categories: +- docs +- operate +- rs +description: Command-line options for the install.sh script. +linkTitle: Installation script options +weight: 20 +url: '/operate/rs/7.4/installing-upgrading/install/install-script/' +--- + +Run `./install.sh --help` to view command-line options supported by the installation script. + +The following options are supported: + +| Option | Description | +|--------|-------------| +| `-y` | Automatically answers `yes` to all install prompts, accepting all default values
See [Manage install questions]({{< relref "/operate/rs/installing-upgrading/install/manage-installation-questions" >}})| +| `-c ` | Specify answer file used to respond to install prompts
See [Manage install questions]({{< relref "/operate/rs/installing-upgrading/install/manage-installation-questions" >}})| +| `-s ` | Specify directory for redislabs unix sockets _(new installs only)_| +| `--install-dir ` | Specifies installation directory _(new installs only)_
See [Customize install locations]({{< relref "/operate/rs/installing-upgrading/install/customize-install-directories" >}})| +| `--config-dir ` | Configuration file directory *(new installs only)*
See [Customize install locations]({{< relref "/operate/rs/installing-upgrading/install/customize-install-directories" >}})| +|
`--var-dir ` | Var directory used for installation *(new installs only)*
See [Customize install locations]({{< relref "/operate/rs/installing-upgrading/install/customize-install-directories" >}})| +| `--os-user `| Operating system user account associated with install; default: `redislabs`
See [Customize user and group]({{< relref "/operate/rs/installing-upgrading/install/customize-user-and-group" >}}) *(new installs only)*| +|
`--os-group ` | Operating system group associated with install; default: `redislabs`
See [Customize user and group]({{< relref "/operate/rs/installing-upgrading/install/customize-user-and-group" >}}) *(new installs only)* | diff --git a/content/operate/rs/7.4/installing-upgrading/install/manage-installation-questions.md b/content/operate/rs/7.4/installing-upgrading/install/manage-installation-questions.md new file mode 100644 index 0000000000..e837494107 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/manage-installation-questions.md @@ -0,0 +1,103 @@ +--- +Title: Manage installation questions +alwaysopen: false +categories: +- docs +- operate +- rs +description: Describes Redis Enterprise Software installation questions and how to + answer them automatically. +linkTitle: Manage install questions +weight: 25 +url: '/operate/rs/7.4/installing-upgrading/install/manage-installation-questions/' +--- + +Several questions are displayed during the Redis Enterprise Software installation process. + +Here, you'll find a list of these questions and learn how to automatically answer these questions to perform a silent install. + +## Installation questions + +Several questions appear during installation: + +- **Linux swap file** - `Swap is enabled. Do you want to proceed? [Y/N]?` + + We recommend that you [disable Linux swap]({{< relref "/operate/rs/installing-upgrading/configuring/linux-swap.md" >}}) in the operating system configuration + to give Redis Enterprise Software control of the memory allocation. + +- **Automatic OS tuning** - `Do you want to automatically tune the system for best performance [Y/N]?` + + To allow the installation process to optimize the OS for Redis Enterprise Software, answer `Y`. + The installation process prompts you for additional information. + + The `/opt/redislabs/sbin/systune.sh` file contains details about the tuning process. + +- **Network time** - `Do you want to set up NTP time synchronization now [Y/N]?` + + Redis Enterprise Software requires that all cluster nodes have synchronized time. + You can either let the installation process configure NTP + or you can [configure NTP manually]({{< relref "/operate/rs/clusters/configure/sync-clocks.md" >}}). + +- **Firewall ports** - `Would you like to open RedisLabs cluster ports on the default firewall zone [Y/N]?` + + Redis Enterprise Software requires that all nodes have [specific network ports]({{< relref "/operate/rs/networking/port-configurations.md" >}}) open. + To open the ports, you can: + + - Answer `Y` to let the installation process open these ports. + - Answer `N` and configure the firewall manually for [RHEL/CentOS firewall]({{< relref "/operate/rs/installing-upgrading/configuring/centos-rhel-firewall" >}}). + - Answer `N` and configure the firewall on the node manually for your OS. + +- **Installation verification (rlcheck)** - `Would you like to run rlcheck to verify proper configuration? [Y/N]?` + + Run the `rlcheck` installation verification to make sure that the installation completed successfully. + If you want to run this verification at a later time, you can run: + + ```sh + /opt/redislabs/bin/rlcheck + ``` + +- **User already exists** - `The user 'redislabs' already exists, which may lead to problems if it wasn't configured correctly. Would you like to proceed with the installation? (Y/N)?` + +- **Group already exists** - `The group 'redislabs' already exists, which may lead to problems if it wasn't configured correctly. Would you like to proceed with the installation? (Y/N)?` + +## Answer install questions automatically + +To perform a silent (or automated) install, answer the questions when you start the [install]({{< relref "/operate/rs/installing-upgrading/install/install-on-linux" >}}). + +### Answer yes to all questions + +To automatically answer `yes` to all questions (which accepts the default values), run the [installation script]({{< relref "/operate/rs/installing-upgrading/install/install-script" >}}) with the `-y` parameter: + +```bash +./install.sh -y +``` + +### Configure file to answer + +Use an answer file to manage your response: + +1. Create a text file to serve as an answer file. + + The answer file can contain any of the parameters for the installation questions and indicate the answer for each question with `yes` or `no`. + + For example: + + ```sh + ignore_swap=no + systune=yes + ntp=no + firewall=no + rlcheck=yes + ignore_existing_osuser_osgroup=no + ``` + + If you use `systune=yes`, the installation answers `yes` to all of the system tuning questions. + +1. Run the [installation script]({{< relref "/operate/rs/installing-upgrading/install/install-script" >}}) with the `-c` command-line option and add the path to the answer file. + + For example: + + ```sh + ./install.sh -c /home/user/answers + ``` + diff --git a/content/operate/rs/7.4/installing-upgrading/install/offline-installation.md b/content/operate/rs/7.4/installing-upgrading/install/offline-installation.md new file mode 100644 index 0000000000..0c23b72a4f --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/offline-installation.md @@ -0,0 +1,27 @@ +--- +Title: Offline installation +alwaysopen: false +categories: +- docs +- operate +- rs +description: If you install Redis Enterprise Software on a machine with no internet + connection, you need to perform two tasks manually. +linkTitle: Offline installation +weight: 60 +url: '/operate/rs/7.4/installing-upgrading/install/offline-installation/' +--- +By default, the installation process requires an internet connection to +enable installing dependency packages and for [synchronizing the +operating system clock]({{< relref "/operate/rs/clusters/configure/sync-clocks.md" >}}) against an NTP server. + +If you install Redis Enterprise Software on a machine without an +internet connection, you need to perform two tasks manually. + +## Install required dependency packages + +When you install Redis Enterprise Software on a machine that is not connected to the internet, the installation process fails and displays an error message informing you it failed to automatically install dependencies. Review the installation steps in the console to see which missing dependencies the process attempted to install. Install all these dependency packages and then run the installation again. + +## Set up NTP time synchronization + +At the end of the installation, the process asks if you want to set up NTP time synchronization. If you choose `Yes` while you are not connected to the internet, the action fails and displays the appropriate error message, but the installation completes successfully. Despite the successful completion of the installation, you still have to configure all nodes for [NTP time synchronization]({{< relref "/operate/rs/clusters/configure/sync-clocks.md" >}}). diff --git a/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/_index.md b/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/_index.md new file mode 100644 index 0000000000..8f657e6643 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/_index.md @@ -0,0 +1,44 @@ +--- +Title: Plan Redis Enterprise Software deployment +alwaysopen: false +categories: +- docs +- operate +- rs +description: Plan a deployment of Redis Enterprise Software. +hideListLinks: true +linkTitle: Plan deployment +weight: 4 +url: '/operate/rs/7.4/installing-upgrading/install/plan-deployment/' +--- + +Before installing Redis Enterprise Software, you need to: + +- Set up your hardware. See [Hardware requirements]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/hardware-requirements.md" >}}) and [Persistent and ephemeral node storage +]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage" >}}) for more information. + +- Choose your [deployment platform]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/supported-platforms.md" >}}). + + Redis Enterprise Software supports a variety of platforms, including: + + - Multiple Linux distributions (Ubuntu, Red Hat Enterprise Linux (RHEL), IBM CentOS, Oracle Linux) + - [Amazon AWS AMI]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/configuring-aws-instances" >}}) + - [Docker container]({{< relref "/operate/rs/installing-upgrading/quickstarts/docker-quickstart" >}}) (for development and testing only) + - [Kubernetes]({{< relref "/operate/kubernetes" >}}) + + For more details, see [Supported platforms]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/supported-platforms.md" >}}). + +- Open appropriate [network ports]({{< relref "/operate/rs/networking/port-configurations.md" >}}) in the firewall to allow connections to the nodes. + +- Configure [cluster DNS]({{< relref "/operate/rs/networking/cluster-dns.md" >}}) so that cluster nodes can reach each other by DNS names. +- By default, the installation process requires an internet connection to install dependencies and synchronize the operating system clock. To learn more, see [Offline installation]({{< relref "/operate/rs/installing-upgrading/install/offline-installation" >}}). + +## Next steps + +After you finish planning your deployment, you can: + +- [Download an installation package]({{< relref "/operate/rs/installing-upgrading/install/prepare-install/download-install-package" >}}). + +- [Prepare to install]({{< relref "/operate/rs/installing-upgrading/install/prepare-install" >}}) Redis Enterprise Software. + +- [View installation questions]({{< relref "/operate/rs/installing-upgrading/install/manage-installation-questions" >}}) and prepare answers before installation. diff --git a/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/configuring-aws-instances.md b/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/configuring-aws-instances.md new file mode 100644 index 0000000000..e56cf3878a --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/configuring-aws-instances.md @@ -0,0 +1,82 @@ +--- +Title: Configure AWS EC2 instances for Redis Enterprise Software +alwaysopen: false +categories: +- docs +- operate +- rs +description: Considerations for installing and running Redis Enterprise Software on + Amazon Elastic Cloud Compute (EC2) instances. +linkTitle: AWS EC2 configuration +weight: 80 +url: '/operate/rs/7.4/installing-upgrading/install/plan-deployment/configuring-aws-instances/' +--- +There are some special considerations for installing +and running Redis Enterprise Software on Amazon Elastic Cloud Compute (EC2) instances. + +These include: + +- [Storage considerations](#storage) +- [Instance types](#instance-types) +- [Security group configuration](#security) + +## Storage considerations {#storage} + +AWS EC2 instances are ephemeral, but your persistent database storage should +not be. If you require a persistent storage location for your database, +the storage must be located outside of the instance. When you +set up an instance, make sure it has a properly sized EBS-backed volume +connected. When you set up Redis Enterprise Software on the instance, make sure that [the +persistence storage]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage" >}}) is configured to use this volume. + +{{< note >}} +After [installing the Redis Enterprise Software package]({{< relref "/operate/rs/installing-upgrading" >}}) on the instance +and **before** running through [the setup process]({{< relref "/operate/rs/clusters/new-cluster-setup.md" >}}), +you must give the group `redislabs` permission to the EBS volume by +running the following command from the OS command-line interface (CLI): +```sh +chown redislabs:redislabs /< ebs folder name> +``` +{{< /note >}} + +Another feature that may be of importance to you is the use of +Provisioned IOPS for EBS-backed volumes. Provisioned IOPS guarantee a +certain level of disk performance. There are two features in Redis Enterprise Software where +this feature could be critical to use: + +1. When using [Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering/" >}}) +1. When using AOF on every write and there is a high write load. In + this case, the provisioned IOPS should be on the nodes used as + replicas in the cluster. + +## Instance types {#instance-types} + +Choose an instance type that has (at minimum) enough free memory and +disk space to meet the Redis Enterprise Software [hardware +requirements]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/hardware-requirements.md" >}}). + +In addition, some instance types are optimized for EBS-backed volumes +and some are not. If you are using persistent storage, you should use an +instance type that is, especially if disk drain rate matters to your database +implementation. + +## Security group configuration {#security} + +When configuring the security group: + +- Define a custom TCP rule for port 8443 to allow web browser access + to the Redis Enterprise Software Cluster Manager UI from the IP address range you use to + access the Cluster Manager UI. +- If you are using the DNS resolving option with Redis Enterprise Software, define a DNS UDP + rule for port 53 to allow access to the databases' endpoints by + using the [DNS resolving mechanism]({{< relref "/operate/rs/networking/cluster-dns" >}}). +- To create a cluster that has multiple nodes all running as instances on AWS, + you need to define a security group that has an All TCP rule for all ports, 0 - 65535, + and add it to all instances that are part of the cluster. + This ensures that all nodes are able to communicate with each other. + To limit the number of open ports, you can open only the [ports used by Redis Enterprise Software]({{< relref "/operate/rs/networking/port-configurations.md" >}}). + +After successfully launching the instances: + +1. Install Redis Enterprise Software from the [Linux package or AWS AMI]({{< relref "/operate/rs/installing-upgrading" >}}). +2. [Set up the cluster]({{< relref "/operate/rs/clusters/new-cluster-setup.md" >}}). diff --git a/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/file-locations.md b/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/file-locations.md new file mode 100644 index 0000000000..8ed1f9dfb6 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/file-locations.md @@ -0,0 +1,44 @@ +--- +Title: File locations +alwaysopen: false +categories: +- docs +- operate +- rs +description: Redis Enterprise Software file installation locations. +linkTitle: File locations +weight: 60 +url: '/operate/rs/7.4/installing-upgrading/install/plan-deployment/file-locations/' +--- +{{}} +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. +{{}} + +## Application directories + +The directories that Redis Enterprise Software installs into are: + +| **Path** | **Description** | +|------------|-----------------| +| /opt/redislabs | Main installation directory for all Redis Enterprise Software binaries | +| /opt/redislabs/bin | Binaries for all the utilities for command-line access and management, such as [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) or [`redis-cli`]({{< relref "/operate/rs/references/cli-utilities/redis-cli" >}}) | +| /opt/redislabs/config | System configuration files | +| /opt/redislabs/lib | System library files | +| /opt/redislabs/sbin | System binaries for tweaking provisioning | + +## Configuration and data directories + +The default directories that Redis Enterprise Software uses for data and metadata are: + +| **Path** | **Description** | +|------------|-----------------| +| /var/opt/redislabs | Default storage location for the cluster data, system logs, backups, and ephemeral, persisted data | +| /var/opt/redislabs/log | System logs for Redis Enterprise Software | +| /var/opt/redislabs/run | Socket files for Redis Enterprise Software | +| /etc/opt/redislabs | Default location for cluster manager configuration and certificates | +| /tmp | Temporary files | + +You can change these file locations for: + +- [Ephemeral and persistence storage]({{< relref "/operate/rs/clusters/new-cluster-setup.md" >}}) during cluster setup +- [Socket files]({{< relref "/operate/rs/installing-upgrading/configuring/change-location-socket-files.md" >}}) after cluster setup diff --git a/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/hardware-requirements.md b/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/hardware-requirements.md new file mode 100644 index 0000000000..f87e412dcb --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/hardware-requirements.md @@ -0,0 +1,46 @@ +--- +Title: Hardware requirements +alwaysopen: false +categories: +- docs +- operate +- rs +- kubernetes +description: Redis Enterprise Software hardware requirements for development and production + environments. +linkTitle: Hardware requirements +weight: 20 +url: '/operate/rs/7.4/installing-upgrading/install/plan-deployment/hardware-requirements/' +--- +{{< embed-md "hardware-requirements-embed.md" >}} + +## Sizing considerations + +### General database sizing {#general-sizing} + +Factors to consider when sizing your database. + +- **Dataset size** – Your limit should be greater than your dataset size to leave room for overhead. +- **Database throughput** – High throughput needs more shards, leading to a higher memory limit. +- [**Modules**]({{< relref "/operate/oss_and_stack/stack-with-enterprise" >}}) – Using modules with your database consumes more memory. +- [**Database clustering**]({{< relref "/operate/rs/databases/durability-ha/clustering" >}}) – Allows you to spread your data into shards across multiple nodes. +- [**Database replication**]({{< relref "/operate/rs/databases/durability-ha/replication" >}}) – Enabling replication doubles memory consumption. + +### Active-Active database sizing {#active-active-sizing} + +Additional factors for sizing Active-Active databases: + +- [**Active-Active replication**]({{< relref "/operate/rs/databases/active-active" >}}) – Requires double the memory of regular replication, which can be up to two times (2x) the original data size per instance. +- [**Database replication backlog**]({{< relref "/operate/rs/databases/durability-ha/replication#database-replication-backlog" >}}) – For synchronization between shards. By default, this is set to 1% of the database size. +- [**Active-Active replication backlog**]({{< relref "/operate/rs/databases/active-active/manage#replication-backlog" >}}) – For synchronization between clusters. By default, this is set to 1% of the database size. + +{{}} +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. +{{}} + +### Sizing databases with Auto Tiering enabled {#redis-on-flash-sizing} + +Additional factors for sizing databases with Auto Tiering enabled: + +- [**Database persistence**]({{< relref "/operate/rs/databases/configure/database-persistence#redis-on-flash-data-persistence" >}}) – Auto Tiering uses dual database persistence where both the primary and replica shards persist to disk. This may add some processor and network overhead, especially in cloud configurations with network-attached storage. + diff --git a/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage.md b/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage.md new file mode 100644 index 0000000000..5ad51bee5a --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage.md @@ -0,0 +1,56 @@ +--- +Title: Persistent and ephemeral node storage +alwaysopen: false +categories: +- docs +- operate +- rs +- kubernetes +description: Configure paths for persistent storage and ephemeral storage. +linktitle: Persistent node storage +toc: 'true' +weight: 50 +url: '/operate/rs/7.4/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage/' +--- +For each node in the cluster, you can configure paths for both persistent +storage and ephemeral storage. To do so, the volume must have full permissions for user and group `redislabs` or users:group `redislabs:redislabs`. See the [Customize system user and group]({{< relref "/operate/rs/installing-upgrading/install/customize-user-and-group" >}}) page for instructions. + +{{< note >}} +The persistent storage and ephemeral storage discussed in this document are not related +to Redis persistence or AWS ephemeral drives. +{{< /note >}} + +## Persistent storage + +Persistent storage is mandatory. The cluster uses persistent storage to store +information that needs to persist if a shard or a node fails, +such as server logs, configurations, and files. + +To set the frequency of syncs, you can configure [persistence]({{< relref "/operate/rs/databases/configure/database-persistence" >}}) +options for a database. + +The persistent volume must be a storage area network (SAN) +using an EXT4 or XFS file system and be connected as an external storage volume. + +When using append-only file (AOF) persistence, use flash-based storage +for the persistent volume. + +## Ephemeral storage + +Ephemeral storage is optional. If configured, temporary information that does not need to be persisted is stored by the cluster in the ephemeral storage. +This improves performance and helps reduce the load on the persistent storage. + +Ephemeral storage must be a locally attached volume on each node. + +## Disk size requirements + +For disk size requirements, see: + +- [Hardware + requirements]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/hardware-requirements" >}}) + for general guidelines regarding the ideal disk size for each type of + storage. +- [Disk size requirements for extreme write + scenarios]({{< relref "/operate/rs/clusters/optimize/disk-sizing-heavy-write-scenarios" >}}) + for special considerations when dealing with a high rate of write + commands. diff --git a/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/supported-platforms.md b/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/supported-platforms.md new file mode 100644 index 0000000000..fd4b8e13cb --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/plan-deployment/supported-platforms.md @@ -0,0 +1,15 @@ +--- +Title: Supported platforms +alwaysopen: false +categories: +- docs +- operate +- rs +description: Redis Enterprise Software is supported on several operating systems, + cloud environments, and virtual environments. +linkTitle: Supported platforms +weight: 30 +tocEmbedHeaders: true +url: '/operate/rs/7.4/installing-upgrading/install/plan-deployment/supported-platforms/' +--- +{{< embed-md "supported-platforms-embed.md">}} diff --git a/content/operate/rs/7.4/installing-upgrading/install/prepare-install/_index.md b/content/operate/rs/7.4/installing-upgrading/install/prepare-install/_index.md new file mode 100644 index 0000000000..4c77f60114 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/prepare-install/_index.md @@ -0,0 +1,37 @@ +--- +Title: Prepare to install Redis Enterprise Software +alwaysopen: false +categories: +- docs +- operate +- rs +description: Prepare to install Redis Enterprise Software. +hideListLinks: true +linkTitle: Prepare to install +weight: 6 +url: '/operate/rs/7.4/installing-upgrading/install/prepare-install/' +--- + +Before you install Redis Enterprise Software: + +- [Download an installation package]({{< relref "/operate/rs/installing-upgrading/install/prepare-install/download-install-package" >}}). + +- [View installation questions]({{< relref "/operate/rs/installing-upgrading/install/manage-installation-questions" >}}) and optionally prepare answers before installation. + +- Review the [security considerations]({{< relref "/operate/rs/security/" >}}) for your deployment. + +- Check that you have root-level access to each node, either directly or with `sudo`. + +- Check that all [required ports are available]({{< relref "/operate/rs/installing-upgrading/install/prepare-install/port-availability" >}}). + +- [Turn off Linux swap]({{< relref "/operate/rs/installing-upgrading/configuring/linux-swap.md" >}}) on all cluster nodes. + +- If you require the `redislabs` UID (user ID) and GID (group ID) numbers to be the same on all the nodes, create the `redislabs` user and group with the required numbers on each node. + +- If you want to use Auto Tiering for your databases, see [Auto Tiering installation]({{< relref "/operate/rs/installing-upgrading/install/install-on-linux#auto-tiering-installation" >}}). + +## Next steps + +- View [installation script options]({{< relref "/operate/rs/installing-upgrading/install/install-script" >}}) before starting the installation. + +- [Install Redis Enterprise Software]({{< relref "/operate/rs/installing-upgrading/install" >}}). diff --git a/content/operate/rs/7.4/installing-upgrading/install/prepare-install/download-install-package.md b/content/operate/rs/7.4/installing-upgrading/install/prepare-install/download-install-package.md new file mode 100644 index 0000000000..ef3a7b395d --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/prepare-install/download-install-package.md @@ -0,0 +1,23 @@ +--- +Title: Download a Redis Enterprise Software installation package +alwaysopen: false +categories: +- docs +- operate +- rs +description: Download a Redis Enterprise Software installation package. +linkTitle: Download installation package +weight: 20 +url: '/operate/rs/7.4/installing-upgrading/install/prepare-install/download-install-package/' +--- + +To download the installation package for any of the supported platforms: + +1. Go to the [Redis download page](https://cloud.redis.io/#/rlec-downloads). +1. Sign in with your Redis credentials or create a new account. +1. In the **Downloads** section for Redis Enterprise Software, select the installation package for your platform then select **Go**. + +{{< note >}} +Before you install the Linux package or AWS AMI on an AWS EC2 instance, +review the [configuration requirements for AWS EC2 instances]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/configuring-aws-instances" >}}). +{{< /note >}} diff --git a/content/operate/rs/7.4/installing-upgrading/install/prepare-install/port-availability.md b/content/operate/rs/7.4/installing-upgrading/install/prepare-install/port-availability.md new file mode 100644 index 0000000000..dea79da761 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/install/prepare-install/port-availability.md @@ -0,0 +1,24 @@ +--- +Title: Ensure port availability +alwaysopen: false +categories: +- docs +- operate +- rs +description: Make sure required ports are available. +linkTitle: Ensure port availability +weight: 40 +url: '/operate/rs/7.4/installing-upgrading/install/prepare-install/port-availability/' +--- + +Before [installing Redis Enterprise Software]({{< relref "/operate/rs/installing-upgrading/install" >}}), make sure all required ports are available. + +{{}} + +## Update `sysctl.conf` to avoid port collisions + +{{}} + +## Ubuntu conflicts with port 53 + +{{}} diff --git a/content/operate/rs/7.4/installing-upgrading/product-lifecycle.md b/content/operate/rs/7.4/installing-upgrading/product-lifecycle.md new file mode 100644 index 0000000000..c161fe149c --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/product-lifecycle.md @@ -0,0 +1,55 @@ +--- +Title: Redis Enterprise Software product lifecycle +alwaysopen: false +categories: +- docs +- operate +- rs +description: The product lifecycle of Redis Enterprise Software. +linkTitle: Product lifecycle +weight: 100 +tocEmbedHeaders: true +url: '/operate/rs/7.4/installing-upgrading/product-lifecycle/' +--- +The Redis Enterprise Software product lifecycle fully reflects the [subscription agreement](https://redis.com/software-subscription-agreement). +However, for any discrepancy between the two policies, the subscription agreement prevails. + +Redis Enterprise modules follow the [modules lifecycle]({{< relref "/operate/oss_and_stack/stack-with-enterprise/modules-lifecycle" >}}). + +## Release numbers + +Redis uses a four-place numbering scheme to designate released versions of its products. +The format is “Major1.Major2.Minor-Build”. + +- Major sections of the version number represents fundamental changes and additions in + capabilities to Redis Enterprise Software. The Major1 and Major2 part of the + version number are incremented based on the size and scale of the changes in each + release. +- The Minor section of the version number represents quality improvements, fixes to + existing capabilities, and new capabilities which are typically minor, feature-flagged, or optional. +- Build number is incremented with any changes to the product. Build number is + incremented with each build when any change is made to the binaries. + +Redis Enterprise Software typically gets two major releases every year but the product shipping cycles may vary. +Maintenance releases, typically available on the last minor release of the current major1.major2 release are typically made available on a monthly cadence, although cycles may vary. + +## End-of-life schedule {#endoflife-schedule} + +For Redis Enterprise Software versions 6.2 and later, the end-of-life (EOL) for each major release occurs 24 months after the formal release of the subsequent major version. Monthly maintenance will be provided on the last minor release of the major1.major2 releases. +This update to the EOL policy allows a lead time of at least 24 months to upgrade to the new release after it is available. + + +| Version - Release date | End of Life (EOL) | +| ----------------------------------------- | ------------------ | +| 7.4 – February 2024 | - | +| 7.2 – August 2023 | February 28, 2026 | +| 6.4 – February 2023 | August 31, 2025 | +| 6.2 – August 2021 | February 28, 2025 | +| 6.0 – May 2020 | May 31, 2022 | +| 5.6 – April 2020 | October 31, 2021 | +| 5.4 – December 2018 | December 31, 2020 | +| 5.2 – June 2018 | December 31, 2019 | + +{{}} + +For detailed upgrade instructions, see [Upgrade a Redis Enterprise Software cluster]({{}}). diff --git a/content/operate/rs/7.4/installing-upgrading/quickstarts/_index.md b/content/operate/rs/7.4/installing-upgrading/quickstarts/_index.md new file mode 100644 index 0000000000..76a89d89f2 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/quickstarts/_index.md @@ -0,0 +1,27 @@ +--- +Title: Redis Enterprise Software quickstarts +alwaysopen: false +categories: +- docs +- operate +- rs +description: Follow these quickstarts to try out Redis Enterprise Software. +hideListLinks: true +linkTitle: Quickstarts +weight: 10 +url: '/operate/rs/7.4/installing-upgrading/quickstarts/' +--- + +Try out Redis Enterprise Software using one of the following quickstarts: + +- [Redis Enterprise Software quickstart]({{< relref "/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart" >}}) + +- [Docker quickstart for Redis Enterprise Software]({{< relref "/operate/rs/installing-upgrading/quickstarts/docker-quickstart" >}}) + +Additional quickstart guides are available to help you: + +- Set up a [Auto Tiering cluster]({{< relref "/operate/rs/databases/auto-tiering/quickstart.md" >}}) to optimize memory resources. + +- Set up an [Active-Active cluster]({{< relref "/operate/rs/databases/active-active/get-started.md" >}}) to enable high availability. + +- [Benchmark]({{< relref "/operate/rs/clusters/optimize/memtier-benchmark.md" >}}) Redis Enterprise Software performance. diff --git a/content/operate/rs/7.4/installing-upgrading/quickstarts/docker-quickstart.md b/content/operate/rs/7.4/installing-upgrading/quickstarts/docker-quickstart.md new file mode 100644 index 0000000000..af50cc77c7 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/quickstarts/docker-quickstart.md @@ -0,0 +1,138 @@ +--- +Title: Docker quickstart for Redis Enterprise Software +alwaysopen: false +categories: +- docs +- operate +- rs +description: Set up a development or test deployment of Redis Enterprise Software + using Docker. +linkTitle: Docker quickstart +weight: 2 +aliases: /operate/rs/installing-upgrading/get-started-docker/ +url: '/operate/rs/7.4/installing-upgrading/quickstarts/docker-quickstart/' +--- +{{< warning >}} +Docker containers are currently only supported for development and test environments, not for production. Use [Redis Enterprise on Kubernetes]({{< relref "/operate/kubernetes" >}}) for a supported containerized deployment. +{{< /warning >}} + +For testing purposes, you can run Redis Enterprise Software on Docker containers on +Linux, Windows, or MacOS. +The [Redis Enterprise Software container](https://hub.docker.com/r/redislabs/redis/) +acts as a node in a cluster. + +To get started with a single Redis Enterprise Software container: + +1. [Install Docker](#install-docker) for your operating system + +2. [Run the Redis Enterprise Software Docker container](#run-the-container) + +3. [Set up a cluster](#set-up-a-cluster) + +4. [Create a new database](#create-a-database) + +5. [Connect to your database](#connect-to-your-database) + +## Install Docker + +Follow the Docker installation instructions for your operating system: + +- [Linux](https://docs.docker.com/install/#supported-platforms) +- [MacOS](https://docs.docker.com/docker-for-mac/install/) +- [Windows](https://store.docker.com/editions/community/docker-ce-desktop-windows) + +## Run the container + +To download and start the Redis Enterprise Software Docker container, run the following +[`docker run`](https://docs.docker.com/engine/reference/commandline/run/) command in the terminal or command line for your operating system. + +{{< note >}} +On Windows, make sure Docker is configured to run Linux-based containers. +{{< /note >}} + +```sh +docker run -d --cap-add sys_resource --name RE -p 8443:8443 -p 9443:9443 -p 12000:12000 redislabs/redis +``` + +The example command runs the Docker container with Redis Enterprise Software on `localhost` and opens the following ports: + +- Port 8443 for HTTPS connections + +- Port 9443 for [REST API]({{< relref "/operate/rs/references/rest-api" >}}) connections + +- Port 12000 configured Redis database port allowing client connections + +You can publish other [ports]({{< relref "/operate/rs/networking/port-configurations.md" >}}) +with `-p :` or use the `--network host` option to open all ports to the host network. + +## Set up a cluster + +{{}} + +## Create a database + +{{}} + +{{< note >}} +{{< embed-md "docker-memory-limitation.md" >}} +{{< /note >}} + +## Connect to your database + +After you create the Redis database, you can connect to it to begin storing data. + +### Use redis-cli inside Docker {#connect-inside-docker} + +Every installation of Redis Enterprise Software includes the command-line tool [`redis-cli`]({{< relref "/operate/rs/references/cli-utilities/redis-cli" >}}) to interact with your Redis database. You can use `redis-cli` to connect to your database from within the same Docker network. + +Use [`docker exec`](https://docs.docker.com/engine/reference/commandline/exec/) to start an interactive `redis-cli` session in the running Redis Enterprise Software container: + +```sh +$ docker exec -it redis-cli -h redis-12000.cluster.local -p 12000 +127.0.0.1:12000> SET key1 123 +OK +127.0.0.1:12000> GET key1 +"123" +``` + +### Connect from the host environment {#connect-outside-docker} + +The database you created uses port `12000`, which is also mapped from the Docker container back to the host environment. This lets you use any method you have available locally to [connect to a Redis database]({{< relref "/operate/rs/databases/connect/" >}}). Use `localhost` as the `host` and `12000` as the port. + +## Test different topologies + +{{< warning >}} +Docker containers are currently only supported for development and test environments, not for production. Use [Redis Enterprise on Kubernetes]({{< relref "/operate/kubernetes" >}}) for a supported containerized deployment. +{{< /warning >}} + +When deploying Redis Enterprise Software using Docker for testing, several common topologies are available, according to your requirements: + +- [Single-node cluster](#single-node) – For local development or functional testing + +- [Multi-node cluster on a single host](#multi-node-one-host) – For a small-scale deployment that is similar to production + +- [Multi-node cluster with multiple hosts](#multi-node-multi-host) – For more predictable performance or high availability compared to single-host deployments + +### Single node {#single-node} + +The simplest topology is to run a single-node Redis Enterprise Software cluster with a single container on a single host machine. You can use this topology for local development or functional testing. + +Single-node clusters have limited functionality. For example, Redis Enterprise Software can't use replication or protect against failures if the cluster has only one node. + +{{< image filename="/images/rs/RS-Docker-container.png" >}} + +### Multiple nodes on one host {#multi-node-one-host} + +You can create a multi-node Redis Enterprise Software cluster by deploying multiple containers to a single host machine. The resulting cluster is scale minimized but similar to production deployments. + +However, this will also have several limitations. For example, you cannot map the same port on multiple containers on the same host. + +{{< image filename="/images/rs/RS-Docker-cluster-single-host.png" >}} + +### Multiple nodes and hosts {#multi-node-multi-host} + +You can create a multi-node Redis Enterprise Software cluster with multiple containers by deploying each container to a different host machine. + +This topology minimizes interference between containers, allowing for the testing of more Redis Enterprise Software features. + +{{< image filename="/images/rs/RS-Docker-cluster-multi-host.png" >}} diff --git a/content/operate/rs/7.4/installing-upgrading/quickstarts/redis-enterprise-software-quickstart.md b/content/operate/rs/7.4/installing-upgrading/quickstarts/redis-enterprise-software-quickstart.md new file mode 100644 index 0000000000..7379628c53 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/quickstarts/redis-enterprise-software-quickstart.md @@ -0,0 +1,119 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: Set up a test deployment of Redis Enterprise Software for Linux. +linkTitle: Quickstart +title: Redis Enterprise Software quickstart +weight: 1 +url: '/operate/rs/7.4/installing-upgrading/quickstarts/redis-enterprise-software-quickstart/' +--- +This guide helps you install Redis Enterprise Software on a Linux host to test its capabilities. + +When finished, you'll have a simple cluster with a single node: + +1. [Ensure port availability](#ensure-port-availability) + +1. [Install Redis Enterprise Software](#install-redis-enterprise-software) + +1. [Set up a Redis Enterprise Software cluster](#set-up-a-cluster) + +1. [Create a new Redis database](#create-a-database) + +1. [Connect to your Redis database](#connect-to-your-database) + +{{< note >}} +**This quickstart is designed for local testing only.** +For production environments, see the [install and setup]({{< relref "/operate/rs/installing-upgrading#install-redis-enterprise-software" >}}) guide for deployment options and instructions. +{{< /note >}} + +## Ensure port availability + +{{}} + +### Update `sysctl.conf` to avoid port collisions + +{{}} + +### Ubuntu conflicts with port 53 + +{{}} + + +### Configuration for AWS and GCP + +For detailed configuration instructions, see your cloud provider's documentation. + +1. Create a VPC that you can use with regional subnets. + +1. Within this VPC, create firewall rules that allow external and internal access for Redis Enterprise Software. + + +| Ingress/Egress | Source | Protocol | Ports | Other protocols | +|------------------|----------------------------------------------------|-----------|------------------------------------------|------------------| +| Ingress | 0.0.0.0/0 | TCP | 21, 22, 53, 8001, 8443, 9443, 8070,
10000-19999 | ICMP | +| Ingress | 0.0.0.0/0 | UDP | 53, 5353 | | +| Ingress | 10.0.0.0/8 (if subnets use 10. ranges) | all | all | | + + +## Install Redis Enterprise Software + +To install Redis Enterprise Software: + +1. Download the installation files from the [Redis Enterprise Download Center](https://redis.com/redis-enterprise-software/download-center/software/) +and copy the download package to a machine with a Linux-based OS. + + {{< note >}} +You are required to create a free account to access the download center. + {{< /note >}} + +1. Extract the installation files: + + ```sh + tar vxf + ``` + +1. Run the `install.sh` script in the current directory: + + ```sh + sudo ./install.sh -y + ``` + +## Set up a cluster + +To set up your machine as a Redis Enterprise Software cluster: + +{{< embed-md "cluster-setup.md" >}} + +## Create a database + +{{}} + +## Connect to your database + +After you create the Redis database, you can connect to it and store data. +See [Test client connection]({{< relref "/operate/rs/databases/connect/test-client-connectivity" >}}) for connection options and examples. + +## Supported web browsers + +To use the Redis Enterprise Software Cluster Manager UI, you need a modern browser with JavaScript enabled. + +The following browsers have been tested with the current version of the Cluster Manager UI: + +- Microsoft Windows, version 10 or later. + - [Google Chrome](https://www.google.com/chrome/), version 48 and later + - [Microsoft Edge](https://www.microsoft.com/edge), version 20 and later + - [Mozilla Firefox](https://www.mozilla.org/firefox/), version 44 and and later + - [Opera](https://www.opera.com/), version 35 and later + +- Apple macOS: + - [Google Chrome](https://www.google.com/chrome/), version 48 and later + - [Mozilla Firefox](https://www.mozilla.org/firefox/), version 44 and and later + - [Opera](https://www.opera.com/), version 35 and later + +- Linux: + - [Google Chrome](https://www.google.com/chrome/), version 49 and later + - [Mozilla Firefox](https://www.mozilla.org/firefox/), version 44 and and later + - [Opera](https://www.opera.com/), version 35 and later diff --git a/content/operate/rs/7.4/installing-upgrading/uninstalling.md b/content/operate/rs/7.4/installing-upgrading/uninstalling.md new file mode 100644 index 0000000000..877001a6cf --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/uninstalling.md @@ -0,0 +1,30 @@ +--- +LinkTitle: Uninstall +Title: Uninstall Redis Enterprise Software +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +weight: 70 +url: '/operate/rs/7.4/installing-upgrading/uninstalling/' +--- + +Use the script `rl_uninstall.sh` to uninstall Redis Enterprise Software and remove its files from a node. The script also deletes all Redis data and configuration from the node. + +The uninstall script does not remove the node from the cluster, but the node's status changes to down. For node removal instructions, see [Remove a cluster node]({{}}). + +## Uninstall Redis Enterprise Software + +To uninstall Redis Enterprise Software from a cluster node: + +1. Navigate to the script's location, which is in `/opt/redislabs/bin/` by default. + +1. Run the uninstall script as the root user: + + ```sh + sudo ./rl_uninstall.sh + ``` + +When you run the uninstall script on a node, it only uninstalls Redis Enterprise Software from that node. To uninstall Redis Enterprise Software for the entire cluster, run the uninstall script on each cluster node. diff --git a/content/operate/rs/7.4/installing-upgrading/upgrading/_index.md b/content/operate/rs/7.4/installing-upgrading/upgrading/_index.md new file mode 100644 index 0000000000..165c84e325 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/upgrading/_index.md @@ -0,0 +1,20 @@ +--- +Title: Upgrade an existing Redis Enterprise Software deployment +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +hideListLinks: true +linkTitle: Upgrade +weight: 60 +url: '/operate/rs/7.4/installing-upgrading/upgrading/' +--- +To upgrade Redis Enterprise Software: + +1. Verify appropriate [network ports]({{< relref "/operate/rs/networking/port-configurations.md" >}}) are either open or used by Redis Enterprise Software. + +1. [Upgrade the software on all nodes of the cluster.]({{< relref "/operate/rs/installing-upgrading/upgrading/upgrade-cluster" >}}) + +2. _(Optional)_ [Upgrade each database]({{< relref "/operate/rs/installing-upgrading/upgrading/upgrade-database" >}}) in the cluster or [upgrade an Active-Active database]({{< relref "/operate/rs/installing-upgrading/upgrading/upgrade-active-active" >}}) to enable new features and important fixes. diff --git a/content/operate/rs/7.4/installing-upgrading/upgrading/upgrade-active-active.md b/content/operate/rs/7.4/installing-upgrading/upgrading/upgrade-active-active.md new file mode 100644 index 0000000000..d1a2ab2b8a --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/upgrading/upgrade-active-active.md @@ -0,0 +1,147 @@ +--- +Title: Upgrade an Active-Active database +alwaysopen: false +categories: +- docs +- operate +- rs +description: Upgrade an Active-Active database. +linkTitle: Active-Active databases +weight: 70 +url: '/operate/rs/7.4/installing-upgrading/upgrading/upgrade-active-active/' +--- + +When you upgrade an [Active-Active (CRDB) database]({{< relref "/operate/rs/databases/active-active" >}}), you can also upgrade the CRDB protocol version and feature version. + +## CRDB protocol version guidelines + +Redis Enterprise Software versions 5.4.2 and later use CRDB protocol version 1 to help support Active-Active features. + +CRDB protocol version 1 is backward compatible, which means Redis Enterprise v5.4.2 CRDB instances can understand write operations from instances using the earlier CRDB protocol version 0. + +After you upgrade one instance's CRDB protocol to version 1: + +- Any instances that use CRDB protocol version 1 can receive updates from both version 1 and version 0 instances. + +- However, instances that still use CRDB protocol version 0 cannot receive write updates from version 1 instances. + +- After you upgrade an instance from CRDB protocol version 0 to version 1, it automatically receives any missing write operations. + +Follow these upgrade guidelines: + +- Upgrade all instances of a specific CRDB within a reasonable time frame to avoid temporary inconsistencies between the instances. + +- Make sure that you upgrade all instances of a specific CRDB before you do global operations on the CRDB, such as removing instances and adding new instances. + +- As of v6.0.20, protocol version 0 is deprecated and support will be removed in a future version. + +- To avoid upgrade failures, update all Active-Active databases to protocol version 1 _before_ upgrading Redis Enterprise Software to v6.0.20 or later. + +## Feature version guidelines + +Starting with version 5.6.0, a new feature version (also called a _feature set version_) helps support new Active-Active features. + +When you update the feature version for an Active-Active database, the feature version is updated for all database instances. + +Follow these upgrade guidelines: + +- As of v6.0.20, feature version 0 is deprecated and support will be removed in a future version. + +- To avoid upgrade failures, update all Active-Active databases to protocol version 1 _before_ upgrading Redis Enterprise Software to v6.0.20 or later. + +## Upgrade Active-Active database instance + +To upgrade an Active-Active database (CRDB) instance: + +1. [Upgrade Redis Enterprise Software]({{< relref "/operate/rs/installing-upgrading/upgrading/upgrade-cluster" >}}) on each node in the clusters where the Active-Active instances are located. + +1. To see the status of your Active-Active instances, run: + + ```sh + rladmin status + ``` + + The statuses of the Active-Active instances on the node can indicate: + + - `OLD REDIS VERSION` + - `OLD CRDB PROTOCOL VERSION` + - `OLD CRBD FEATURESET VERSION` + + {{< image filename="/images/rs/crdb-upgrade-node.png" >}} + +1. To upgrade each Active-Active instance, including the Redis version and CRDB protocol version, run: + + - To upgrade a database without modules: + + ```sh + rladmin upgrade db + ``` + + - If the database has modules enabled and new module versions are available in the cluster, run `rladmin upgrade db` with additional parameters to upgrade the module versions when you upgrade the database. See [Upgrade modules]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module" >}}) for more details. + + If the protocol version is old, read the warning message carefully and confirm. + + {{< image filename="/images/rs/crdb-upgrade-protocol.png" >}} + + The Active-Active instance uses the new Redis version and CRDB protocol version. + + Use the `keep_crdt_protocol_version` option to upgrade the database feature version +without upgrading the CRDB protocol version. + + If you use this option, make sure that you upgrade the CRDB protocol soon after with the [`rladmin upgrade db`]({{< relref "/operate/rs/references/cli-utilities/rladmin/upgrade#upgrade-db" >}}) command. + + You must upgrade the CRDB protocol before you update the CRDB feature set version. + +1. If the feature set version is old, you must upgrade all of the Active-Active instances. Then, to update the feature set for each active-active database, run: + + ```sh + crdb-cli crdb update --crdb-guid --featureset-version yes + ``` + + You can retrieve the `` with the following command: + + ```sh + crdb-cli crdb list + ``` + + Look for the fully qualified domain name (CLUSTER-FDQN) of your cluster and use the associated GUID: + + ```sh + CRDB-GUID NAME REPL-ID CLUSTER-FQDN + 700140c5-478e-49d7-ad3c-64d517ddc486 aatest 1 aatest1.example.com + 700140c5-478e-49d7-ad3c-64d517ddc486 aatest 2 aatest2.example.com + ``` + +1. Update module information in the CRDB configuration using the following command syntax: + + ```sh + crdb-cli crdb update --crdb-guid --default-db-config \ + '{ "module_list": + [ + { + "module_name": "", + "semantic_version": "" + }, + { + "module_name": "", + "semantic_version": "" + } + ]}' + ``` + + For example: + + ```sh + crdb-cli crdb update --crdb-guid 82a80988-f5fe-4fa5-bca0-aef2a0fd60db --default-db-config \ + '{ "module_list": + [ + { + "module_name": "search", + "semantic_version": "2.4.6" + }, + { + "module_name": "ReJSON", + "semantic_version": "2.4.5" + } + ]}' + ``` diff --git a/content/operate/rs/7.4/installing-upgrading/upgrading/upgrade-cluster.md b/content/operate/rs/7.4/installing-upgrading/upgrading/upgrade-cluster.md new file mode 100644 index 0000000000..7cb7efbef9 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/upgrading/upgrade-cluster.md @@ -0,0 +1,88 @@ +--- +Title: Upgrade a Redis Enterprise Software cluster +alwaysopen: false +categories: +- docs +- operate +- rs +description: Upgrade a Redis Enterprise Software cluster. +linkTitle: Upgrade cluster +toc: 'true' +weight: 30 +tocEmbedHeaders: true +url: '/operate/rs/7.4/installing-upgrading/upgrading/upgrade-cluster/' +--- + +{{}} + +See the [Redis Enterprise Software product lifecycle]({{}}) for more information about release numbers and the end-of-life schedule. + +## Upgrade prerequisites + +Before upgrading a cluster: + +- Verify access to [rlcheck]({{< relref "/operate/rs/references/cli-utilities/rlcheck/" >}}) and [rladmin]({{< relref "/operate/rs/references/cli-utilities/rladmin/#use-the-rladmin-shell" >}}) commands + +- Verify that you meet the upgrade path requirements for your desired cluster version and review the relevant [release notes]({{< relref "/operate/rs/release-notes" >}}) for any preparation instructions. + +- Avoid changing the database configuration or performing other cluster management operations during the upgrade process, as this might cause unexpected results. + +- Upgrade the cluster's primary (master) node first. To identify the primary node, use one of the following methods: + + - **Nodes** screen in the new Cluster Manager UI (only available for Redis Enterprise versions 7.2 and later) + + - [`rladmin status nodes`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-nodes" >}}) command + + - [`GET /nodes/status`]({{< relref "/operate/rs/references/rest-api/requests/nodes/status#get-all-nodes-status" >}}) REST API request + +## Upgrade cluster + +Starting with the primary (master) node, follow these steps for every node in the cluster. To ensure cluster availability, upgrade each node separately. + +1. Verify node operation with the following commands: + + ``` shell + $ rlcheck + $ rladmin status extra all + ``` + +2. Download the Redis Enterprise Software installation package to the machine running the node from the Download Center on [https://cloud.redis.io](https://cloud.redis.io). + +3. Extract the installation package: + + ```sh + tar vxf + ``` + + {{}} +You cannot change the installation path or the user during the upgrade. + {{}} + +1. Run the install command. See [installation script options]({{< relref "/operate/rs/installing-upgrading/install/install-script" >}}) for a list of command-line options you can add to the following command: + + ``` shell + sudo ./install.sh + ``` + + The installation script automatically recognizes the upgrade and responds accordingly. + + The upgrade replaces all node processes, which might briefly interrupt any active connections. + +2. Verify the node was upgraded to the new version and is still operational: + + ``` shell + $ rlcheck + $ rladmin status extra all + ``` + +3. Visit the Cluster Manager UI. + + If the Cluster Manager UI was open in a web browser during the upgrade, refresh the browser to reload the console. + +After all nodes are upgraded, the cluster is fully upgraded. Certain features introduced in the new version of Redis Enterprise Software only become available after upgrading the entire cluster. + +After upgrading from version 6.0.x to 6.2.x, restart `cnm_exec` on each cluster node to enable more advanced state machine handling capabilities: + +```sh +supervisorctl restart cnm_exec +``` diff --git a/content/operate/rs/7.4/installing-upgrading/upgrading/upgrade-database.md b/content/operate/rs/7.4/installing-upgrading/upgrading/upgrade-database.md new file mode 100644 index 0000000000..afb78a2a5b --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/upgrading/upgrade-database.md @@ -0,0 +1,123 @@ +--- +Title: Upgrade a Redis Enterprise Software database +alwaysopen: false +categories: +- docs +- operate +- rs +description: Upgrade a Redis Enterprise Software database. +linkTitle: Upgrade database +weight: 50 +url: '/operate/rs/7.4/installing-upgrading/upgrading/upgrade-database/' +--- + +## Default Redis database versions {#default-db-versions} + +When you upgrade an existing database, it uses the latest bundled Redis version unless you specify a different version with the `redis_version` option in the [REST API]({{< relref "/operate/rs/references/rest-api/requests/bdbs" >}}) or [`rladmin upgrade db`]({{< relref "/operate/rs/references/cli-utilities/rladmin/upgrade#upgrade-db" >}}). + +Redis Enterprise Software v6.x includes two Redis database versions: 6.0 and 6.2. +As of version 7.2, Redis Enterprise Software includes three Redis database versions. + +To view available Redis database versions: + +- In the Cluster Manager UI, see **Redis database versions** on the **Cluster > Configuration** screen. + +- Send a [`GET /nodes` REST API request]({{< relref "/operate/rs/references/rest-api/requests/nodes" >}}) and see `supported_database_versions` in the response. + +The default Redis database version differs between Redis Enterprise releases as follows: + +| Redis
Enterprise | Bundled Redis
DB versions | Default DB version
(upgraded/new databases) | +|-------|----------|-----| +| 7.4.2 | 6.0, 6.2, 7.2 | 7.2 | +| 7.2.4 | 6.0, 6.2, 7.2 | 7.2 | +| 6.4.2 | 6.0, 6.2 | 6.2 | +| 6.2.x | 6.0, 6.2 | 6.0 | + + +The upgrade policy is only relevant for Redis Enterprise Software versions 6.2.4 through 6.2.18. For more information about upgrade policies, see the [6.2 version of this document](https://docs.redis.com/6.2/rs/installing-upgrading/upgrading/#redis-upgrade-policy). + +## Upgrade prerequisites + +Before upgrading a database: + +- Review the relevant [release notes]({{< relref "/operate/rs/release-notes" >}}) for any preparation instructions. + +- Verify that the database version meets the minimums specified earlier. + + To determine the database version: + + - Use the Cluster Manager UI to open the **Configuration** tab for the database and select {{< image filename="/images/rs/icons/info-icon.png#no-click" alt="The About database button" width="18px" class="inline" >}} **About**. + + - _(Optional)_ Use the [`rladmin status extra all`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status" >}}) command to display configuration details: + + ```sh + rladmin status extra all + ``` + + When the database compatibility version is outdated, `OLD REDIS VERSION` appears in the command output. + +- Verify the cluster is fully upgraded and operational. + + Use the Cluster Manager UI to display the **Configuration** tab for the cluster. The tab displays the cluster version information and the Redis database compatibility version. + +- Check client compatibility with the database version. + + If you run Redis Stack commands with Go-Redis versions 9 and later or Lettuce versions 6 and later, set the client’s protocol version to RESP2 before upgrading your database to Redis version 7.2 to prevent potential application issues due to RESP3 breaking changes. See [Client prerequisites for Redis 7.2 upgrade]({{< relref "/operate/rs/references/compatibility/resp#client-prerequisites-for-redis-72-upgrade" >}}) for more details and examples. + +- To avoid data loss during the upgrade, [back up your data]({{< relref "/operate/rs/databases/import-export/schedule-backups" >}}). + + You can [export the data]({{< relref "/operate/rs/databases/import-export/export-data" >}}) to an external location, [enable replication]({{< relref "/operate/rs/databases/durability-ha/replication" >}}), or [enable persistence]({{< relref "/operate/rs/databases/configure/database-persistence" >}}). + + When choosing how to back up data, keep the following in mind: + + - To reduce downtime when replication is enabled, a failover is performed before restarting the primary (master) database. + + - When persistence is enabled without replication, the database is unavailable during restart because the data is restored from the persistence file. AOF persistence restoration is slower than snapshot restoration. + +## Upgrade database + +To upgrade a database: + +1. _(Optional)_ Back up the database to minimize the risk of data loss. + +1. Use [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin/upgrade" >}}) to upgrade the database. During the upgrade process, the database will restart without losing any data. + + - To upgrade a database without modules: + + ``` shell + rladmin upgrade db + ``` + + Example of a successful upgrade: + + ``` shell + rladmin> upgrade db demo + Monitoring d194c4a3-631c-4726-b799-331b399fc85c + active - SMUpgradeBDB init + active - SMUpgradeBDB wait_for_version + active - SMUpgradeBDB configure_shards + completed - SMUpgradeBDB + Done + ``` + + - If the database has modules enabled and new module versions are available in the cluster, run `rladmin upgrade db` with additional parameters to upgrade the module versions when you upgrade the database. See [Upgrade modules]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module" >}}) for more details. + + - To upgrade the database to a version other than the default version, use the `redis_version` parameter: + + ```sh + rladmin upgrade db redis_version + ``` + +1. Check the Redis database compatibility version for the database to confirm the upgrade. + + To do so: + + - Use the Cluster Manager UI to open the **Configuration** tab for the database and select {{< image filename="/images/rs/icons/info-icon.png#no-click" alt="The About database button" width="18px" class="inline" >}} **About**. + + - Use [`rladmin status databases extra all`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-databases" >}}) to display a list of the databases in your cluster and their current Redis database compatibility version: + + ```sh + rladmin status databases extra all + ``` + + Verify that the Redis version is set to the expected value. diff --git a/content/operate/rs/7.4/installing-upgrading/upgrading/upgrade-os.md b/content/operate/rs/7.4/installing-upgrading/upgrading/upgrade-os.md new file mode 100644 index 0000000000..246ffa64f3 --- /dev/null +++ b/content/operate/rs/7.4/installing-upgrading/upgrading/upgrade-os.md @@ -0,0 +1,148 @@ +--- +Title: Upgrade a cluster's operating system +alwaysopen: false +categories: +- docs +- operate +- rs +description: Upgrade a Redis Enterprise Software cluster's operating system to a later + major version. +linkTitle: Upgrade operating system +toc: 'true' +weight: 70 +url: '/operate/rs/7.4/installing-upgrading/upgrading/upgrade-os/' +--- + +To upgrade the operating system (OS) on a Redis Enterprise Software cluster to a later major version, perform a rolling upgrade. Because you upgrade one node at a time, you can upgrade your cluster's OS without downtime. + +## Prerequisites + +Before you upgrade a cluster's operating system: + +1. [Upgrade all nodes in the cluster]({{< relref "/operate/rs/installing-upgrading/upgrading/upgrade-cluster" >}}) to a Redis Enterprise Software version that supports the OS's current version and upgrade version. + + To learn which versions of Redis Enterprise Software support specific OS versions, see [Supported platforms]({{< relref "/operate/rs/references/supported-platforms#supported-platforms" >}}). + +1. If the cluster contains databases that use modules: + + 1. Update all nodes in the cluster to [Redis Enterprise Software version 7.2.4-52]({{< relref "/operate/rs/release-notes/rs-7-2-4-releases" >}}) or later before you upgrade the OS. + + 1. Check the status of modules using [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}): + + ```sh + rladmin status modules + ``` + + The output lists the module versions installed on the cluster and the module versions used by existing databases: + + ```sh + CLUSTER MODULES: + MODULE VERSION + RedisBloom 2.6.3 + RediSearch 2 2.8.4 + RedisGears 2.0.12 + RedisGraph 2.10.12 + RedisJSON 2.6.6 + RedisTimeSeries 1.10.6 + + DATABASE MODULES: + DB:ID NAME MODULE VERSION ARGS STATUS + db:1 db1 RediSearch 2 2.6.9 PARTITIONS AUTO OK, OLD MODULE VERSION + db:1 db1 RedisJSON 2.4.7 OK, OLD MODULE VERSION + ``` + + 1. If any databases use custom modules, manually uploaded modules, or modules marked with `OLD MODULE VERSION`, upload module packages for the OS upgrade version to a cluster node. See [Install a module on a cluster]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster" >}}) for instructions. + + {{}} +The uploaded module packages have the following requirements: + +- The module is compiled for the OS upgrade version. + +- The module version matches the version currently used by databases. + {{}} + +1. If the cluster uses custom directories, make sure the OS upgrade version also supports custom directories, and specify the same custom directories during installation for all nodes. See [Customize installation directories]({{< relref "/operate/rs/installing-upgrading/install/customize-install-directories" >}}) for details. + +## Perform OS rolling upgrade + +To upgrade the cluster's operating system, use one of the following rolling upgrade methods: + +- [Extra node method](#extra-node-upgrade) - recommended if you have additional resources available + +- [Replace node method](#replace-node-upgrade) - recommended if you cannot temporarily allocate additional resources + +### Extra node upgrade method {#extra-node-upgrade} + +1. Create a node with the OS upgrade version. + +1. [Install the cluster's current Redis Enterprise Software version]({{< relref "/operate/rs/installing-upgrading/install/install-on-linux" >}}) on the new node using the installation package for the OS upgrade version. + +1. [Add the new node]({{< relref "/operate/rs/clusters/add-node" >}}) to the cluster. + +1. [Remove one node]({{< relref "/operate/rs/clusters/remove-node#remove-a-node" >}}) running the earlier OS version from the cluster. + +1. Repeat the previous steps until all nodes with the earlier OS version are removed. + +### Replace node upgrade method {#replace-node-upgrade} + +1. [Remove a node]({{< relref "/operate/rs/clusters/remove-node#remove-a-node" >}}) with the earlier OS version from the cluster. + +1. Uninstall Redis Enterprise Software from the removed node: + + ```sh + sudo ./rl_uninstall.sh + ``` + +1. Either upgrade the existing node to the OS upgrade version, or create a new node with the OS upgrade version. + +1. [Install the cluster's current Redis Enterprise Software version]({{< relref "/operate/rs/installing-upgrading/install/install-on-linux" >}}) on the upgraded node using the installation package for the OS upgrade version. + +1. [Add the new node]({{< relref "/operate/rs/clusters/add-node" >}}) to the cluster. + + If you want to reuse the removed node's ID when you add the node to the cluster, run [`rladmin cluster join`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/join" >}}) with the `replace_node` flag: + + ```sh + rladmin cluster join nodes username password replace_node + ``` + +1. Verify node health: + + 1. Run `rlcheck` on all nodes: + + ```sh + rlcheck + ``` + + The output lists the result of each verification test: + + ```sh + ##### Welcome to Redis Enterprise Cluster settings verification utility #### + Running test: verify_bootstrap_status + PASS + ... + Running test: verify_encrypted_gossip + PASS + Summary: + ------- + ALL TESTS PASSED. + ``` + + For healthy nodes, the expected output is `ALL TESTS PASSED`. + + 1. Run [`rladmin status`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status" >}}) on the new node: + + ```sh + rladmin status extra all + ``` + + The expected output is the `OK` status for the cluster, nodes, endpoints, and shards: + + ```sh + CLUSTER: + OK. Cluster master: 2 () + Cluster health: OK, [0, 0.0, 0.0] + failures/minute - avg1 0.00, avg15 0.00, avg60 0.00. + ... + ``` + +1. Repeat the previous steps until all nodes with the earlier OS version are replaced. diff --git a/content/operate/rs/7.4/networking/_index.md b/content/operate/rs/7.4/networking/_index.md new file mode 100644 index 0000000000..c887452360 --- /dev/null +++ b/content/operate/rs/7.4/networking/_index.md @@ -0,0 +1,13 @@ +--- +Title: Manage networks +alwaysopen: false +categories: +- docs +- operate +- rs +description: Networking features and considerations for designing your Redis Enterprise Software deployment. +hideListLinks: false +linktitle: Networking +weight: 39 +url: '/operate/rs/7.4/networking/' +--- diff --git a/content/operate/rs/7.4/networking/cluster-dns.md b/content/operate/rs/7.4/networking/cluster-dns.md new file mode 100644 index 0000000000..0265f7233e --- /dev/null +++ b/content/operate/rs/7.4/networking/cluster-dns.md @@ -0,0 +1,114 @@ +--- +Title: Configure cluster DNS +alwaysopen: false +categories: +- docs +- operate +- rs +description: Configure DNS to communicate between nodes in your cluster. +linkTitle: Configure cluster DNS +weight: $weight +url: '/operate/rs/7.4/networking/cluster-dns/' +--- + +By default, Redis Enterprise Software deployments use DNS to communicate between nodes. You can also use the [Discovery Service]({{< relref "/operate/rs/databases/durability-ha/discovery-service.md" >}}), which uses IP addresses to connect and complies with the [Redis Sentinel API]({{< relref "/operate/oss_and_stack/management/sentinel" >}}) supported by Redis Community Edition. + +Each node in a Redis Enterprise cluster includes a small DNS server to manage internal functions, such as high availability, automatic failover, automatic migration, and so on. +Nodes should only run the DNS server included with the software. Running additional DNS servers can lead to unexpected behavior. + +## Cluster name and connection management + +Whether you're administering Redis Enterprise Software or accessing databases, there are two ways to connect: + +- URL-based connections - URL-based connections use DNS to resolve the fully qualified cluster domain name (FQDN). This means that DNS records might need to be updated when topology changes, such as adding (or removing) nodes from the cluster. + + Because apps and other client connections rely on the URL (rather than the address), they do not need to be modified when topology changes. + +- IP-based connections - IP-based connections do not require DNS setup, as they rely on the underlying TCP/IP addresses. As long as topology changes do not change the address of the cluster nodes, no configuration changes are needed, DNS or otherwise. + + However, changes to IP addresses (or changes to IP address access) impact all connections to the node, including apps and clients. IP address changes can therefore be unpredictable or time-consuming. + +## URL-based connections + +The fully qualified domain name (FQDN) is the unique cluster identifier that enables clients to connect to the different components of Redis Enterprise Software. +The FQDN is a crucial component of the high-availability mechanism because it's used internally to enable and implement automatic and transparent failover of nodes, databases, shards, and endpoints. + +{{< note >}} +Setting the cluster's FQDN is a one-time operation, one that cannot be changed after being set. +{{< /note >}} + +The FQDN must always comply with the IETF's [RFC 952](https://datatracker.ietf.org/doc/html/rfc952) standard +and section 2.1 of the [RFC 1123](https://datatracker.ietf.org/doc/html/rfc1123) standard. + +## Identify the cluster + +To identify the cluster, either use DNS to define a fully qualified domain name or use the IP addresses of each node. + +### Define domain using DNS + +Use DNS if you: + +- have your own domain +- want to integrate the cluster into that domain +- can access and update the DNS records for that domain + +1. Make sure that the cluster and at least one node (preferably all nodes) in the cluster + are correctly configured in the DNS with the appropriate NS entries. + + For example: + + - Your domain is: `mydomain.com` + - You would like to name the Redis Enterprise Software cluster `mycluster` + - You have three nodes in the cluster: + - node1 (IP address 1.1.1.1) + - node2 (2.2.2.2) + - node3 (3.3.3.3) + +1. In the FQDN field, enter the value `mycluster.mydomain.com` + and add the following records in the DNS table for `mydomain.com`: + + ``` sh + mycluster.mydomain.com NS node1.mycluster.mydomain.com + node2.mycluster.mydomain.com + node3.mycluster.mydomain.com + + node1.mycluster.mydomain.com A 1.1.1.1 + + node2.mycluster.mydomain.com A 2.2.2.2 + + node3.mycluster.mydomain.com A 3.3.3.3 + ``` + +### Zero-configuration using mDNS {#zeroconfiguration-using-mdns-development-option-only} + +Development and test environments can use [Multicast DNS](https://en.wikipedia.org/wiki/Multicast_DNS) (mDNS), a zero-configuration service designed for small networks. Production environments should _not_ use mDNS. + +mDNS is a standard protocol that provides DNS-like name resolution and service discovery capabilities +to machines on local networks with minimal to no configuration. + +Before adopting mDNS, verify that it's supported by each client you wish to use to connect to your Redis databases. Also make sure that your network infrastructure permits mDNS/multi-casting between clients and cluster nodes. + +Configuring the cluster to support mDNS requires you to assign the cluster a `.local` name. + +For example, if you want to name the Redis Enterprise Software cluster `rediscluster`, specify the FQDN name as `rediscluster.local`. + +When using the DNS or mDNS option, failover can be done transparently and the DNS is updated automatically to point to the IP address of the new primary node. + +## IP-based connections + +When you use the IP-based connection option, the FQDN does not need to have any special format +because clients use IP addresses instead of hostnames to access the databases so you are free to choose whatever name you want. +Using the IP-based connection option does not require any DNS configuration either. + +To administer the cluster you do need to know the IP address of at least one of the nodes in the cluster. +Once you have the IP address, you can simply connect to port number 8443 (for example: ). +However, as the topology of the cluster changes and node with the given IP address is removed, +you need to remember the IP address of another node participating in this cluster to connect to the Cluster Manager UI and manage the cluster. + +Applications connecting to Redis Software databases have the same constraints. +When using the IP-based connection method, you can use the [Discovery Service]({{< relref "/operate/rs/databases/durability-ha/discovery-service.md" >}}) +to discover the database endpoint for a given database name as long as you have an IP address for at least one of the nodes in the cluster. +The API used for discovery service is compliant with the Redis Sentinel API. + +To test your connection, try pinging the service. For help, see [Connect to your database]({{< relref "/operate/rs/databases/connect/test-client-connectivity" >}}). + diff --git a/content/operate/rs/7.4/networking/cluster-lba-setup.md b/content/operate/rs/7.4/networking/cluster-lba-setup.md new file mode 100644 index 0000000000..9c94d9de10 --- /dev/null +++ b/content/operate/rs/7.4/networking/cluster-lba-setup.md @@ -0,0 +1,118 @@ +--- +Title: Set up a Redis Enterprise cluster behind a load balancer +alwaysopen: false +categories: +- docs +- operate +- rs +description: Set up a Redis Enterprise cluster using a load balancer instead of DNS to direct traffic to cluster nodes. +linkTitle: Cluster load balancer setup +weight: $weight +url: '/operate/rs/7.4/networking/cluster-lba-setup/' +--- +To set up a Redis Enterprise cluster in an environment that doesn't allow DNS, you can use a load balancer (LB) to direct traffic to the cluster nodes. + +## DNS role for databases + +Normally, Redis Enterprise uses DNS to provide dynamic database endpoints. +A DNS name such as `redis-12345.clustername.domain` gives clients access to the database resource: + +- If multiple proxies are in use, the DNS name resolves to multiple IP addresses so clients can load balance. +- On failover or topology changes, the DNS name is automatically updated to reflect the live IP addresses. + +When DNS cannot be used, clients can still connect to the endpoints with the IP addresses, +but the benefits of load balancing and automatic updates to IP addresses won't be available. + +## Network architecture with load balancer + +You can compensate for the lack of DNS resolution with load balancers that can expose services and provide service discovery. +A load balancer is configured in front of the Redis Enterprise cluster, exposing several logical services: + +- Control plane services, such as the Cluster Manager UI +- Data plane services, such as database endpoints for client application connections + +Depending on which Redis Enterprise services you want to access outside the cluster, you may need to configure the load balancers separately. +One or more virtual IPs (VIPs) are defined on the load balancer to expose Redis Enterprise services. +The architecture is shown in the following diagram with a 3-node Redis Enterprise cluster with one database (DB1) configured on port 12000: + +{{< image filename="/images/rs/cluster-behind-load-balancer-top-down.png" alt="cluster-behind-load-balancer-top-down" >}} + +## Set up a cluster with load balancers + +### Prerequisites + +- [Install]({{< relref "/operate/rs/installing-upgrading" >}}) the latest version of Redis Enterprise Software on your clusters +- Configure the cluster with the cluster name (FQDN) even though DNS is not in use. + Remember that the same cluster name is used to issue the license keys. + We recommend that you use a “.local” suffix in the FQDN. + +### Configure load balancers + +- Make sure that the load balancer is performing TCP health checks on the cluster nodes. +- Expose the services that you require through a virtual IP, for example: + - Cluster Manager UI on port 8443 + - Rest API on port 9443 for secure HTTPS connections and port 8080 for HTTP + - Database ports 10000-19999 + +Other ports are shown in the list of [Redis Enterprise network ports]({{< relref "/operate/rs/networking/port-configurations" >}}). + +{{< note >}} +Sticky, secured connections are needed only for the Redis Enterprise Cluster Manager UI on port 8443. + +- Certain load balancers provide specific logic to close idle connections. Either turn off this feature or make sure the applications connecting to Redis use reconnection logic. +- Make sure the load balancer is fast enough to resolve connections between two clusters or applications that are connected to Redis databases through a load balancer. +- Choose the standard load balancer that is commonly used in your environment so that you have easy access to in-house expertise for troubleshooting issues. +{{< /note >}} + +### Configure cluster + +For clusters behind load balancers, we recommend using the `all-nodes` [proxy policy]({{}}) and enabling `handle_redirects`. + +To allow inbound connections to be terminated on the relevant node inside the cluster, run the following `rladmin` commands on the cluster: + +```sh +# Enable all-nodes proxy policy by default +rladmin tune cluster default_sharded_proxy_policy all-nodes default_non_sharded_proxy_policy all-nodes + +# Redirect where necessary when behind a load balancer +rladmin cluster config handle_redirects enabled +``` + +Optionally configure sparse shard placement to allow closer termination of client connections to where the Redis shard is located: + +```sh +# Enable sparse placement by default +rladmin tune cluster default_shards_placement sparse +``` + +### Configure database + +After you update the cluster settings and configure the load balancers, you can go to the Redis Enterprise Cluster Manager UI at `https://load-balancer-virtual-ip:8443/` and [create a new database]({{< relref "/operate/rs/databases/create.md" >}}). + +To create an Active-Active database, use the `crdb-cli` utility. See the [`crdb-cli` reference]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}}) for more information about creating Active-Active databases from the command line. + +### Update load balancer configuration when cluster configuration changes + +When your Redis Enterprise cluster is behind a load balancer, you must update the load balancer when the cluster topology and IP addresses change. +Some common cases that require you to update the load balancer are: + +- Adding new nodes to the Redis Enterprise cluster +- Removing nodes from the Redis Enterprise cluster +- Maintenance for Redis Enterprise cluster nodes +- IP address changes for Redis Enterprise cluster nodes + +After these changes, make sure that the Redis connections in your applications can connect to the Redis database, +especially if they are directly connected on IP addresses that have changed. + +## Intercluster communication considerations + +Redis Enterprise supports several topologies that allow intercluster replication, such as [Replica Of]({{< relref "/operate/rs/databases/import-export/replica-of/" >}}) and [Active-Active]({{< relref "/operate/rs/databases/active-active/" >}}) deployment options. +When your Redis Enterprise software clusters are behind load balancers, you must allow some network services to be open and defined in the load balancers to allow the replication to work. + +### Replica Of + +For Replica Of communication to work, you must expose database ports locally in each cluster and allow these ports through any firewalls between the clusters. + +### Active-Active + +For Active-Active communication to work, you must expose several ports, including every database port and several control plane ports as defined in [Network port configurations]({{< relref "/operate/rs/networking/port-configurations" >}}). Pay attention to services that include "Active-Active" in the connection source column, and allow these ports through any firewalls between the clusters. diff --git a/content/operate/rs/7.4/networking/mdns.md b/content/operate/rs/7.4/networking/mdns.md new file mode 100644 index 0000000000..fa866906ee --- /dev/null +++ b/content/operate/rs/7.4/networking/mdns.md @@ -0,0 +1,56 @@ +--- +Title: Client prerequisites for mDNS +alwaysopen: false +categories: +- docs +- operate +- rs +description: Requirements for using the mDNS protocol in development and testing environments. +linkTitle: mDNS client prerequisites +weight: $weight +url: '/operate/rs/7.4/networking/mdns/' +--- +{{< note >}} +mDNS is only supported for development and testing environments. +{{< /note >}} + +If you choose to use the mDNS protocol when [you set the cluster name]({{< relref "/operate/rs/networking/cluster-dns" >}}), +make sure that the configurations and prerequisites for resolving database endpoints are met on the client machines. +If you have [Replica Of]({{< relref "/operate/rs/databases/import-export/replica-of/" >}}) databases on the cluster, +the configurations and prerequisites are also required for the Redis Enterprise Software nodes. + +To prepare a client or node for mDNS: + +1. Make sure that the clients and cluster nodes are on the same physical network + or have the network infrastructure configured to allow multicasting between them. +1. Install these prerequisite packages: + + - For Ubuntu: + + ```sh + apt-get install libnss-mdns + ``` + + - For RHEL/CentOS 6.x: + + ```sh + $ rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm + $ yum install nss-mdns + $ service avahi-daemon start + ``` + + - For RHEL/CentOS 7: + + ```sh + $ rpm -ivh https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-12.noarch.rpm + $ yum install nss-mdns + $ service avahi-daemon start + ``` + +1. If you are using [mDNS with IPv6 addresses]({{< relref "/operate/rs/networking/multi-ip-ipv6.md" >}}), + update the hosts line in `/etc/nsswitch.conf` to: + + ```yaml + hosts: files mdns4_minimal + \[NOTFOUND=return\] mdns + ``` diff --git a/content/operate/rs/7.4/networking/port-configurations.md b/content/operate/rs/7.4/networking/port-configurations.md new file mode 100644 index 0000000000..69440be41d --- /dev/null +++ b/content/operate/rs/7.4/networking/port-configurations.md @@ -0,0 +1,171 @@ +--- +Title: Network port configurations +alwaysopen: false +categories: +- docs +- operate +- rs +description: This document describes the various network port ranges and their uses. +linkTitle: Network ports +weight: $weight +url: '/operate/rs/7.4/networking/port-configurations/' +--- + +All Redis Enterprise Software deployments span multiple physical/virtual nodes. You'll need to keep several ports open between these nodes. This document describes the various port ranges and their uses. + +{{< note >}} +Whenever you create a new database, you must verify that the ports assigned to the new database's endpoints are open. The cluster will not perform this verification for you. +{{< /note >}} + +## Ports and port ranges used by Redis Enterprise Software + +Redis Enterprise Software's port usage falls into three general categories: + +- Internal: For traffic between or within cluster nodes +- External: For traffic from client applications or external monitoring resources +- Active-Active: For traffic to and from clusters hosting Active-Active databases + +| Protocol | Port | Configurable | Connection source | Description | +|----------|------|--------------|-------------------|-------------| +| TCP | 8001 | ❌ No | Internal, External | Traffic from application to Redis Enterprise Software [Discovery Service]({{< relref "/operate/rs/databases/durability-ha/discovery-service.md" >}}) | +| TCP | 8000, 8070, 8071, 9090, 9125 | ❌ No | Internal, External | Metrics exported and managed by the web proxy | +| TCP | 8443 | ✅ Yes | Internal, External | Secure (HTTPS) access to the management web UI | +| TCP | 9081 | ✅ Yes | Internal | CRDB coordinator for Active-Active management (internal) | +| TCP | 9443 (Recommended), 8080 | ✅ Yes | Internal, External, Active-Active | REST API traffic, including cluster management and node bootstrap | +| TCP | 10050 | ❌ No | Internal | Zabbix monitoring | +| TCP | 10000-10049, 10051-19999 | ✅ Yes | Internal, External, Active-Active | Database traffic | +| UDP | 53, 5353 | ❌ No | Internal, External | DNS/mDNS traffic | +| ICMP | * | ❌ No | Internal | Connectivity checking between nodes | +| TCP | 1968 | ❌ No | Internal | Proxy traffic | +| TCP | 3333-3345, 36379, 36380 | ❌ No | Internal | Internode communication | +| TCP | 20000-29999 | ❌ No | Internal | Database shard traffic | +| TCP | 8002, 8004, 8006 | ✅ Yes | Internal | Default system health monitoring (envoy admin, envoy management server, gossip envoy admin)| +| TCP | 8444, 9080 | ❌ No | Internal | Traffic between web proxy and cnm_http/cm | + +## Change port configuration + +### Reserve ports + +Redis Enterprise Software reserves some ports by default (`system_reserved_ports`). To reserve other ports or port ranges and prevent the cluster from assigning them to database endpoints, configure `reserved_ports` using one of the following methods: + +- [rladmin cluster config]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/config" >}}) + + ```sh + rladmin cluster config reserved_ports + ``` + + For example: + + ```sh + rladmin cluster config reserved_ports 11000 13000-13010 + ``` + +- [Update cluster settings]({{< relref "/operate/rs/references/rest-api/requests/cluster#put-cluster" >}}) REST API request + + ```sh + PUT /v1/cluster + { "reserved_ports": ["list of ports/port ranges"] } + ``` + + For example: + + ```sh + PUT /v1/cluster + { "reserved_ports": ["11000", "13000-13010"] } + ``` + +### Change the Cluster Manager UI port + +The Redis Enterprise Software Cluster Manager UI uses port 8443, by default. You can change this to a custom port as long as the new port is not in use by another process. + +To change this port, run: + +```sh +rladmin cluster config cm_port  +``` + +After changing the Redis Enterprise Software web UI port, you must connect any new node added to the cluster to the UI with the custom port number: +`https://newnode.mycluster.example.com:`**``** + +### Change the envoy ports + +For system health monitoring, Redis uses the following ports by default: + +- Port 8002 for envoy admin + +- Port 8004 for envoy management server + +- Port 8006 for gossip envoy admin + +You can change each envoy port to a custom port using the [`rladmin cluster config`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/config" >}}) command as long as the new port is not in use by another process. When you change `envoy_admin_port`, expect a restart of envoy. + +To change the envoy admin port, run: + +```sh +$ rladmin cluster config envoy_admin_port  +Updating envoy_admin_port... restarting now +``` + +To change the envoy management server port, run: + +```sh +$ rladmin cluster config envoy_mgmt_server_port  +Cluster configured successfully +``` + +To change the gossip envoy admin port, run: + +```sh +$ rladmin cluster config gossip_envoy_admin_port  +Cluster configured successfully +``` + +### Change the REST API port + +For the REST API, Redis Enterprise Software uses port 9443 (secure) and port 8080 (not secure), by default. You can change this to a custom port as long as the new port is not in use by another process. + +To change these ports, run: + +```sh +rladmin cluster config cnm_http_port  +``` + +```sh +rladmin cluster config cnm_https_port  +``` + +### Ubuntu conflicts with port 53 + +{{}} + + +### Update `sysctl.conf` to avoid port collisions + +{{}} + + +## Configure HTTPS + +### Require HTTPS for API endpoints + +By default, the Redis Enterprise Software API supports communication over HTTP and HTTPS. However, you can turn off HTTP support to ensure that API requests are encrypted. + +Before you turn off HTTP support, make sure you migrate any scripts or proxy configurations that use HTTP to the encrypted API endpoint to prevent broken connections. + +To turn off HTTP support for API endpoints, run: + +```sh +rladmin cluster config http_support disabled +``` + +After you turn off HTTP support, traffic sent to the unencrypted API endpoint is blocked. + + +### HTTP to HTTPS redirection +Starting with version 6.0.12, you cannot use automatic HTTP to HTTPS redirection. +To poll metrics from the `metrics_exporter` or to access the Cluster Manager UI, use HTTPS in your request. HTTP requests won't be automatically redirected to HTTPS for those services. + +## Nodes on different VLANs + +Nodes in the same cluster must reside on the same VLAN. If you can't +host the nodes on the same VLAN, then you must open [all ports]({{< relref "/operate/rs/networking/port-configurations.md" >}}) between them. diff --git a/content/operate/rs/7.4/networking/private-public-endpoints.md b/content/operate/rs/7.4/networking/private-public-endpoints.md new file mode 100644 index 0000000000..46710b47bd --- /dev/null +++ b/content/operate/rs/7.4/networking/private-public-endpoints.md @@ -0,0 +1,46 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: Describes how to enable public and private endpoints for databases on + a cluster. +linkTitle: Public and private endpoints +title: "Enable private and\_public database endpoints" +weight: $weight +url: '/operate/rs/7.4/networking/private-public-endpoints/' +--- +Each node in Redis Enterprise can be configured with [private and external IP addresses]({{< relref "/operate/rs/networking/multi-ip-ipv6.md" >}}). By default, Redis Enterprise Software databases expose a single endpoint, e.g. cluster.com (FQDN), using the external IP addresses, making it available to the public network (e.g. the internet). Additionally, the cluster can be configured to expose a private FQDN, which utilizes the private IP addresses for access from the private network only (e.g. VPC or an internal network). + +When you create a cluster via the UI, you can configure it to expose private and public endpoints. +This is common for environments such as cloud platforms and enterprises. + +When doing so, the cluster creates an additional FQDN, e.g. internal.cluster.com for private network (e.g. VPC or an internal network), while the cluster.com FQDN can be used by a public network (e.g. the internet). + +You can enable public and private endpoints during cluster creation only. +However, you can still add an additional FQDN in a different domain (cluster.io, for example) after cluster creation. + +To enable private and public endpoints: + +1. Verify the IP addresses are bound to the server or instance. + +1. During cluster setup, turn on **Enable public endpoints support** in the **Cluster** screen's **Configuration** section. + + {{The endpoint support setting appears in the **Configuration section** of the **Cluster** setup screen.}} + + If this setting is not enabled when the cluster is created, databases on the cluster support only a single endpoint. + +1. Select **Next** to proceed to **Node** configuration. + +1. In the **Network configuration** section: + + 1. Configure the machine's public IP address for external traffic. + + 1. Configure the private IP address for both internal and external traffic so it can be used for private database endpoints. + +After cluster creation, both sets of endpoints are available for databases in the cluster. + +To view and copy public and private endpoints for a database in the cluster, see the database's **Configuration > General** section. + +{{View public and private endpoints from the General section of the database's Configuration screen.}} diff --git a/content/operate/rs/7.4/new-features-redis-enterprise.md b/content/operate/rs/7.4/new-features-redis-enterprise.md new file mode 100644 index 0000000000..f0d6ab2268 --- /dev/null +++ b/content/operate/rs/7.4/new-features-redis-enterprise.md @@ -0,0 +1,84 @@ +--- +Title: What's new in Redis Enterprise Software 6.x? +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +draft: true +weight: 20 +url: '/operate/rs/7.4/new-features-redis-enterprise/' +--- +Below are detailed a few of the major features of this release of Redis Enterprise Software +along with bug fixes and patches. + +## Geo-Distributed Active-Active Conflict-free Replicated Databases (CRDB) {#geodistributed-activeactive-conflictfree-replicated-databases-crdb} + +Developing globally distributed applications can be challenging, as +developers have to think about race conditions and complex combinations +of events under geo-failovers and cross-region write conflicts. Active-Active databases +simplify developing such applications by directly using built-in smarts +for handling conflicting writes based on the data type in use. Instead +of depending on just simplistic "last-writer-wins" type conflict +resolution, geo-distributed Active-Active databases combines techniques defined in CRDT +(conflict-free replicated data types) research with Redis types to +provide smart and automatic conflict resolution based on the data type's +intent. + +For more information, go here. For information, go to [Developing with +Active-Active databases]({{< relref "/operate/rs/developing/crdbs" >}}). + +## Redis modules + +Redis Modules enable you to extend the functionality of Redis Enterprise +Software. One can add new data types, capabilities, etc. to tailor the +cluster to a specific use case or need. Once installed, modules benefit +from the high performance, scalability, and high availability that Redis +Enterprise is known for. + +### Certified modules + +Redis developed and certified these modules for use with Redis Enterprise Software: + +- [RedisBloom]({{< relref "/operate/modules/redisbloom" >}}) + - Enables Redis to have a scalable bloom filter as a data type. Bloom + filters are probabilistic data structures that quickly determine if something is contained within a set. +- RedisGraph + - RedisGraph is the first queryable Property Graph database to use sparse + matrices to represent the adjacency matrix in graphs and linear algebra to query the graph. + RedisGraph uses [Cypher](https://www.opencypher.org/) as its query language. +- [RedisJSON]({{< relref "/operate/modules/redisjson" >}}) + - Now you have the convenience JSON as a built-in data type and easily + able to address nested data via a path. +- [RediSearch]({{< relref "/operate/modules/redisearch" >}}) + - This module turns Redis into a distributed in-memory + full-text indexing and search beast. + +### Custom modules + +In addition, Redis Enterprise Software provides the ability to load and +use custom [Redis modules](https://redislabs.com/community/redis-modules-hub/) or +of your own creation. + +## Support for Docker + +Deploying and running your Redis Enterprise Software cluster on Docker +containers is supported in development systems and +available to pull from Docker hub. With the official image, you can +easily and quickly test several containers to build the scalable +and highly available cluster Redis Enterprise Software is famous for. + +For more information go to [quick start with Redis Enterprise Software +on Docker.]({{< relref "/operate/rs/installing-upgrading/get-started-docker.md" >}}) + +## LDAP integration + +As part of our continued emphasis on security, administrative user +accounts in Redis Enterprise Software can now use either built-in +authentication or authenticate externally via LDAP with saslauthd. The +accounts can be used for administering resources on the cluster via +command line, Rest API, or admin console. + +For more information see [LDAP +Integration]({{< relref "/operate/rs/security/passwords-users-roles.md#setting-up-ldap" >}}). diff --git a/content/operate/rs/7.4/references/_index.md b/content/operate/rs/7.4/references/_index.md new file mode 100644 index 0000000000..113229bada --- /dev/null +++ b/content/operate/rs/7.4/references/_index.md @@ -0,0 +1,12 @@ +--- +Title: Reference +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +hideListLinks: false +weight: 80 +url: '/operate/rs/7.4/references/' +--- diff --git a/content/operate/rs/7.4/references/cli-utilities/_index.md b/content/operate/rs/7.4/references/cli-utilities/_index.md new file mode 100644 index 0000000000..a7100960bd --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/_index.md @@ -0,0 +1,46 @@ +--- +Title: Command-line utilities +alwaysopen: false +categories: +- docs +- operate +- rs +description: Reference for Redis Enterprise Software command-line utilities, including rladmin, redis-cli, crdb-cli, and rlcheck. +hideListLinks: true +linkTitle: Command-line utilities +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/' +--- + +Redis Enterprise Software includes a set of utilities to help you manage and test your cluster. To use a utility, run it from the command line. + +## Public utilities + +Administrators can use these CLI tools to manage and test a Redis Enterprise cluster. You can find the binaries in the `/opt/redislabs/bin/` directory. + +{{}} + +## Internal utilities + +The `/opt/redislabs/bin/` directory also contains utilities used internally by Redis Enterprise Software and for troubleshooting. + +{{}} +Do not use these tools for normal operations. +{{}} + +| Utility | Description | +|---------|-------------| +| bdb-cli | `redis-cli` connected to a database. | +| ccs-cli | Inspect Cluster Configuration Store. | +| cnm-ctl | Manages services for provisioning, migration, monitoring,
resharding, rebalancing, deprovisioning, and autoscaling. | +| consistency_checker | Checks the consistency of Redis instances. | +| crdbtop | Monitor Active-Active databases. | +| debug_mode | Enables debug mode. | +| debuginfo | Collects cluster information. | +| dmc-cli | Configure and monitor the DMC proxy. | +| pdns_control | Sends commands to a running PowerDNS nameserver. | +| redis_ctl | Stops or starts Redis instances. | +| rl_rdbloader | Load RDB backup files to a server. | +| rlutil | Maintenance utility. | +| shard-cli | `redis-cli` connected to a shard. | +| supervisorctl | Manages the lifecycles of Redis Enterprise services. | diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/_index.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/_index.md new file mode 100644 index 0000000000..017ae1b864 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/_index.md @@ -0,0 +1,50 @@ +--- +Title: crdb-cli +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manage Active-Active databases. +hideListLinks: true +linkTitle: crdb-cli (manage Active-Active) +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/' +--- + +An [Active-Active database]({{< relref "/operate/rs/databases/active-active/_index.md" >}}) (also known as CRDB or conflict-free replicated database) +replicates your data across Redis Enterprise Software clusters located in geographically distributed regions. +Active-Active databases allow read-write access in all locations, making them ideal for distributed applications that require fast response times and disaster recovery. + +The Active-Active database on an individual cluster is called an **instance**. +Each cluster that hosts an instance is called a **participating cluster**. + +An Active-Active database requires two or more participating clusters. +Each instance is responsible for updating the instances that reside on other participating clusters with the transactions it receives. +Write conflicts are resolved using [conflict-free replicated data types]({{< relref "/operate/rs/databases/active-active" >}}) (CRDTs). + +To programmatically maintain an Active-Active database and its instances, you can use the `crdb-cli` command-line tool. + +## `crdb-cli` commands + +{{}} + +## Use the crdb-cli + +To use the `crdb-cli` tool, use SSH to sign in to a Redis Enterprise host with a user that belongs to the group that Redis Enterprise Software was installed with (Default: **redislabs**). +If you sign in with a non-root user, you must add `/opt/redislabs/bin/` to your `PATH` environment variables. + +`crdb-cli` commands use the syntax: `crdb-cli ` to let you: + +- Create, list, update, flush, or delete an Active-Active database. +- Add or remove an instance of the Active-Active database on a specific cluster. + +Each command creates a task. + +By default, the command runs immediately and displays the result in the output. + +If you use the `--no-wait` flag, the command runs in the background so that your application is not delayed by the response. + +Use the [`crdb-cli task` commands]({{< relref "/operate/rs/references/cli-utilities/crdb-cli/task/" >}}) to manage Active-Active database tasks. + +For each `crdb-cli` command, you can use `--help` for additional information about the command. diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/_index.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/_index.md new file mode 100644 index 0000000000..cb194ba289 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/_index.md @@ -0,0 +1,19 @@ +--- +Title: crdb-cli crdb commands +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manage Active-Active databases. +hideListLinks: true +linkTitle: crdb +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/' +--- + +Use `crdb-cli crdb` commands to manage Active-Active databases. + +## `crdb-cli crdb` commands + +{{}} diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/add-instance.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/add-instance.md new file mode 100644 index 0000000000..7d5e7d121d --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/add-instance.md @@ -0,0 +1,46 @@ +--- +Title: crdb-cli crdb add-instance +alwaysopen: false +categories: +- docs +- operate +- rs +description: Adds a peer replica to an Active-Active database. +linkTitle: add-instance +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/add-instance/' +--- + +Adds a peer replica to an existing Active-Active database in order to host the database on another cluster. This creates an additional active instance of the database on the specified cluster. + +```sh +crdb-cli crdb add-instance --crdb-guid + --instance fqdn=,username=,password=[,url=,replication_endpoint=] + [ --compression <0-6> ] + [ --no-wait ] +``` + +### Parameters + +| Parameter | Value | Description | +|-----------|---------|-------------| +| crdb-guid | string | The GUID of the database (required) | +| instance | strings | The connection information for the new participating cluster (required) | +| compression | 0-6 | The level of data compression: 0=Compression disabled

6=High compression and resource load (Default: 3) | +| no-wait | | Does not wait for the task to complete | + +### Returns + +Returns the task ID of the task that is adding the new instance. + +If `--no-wait` is specified, the command exits. Otherwise, it will wait for the instance to be added and return `finished`. + +### Example + +```sh +$ crdb-cli crdb add-instance --crdb-guid db6365b5-8aca-4055-95d8-7eb0105c0b35 \ + --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin-password +Task f809fae7-8e26-4c8f-9955-b74dbbd47949 created + ---> Status changed: queued -> started + ---> Status changed: started -> finished +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/create.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/create.md new file mode 100644 index 0000000000..6f1371fecd --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/create.md @@ -0,0 +1,115 @@ +--- +Title: crdb-cli crdb create +alwaysopen: false +categories: +- docs +- operate +- rs +description: Creates an Active-Active database. +linkTitle: create +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/create/' +--- + +Creates an Active-Active database. + +```sh +crdb-cli crdb create --name + --memory-size + --instance fqdn=,username=,password=[,url=,replication_endpoint=] + --instance fqdn=,username=,password=[,url=,replication_endpoint=] + [--port ] + [--no-wait] + [--default-db-config ] + [--default-db-config-file ] + [--compression <0-6>] + [--causal-consistency { true | false } ] + [--password ] + [--replication { true | false } ] + [--encryption { true | false } ] + [--sharding { false | true } ] + [--shards-count ] + [--shard-key-regex ] + [--oss-cluster { true | false } ] + [--bigstore { true | false }] + [--bigstore-ram-size ] + [--with-module name=,version=,args=] +``` + +### Prerequisites + +Before you create an Active-Active database, you must have: + +- At least two participating clusters +- [Network connectivity]({{< relref "/operate/rs/networking/port-configurations" >}}) between the participating clusters + +### Parameters + + +| Parameter & options(s)           | Value | Description | +|---------------------------------------------------------------------------------------|-------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| name \ | string | Name of the Active-Active database (required) | +| memory-size \ | size in bytes, kilobytes (KB), or gigabytes (GB) | Maximum database memory (required) | +| instance
   fqdn=\,
   username=\,
   password=\ | strings | The connection information for the participating clusters (required for each participating cluster) | +| port \ | integer | TCP port for the Active-Active database on all participating clusters | +| default-db-config \ | string | Default database configuration options | +| default-db-config-file \ | filepath | Default database configuration options from a file | +| no-wait | | Prevents `crdb-cli` from running another command before this command finishes | +| compression | 0-6 | The level of data compression:

0 = No compression

6 = High compression and resource load (Default: 3) | +| causal-consistency | true
false (*default*) | [Causal consistency]({{< relref "/operate/rs/databases/active-active/causal-consistency.md" >}}) applies updates to all instances in the order they were received | +| password \ | string | Password for access to the database | +| replication | true
false (*default*) | Activates or deactivates [database replication]({{< relref "/operate/rs/databases/durability-ha/replication.md" >}}) where every master shard replicates to a replica shard | +| encryption | true
false (*default*) | Activates or deactivates encryption | +| sharding | true
false (*default*) | Activates or deactivates sharding (also known as [database clustering]({{< relref "/operate/rs/databases/durability-ha/replication.md" >}})). Cannot be updated after the database is created | +| shards-count \ | integer | If sharding is enabled, this specifies the number of Redis shards for each database instance | +| oss-cluster | true
false (*default*) | Activates [OSS cluster API]({{< relref "/operate/rs/clusters/optimize/oss-cluster-api" >}}) | +| shard-key-regex \ | string | If clustering is enabled, this defines a regex rule (also known as a [hashing policy]({{< relref "/operate/rs/databases/durability-ha/clustering#custom-hashing-policy" >}})) that determines which keys are located in each shard (defaults to `{u'regex': u'.*\\{(?.*)\\}.*'}, {u'regex': u'(?.*)'} `) | +| bigstore | true

false (*default*) | If true, the database uses Auto Tiering to add flash memory to the database | +| bigstore-ram-size \ | size in bytes, kilobytes (KB), or gigabytes (GB) | Maximum RAM limit for databases with Auto Tiering enabled | +| with-module
  name=\,
  version=\,
  args=\ | strings | Creates a database with a specific module | +| eviction-policy | noeviction (*default*)
allkeys-lru
allkeys-lfu
allkeys-random
volatile-lru
volatile-lfu
volatile-random
volatile-ttl | Sets [eviction policy]({{< relref "/operate/rs/databases/memory-performance/eviction-policy" >}}) | +| proxy-policy | all-nodes
all-master-shards
single | Sets proxy policy | + + + +### Returns + +Returns the task ID of the task that is creating the database. + +If `--no-wait` is specified, the command exits. Otherwise, it will wait for the database to be created and then return the CRDB GUID. + +### Examples + +```sh +$ crdb-cli crdb create --name database1 --memory-size 1GB --port 12000 \ + --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin \ + --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin +Task 633aaea3-97ee-4bcb-af39-a9cb25d7d4da created + ---> Status changed: queued -> started + ---> CRDB GUID Assigned: crdb:d84f6fe4-5bb7-49d2-a188-8900e09c6f66 + ---> Status changed: started -> finished +``` + +To create an Active-Active database with two shards in each instance and with encrypted traffic between the clusters: + +```sh +crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin --shards-count 2 --encryption true +``` + +To create an Active-Active database with two shards and with RediSearch 2.0.6 module: + +```sh +crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin --shards-count 2 --with-module name=search,version="2.0.6",args="PARTITIONS AUTO" +``` + +To create an Active-Active database with two shards and with encrypted traffic between the clusters: + +```sh +crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin --encryption true --shards-count 2 +``` + +To create an Active-Active database with 1 shard in each instance and not wait for the response: + +```sh +crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin --no-wait +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/delete.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/delete.md new file mode 100644 index 0000000000..f690523baa --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/delete.md @@ -0,0 +1,43 @@ +--- +Title: crdb-cli crdb delete +alwaysopen: false +categories: +- docs +- operate +- rs +description: Deletes an Active-Active database. +linkTitle: delete +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/delete/' +--- + +Deletes an Active-Active database. + +```sh +crdb-cli crdb delete --crdb-guid + [ --no-wait ] +``` + +This command is irreversible. If the data in your database is important, back it up before you delete the database. + +### Parameters + +| Parameter | Value | Description | +|---------------------|--------|-------------------------------------| +| crdb-guid | string | The GUID of the database (required) | +| no-wait | | Does not wait for the task to complete | + +### Returns + +Returns the task ID of the task that is deleting the database. + +If `--no-wait` is specified, the command exits. Otherwise, it will wait for the database to be deleted and return `finished`. + +### Example + +```sh +$ crdb-cli crdb delete --crdb-guid db6365b5-8aca-4055-95d8-7eb0105c0b35 +Task dfe6cacc-88ff-4667-812e-938fd05fe359 created + ---> Status changed: queued -> started + ---> Status changed: started -> finished +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/flush.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/flush.md new file mode 100644 index 0000000000..28541823d9 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/flush.md @@ -0,0 +1,43 @@ +--- +Title: crdb-cli crdb flush +alwaysopen: false +categories: +- docs +- operate +- rs +description: Clears all keys from an Active-Active database. +linkTitle: flush +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/flush/' +--- + +Clears all keys from an Active-Active database. + +```sh +crdb-cli crdb flush --crdb-guid + [ --no-wait ] +``` + +This command is irreversible. If the data in your database is important, back it up before you flush the database. + +### Parameters + +| Parameter | Value | Description | +|---------------------|--------|-------------------------------------| +| crdb-guid | string | The GUID of the database (required) | +| no-wait | | Does not wait for the task to complete | + +### Returns + +Returns the task ID of the task clearing the database. + +If `--no-wait` is specified, the command exits. Otherwise, it will wait for the database to be cleared and return `finished`. + +### Example + +```sh +$ crdb-cli crdb flush --crdb-guid d84f6fe4-5bb7-49d2-a188-8900e09c6f66 +Task 53cdc59e-ecf5-4564-a8dd-448d71f9e568 created + ---> Status changed: queued -> started + ---> Status changed: started -> finished +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/get.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/get.md new file mode 100644 index 0000000000..a3dae428ff --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/get.md @@ -0,0 +1,124 @@ +--- +Title: crdb-cli crdb get +alwaysopen: false +categories: +- docs +- operate +- rs +description: Shows the current configuration of an Active-Active database. +linkTitle: get +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/get/' +--- + +Shows the current configuration of an Active-Active database. + +```sh +crdb-cli crdb get --crdb-guid +``` + +### Parameters + +| Parameter | Value | Description | +|---------------------|--------|-------------------------------------| +| crdb-guid | string | The GUID of the database (required) | + +### Returns + +Returns the current configuration of the database. + +### Example + +```sh +$ crdb-cli crdb get --crdb-guid d84f6fe4-5bb7-49d2-a188-8900e09c6f66 +CRDB-GUID: d84f6fe4-5bb7-49d2-a188-8900e09c6f66 +Name: database1 +Encryption: False +Causal consistency: False +Protocol version: 1 +FeatureSet version: 5 +Modules: [] +Default-DB-Config: + memory_size: 1073741824 + port: 12000 + replication: True + shard_key_regex: [{'regex': '.*\\{(?.*)\\}.*'}, {'regex': '(?.*)'}] + sharding: True + shards_count: 1 + tls_mode: disabled + rack_aware: None + data_persistence: None + authentication_redis_pass: None + authentication_admin_pass: None + oss_sharding: None + oss_cluster: None + proxy_policy: None + shards_placement: None + oss_cluster_api_preferred_ip_type: None + bigstore: None + bigstore_ram_size: None + aof_policy: None + snapshot_policy: None + max_aof_load_time: None + max_aof_file_size: None +Instance: + Id: 1 + Cluster: + FQDN: cluster1.redis.local + URL: https://cluster1.redis.local:9443 + Replication-Endpoint: + Replication TLS SNI: + Compression: 3 + DB-Config: + authentication_admin_pass: + replication: None + rack_aware: None + memory_size: None + data_persistence: None + tls_mode: None + authentication_redis_pass: None + port: None + shards_count: None + shard_key_regex: None + oss_sharding: None + oss_cluster: None + proxy_policy: None + shards_placement: None + oss_cluster_api_preferred_ip_type: None + bigstore: None + bigstore_ram_size: None + aof_policy: None + snapshot_policy: None + max_aof_load_time: None + max_aof_file_size: None +Instance: + Id: 2 + Cluster: + FQDN: cluster2.redis.local + URL: https://cluster2.redis.local:9443 + Replication-Endpoint: + Replication TLS SNI: + Compression: 3 + DB-Config: + authentication_admin_pass: + replication: None + rack_aware: None + memory_size: None + data_persistence: None + tls_mode: None + authentication_redis_pass: None + port: None + shards_count: None + shard_key_regex: None + oss_sharding: None + oss_cluster: None + proxy_policy: None + shards_placement: None + oss_cluster_api_preferred_ip_type: None + bigstore: None + bigstore_ram_size: None + aof_policy: None + snapshot_policy: None + max_aof_load_time: None + max_aof_file_size: None +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/health-report.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/health-report.md new file mode 100644 index 0000000000..ebecab6c02 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/health-report.md @@ -0,0 +1,128 @@ +--- +Title: crdb-cli crdb health-report +alwaysopen: false +categories: +- docs +- operate +- rs +description: Shows the health report of an Active-Active database. +linkTitle: health-report +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/health-report/' +--- + +Shows the health report of the API management layer of an Active-Active database. + +```sh +crdb-cli crdb health-report --crdb-guid +``` + +### Parameters + +| Parameter | Value | Description | +|---------------------|--------|-------------------------------------| +| crdb-guid | string | The GUID of the database (required) | + +### Returns + +Returns the health report of the API management layer of the database. + +### Example + +```sh +$ crdb-cli crdb health-report --crdb-guid d84f6fe4-5bb7-49d2-a188-8900e09c6f66 +[ + { + "active_config_version":1, + "cluster_name":"cluster2.redis.local", + "configurations":[ + { + "causal_consistency":false, + "encryption":false, + "featureset_version":5, + "instances":[ + { + "cluster":{ + "name":"cluster1.redis.local", + "url":"https:\/\/cluster1.redis.local:9443" + }, + "db_uid":"", + "id":1 + }, + { + "cluster":{ + "name":"cluster2.redis.local", + "url":"https:\/\/cluster2.redis.local:9443" + }, + "db_uid":"1", + "id":2 + } + ], + "name":"database1", + "protocol_version":1, + "status":"commit-completed", + "version":1 + } + ], + "connections":[ + { + "name":"cluster1.redis.local", + "status":"ok" + }, + { + "name":"cluster2.redis.local", + "status":"ok" + } + ], + "guid":"d84f6fe4-5bb7-49d2-a188-8900e09c6f66", + "name":"database1", + "connection_error":null + }, + { + "active_config_version":1, + "cluster_name":"cluster1.redis.local", + "configurations":[ + { + "causal_consistency":false, + "encryption":false, + "featureset_version":5, + "instances":[ + { + "cluster":{ + "name":"cluster1.redis.local", + "url":"https:\/\/cluster1.redis.local:9443" + }, + "db_uid":"4", + "id":1 + }, + { + "cluster":{ + "name":"cluster2.redis.local", + "url":"https:\/\/cluster2.redis.local:9443" + }, + "db_uid":"", + "id":2 + } + ], + "name":"database1", + "protocol_version":1, + "status":"commit-completed", + "version":1 + } + ], + "connections":[ + { + "name":"cluster1.redis.local", + "status":"ok" + }, + { + "name":"cluster2.redis.local", + "status":"ok" + } + ], + "guid":"d84f6fe4-5bb7-49d2-a188-8900e09c6f66", + "name":"database1", + "connection_error":null + } +] +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/list.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/list.md new file mode 100644 index 0000000000..302d1ee424 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/list.md @@ -0,0 +1,35 @@ +--- +Title: crdb-cli crdb list +alwaysopen: false +categories: +- docs +- operate +- rs +description: Shows a list of all Active-Active databases. +linkTitle: list +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/list/' +--- + +Shows a list of all Active-Active databases. + +```sh +crdb-cli crdb list +``` + +### Parameters + +None + +### Returns + +Returns a list of all Active-Active databases that the cluster participates in. Each database is represented with a unique GUID, the name of the database, an instance ID, and the FQDN of the cluster that hosts the instance. + +### Example + +```sh +$ crdb-cli crdb list +CRDB-GUID NAME REPL-ID CLUSTER-FQDN +d84f6fe4-5bb7-49d2-a188-8900e09c6f66 database1 1 cluster1.redis.local +d84f6fe4-5bb7-49d2-a188-8900e09c6f66 database1 2 cluster2.redis.local +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/purge-instance.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/purge-instance.md new file mode 100644 index 0000000000..5b0243d369 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/purge-instance.md @@ -0,0 +1,46 @@ +--- +Title: crdb-cli crdb purge-instance +alwaysopen: false +categories: +- docs +- operate +- rs +description: Deletes data from a local instance and removes it from the Active-Active + database. +linkTitle: purge-instance +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/purge-instance/' +--- + +Deletes data from a local instance and removes the instance from the Active-Active database. + +```sh +crdb-cli crdb purge-instance --crdb-guid + --instance-id + [ --no-wait ] +``` + +Once this command finishes, the other replicas must remove this instance with [`crdb-cli crdb remove-instance --force`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli/crdb/remove-instance" >}}). + +### Parameters + +| Parameter | Value | Description | +|---------------------------|--------|--------------------------------------------------| +| crdb-guid | string | The GUID of the database (required) | +| instance-id | string | The ID of the local instance (required) | +| no-wait | | Does not wait for the task to complete | + +### Returns + +Returns the task ID of the task that is purging the local instance. + +If `--no-wait` is specified, the command exits. Otherwise, it will wait for the instance to be purged and return `finished`. + +### Example + +```sh +$ crdb-cli crdb purge-instance --crdb-guid db6365b5-8aca-4055-95d8-7eb0105c0b35 --instance-id 2 +Task add0705c-87f1-4c28-ad6a-ab5d98e00c58 created + ---> Status changed: queued -> started + ---> Status changed: started -> finished +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/remove-instance.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/remove-instance.md new file mode 100644 index 0000000000..74980bcafc --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/remove-instance.md @@ -0,0 +1,51 @@ +--- +Title: crdb-cli crdb remove-instance +alwaysopen: false +categories: +- docs +- operate +- rs +description: Removes a peer replica from an Active-Active database. +linkTitle: remove-instance +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/remove-instance/' +--- + +Removes a peer replica instance from the Active-Active database and deletes the instance and its data from the participating cluster. + +```sh +crdb-cli crdb remove-instance --crdb-guid + --instance-id + [ --force ] + [ --no-wait ] +``` + +If the cluster cannot communicate with the instance that you want to remove, you can: + +1. Use the `--force` option to remove the instance from the Active-Active database without purging the data from the instance. + +1. Run [`crdb-cli crdb purge-instance`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli/crdb/purge-instance" >}}) from the removed instance to delete the Active-Active database and its data. + +### Parameters + +| Parameter | Value | Description| +|------------------------------|--------|------------| +| crdb-guid | string | The GUID of the database (required) | +| instance-id | string | The ID of the local instance to remove (required) | +| force | | Removes the instance without purging data from the instance.
If --force is specified, you must run [`crdb-cli crdb purge-instance`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli/crdb/purge-instance" >}}) from the removed instance. | +| no-wait | | Does not wait for the task to complete | + +### Returns + +Returns the task ID of the task that is deleting the instance. + +If `--no-wait` is specified, the command exits. Otherwise, it will wait for the instance to be removed and return `finished`. + +### Example + +```sh +$ crdb-cli crdb remove-instance --crdb-guid db6365b5-8aca-4055-95d8-7eb0105c0b35 --instance-id 2 --force +Task b1eba5ba-90de-49e9-8678-d66daa1afb51 created + ---> Status changed: queued -> started + ---> Status changed: started -> finished +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/update.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/update.md new file mode 100644 index 0000000000..762521f1f8 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/update.md @@ -0,0 +1,67 @@ +--- +Title: crdb-cli crdb update +alwaysopen: false +categories: +- docs +- operate +- rs +description: Updates the configuration of an Active-Active database. +linkTitle: update +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/crdb/update/' +--- + +Updates the configuration of an Active-Active database. + +```sh +crdb-cli crdb update --crdb-guid + [--no-wait] + [--force] + [--default-db-config ] + [--default-db-config-file ] + [--compression <0-6>] + [--causal-consistency { true | false } ] + [--credentials id=,username=,password= ] + [--encryption { true | false } ] + [--oss-cluster { true | false } ] + [--featureset-version { true | false } ] + [--memory-size ] + [--bigstore-ram-size ] + [--update-module name=,featureset_version=] +``` + +If you want to change the configuration of the local instance only, use [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) instead. + +### Parameters + +| Parameter | Value | Description | +|---------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| crdb-guid \ | string | GUID of the Active-Active database (required) | +| bigstore-ram-size \ | size in bytes, kilobytes (KB), or gigabytes (GB) | Maximum RAM limit for the databases with Auto Tiering enabled, if activated | +| memory-size \ | size in bytes, kilobytes (KB), or gigabytes (GB) | Maximum database memory (required) | +| causal-consistency | true
false | [Causal consistency]({{< relref "/operate/rs/databases/active-active/causal-consistency.md" >}}) applies updates to all instances in the order they were received | +| compression | 0-6 | The level of data compression:

0 = No compression

6 = High compression and resource load (Default: 3) | +| credentials id=\,username=\,password=\ | strings | Updates the credentials for access to the instance | +| default-db-config \ | | Default database configuration from stdin | +| default-db-config-file \ | filepath | Default database configuration from file | +| encryption | true
false | Activates or deactivates encryption | +| force | | Force an update even if there are no changes | +| no-wait | | Do not wait for the command to finish | +| oss-cluster | true
false | Activates or deactivates OSS Cluster mode | +| eviction-policy | noeviction
allkeys-lru
allkeys-lfu
allkeys-random
volatile-lru
volatile-lfu
volatile-random
volatile-ttl | Updates [eviction policy]({{< relref "/operate/rs/databases/memory-performance/eviction-policy" >}}) | +| featureset-version | true
false | Updates to latest FeatureSet version | +| update-module name=\,featureset_version=\ | strings | Update a module to the specified version | + +### Returns + +Returns the task ID of the task that is updating the database. + +If `--no-wait` is specified, the command exits. Otherwise, it will wait for the database to be updated and then return "finished." + +### Example + +```sh +$ crdb-cli crdb update --crdb-guid 968d586c-e12d-4b8f-8473-42eb88d0a3a2 --memory-size 2GBTask 7e98efc1-8233-4578-9e0c-cdc854b8af9e created + ---> Status changed: queued -> started + ---> Status changed: started -> finished +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/task/_index.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/task/_index.md new file mode 100644 index 0000000000..624f44d8d5 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/task/_index.md @@ -0,0 +1,19 @@ +--- +Title: crdb-cli task commands +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manage Active-Active tasks. +hideListLinks: true +linkTitle: task +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/task/' +--- + +The `crdb-cli task` commands help investigate Active-Active database performance issues. They should not be used except as directed by Support. + +## `crdb-cli task` commands + +{{}} diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/task/cancel.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/task/cancel.md new file mode 100644 index 0000000000..c265ff5d33 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/task/cancel.md @@ -0,0 +1,36 @@ +--- +Title: crdb-cli task cancel +alwaysopen: false +categories: +- docs +- operate +- rs +description: Attempts to cancel a specified Active-Active database task. +linkTitle: cancel +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/task/cancel/' +--- + +Cancels the Active-Active database task specified by the task ID. + +```sh +crdb-cli task cancel +``` + +### Parameters + +| Parameter | Value | Description | +|---------------------|--------|-------------------------------------| +| task-id \ | string | An Active-Active database task ID (required) | + +### Returns + +Attempts to cancel an Active-Active database task. + +Be aware that tasks may complete before they can be cancelled. + +### Example + +```sh +$ crdb-cli task cancel --task-id 2901c2a3-2828-4717-80c0-6f27f1dd2d7c +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/task/list.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/task/list.md new file mode 100644 index 0000000000..5070a5d599 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/task/list.md @@ -0,0 +1,44 @@ +--- +Title: crdb-cli task list +alwaysopen: false +categories: +- docs +- operate +- rs +description: Lists active and recent Active-Active database tasks. +linkTitle: list +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/task/list/' +--- + +Lists active and recent Active-Active database tasks. + +```sh +crdb-cli task list +``` + +### Parameters + +None + +### Returns + +A table listing current and recent Active-Active tasks. Each entry includes the following: + +| Column | Description | +|--------|-------------| +| Task ID | String containing the unique ID associated with the task
Example: `e1c49470-ae0b-4df8-885b-9c755dd614d0` | +| CRDB-GUID | String containing the unique ID associated with the Active-Active database affected by the task
Example: `1d7741cc-1110-4e2f-bc6c-935292783d24` | +| Operation | String describing the task action
Example: `create_crdb` | +| Status | String indicating the task status
Example: `finished` | +| Worker name | String identifying the process handling the task
Example: `crdb_worker:1:0` | +| Started | TimeStamp value indicating when the task started ([UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time))
Example: `2022-10-12T09:33:41Z` | +| Ended | TimeStamp value indicating when the task ended (UTC)
Example: ` 2022-10-12T09:33:55Z` | + +### Example + +```sh +$ crdb-cli task list +TASK-ID CRDB-GUID OPERATION STATUS WORKER-NAME STARTED ENDED + +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/crdb-cli/task/status.md b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/task/status.md new file mode 100644 index 0000000000..bd94933368 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/crdb-cli/task/status.md @@ -0,0 +1,47 @@ +--- +Title: crdb-cli task status +alwaysopen: false +categories: +- docs +- operate +- rs +description: Shows the status of a specified Active-Active database task. +linkTitle: status +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/crdb-cli/task/status/' +--- + +Shows the status of a specified Active-Active database task. + +```sh +crdb-cli task status --task-id +``` + +### Parameters + +| Parameter | Value | Description | +|---------------------|--------|-------------------------------------| +| task-id \ | string | An Active-Active database task ID (required) | +| verbose | N/A | Returns detailed information when specified | +| no-verbose | N/A | Returns limited information when specified | + +The `--verbose` and `--no-verbose` options are mutually incompatible; specify one or the other. + +The `404 Not Found` error indicates an invalid task ID. Use the [`task list`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli/task/list" >}}) command to determine available task IDs. + +### Returns + +Returns the status of an Active-Active database task. + +### Example + +```sh +$ crdb-cli task status --task-id e1c49470-ae0b-4df8-885b-9c755dd614d0 +Task-ID: e1c49470-ae0b-4df8-885b-9c755dd614d0 +CRDB-GUID: 1d7741cc-1110-4e2f-bc6c-935292783d24 +Operation: create_crdb +Status: finished +Worker-Name: crdb_worker:1:0 +Started: 2022-10-12T09:33:41Z +Ended: 2022-10-12T09:33:55Z +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/redis-cli/_index.md b/content/operate/rs/7.4/references/cli-utilities/redis-cli/_index.md new file mode 100644 index 0000000000..51cb22e545 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/redis-cli/_index.md @@ -0,0 +1,153 @@ +--- +Title: redis-cli +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Run Redis commands. +hideListLinks: true +linkTitle: redis-cli (run Redis commands) +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/redis-cli/' +--- + +The `redis-cli` command-line utility lets you interact with a Redis database. With `redis-cli`, you can run [Redis commands]({{< relref "/commands" >}}) directly from the command-line terminal or with [interactive mode](#interactive-mode). + +If you want to run Redis commands without `redis-cli`, you can [connect to a database with Redis Insight]({{< relref "/develop/connect/insight/" >}}) and use the built-in [CLI]({{< relref "/develop/connect/insight/" >}}) prompt instead. + +## Install `redis-cli` + +When you install Redis Enterprise Software or Redis Community Edition, it also installs the `redis-cli` command-line utility. + +To learn how to install Redis and `redis-cli`, see the following installation guides: + +- [Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-redis/" >}}) + +- [Redis Enterprise Software]({{< relref "/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart" >}}) + +- [Redis Enterprise Software with Docker]({{< relref "/operate/rs/installing-upgrading/quickstarts/docker-quickstart" >}}) + +## Connect to a database + +To run Redis commands with `redis-cli`, you need to connect to your Redis database. + +You can find endpoint and port details in the **Databases** list or the database’s **Configuration** screen. + +### Connect remotely + +If you have `redis-cli` 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. + +```sh +$ redis-cli -h -p -a +``` + +You can also provide the password with the `REDISCLI_AUTH` environment variable instead of the `-a` option: + +```sh +$ export REDISCLI_AUTH= +$ redis-cli -h -p +``` + +### Connect over TLS + +To connect to a Redis Enterprise Software or Redis Cloud database over TLS: + +1. Download or copy the Redis Enterprise server (or proxy) certificates. + + - For Redis Cloud, see [Download certificates]({{< relref "/operate/rc/security/database-security/tls-ssl#download-certificates" >}}) for detailed instructions on how to download the server certificates (`redis_ca.pem`) from the [Redis Cloud console](https://cloud.redis.io/). + + - For Redis Enterprise Software, copy the proxy certificate from the Cluster Manager UI (**Cluster > Security > Certificates > Server authentication**) or from a cluster node (`/etc/opt/redislabs/proxy_cert.pem`). + +1. Copy the certificate to each client machine. + +1. If your database doesn't require client authentication, provide the Redis Enterprise server certificate (`redis_ca.pem` for Cloud or `proxy_cert.pem` for Software) when you connect: + + ```sh + redis-cli -h -p --tls --cacert .pem + ``` + +1. If your database requires client authentication, provide your client's private and public keys along with the Redis Enterprise server certificate (`redis_ca.pem` for Cloud or `proxy_cert.pem` for Software) when you connect: + + ```sh + redis-cli -h -p --tls --cacert .pem \ + --cert redis_user.crt --key redis_user_private.key + ``` + +### Connect with Docker + +If your Redis database runs in a Docker container, you can use `docker exec` to run `redis-cli` commands: + +```sh +$ docker exec -it redis-cli -p +``` + +## Basic use + +You can run `redis-cli` commands directly from the command-line terminal: + +```sh +$ redis-cli -h -p +``` + +For example, you can use `redis-cli` to test your database connection and store a new Redis string in the database: + +```sh +$ redis-cli -h -p 12000 PING +PONG +$ redis-cli -h -p 12000 SET mykey "Hello world" +OK +$ redis-cli -h -p 12000 GET mykey +"Hello world" +``` + +For more information, see [Command line usage]({{< relref "/develop/connect/cli" >}}#command-line-usage). + +## Interactive mode + +In `redis-cli` [interactive mode]({{< relref "/develop/connect/cli" >}}#interactive-mode), you can: + +- Run any `redis-cli` command without prefacing it with `redis-cli`. +- Enter `?` for more information about how to use the `HELP` command and [set `redis-cli` preferences]({{< relref "/develop/connect/cli" >}}#preferences). +- Enter [`HELP`]({{< relref "/develop/connect/cli" >}}#showing-help-about-redis-commands) followed by the name of a command for more information about the command and its options. +- Press the `Tab` key for command completion. +- Enter `exit` or `quit` or press `Control+D` to exit interactive mode and return to the terminal prompt. + +This example shows how to start interactive mode and run Redis commands: + +```sh +$ redis-cli -p 12000 +127.0.0.1:12000> PING +PONG +127.0.0.1:12000> SET mykey "Hello world" +OK +127.0.0.1:12000> GET mykey +"Hello world" +``` + +## Examples + +### Check slowlog + +Run [`slowlog get`]({{< relref "/commands/slowlog-get" >}}) for a list of recent slow commands: + +```sh +redis-cli -h -p slowlog get +``` + +### Scan for big keys + +Scan the database for big keys: + +```sh +redis-cli -h -p --bigkeys +``` + +See [Scanning for big keys]({{< relref "/develop/connect/cli" >}}#scanning-for-big-keys) for more information. + +## More info + +- [Redis CLI documentation]({{< relref "/develop/connect/cli" >}}) +- [Redis commands reference]({{< relref "/commands/" >}} diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/_index.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/_index.md new file mode 100644 index 0000000000..792c945119 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/_index.md @@ -0,0 +1,44 @@ +--- +Title: rladmin +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manage Redis Enterprise clusters and databases. +hideListLinks: true +linkTitle: rladmin (manage cluster) +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/' +--- + +`rladmin` 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 `rladmin` to edit cluster and database configurations. + +Although you can use the Cluster Manager UI for some of these tasks, others are unique to the `rladmin` command-line tool. + +## `rladmin` commands + +{{}} + +## Use the `rladmin` shell + +To open the `rladmin` shell: + +1. Sign in to a Redis Enterprise Software node with an account that is a member of the **redislabs** group. + + The `rladmin` binary is located in `/opt/redislabs/bin`. If you don't have this directory in your `PATH`, you may want to add it. Otherwise, you can use `bash -l ` to sign in as a user with permissions for that directory. + +1. Run: `rladmin` + + {{}} +If the CLI does not recognize the `rladmin` command, +run this command to load the necessary configuration first: `bash -l` + {{}} + +In the `rladmin` shell, you can: + +- Run any `rladmin` command without prefacing it with `rladmin`. +- Enter `?` to view the full list of available commands. +- Enter [`help`]({{< relref "/operate/rs/references/cli-utilities/rladmin/help" >}}) followed by the name of a command for a detailed explanation of the command and its usage. +- Press the `Tab` key for command completion. +- Enter `exit` or press `Control+D` to exit the `rladmin` shell and return to the terminal prompt. diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/bind.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/bind.md new file mode 100644 index 0000000000..39d06be6c1 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/bind.md @@ -0,0 +1,154 @@ +--- +Title: rladmin bind +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manages the proxy policy for a specified database endpoint. +headerRange: '[1-2]' +linkTitle: bind +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/bind/' +--- + +Manages the proxy policy for a specific database endpoint. + +## `bind endpoint exclude` + +Defines a list of nodes to exclude from the proxy policy for a specific database endpoint. When you exclude a node, the endpoint cannot bind to the node's proxy. + +Each time you run an exclude command, it overwrites the previous list of excluded nodes. + +```sh +rladmin bind + [ db { db: | } ] + endpoint exclude + +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|--------------------------------|-----------------------------------------------------------------------------------------------| +| db | db:\
name | Only allows endpoints for the specified database | +| endpoint | endpoint ID | Changes proxy settings for the specified endpoint | +| proxy | list of proxy IDs | Proxies to exclude | + +### Returns + +Returns `Finished successfully` if the list of excluded proxies was successfully changed. Otherwise, it returns an error. + +Use [`rladmin status endpoints`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-endpoints" >}}) to verify that the policy changed. + +### Example + +``` sh +$ rladmin status endpoints db db:6 +ENDPOINTS: +DB:ID NAME ID NODE ROLE SSL +db:6 tr02 endpoint:6:1 node:2 all-nodes No +db:6 tr02 endpoint:6:1 node:1 all-nodes No +db:6 tr02 endpoint:6:1 node:3 all-nodes No +$ rladmin bind endpoint 6:1 exclude 2 +Executing bind endpoint: OOO. +Finished successfully +$ rladmin status endpoints db db:6 +ENDPOINTS: +DB:ID NAME ID NODE ROLE SSL +db:6 tr02 endpoint:6:1 node:1 all-nodes -2 No +db:6 tr02 endpoint:6:1 node:3 all-nodes -2 No +``` + +## `bind endpoint include` + +Defines a list of nodes to include in the proxy policy for the specific database endpoint. + +Each time you run an include command, it overwrites the previous list of included nodes. + +```sh +rladmin bind + [ db { db: | } ] + endpoint include + +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|--------------------------------|-----------------------------------------------------------------------------------------------| +| db | db:\
name | Only allows endpoints for the specified database | +| endpoint | endpoint ID | Changes proxy settings for the specified endpoint | +| proxy | list of proxy IDs | Proxies to include | + +### Returns + +Returns `Finished successfully` if the list of included proxies was successfully changed. Otherwise, it returns an error. + +Use [`rladmin status endpoints`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-endpoints" >}}) to verify that the policy changed. + +### Example + +``` sh +$ rladmin status endpoints db db:6 +ENDPOINTS: +DB:ID NAME ID NODE ROLE SSL +db:6 tr02 endpoint:6:1 node:3 all-master-shards No +$ rladmin bind endpoint 6:1 include 3 +Executing bind endpoint: OOO. +Finished successfully +$ rladmin status endpoints db db:6 +ENDPOINTS: +DB:ID NAME ID NODE ROLE SSL +db:6 tr02 endpoint:6:1 node:1 all-master-shards +3 No +db:6 tr02 endpoint:6:1 node:3 all-master-shards +3 No +``` + +## `bind endpoint policy` + +Changes the overall proxy policy for a specific database endpoint. + +```sh +rladmin bind + [ db { db: | } ] + endpoint + policy { single | all-master-shards | all-nodes } +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|--------------------------------|-----------------------------------------------------------------------------------------------| +| db | db:\
name | Only allows endpoints for the specified database | +| endpoint | endpoint ID | Changes proxy settings for the specified endpoint | +| policy | 'all-master-shards'
'all-nodes'
'single' | Changes the [proxy policy](#proxy-policies) to the specified policy | + +| Proxy policy | Description | +| - | - | +| all-master-shards | Multiple proxies, one on each master node (best for high traffic and multiple master shards) | +| all-nodes | Multiple proxies, one on each node of the cluster (increases traffic in the cluster, only used in special cases) | +| single | All traffic flows through a single proxy bound to the database endpoint (preferable in most cases) | + +### Returns + +Returns `Finished successfully` if the proxy policy was successfully changed. Otherwise, it returns an error. + +Use [`rladmin status endpoints`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-endpoints" >}}) to verify that the policy changed. + +### Example + +``` sh +$ rladmin status endpoints db db:6 +ENDPOINTS: +DB:ID NAME ID NODE ROLE SSL +db:6 tr02 endpoint:6:1 node:1 all-nodes -2 No +db:6 tr02 endpoint:6:1 node:3 all-nodes -2 No +$ rladmin bind endpoint 6:1 policy all-master-shards +Executing bind endpoint: OOO. +Finished successfully +$ rladmin status endpoints db db:6 +ENDPOINTS: +DB:ID NAME ID NODE ROLE SSL +db:6 tr02 endpoint:6:1 node:3 all-master-shards No +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/_index.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/_index.md new file mode 100644 index 0000000000..e19ac4517a --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/_index.md @@ -0,0 +1,25 @@ +--- +Title: rladmin cluster +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manage cluster. +headerRange: '[1-2]' +hideListLinks: true +linkTitle: cluster +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/cluster/' +--- + +Manages cluster configuration and administration. Most `rladmin cluster` commands are only for clusters that are already configured, while a few others are only for new clusters that have not been configured. + +## Commands for configured clusters + +{{}} + +## Commands for non-configured clusters + +{{}} diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/certificate.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/certificate.md new file mode 100644 index 0000000000..23ecf2dab9 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/certificate.md @@ -0,0 +1,47 @@ +--- +Title: rladmin cluster certificate +alwaysopen: false +categories: +- docs +- operate +- rs +description: Sets the cluster certificate. +headerRange: '[1-2]' +linkTitle: certificate +tags: +- configured +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/cluster/certificate/' +--- + +Sets a cluster certificate to a specified PEM file. + +```sh +rladmin cluster certificate + set + certificate_file + [ key_file ] +``` + +To set a certificate for a specific service, use the corresponding certificate name. See the [certificates table]({{< relref "/operate/rs/security/certificates" >}}) for the list of cluster certificates and their descriptions. + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|------------|-------------| +| certificate name | 'cm'
'api'
'proxy'
'syncer'
'metrics_exporter' | Name of the certificate to update | +| certificate_file | filepath | Path to the certificate file | +| key_file | filepath | Path to the key file (optional) | + +### Returns + +Reports that the certificate was set to the specified file. Returns an error message if the certificate fails to update. + +### Example + +```sh +$ rladmin cluster certificate set proxy \ + certificate_file /tmp/proxy.pem +Set proxy certificate to contents of file /tmp/proxy.pem +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/config.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/config.md new file mode 100644 index 0000000000..d1c4675065 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/config.md @@ -0,0 +1,102 @@ +--- +Title: rladmin cluster config +alwaysopen: false +categories: +- docs +- operate +- rs +description: Updates the cluster's configuration. +headerRange: '[1-2]' +linkTitle: config +tags: +- configured +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/cluster/config/' +--- + +Updates the cluster configuration. + +```sh + rladmin cluster config + [ auditing db_conns audit_protocol { TCP | local } + audit_address audit_port ] + [bigstore_driver {speedb | rocksdb} ] + [ control_cipher_suites ] + [ cm_port ] + [ cm_session_timeout_minutes ] + [ cnm_http_port ] + [ cnm_https_port ] + [ crdb_coordinator_port ] + [ data_cipher_list ] + [ data_cipher_suites_tls_1_3 ] + [ debuginfo_path ] + [ encrypt_pkeys { enabled | disabled } ] + [ envoy_admin_port ] + [ envoy_mgmt_server_port ] + [ gossip_envoy_admin_port ] + [ handle_redirects { enabled | disabled } ] + [ handle_metrics_redirects { enabled | disabled } ] + [ http_support { enabled | disabled } ] + [ ipv6 { enabled | disabled } ] + [ min_control_TLS_version { 1.2 | 1.3 } ] + [ min_data_TLS_version { 1.2 | 1.3 } ] + [ min_sentinel_TLS_version { 1.2 | 1.3 } ] + [ reserved_ports ] + [ s3_url ] + [ s3_ca_cert ] + [ saslauthd_ldap_conf ] + [ sentinel_tls_mode { allowed | required | disabled } ] + [ sentinel_cipher_suites ] + [ services { cm_server | crdb_coordinator | crdb_worker | + mdns_server | pdns_server | saslauthd | + stats_archiver } { enabled | disabled } ] + [ upgrade_mode { enabled | disabled } ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|------------|-------------| +| audit_address | string | TCP/IP address where a listener can capture [audit event notifications]({{< relref "/operate/rs/security/audit-events" >}}) | +| audit_port | string | Port where a listener can capture [audit event notifications]({{< relref "/operate/rs/security/audit-events" >}}) | +| audit_protocol | `tcp`
`local` | Protocol used for [audit event notifications]({{< relref "/operate/rs/security/audit-events" >}})
For production systems, only `tcp` is supported. | +| control_cipher_suites | list of ciphers | Cipher suites used for TLS connections to the Cluster Manager UI (specified in the format understood by the BoringSSL library)
(previously named `cipher_suites`) | +| cm_port | integer | UI server listening port | +| cm_session_timeout_minutes | integer | Timeout in minutes for the CM session +| cnm_http_port | integer | HTTP REST API server listening port | +| cnm_https_port | integer | HTTPS REST API server listening port | +| crdb_coordinator_port | integer, (range: 1024-65535) (default: 9081) | CRDB coordinator port | +| data_cipher_list | list of ciphers | Cipher suites used by the the data plane (specified in the format understood by the OpenSSL library) | +| data_cipher_suites_tls_1_3 | list of ciphers | Specifies the enabled TLS 1.3 ciphers for the data plane | +| debuginfo_path | filepath | Local directory to place generated support package files | +| encrypt_pkeys | `enabled`
`disabled` | Enable or turn off encryption of private keys | +| envoy_admin_port | integer, (range: 1024-65535) | Envoy admin port. Changing this port during runtime might result in an empty response because envoy serves as the cluster gateway.| +| envoy_mgmt_server_port | integer, (range: 1024-65535) | Envoy management server port| +| gossip_envoy_admin_port | integer, (range: 1024-65535) | Gossip envoy admin port| +| handle_redirects | `enabled`
`disabled` | Enable or turn off handling DNS redirects when DNS is not configured and running behind a load balancer | +| handle_metrics_redirects | `enabled`
`disabled` | Enable or turn off handling cluster redirects internally for Metrics API | +| http_support | `enabled`
`disabled` | Enable or turn off using HTTP for REST API connections | +| ipv6 | `enabled`
`disabled` | Enable or turn off IPv6 connections to the Cluster Manager UI | +| min_control_TLS_version | `1.2`
`1.3` | The minimum TLS protocol version that is supported for the control path | +| min_data_TLS_version | `1.2`
`1.3` | The minimum TLS protocol version that is supported for the data path | +| min_sentinel_TLS_version | `1.2`
`1.3` | The minimum TLS protocol version that is supported for the discovery service | +| reserved_ports | list of ports/port ranges | List of reserved ports and/or port ranges to avoid using for database endpoints (for example `reserved_ports 11000 13000-13010`) | +| s3_url | string | The URL of S3 export and import | +| s3_ca_cert | string | The CA certificate filepath for S3 export and import | +| saslauthd_ldap_conf | filepath | Updates LDAP authentication configuration for the cluster | +| sentinel_cipher_suites | list of ciphers | Cipher suites used by the discovery service (supported ciphers are implemented by the [cipher_suites.go]() package) | +| sentinel_tls_mode | `allowed`
`required`
`disabled` | Define the SSL policy for the discovery service
(previously named `sentinel_ssl_policy`) | +| services | `cm_server`
`crdb_coordinator`
`crdb_worker`
`mdns_server`
`pdns_server`
`saslauthd`
`stats_archiver`

`enabled`
`disabled` | Enable or turn off selected cluster services | +| upgrade_mode | `enabled`
`disabled` | Enable or turn off upgrade mode on the cluster | + +### Returns + +Reports whether the cluster was configured successfully. Displays an error message if the configuration attempt fails. + +### Example + +```sh +$ rladmin cluster config cm_session_timeout_minutes 20 +Cluster configured successfully +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/create.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/create.md new file mode 100644 index 0000000000..c0fad5589e --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/create.md @@ -0,0 +1,70 @@ +--- +Title: rladmin cluster create +alwaysopen: false +categories: +- docs +- operate +- rs +description: Creates a new cluster. +headerRange: '[1-2]' +linkTitle: create +tags: +- non-configured +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/cluster/create/' +--- + +Creates a new cluster. The node where you run `rladmin cluster create` becomes the first node of the new cluster. + +```sh +cluster create + name + username + password + [ node_uid ] + [ rack_aware ] + [ rack_id ] + [ license_file ] + [ ephemeral_path ] + [ persistent_path ] + [ ccs_persistent_path ] + [ register_dns_suffix ] + [ flash_enabled ] + [ flash_path ] + [ addr ] + [ external_addr [ ... ] ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|------------|-------------| +| addr | IP address | The node's internal IP address (optional) | +| ccs_persistent_path | filepath (default: /var/opt/redislabs/persist) | Path to the location of CCS snapshots (optional) | +| ephemeral_path | filepath (default: /var/opt/redislabs) | Path to the ephemeral storage location (optional) | +| external_addr | list of IP addresses | A space-delimited list of the node's external IP addresses (optional) | +| flash_enabled | | Enables flash storage (optional) | +| flash_path | filepath (default: /var/opt/redislabs/flash) | Path to the flash storage location (optional) | +| license_file | filepath | Path to the RLEC license file (optional) | +| name | string | Cluster name | +| node_uid | integer | Unique node ID (optional) | +| password | string | Admin user's password | +| persistent_path | filepath (default: /var/opt/redislabs/persist) | Path to the persistent storage location (optional) | +| rack_aware | | Activates or deactivates rack awareness (optional) | +| rack_id | string | The rack's unique identifier (optional) | +| register_dns_suffix | | Enables database mapping to both internal and external IP addresses (optional) | +| username | email address | Admin user's email address | + +### Returns + +Returns `ok` if the new cluster was created successfully. Otherwise, it returns an error message. + +### Example + +```sh +$ rladmin cluster create name cluster.local \ + username admin@example.com \ + password admin-password +Creating a new cluster... ok +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/debug_info.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/debug_info.md new file mode 100644 index 0000000000..a46e252010 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/debug_info.md @@ -0,0 +1,45 @@ +--- +Title: rladmin cluster debug_info +alwaysopen: false +categories: +- docs +- operate +- rs +description: Creates a support package. +headerRange: '[1-2]' +linkTitle: debug_info +tags: +- configured +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/cluster/debug_info/' +--- + +Downloads a support package to the specified path. If you do not specify a path, it downloads the package to the default path specified in the cluster configuration file. + +```sh +rladmin cluster debug_info + [ node ] + [ path ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|------------|-------------| +| node | integer | Downloads a support package for the specified node | +| path | filepath | Specifies the location where the support package should download | + +### Returns + +Reports the progress of the support package download. + +### Example + +```sh +$ rladmin cluster debug_info node 1 +Preparing the debug info files package +Downloading... +[==================================================] +Downloading complete. File /tmp/debuginfo.20220511-215637.node-1.tar.gz is saved. +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/join.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/join.md new file mode 100644 index 0000000000..16a4d4ff2f --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/join.md @@ -0,0 +1,72 @@ +--- +Title: rladmin cluster join +alwaysopen: false +categories: +- docs +- operate +- rs +description: Adds a node to an existing cluster. +headerRange: '[1-2]' +linkTitle: join +tags: +- non-configured +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/cluster/join/' +--- + +Adds a node to an existing cluster. + +```sh +rladmin cluster join + nodes + username + password + [ ephemeral_path ] + [ persistent_path ] + [ ccs_persistent_path ] + [ rack_id ] + [ override_rack_id ] + [ replace_node ] + [ flash_enabled ] + [ flash_path ] + [ addr ] + [ external_addr [ ... ] ] + [ override_repair ] + [ accept_servers { enabled | disabled } ] + [ cnm_http_port ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|------------|-------------| +| accept_servers | 'enabled'
'disabled' | Allows allocation of resources on the new node when enabled (optional) | +| addr | IP address | Sets a node's internal IP address. If not provided, the node sets the address automatically. (optional) | +| ccs_persistent_path | filepath (default: /var/opt/redislabs/persist) | Path to the CCS snapshot location (the default is the same as persistent_path) (optional) | +| cnm_http_port | integer | Joins a cluster that has a non-default cnm_http_port (optional) | +| ephemeral_path | filepath | Path to the ephemeral storage location (optional) | +| external_addr | list of IP addresses | Sets a node's external IP addresses (space-delimited list). If not provided, the node sets the address automatically. (optional) | +| flash_enabled | | Enables flash capabilities for a database (optional) | +| flash_path | filepath (default: /var/opt/redislabs/flash) | Path to the flash storage location in case the node does not support CAPI (required if flash_enabled) | +| nodes | IP address | Internal IP address of an existing node in the cluster | +| override_rack_id | | Changes to a new rack, specified by `rack_id` (optional) | +| override_repair | | Enables joining a cluster with a dead node (optional) | +| password | string | Admin user's password | +| persistent_path | filepath (default: /var/opt/redislabs/persist) | Path to the persistent storage location (optional) | +| rack_id | string | Moves the node to the specified rack (optional) | +| replace_node | integer | Replaces the specified node with the new node (optional) | +| username | email address | Admin user's email address | + +### Returns + +Returns `ok` if the node joined the cluster successfully. Otherwise, it returns an error message. + +### Example + +```sh +$ rladmin cluster join nodes 192.0.2.2 \ + username admin@example.com \ + password admin-password +Joining cluster... ok +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/master.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/master.md new file mode 100644 index 0000000000..cfe26039db --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/master.md @@ -0,0 +1,48 @@ +--- +Title: rladmin cluster master +alwaysopen: false +categories: +- docs +- operate +- rs +description: Identifies or changes the cluster's master node. +headerRange: '[1-2]' +linkTitle: master +tags: +- configured +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/cluster/master/' +--- + +Identifies the cluster's master node. Use `set` to change the cluster's master to a different node. + +```sh +cluster master [ set ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|------------|-------------| +| node_id | integer | Unique node ID | + +### Returns + +Returns the ID of the cluster's master node. Otherwise, it returns an error message. + +### Example + +Identify the cluster's master node: + +```sh +$ rladmin cluster master +Node 1 is the cluster master node +``` + +Change the cluster master to node 3: + +```sh +$ rladmin cluster master set 3 +Node 3 set to be the cluster master node +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/ocsp.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/ocsp.md new file mode 100644 index 0000000000..f4874df60d --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/ocsp.md @@ -0,0 +1,129 @@ +--- +Title: rladmin cluster ocsp +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manages OCSP. +headerRange: '[1-2]' +linkTitle: ocsp +tags: +- configured +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/cluster/ocsp/' +--- + +Manages OCSP configuration and verifies the status of a server certificate maintained by a third-party [certificate authority (CA)](https://en.wikipedia.org/wiki/Certificate_authority). + +## `ocsp certificate_compatible` + +Checks if the proxy certificate contains an OCSP URI. + +```sh +rladmin cluster ocsp certificate_compatible +``` + +### Parameters + +None + +### Returns + +Returns the OCSP URI if it exists. Otherwise, it returns an error. + +### Example + +```sh +$ rladmin cluster ocsp certificate_compatible +Success. OCSP URI is http://responder.ocsp.url.com +``` + +## `ocsp config` + +Displays or updates OCSP configuration. Run the command without the `set` option to display the current configuration of a parameter. + +```sh +rladmin cluster ocsp config + [set ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|---------------|-------------| +| ocsp_functionality | enabled

disabled | Enables or turns off OCSP for the cluster | +| query_frequency | integer (range: 60-86400) (default: 3600) | The time interval in seconds between OCSP queries to check the certificate's status | +| recovery_frequency | integer (range: 60-86400) (default: 60) | The time interval in seconds between retries after a failed query | +| recovery_max_tries | integer (range: 1-100) (default: 5) | The number of retries before the validation query fails and invalidates the certificate | +| responder_url | string | The OCSP server URL embedded in the proxy certificate (you cannot manually set this parameter) | +| response_timeout | integer (range: 1-60) (default: 1) | The time interval in seconds to wait for a response before timing out | + +### Returns + +If you run the `ocsp config` command without the `set` option, it displays the specified parameter's current configuration. + +### Example + +```sh +$ rladmin cluster ocsp config recovery_frequency +Recovery frequency of the OCSP server is 60 seconds +$ rladmin cluster ocsp config recovery_frequency set 30 +$ rladmin cluster ocsp config recovery_frequency +Recovery frequency of the OCSP server is 30 seconds +``` + +## `ocsp status` + +Returns the latest cached status of the certificate's OCSP response. + +```sh +rladmin cluster ocsp status +``` +### Parameters + +None + +### Returns + +Returns the latest cached status of the certificate's OCSP response. + +### Example + +```sh +$ rladmin cluster ocsp status +OCSP certificate status is: REVOKED +produced_at: Wed, 22 Dec 2021 12:50:11 GMT +responder_url: http://responder.ocsp.url.com +revocation_time: Wed, 22 Dec 2021 12:50:04 GMT +this_update: Wed, 22 Dec 2021 12:50:11 GMT +``` + +## `ocsp test_certificate` + +Queries the OCSP server for the certificate's latest status, then caches and displays the response. + +```sh +rladmin cluster ocsp test_certificate +``` + +### Parameters + +None + +### Returns + +Returns the latest status of the certificate's OCSP response. + +### Example + +```sh +$ rladmin cluster ocsp test_certificate +Initiating a query to OCSP server +...OCSP certificate status is: REVOKED +produced_at: Wed, 22 Dec 2021 12:50:11 GMT +responder_url: http://responder.ocsp.url.com +revocation_time: Wed, 22 Dec 2021 12:50:04 GMT +this_update: Wed, 22 Dec 2021 12:50:11 GMT +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/recover.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/recover.md new file mode 100644 index 0000000000..74bf84fd03 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/recover.md @@ -0,0 +1,60 @@ +--- +Title: rladmin cluster recover +alwaysopen: false +categories: +- docs +- operate +- rs +description: Recovers a cluster from a backup file. +headerRange: '[1-2]' +linkTitle: recover +tags: +- non-configured +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/cluster/recover/' +--- + +Recovers a cluster from a backup file. The default location of the configuration backup file is `/var/opt/redislabs/persist/ccs/ccs-redis.rdb`. + +```sh +rladmin cluster recover + filename + [ ephemeral_path ] + [ persistent_path ] + [ ccs_persistent_path ] + [ rack_id ] + [ override_rack_id ] + [ node_uid ] + [ flash_enabled ] + [ flash_path ] + [ addr ] + [ external_addr ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|------------|-------------| +| addr | IP address | Sets a node's internal IP address. If not provided, the node sets the address automatically. (optional) | +| ccs_persistent_path | filepath | Path to the location of CCS snapshots (default is the same as persistent_path) (optional) | +| external_addr | IP address | Sets a node's external IP address. If not provided, the node sets the address automatically. (optional) | +| ephemeral_path | filepath (default: /var/opt/redislabs) | Path to an ephemeral storage location (optional) | +| filename | filepath | Backup file to use for recovery | +| flash_enabled | | Enables flash storage (optional) | +| flash_path | filepath (default: /var/opt/redislabs/flash) | Path to the flash storage location in case the node does not support CAPI (required if flash_enabled) | +| node_uid | integer (default: 1) | Specifies which node will recover first and become master (optional) | +| override_rack_id | | Changes to a new rack, specified by `rack_id` (optional) | +| persistent_path | filepath | Path to the persistent storage location (optional) | +| rack_id | string | Switches to the specified rack (optional) | + +### Returns + +Returns `ok` if the cluster recovered successfully. Otherwise, it returns an error message. + +### Example + +```sh +$ rladmin cluster recover filename /tmp/persist/ccs/ccs-redis.rdb node_uid 1 rack_id 5 +Initiating cluster recovery... ok +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/reset_password.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/reset_password.md new file mode 100644 index 0000000000..8e97da20b3 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/reset_password.md @@ -0,0 +1,43 @@ +--- +Title: rladmin cluster reset_password +alwaysopen: false +categories: +- docs +- operate +- rs +description: Changes the password for a given email. +headerRange: '[1-2]' +linkTitle: reset_password +tags: +- configured +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/cluster/reset_password/' +--- + +Changes the password for the user associated with the specified email address. + +Enter a new password when prompted. Then enter the same password when prompted a second time to confirm the password change. + +```sh +rladmin cluster reset_password +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|------------|-------------| +| user email | email address | The email address of the user that needs a password reset | + +### Returns + +Reports whether the password change succeeded or an error occurred. + +### Example + +```sh +$ rladmin cluster reset_password user@example.com +New password: +New password (again): +Password changed. +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/running_actions.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/running_actions.md new file mode 100644 index 0000000000..a08f3ee4f3 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/running_actions.md @@ -0,0 +1,38 @@ +--- +Title: rladmin cluster running_actions +alwaysopen: false +categories: +- docs +- operate +- rs +description: Lists all active tasks. +headerRange: '[1-2]' +linkTitle: running_actions +tags: +- configured +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/cluster/running_actions/' +--- + +Lists all active tasks running on the cluster. + +```sh +rladmin cluster running_actions +``` + +### Parameters + +None + +### Returns + +Returns details about any active tasks running on the cluster. + +### Example + +```sh +$ rladmin cluster running_actions +Got 1 tasks: +1) Task: maintenance_on (ce391d81-8d51-4ce2-8f63-729c7ac2589e) Node: 1 Status: running +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/stats_archiver.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/stats_archiver.md new file mode 100644 index 0000000000..8262df5059 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/cluster/stats_archiver.md @@ -0,0 +1,40 @@ +--- +Title: rladmin cluster stats_archiver +alwaysopen: false +categories: +- docs +- operate +- rs +description: Enables/deactivates the stats archiver. +headerRange: '[1-2]' +linkTitle: stats_archiver +tags: +- configured +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/cluster/stats_archiver/' +--- + +Enables or deactivates the stats archiver, which logs statistics in CSV (comma-separated values) format. + +```sh +rladmin cluster stats_archiver { enabled | disabled } +``` + +### Parameters + +| Parameter | Description | +|-----------|-------------| +| enabled | Turn on the stats archiver | +| disabled | Turn off the stats archiver | + +### Returns + +Returns the updated status of the stats archiver. + +### Example + +```sh +$ rladmin cluster stats_archiver enabled +Status: enabled +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/failover.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/failover.md new file mode 100644 index 0000000000..723fd7bcaf --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/failover.md @@ -0,0 +1,55 @@ +--- +Title: rladmin failover +alwaysopen: false +categories: +- docs +- operate +- rs +description: Fail over primary shards of a database to their replicas. +headerRange: '[1-2]' +linkTitle: failover +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/failover/' +--- + +Fails over one or more primary (also known as master) shards of a database and promotes their respective replicas to primary shards. + +``` sh +rladmin failover + [db { db: | }] + shard + [immediate] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|--------------------------------|-----------------------------------------------------------------------------------------------| +| db | db:\
name | Fail over shards for the specified database | +| shard | one or more primary shard IDs | Primary shard or shards to fail over | +| immediate | | Perform failover without verifying the replica shards are in full sync with the master shards | + +### Returns + +Returns `Finished successfully` if the failover completed. Otherwise, it returns an error. + +Use [`rladmin status shards`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-shards" >}}) to verify that the failover completed. + +### Example + +``` sh +$ rladmin status shards +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS +db:5 tr01 redis:12 node:1 slave 0-16383 3.02MB OK +db:5 tr01 redis:13 node:2 master 0-16383 3.09MB OK +$ rladmin failover shard 13 +Executing shard fail-over: OOO. +Finished successfully +$ rladmin status shards +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS +db:5 tr01 redis:12 node:1 master 0-16383 3.12MB OK +db:5 tr01 redis:13 node:2 slave 0-16383 2.99MB OK +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/help.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/help.md new file mode 100644 index 0000000000..8d4fa1a770 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/help.md @@ -0,0 +1,62 @@ +--- +Title: rladmin help +alwaysopen: false +categories: +- docs +- operate +- rs +description: Shows available commands or specific command usage. +headerRange: '[1-2]' +linkTitle: help +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/help/' +--- + +Lists all options and parameters for `rladmin` commands. + +``` sh +rladmin help [command] +``` + +### Parameters + +| Parameter | Description | +|-----------|-------------| +| command | Display help for this `rladmin` command (optional) | + +### Returns + +Returns a list of available `rladmin` commands. + +If a `command` is specified, returns a list of all the options and parameters for that `rladmin` command. + +### Example + +```sh +$ rladmin help +usage: rladmin [options] [command] [command args] + +Options: + -y Assume Yes for all required user confirmations. + +Commands: + bind Bind an endpoint + cluster Cluster management commands + exit Exit admin shell + failover Fail-over master to slave + help Show available commands, or use help for a specific command + info Show information about tunable parameters + migrate Migrate elements between nodes + node Node management commands + placement Configure shards placement policy + recover Recover databases + restart Restart database shards + status Show status information + suffix Suffix management + tune Tune system parameters + upgrade Upgrade entity version + verify Cluster verification reports + +Use "rladmin help [command]" to get more information on a specific command. +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/info.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/info.md new file mode 100644 index 0000000000..387b9d403d --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/info.md @@ -0,0 +1,203 @@ +--- +Title: rladmin info +alwaysopen: false +categories: +- docs +- operate +- rs +description: Shows the current configuration of a cluster, database, node, or proxy. +headerRange: '[1-2]' +linkTitle: info +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/info/' +--- + +Shows the current configuration of specified databases, proxies, clusters, or nodes. + +## `info cluster` + +Lists the current configuration for the cluster. + +```sh +rladmin info cluster +``` + +### Parameters + +None + +### Returns + +Returns the current configuration for the cluster. + +### Example + +``` sh +$ rladmin info cluster +Cluster configuration: + repl_diskless: enabled + shards_overbooking: disabled + default_non_sharded_proxy_policy: single + default_sharded_proxy_policy: single + default_shards_placement: dense + default_fork_evict_ram: enabled + default_provisioned_redis_version: 6.0 + redis_migrate_node_threshold: 0KB (0 bytes) + redis_migrate_node_threshold_percent: 4 (%) + redis_provision_node_threshold: 0KB (0 bytes) + redis_provision_node_threshold_percent: 12 (%) + max_simultaneous_backups: 4 + slave_ha: enabled + slave_ha_grace_period: 600 + slave_ha_cooldown_period: 3600 + slave_ha_bdb_cooldown_period: 7200 + parallel_shards_upgrade: 0 + show_internals: disabled + expose_hostnames_for_all_suffixes: disabled + login_lockout_threshold: 5 + login_lockout_duration: 1800 + login_lockout_counter_reset_after: 900 + default_concurrent_restore_actions: 10 + endpoint_rebind_propagation_grace_time: 15 + data_internode_encryption: disabled + redis_upgrade_policy: major + db_conns_auditing: disabled + watchdog profile: local-network + http support: enabled + upgrade mode: disabled + cm_session_timeout_minutes: 15 + cm_port: 8443 + cnm_http_port: 8080 + cnm_https_port: 9443 + bigstore_driver: speedb +``` + +## `info db` + +Shows the current configuration for databases. + +```sh +rladmin info db [ {db: | } ] +``` + +### Parameters + +| Parameter | Description | +|-----------|-------------| +| db:id | ID of the specified database (optional) | +| name | Name of the specified database (optional) | + +### Returns + +Returns the current configuration for all databases. + +If `db:` or `` is specified, returns the current configuration for the specified database. + +### Example + +``` sh +$ rladmin info db db:1 +db:1 [database1]: + client_buffer_limits: 1GB (hard limit)/512MB (soft limit) in 30 seconds + slave_buffer: auto + pubsub_buffer_limits: 32MB (hard limit)/8MB (soft limit) in 60 seconds + proxy_client_buffer_limits: 0KB (hard limit)/0KB (soft limit) in 0 seconds + proxy_slave_buffer_limits: 1GB (hard limit)/512MB (soft limit) in 60 seconds + proxy_pubsub_buffer_limits: 32MB (hard limit)/8MB (soft limit) in 60 seconds + repl_backlog: 1.02MB (1073741 bytes) + repl_timeout: 360 seconds + repl_diskless: default + master_persistence: disabled + maxclients: 10000 + conns: 5 + conns_type: per-thread + sched_policy: cmp + max_aof_file_size: 300GB + max_aof_load_time: 3600 seconds + dedicated_replicaof_threads: 5 + max_client_pipeline: 200 + max_shard_pipeline: 2000 + max_connections: 0 + oss_cluster: disabled + oss_cluster_api_preferred_ip_type: internal + gradual_src_mode: disabled + gradual_src_max_sources: 1 + gradual_sync_mode: auto + gradual_sync_max_shards_per_source: 1 + slave_ha: disabled (database) + mkms: enabled + oss_sharding: disabled + mtls_allow_weak_hashing: disabled + mtls_allow_outdated_certs: disabled + data_internode_encryption: disabled + proxy_policy: single + db_conns_auditing: disabled + syncer_mode: centralized +``` + +## `info node` + +Lists the current configuration for all nodes. + +```sh +rladmin info node [ ] +``` + +### Parameters + +| Parameter | Description | +|-----------|-------------| +| id | ID of the specified node | + +### Returns + +Returns the current configuration for all nodes. + +If `` is specified, returns the current configuration for the specified node. + +### Example + +``` sh +$ rladmin info node 3 +Command Output: node:3 + address: 198.51.100.17 + external addresses: N/A + recovery path: N/A + quorum only: disabled + max redis servers: 100 + max listeners: 100 +``` + +## `info proxy` + +Lists the current configuration for a proxy. + +``` sh +rladmin info proxy { | all } +``` + +### Parameters + +| Parameter | Description | +|-----------|-------------| +| id | ID of the specified proxy | +| all | Show the current configuration for all proxies (optional) | + +### Returns + +If no parameter is specified or the `all` option is specified, returns the current configuration for all proxies. + +If ``is specified, returns the current configuration for the specified proxy. + +### Example + +``` sh +$ rladmin info proxy +proxy:1 + mode: dynamic + scale_threshold: 80 (%) + scale_duration: 30 (seconds) + max_threads: 8 + threads: 3 +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/migrate.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/migrate.md new file mode 100644 index 0000000000..e6145f2888 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/migrate.md @@ -0,0 +1,273 @@ +--- +Title: rladmin migrate +alwaysopen: false +categories: +- docs +- operate +- rs +description: Moves Redis Enterprise Software shards or endpoints to a new node in + the same cluster. +headerRange: '[1-2]' +linkTitle: migrate +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/migrate/' +--- + +Moves Redis Enterprise shards or endpoints to a new node in the same cluster. + +For more information about shard migration use cases and considerations, see [Migrate database shards]({{}}). + +## `migrate all_master_shards` + +Moves all primary shards of a specified database or node to a new node in the same cluster. + +```sh +rladmin migrate { db { db: | } | node } + all_master_shards + target_node + [ override_policy ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-------------------------------|------------------------|---------------------------------------------------------------------------------| +| db | db:\
name | Limits migration to a specific database | +| node | integer | Limits migration to a specific origin node | +| target_node | integer | Migration target node | +| override_policy | | Overrides the rack aware policy and allows primary and replica shards on the same node | + +### Returns + +Returns `Done` if the migration completed successfully. Otherwise, returns an error. + +Use [`rladmin status shards`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-shards" >}}) to verify the migration completed. + +### Example + +```sh +$ rladmin status shards db db:6 sort ROLE +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS +db:6 tr02 redis:14 node:3 master 0-4095 3.01MB OK +db:6 tr02 redis:16 node:3 master 4096-8191 3.2MB OK +db:6 tr02 redis:18 node:3 master 8192-12287 3.2MB OK +db:6 tr02 redis:20 node:3 master 12288-16383 3.01MB OK +$ rladmin migrate db db:6 all_master_shards target_node 1 +Monitoring 8b0f28e2-4342-427a-a8e3-a68cba653ffe +queued - migrate_shards +running - migrate_shards +Executing migrate_redis with shards_uids ['18', '14', '20', '16'] +Ocompleted - migrate_shards +Done +$ rladmin status shards node 1 +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS +db:6 tr02 redis:14 node:1 master 0-4095 3.22MB OK +db:6 tr02 redis:16 node:1 master 4096-8191 3.22MB OK +db:6 tr02 redis:18 node:1 master 8192-12287 3.22MB OK +db:6 tr02 redis:20 node:1 master 12288-16383 2.99MB OK +``` +## `migrate all_shards` + +Moves all shards on a specified node to a new node in the same cluster. + +``` sh +rladmin migrate node + [ max_concurrent_bdb_migrations ] + all_shards + target_node + [ override_policy ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-------------------------------|------------------------|---------------------------------------------------------------------------------| +| node | integer | Limits migration to a specific origin node | +| max_concurrent_bdb_migrations | integer | Sets the maximum number of concurrent endpoint migrations | +| override_policy | | Overrides the rack aware policy and allows primary and replica shards on the same node | + +### Returns + +Returns `Done` if the migration completed successfully. Otherwise, returns an error. + +Use [`rladmin status shards`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-shards" >}}) to verify the migration completed. + +### Example + +```sh +$ rladmin status shards node 1 +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS +db:5 tr01 redis:12 node:1 master 0-16383 3.04MB OK +db:6 tr02 redis:15 node:1 slave 0-4095 2.93MB OK +db:6 tr02 redis:17 node:1 slave 4096-8191 2.93MB OK +db:6 tr02 redis:19 node:1 slave 8192-12287 3.08MB OK +db:6 tr02 redis:21 node:1 slave 12288-16383 3.08MB OK +$ rladmin migrate node 1 all_shards target_node 2 +Monitoring 71a4f371-9264-4398-a454-ce3ff4858c09 +queued - migrate_shards +.running - migrate_shards +Executing migrate_redis with shards_uids ['21', '15', '17', '19'] +OExecuting migrate_redis with shards_uids ['12'] +Ocompleted - migrate_shards +Done +$ rladmin status shards node 2 +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS +db:5 tr01 redis:12 node:2 master 0-16383 3.14MB OK +db:6 tr02 redis:15 node:2 slave 0-4095 2.96MB OK +db:6 tr02 redis:17 node:2 slave 4096-8191 2.96MB OK +db:6 tr02 redis:19 node:2 slave 8192-12287 2.96MB OK +db:6 tr02 redis:21 node:2 slave 12288-16383 2.96MB OK +``` + +## `migrate all_slave_shards` + +Moves all replica shards of a specified database or node to a new node in the same cluster. + +```sh +rladmin migrate { db { db: | } | node } + all_slave_shards + target_node + [ override_policy ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-------------------------------|------------------------|---------------------------------------------------------------------------------| +| db | db:\
name | Limits migration to a specific database | +| node | integer | Limits migration to a specific origin node | +| target_node | integer | Migration target node | +| override_policy | | Overrides the rack aware policy and allows primary and replica shards on the same node | + +### Returns + +Returns `Done` if the migration completed successfully. Otherwise, returns an error. + +Use [`rladmin status shards`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-shards" >}}) to verify the migration completed. + +### Example + +```sh +$ rladmin status shards db db:6 node 2 +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS +db:6 tr02 redis:15 node:2 slave 0-4095 3.06MB OK +db:6 tr02 redis:17 node:2 slave 4096-8191 3.06MB OK +db:6 tr02 redis:19 node:2 slave 8192-12287 3.06MB OK +db:6 tr02 redis:21 node:2 slave 12288-16383 3.06MB OK +$ rladmin migrate db db:6 all_slave_shards target_node 3 +Monitoring 5d36a98c-3dc8-435f-8ed9-35809ba017a4 +queued - migrate_shards +.running - migrate_shards +Executing migrate_redis with shards_uids ['15', '17', '21', '19'] +Ocompleted - migrate_shards +Done +$ rladmin status shards db db:6 node 3 +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS +db:6 tr02 redis:15 node:3 slave 0-4095 3.04MB OK +db:6 tr02 redis:17 node:3 slave 4096-8191 3.04MB OK +db:6 tr02 redis:19 node:3 slave 8192-12287 3.04MB OK +db:6 tr02 redis:21 node:3 slave 12288-16383 3.04MB OK +``` + +## `migrate endpoint_to_shards` + +Moves database endpoints to the node where the majority of primary shards are located. + +```sh +rladmin migrate [ db { db: | } ] + endpoint_to_shards + [ restrict_target_node ] + [ commit ] + [ max_concurrent_bdb_migrations ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-------------------------------|------------------------|---------------------------------------------------------------------------------| +| db | db:\
name | Limits migration to a specific database | +| restrict_target_node | integer | Moves the endpoint only if the target node matches the specified node | +| commit | | Performs endpoint movement | +| max_concurrent_bdb_migrations | integer | Sets the maximum number of concurrent endpoint migrations | + + +### Returns + +Returns a list of steps to perform the migration. If the `commit` flag is set, the steps will run and return `Finished successfully` if they were completed. Otherwise, returns an error. + +Use [`rladmin status endpoints`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-endpoints" >}}) to verify that the endpoints were moved. + +### Example + +```sh +$ rladmin status endpoints db db:6 +ENDPOINTS: +DB:ID NAME ID NODE ROLE SSL +db:6 tr02 endpoint:6:1 node:3 all-master-shards No +$ rladmin migrate db db:6 endpoint_to_shards +* Going to bind endpoint:6:1 to node 1 +Dry-run completed, add 'commit' argument to execute +$ rladmin migrate db db:6 endpoint_to_shards commit +* Going to bind endpoint:6:1 to node 1 +Executing bind endpoint:6:1: OOO. +Finished successfully +$ rladmin status endpoints db db:6 +ENDPOINTS: +DB:ID NAME ID NODE ROLE SSL +db:6 tr02 endpoint:6:1 node:1 all-master-shards No +``` + +## `migrate shard` + +Moves one or more shards to a new node in the same cluster. + +```sh +rladmin migrate shard + [ preserve_roles ] + target_node + [ override_policy ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-------------------------------|------------------------|---------------------------------------------------------------------------------| +| shard | list of shard IDs | Shards to migrate | +| preserve_roles | | Performs an additional failover to guarantee the primary shards' roles are preserved | +| target_node | integer | Migration target node | +| override_policy | | Overrides the rack aware policy and allows primary and replica shards on the same node | + +### Returns + +Returns `Done` if the migration completed successfully. Otherwise, returns an error. + +Use [`rladmin status shards`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-shards" >}}) to verify the migration completed. + +### Example + +```sh +$ rladmin status shards db db:5 +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS +db:5 tr01 redis:12 node:2 master 0-16383 3.01MB OK +db:5 tr01 redis:13 node:3 slave 0-16383 3.1MB OK +$ rladmin migrate shard 13 target_node 1 +Monitoring d2637eea-9504-4e94-a70c-76df087efcb2 +queued - migrate_shards +.running - migrate_shards +Executing migrate_redis with shards_uids ['13'] +Ocompleted - migrate_shards +Done +$ rladmin status shards db db:5 +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS +db:5 tr01 redis:12 node:2 master 0-16383 3.01MB OK +db:5 tr01 redis:13 node:1 slave 0-16383 3.04MB OK +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/node/_index.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/_index.md new file mode 100644 index 0000000000..2533e84227 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/_index.md @@ -0,0 +1,19 @@ +--- +Title: rladmin node +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manage nodes. +headerRange: '[1-2]' +hideListLinks: true +linkTitle: node +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/node/' +--- + +`rladmin node` commands manage nodes in the cluster. + +{{}} diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/node/addr.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/addr.md new file mode 100644 index 0000000000..b5eaaeda5a --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/addr.md @@ -0,0 +1,52 @@ +--- +Title: rladmin node addr set +alwaysopen: false +categories: +- docs +- operate +- rs +description: Sets a node's internal IP address. +headerRange: '[1-2]' +linkTitle: addr +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/node/addr/' +--- + +Sets the internal IP address of a node. You can only set the internal IP address when the node is down. See [Change internal IP address]({{< relref "/operate/rs/networking/multi-ip-ipv6#change-internal-ip-address" >}}) for detailed instructions. + +```sh +rladmin node addr set +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|--------------------------------|-----------------------------------------------------------------------------------------------| +| node | integer | Sets the internal IP address of the specified node | +| addr | IP address | Sets the node's internal IP address to the specified IP address | + +### Returns + +Returns `Updated successfully` if the IP address was set. Otherwise, it returns an error. + +Use [`rladmin status nodes`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-nodes" >}}) to verify the internal IP address was changed. + +### Example + +```sh +$ rladmin status nodes +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS +*node:1 master 192.0.2.2 3d99db1fdf4b 5/100 6 16.06GB/19.54GB 12.46GB/16.02GB 6.2.12-37 OK +node:2 slave 192.0.2.3 fc7a3d332458 0/100 6 -/19.54GB -/16.02GB 6.2.12-37 DOWN, last seen 33s ago +node:3 slave 192.0.2.4 b87cc06c830f 5/120 6 16.06GB/19.54GB 12.46GB/16.02GB 6.2.12-37 OK +$ rladmin node 2 addr set 192.0.2.5 +Updated successfully. +$ rladmin status nodes +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS +*node:1 master 192.0.2.2 3d99db1fdf4b 5/100 6 14.78GB/19.54GB 11.18GB/16.02GB 6.2.12-37 OK +node:2 slave 192.0.2.5 fc7a3d332458 0/100 6 14.78GB/19.54GB 11.26GB/16.02GB 6.2.12-37 OK +node:3 slave 192.0.2.4 b87cc06c830f 5/120 6 14.78GB/19.54GB 11.18GB/16.02GB 6.2.12-37 OK +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/node/enslave.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/enslave.md new file mode 100644 index 0000000000..e31a22c2e3 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/enslave.md @@ -0,0 +1,160 @@ +--- +Title: rladmin node enslave +alwaysopen: false +categories: +- docs +- operate +- rs +description: Changes a node's resources to replicas. +headerRange: '[1-2]' +linkTitle: enslave +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/node/enslave/' +--- + +Changes the resources of a node to replicas. + +## `node enslave` + +Changes all of the node's endpoints and shards to replicas. + +``` sh +rladmin node enslave + [demote_node] + [retry_timeout_seconds ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------------------|--------------------------------|-------------------------------------------------------------------------------------------| +| node | integer | Changes all of the node's endpoints and shards to replicas | +| demote_node | | If the node is a primary node, changes the node to replica | +| retry_timeout_seconds | integer | Retries on failure until the specified number of seconds has passed. | + +### Returns + +Returns `OK` if the roles were successfully changed. Otherwise, it returns an error. + +Use [`rladmin status shards`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-shards" >}}) to verify that the roles were changed. + +### Example + +```sh +$ rladmin status shards node 2 +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS +db:6 tr02 redis:14 node:2 master 0-4095 3.2MB OK +db:6 tr02 redis:16 node:2 master 4096-8191 3.12MB OK +db:6 tr02 redis:18 node:2 master 8192-12287 3.16MB OK +db:6 tr02 redis:20 node:2 master 12288-16383 3.12MB OK +$ rladmin status nodes +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS +*node:1 slave 192.0.2.12 198.51.100.1 3d99db1fdf4b 1/100 6 14.43GB/19.54GB 10.87GB/16.02GB 6.2.12-37 OK +node:2 master 192.0.2.13 198.51.100.2 fc7a3d332458 4/100 6 14.43GB/19.54GB 10.88GB/16.02GB 6.2.12-37 OK +node:3 slave 192.0.2.14 b87cc06c830f 5/120 6 14.43GB/19.54GB 10.83GB/16.02GB 6.2.12-37 OK +$ rladmin node 2 enslave demote_node +Performing enslave_node action on node:2: 100% +OK +$ rladmin status nodes +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS +*node:1 master 192.0.2.12 198.51.100.1 3d99db1fdf4b 1/100 6 14.72GB/19.54GB 10.91GB/16.02GB 6.2.12-37 OK +node:2 slave 192.0.2.13 198.51.100.2 fc7a3d332458 4/100 6 14.72GB/19.54GB 11.17GB/16.02GB 6.2.12-37 OK +node:3 slave 192.0.2.14 b87cc06c830f 5/120 6 14.72GB/19.54GB 10.92GB/16.02GB 6.2.12-37 OK +$ rladmin status shards node 2 +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS +db:6 tr02 redis:14 node:2 slave 0-4095 2.99MB OK +db:6 tr02 redis:16 node:2 slave 4096-8191 3.01MB OK +db:6 tr02 redis:18 node:2 slave 8192-12287 2.93MB OK +db:6 tr02 redis:20 node:2 slave 12288-16383 3.06MB OK +``` + +## `node enslave endpoints_only` + +Changes the role for all endpoints on a node to replica. + +``` sh +rladmin node enslave endpoints_only + [retry_timeout_seconds ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------------------|--------------------------------|-------------------------------------------------------------------------------------------| +| node | integer | Changes all of the node's endpoints to replicas | +| retry_timeout_seconds | integer | Retries on failure until the specified number of seconds has passed. | + +### Returns + +Returns `OK` if the roles were successfully changed. Otherwise, it returns an error. + +Use [`rladmin status endpoints`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-endpoints" >}}) to verify that the roles were changed. + +### Example + +```sh +$ rladmin status endpoints +ENDPOINTS: +DB:ID NAME ID NODE ROLE SSL +db:5 tr01 endpoint:5:1 node:1 single No +db:6 tr02 endpoint:6:1 node:3 all-master-shards No +$ rladmin node 1 enslave endpoints_only +Performing enslave_node action on node:1: 100% +OK +$ rladmin status endpoints +ENDPOINTS: +DB:ID NAME ID NODE ROLE SSL +db:5 tr01 endpoint:5:1 node:3 single No +db:6 tr02 endpoint:6:1 node:3 all-master-shards No +``` + +## `node enslave shards_only` + +Changes the role for all shards of a node to replica. + +``` sh +rladmin node enslave shards_only + [retry_timeout_seconds ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------------------|--------------------------------|-------------------------------------------------------------------------------------------| +| node | integer | Changes all of the node's shards to replicas | +| retry_timeout_seconds | integer | Retries on failure until the specified number of seconds has passed. | + +### Returns + +Returns `OK` if the roles were successfully changed. Otherwise, it returns an error. + +Use [`rladmin status shards`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-shards" >}}) to verify that the roles were changed. + +### Example + +```sh +$ rladmin status shards node 3 +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS +db:5 tr01 redis:12 node:3 master 0-16383 3.04MB OK +db:6 tr02 redis:15 node:3 master 0-4095 4.13MB OK +db:6 tr02 redis:17 node:3 master 4096-8191 4.13MB OK +db:6 tr02 redis:19 node:3 master 8192-12287 4.13MB OK +db:6 tr02 redis:21 node:3 master 12288-16383 4.13MB OK +$ rladmin node 3 enslave shards_only +Performing enslave_node action on node:3: 100% +OK +$ rladmin status shards node 3 +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS +db:5 tr01 redis:12 node:3 slave 0-16383 2.98MB OK +db:6 tr02 redis:15 node:3 slave 0-4095 4.23MB OK +db:6 tr02 redis:17 node:3 slave 4096-8191 4.11MB OK +db:6 tr02 redis:19 node:3 slave 8192-12287 4.19MB OK +db:6 tr02 redis:21 node:3 slave 12288-16383 4.27MB OK +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/node/external-addr.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/external-addr.md new file mode 100644 index 0000000000..8acea85acc --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/external-addr.md @@ -0,0 +1,126 @@ +--- +Title: rladmin node external_addr +alwaysopen: false +categories: +- docs +- operate +- rs +description: Configures a node's external IP addresses. +headerRange: '[1-2]' +linkTitle: external_addr +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/node/external-addr/' +--- + +Configures a node's external IP addresses. + +## `node external_addr add` + +Adds an external IP address that accepts inbound user connections for the node. + +```sh +rladmin node external_addr + add +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|--------------------------------|-----------------------------------------------------------------------------------------------| +| node | integer | Adds an external IP address for the specified node | +| IP address | IP address | External IP address of the node | + +### Returns + +Returns `Updated successfully` if the IP address was added. Otherwise, it returns an error. + +Use [`rladmin status nodes`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-nodes" >}}) to verify the external IP address was added. + +### Example + +``` sh +$ rladmin node 1 external_addr add 198.51.100.1 +Updated successfully. +$ rladmin status nodes +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS +*node:1 master 192.0.2.2 198.51.100.1 3d99db1fdf4b 5/100 6 14.75GB/19.54GB 11.15GB/16.02GB 6.2.12-37 OK +node:2 slave 192.0.2.3 fc7a3d332458 0/100 6 14.75GB/19.54GB 11.24GB/16.02GB 6.2.12-37 OK +node:3 slave 192.0.2.4 b87cc06c830f 5/120 6 14.75GB/19.54GB 11.15GB/16.02GB 6.2.12-37 OK +``` + +## `node external_addr set` + +Sets one or more external IP addresses that accepts inbound user connections for the node. + +```sh +rladmin node external_addr + set ... +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|--------------------------------|-----------------------------------------------------------------------------------------------| +| node | integer | Sets external IP addresses for the specified node | +| IP address | list of IP addresses | Sets specified IP addresses as external addresses | + +### Returns + +Returns `Updated successfully` if the IP addresses were set. Otherwise, it returns an error. + +Use [`rladmin status nodes`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-nodes" >}}) to verify the external IP address was set. + +### Example + +``` sh +$ rladmin node 2 external_addr set 198.51.100.2 198.51.100.3 +Updated successfully. +$ rladmin status nodes +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS +*node:1 master 192.0.2.2 198.51.100.1 3d99db1fdf4b 5/100 6 14.75GB/19.54GB 11.15GB/16.02GB 6.2.12-37 OK +node:2 slave 192.0.2.3 198.51.100.2,198.51.100.3 fc7a3d332458 0/100 6 14.75GB/19.54GB 11.23GB/16.02GB 6.2.12-37 OK +node:3 slave 192.0.2.4 b87cc06c830f 5/120 6 14.75GB/19.54GB 11.15GB/16.02GB 6.2.12-37 OK +``` +## `node external_addr remove` + +Removes the specified external IP address from the node. + +```sh +rladmin node external_addr + remove +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|--------------------------------|-----------------------------------------------------------------------------------------------| +| node | integer | Removes an external IP address for the specified node | +| IP address | IP address | Removes the specified IP address of the node | + +### Returns + +Returns `Updated successfully` if the IP address was removed. Otherwise, it returns an error. + +Use [`rladmin status nodes`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-nodes" >}}) to verify the external IP address was removed. + +### Example + +``` sh +$ rladmin status nodes +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS +*node:1 master 192.0.2.2 198.51.100.1 3d99db1fdf4b 5/100 6 14.75GB/19.54GB 11.15GB/16.02GB 6.2.12-37 OK +node:2 slave 192.0.2.3 198.51.100.2,198.51.100.3 fc7a3d332458 0/100 6 14.75GB/19.54GB 11.23GB/16.02GB 6.2.12-37 OK +node:3 slave 192.0.2.4 b87cc06c830f 5/120 6 14.75GB/19.54GB 11.15GB/16.02GB 6.2.12-37 OK +$ rladmin node 2 external_addr remove 198.51.100.3 +Updated successfully. +$ rladmin status nodes +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS +*node:1 master 192.0.2.2 198.51.100.1 3d99db1fdf4b 5/100 6 14.74GB/19.54GB 11.14GB/16.02GB 6.2.12-37 OK +node:2 slave 192.0.2.3 198.51.100.2 fc7a3d332458 0/100 6 14.74GB/19.54GB 11.22GB/16.02GB 6.2.12-37 OK +node:3 slave 192.0.2.4 b87cc06c830f 5/120 6 14.74GB/19.54GB 11.14GB/16.02GB 6.2.12-37 OK +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/node/maintenance-mode.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/maintenance-mode.md new file mode 100644 index 0000000000..adc4094ced --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/maintenance-mode.md @@ -0,0 +1,150 @@ +--- +Title: rladmin node maintenance_mode +alwaysopen: false +categories: +- docs +- operate +- rs +description: Turns quorum-only mode on or off for a node. +headerRange: '[1-2]' +linkTitle: maintenance_mode +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/node/maintenance-mode/' +--- + +Configures [quorum-only mode]({{< relref "/operate/rs/clusters/maintenance-mode#activate-maintenance-mode" >}}) on a node. + +## `node maintenance_mode on` + +Migrates shards out of the node and turns the node into a quorum node to prevent shards from returning to it. + +```sh +rladmin node maintenance_mode on + [ keep_slave_shards ] + [ evict_ha_replica { enabled | disabled } ] + [ evict_active_active_replica { enabled | disabled } ] + [ evict_dbs ] + [ demote_node ] + [ overwrite_snapshot ] + [ max_concurrent_actions ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------------------|--------------------------------|-------------------------------------------------------------------------------------------| +| node | integer | Turns the specified node into a quorum node | +| demote_node | | If the node is a primary node, changes the node to replica | +| evict_ha_replica | `enabled`
`disabled` | Migrates the HA replica shards in the node | +| evict_active_active_replica | `enabled`
`disabled` | Migrates the Active-Active replica shards in the node | +| evict_dbs | list of database names or IDs | Specify databases whose shards should be evicted from the node when entering maintenance mode.

Examples:
`$ rladmin node 1 maintenance_mode on evict_dbs db:1 db:2`
`$ rladmin node 1 maintenance_mode on evict_dbs db_name1 db_name2` | +| keep_slave_shards | | Keeps replica shards in the node and demotes primary shards to replicas.

Deprecated as of Redis Enterprise Software 7.4.2. Use `evict_ha_replica disabled evict_active_active_replica disabled` instead. | +| max_concurrent_actions | integer | Maximum number of concurrent actions during node maintenance | +| overwrite_snapshot | | Overwrites the latest existing node snapshot taken when enabling maintenance mode | + +### Returns + +Returns `OK` if the node was converted successfully. If the cluster does not have enough resources to migrate the shards, the process returns a warning. + +Use [`rladmin status nodes`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-nodes" >}}) to verify the node became a quorum node. + +### Example + +```sh +$ rladmin node 2 maintenance_mode on overwrite_snapshot +Found snapshot from 2024-01-06T11:36:47Z, overwriting the snapshot +Performing maintenance_on action on node:2: 0% +created snapshot NodeSnapshot + +node:2 will not accept any more shards +Performing maintenance_on action on node:2: 100% +OK +$ rladmin status nodes +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS +*node:1 master 192.0.2.12 198.51.100.1 3d99db1fdf4b 5/100 6 14.21GB/19.54GB 10.62GB/16.02GB 6.2.12-37 OK +node:2 slave 192.0.2.13 198.51.100.2 fc7a3d332458 0/0 6 14.21GB/19.54GB 0KB/0KB 6.2.12-37 OK +node:4 slave 192.0.2.14 6d754fe12cb9 5/100 6 14.21GB/19.54GB 10.62GB/16.02GB 6.2.12-37 OK +``` + +## `node maintenance_mode off` + +Turns maintenance mode off and returns the node to its previous state. + +```sh +rladmin node maintenance_mode off + [ { snapshot_name | skip_shards_restore } ] + [ max_concurrent_actions ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------------------|--------------------------------|-------------------------------------------------------------------------------------------| +| node | integer | Restores the node back to the previous state | +| max_concurrent_actions | integer | Maximum number of concurrent actions during node maintenance | +| skip_shards_restore | | Does not restore shards back to the node | +| snapshot_name | string | Restores the node back to a state stored in the specified snapshot | + +### Returns + +Returns `OK` if the node was restored successfully. + +Use [`rladmin status nodes`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-nodes" >}}) to verify the node was restored. + +### Example + +```sh +$ rladmin node 2 maintenance_mode off +Performing maintenance_off action on node:2: 0% +Found snapshot: NodeSnapshot +Performing maintenance_off action on node:2: 0% +migrate redis:12 to node:2: executing +Performing maintenance_off action on node:2: 0% +migrate redis:12 to node:2: finished +Performing maintenance_off action on node:2: 0% +migrate redis:17 to node:2: executing + +migrate redis:15 to node:2: executing +Performing maintenance_off action on node:2: 0% +migrate redis:17 to node:2: finished + +migrate redis:15 to node:2: finished +Performing maintenance_off action on node:2: 0% +failover redis:16: executing + +failover redis:14: executing +Performing maintenance_off action on node:2: 0% +failover redis:16: finished + +failover redis:14: finished +Performing maintenance_off action on node:2: 0% +failover redis:18: executing +Performing maintenance_off action on node:2: 0% +failover redis:18: finished + +migrate redis:21 to node:2: executing + +migrate redis:19 to node:2: executing +Performing maintenance_off action on node:2: 0% +migrate redis:21 to node:2: finished + +migrate redis:19 to node:2: finished + +failover redis:20: executing +Performing maintenance_off action on node:2: 0% +failover redis:20: finished +Performing maintenance_off action on node:2: 0% +rebind endpoint:6:1: executing +Performing maintenance_off action on node:2: 0% +rebind endpoint:6:1: finished +Performing maintenance_off action on node:2: 100% +OK +$ rladmin status nodes +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS +*node:1 master 192.0.2.12 198.51.100.1 3d99db1fdf4b 5/100 6 14.2GB/19.54GB 10.61GB/16.02GB 6.2.12-37 OK +node:2 slave 192.0.2.13 198.51.100.2 fc7a3d332458 5/100 6 14.2GB/19.54GB 10.61GB/16.02GB 6.2.12-37 OK +node:4 slave 192.0.2.14 6d754fe12cb9 0/100 6 14.2GB/19.54GB 10.69GB/16.02GB 6.2.12-37 OK +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/node/recovery-path.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/recovery-path.md new file mode 100644 index 0000000000..67e4cc7c73 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/recovery-path.md @@ -0,0 +1,38 @@ +--- +Title: rladmin node recovery_path set +alwaysopen: false +categories: +- docs +- operate +- rs +description: Sets a node's local recovery path. +headerRange: '[1-2]' +linkTitle: recovery_path +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/node/recovery-path/' +--- + +Sets the node's local recovery path, which specifies the directory where [persistence files]({{< relref "/operate/rs/databases/configure/database-persistence" >}}) are stored. You can use these persistence files to [recover a failed database]({{< relref "/operate/rs/databases/recover" >}}). + +```sh +rladmin node recovery_path set +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|--------------------------------|-----------------------------------------------------------------------------------------------| +| node | integer | Sets the recovery path for the specified node | +| path | filepath | Path to the folder where persistence files are stored | + +### Returns + +Returns `Updated successfully` if the recovery path was set. Otherwise, it returns an error. + +### Example + +```sh +$ rladmin node 2 recovery_path set /var/opt/redislabs/persist/redis +Updated successfully. +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/node/remove.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/remove.md new file mode 100644 index 0000000000..415918f64b --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/remove.md @@ -0,0 +1,51 @@ +--- +Title: rladmin node remove +alwaysopen: false +categories: +- docs +- operate +- rs +description: Removes a node from the cluster. +headerRange: '[1-2]' +linkTitle: remove +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/node/remove/' +--- + +Removes the specified node from the cluster. + +```sh +rladmin node remove [ wait_for_persistence { enabled | disabled } ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------------------|--------------------------------|-------------------------------------------------------------| +| node | integer | The node to remove from the cluster | +| wait_for_persistence | `enabled`
`disabled` | Ensures persistence files are available for recovery. The cluster policy `persistent_node_removal` determines the default value. | + +### Returns + +Returns `OK` if the node was removed successfully. Otherwise, it returns an error. + +Use [`rladmin status nodes`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-nodes" >}}) to verify that the node was removed. + +### Example + +```sh +$ rladmin status nodes +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS +*node:1 master 192.0.2.12 198.51.100.1 3d99db1fdf4b 5/100 6 14.26GB/19.54GB 10.67GB/16.02GB 6.2.12-37 OK +node:2 slave 192.0.2.13 198.51.100.2 fc7a3d332458 4/100 6 14.26GB/19.54GB 10.71GB/16.02GB 6.2.12-37 OK +node:3 slave 192.0.2.14 b87cc06c830f 1/120 6 14.26GB/19.54GB 10.7GB/16.02GB 6.2.12-37 OK +$ rladmin node 3 remove +Performing remove action on node:3: 100% +OK +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS +*node:1 master 192.0.2.12 198.51.100.1 3d99db1fdf4b 5/100 6 14.34GB/19.54GB 10.74GB/16.02GB 6.2.12-37 OK +node:2 slave 192.0.2.13 198.51.100.2 fc7a3d332458 5/100 6 14.34GB/19.54GB 10.74GB/16.02GB 6.2.12-37 OK +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/node/snapshot.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/snapshot.md new file mode 100644 index 0000000000..e7c5a20dc7 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/node/snapshot.md @@ -0,0 +1,160 @@ +--- +Title: rladmin node snapshot +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manages snapshots of the configuration of a node's shards and endpoints. +headerRange: '[1-2]' +linkTitle: snapshot +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/node/snapshot/' +--- + +Manages snapshots of the configuration of a node's shards and endpoints. + +You can create node snapshots and use them to restore the node's shards and endpoints to a configuration from a previous point in time. If you restore a node from a snapshot (for example, after an event such as failover or maintenance), the node's shards have the same placement and roles as when the snapshot was created. + +## `node snapshot create` + +Creates a snapshot of a node's current configuration, including the placement of shards and endpoints on the node and the shards' roles. + +```sh +rladmin node snapshot create +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------------------|--------------------------------|-------------------------------------------------------------------------------------------| +| node | integer | Creates a snapshot of the specified node | +| name | string | Name of the created snapshot | + +### Returns + +Returns `Done` if the snapshot was created successfully. Otherwise, returns an error. + +### Example + +```sh +$ rladmin node 1 snapshot create snap1 +Creating node snapshot 'snap1' for node:1 +Done. +``` + +## `node snapshot delete` + +Deletes an existing snapshot of a node. + +```sh +rladmin node snapshot delete +``` + +{{}} +You cannot use this command to delete a snapshot created by maintenance mode. As of Redis Enterprise Software version 7.4.2, only the latest maintenance mode snapshot is kept. +{{}} + +### Parameters + +| Parameter | Type/Value | Description | +|-----------------------|--------------------------------|-------------------------------------------------------------------------------------------| +| node | integer | Deletes a snapshot of the specified node | +| name | string | Deletes the specified snapshot | + +### Returns + +Returns `Done` if the snapshot was deleted successfully. Otherwise, returns an error. + +### Example + +```sh +$ rladmin node 1 snapshot delete snap1 +Deleting node snapshot 'snap1' for node:1 +Done. +``` + +## `node snapshot list` + +Displays a list of created snapshots for the specified node. + +``` sh +rladmin node snapshot list +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------------------|--------------------------------|-------------------------------------------------------------------------------------------| +| node | integer | Displays snapshots of the specified node | + +### Returns + +Returns a list of snapshots of the specified node. + +### Example + +```sh +$ rladmin node 2 snapshot list +Name Node Time +snap2 2 2022-05-12T19:27:51Z +``` + +## `node snapshot restore` + +Restores a node's shards and endpoints as close to the stored snapshot as possible. + +```sh +rladmin node snapshot restore +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------------------|--------------------------------|-------------------------------------------------------------------------------------------| +| node | integer | Restore the specified node from a snapshot. | +| restore | string | Name of the snapshot used to restore the node. | + +### Returns + +Returns `Snapshot restore completed successfully` if the actions needed to restore the snapshot completed successfully. Otherwise, it returns an error. + +### Example + +```sh +$ rladmin node 2 snapshot restore snap2 +Reading node snapshot 'snap2' for node:2 +Planning restore +Planned actions: +* migrate redis:15 to node:2 +* failover redis:14 +* migrate redis:17 to node:2 +* failover redis:16 +* migrate redis:19 to node:2 +* failover redis:18 +* migrate redis:21 to node:2 +* failover redis:20 +Proceed?[Y]es/[N]o? Y +2022-05-12T19:43:31.486613 Scheduling 8 actions +[2022-05-12T19:43:31.521422 Actions Status: 8 waiting ] +* [migrate redis:21 to node:2] waiting => executing +* [migrate redis:19 to node:2] waiting => executing +* [migrate redis:17 to node:2] waiting => executing +* [migrate redis:15 to node:2] waiting => executing +[2022-05-12T19:43:32.586084 Actions Status: 4 executing | 4 waiting ] +* [migrate redis:21 to node:2] executing => finished +* [migrate redis:19 to node:2] executing => finished +* [migrate redis:17 to node:2] executing => finished +* [migrate redis:15 to node:2] executing => finished +* [failover redis:20] waiting => executing +* [failover redis:18] waiting => executing +* [failover redis:16] waiting => executing +* [failover redis:14] waiting => executing +[2022-05-12T19:43:33.719496 Actions Status: 4 finished | 4 executing ] +* [failover redis:20] executing => finished +* [failover redis:18] executing => finished +* [failover redis:16] executing => finished +* [failover redis:14] executing => finished +Snapshot restore completed successfully. +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/placement.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/placement.md new file mode 100644 index 0000000000..6db0a78099 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/placement.md @@ -0,0 +1,51 @@ +--- +Title: rladmin placement +alwaysopen: false +categories: +- docs +- operate +- rs +description: Configures the shard placement policy for a database. +headerRange: '[1-2]' +linkTitle: placement +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/placement/' +--- + +Configures the shard placement policy for a specified database. + +``` sh +rladmin placement + db { db: | } + { dense | sparse } +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|--------------------------------|-----------------------------------------------------------------------------------------------| +| db | db:\
name | Configures shard placement for the specified database | +| dense | | Places new shards on the same node as long as it has resources | +| sparse | | Places new shards on the maximum number of available nodes within the cluster | + +### Returns + +Returns the new shard placement policy if the policy was changed successfully. Otherwise, it returns an error. + +Use [`rladmin status databases`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-databases" >}}) to verify that the failover completed. + +### Example + +``` sh +$ rladmin status databases +DATABASES: +DB:ID NAME TYPE STATUS SHARDS PLACEMENT REPLICATION PERSISTENCE ENDPOINT +db:5 tr01 redis active 1 dense enabled aof redis-12000.cluster.local:12000 +$ rladmin placement db db:5 sparse +Shards placement policy is now sparse +$ rladmin status databases +DATABASES: +DB:ID NAME TYPE STATUS SHARDS PLACEMENT REPLICATION PERSISTENCE ENDPOINT +db:5 tr01 redis active 1 sparse enabled aof redis-12000.cluster.local:12000 +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/recover.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/recover.md new file mode 100644 index 0000000000..72c4c79828 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/recover.md @@ -0,0 +1,135 @@ +--- +Title: rladmin recover +alwaysopen: false +categories: +- docs +- operate +- rs +description: Recovers databases in recovery mode. +headerRange: '[1-2]' +linkTitle: recover +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/recover/' +--- + +Recovers databases in recovery mode after events such as cluster failure, and restores the databases' configurations and data from stored persistence files. See [Recover a failed database]({{< relref "/operate/rs/databases/recover" >}}) for detailed instructions. + +Database persistence files are stored in `/var/opt/redislabs/persist/redis/` by default, but you can specify a different directory to use for database recovery with [`rladmin node recovery_path set `]({{< relref "/operate/rs/references/cli-utilities/rladmin/node/recovery-path" >}}). + +## `recover all` + +Recovers all databases in recovery mode. + +```sh +rladmin recover all + [ only_configuration ] +``` + +### Parameters + +| Parameters | Type/Value | Description | +|--------------------|------------|---------------------------------------------| +| only_configuration | | Recover database configuration without data | + +### Returns + +Returns `Completed successfully` if the database was recovered. Otherwise, returns an error. + +### Example + +``` +$ rladmin recover all + 0% [ 0 recovered | 0 failed ] | | Elapsed Time: 0:00:00[first-db (db:1) recovery] Initiated.[second-db (db:2) recovery] Initiated. + 50% [ 0 recovered | 0 failed ] |### | Elapsed Time: 0:00:04[first-db (db:1) recovery] Completed successfully + 75% [ 1 recovered | 0 failed ] |###### | Elapsed Time: 0:00:06[second-db (db:2) recovery] Completed successfully +100% [ 2 recovered | 0 failed ] |#########| Elapsed Time: 0:00:08 +``` + +## `recover db` + +Recovers a specific database in recovery mode. + +```sh +rladmin recover db { db: | } + [ only_configuration ] +``` + +### Parameters + +| Parameters | Type/Value | Description | +|--------------------|----------------------|---------------------------------------------| +| db | db:\
name | Database to recover | +| only_configuration | | Recover database configuration without data | + +### Returns + +Returns `Completed successfully` if the database was recovered. Otherwise, returns an error. + +### Example + +``` +$ rladmin recover db db:1 + 0% [ 0 recovered | 0 failed ] | | Elapsed Time: 0:00:00[demo-db (db:1) recovery] Initiated. + 50% [ 0 recovered | 0 failed ] |### | Elapsed Time: 0:00:00[demo-db (db:1) recovery] Completed successfully +100% [ 1 recovered | 0 failed ] |######| Elapsed Time: 0:00:02 +``` + +## `recover list` + +Shows a list of all databases that are currently in recovery mode. + +```sh +rladmin recover list +``` + +### Parameters + +None + +### Returns + +Displays a list of all recoverable databases. If no databases are in recovery mode, returns `No recoverable databases found`. + +### Example + +```sh +$ rladmin recover list +DATABASES IN RECOVERY STATE: +DB:ID NAME TYPE SHARDS REPLICATION PERSISTENCE STATUS +db:5 tr01 redis 1 enabled aof missing-files +db:6 tr02 redis 4 enabled snapshot ready +``` + +## `recover s3_import` + +Imports current database snapshot files from an AWS S3 bucket to a directory on the node. + +```sh +rladmin recover s3_import + s3_bucket + [ s3_prefix ] + s3_access_key_id + s3_secret_access_key + import_path +``` + +### Parameters + +| Parameters | Type/Value | Description | +|----------------------|------------|------------------------------------------------------------------| +| s3_bucket | string | S3 bucket name | +| s3_prefix | string | S3 object prefix | +| s3_access_key_id | string | S3 access key ID | +| s3_secret_access_key | string | S3 secret access key | +| import_path | filepath | Local import path where all database snapshots will be imported | + +### Returns + +Returns `Completed successfully` if the database files were imported. Otherwise, returns an error. + +### Example + +```sh +rladmin recover s3_import s3_bucket s3_prefix / s3_access_key_id s3_secret_access_key import_path /tmp +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/restart.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/restart.md new file mode 100644 index 0000000000..9f038a0e83 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/restart.md @@ -0,0 +1,51 @@ +--- +Title: rladmin restart +alwaysopen: false +categories: +- docs +- operate +- rs +description: Restarts Redis Enterprise Software processes for a specific database. +headerRange: '[1-2]' +linkTitle: restart +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/restart/' +--- + +Schedules a restart of the Redis Enterprise Software processes on primary and replica instances of a specific database. + +``` sh +rladmin restart db { db: | } + [preserve_roles] + [discard_data] + [force_discard] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|----------------|--------------------------------|-----------------------------------------------------------------------| +| db | db:\
name | Restarts Redis Enterprise Software processes for the specified database | +| discard_data | | Allows discarding data if there is no persistence or replication | +| force_discard | | Forcibly discards data even if there is persistence or replication | +| preserve_roles | | Performs an additional failover to maintain shard roles | + +### Returns + +Returns `Done` if the restart completed successfully. Otherwise, it returns an error. + +### Example + +``` sh +$ rladmin restart db db:5 preserve_roles +Monitoring 1db07491-35da-4bb6-9bc1-56949f4c312a +active - SMUpgradeBDB init +active - SMUpgradeBDB stop_forwarding +active - SMUpgradeBDB stop_active_expire +active - SMUpgradeBDB check_slave +oactive - SMUpgradeBDB stop_active_expire +active - SMUpgradeBDB second_failover +completed - SMUpgradeBDB +Done +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/status.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/status.md new file mode 100644 index 0000000000..70fed602c6 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/status.md @@ -0,0 +1,338 @@ +--- +Title: rladmin status +alwaysopen: false +categories: +- docs +- operate +- rs +description: Displays the current cluster status and topology information. +headerRange: '[1-2]' +linkTitle: status +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/status/' +--- + +Displays the current cluster status and topology information. + +## `status` + +Displays the current status of all nodes, databases, database endpoints, and shards on the cluster. + +``` sh +rladmin status + [ extra ] + [ issues_only] +``` + +### Parameters + +| Parameter | Description | +|-----------|-------------| +| extra \ | Extra options that show more information | +| issues_only | Filters out all items that have an `OK` status | + +| Extra parameter | Description | +|-------------------|-------------| +| extra all | Shows all `extra` information | +| extra backups | Shows periodic backup status | +| extra frag | Shows fragmented memory available after the restart | +| extra nodestats | Shows shards per node | +| extra rack_id | Shows `rack_id` if customer is not `rack_aware` | +| extra redis_version | Shows Redis version of all databases in the cluster | +| extra state_machine | Shows execution of state machine information | +| extra watchdog | Shows watchdog status | + +### Returns + +Returns tables of the status of all nodes, databases, and database endpoints on the cluster. + +If `issues_only` is specified, it only shows instances that do not have an `OK` status. + +### Example + +``` sh +$ rladmin status extra all +CLUSTER: +OK. Cluster master: 1 (198.51.100.2) +Cluster health: OK, [1, 0.13333333333333333, 0.03333333333333333] +failures/minute - avg1 1.00, avg15 0.13, avg60 0.03. + +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME MASTERS SLAVES OVERBOOKING_DEPTH SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION SHA RACK-ID STATUS +node:1 master 198.51.100.2 3d99db1fdf4b 4 0 10.91GB 4/100 6 14.91GB/19.54GB 10.91GB/16.02GB 6.2.12-37 5c2106 - OK +node:2 slave 198.51.100.3 fc7a3d332458 0 0 11.4GB 0/100 6 14.91GB/19.54GB 11.4GB/16.02GB 6.2.12-37 5c2106 - OK +*node:3 slave 198.51.100.4 b87cc06c830f 0 0 11.4GB 0/100 6 14.91GB/19.54GB 11.4GB/16.02GB 6.2.12-37 5c2106 - OK + +DATABASES: +DB:ID NAME TYPE STATUS SHARDS PLACEMENT REPLICATION PERSISTENCE ENDPOINT EXEC_STATE EXEC_STATE_MACHINE BACKUP_PROGRESS MISSING_BACKUP_TIME REDIS_VERSION +db:3 database3 redis active 4 dense disabled disabled redis-11103.cluster.local:11103 N/A N/A N/A N/A 6.0.16 + +ENDPOINTS: +DB:ID NAME ID NODE ROLE SSL WATCHDOG_STATUS +db:3 database3 endpoint:3:1 node:1 single No OK + +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY BACKUP_PROGRESS RAM_FRAG WATCHDOG_STATUS STATUS +db:3 database3 redis:4 node:1 master 0-4095 2.08MB N/A 4.73MB OK OK +db:3 database3 redis:5 node:1 master 4096-8191 2.08MB N/A 4.62MB OK OK +db:3 database3 redis:6 node:1 master 8192-12287 2.08MB N/A 4.59MB OK OK +db:3 database3 redis:7 node:1 master 12288-16383 2.08MB N/A 4.66MB OK OK +``` + +## `status databases` + +Displays the current status of all databases on the cluster. + +``` sh +rladmin status databases + [ extra ] + [ sort ] + [ issues_only ] +``` + +### Parameters + +| Parameter | Description | +|-----------|-------------| +| extra \ | Extra options that show more information | +| sort \ | Sort results by specified column titles | +| issues_only | Filters out all items that have an `OK` status | + + +| Extra parameter | Description | +|-------------------|-------------| +| extra all | Shows all `extra` information | +| extra backups | Shows periodic backup status | +| extra frag | Shows fragmented memory available after the restart | +| extra nodestats | Shows shards per node | +| extra rack_id | Shows `rack_id` if customer is not `rack_aware` | +| extra redis_version | Shows Redis version of all databases in the cluster | +| extra state_machine | Shows execution of state machine information | +| extra watchdog | Shows watchdog status | + +### Returns + +Returns a table of the status of all databases on the cluster. + +If `sort ` is specified, the result is sorted by the specified table columns. + +If `issues_only` is specified, it only shows databases that do not have an `OK` status. + +### Example + +``` sh +$ rladmin status databases sort REPLICATION PERSISTENCE +DB:ID NAME TYPE STATUS SHARDS PLACEMENT REPLICATION PERSISTENCE ENDPOINT +db:1 database1 redis active 1 dense disabled disabled redis-10269.testdbd11169.localhost:10269 +db:2 database2 redis active 1 dense disabled snapshot redis-13897.testdbd11169.localhost:13897 +db:3 database3 redis active 1 dense enabled snapshot redis-19416.testdbd13186.localhost:19416 +``` + +## `status endpoints` + +Displays the current status of all endpoints on the cluster. + +``` sh +rladmin status endpoints + [ node ] + [ db { db: | } ] + [ extra ] + [ sort ] + [ issues_only ] +``` + +### Parameters + +| Parameter | Description | +|-----------|-------------| +| node \ | Only show endpoints for the specified node ID | +| db db:\ | Only show endpoints for the specified database ID | +| db \ | Only show endpoints for the specified database name | +| extra \ | Extra options that show more information | +| sort \ | Sort results by specified column titles | +| issues_only | Filters out all items that have an `OK` status | + + +| Extra parameter | Description | +|-------------------|-------------| +| extra all | Shows all `extra` information | +| extra backups | Shows periodic backup status | +| extra frag | Shows fragmented memory available after the restart | +| extra nodestats | Shows shards per node | +| extra rack_id | Shows `rack_id` if customer is not `rack_aware` | +| extra redis_version | Shows Redis version of all endpoints in the cluster | +| extra state_machine | Shows execution of state machine information | +| extra watchdog | Shows watchdog status | + +### Returns + +Returns a table of the status of all endpoints on the cluster. + +If `sort ` is specified, the result is sorted by the specified table columns. + +If `issues_only` is specified, it only shows endpoints that do not have an `OK` status. + +### Example + +``` sh +$ rladmin status endpoints +DB:ID NAME ID NODE ROLE SSL +db:1 database1 endpoint:1:1 node:1 single No +db:2 database2 endpoint:2:1 node:2 single No +db:3 database3 endpoint:3:1 node:3 single No +``` + +## `status modules` + +Displays the current status of modules installed on the cluster and modules used by databases. This information is not included in the combined status report returned by [`rladmin status`](#status). + +``` sh +rladmin status modules + [ db { db: | } ... { db: | } ] + [ extra { all | min_redis_version | module_id } ] +``` + +### Parameters + +| Parameter | Description | +|-----------|-------------| +| db db:\ | Provide a list of database IDs to show only modules used by the specified databases
(for example: `rladmin status modules db db:1 db:2`) | +| db \ | Provide a list of database names to show only modules used by the specified databases
(for example: `rladmin status modules db name1 name2`) | +| extra all | Shows all extra information | +| extra module_id | Shows module IDs | +| extra min_redis_version | Shows the minimum compatible Redis database version for each module | + +### Returns + +Returns the status of modules installed on the cluster and modules used by databases. + +### Example + +```sh +$ rladmin status modules extra all +CLUSTER MODULES: +MODULE VERSION MIN_REDIS_VERSION ID +RedisBloom 2.4.5 6.0 1b895a180592cbcae5bd3bff6af24be2 +RedisBloom 2.6.8 7.1 95264e7c9ac9540268c115c86a94659b +RediSearch 2 2.6.12 6.0 2c000539f65272f7a2712ed3662c2b6b +RediSearch 2 2.8.9 7.1 dd9a75710db528afa691767e9310ac6f +RedisGears 2.0.15 7.1 18c83d024b8ee22e7caf030862026ca6 +RedisGraph 2.10.12 6.0 5a1f2fdedb8f6ca18f81371ea8d28f68 +RedisJSON 2.4.7 6.0 28308b101a0203c21fa460e7eeb9344a +RedisJSON 2.6.8 7.1 b631b6a863edde1b53b2f7a27a49c004 +RedisTimeSeries 1.8.11 6.0 8fe09b00f56afe5dba160d234a6606af +RedisTimeSeries 1.10.9 7.1 98a492a017ea6669a162fd3503bf31f3 + +DATABASE MODULES: +DB:ID NAME MODULE VERSION ARGS STATUS +db:1 search-json-db RediSearch 2 2.8.9 PARTITIONS AUTO OK +db:1 search-json-db RedisJSON 2.6.8 OK +db:2 timeseries-db RedisTimeSeries 1.10.9 OK +``` + +## `status nodes` + +Displays the current status of all nodes on the cluster. + +``` sh +rladmin status nodes + [ extra ] + [ sort ] + [ issues_only ] +``` + +### Parameters + +| Parameter | Description | +|-----------|-------------| +| extra \ | Extra options that show more information | +| sort \ | Sort results by specified column titles | +| issues_only | Filters out all items that have an `OK` status | + + +| Extra parameter | Description | +|-------------------|-------------| +| extra all | Shows all `extra` information | +| extra backups | Shows periodic backup status | +| extra frag | Shows fragmented memory available after the restart | +| extra nodestats | Shows shards per node | +| extra rack_id | Shows `rack_id` if customer is not `rack_aware` | +| extra redis_version | Shows Redis version of all nodes in the cluster | +| extra state_machine | Shows execution of state machine information | +| extra watchdog | Shows watchdog status | + +### Returns + +Returns a table of the status of all nodes on the cluster. + +If `sort ` is specified, the result is sorted by the specified table columns. + +If `issues_only` is specified, it only shows nodes that do not have an `OK` status. + +### Example + +``` sh +$ rladmin status nodes sort PROVISIONAL_RAM HOSTNAME +CLUSTER NODES: +NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS +node:1 master 198.51.100.2 3d99db1fdf4b 4/100 6 14.74GB/19.54GB 10.73GB/16.02GB 6.2.12-37 OK +*node:3 slave 198.51.100.4 b87cc06c830f 0/100 6 14.74GB/19.54GB 11.22GB/16.02GB 6.2.12-37 OK +node:2 slave 198.51.100.3 fc7a3d332458 0/100 6 14.74GB/19.54GB 11.22GB/16.02GB 6.2.12-37 OK +``` + +## `status shards` + +Displays the current status of all shards on the cluster. + +``` sh +rladmin status shards + [ node ] + [ db {db: | } ] + [ extra ] + [ sort ] + [ issues_only ] +``` + +### Parameters + +| Parameter | Description | +|-----------|-------------| +| node \ | Only show shards for the specified node ID | +| db db:\ | Only show shards for the specified database ID | +| db \ | Only show shards for the specified database name | +| extra \ | Extra options that show more information | +| sort \ | Sort results by specified column titles | +| issues_only | Filters out all items that have an `OK` status | + + +| Extra parameter | Description | +|-------------------|-------------| +| extra all | Shows all `extra` information | +| extra backups | Shows periodic backup status | +| extra frag | Shows fragmented memory available after the restart | +| extra shardstats | Shows shards per node | +| extra rack_id | Shows `rack_id` if customer is not `rack_aware` | +| extra redis_version | Shows Redis version of all shards in the cluster | +| extra state_machine | Shows execution of state machine information | +| extra watchdog | Shows watchdog status | + +### Returns + +Returns a table of the status of all shards on the cluster. + +If `sort ` is specified, the result is sorted by the specified table columns. + +If `issues_only` is specified, it only shows shards that do not have an `OK` status. + +### Example + +``` sh +$ rladmin status shards sort USED_MEMORY ID +SHARDS: +DB:ID NAME ID NODE ROLE SLOTS USED_MEMORY STATUS +db:3 database3 redis:6 node:1 master 8192-12287 2.04MB OK +db:3 database3 redis:4 node:1 master 0-4095 2.08MB OK +db:3 database3 redis:5 node:1 master 4096-8191 2.08MB OK +db:3 database3 redis:7 node:1 master 12288-16383 2.08MB OK +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/suffix.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/suffix.md new file mode 100644 index 0000000000..be9c5a436d --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/suffix.md @@ -0,0 +1,101 @@ +--- +Title: rladmin suffix +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manages the DNS suffixes in the cluster. +headerRange: '[1-2]' +linkTitle: suffix +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/suffix/' +--- + +Manages the DNS suffixes in the cluster. + +## `suffix add` + +Adds a DNS suffix to the cluster. + +``` sh +rladmin suffix add name + [default] + [internal] + [mdns] + [use_aaaa_ns] + [slaves ..] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|------------------|-----------------------------------------------------------------------------------------------| +| name | string | DNS suffix to add to the cluster | +| default | | Sets the given suffix as the default. If a default already exists, this overwrites it. | +| internal | | Forces the given suffix to use private IPs | +| mdns | | Activates multicast DNS support for the given suffix | +| slaves | list of IPv4 addresses | The given suffix will notify the frontend DNS servers when a change in the frontend DNS has occurred | +| use_aaaa_ns | | Activates IPv6 address support | + +### Returns + +Returns `Added suffixes successfully` if the suffix was added. Otherwise, it returns an error. + +### Example + +``` sh +$ rladmin suffix add name new.rediscluster.local +Added suffixes successfully +``` + +## `suffix delete` + +Deletes an existing DNS suffix from the cluster. + +``` sh +rladmin suffix delete name +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|------------------|-----------------------------------------------------------------------------------------------| +| name | string | DNS suffix to delete from the cluster | + +### Returns + +Returns `Suffix deleted successfully` if the suffix was deleted. Otherwise, it returns an error. + +### Example + +``` sh +$ rladmin suffix delete name new.rediscluster.local +Suffix deleted successfully +``` + +## `suffix list` + +Lists the DNS suffixes in the cluster. + +```sh +rladmin suffix list +``` + +### Parameters + +None + +### Returns + +Returns a list of the DNS suffixes. + +### Example + +``` sh +$ rladmin suffix list +List of all suffixes: +cluster.local +new.rediscluster.local +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/tune.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/tune.md new file mode 100644 index 0000000000..56b6fcea19 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/tune.md @@ -0,0 +1,292 @@ +--- +Title: rladmin tune +alwaysopen: false +categories: +- docs +- operate +- rs +description: Configures parameters for databases, proxies, nodes, and clusters. +headerRange: '[1-2]' +linkTitle: tune +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/tune/' +--- + +Configures parameters for databases, proxies, nodes, and clusters. + +## `tune cluster` + +Configures cluster parameters. + +``` sh +rladmin tune cluster + [ repl_diskless { enabled | disabled } ] + [ redis_provision_node_threshold ] + [ redis_migrate_node_threshold ] + [ redis_provision_node_threshold_percent ] + [ redis_migrate_node_threshold_percent ] + [ max_simultaneous_backups ] + [ failure_detection_sensitivity { high | low } ] + [ watchdog_profile { cloud | local-network } ] + [ slave_ha { enabled | disabled } ] + [ slave_ha_grace_period ] + [ slave_ha_cooldown_period ] + [ slave_ha_bdb_cooldown_period ] + [ max_saved_events_per_type ] + [ parallel_shards_upgrade ] + [ default_concurrent_restore_actions ] + [ show_internals { enabled | disabled } ] + [ expose_hostnames_for_all_suffixes { enabled | disabled } ] + [ redis_upgrade_policy { latest | major } ] + [ default_redis_version ] + [ default_non_sharded_proxy_policy { single | all-master-shards | all-nodes } ] + [ default_sharded_proxy_policy { single | all-master-shards | all-nodes } ] + [ default_shards_placement { dense | sparse } ] + [ data_internode_encryption { enabled | disabled } ] + [ db_conns_auditing { enabled | disabled } ] + [ acl_pubsub_default { resetchannels | allchannels } ] + [ resp3_default { enabled | disabled } ] + [ automatic_node_offload { enabled | disabled } ] +``` + +### Parameters + +| Parameters | Type/Value | Description | +|----------------------------------------|-----------------------------------|------------------------------------------------------------------------------------------------------------------------------| +| acl_pubsub_default | `resetchannels`
`allchannels` | Default pub/sub ACL rule for all databases in the cluster:
•`resetchannels` blocks access to all channels (restrictive)
•`allchannels` allows access to all channels (permissive) | +| automatic_node_offload | `enabled`
`disabled` | Define whether automatic node offload migration will take place | +| data_internode_encryption | `enabled`
`disabled` | Activates or deactivates [internode encryption]({{< relref "/operate/rs/security/encryption/internode-encryption" >}}) for new databases | +| db_conns_auditing | `enabled`
`disabled` | Activates or deactivates [connection auditing]({{< relref "/operate/rs/security/audit-events" >}}) by default for new databases of a cluster | +| default_concurrent_restore_actions | integer
`all` | Default number of concurrent actions when restoring a node from a snapshot (positive integer or "all") | +| default_non_sharded_proxy_policy | `single`

`all-master-shards`

`all-nodes` | Default [proxy policy]({{< relref "/operate/rs/databases/configure/proxy-policy" >}}) for newly created non-sharded databases' endpoints | +| default_redis_version | version number | The default Redis database compatibility version used to create new databases.

The value parameter should be a version number in the form of "x.y" where _x_ represents the major version number and _y_ represents the minor version number. The final value corresponds to the desired version of Redis.

You cannot set _default_redis_version_ to a value higher than that supported by the current _redis_upgrade_policy_ value. | +| default_sharded_proxy_policy | `single`

`all-master-shards`

`all-nodes` | Default [proxy policy]({{< relref "/operate/rs/databases/configure/proxy-policy" >}}) for newly created sharded databases' endpoints | +| default_shards_placement | `dense`
`sparse` | New databases place shards according to the default [shard placement policy]({{< relref "/operate/rs/databases/memory-performance/shard-placement-policy" >}}) | +| expose_hostnames_for_all_suffixes | `enabled`
`disabled` | Exposes hostnames for all DNS suffixes | +| failure_detection_sensitivity | `high`
`low` | Predefined thresholds and timeouts for failure detection (previously known as `watchdog_profile`)
• `high` (previously `local-network`) – high failure detection sensitivity, lower thresholds, faster failure detection and failover
• `low` (previously `cloud`) – low failure detection sensitivity, higher tolerance for latency variance (also called network jitter) | +| login_lockout_counter_reset_after | time in seconds | Time after failed login attempt before the counter resets to 0 | +| login_lockout_duration | time in seconds | Time a locked account remains locked ( "0" means only an admin can unlock the account) | +| login_lockout_threshold | integer | Number of failed sign-in attempts to trigger locking a user account ("0" means never lock the account) | +| max_saved_events_per_type | integer | Maximum number of events each type saved in CCS per object type | +| max_simultaneous_backups | integer (default: 4) | Number of database backups allowed to run at the same time. Combines with `max_redis_forks` (set by [`tune node`](#tune-node)) to determine the number of shard backups allowed to run simultaneously. | +| parallel_shards_upgrade | integer
`all` | Number of shards upgraded in parallel during DB upgrade (positive integer or "all") | +| redis_migrate_node_threshold | size in MB | Memory (in MBs by default or can be specified) needed to migrate a database between nodes | +| redis_migrate_node_threshold_percent | percentage | Memory (in percentage) needed to migrate a database between nodes | +| redis_provision_node_threshold | size in MB | Memory (in MBs by default or can be specified) needed to provision a new database | +| redis_provision_node_threshold_percent | percentage | Memory (in percentage) needed to provision a new database | +| redis_upgrade_policy | `latest`
`major` | When you upgrade or create a new Redis database, this policy determines which version of Redis database compatibility is used.

Supported values are:
  • `latest`, which applies the most recent Redis compatibility update \(_effective default prior to v6.2.4_)

  • `major`, which applies the most recent major release compatibility update (_default as of v6.2.4_).
| +| repl_diskless | `enabled`
`disabled` | Activates or deactivates diskless replication (can be overridden per database) | +| resp3_default | `enabled`
`disabled` | Determines the default value of the `resp3` option upon upgrading a database to version 7.2 (defaults to `enabled`) | +| show_internals | `enabled`
`disabled` | Controls the visibility of internal databases that are only used for the cluster's management | +| slave_ha | `enabled`
`disabled` | Activates or deactivates [replica high availability]({{< relref "/operate/rs/databases/configure/replica-ha" >}}) in the cluster
(enabled by default; use [`rladmin tune db`](#tune-db) to change `slave_ha` for a specific database)

Deprecated as of Redis Enterprise Software v7.2.4. | +| slave_ha_bdb_cooldown_period | time in seconds (default: 7200) | Time (in seconds) a database must wait after its shards are relocated by [replica high availability]({{< relref "/operate/rs/databases/configure/replica-ha" >}}) before it can go through another shard migration if another node fails (default is 2 hours) | +| slave_ha_cooldown_period | time in seconds (default: 3600) | Time (in seconds) [replica high availability]({{< relref "/operate/rs/databases/configure/replica-ha" >}}) must wait after relocating shards due to node failure before performing another shard migration for any database in the cluster (default is 1 hour) | +| slave_ha_grace_period | time in seconds (default: 600) | Time (in seconds) between when a node fails and when [replica high availability]({{< relref "/operate/rs/databases/configure/replica-ha" >}}) starts relocating shards to another node | +| watchdog_profile | `cloud`
`local-network` | Watchdog profiles with preconfigured thresholds and timeouts (deprecated as of Redis Enterprise Software v6.4.2-69; use `failure_detection_sensitivity` instead)
• `cloud` is suitable for common cloud environments and has a higher tolerance for latency variance (also called network jitter).
• `local-network` is suitable for dedicated LANs and has better failure detection and failover times. | + +### Returns + +Returns `Finished successfully` if the cluster configuration was changed. Otherwise, it returns an error. + +Use [`rladmin info cluster`]({{< relref "/operate/rs/references/cli-utilities/rladmin/info#info-cluster" >}}) to verify the cluster configuration was changed. + +### Example + +``` sh +$ rladmin tune cluster slave_ha enabled +Finished successfully +$ rladmin info cluster | grep slave_ha + slave_ha: enabled +``` + +## `tune db` + +Configures database parameters. + +``` sh +rladmin tune db { db: | } + [ slave_buffer ] + [ client_buffer ] + [ repl_backlog ] + [ crdt_repl_backlog ] + [ repl_timeout ] + [ repl_diskless { enabled | disabled | default } ] + [ master_persistence { enabled | disabled } ] + [ maxclients ] + [ schedpolicy { cmp | mru | spread | mnp } ] + [ max_shard_pipeline ] + [ conns ] + [ conns_type ] + [ max_client_pipeline ] + [ max_connections ] + [ max_aof_file_size ] + [ max_aof_load_time ] + [ oss_cluster { enabled | disabled } ] + [ oss_cluster_api_preferred_ip_type ] + [ slave_ha { enabled | disabled } ] + [ slave_ha_priority ] + [ skip_import_analyze { enabled | disabled } ] + [ mkms { enabled | disabled } ] + [ continue_on_error ] + [ gradual_src_mode { enabled | disabled } ] + [ gradual_sync_mode { enabled | disabled | auto } ] + [ gradual_sync_max_shards_per_source ] + [ module_name ] [ module_config_params ] + [ crdt_xadd_id_uniqueness_mode { liberal | semi-strict | strict } ] + [ metrics_export_all { enabled | disabled } ] + [ syncer_mode { distributed | centralized }] + [ syncer_monitoring { enabled | disabled } ] + [ mtls_allow_weak_hashing { enabled | disabled } ] + [ mtls_allow_outdated_cert { enabled | disabled } ] + [ data_internode_encryption { enabled | disabled } ] + [ db_conns_auditing { enabled | disabled } ] + [ resp3 { enabled | disabled } ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|--------------------------------------|----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------| +| db:id | integer | ID of the specified database | +| name | string | Name of the specified database | +| client_buffer | value in MB hard:soft:time | Redis client output buffer limits | +| conns | integer | Size of internal connection pool, specified per-thread or per-shard depending on conns_type | +| conns_type | `per-thread`
`per-shard` | Specifies connection pool size as either per-thread or per-shard | +| continue_on_error | | Flag that skips tuning shards that can't be reached | +| crdt_repl_backlog | value in MB
`auto` | Size of the Active-Active replication buffer | +| crdt_xadd_id_uniqueness_mode | `liberal`
`semi-strict`
`strict` | XADD's behavior in an Active-Active database, defined as liberal, semi-strict, or strict (see descriptions below) | +| data_internode_encryption | `enabled`
`disabled` | Activates or deactivates [internode encryption]({{< relref "/operate/rs/security/encryption/internode-encryption" >}}) for the database | +| db_conns_auditing | `enabled`
`disabled` | Activates or deactivates database [connection auditing]({{< relref "/operate/rs/security/audit-events" >}}) for a database | +| gradual_src_mode | `enabled`
`disabled` | Activates or deactivates gradual sync of sources | +| gradual_sync_max_shards_per_source | integer | Number of shards per sync source that can be replicated in parallel (positive integer) | +| gradual_sync_mode | `enabled`
`disabled`
`auto` | Activates, deactivates, or automatically determines gradual sync of source shards | +| master_persistence | `enabled`
`disabled` | If enabled, persists the primary shard in addition to replica shards in a replicated and persistent database. | +| max_aof_file_size | size in MB | Maximum size (in MB, if not specified) of [AoF]({{< relref "/glossary/_index.md#letter-a" >}}) file (minimum value is 10 GB) | +| max_aof_load_time | time in seconds | Time limit in seconds to load a shard from an append-only file (AOF). If exceeded, an AOF rewrite is initiated to decrease future load time.
Minimum: 2700 seconds (45 minutes)
Default: 3600 seconds (1 hour) | +| max_client_pipeline | integer | Maximum commands in the proxy's pipeline per client connection (max value is 2047, default value is 200) | +| max_connections | integer | Maximum client connections to the database's endpoint (default value is 0, which is unlimited) | +| max_shard_pipeline | integer | Maximum commands in the proxy's pipeline per shard connection (default value is 200) | +| maxclients | integer | Controls the maximum client connections between the proxy and shards (default value is 10000) | +| metrics_export_all | `enabled`
`disabled` | Activates the exporter to expose all shard metrics | +| mkms | `enabled`
`disabled` | Activates multi-key multi-slot commands | +| module_config_params | string | Configures module arguments at runtime. Enclose `module_config_params` within quotation marks. | +| module_name | `search`
`ReJSON`
`graph`
`timeseries`
`bf`
`rg` | The module to configure with `module_config_params` | +| mtls_allow_outdated_cert | `enabled`
`disabled` | Activates outdated certificates in mTLS connections | +| mtls_allow_weak_hashing | `enabled`
`disabled` | Activates weak hashing (less than 2048 bits) in mTLS connections | +| oss_cluster | `enabled`
`disabled` | Activates OSS cluster API | +| oss_cluster_api_preferred_ip_type | `internal`
`external` | IP type for the endpoint and database in the OSS cluster API (default is internal) | +| repl_backlog | size in MB
`auto` | Size of the replication buffer | +| repl_diskless | `enabled`
`disabled`
`default` | Activates or deactivates diskless replication (defaults to the cluster setting) | +| repl_timeout | time in seconds | Replication timeout (in seconds) | +| resp3 | `enabled`
`disabled` | Enables or deactivates RESP3 support (defaults to `enabled`) | +| schedpolicy | `cmp`
`mru`
`spread`
`mnp` | Controls how server-side connections are used when forwarding traffic to shards | +| skip_import_analyze | `enabled`
`disabled` | Skips the analyzing step when importing a database | +| slave_buffer | `auto`
value in MB
hard:soft:time | Redis replica output buffer limits
• `auto`: dynamically adjusts the buffer limit based on the shard’s current used memory
• value in MB: sets the buffer limit in MB
• hard:soft:time: sets the hard limit (maximum buffer size in MB), soft limit in MB, and the time in seconds that the soft limit can be exceeded | +| slave_ha | `enabled`
`disabled` | Activates or deactivates replica high availability (defaults to the cluster setting) | +| slave_ha_priority | integer | Priority of the database in the replica high-availability mechanism | +| syncer_mode | `distributed`
`centralized`| Configures syncer to run in distributed or centralized mode. For distributed syncer, the DMC policy must be all-nodes or all-master-nodes | +| syncer_monitoring | `enabled`
`disabled` | Activates syncer monitoring | + +| XADD behavior mode | Description | +| - | - | +| liberal | XADD succeeds with any valid ID (not recommended, allows duplicate IDs) | +| semi-strict | Allows a full ID. Partial IDs are completed with the unique database instance ID (not recommended, allows duplicate IDs). | +| strict | XADD fails if a full ID is given. Partial IDs are completed using the unique database instance ID. | + +### Returns + +Returns `Finished successfully` if the database configuration was changed. Otherwise, it returns an error. + +Use [`rladmin info db`]({{< relref "/operate/rs/references/cli-utilities/rladmin/info#info-db" >}}) to verify the database configuration was changed. + +### Example + +``` sh +$ rladmin tune db db:4 repl_timeout 300 +Tuning database: o +Finished successfully +$ rladmin info db db:4 | grep repl_timeout + repl_timeout: 300 seconds +``` + +## `tune node` + +Configures node parameters. + +``` sh +tune node { | all } + [ max_listeners ] + [ max_redis_forks ] + [ max_redis_servers ] + [ max_slave_full_syncs ] + [ quorum_only { enabled | disabled } ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|----------------------|------------|----------------------------------------------------------------------------------------------------------------------------------| +| id | integer | ID of the specified node | +| all | | Configures settings for all nodes | +| max_listeners | integer | Maximum number of endpoints that may be bound to the node | +| max_redis_forks | integer | Maximum number of background processes forked from shards that may exist on the node at any given time | +| max_redis_servers | integer | Maximum number of shards allowed to reside on the node | +| max_slave_full_syncs | integer | Maximum number of simultaneous replica full-syncs that may be running at any given time (0: Unlimited, -1: Use cluster settings) | +| quorum_only | `enabled`
`disabled` | If activated, configures the node as a [quorum-only node]({{< relref "/glossary/_index.md#letter-p" >}}) | + +### Returns + +Returns `Finished successfully` if the node configuration was changed. Otherwise, it returns an error. + +Use [`rladmin info node`]({{< relref "/operate/rs/references/cli-utilities/rladmin/info#info-node" >}}) to verify the node configuration was changed. + +### Example + +``` sh +$ rladmin tune node 3 max_redis_servers 120 +Finished successfully +$ rladmin info node 3 | grep "max redis servers" + max redis servers: 120 +``` + +## `tune proxy` + +Configures proxy parameters. + +``` sh +rladmin tune proxy { | all } + [ mode { static | dynamic } ] + [ threads ] + [ max_threads ] + [ scale_threshold ] + [ scale_duration ] +``` + +### Parameters + +| Parameter | Type/Value | Description | +|-----------------|----------------------------|-------------------------------------------------------------------------------------| +| id | integer | ID of the specified proxy | +| all | | Configures settings for all proxies | +| max_threads | integer, (range: 1-255) | Maximum number of threads allowed | +| mode | `static`
`dynamic` | Determines if the proxy automatically adjusts the number of threads based on load size | +| scale_duration | time in seconds, (range: 10-300) | Time of scale_threshold CPU utilization before the automatic proxy automatically scales | +| scale_threshold | percentage, (range: 50-99) | CPU utilization threshold that triggers spawning new threads | +| threads | integer, (range: 1-255) | Initial number of threads created at startup | + +### Returns + +Returns `OK` if the proxy configuration was changed. Otherwise, it returns an error. + +Use [`rladmin info proxy`]({{< relref "/operate/rs/references/cli-utilities/rladmin/info#info-proxy" >}}) to verify the proxy configuration was changed. + +### Example + +``` sh +$ rladmin tune proxy 2 scale_threshold 75 +Configuring proxies: + - proxy:2: ok +$ rladmin info proxy 2 | grep scale_threshold + scale_threshold: 75 (%) +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/upgrade.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/upgrade.md new file mode 100644 index 0000000000..7e69981e06 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/upgrade.md @@ -0,0 +1,112 @@ +--- +Title: rladmin upgrade +alwaysopen: false +categories: +- docs +- operate +- rs +description: Upgrades the version of a module or Redis Enterprise Software for a database. +headerRange: '[1-2]' +linkTitle: upgrade +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/upgrade/' +--- + +Upgrades the version of a module or Redis Enterprise Software for a database. + +## `upgrade db` + +Schedules a restart of the primary and replica processes of a database and then upgrades the database to the latest version of Redis Enterprise Software. + +For more information, see [Upgrade an existing Redis Software Deployment]({{< relref "/operate/rs/installing-upgrading/upgrading" >}}). + +```sh +rladmin upgrade db { db: | } + [ preserve_roles ] + [ keep_redis_version ] + [ discard_data ] + [ force_discard ] + [ parallel_shards_upgrade ] + [ keep_crdt_protocol_version ] + [ redis_version ] + [ force ] + [ { latest_with_modules | and module module_name version module_args } ] +``` + +As of v6.2.4, the default behavior for `upgrade db` has changed. It is now controlled by a new parameter that sets the default upgrade policy used to create new databases and to upgrade ones already in the cluster. To learn more, see [`tune cluster default_redis_version`]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}). + +### Parameters + +| Parameters | Type/Value | Description | +|----------------------------|--------------------------|------------------------------------------------------------------------------------------------------------------------| +| db | db:\
name | Database to upgrade | +| and module | [upgrade module](#upgrade-module) command | Clause that allows the upgrade of a database and a specified Redis module in a single step with only one restart (can be specified multiple times) | +| discard_data | | Indicates that data will not be saved after the upgrade | +| force | | Forces upgrade and skips warnings and confirmations | +| force_discard | | Forces `discard_data` if replication or persistence is enabled | +| keep_crdt_protocol_version | | Keeps the current CRDT protocol version | +| keep_redis_version | | Upgrades to a new patch release, not to the latest major.minor version | +| latest_with_modules | | Upgrades the Redis Enterprise Software version and all modules in the database | +| parallel_shards_upgrade | integer
'all' | Maximum number of shards to upgrade all at once | +| preserve_roles | | Performs an additional failover to guarantee the shards' roles are preserved | +| redis_version | Redis version | Upgrades the database to the specified version instead of the latest version | + +### Returns + +Returns `Done` if the upgrade completed. Otherwise, it returns an error. + +### Example + +```sh +$ rladmin upgrade db db:5 +Monitoring e39c8e87-75f9-4891-8c86-78cf151b720b +active - SMUpgradeBDB init +active - SMUpgradeBDB check_slaves +.active - SMUpgradeBDB prepare +active - SMUpgradeBDB stop_forwarding +oactive - SMUpgradeBDB start_wd +active - SMUpgradeBDB wait_for_version +.completed - SMUpgradeBDB +Done +``` + +## `upgrade module` + +Upgrades Redis modules in use by a specific database. + +For more information, see [Upgrade modules]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module" >}}). + +```sh +rladmin upgrade module + db_name { db: | } + module_name + version + module_args +``` + +### Parameters + +| Parameters | Type/Value | Description | +|----------------------------|--------------------------|------------------------------------------------------------------------------------------------------------------------| +| db_name | db:\
name | Upgrade a module for the specified database | +| module_name | 'ReJSON'
'graph'
'search'
'bf'
'rg'
'timeseries' | Redis module to upgrade | +| version | module version number | Upgrades the module to the specified version | +| module_args | 'keep_args'
string | Module configuration options | + +For more information about module configuration options, see [Module configuration options]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-database#module-configuration-options" >}}). + +### Returns + +Returns `Done` if the upgrade completed. Otherwise, it returns an error. + +### Example + +```sh +$ rladmin upgrade module db_name db:8 module_name graph version 20812 module_args "" +Monitoring 21ac7659-e44c-4cc9-b243-a07922b2a6cc +active - SMUpgradeBDB init +active - SMUpgradeBDB wait_for_version +Ocompleted - SMUpgradeBDB +Done +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rladmin/verify.md b/content/operate/rs/7.4/references/cli-utilities/rladmin/verify.md new file mode 100644 index 0000000000..0ce8768186 --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rladmin/verify.md @@ -0,0 +1,91 @@ +--- +Title: rladmin verify +alwaysopen: false +categories: +- docs +- operate +- rs +description: Prints verification reports for the cluster. +headerRange: '[1-2]' +linkTitle: verify +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rladmin/verify/' +--- + +Prints verification reports for the cluster. + +## `verify balance` + +Prints a balance report that displays all of the unbalanced endpoints or nodes in the cluster. + +```sh +rladmin verify balance [ node ] +``` + +The [proxy policy]({{< relref "/operate/rs/databases/configure/proxy-policy#proxy-policies" >}}) determines which nodes or endpoints to report as unbalanced. + +A node is unbalanced if: +- `all-nodes` proxy policy and the node has no endpoint + +An endpoint is unbalanced in the following cases: +- `single` proxy policy and one of the following is true: + - Shard placement is [`sparse`]({{< relref "/operate/rs/databases/memory-performance/shard-placement-policy.md#sparse-shard-placement-policy" >}}) and none of the master shards are on the node + - Shard placement is [`dense`]({{< relref "/operate/rs/databases/memory-performance/shard-placement-policy.md#dense-shard-placement-policy" >}}) and some master shards are on a different node from the endpoint +- `all-master-shards` proxy policy and one of the following is true: + - None of the master shards are on the node + - Some master shards are on a different node from the endpoint + +### Parameters + +| Parameter | Type/Value | Description | +|-----------|------------|-------------| +| node | integer | Specify a node ID to return a balance table for that node only (optional) | + +### Returns + +Returns a table of unbalanced endpoints and nodes in the cluster. + +### Examples + +Verify all nodes: + +```sh +$ rladmin verify balance +The table presents all of the unbalanced endpoints/nodes in the cluster +BALANCE: +NODE:ID DB:ID NAME ENDPOINT:ID PROXY_POLICY LOCAL SHARDS TOTAL SHARDS +``` + +Verify a specific node: + +```sh +$ rladmin verify balance node 1 +The table presents all of the unbalanced endpoints/nodes in the cluster +BALANCE: +NODE:ID DB:ID NAME ENDPOINT:ID PROXY_POLICY LOCAL SHARDS TOTAL SHARDS +``` + +## `verify rack_aware` + +Verifies that the cluster complies with the rack awareness policy and reports any discovered rack collisions, if [rack-zone awareness]({{< relref "/operate/rs/clusters/configure/rack-zone-awareness" >}}) is enabled. + +```sh +rladmin verify rack_aware +``` + +### Parameters + +None + +### Returns + +Returns whether the cluster is rack aware. If rack awareness is enabled, it returns any rack collisions. + +### Example + +```sh +$ rladmin verify rack_aware + +Cluster policy is not configured for rack awareness. +``` diff --git a/content/operate/rs/7.4/references/cli-utilities/rlcheck/_index.md b/content/operate/rs/7.4/references/cli-utilities/rlcheck/_index.md new file mode 100644 index 0000000000..432f3fd49f --- /dev/null +++ b/content/operate/rs/7.4/references/cli-utilities/rlcheck/_index.md @@ -0,0 +1,62 @@ +--- +Title: rlcheck +alwaysopen: false +categories: +- docs +- operate +- rs +description: Verify nodes. +hideListLinks: true +linkTitle: rlcheck (verify nodes) +weight: $weight +url: '/operate/rs/7.4/references/cli-utilities/rlcheck/' +--- +The `rlcheck` utility runs various [tests](#tests) to check the health of a Redis Enterprise Software node and reports any discovered issues. +You can use this utility to confirm a successful installation or to verify that the node is functioning properly. + +To resolve issues reported by `rlcheck`, [contact Redis support](https://redis.com/company/support/). + +## Run rlcheck + +You can run `rlcheck` from the node host's command line. +The output of `rlcheck` shows information specific to the host you run it on. + +To run `rlcheck` tests: + +1. Sign in to the Redis Enterprise Software host with an account that is a member of the **redislabs** operating system group. + +1. Run: + + ```sh + rlcheck + ``` + +## Options + +You can run `rlcheck` with the following options: + +| Option | Description | +|--------|-------------| +| `--suppress-tests TEXT` | Skip the specified, comma-delimited list of tests. See [Tests](#tests) for the list of tests and descriptions. | +| `--retry-delay INTEGER` | Delay between retries, in seconds. | +| `--retry INTEGER` | Number of retries after a failure. | +| `--file-path TEXT` | Custom path to `rlcheck.log`. | +| `--continue-on-error` | Continue to run all tests even if a test fails, then show all errors when complete. | +| `--help` | Return the list of `rlcheck` options. | + +## Tests + +`rlcheck` runs the following tests by default: + +| Test name | Description | +|-----------|-------------| +| verify_owner_and_group | Verifies the owner and group for Redis Enterprise Software files are correct. | +| verify_bootstrap_status | Verifies the local node's bootstrap process completed without errors. | +| verify_services | Verifies all Redis Enterprise Software services are running. | +| verify_port_range | Verifies the [`ip_local_port_range`](https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html) doesn't conflict with the ports Redis Enterprise might assign to shards. | +| verify_pidfiles | Verifies all active local shards have PID files. | +| verify_capabilities | Verifies all binaries have the proper capability bits. | +| verify_existing_sockets | Verifies sockets exist for all processes that require them. | +| verify_host_settings | Verifies the following:
• Linux `overcommit_memory` setting is 1.
•`transparent_hugepage` is disabled.
• Socket maximum connections setting `somaxconn` is 1024. | +| verify_tcp_connectivity | Verifies this node can connect to all other alive nodes. | +| verify_encrypted_gossip | Verifies gossip communication is encrypted. | diff --git a/content/operate/rs/7.4/references/client_references/_index.md b/content/operate/rs/7.4/references/client_references/_index.md new file mode 100644 index 0000000000..b2dd20f684 --- /dev/null +++ b/content/operate/rs/7.4/references/client_references/_index.md @@ -0,0 +1,33 @@ +--- +Title: Develop with Redis clients +alwaysopen: false +categories: +- docs +- operate +- rs +description: Redis client libraries allow you to connect to Redis instances from within + your application. This section provides an overview of several recommended Redis + clients for popular programming and scripting languages. +hideListLinks: true +linkTitle: Redis clients +weight: 80 +url: '/operate/rs/7.4/references/client_references/' +--- +To connect to Redis instances from within your application, use a Redis client library that matches your application's language. + +## Official clients + +| Language | Client name | +| :---------- | :------------- | +| .Net | [NRedisStack]({{< relref "/develop/connect/clients/dotnet" >}}) | +| Go | [go-redis]({{< relref "/develop/connect/clients/go" >}}) | +| Java | [Jedis]({{< relref "/develop/connect/clients/java/jedis" >}}) (Synchronous) and [Lettuce]({{< relref "/develop/connect/clients/java/lettuce" >}}) (Asynchronous) | +| Node.js | [node-redis]({{< relref "/develop/connect/clients/nodejs" >}}) | +| Python | [redis-py]({{< relref "/develop/connect/clients/python" >}}) | + +Select a client name to see its quick start. + +## Other clients + +For a list of community-driven Redis clients, which are available for more programming languages, see +[Community-supported clients]({{< relref "/develop/connect/clients#community-supported-clients" >}}). diff --git a/content/operate/rs/7.4/references/clustering-redis.md b/content/operate/rs/7.4/references/clustering-redis.md new file mode 100644 index 0000000000..1e10d54833 --- /dev/null +++ b/content/operate/rs/7.4/references/clustering-redis.md @@ -0,0 +1,31 @@ +--- +Title: Clustering Redis +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +draft: true +weight: null +url: '/operate/rs/7.4/references/clustering-redis/' +--- +Joining multiple Redis servers into a Redis cluster is a challenging task, especially because Redis supports complex data structures and commands required by modern web applications, in high-throughput and low latency (sub-millisecond) conditions. Some of those challenges are: + +- Performing union and intersection operations over List/Set/Sorted Set + data types across multiple shards and nodes +- Maintaining consistency across multi-shard/multi-node architecture, + while running (a) a SORT command over a List of Hash keys; or (b) a + Redis transaction that includes multiple keys; or (c) a Lua script + with multiple keys +- Creating a simple abstraction layer that hides the complex cluster + architecture from the user’s application, without code modifications + and while supporting infinite scalability +- Maintaining a reliable and consistent infrastructure in a cluster + configuration + +There are several solutions to clustering Redis, most notable of which is the [Redis Community Edition cluster](http://redis.io/topics/cluster-spec). + +Redis Enterprise Software and Redis Cloud were built from the ground up to provide a Redis cluster of any size while supporting all Redis commands. Your dataset is distributed across multiple shards in multiple nodes of the Redis cluster and is constantly monitored to ensure optimal performance. When needed, more shards and nodes can be added to your dataset so it can scale continuously and limitlessly. + +Redis Enterprise clusters provide a single endpoint to connect to, and do not require any code changes or special configuration from the application’s perspective. For more information on setting up and using Redis Enterprise clusters, see [Database clustering]({{< relref "/operate/rs/databases/durability-ha/clustering/" >}}). diff --git a/content/operate/rs/7.4/references/compatibility/_index.md b/content/operate/rs/7.4/references/compatibility/_index.md new file mode 100644 index 0000000000..2ff64c820b --- /dev/null +++ b/content/operate/rs/7.4/references/compatibility/_index.md @@ -0,0 +1,26 @@ +--- +Title: Redis Enterprise compatibility with Redis Community Edition +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Redis Enterprise compatibility with Redis Community Edition. +hideListLinks: true +linkTitle: Redis Community Edition compatibility +weight: $weight +tocEmbedHeaders: true +url: '/operate/rs/7.4/references/compatibility/' +--- +Both Redis Enterprise Software and [Redis Cloud]({{< relref "/operate/rc" >}}) are compatible with Redis Community Edition. + +{{< embed-md "rc-rs-oss-compatibility.md" >}} + +## RESP compatibility + +Redis Enterprise Software and Redis Cloud support RESP2 and RESP3. See [RESP compatibility with Redis Enterprise]({{< relref "/operate/rs/references/compatibility/resp" >}}) for more information. + +## Compatibility with open source Redis Cluster API + +Redis Enterprise supports [Redis OSS Cluster API]({{< relref "/operate/rs/clusters/optimize/oss-cluster-api" >}}) if it is enabled for a database. For more information, see [Enable OSS Cluster API]({{< relref "/operate/rs/databases/configure/oss-cluster-api" >}}). diff --git a/content/operate/rs/7.4/references/compatibility/commands/_index.md b/content/operate/rs/7.4/references/compatibility/commands/_index.md new file mode 100644 index 0000000000..5481597f8a --- /dev/null +++ b/content/operate/rs/7.4/references/compatibility/commands/_index.md @@ -0,0 +1,20 @@ +--- +Title: Compatibility with Redis Community Edition commands +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Redis Community Edition commands compatible with Redis Enterprise. +hideListLinks: true +linkTitle: Commands +weight: 30 +url: '/operate/rs/7.4/references/compatibility/commands/' +--- + +Learn which Redis Community Edition commands are compatible with Redis Enterprise Software and [Redis Cloud]({{< relref "/operate/rc" >}}). + +Select a command group for more details about compatibility with standard and Active-Active Redis Enterprise. + +{{}} diff --git a/content/operate/rs/7.4/references/compatibility/commands/cluster.md b/content/operate/rs/7.4/references/compatibility/commands/cluster.md new file mode 100644 index 0000000000..7585ee4638 --- /dev/null +++ b/content/operate/rs/7.4/references/compatibility/commands/cluster.md @@ -0,0 +1,51 @@ +--- +Title: Cluster management commands compatibility +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Cluster management commands compatible with Redis Enterprise. +linkTitle: Cluster management +weight: 10 +url: '/operate/rs/7.4/references/compatibility/commands/cluster/' +--- + +[Clustering in Redis Enterprise Software]({{< relref "/operate/rs/databases/durability-ha/clustering" >}}) and [Redis Cloud]({{< relref "/operate/rc/databases/configuration/clustering" >}}) differs from the [Redis Community Edition cluster]({{}}) and works with all standard Redis clients. + +Redis Enterprise blocks most [cluster commands]({{< relref "/commands" >}}?group=cluster). If you try to use a blocked cluster command, it returns an error. + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [ASKING]({{< relref "/commands/asking" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER ADDSLOTS]({{< relref "/commands/cluster-addslots" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER ADDSLOTSRANGE]({{< relref "/commands/cluster-addslotsrange" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER BUMPEPOCH]({{< relref "/commands/cluster-bumpepoch" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER COUNT-FAILURE-REPORTS]({{< relref "/commands/cluster-count-failure-reports" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER COUNTKEYSINSLOT]({{< relref "/commands/cluster-countkeysinslot" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER DELSLOTS]({{< relref "/commands/cluster-delslots" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER DELSLOTSRANGE]({{< relref "/commands/cluster-delslotsrange" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER FAILOVER]({{< relref "/commands/cluster-failover" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER FLUSHSLOTS]({{< relref "/commands/cluster-flushslots" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER FORGET]({{< relref "/commands/cluster-forget" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER GETKEYSINSLOT]({{< relref "/commands/cluster-getkeysinslot" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER HELP]({{< relref "/commands/cluster-help" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Only supported with the [OSS cluster API]({{< relref "/operate/rs/databases/configure/oss-cluster-api" >}}). | +| [CLUSTER INFO]({{< relref "/commands/cluster-info" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Only supported with the [OSS cluster API]({{< relref "/operate/rs/databases/configure/oss-cluster-api" >}}). | +| [CLUSTER KEYSLOT]({{< relref "/commands/cluster-keyslot" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Only supported with the [OSS cluster API]({{< relref "/operate/rs/databases/configure/oss-cluster-api" >}}). | +| [CLUSTER LINKS]({{< relref "/commands/cluster-links" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER MEET]({{< relref "/commands/cluster-meet" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER MYID]({{< relref "/commands/cluster-myid" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER MYSHARDID]({{< relref "/commands/cluster-myshardid" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER NODES]({{< relref "/commands/cluster-nodes" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Only supported with the [OSS cluster API]({{< relref "/operate/rs/databases/configure/oss-cluster-api" >}}). | +| [CLUSTER REPLICAS]({{< relref "/commands/cluster-replicas" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER REPLICATE]({{< relref "/commands/cluster-replicate" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER RESET]({{< relref "/commands/cluster-reset" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER SAVECONFIG]({{< relref "/commands/cluster-saveconfig" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER SET-CONFIG-EPOCH]({{< relref "/commands/cluster-set-config-epoch" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER SETSLOT]({{< relref "/commands/cluster-setslot" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER SHARDS]({{< relref "/commands/cluster-shards" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLUSTER SLAVES]({{< relref "/commands/cluster-slaves" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | Deprecated as of Redis v5.0.0. | +| [CLUSTER SLOTS]({{< relref "/commands/cluster-slots" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Only supported with the [OSS cluster API]({{< relref "/operate/rs/databases/configure/oss-cluster-api" >}}). Deprecated as of Redis v7.0.0. | +| [READONLY]({{< relref "/commands/readonly" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [READWRITE]({{< relref "/commands/readwrite" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | diff --git a/content/operate/rs/7.4/references/compatibility/commands/connection.md b/content/operate/rs/7.4/references/compatibility/commands/connection.md new file mode 100644 index 0000000000..36124c33a3 --- /dev/null +++ b/content/operate/rs/7.4/references/compatibility/commands/connection.md @@ -0,0 +1,43 @@ +--- +Title: Connection management commands compatibility +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Connection management commands compatibility. +linkTitle: Connection management +weight: 10 +url: '/operate/rs/7.4/references/compatibility/commands/connection/' +--- + +The following tables show which Redis Community Edition [connection management commands]({{< relref "/commands" >}}?group=connection) are compatible with standard and Active-Active databases in Redis Enterprise Software and Redis Cloud. + + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [AUTH]({{< relref "/commands/auth" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [CLIENT CACHING]({{< relref "/commands/client-caching" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLIENT GETNAME]({{< relref "/commands/client-getname" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [CLIENT GETREDIR]({{< relref "/commands/client-getredir" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLIENT ID]({{< relref "/commands/client-id" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Because Redis Enterprise clustering allows [multiple active proxies]({{< relref "/operate/rs/databases/configure/proxy-policy" >}}), `CLIENT ID` cannot guarantee incremental IDs between clients that connect to different nodes under multi proxy policies. | +| [CLIENT INFO]({{< relref "/commands/client-info" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [CLIENT KILL]({{< relref "/commands/client-kill" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [CLIENT LIST]({{< relref "/commands/client-list" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [CLIENT NO-EVICT]({{< relref "/commands/client-no-evict" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLIENT NO-TOUCH]({{< relref "/commands/client-no-touch" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [CLIENT PAUSE]({{< relref "/commands/client-pause" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLIENT REPLY]({{< relref "/commands/client-reply" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLIENT SETINFO]({{< relref "/commands/client-setinfo" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [CLIENT SETNAME]({{< relref "/commands/client-setname" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [CLIENT TRACKING]({{< relref "/commands/client-tracking" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLIENT TRACKINGINFO]({{< relref "/commands/client-trackinginfo" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLIENT UNBLOCK]({{< relref "/commands/client-unblock" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [CLIENT UNPAUSE]({{< relref "/commands/client-unpause" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [ECHO]({{< relref "/commands/echo" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HELLO]({{< relref "/commands/hello" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PING]({{< relref "/commands/ping" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [QUIT]({{< relref "/commands/quit" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Deprecated as of Redis v7.2.0. | +| [RESET]({{< relref "/commands/reset" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [SELECT]({{< relref "/commands/select" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | Redis Enterprise does not support shared databases due to potential negative performance impacts and blocks any related commands. The `SELECT` command is supported solely for compatibility with Redis Community Edition but does not perform any operations in Redis Enterprise. | diff --git a/content/operate/rs/7.4/references/compatibility/commands/data-types.md b/content/operate/rs/7.4/references/compatibility/commands/data-types.md new file mode 100644 index 0000000000..1ad7284392 --- /dev/null +++ b/content/operate/rs/7.4/references/compatibility/commands/data-types.md @@ -0,0 +1,220 @@ +--- +Title: Data type commands compatibility +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Data type commands compatibility (bitmaps, geospatial indices, hashes, + HyperLogLogs, lists, sets, sorted sets, streams, strings). +linkTitle: Data types +toc: 'true' +weight: 10 +url: '/operate/rs/7.4/references/compatibility/commands/data-types/' +--- + +The following tables show which Redis Community Edition data type commands are compatible with standard and Active-Active databases in Redis Enterprise Software and Redis Cloud. + +## Bitmap commands + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [BITCOUNT]({{< relref "/commands/bitcount" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [BITFIELD]({{< relref "/commands/bitfield" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [BITFIELD_RO]({{< relref "/commands/bitfield_ro" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [BITOP]({{< relref "/commands/bitop" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [BITPOS]({{< relref "/commands/bitpos" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [GETBIT]({{< relref "/commands/getbit" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SETBIT]({{< relref "/commands/setbit" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | + + +## Geospatial indices commands + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [GEOADD]({{< relref "/commands/geoadd" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [GEODIST]({{< relref "/commands/geodist" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [GEOHASH]({{< relref "/commands/geohash" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [GEOPOS]({{< relref "/commands/geopos" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [GEORADIUS]({{< relref "/commands/georadius" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Deprecated as of Redis v6.2.0. | +| [GEORADIUS_RO]({{< relref "/commands/georadius_ro" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Deprecated as of Redis v6.2.0. | +| [GEORADIUSBYMEMBER]({{< relref "/commands/georadiusbymember" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Deprecated as of Redis v6.2.0. | +| [GEORADIUSBYMEMBER_RO]({{< relref "/commands/georadiusbymember_ro" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Deprecated as of Redis v6.2.0. | +| [GEOSEARCH]({{< relref "/commands/geosearch" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [GEOSEARCHSTORE]({{< relref "/commands/geosearchstore" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | + + +## Hash commands + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [HDEL]({{< relref "/commands/hdel" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HEXISTS]({{< relref "/commands/hexists" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HGET]({{< relref "/commands/hget" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HGETALL]({{< relref "/commands/hgetall" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HINCRBY]({{< relref "/commands/hincrby" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HINCRBYFLOAT]({{< relref "/commands/hincrbyfloat" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HKEYS]({{< relref "/commands/hkeys" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HLEN]({{< relref "/commands/hlen" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HMGET]({{< relref "/commands/hmget" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HMSET]({{< relref "/commands/hmset" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Deprecated as of Redis v4.0.0. | +| [HRANDFIELD]({{< relref "/commands/hrandfield" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HSCAN]({{< relref "/commands/hscan" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HSET]({{< relref "/commands/hset" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HSETNX]({{< relref "/commands/hsetnx" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HSTRLEN]({{< relref "/commands/hstrlen" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HVALS]({{< relref "/commands/hvals" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | + + +## HyperLogLog commands + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [PFADD]({{< relref "/commands/pfadd" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PFCOUNT]({{< relref "/commands/pfcount" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PFDEBUG]({{< relref "/commands/pfdebug" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [PFMERGE]({{< relref "/commands/pfmerge" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PFSELFTEST]({{< relref "/commands/pfselftest" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | + + +## List commands + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [BLMOVE]({{< relref "/commands/blmove" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [BLMPOP]({{< relref "/commands/blmpop" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [BLPOP]({{< relref "/commands/blpop" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [BRPOP]({{< relref "/commands/brpop" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [BRPOPLPUSH]({{< relref "/commands/brpoplpush" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Deprecated as of Redis v6.2.0. | +| [LINDEX]({{< relref "/commands/lindex" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [LINSERT]({{< relref "/commands/linsert" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [LLEN]({{< relref "/commands/llen" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [LMOVE]({{< relref "/commands/lmove" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [LMPOP]({{< relref "/commands/lmpop" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [LPOP]({{< relref "/commands/lpop" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [LPOS]({{< relref "/commands/lpos" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [LPUSH]({{< relref "/commands/lpush" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [LPUSHX]({{< relref "/commands/lpushx" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [LRANGE]({{< relref "/commands/lrange" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [LREM]({{< relref "/commands/lrem" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [LSET]({{< relref "/commands/lset" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [LTRIM]({{< relref "/commands/ltrim" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [RPOP]({{< relref "/commands/rpop" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [RPOPLPUSH]({{< relref "/commands/rpoplpush" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Deprecated as of Redis v6.2.0. | +| [RPUSH]({{< relref "/commands/rpush" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [RPUSHX]({{< relref "/commands/rpushx" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | + + +## Set commands + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [SADD]({{< relref "/commands/sadd" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SCARD]({{< relref "/commands/scard" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SDIFF]({{< relref "/commands/sdiff" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SDIFFSTORE]({{< relref "/commands/sdiffstore" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SINTER]({{< relref "/commands/sinter" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SINTERCARD]({{< relref "/commands/sintercard" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SINTERSTORE]({{< relref "/commands/sinterstore" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SISMEMBER]({{< relref "/commands/sismember" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SMEMBERS]({{< relref "/commands/smembers" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SMISMEMBER]({{< relref "/commands/sismember" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SMOVE]({{< relref "/commands/smove" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SPOP]({{< relref "/commands/spop" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SRANDMEMBER]({{< relref "/commands/srandmember" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SREM]({{< relref "/commands/srem" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SSCAN]({{< relref "/commands/sscan" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SUNION]({{< relref "/commands/sunion" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SUNIONSTORE]({{< relref "/commands/sunionstore" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | + + +## Sorted set commands + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [BZMPOP]({{< relref "/commands/bzmpop" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [BZPOPMAX]({{< relref "/commands/bzpopmax" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [BZPOPMIN]({{< relref "/commands/bzpopmin" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZADD]({{< relref "/commands/zadd" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZCARD]({{< relref "/commands/zcard" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZCOUNT]({{< relref "/commands/zcount" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZDIFF]({{< relref "/commands/zdiff" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZDIFFSTORE]({{< relref "/commands/zdiffstore" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZINCRBY]({{< relref "/commands/zincrby" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZINTER]({{< relref "/commands/zinter" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZINTERCARD]({{< relref "/commands/zintercard" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZINTERSTORE]({{< relref "/commands/zinterstore" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZLEXCOUNT]({{< relref "/commands/zlexcount" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZMPOP]({{< relref "/commands/zmpop" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZMSCORE]({{< relref "/commands/zmscore" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZPOPMAX]({{< relref "/commands/zpopmax" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZPOPMIN]({{< relref "/commands/zpopmin" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZRANDMEMBER]({{< relref "/commands/zrandmember" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZRANGE]({{< relref "/commands/zrange" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZRANGEBYLEX]({{< relref "/commands/zrangebylex" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Deprecated as of Redis v6.2.0. | +| [ZRANGEBYSCORE]({{< relref "/commands/zrangebyscore" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Deprecated as of Redis v6.2.0. | +| [ZRANGESTORE]({{< relref "/commands/zrangestore" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZRANK]({{< relref "/commands/zrank" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZREM]({{< relref "/commands/zrem" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZREMRANGEBYLEX]({{< relref "/commands/zremrangebylex" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZREMRANGEBYRANK]({{< relref "/commands/zremrangebyrank" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZREMRANGEBYSCORE]({{< relref "/commands/zremrangebyscore" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZREVRANGE]({{< relref "/commands/zrevrange" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Deprecated as of Redis v6.2.0. | +| [ZREVRANGEBYLEX]({{< relref "/commands/zrevrangebylex" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Deprecated as of Redis v6.2.0. | +| [ZREVRANGEBYSCORE]({{< relref "/commands/zrevrangebyscore" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Deprecated as of Redis v6.2.0. | +| [ZREVRANK]({{< relref "/commands/zrevrank" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZSCAN]({{< relref "/commands/zscan" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZSCORE]({{< relref "/commands/zscore" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZUNION]({{< relref "/commands/zunion" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [ZUNIONSTORE]({{< relref "/commands/zunionstore" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | + + +## Stream commands + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [XACK]({{< relref "/commands/xack" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [XADD]({{< relref "/commands/xadd" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [XAUTOCLAIM]({{< relref "/commands/xautoclaim" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [XCLAIM]({{< relref "/commands/xclaim" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [XDEL]({{< relref "/commands/xdel" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [XGROUP]({{< relref "/commands/xgroup" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [XINFO]({{< relref "/commands/xinfo" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [XLEN]({{< relref "/commands/xlen" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [XPENDING]({{< relref "/commands/xpending" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [XRANGE]({{< relref "/commands/xrange" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [XREAD]({{< relref "/commands/xread" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [XREADGROUP]({{< relref "/commands/xreadgroup" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [XREVRANGE]({{< relref "/commands/xrevrange" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [XSETID]({{< relref "/commands/xsetid" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [XTRIM]({{< relref "/commands/xtrim" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | + + +## String commands + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [APPEND]({{< relref "/commands/append" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [DECR]({{< relref "/commands/decr" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [DECRBY]({{< relref "/commands/decrby" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [GET]({{< relref "/commands/get" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [GETDEL]({{< relref "/commands/getdel" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [GETEX]({{< relref "/commands/getex" >}}) | ✅ Standard
✅ Active-Active\* | ✅ Standard
✅ Active-Active\* | \*Not supported for HyperLogLog. | +| [GETRANGE]({{< relref "/commands/getrange" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [GETSET]({{< relref "/commands/getset" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Deprecated as of Redis v6.2.0. | +| [INCR]({{< relref "/commands/incr" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [INCRBY]({{< relref "/commands/incrby" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [INCRBYFLOAT]({{< relref "/commands/incrbyfloat" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [LCS]({{< relref "/commands/lcs" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [MGET]({{< relref "/commands/mget" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [MSET]({{< relref "/commands/mset" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [MSETNX]({{< relref "/commands/msetnx" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PSETEX]({{< relref "/commands/psetex" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SET]({{< relref "/commands/set" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SETEX]({{< relref "/commands/setex" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SETNX]({{< relref "/commands/setnx" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SETRANGE]({{< relref "/commands/setrange" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| STRALGO | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | Deprecated as of Redis v7.0.0. | +| [STRLEN]({{< relref "/commands/strlen" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SUBSTR]({{< relref "/commands/substr" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | Deprecated as of Redis v2.0.0. | diff --git a/content/operate/rs/7.4/references/compatibility/commands/generic.md b/content/operate/rs/7.4/references/compatibility/commands/generic.md new file mode 100644 index 0000000000..a1c2b7292d --- /dev/null +++ b/content/operate/rs/7.4/references/compatibility/commands/generic.md @@ -0,0 +1,51 @@ +--- +Title: Key commands compatibility +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Generic key commands compatible with Redis Enterprise. +linkTitle: Keys (generic) +weight: 10 +url: '/operate/rs/7.4/references/compatibility/commands/generic/' +--- + +The following table shows which Redis Community Edition [key (generic) commands]({{< relref "/commands" >}}?group=generic) are compatible with standard and Active-Active databases in Redis Enterprise Software and Redis Cloud. + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [COPY]({{< relref "/commands/copy" >}}) | ✅ Standard
✅ Active-Active\* | ✅ Standard
✅ Active-Active\* | For Active-Active or clustered databases, the source and destination keys must be in the same hash slot.

\*Not supported for stream consumer group info. | +| [DEL]({{< relref "/commands/del" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [DUMP]({{< relref "/commands/dump" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [EXISTS]({{< relref "/commands/exists" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [EXPIRE]({{< relref "/commands/expire" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [EXPIREAT]({{< relref "/commands/expireat" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [EXPIRETIME]({{< relref "/commands/expiretime" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [KEYS]({{< relref "/commands/keys" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [MIGRATE]({{< relref "/commands/migrate" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [MOVE]({{< relref "/commands/move" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | Redis Enterprise does not support shared databases due to potential negative performance impacts and blocks any related commands. | +| [OBJECT ENCODING]({{< relref "/commands/object-encoding" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [OBJECT FREQ]({{< relref "/commands/object-freq" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [OBJECT IDLETIME]({{< relref "/commands/object-idletime" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [OBJECT REFCOUNT]({{< relref "/commands/object-refcount" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PERSIST]({{< relref "/commands/persist" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PEXPIRE]({{< relref "/commands/pexpire" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PEXPIREAT]({{< relref "/commands/pexpireat" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PEXPIRETIME]({{< relref "/commands/pexpiretime" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PTTL]({{< relref "/commands/pttl" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [RANDOMKEY]({{< relref "/commands/randomkey" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [RENAME]({{< relref "/commands/rename" >}}) | ✅ Standard
✅ Active-Active\* | ✅ Standard
✅ Active-Active\* | For Active-Active or clustered databases, the original key and new key must be in the same hash slot.

\*Not supported for stream consumer group info. | +| [RENAMENX]({{< relref "/commands/renamenx" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | For Active-Active or clustered databases, the original key and new key must be in the same hash slot. | +| [RESTORE]({{< relref "/commands/restore" >}}) | ✅ Standard
❌ Active-Active\* | ✅ Standard
❌ Active-Active\* | \*Only supported for module keys. | +| [SCAN]({{< relref "/commands/scan" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SORT]({{< relref "/commands/sort" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SORT_RO]({{< relref "/commands/sort_ro" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [TOUCH]({{< relref "/commands/touch" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [TTL]({{< relref "/commands/ttl" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [TYPE]({{< relref "/commands/type" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [UNLINK]({{< relref "/commands/unlink" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [WAIT]({{< relref "/commands/wait" >}}) | ✅ Standard
❌ Active-Active\* | ❌ Standard**
❌ Active-Active | \*For Active-Active databases, `WAIT` commands are supported for primary and replica shard replication. You can contact support to enable `WAIT` for local replicas only. `WAIT` is not supported for cross-instance replication.

\*\*`WAIT` commands are supported on Redis Cloud Flexible subscriptions. | +| [WAITAOF]({{< relref "/commands/waitaof" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | + diff --git a/content/operate/rs/7.4/references/compatibility/commands/pub-sub.md b/content/operate/rs/7.4/references/compatibility/commands/pub-sub.md new file mode 100644 index 0000000000..d33e08e341 --- /dev/null +++ b/content/operate/rs/7.4/references/compatibility/commands/pub-sub.md @@ -0,0 +1,31 @@ +--- +Title: Pub/sub commands compatibility +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Pub/sub commands compatibility. +linkTitle: Pub/sub +weight: 10 +url: '/operate/rs/7.4/references/compatibility/commands/pub-sub/' +--- + +The following table shows which Redis Community Edition [pub/sub commands]({{< relref "/commands" >}}?group=pubsub) are compatible with standard and Active-Active databases in Redis Enterprise Software and Redis Cloud. + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [PSUBSCRIBE]({{< relref "/commands/psubscribe" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PUBLISH]({{< relref "/commands/publish" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PUBSUB CHANNELS]({{< relref "/commands/pubsub-channels" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PUBSUB NUMPAT]({{< relref "/commands/pubsub-numpat" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PUBSUB NUMSUB]({{< relref "/commands/pubsub-numsub" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PUBSUB SHARDCHANNELS]({{< relref "/commands/pubsub-shardchannels" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PUBSUB SHARDNUMSUB]({{< relref "/commands/pubsub-shardnumsub" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [PUNSUBSCRIBE]({{< relref "/commands/punsubscribe" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SPUBLISH]({{< relref "/commands/spublish" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SSUBSCRIBE]({{< relref "/commands/ssubscribe" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SUBSCRIBE]({{< relref "/commands/subscribe" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SUNSUBSCRIBE]({{< relref "/commands/sunsubscribe" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [UNSUBSCRIBE]({{< relref "/commands/unsubscribe" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | diff --git a/content/operate/rs/7.4/references/compatibility/commands/scripting.md b/content/operate/rs/7.4/references/compatibility/commands/scripting.md new file mode 100644 index 0000000000..36acea5fff --- /dev/null +++ b/content/operate/rs/7.4/references/compatibility/commands/scripting.md @@ -0,0 +1,45 @@ +--- +Title: Scripting commands compatibility +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Scripting and function commands compatibility. +linkTitle: Scripting +weight: 10 +url: '/operate/rs/7.4/references/compatibility/commands/scripting/' +--- + +The following table shows which Redis Community Edition [scripting and function commands]({{< relref "/commands" >}}?group=scripting) are compatible with standard and Active-Active databases in Redis Enterprise Software and Redis Cloud. + +## Function commands + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [FCALL]({{< relref "/commands/fcall" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [FCALL_RO]({{< relref "/commands/fcall_ro" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [FUNCTION DELETE]({{< relref "/commands/function-delete" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [FUNCTION DUMP]({{< relref "/commands/function-dump" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [FUNCTION FLUSH]({{< relref "/commands/function-flush" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [FUNCTION HELP]({{< relref "/commands/function-help" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [FUNCTION KILL]({{< relref "/commands/function-kill" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [FUNCTION LIST]({{< relref "/commands/function-list" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [FUNCTION LOAD]({{< relref "/commands/function-load" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [FUNCTION RESTORE]({{< relref "/commands/function-restore" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [FUNCTION STATS]({{< relref "/commands/function-stats" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | + +## Scripting commands + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [EVAL]({{< relref "/commands/eval" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [EVAL_RO]({{< relref "/commands/eval_ro" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [EVALSHA]({{< relref "/commands/evalsha" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [EVALSHA_RO]({{< relref "/commands/evalsha_ro" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SCRIPT DEBUG]({{< relref "/commands/script-debug" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [SCRIPT EXISTS]({{< relref "/commands/script-exists" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SCRIPT FLUSH]({{< relref "/commands/script-flush" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SCRIPT KILL]({{< relref "/commands/script-kill" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SCRIPT LOAD]({{< relref "/commands/script-load" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | diff --git a/content/operate/rs/7.4/references/compatibility/commands/server.md b/content/operate/rs/7.4/references/compatibility/commands/server.md new file mode 100644 index 0000000000..01d3d9ac6a --- /dev/null +++ b/content/operate/rs/7.4/references/compatibility/commands/server.md @@ -0,0 +1,138 @@ +--- +Title: Server management commands compatibility +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Server management commands compatibility. +linkTitle: Server management +toc: 'true' +weight: 10 +url: '/operate/rs/7.4/references/compatibility/commands/server/' +--- + +The following tables show which Redis Community Edition [server management commands]({{< relref "/commands" >}}?group=server) are compatible with standard and Active-Active databases in Redis Enterprise Software and Redis Cloud. + +## Access control commands + +Several access control list (ACL) commands are not available in Redis Enterprise. Instead, you can manage access controls from the [Redis Enterprise Software Cluster Manager UI]({{< relref "/operate/rs/security/access-control" >}}) and the [Redis Cloud console]({{< relref "/operate/rc/security/access-control/data-access-control/role-based-access-control.md" >}}). + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [ACL CAT]({{< relref "/commands/acl-cat" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}). | +| [ACL DELUSER]({{< relref "/commands/acl-deluser" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [ACL DRYRUN]({{< relref "/commands/acl-dryrun" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Might reply with "unknown user" for LDAP users even if `AUTH` succeeds. | +| [ACL GENPASS]({{< relref "/commands/acl-genpass" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [ACL GETUSER]({{< relref "/commands/acl-getuser" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}). | +| [ACL HELP]({{< relref "/commands/acl-help" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}). | +| [ACL LIST]({{< relref "/commands/acl-list" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}). | +| [ACL LOAD]({{< relref "/commands/acl-load" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [ACL LOG]({{< relref "/commands/acl-log" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [ACL SAVE]({{< relref "/commands/acl-save" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [ACL SETUSER]({{< relref "/commands/acl-setuser" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [ACL USERS]({{< relref "/commands/acl-users" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}). | +| [ACL WHOAMI]({{< relref "/commands/acl-whoami" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}). | + + +## Configuration commands + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [CONFIG GET]({{< relref "/commands/config-get" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | [Only supports a subset of configuration settings.]({{< relref "/operate/rs/references/compatibility/config-settings" >}}) | +| [CONFIG RESETSTAT]({{< relref "/commands/config-resetstat" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CONFIG REWRITE]({{< relref "/commands/config-rewrite" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [CONFIG SET]({{< relref "/commands/config-set" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | [Only supports a subset of configuration settings.]({{< relref "/operate/rs/references/compatibility/config-settings" >}}) | + + +## General server commands + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [COMMAND]({{< relref "/commands/command" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [COMMAND COUNT]({{< relref "/commands/command-count" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [COMMAND DOCS]({{< relref "/commands/command-docs" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [COMMAND GETKEYS]({{< relref "/commands/command-getkeys" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [COMMAND GETKEYSANDFLAGS]({{< relref "/commands/command-getkeysandflags" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [COMMAND HELP]({{< relref "/commands/command-help" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [COMMAND INFO]({{< relref "/commands/command-info" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [COMMAND LIST]({{< relref "/commands/command-list" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [DEBUG]({{< relref "/commands/debug" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [FLUSHALL]({{< relref "/commands/flushall" >}}) | ✅ Standard
❌ Active-Active\* | ✅ Standard
❌ Active-Active | \*Can use the [Active-Active flush API request]({{< relref "/operate/rs/references/rest-api/requests/crdbs/flush" >}}). | +| [FLUSHDB]({{< relref "/commands/flushdb" >}}) | ✅ Standard
❌ Active-Active\* | ✅ Standard
❌ Active-Active | \*Can use the [Active-Active flush API request]({{< relref "/operate/rs/references/rest-api/requests/crdbs/flush" >}}). | +| [LOLWUT]({{< relref "/commands/lolwut" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SHUTDOWN]({{< relref "/commands/shutdown" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [SWAPDB]({{< relref "/commands/swapdb" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [TIME]({{< relref "/commands/time" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | + + +## Module commands + +For Redis Enterprise Software, you can [manage Redis modules]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/" >}}) from the Cluster Manager UI or with [REST API requests]({{< relref "/operate/rs/references/rest-api/requests/modules" >}}). + +Redis Cloud manages modules for you and lets you [enable modules]({{< relref "/operate/rc/databases/create-database#modules" >}}) when you create a database. + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [MODULE HELP]({{< relref "/commands/module-help" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [MODULE LIST]({{< relref "/commands/module-list" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [MODULE LOAD]({{< relref "/commands/module-load" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [MODULE LOADEX]({{< relref "/commands/module-loadex" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [MODULE UNLOAD]({{< relref "/commands/module-unload" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | + + +## Monitoring commands + +Although Redis Enterprise does not support certain monitoring commands, you can use the Cluster Manager UI to view Redis Enterprise Software [metrics]({{< relref "/operate/rs/clusters/monitoring" >}}) and [logs]({{< relref "/operate/rs/clusters/logging" >}}) or the Redis Cloud console to view Redis Cloud [metrics]({{< relref "/operate/rc/databases/monitor-performance" >}}) and [logs]({{< relref "/operate/rc/logs-reports/system-logs" >}}). + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [DBSIZE]({{< relref "/commands/dbsize" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [INFO]({{< relref "/commands/info" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | In Redis Enterprise, `INFO` returns a different set of fields than Redis Community Edition.
Not supported for [scripts]({{}}). | +| [LATENCY DOCTOR]({{< relref "/commands/latency-doctor" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [LATENCY GRAPH]({{< relref "/commands/latency-graph" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [LATENCY HELP]({{< relref "/commands/latency-help" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [LATENCY HISTOGRAM]({{< relref "/commands/latency-histogram" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [LATENCY HISTORY]({{< relref "/commands/latency-history" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [LATENCY LATEST]({{< relref "/commands/latency-latest" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [LATENCY RESET]({{< relref "/commands/latency-reset" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [MEMORY DOCTOR]({{< relref "/commands/memory-doctor" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [MEMORY HELP]({{< relref "/commands/memory-help" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}) in Redis versions earlier than 7. | +| [MEMORY MALLOC-STATS]({{< relref "/commands/memory-malloc-stats" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [MEMORY PURGE]({{< relref "/commands/memory-purge" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [MEMORY STATS]({{< relref "/commands/memory-stats" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [MEMORY USAGE]({{< relref "/commands/memory-usage" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}) in Redis versions earlier than 7. | +| [MONITOR]({{< relref "/commands/monitor" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [SLOWLOG GET]({{< relref "/commands/slowlog-get" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}). | +| [SLOWLOG LEN]({{< relref "/commands/slowlog-len" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}). | +| [SLOWLOG RESET]({{< relref "/commands/slowlog-reset" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}). | + + +## Persistence commands + +Data persistence and backup commands are not available in Redis Enterprise. Instead, you can [manage data persistence]({{< relref "/operate/rs/databases/configure/database-persistence" >}}) and [backups]({{< relref "/operate/rs/databases/import-export/schedule-backups" >}}) from the Redis Enterprise Software Cluster Manager UI and the [Redis Cloud console]({{< relref "/operate/rc/databases/view-edit-database#durability-section" >}}). + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [BGREWRITEAOF]({{< relref "/commands/bgrewriteaof" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [BGSAVE]({{< relref "/commands/bgsave" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [LASTSAVE]({{< relref "/commands/lastsave" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [SAVE]({{< relref "/commands/save" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | + + +## Replication commands + +Redis Enterprise automatically manages [replication]({{< relref "/operate/rs/databases/durability-ha/replication" >}}). + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [FAILOVER]({{< relref "/commands/failover" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [MIGRATE]({{< relref "/commands/migrate" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [PSYNC]({{< relref "/commands/psync" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [REPLCONF]({{< relref "/commands/replconf" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [REPLICAOF]({{< relref "/commands/replicaof" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [RESTORE-ASKING]({{< relref "/commands/restore-asking" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [ROLE]({{< relref "/commands/role" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [SLAVEOF]({{< relref "/commands/slaveof" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | Deprecated as of Redis v5.0.0. | +| [SYNC]({{< relref "/commands/sync" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | diff --git a/content/operate/rs/7.4/references/compatibility/commands/transactions.md b/content/operate/rs/7.4/references/compatibility/commands/transactions.md new file mode 100644 index 0000000000..262f5d15cc --- /dev/null +++ b/content/operate/rs/7.4/references/compatibility/commands/transactions.md @@ -0,0 +1,23 @@ +--- +Title: Transaction commands compatibility +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Transaction commands compatibility. +linkTitle: Transactions +weight: 10 +url: '/operate/rs/7.4/references/compatibility/commands/transactions/' +--- + +The following table shows which Redis Community Edition [transaction commands]({{< relref "/commands" >}}?group=transactions) are compatible with standard and Active-Active databases in Redis Enterprise Software and Redis Cloud. + +| Command | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| [DISCARD]({{< relref "/commands/discard" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [EXEC]({{< relref "/commands/exec" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [MULTI]({{< relref "/commands/multi" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [UNWATCH]({{< relref "/commands/unwatch" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [WATCH]({{< relref "/commands/watch" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | diff --git a/content/operate/rs/7.4/references/compatibility/config-settings.md b/content/operate/rs/7.4/references/compatibility/config-settings.md new file mode 100644 index 0000000000..253426e718 --- /dev/null +++ b/content/operate/rs/7.4/references/compatibility/config-settings.md @@ -0,0 +1,39 @@ +--- +Title: Compatibility with Redis Community Edition configuration settings +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Redis Community Edition configuration settings supported by Redis Enterprise. +linkTitle: Configuration settings +weight: 50 +url: '/operate/rs/7.4/references/compatibility/config-settings/' +--- + +Redis Enterprise Software and [Redis Cloud]({{< relref "/operate/rc" >}}) only support a subset of [Redis Community Edition configuration settings]({{}}). Using [`CONFIG GET`]({{< relref "/commands/config-get" >}}) or [`CONFIG SET`]({{< relref "/commands/config-set" >}}) with unsupported configuration settings returns an error. + +| Setting | Redis
Enterprise | Redis
Cloud | Notes | +|:--------|:----------------------|:-----------------|:------| +| activerehashing | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| busy-reply-threshold | ✅ Standard
✅ Active-Active | ❌ Standard
❌ Active-Active | Value must be between 0 and 60000 milliseconds. | +| hash-max-listpack-entries | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| hash-max-listpack-value | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| hash-max-ziplist-entries | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| hash-max-ziplist-value | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| hll-sparse-max-bytes | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| list-compress-depth | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| list-max-listpack-size | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| list-max-ziplist-size | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| lua-time-limit | ✅ Standard
✅ Active-Active | ❌ Standard
❌ Active-Active | Value must be between 0 and 60000 milliseconds. | +| notify-keyspace-events | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| set-max-intset-entries | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| slowlog-log-slower-than | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Value must be larger than 1000 microseconds. | +| slowlog-max-len | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Value must be between 128 and 1024. | +| stream-node-max-bytes | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| stream-node-max-entries | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| zset-max-listpack-entries | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| zset-max-listpack-value | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| zset-max-ziplist-entries | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| zset-max-ziplist-value | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | diff --git a/content/operate/rs/7.4/references/compatibility/resp.md b/content/operate/rs/7.4/references/compatibility/resp.md new file mode 100644 index 0000000000..f7091b9c62 --- /dev/null +++ b/content/operate/rs/7.4/references/compatibility/resp.md @@ -0,0 +1,143 @@ +--- +Title: RESP compatibility with Redis Enterprise +alwaysopen: false +categories: +- docs +- operate +- rs +description: Redis Enterprise supports RESP2 and RESP3. +linkTitle: RESP +toc: 'true' +weight: 80 +url: '/operate/rs/7.4/references/compatibility/resp/' +--- + +RESP (Redis Serialization Protocol) is the protocol that clients use to communicate with Redis databases. See the [RESP protocol specification]({{< relref "/develop/reference/protocol-spec" >}}) for more information. + +## Supported RESP versions + +- RESP2 is supported by all Redis Enterprise versions. + +- RESP3 is supported by Redis Enterprise 7.2 and later. + +{{}} +Redis Enterprise versions that support RESP3 continue to support RESP2. +{{}} + + +## Enable RESP3 for a database {#enable-resp3} + +To use RESP3 with a Redis Enterprise Software database: + +1. Upgrade Redis servers to version 7.2 or later. + + For Active-Active and Replica Of databases: + + 1. Upgrade all participating clusters to Redis Enterprise version 7.2.x or later. + + 1. Upgrade all databases to version 7.x or later. + +1. Enable RESP3 support for your database (`enabled` by default): + + - [`rladmin tune db`]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-db" >}}): + + ```sh + rladmin tune db db: resp3 enabled + ``` + + You can use the database name in place of `db:` in the preceding command. + + - [Update database configuration]({{< relref "/operate/rs/references/rest-api/requests/bdbs#put-bdbs" >}}) REST API request: + + ```sh + PUT /v1/bdbs/ + { "resp3": true } + ``` + + ## Deactivate RESP3 for a database {#deactivate-resp3} + + To deactivate RESP3 support for a database: + +- [`rladmin tune db`]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-db" >}}): + + ```sh + rladmin tune db db: resp3 disabled + ``` + + You can use the database name in place of `db:` in the preceding command. + +- [Update database configuration]({{< relref "/operate/rs/references/rest-api/requests/bdbs#put-bdbs" >}}) REST API request: + + ```sh + PUT /v1/bdbs/ + { "resp3": false } + ``` + + When RESP3 is deactivated, connected clients that use RESP3 are disconnected from the database. + +{{}} +You cannot use sharded pub/sub if you deactivate RESP3 support. +{{}} + +## Change default RESP3 option + +The cluster-wide option `resp3_default` determines the default value of the `resp3` option, which enables or deactivates RESP3 for a database, upon upgrading a database to version 7.2. `resp3_default` is set to `enabled` by default. + +To change `resp3_default` to `disabled`, use one of the following methods: + +- Cluster Manager UI: + + 1. On the **Databases** screen, select {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="Toggle actions button" width="22px" class="inline" >}} to open a list of additional actions. + + 1. Select **Upgrade configuration**. + + 1. For **RESP3 support**, select **Disable**. + + 1. Click **Save**. + +- [`rladmin tune cluster`]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}) + + ```sh + rladmin tune cluster resp3_default disabled + ``` + +- [Update cluster policy]({{< relref "/operate/rs/references/rest-api/requests/cluster/policy#put-cluster-policy" >}}) REST API request: + + ```sh + PUT /v1/cluster/policy + { "resp3_default": false } + ``` + +## Client prerequisites for Redis 7.2 upgrade + +The Redis clients [Go-Redis](https://redis.uptrace.dev/) version 9 and [Lettuce](https://redis.github.io/lettuce/) versions 6 and later use RESP3 by default. If you use either client to run Redis Stack commands, you should set the client's protocol version to RESP2 before upgrading your database to Redis version 7.2 to prevent potential application issues due to RESP3 breaking changes. + +### Go-Redis + +For applications using Go-Redis v9.0.5 or later, set the protocol version to RESP2: + +```go +client := redis.NewClient(&redis.Options{ + Addr: "", + Protocol: 2, // Pin the protocol version +}) +``` + +### Lettuce + +To set the protocol version to RESP2 with Lettuce v6 or later: + +```java +import io.lettuce.core.*; +import io.lettuce.core.api.*; +import io.lettuce.core.protocol.ProtocolVersion; + +// ... +RedisClient client = RedisClient.create(""); +client.setOptions(ClientOptions.builder() + .protocolVersion(ProtocolVersion.RESP2) // Pin the protocol version + .build()); +// ... +``` + +If you are using [LettuceMod](https://github.com/redis-developer/lettucemod/), you need to upgrade to [v3.6.0](https://github.com/redis-developer/lettucemod/releases/tag/v3.6.0). diff --git a/content/operate/rs/7.4/references/connecting-to-redis.md b/content/operate/rs/7.4/references/connecting-to-redis.md new file mode 100644 index 0000000000..825fedefe4 --- /dev/null +++ b/content/operate/rs/7.4/references/connecting-to-redis.md @@ -0,0 +1,42 @@ +--- +Title: Connecting to Redis +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +draft: true +weight: null +url: '/operate/rs/7.4/references/connecting-to-redis/' +--- +To establish a connection to a Redis database, you'll need the following information: + +- The hostname or IP address of the Redis server +- The port number that the Redis server is listening at +- The database password (when configured with an authentication password which is **strongly recommended**) +- The SSL certificates (when configured with SSL authentication and encryption - see [this article](/kb/read-more-ssl) for more information) + +The combination of `hostname:port` is commonly referred to as the "endpoint." This information is readily obtainable from your Redis Enterprise Cluster and Redis Cloud admin consoles. Unless otherwise specified, our Redis databases are accessible via a single managed endpoint to ensure high availability. + +You can connect to a Redis database using a wide variety of tools and libraries depending on your needs. Here's a short list: + +- Use one of the many [clients for Redis](redis.io/clients) - see below for client-specific information and examples +- Code your own Redis client based on the [Redis Serialization Protocol (RESP)](http://redis.io/topics/protocol) +- Make friends with Redis' own command line tool - `redis-cli` - to quickly connect and manage any Redis database (**tip:** you can also use `telnet` instead) +- Use tools that provide a [GUI for Redis](/blog/so-youre-looking-for-the-redis-gui) + +## Basic connection troubleshooting + +Connecting to a remote server can be challenging. Here’s a quick checklist for common pitfalls: + +- Verify that the connection information was copy-pasted correctly <- more than 90% of connectivity issues are due to a single missing character. +- If you're using Redis in the cloud or not inside of a LAN, consider adjusting your client's timeout settings +- Try disabling any security measures that your database may have been set up with (e.g. Source IP/Subnet lists, Security Groups, SSL, etc...). +- Try using a command line tool to connect to the database from your server - it is possible that your host and/port are blocked by the network. +- If you've managed to open a connection, try sending the `INFO` command and act on its reply or error message. +- Redis Enterprise Software Redis databases only support connecting to the default database (0) and block some administrative commands. To learn more, see: + - Redis Enterprise Cluster: [REC compatibility](/redis-enterprise-documentation/rlec-compatibility) + - Redis Cloud FAQ: [Are you fully compatible with Redis Community Edition](/faqs#are-you-fully-compatible-with-open-source-redis) + +If you encounter any difficulties or have questions please feel free to [contact our help desk](mailto:support@redislabs.com). diff --git a/content/operate/rs/7.4/references/memtier-benchmark.md b/content/operate/rs/7.4/references/memtier-benchmark.md new file mode 100644 index 0000000000..4aed9f3a01 --- /dev/null +++ b/content/operate/rs/7.4/references/memtier-benchmark.md @@ -0,0 +1,200 @@ +--- +Title: Benchmark an Auto Tiering enabled database +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +linkTitle: Benchmark Auto Tiering +weight: $weight +url: '/operate/rs/7.4/references/memtier-benchmark/' +--- +Auto Tiering on Redis Enterprise Software lets you use cost-effective Flash memory as a RAM extension for your database. + +But what does the performance look like as compared to a memory-only database, one stored solely in RAM? + +These scenarios use the `memtier_benchmark` utility to evaluate the performance of a Redis Enterprise Software deployment, including the trial version. + +The `memtier_benchmark` utility is located in `/opt/redislabs/bin/` of Redis Enterprise Software deployments. To test performance for cloud provider deployments, see the [memtier-benchmark GitHub project](https://github.com/RedisLabs/memtier_benchmark). + +For additional, such as assistance with larger clusters, [contact support](https://redislabs.com/company/support/). + + +## Benchmark and performance test considerations + +These tests assume you're using a trial version of Redis Enterprise Software and want to test the performance of a Auto Tiering enabled database in the following scenarios: + +- Without replication: Four (4) master shards +- With replication: Two (2) primary and two replica shards + +With the trial version of Redis Enterprise Software you can create a cluster of up to four shards using a combination of database configurations, including: + +- Four databases, each with a single master shard +- Two highly available databases with replication enabled (each database has one master shard and one replica shard) +- One non-replicated clustered database with four master shards +- One highly available and clustered database with two master shards and two replica shards + +## Test environment and cluster setup + +For the test environment, you need to: + +1. Create a cluster with three nodes. +1. Prepare the flash memory. +1. Configure the load generation tool. + +### Creating a three-node cluster {#creating-a-threenode-rs-cluster} + +This performance test requires a three-node cluster. + +You can run all of these tests on Amazon AWS with these hosts: + +- 2 x i3.2xlarge (8 vCPU, 61 GiB RAM, up to 10GBit, 1.9TB NMVe SSD) + + These nodes serve RoF data + +- 1 x m4.large, which acts as a quorum node + +To learn how to install Redis Enterprise Software and set up a cluster, see: + +- [Redis Enterprise Software quickstart]({{< relref "/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart" >}}) for a test installation +- [Install and upgrade]({{< relref "/operate/rs/installing-upgrading" >}}) for a production installation + +These tests use a quorum node to reduce AWS EC2 instance use while maintaining the three nodes required to support a quorum node in case of node failure. Quorum nodes can be on less powerful instances because they do not have shards or support traffic. + +As of this writing, i3.2xlarge instances are required because they support NVMe SSDs, which are required to support RoF. Auto Tiering requires Flash-enabled storage, such as NVMe SSDs. + +For best results, compare performance of a Flash-enabled deployment to the performance in a RAM-only environment, such as a strictly on-premises deployment. + +## Prepare the flash memory + +After you install RS on the nodes, +the flash memory attached to the i3.2xlarge instances must be prepared and formatted with the `/opt/redislabs/sbin/prepare_flash.sh` script. + +## Set up the load generation tool + +The memtier_benchmark load generator tool generates the load on the RoF databases. +To use this tool, install RS on a dedicated instance that is not part of the RS cluster +but is in the same region/zone/subnet of your cluster. +We recommend that you use a relatively powerful instance to avoid bottlenecks at the load generation tool itself. + +For these tests, the load generation host uses a c4.8xlarge instance type. + +## Database configuration parameters + +### Create a Auto Tiering test database + +You can use the Redis Enterprise Cluster Manager UI to create a test database. +We recommend that you use a separate database for each test case with these requirements: + +| **Parameter** | **With replication** | **Without replication** | **Description** | +| ------ | ------ | ------ | ------ | +| Name | test-1 | test-2 | The name of the test database | +| Memory limit | 100 GB | 100 GB | The memory limit refers to RAM+Flash, aggregated across all the shards of the database, including master and replica shards. | +| RAM limit | 0.3 | 0.3 | RoF always keeps the Redis keys and Redis dictionary in RAM and additional RAM is required for storing hot values. For the purpose of these tests 30% RAM was calculated as an optimal value. | +| Replication | Enabled | Disabled | A database with no replication has only master shards. A database with replication has master and replica shards. | +| Data persistence | None | None | No data persistence is needed for these tests. | +| Database clustering | Enabled | Enabled | A clustered database consists of multiple shards. | +| Number of (master) shards | 2 | 4 | Shards are distributed as follows:
- With replication: One master shard and one replica shard on each node
- Without replication: Two master shards on each node | +| Other parameters | Default | Default | Keep the default values for the other configuration parameters. | + +## Data population + +### Populate the benchmark dataset + +The memtier_benchmark load generation tool populates the database. +To populate the database with N items of 500 Bytes each in size, on the load generation instance run: + +```sh +$ memtier_benchmark -s $DB_HOST -p $DB_PORT --hide-histogram +--key-maximum=$N -n allkeys -d 500 --key-pattern=P:P --ratio=1:0 +``` + +Set up a test database: + +| **Parameter** | **Description** | +| ------ | ------ | +| Database host
(-s) | The fully qualified name of the endpoint or the IP shown in the RS database configuration | +| Database port
(-p) | The endpoint port shown in your database configuration | +| Number of items
(–key-maximum) | With replication: 75 Million
Without replication: 150 Million | +| Item size
(-d) | 500 Bytes | + +## Centralize the keyspace + +### With replication {#centralize-with-repl} + +To create roughly 20.5 million items in RAM for your highly available clustered database with 75 million items, run: + +```sh +$ memtier_benchmark -s $DB_HOST -p $DB_PORT --hide-histogram +--key-minimum=27250000 --key-maximum=47750000 -n allkeys +--key-pattern=P:P --ratio=0:1 +``` + +To verify the database values, use **Values in RAM** metric, which is available from the **Metrics** tab of your database in the Cluster Manager UI. + +### Without replication {#centralize-wo-repl} + +To create 41 million items in RAM without replication enabled and 150 million items, run: + +```sh +$ memtier_benchmark -s $DB_HOST -p $DB_PORT --hide-histogram +--key-minimum=54500000 --key-maximum=95500000 -n allkeys +--key-pattern=P:P --ratio=0:1 +``` + +## Test runs + +### Generate load + +#### With replication {#generate-with-repl} + +We recommend that you do a dry run and double check the RAM Hit Ratio on the **Metrics** screen in the Cluster Manager UI before you write down the test results. + +To test RoF with an 85% RAM Hit Ratio, run: + +```sh +$ memtier_benchmark -s $DB_HOST -p $DB_PORT --pipeline=11 -c 20 -t 1 +-d 500 --key-maximum=75000000 --key-pattern=G:G --key-stddev=5125000 +--ratio=1:1 --distinct-client-seed --randomize --test-time=600 +--run-count=1 --out-file=test.out +``` + +#### Without replication {#generate-wo-repl} + +Here is the command for 150 million items: + +```sh +$ memtier_benchmark -s $DB_HOST -p $DB_PORT --pipeline=24 -c 20 -t 1 +-d 500 --key-maximum=150000000 --key-pattern=G:G --key-stddev=10250000 +--ratio=1:1 --distinct-client-seed --randomize --test-time=600 +--run-count=1 --out-file=test.out +``` + +Where: + +| **Parameter** | **Description** | +|------------|-----------------| +| Access pattern (--key-pattern) and standard deviation (--key-stddev) | Controls the RAM Hit ratio after the centralization process is complete | +| Number of threads (-t and -c)\ | Controls how many connections are opened to the database, whereby the number of connections is the number of threads multiplied by the number of connections per thread (-t) and number of clients per thread (-c) | +| Pipelining (--pipeline)\ | Pipelining allows you to send multiple requests without waiting for each individual response (-t) and number of clients per thread (-c) | +| Read\write ratio (--ratio)\ | A value of 1:1 means that you have the same number of write operations as read operations (-t) and number of clients per thread (-c) | + +## Test results + +### Monitor the test results + +You can either monitor the results in the **Metrics** tab of the Cluster Manager UI or with the `memtier_benchmark` output. However, be aware that: + +- The memtier_benchmark results include the network latency between the load generator instance and the cluster instances. + +- The metrics shown in the Cluster Manager UI do _not_ include network latency. + +### Expected results + +You should expect to see an average throughput of: + +- Around 160,000 ops/sec when testing without replication (i.e. Four master shards) +- Around 115,000 ops/sec when testing with enabled replication (i.e. 2 master and 2 replica shards) + +In both cases, the average latency should be below one millisecond. diff --git a/content/operate/rs/7.4/references/metrics/_index.md b/content/operate/rs/7.4/references/metrics/_index.md new file mode 100644 index 0000000000..95b76abb21 --- /dev/null +++ b/content/operate/rs/7.4/references/metrics/_index.md @@ -0,0 +1,49 @@ +--- +Title: Real-time metrics +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: Documents the metrics that are tracked with Redis Enterprise Software. +hideListLinks: true +linkTitle: Metrics +weight: $weight +url: '/operate/rs/7.4/references/metrics/' +--- + +In the Redis Enterprise Cluster Manager UI, you can see real-time performance metrics for clusters, nodes, databases, and shards, and configure alerts that send notifications based on alert parameters. Select the **Metrics** tab to view the metrics for each component. For more information, see [Monitoring with metrics and alerts]({{< relref "/operate/rs/clusters/monitoring" >}}). + +See the following topics for metrics definitions: +- [Database operations]({{< relref "/operate/rs/references/metrics/database-operations" >}}) for database metrics +- [Resource usage]({{< relref "/operate/rs/references/metrics/resource-usage" >}}) for resource and database usage metrics +- [Auto Tiering]({{< relref "/operate/rs/references/metrics/auto-tiering" >}}) for additional metrics for [Auto Tiering ]({{< relref "/operate/rs/databases/auto-tiering" >}}) databases + +## Prometheus metrics + +To collect and display metrics data from your databases and other cluster components, +you can connect your [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/) server to your Redis Enterprise Software cluster. See [Metrics in Prometheus]({{< relref "/integrate/prometheus-with-redis-enterprise/prometheus-metrics-definitions" >}}) for a list of available metrics. + +We recommend you use Prometheus and Grafana to view metrics history and trends. + +See [Prometheus integration]({{< relref "/integrate/prometheus-with-redis-enterprise/" >}}) to learn how to connect Prometheus and Grafana to your Redis Enterprise database. + +## Limitations + +### Shard limit + +Metrics information is not shown for clusters with more than 128 shards. For large clusters, we recommend you use [Prometheus and Grafana]({{< relref "/integrate/prometheus-with-redis-enterprise/" >}}) to view metrics. + +### Metrics not shown during shard migration + +The following metrics are not measured during [shard migration]({{< relref "/operate/rs/databases/configure/replica-ha" >}}). If you view these metrics while resharding, the graph will be blank. + +- [Evicted objects/sec]({{< relref "/operate/rs/references/metrics/database-operations#evicted-objectssec" >}}) +- [Expired objects/sec]({{< relref "/operate/rs/references/metrics/database-operations#expired-objectssec" >}}) +- [Read misses/sec]({{< relref "/operate/rs/references/metrics/database-operations#read-missessec" >}}) +- [Write misses/sec]({{< relref "/operate/rs/references/metrics/database-operations#write-missessec" >}}) +- [Total keys]({{< relref "/operate/rs/references/metrics/database-operations#total-keys" >}}) +- [Incoming traffic]({{< relref "/operate/rs/references/metrics/resource-usage#incoming-traffic" >}}) +- [Outgoing traffic]({{< relref "/operate/rs/references/metrics/resource-usage#outgoing-traffic" >}}) +- [Used memory]({{< relref "/operate/rs/references/metrics/resource-usage#used-memory" >}}) diff --git a/content/operate/rs/7.4/references/metrics/auto-tiering.md b/content/operate/rs/7.4/references/metrics/auto-tiering.md new file mode 100644 index 0000000000..0ad2c91d7d --- /dev/null +++ b/content/operate/rs/7.4/references/metrics/auto-tiering.md @@ -0,0 +1,133 @@ +--- +Title: Auto Tiering Metrics +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +linkTitle: Auto Tiering +weight: $weight +url: '/operate/rs/7.4/references/metrics/auto-tiering/' +--- + +These metrics are additional metrics for [Auto Tiering ]({{< relref "/operate/rs/databases/auto-tiering" >}}) databases. + +#### % Values in RAM + +Percent of keys whose values are stored in RAM. + +A low percentage alert means most of the RAM is used for holding keys and not much RAM is available for values. This can be due to a high number of small keys or a few large keys. Inserting more keys might cause the database to run out of memory. + +If the percent of values in RAM is low for a subset of the database's shards, it might also indicate an unbalanced database. + +**Components measured**: Database and Shard + +#### Values in flash + +Number of keys with values stored in flash, not including [replication]({{< relref "/operate/rs/databases/durability-ha/replication" >}}). + +**Components measured**: Database and Shard + +#### Values in RAM + +Number of keys with values stored in RAM, not including [replication]({{< relref "/operate/rs/databases/durability-ha/replication" >}}). + +**Components measured**: Database and Shard + +#### Flash key-value operations + +Number of operations on flash key values (read + write + del) per second. + +**Components measured**: Node + +#### Flash bytes/sec + +Number of total bytes read and written per second on flash memory. + +**Components measured**: Cluster, Node, Database, and Shard + +#### Flash I/O operations/sec + +Number of input/output operations per second on the flash storage device. + +**Components measured**: Cluster and Node + +#### RAM:Flash access ratio + +Ratio between logical Redis key value operations and actual flash key value operations. + +**Components measured**: Database and Shard + +#### RAM hit ratio + +Ratio of requests processed directly from RAM to total number of requests processed. + +**Components measured**: Database and Shard + +#### Used flash + +Total amount of memory used to store values in flash. + +**Components measured**: Database and Shard + +#### Free flash + +Amount of free space on flash storage. + +**Components measured**: Cluster and Node + +#### Flash fragmentation + +Ratio between the used logical flash memory and the physical flash memory that is used. + +**Components measured**: Database and Shard + +#### Used RAM + +Total size of data stored in RAM, including keys, values, overheads, and [replication]({{< relref "/operate/rs/databases/durability-ha/replication" >}}) (if enabled). + +**Components measured**: Database and Shard + +#### RAM dataset overhead + +Percentage of the [RAM limit](#ram-limit) that is used for anything other than values, such as key names, dictionaries, and other overheads. + +**Components measured**: Database and Shard + +#### RAM limit + +Maximum amount of RAM that can be used in bytes. + +**Components measured**: Database + +#### RAM usage + +Percentage of the [RAM limit](#ram-limit) used. + +**Components measured**: Database + +#### Storage engine usage + +Total count of shards used, filtered by the sorage engine (Speedb / RockSB) per given database. + +**Components measured**: Database, Shards + + + +#### Calculated metrics + +These RoF statistics can be calculated from other metrics. + +- RoF average key size with overhead + + ([ram_dataset_overhead](#ram-dataset-overhead) * [used_ram](#used-ram)) + / ([total_keys]({{< relref "/operate/rs/references/metrics/database-operations#total-keys" >}}) * 2) + +- RoF average value size in RAM + + ((1 - [ram_dataset_overhead](#ram-dataset-overhead)) * [used_ram](#used-ram)) / ([values_in_ram](#values-in-ram) * 2) + +- RoF average value size in flash + + [used_flash](#used-flash) / [values_in_flash](#values-in-flash) diff --git a/content/operate/rs/7.4/references/metrics/database-operations.md b/content/operate/rs/7.4/references/metrics/database-operations.md new file mode 100644 index 0000000000..3b3021cac1 --- /dev/null +++ b/content/operate/rs/7.4/references/metrics/database-operations.md @@ -0,0 +1,143 @@ +--- +Title: Database operations metrics +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: null +linkTitle: Database operations +weight: $weight +url: '/operate/rs/7.4/references/metrics/database-operations/' +--- + +## Evicted objects/sec + +Number of objects evicted from the database per second. + +Objects are evicted from the database according to the [eviction policy]({{< relref "/operate/rs/databases/memory-performance/eviction-policy" >}}). + +Object information is not measured during [shard migration]({{< relref "/operate/rs/databases/configure/replica-ha" >}}). + +**Components measured**: Database and Shard + +## Expired objects/sec + +Number of expired objects per second. + +Object information is not measured during [shard migration]({{< relref "/operate/rs/databases/configure/replica-ha" >}}). + +**Components measured**: Database and Shard + +## Hit ratio + +Ratio of the number of operations on existing keys out of the total number of operations. + +**Components measured**: Database and Shard + +### Read misses/sec + +The number of [read operations](#readssec) per second on keys that do not exist. + +Read misses are not measured during [shard migration]({{< relref "/operate/rs/databases/configure/replica-ha" >}}). + +**Components measured**: Database + +### Write misses/sec + +Number of [write operations](#writessec) per second on keys that do not exist. + +Write misses are not measured during [shard migration]({{< relref "/operate/rs/databases/configure/replica-ha" >}}). + +**Components measured**: Database and Shard + +## Latency + +The total amount of time between sending a Redis operation and receiving a response from the database. + +The graph shows average, minimum, maximum, and last latency values for all latency metrics. + +**Components measured**: Database + +### Reads latency + +[Latency](#latency) of [read operations](#readssec). + +**Components measured**: Database + +### Writes latency + +[Latency](#latency) per [write operation](#writessec). + +**Components measured**: Database + +### Other commands latency + +[Latency](#latency) of [other operations](#other-commandssec). + +**Components measured**: Database + +## Ops/sec + +Number of total operations per second, which includes [read operations](#readssec), [write operations](#writessec), and [other operations](#other-commandssec). + +**Components measured**: Cluster, Node, Database, and Shard + +### Reads/sec + +Number of total read operations per second. + +To find out which commands are read operations, run the following command with [`redis-cli`]({{< relref "/operate/rs/references/cli-utilities/redis-cli" >}}): + +```sh +ACL CAT read +``` + +**Components measured**: Database + +### Writes/sec + +Number of total write operations per second. + +To find out which commands are write operations, run the following command with [`redis-cli`]({{< relref "/operate/rs/references/cli-utilities/redis-cli" >}}): + +```sh +ACL CAT write +``` + +**Components measured**: Database + +#### Pending writes min + +Minimum number of write operations queued per [Active-Active]({{< relref "/operate/rs/databases/active-active" >}}) replica database. + +#### Pending writes max + +Maximum number of write operations queued per [Active-Active]({{< relref "/operate/rs/databases/active-active" >}}) replica database. + +### Other commands/sec + +Number of operations per second that are not [read operations](#readssec) or [write operations](#writessec). + +Examples of other operations include [PING]({{< relref "/commands/ping" >}}), [AUTH]({{< relref "/commands/auth" >}}, and [INFO]({{< relref "/commands/info" >}} + +**Components measured**: Database + +## Total keys + +Total number of keys in the dataset. + +Does not include replicated keys, even if [replication]({{< relref "/operate/rs/databases/durability-ha/replication" >}}) is enabled. + +Total keys is not measured during [shard migration]({{< relref "/operate/rs/databases/configure/replica-ha" >}}). + +**Components measured**: Database + + + + + + + + diff --git a/content/operate/rs/7.4/references/metrics/resource-usage.md b/content/operate/rs/7.4/references/metrics/resource-usage.md new file mode 100644 index 0000000000..9105741db8 --- /dev/null +++ b/content/operate/rs/7.4/references/metrics/resource-usage.md @@ -0,0 +1,118 @@ +--- +Title: Resource usage metrics +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +linkTitle: Resource usage +weight: $weight +url: '/operate/rs/7.4/references/metrics/resource-usage/' +--- + +## Connections + +Number of connections to the database. + +**Components measured**: Cluster, Node, and Database + +## CPU usage + +Percent of the node CPU used. + +**Components measured**: Cluster and Node + +### Main thread CPU usage + +Percent of the CPU used by the main thread. + +**Components measured**: Database and Shard + +### Fork CPU usage + +CPU usage of Redis child forks. + +**Components measured**: Database and Shard + +### Total CPU usage + +Percent usage of the CPU for all nodes. + +**Components measured**: Database + +## Free disk space + +Remaining unused disk space. + +**Components measured**: Cluster and Node + +## Memory +### Used memory + +Total memory used by the database, including RAM, [Flash]({{< relref "/operate/rs/databases/auto-tiering" >}}) (if enabled), and [replication]({{< relref "/operate/rs/databases/durability-ha/replication" >}}) (if enabled). + +Used memory does not include: + +1. Fragmentation overhead - The ratio of memory seen by the operating system to memory allocated by Redis +2. Replication buffers at the primary nodes - Set to 10% of used memory and is between 64 MB and 2048 MB +3. Memory used by Lua scripts - Does not exceed 1 MB +4. Copy on Write (COW) operation that can be triggered by: + - A full replication process + - A database snapshot process + - AOF rewrite process + +Used memory is not measured during [shard migration]({{< relref "/operate/rs/databases/configure/replica-ha" >}}). + +**Components measured**: Database and Shard + +### Free RAM + +Available RAM for System use. + +**Components measured**: Cluster and Node + +### Memory limit + +Memory size limit of the database, enforced on the [used memory](#used-memory). + +**Components measured**: Database + +### Memory usage + +Percent of memory used by Redis out of the [memory limit](#memory-limit). + +**Components measured**: Database +## Traffic + +### Incoming traffic + +Total incoming traffic to the database in bytes/sec. + +All incoming traffic is not measured during [shard migration]({{< relref "/operate/rs/databases/configure/replica-ha" >}}). + +**Components measured**: Cluster, Node and Database + +#### Incoming traffic compressed + +Total incoming compressed traffic (in bytes/sec) per [Active-Active]({{< relref "/operate/rs/databases/active-active" >}}) replica database. + +#### Incoming traffic uncompressed + +Total incoming uncompressed traffic (in bytes/sec) per [Active-Active]({{< relref "/operate/rs/databases/active-active" >}}) replica database. + +### Outgoing traffic + +Total outgoing traffic from the database in bytes per second. + +Outgoing traffic is not measured during [shard migration]({{< relref "/operate/rs/databases/configure/replica-ha" >}}). + +**Components measured**: Cluster, Node and Database + + + + + + + + diff --git a/content/operate/rs/7.4/references/rest-api/_index.md b/content/operate/rs/7.4/references/rest-api/_index.md new file mode 100644 index 0000000000..baef0e7f6e --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/_index.md @@ -0,0 +1,123 @@ +--- +Title: REST API +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the REST API available to Redis Enterprise Software deployments. +hideListLinks: true +weight: $weight +url: '/operate/rs/7.4/references/rest-api/' +--- +Redis Enterprise Software provides a REST API to help you automate common tasks. + +Here, you'll find the details of the API and how to use it. + +For more info, see: + +- Supported [request endpoints]({{< relref "/operate/rs/references/rest-api/requests" >}}), organized by path +- Supported [objects]({{< relref "/operate/rs/references/rest-api/objects" >}}), both request and response +- Built-in roles and associated [permissions]({{< relref "/operate/rs/references/rest-api/permissions" >}}) +- [Redis Enterprise Software REST API quick start]({{< relref "/operate/rs/references/rest-api/quick-start" >}}) with examples + +## Authentication + +Authentication to the Redis Enterprise Software API occurs via [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Provide your username and password as the basic auth credentials. + +If the username and password is incorrect or missing, the request will fail with a [`401 Unauthorized`](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized) status code. + +Example request using [cURL](https://curl.se/): + +``` bash +curl -u "demo@redislabs.com:password" \ + https://localhost:9443/v1/bdbs +``` + +For more examples, see the [Redis Enterprise Software REST API quick start]({{< relref "/operate/rs/references/rest-api/quick-start" >}}). + +### Permissions + +By default, the admin user is authorized for access to all endpoints. Use [role-based access controls]({{< relref "/operate/rs/security/access-control" >}}) and [role permissions]({{< relref "/operate/rs/references/rest-api/permissions" >}}) to manage access. + +If a user attempts to access an endpoint that is not allowed in their role, the request will fail with a [`403 Forbidden`](https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden) status code. For more details on which user roles can access certain endpoints, see [Permissions]({{< relref "/operate/rs/references/rest-api/permissions" >}}). + +### Certificates + +The Redis Enterprise Software REST API uses [Self-signed certificates]({{< relref "/operate/rs/security/certificates" >}}) to ensure the product is secure. When you use the default self-signed certificates, the HTTPS requests will fail with `SSL certificate problem: self signed certificate` unless you turn off SSL certificate verification. + +## Ports + +All calls must be made over SSL to port 9443. For the API to work, port 9443 must be exposed to incoming traffic or mapped to a different port. + +If you are using a [Redis Enterprise Software Docker image]({{< relref "/operate/rs/installing-upgrading/quickstarts/docker-quickstart" >}}), run the following command to start the Docker image with port 9443 exposed: + +```sh +docker run -p 9443:9443 redislabs/redis +``` + +## Versions + +All API requests are versioned in order to minimize the impact of backwards-incompatible API changes and to coordinate between different versions operating in parallel. + +Specify the version in the request [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier), as shown in the following table: + +| Request path | Description | +|--------------|-------------| +| POST `/v1/bdbs` | A version 1 request for the `/bdbs` endpoint. | +| POST `/v2/bdbs` | A version 2 request for the `/bdbs` endpoint. | + +When an endpoint supports multiple versions, each version is documented on the corresponding endpoint. For example, the [bdbs request]({{< relref "/operate/rs/references/rest-api/requests/bdbs/" >}}) page documents POST requests for [version 1]({{< relref "/operate/rs/references/rest-api/requests/bdbs/#post-bdbs-v1" >}}) and [version 2]({{< relref "/operate/rs/references/rest-api/requests/bdbs/#post-bdbs-v2" >}}). + +## Headers + +### Requests + +Redis Enterprise REST API requests support the following HTTP headers: + +| Header | Supported/Required Values | +|--------|---------------------------| +| Accept | `application/json` | +| Content-Length | Length (in bytes) of request message | +| Content-Type | `application/json` (required for PUT or POST requests) | + +If the client specifies an invalid header, the request will fail with a [`400 Bad Request`](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) status code. + +### Responses + +Redis Enterprise REST API responses support the following HTTP headers: + +| Header | Supported/Required Values | +|--------|---------------------------| +| Content-Type | `application/json` | +| Content-Length | Length (in bytes) of response message | + +## JSON requests and responses + +The Redis Enterprise Software REST API uses [JavaScript Object Notation (JSON)](http://www.json.org) for requests and responses. See the [RFC 4627 technical specifications](http://www.ietf.org/rfc/rfc4627.txt) for additional information about JSON. + +Some responses may have an empty body but indicate the response with standard [HTTP codes](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html). + +Both requests and responses may include zero or more objects. + +If the request is for a single entity, the response returns a single JSON object or none. If the request is for a list of entities, the response returns a JSON array with zero or more elements. + +If you omit certain JSON object fields from a request, they may be assigned default values, which often indicate that these fields are not in use. + +## Response types and error codes + +[HTTP status codes](https://www.rfc-editor.org/rfc/rfc9110.html#name-status-codes) indicate the result of an API request. This can be `200 OK` if the server accepted the request, or it can be one of many error codes. + +The most common responses for a Redis Enterprise API request are: + +| Response | Condition/Required handling | +|----------|-----------------------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success | +| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | The request failed, generally due to a typo or other mistake. | +| [401 Unauthorized](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized) | The request failed because the authentication information was missing or incorrect. | +| [403 Forbidden](https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden) | The user cannot access the specified [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier). | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | The [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) does not exist. | +| [503 Service Unavailable](https://www.rfc-editor.org/rfc/rfc9110.html#name-503-service-unavailable) | The node is not responding or is not a member of the cluster. | +| [505 HTTP Version Not Supported](https://www.rfc-editor.org/rfc/rfc9110.html#name-505-http-version-not-suppor) | An unsupported `x-api-version` was used. See [versions](#versions). | + +Some endpoints return different response codes. The request references for these endpoints document these special cases. diff --git a/content/operate/rs/7.4/references/rest-api/encryption.md b/content/operate/rs/7.4/references/rest-api/encryption.md new file mode 100644 index 0000000000..7edead217b --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/encryption.md @@ -0,0 +1,24 @@ +--- +Title: Encrypt REST API requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +linkTitle: Encrypt requests +weight: 30 +url: '/operate/rs/7.4/references/rest-api/encryption/' +--- + +## Require HTTPS for API endpoints + +By default, the Redis Enterprise Software API supports communication over HTTP and HTTPS. However, you can turn off support for HTTP to ensure that API requests are encrypted. + +Before you turn off HTTP support, be sure to migrate any scripts or proxy configurations that use HTTP to the encrypted API endpoint to prevent broken connections. + +To turn off HTTP support for API endpoints, run: + +```sh +rladmin cluster config http_support disabled +``` diff --git a/content/operate/rs/7.4/references/rest-api/objects/_index.md b/content/operate/rs/7.4/references/rest-api/objects/_index.md new file mode 100644 index 0000000000..5fa93c3751 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/_index.md @@ -0,0 +1,19 @@ +--- +Title: Redis Enterprise REST API objects +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the objects used with Redis Enterprise Software REST API calls. +hideListLinks: true +linkTitle: Objects +weight: 40 +url: '/operate/rs/7.4/references/rest-api/objects/' +--- + +Certain [REST API requests]({{< relref "/operate/rs/references/rest-api/requests" >}}) require you to include specific objects in the request body. Many requests also return objects in the response body. + +Both REST API requests and responses represent these objects as [JSON](https://www.json.org). + +{{< table-children columnNames="Object,Description" columnSources="LinkTitle,Description" enableLinks="LinkTitle" >}} diff --git a/content/operate/rs/7.4/references/rest-api/objects/action.md b/content/operate/rs/7.4/references/rest-api/objects/action.md new file mode 100644 index 0000000000..d798f476f5 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/action.md @@ -0,0 +1,43 @@ +--- +Title: Action object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents cluster actions +linkTitle: action +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/action/' +--- + +The cluster allows you to invoke general maintenance actions such as rebalancing or taking a node offline by moving all of its entities to other nodes. + +Actions are implemented as tasks in the cluster. Every task has a unique `task_id` assigned by the cluster, a task name which describes the task, a status, and additional task-specific parameters. + +The REST API provides a simplified interface that allows callers to invoke actions and query their status without a specific `task_id`. + +The action lifecycle is based on the following status and status transitions: + +{{< image filename="/images/rs/rest-api-action-cycle.png#no-click" alt="Action lifecycle" >}} + +| Name | Type/Value | Description | +|------|------------|-------------| +| progress | float (range: 0-100) | Represents percent completed (As of v7.4.2, the return value type changed to 'float' to provide improved progress indication) | +| status | queued | Requested operation and added it to the queue to await processing | +| | starting | Picked up operation from the queue and started processing | +| | running | Currently executing operation | +| | cancelling | Operation cancellation is in progress | +| | cancelled | Operation cancelled | +| | completed | Operation completed | +| | failed | Operation failed | + +When a task fails, the `error_code` and `error_message` fields describe the error. + +Possible `error_code` values: + + Code | Description | +|-------------------------|------------------------------------------------| +| internal_error | An internal error that cannot be mapped to a more precise error code +| insufficient_resources | The cluster does not have sufficient resources to complete the required operation + diff --git a/content/operate/rs/7.4/references/rest-api/objects/alert.md b/content/operate/rs/7.4/references/rest-api/objects/alert.md new file mode 100644 index 0000000000..234931e693 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/alert.md @@ -0,0 +1,25 @@ +--- +Title: Alert object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that contains alert info +linkTitle: alert +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/alert/' +--- + +You can view, configure, and enable various alerts for the cluster. + +Alerts are bound to a cluster object (such as a [BDB]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}) or [node]({{< relref "/operate/rs/references/rest-api/objects/node" >}})), and the cluster's state determines whether the alerts turn on or off. + + Name | Type/Value | Description | Writable +|-------|------------|-------------|----------| +| change_time | string | Timestamp when alert state last changed | | +| change_value | object | Contains data relevant to the evaluation time when the alert went on/off (thresholds, sampled values, etc.) | | +| enabled | boolean | If true, alert is enabled | x | +| severity | 'DEBUG'
'INFO'
'WARNING'
'ERROR'
'CRITICAL' | The alert's severity | | +| state | boolean | If true, alert is currently triggered | | +| threshold | string | Represents an alert threshold when applicable | x | diff --git a/content/operate/rs/7.4/references/rest-api/objects/bdb/_index.md b/content/operate/rs/7.4/references/rest-api/objects/bdb/_index.md new file mode 100644 index 0000000000..1ce47d0005 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bdb/_index.md @@ -0,0 +1,151 @@ +--- +Title: BDB object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents a database +hideListLinks: true +linkTitle: bdb +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bdb/' +--- + +An API object that represents a managed database in the cluster. + +| Name | Type/Value & Description | +|------|-------------------------| +| uid | integer; Cluster unique ID of database. Can be set during creation but cannot be updated. | +| account_id | integer; SM account ID | +| action_uid | string; Currently running action's UID (read-only) | +| aof_policy | Policy for Append-Only File data persistence
Values:
**'appendfsync-every-sec'**
'appendfsync-always' | +| authentication_admin_pass | string; Password for administrative access to the BDB (used for SYNC from the BDB) | +| authentication_redis_pass | string; Redis AUTH password authentication.
Use for Redis databases only. Ignored for memcached databases. (deprecated as of Redis Enterprise v7.2, replaced with multiple passwords feature in version 6.0.X) | +| authentication_sasl_pass | string; Binary memcache SASL password | +| authentication_sasl_uname | string; Binary memcache SASL username (pattern does not allow special characters &,\<,>,") | +| authentication_ssl_client_certs | {{}}[{
"client_cert": string
}, ...]{{
}} List of authorized client certificates
**client_cert**: X.509 PEM (base64) encoded certificate | +| authentication_ssl_crdt_certs | {{}}[{
"client_cert": string
}, ...]{{
}} List of authorized CRDT certificates
**client_cert**: X.509 PEM (base64) encoded certificate | +| authorized_names | array of strings; Additional certified names (deprecated as of Redis Enterprise v6.4.2; use authorized_subjects instead) | +| authorized_subjects | {{}}[{
"CN": string,
"O": string,
"OU": [array of strings],
"L": string,
"ST": string,
"C": string
}, ...]{{
}} A list of valid subjects used for additional certificate validations during TLS client authentication. All subject attributes are case-sensitive.
**Required subject fields**:
"CN" for Common Name
**Optional subject fields:**
"O" for Organization
"OU" for Organizational Unit (array of strings)
"L" for Locality (city)
"ST" for State/Province
"C" for 2-letter country code | +| auto_upgrade | boolean (default: false); Upgrade the database automatically after a cluster upgrade | +| avoid_nodes | array of strings; Cluster node UIDs to avoid when placing the database's shards and binding its endpoints | +| background_op | {{}}[{
"status": string,
"name": string,
"error": object,
"progress": number
}, ...]{{
}} (read-only); **progress**: Percent of completed steps in current operation | +| backup | boolean (default: false); Policy for periodic database backup | +| backup_failure_reason | Reason of last failed backup process (read-only)
Values:
'no-permission'
'wrong-file-path'
'general-error' | +| backup_history | integer (default: 0); Backup history retention policy (number of days, 0 is forever) | +| backup_interval | integer; Interval in seconds in which automatic backup will be initiated | +| backup_interval_offset | integer; Offset (in seconds) from round backup interval when automatic backup will be initiated (should be less than backup_interval) | +| backup_location | [complex object]({{< relref "/operate/rs/references/rest-api/objects/bdb/backup_location" >}}); Target for automatic database backups.
Call `GET` `/jsonschema` to retrieve the object's structure. | +| backup_progress | number, (range: 0-100); Database scheduled periodic backup progress (percentage) (read-only) | +| backup_status | Status of scheduled periodic backup process (read-only)
Values:
'exporting'
'succeeded'
'failed' | +| bigstore | boolean (default: false); Database bigstore option | +| bigstore_ram_size | integer (default: 0); Memory size of bigstore RAM part. | +| bigstore_ram_weights | {{}}[{
"shard_uid": integer,
"weight": number
}, ...]{{
}} List of shard UIDs and their bigstore RAM weights;
**shard_uid**: Shard UID;
**weight**: Relative weight of RAM distribution | +| client_cert_subject_validation_type | Enables additional certificate validations that further limit connections to clients with valid certificates during TLS client authentication.
Values:
**disabled**: Authenticates clients with valid certificates. No additional validations are enforced.
**san_cn**: A client certificate is valid only if its Common Name (CN) matches an entry in the list of valid subjects. Ignores other Subject attributes.
**full_subject**: A client certificate is valid only if its Subject attributes match an entry in the list of valid subjects. | +| conns | integer (default 5); Number of internal proxy connections | +| conns_type | Connections limit type
Values:
**‘per-thread’**
‘per-shard’ | +| crdt | boolean (default: false); Use CRDT-based data types for multi-master replication | +| crdt_causal_consistency | boolean (default: false); Causal consistent CRDB. | +| crdt_config_version | integer; Replica-set configuration version, for internal use only. | +| crdt_featureset_version | integer; CRDB active FeatureSet version | +| crdt_ghost_replica_ids | string; Removed replicas IDs, for internal use only. | +| crdt_guid | string; GUID of CRDB this database belongs to, for internal use only. | +| crdt_modules | string; CRDB modules information. The string representation of a JSON list, containing hashmaps. | +| crdt_protocol_version | integer; CRDB active Protocol version | +| crdt_repl_backlog_size | string; Active-Active replication backlog size ('auto' or size in bytes) | +| crdt_replica_id | integer; Local replica ID, for internal use only. | +| crdt_replicas | string; Replica set configuration, for internal use only. | +| crdt_sources | array of [syncer_sources]({{< relref "/operate/rs/references/rest-api/objects/bdb/syncer_sources" >}}) objects; Remote endpoints/peers of CRDB database to sync from. See the 'bdb -\> replica_sources' section | +| crdt_sync | Enable, disable, or pause syncing from specified crdt_sources. Applicable only for Active-Active databases. See [replica_sync]({{< relref "/operate/rs/references/rest-api/objects/bdb/replica_sync" >}}) for more details.
Values:
'enabled'
**'disabled'**
'paused'
'stopped' | +| crdt_sync_dist | boolean; Enable/disable distributed syncer in master-master | +| crdt_syncer_auto_oom_unlatch | boolean (default: true); Syncer automatically attempts to recover synchronisation from peers after this database throws an Out-Of-Memory error. Otherwise, the syncer exits | +| crdt_xadd_id_uniqueness_mode | XADD strict ID uniqueness mode. CRDT only.
Values:
‘liberal’
**‘strict’**
‘semi-strict’ | +| created_time | string; The date and time the database was created (read-only) | +| data_internode_encryption | boolean; Should the data plane internode communication for this database be encrypted | +| data_persistence | Database on-disk persistence policy. For snapshot persistence, a [snapshot_policy]({{< relref "/operate/rs/references/rest-api/objects/bdb/snapshot_policy" >}}) must be provided
Values:
**'disabled'**
'snapshot'
'aof' | +| dataset_import_sources | [complex object]({{< relref "/operate/rs/references/rest-api/objects/bdb/dataset_import_sources" >}}); Array of source file location description objects to import from when performing an import action. This is write-only and cannot be read after set.
Call GET /jsonschema to retrieve the object's structure. | +| db_conns_auditing | boolean; Enables/deactivates [database connection auditing]({{< relref "/operate/rs/security/audit-events" >}}) | +| default_user | boolean (default: true); Allow/disallow a default user to connect | +| disabled_commands | string (default: ); Redis commands which are disabled in db | +| dns_address_master | string; Database private address endpoint FQDN (read-only) (deprecated as of Redis Enterprise v4.3.3) | +| email_alerts | boolean (default: false); Send email alerts for this DB | +| endpoint | string; Latest bound endpoint. Used when reconfiguring an endpoint via update | +| endpoint_ip | complex object; External IP addresses of node hosting the BDB's endpoint. `GET` `/jsonschema` to retrieve the object's structure. (read-only) (deprecated as of Redis Enterprise v4.3.3) | +| endpoint_node | integer; Node UID hosting the BDB's endpoint (read-only) (deprecated as of Redis Enterprise v4.3.3) | +| endpoints | array; List of database access endpoints (read-only)
**uid**: Unique identification of this source
**dns_name**: Endpoint’s DNS name
**port**: Endpoint’s TCP port number
**addr**: Endpoint’s accessible addresses
**proxy_policy**: The policy used for proxy binding to the endpoint
**exclude_proxies**: List of proxies to exclude
**include_proxies**: List of proxies to include
**addr_type**: Indicates if the endpoint is based on internal or external IPs
**oss_cluster_api_preferred_ip_type**: Indicates preferred IP type in the OSS cluster API: internal/external
**oss_cluster_api_preferred_endpoint_type**: Indicates preferred endpoint type in the OSS cluster API: ip/hostname | +| enforce_client_authentication | Require authentication of client certificates for SSL connections to the database. If set to 'enabled', a certificate should be provided in either authentication_ssl_client_certs or authentication_ssl_crdt_certs
Values:
**'enabled'**
'disabled' | +| eviction_policy | Database eviction policy (Redis style).
Values:
'volatile-lru'
'volatile-ttl'
'volatile-random'
'allkeys-lru'
'allkeys-random'
'noeviction'
'volatile-lfu'
'allkeys-lfu'
**Redis DB default**: 'volatile-lru'
**memcached DB default**: 'allkeys-lru' | +| export_failure_reason | Reason of last failed export process (read-only)
Values:
'no-permission'
'wrong-file-path'
'general-error' | +| export_progress | number, (range: 0-100); Database manually triggered export progress (percentage) (read-only) | +| export_status | Status of manually triggered export process (read-only)
Values:
'exporting'
'succeeded'
'failed' | +| generate_text_monitor | boolean; Enable/disable generation of syncer monitoring information | +| gradual_src_max_sources | integer (default: 1); Sync a maximum N sources in parallel (gradual_src_mode should be enabled for this to take effect) | +| gradual_src_mode | Indicates if gradual sync (of sync sources) should be activated
Values:
'enabled'
'disabled' | +| gradual_sync_max_shards_per_source | integer (default: 1); Sync a maximum of N shards per source in parallel (gradual_sync_mode should be enabled for this to take effect) | +| gradual_sync_mode | Indicates if gradual sync (of source shards) should be activated ('auto' for automatic decision)
Values:
'enabled'
'disabled'
'auto' | +| hash_slots_policy | The policy used for hash slots handling
Values:
**'legacy'**: slots range is '1-4096'
**'16k'**: slots range is '0-16383' | +| implicit_shard_key | boolean (default: false); Controls the behavior of what happens in case a key does not match any of the regex rules.
**true**: if a key does not match any of the rules, the entire key will be used for the hashing function
**false**: if a key does not match any of the rules, an error will be returned. | +| import_failure_reason | Import failure reason (read-only)
Values:
'download-error'
'file-corrupted'
'general-error'
'file-larger-than-mem-limit:\:\'
'key-too-long'
'invalid-bulk-length'
'out-of-memory' | +| import_progress | number, (range: 0-100); Database import progress (percentage) (read-only) | +| import_status | Database import process status (read-only)
Values:
'idle'
'initializing'
'importing'
'succeeded'
'failed' | +| internal | boolean (default: false); Is this a database used by the cluster internally | +| last_backup_time | string; Time of last successful backup (read-only) | +| last_changed_time | string; Last administrative configuration change (read-only) | +| last_export_time | string; Time of last successful export (read-only) | +| max_aof_file_size | integer; Maximum size for shard's AOF file (bytes). Default 300GB, (on bigstore DB 150GB) | +| max_aof_load_time | integer (default: 3600); Maximum time shard's AOF reload should take (seconds). | +| max_client_pipeline | integer (default: 200); Maximum number of pipelined commands per connection. Maximum value is 2047. | +| max_connections | integer (default: 0); Maximum number of client connections allowed (0 unlimited) | +| max_pipelined | integer (default: 2000); Determines the maximum number of commands in the proxy’s pipeline per shard connection. | +| master_persistence | boolean (default: false); If true, persists the primary shard in addition to replica shards in a replicated and persistent database. | +| memory_size | integer (default: 0); Database memory limit (0 is unlimited), expressed in bytes. | +| metrics_export_all | boolean; Enable/disable exposing all shard metrics through the metrics exporter | +| mkms | boolean (default: true); Are MKMS (Multi Key Multi Slots) commands supported? | +| module_list | {{}}[{
"module_id": string,
"module_args": [
u'string',
u'null'],
"module_name": string,
"semantic_version": string
}, ...]{{
}} List of modules associated with the database

**module_id**: Module UID
**module_args**: Module command-line arguments (pattern does not allow special characters &,\<,>,")
**module_name**: Module's name
**semantic_version**: Module's semantic version

As of Redis Enterprise Software v7.4.2, **module_id** and **semantic_version** are optional. | +| mtls_allow_outdated_certs | boolean; An optional mTLS relaxation flag for certs verification | +| mtls_allow_weak_hashing | boolean; An optional mTLS relaxation flag for certs verification | +| name | string; Database name. Only letters, numbers, or hyphens are valid characters. The name must start and end with a letter or number. | +| oss_cluster | boolean (default: false); OSS Cluster mode option. Cannot be enabled with `'hash_slots_policy': 'legacy'` | +| oss_cluster_api_preferred_endpoint_type | Endpoint type in the OSS cluster API
Values:
**‘ip’**
‘hostname’ | +| oss_cluster_api_preferred_ip_type | Internal/external IP type in OSS cluster API. Default value for new endpoints
Values:
**'internal'**
'external' | +| oss_sharding | boolean (default: false); An alternative to `shard_key_regex` for using the common case of the OSS shard hashing policy | +| port | integer; TCP port on which the database is available. Generated automatically if omitted and returned as 0 | +| proxy_policy | The default policy used for proxy binding to endpoints
Values:
'single'
'all-master-shards'
'all-nodes' | +| rack_aware | boolean (default: false); Require the database to always replicate across multiple racks | +| recovery_wait_time | integer (default: -1); Defines how many seconds to wait for the persistence file to become available during auto recovery. After the wait time expires, auto recovery completes with potential data loss. The default `-1` means to wait forever. | +| redis_version | string; Version of the redis-server processes: e.g. 6.0, 5.0-big | +| repl_backlog_size | string; Redis replication backlog size ('auto' or size in bytes) | +| replica_sources | array of [syncer_sources]({{< relref "/operate/rs/references/rest-api/objects/bdb/syncer_sources" >}}) objects; Remote endpoints of database to sync from. See the 'bdb -\> replica_sources' section | +| [replica_sync]({{< relref "/operate/rs/references/rest-api/objects/bdb/replica_sync" >}}) | Enable, disable, or pause syncing from specified replica_sources
Values:
'enabled'
**'disabled'**
'paused'
'stopped' | +| replica_sync_dist | boolean; Enable/disable distributed syncer in replica-of | +| replication | boolean (default: false); In-memory database replication mode | +| resp3 | boolean (default: true); Enables or deactivates RESP3 support | +| roles_permissions | {{}}[{
"role_uid": integer,
"redis_acl_uid": integer
}, ...]{{
}} | +| sched_policy | Controls how server-side connections are used when forwarding traffic to shards.
Values:
**cmp**: Closest to max_pipelined policy. Pick the connection with the most pipelined commands that has not reached the max_pipelined limit.
**mru**: Try to use most recently used connections.
**spread**: Try to use all connections.
**mnp**: Minimal pipeline policy. Pick the connection with the least pipelined commands. | +| shard_block_crossslot_keys | boolean (default: false); In Lua scripts, prevent use of keys from different hash slots within the range owned by the current shard | +| shard_block_foreign_keys | boolean (default: true); In Lua scripts, `foreign_keys` prevent use of keys which could reside in a different shard (foreign keys) | +| shard_key_regex | Custom keyname-based sharding rules.
`[{"regex": string}, ...]`
To use the default rules you should set the value to:
`[{"regex": ".*{(?.*)}.*"}, {"regex": "(?.*)"}]` | +| shard_list | array of integers; Cluster unique IDs of all database shards. | +| sharding | boolean (default: false); Cluster mode (server-side sharding). When true, shard hashing rules must be provided by either `oss_sharding` or `shard_key_regex` | +| shards_count | integer, (range: 1-512) (default: 1); Number of database server-side shards | +| shards_placement | Control the density of shards
Values:
**'dense'**: Shards reside on as few nodes as possible
**'sparse'**: Shards reside on as many nodes as possible | +| skip_import_analyze | Enable/disable skipping the analysis stage when importing an RDB file
Values:
'enabled'
'disabled' | +| slave_buffer | Redis replica output buffer limits
Values:
'auto'
value in MB
hard:soft:time | +| slave_ha | boolean; Enable replica high availability mechanism for this database (default takes the cluster setting) | +| slave_ha_priority | integer; Priority of the BDB in replica high availability mechanism | +| snapshot_policy | array of [snapshot_policy]({{< relref "/operate/rs/references/rest-api/objects/bdb/snapshot_policy" >}}) objects; Policy for snapshot-based data persistence. A dataset snapshot will be taken every N secs if there are at least M writes changes in the dataset | +| ssl | boolean (default: false); Require SSL authenticated and encrypted connections to the database (deprecated as of Redis Enterprise v5.0.1) | +| [status]({{< relref "/operate/rs/references/rest-api/objects/bdb/status" >}}) | Database lifecycle status (read-only)
Values:
'pending'
'active'
'active-change-pending'
'delete-pending'
'import-pending'
'creation-failed'
'recovery' | +| support_syncer_reconf | boolean; Determines whether the syncer handles its own configuration changes. If false, the DMC restarts the syncer upon a configuration change. | +| sync | (deprecated as of Redis Enterprise v5.0.1, use [replica_sync]({{< relref "/operate/rs/references/rest-api/objects/bdb/replica_sync" >}}) or crdt_sync instead) Enable, disable, or pause syncing from specified sync_sources
Values:
'enabled'
**'disabled'**
'paused'
'stopped' | +| sync_dedicated_threads | integer (range: 0-10) (default: 5); Number of dedicated Replica Of threads | +| sync_sources | {{}}[{
"uid": integer,
"uri": string,
"compression": integer,
"status": string,
"rdb_transferred": integer,
"rdb_size": integer,
"last_update": string,
"lag": integer,
"last_error": string
}, ...]{{
}} (deprecated as of Redis Enterprise v5.0.1, instead use replica_sources or crdt_sources) Remote endpoints of database to sync from. See the 'bdb -\> replica_sources' section
**uid**: Numeric unique identification of this source
**uri**: Source Redis URI
**compression**: Compression level for the replication link
**status**: Sync status of this source
**rdb_transferred**: Number of bytes transferred from the source's RDB during the syncing phase
**rdb_size**: The source's RDB size to be transferred during the syncing phase
**last_update**: Time last update was received from the source
**lag**: Lag in millisec between source and destination (while synced)
**last_error**: Last error encountered when syncing from the source | +| syncer_log_level | Minimum syncer log level to log. Only logs with this level or higher will be logged.
Values:
‘crit’
‘error’
‘warn’
**‘info’**
‘trace’
‘debug’ | +| syncer_mode | The syncer for replication between database instances is either on a single node (centralized) or on each node that has a proxy according to the proxy policy (distributed). (read-only)
Values:
'distributed'
'centralized' | +| tags | {{}}[{
"key": string,
"value": string
}, ...]{{
}} Optional list of tag objects attached to the database. Each tag requires a key-value pair.
**key**: Represents the tag's meaning and must be unique among tags (pattern does not allow special characters &,\<,>,")
**value**: The tag's value.| +| tls_mode | Require TLS-authenticated and encrypted connections to the database
Values:
'enabled'
**'disabled'**
'replica_ssl' | +| type | Type of database
Values:
**'redis'**
'memcached' | +| use_nodes | array of strings; Cluster node UIDs to use for database shards and bound endpoints | +| version | string; Database compatibility version: full Redis/memcached version number, such as 6.0.6. This value can only change during database creation and database upgrades.| +| wait_command | boolean (default: true); Supports Redis wait command (read-only) | diff --git a/content/operate/rs/7.4/references/rest-api/objects/bdb/backup_location.md b/content/operate/rs/7.4/references/rest-api/objects/bdb/backup_location.md new file mode 100644 index 0000000000..a1d331df22 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bdb/backup_location.md @@ -0,0 +1,93 @@ +--- +Title: BDB backup/export location object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the bdb backup_location/export_location object used with Redis + Enterprise Software REST API calls. +linkTitle: backup_location/export_location +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bdb/backup_location/' +--- + +You can back up or export a database's dataset to the following types of locations: + +- FTP/S +- SFTP +- Amazon S3 +- Google Cloud Storage +- Microsoft Azure Storage +- NAS/Local Storage + +## Basic parameters + +For all backup/export location objects, you need to specify the location type via the `type` field. + +| Location type | "type" value | +|---------------|--------------| +| FTP/S | "url" | +| SFTP | "sftp" | +| Amazon S3 | "s3" | +| Google Cloud Storage | "gs" | +| Microsoft Azure Storage | "abs" | +| NAS/Local Storage | "mount_point" | + +## Location-specific parameters + +Any additional required parameters may differ based on the backup/export location type. + +### FTP + +| Key name | Type | Description | +|----------|------|-------------| +| url | string | A URI that represents a FTP/S location with the following format: `ftp://user:password@host:port/path/`. The user and password can be omitted if not needed. | + +### SFTP + +| Key name | Type | Description | +|----------|------|-------------| +| key | string | 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) | +| sftp_url | string | SFTP URL in the format: `sftp://user:password@host[:port][/path/]`. The default port number is 22 and the default path is '/'. | + +### AWS S3 + +| Key name | Type | Description | +|----------|------|-------------| +| access_key_id | string | The AWS Access Key ID with access to the bucket | +| bucket_name | string | S3 bucket name | +| region_name | string | Amazon S3 region name (optional) | +| secret_access_key | string | The AWS Secret Access Key that matches the Access Key ID | +| subdir | string | Path to the backup directory in the S3 bucket (optional) | + +### Google Cloud Storage + +| Key name | Type | Description | +|----------|------|-------------| +| bucket_name | string | Cloud Storage bucket name | +| client_email | string | Email address for the Cloud Storage client ID | +| client_id | string | Cloud Storage client ID with access to the Cloud Storage bucket | +| private_key | string | Cloud Storage private key that matches the private key ID | +| private_key_id | string | Cloud Storage private key ID with access to the Cloud Storage bucket | +| subdir | string | Path to the backup directory in the Cloud Storage bucket (optional) | + +### Azure Blob Storage + +| Key name | Type | Description | +|----------|------|-------------| +| account_key | string | Access key for the storage account | +| account_name | string | Storage account name with access to the container | +| container | string | Blob Storage container name | +| sas_token | string | Token to authenticate with shared access signature | +| subdir | string | Path to the backup directory in the Blob Storage container (optional) | + +{{}} +`account_key` and `sas_token` are mutually exclusive +{{}} + +### NAS/Local Storage + +| Key name | Type | Description | +|----------|------|-------------| +| path | string | Path to the local mount point. You must create the mount point on all nodes, and the `redislabs:redislabs` user must have read and write permissions on the local mount point. | diff --git a/content/operate/rs/7.4/references/rest-api/objects/bdb/dataset_import_sources.md b/content/operate/rs/7.4/references/rest-api/objects/bdb/dataset_import_sources.md new file mode 100644 index 0000000000..b20814efc9 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bdb/dataset_import_sources.md @@ -0,0 +1,98 @@ +--- +Title: BDB dataset import sources object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the bdb dataset_import_sources object used with Redis Enterprise + Software REST API calls. +linkTitle: dataset_import_sources +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bdb/dataset_import_sources/' +--- + +You can import data to a database from the following location types: + +- HTTP/S +- FTP +- SFTP +- Amazon S3 +- Google Cloud Storage +- Microsoft Azure Storage +- NAS/Local Storage + +The source file to import should be in the [RDB]({{< relref "/operate/rs/databases/configure/database-persistence.md" >}}) format. It can also be in a compressed (gz) RDB file. + +Supply an array of dataset import source objects to import data from multiple files. + +## Basic parameters + +For all import location objects, you need to specify the location type via the `type` field. + +| Location type | "type" value | +|---------------|--------------| +| FTP/S | "url" | +| SFTP | "sftp" | +| Amazon S3 | "s3" | +| Google Cloud Storage | "gs" | +| Microsoft Azure Storage | "abs" | +| NAS/Local Storage | "mount_point" | + +## Location-specific parameters + +Any additional required parameters may differ based on the import location type. + +### FTP + +| Key name | Type | Description | +|----------|------|-------------| +| url | string | A URI that represents the FTP/S location with the following format: `ftp://user:password@host:port/path/`. The user and password can be omitted if not needed. | + +### SFTP + +| Key name | Type | Description | +|----------|------|-------------| +| key | string | 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) | +| sftp_url | string | SFTP URL in the format: `sftp://user:password@host[:port]/path/filename.rdb`. The default port number is 22 and the default path is '/'. | + +### AWS S3 + +| Key name | Type | Description | +|----------|------|-------------| +| access_key_id | string | The AWS Access Key ID with access to the bucket | +| bucket_name | string | S3 bucket name | +| region_name | string | Amazon S3 region name (optional) | +| secret_access_key | string | The AWS Secret Access that matches the Access Key ID | +| subdir | string | Path to the backup directory in the S3 bucket (optional) | + +### Google Cloud Storage + +| Key name | Type | Description | +|----------|------|-------------| +| bucket_name | string | Cloud Storage bucket name | +| client_email | string | Email address for the Cloud Storage client ID | +| client_id | string | Cloud Storage client ID with access to the Cloud Storage bucket | +| private_key | string | Private key for the Cloud Storage matching the private key ID | +| private_key_id | string | Cloud Storage private key ID with access to the Cloud Storage bucket | +| subdir | string | Path to the backup directory in the Cloud Storage bucket (optional) | + +### Azure Blob Storage + +| Key name | Type | Description | +|----------|------|-------------| +| account_key | string | Access key for the storage account | +| account_name | string | Storage account name with access to the container | +| container | string | Blob Storage container name | +| sas_token | string | Token to authenticate with shared access signature | +| subdir | string | Path to the backup directory in the Blob Storage container (optional) | + +{{}} +`account_key` and `sas_token` are mutually exclusive +{{}} + +### NAS/Local Storage + +| Key name | Type | Description | +|----------|------|-------------| +| path | string | Path to the locally mounted filename to import. You must create the mount point on all nodes, and the `redislabs:redislabs` user must have read permissions on the local mount point. diff --git a/content/operate/rs/7.4/references/rest-api/objects/bdb/replica_sources_status.md b/content/operate/rs/7.4/references/rest-api/objects/bdb/replica_sources_status.md new file mode 100644 index 0000000000..7d3ba5f895 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bdb/replica_sources_status.md @@ -0,0 +1,27 @@ +--- +Title: BDB replica sources status field +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the bdb replica_sources status field used with Redis Enterprise + Software REST API calls. +linkTitle: replica_sources status +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bdb/replica_sources_status/' +--- + +The `replica_sources` status field relates to the [Replica Of]({{< relref "/operate/rs/databases/import-export/replica-of/create.md" >}}) feature, which enables the creation of a Redis database (single- or multi-shard) that synchronizes data from another Redis database (single- or multi-shard). + +The status field represents the Replica Of sync status for a specific sync source. + +Possible status values: + +| Status | Description | Possible next status | +|--------|-------------|----------------------| +| 'out-of-sync' | Sync process is disconnected from source and trying to reconnect | 'syncing' | +| 'syncing' | Sync process is in progress | 'in-sync'
'out-of-sync' | +| 'in-sync' | Sync process finished successfully, and new commands are syncing on a regular basis | 'syncing'
'out-of-sync' + +{{< image filename="/images/rs/rest-api-replica-sources-status.png#no-click" alt="Replica sources status" >}} diff --git a/content/operate/rs/7.4/references/rest-api/objects/bdb/replica_sync.md b/content/operate/rs/7.4/references/rest-api/objects/bdb/replica_sync.md new file mode 100644 index 0000000000..1eff558f0c --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bdb/replica_sync.md @@ -0,0 +1,30 @@ +--- +Title: BDB replica sync field +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the bdb replica_sync field used with Redis Enterprise Software + REST API calls. +linkTitle: replica_sync +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bdb/replica_sync/' +--- + +The BDB `replica_sync` field relates to the [Replica Of]({{< relref "/operate/rs/databases/import-export/replica-of/create.md" >}}) feature, which enables the creation of a Redis database (single- or multi-shard) that synchronizes data from another Redis database (single- or multi-shard). + +You can use the `replica_sync` field to enable, disable, or pause the [Replica Of]({{< relref "/operate/rs/databases/import-export/replica-of/create.md" >}}) sync process. The BDB `crdt_sync` field has a similar purpose for the Redis CRDB. + +Possible BDB sync values: + +| Status | Description | Possible next status | +|--------|-------------|----------------------| +| 'disabled' | (default value) Disables the sync process and represents that no sync is currently configured or running. | 'enabled' | +| 'enabled' | Enables the sync process and represents that the process is currently active. | 'stopped'
'paused' | +| 'paused' | Pauses the sync process. The process is configured but is not currently executing any sync commands. | 'enabled'
'stopped' | +| 'stopped' | An unrecoverable error occurred during the sync process, which caused the system to stop the sync. | 'enabled' | + +{{< image filename="/images/rs/rest-api-bdb-sync.png#no-click" alt="BDB sync" >}} + +When the sync is in the 'stopped' or 'paused' state, then the `last_error` field in the relevant source entry in the `sync_sources` "status" field contains the detailed error message. diff --git a/content/operate/rs/7.4/references/rest-api/objects/bdb/snapshot_policy.md b/content/operate/rs/7.4/references/rest-api/objects/bdb/snapshot_policy.md new file mode 100644 index 0000000000..457916a88a --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bdb/snapshot_policy.md @@ -0,0 +1,18 @@ +--- +Title: Snapshot policy object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the snapshot_policy object used with Redis Enterprise Software + REST API calls. +linkTitle: snapshot_policy +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bdb/snapshot_policy/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| secs | integer | Interval in seconds between snapshots | +| writes | integer | Number of write changes required to trigger a snapshot | diff --git a/content/operate/rs/7.4/references/rest-api/objects/bdb/status.md b/content/operate/rs/7.4/references/rest-api/objects/bdb/status.md new file mode 100644 index 0000000000..ad3f5249a2 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bdb/status.md @@ -0,0 +1,29 @@ +--- +Title: BDB status field +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the bdb status field used with Redis Enterprise Software REST + API calls. +linkTitle: status +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bdb/status/' +--- + +The BDB status field is a read-only field that represents the database status. + +Possible status values: + +| Status | Description | Possible next status | +|--------|-------------|----------------------| +| 'active' | Database is active and no special action is in progress | 'active-change-pending'
'import-pending'
'delete-pending' | +| 'active-change-pending' | |'active' | +| 'creation-failed' | Initial database creation failed | | +| 'delete-pending' | Database deletion is in progress | | +| 'import-pending' | Dataset import is in progress | 'active' | +| 'pending' | Temporary status during database creation | 'active'
'creation-failed' | +| 'recovery' | Not currently relevant (intended for future use) | | + +{{< image filename="/images/rs/rest-api-bdb-status.png#no-click" alt="BDB status" >}} diff --git a/content/operate/rs/7.4/references/rest-api/objects/bdb/syncer_sources.md b/content/operate/rs/7.4/references/rest-api/objects/bdb/syncer_sources.md new file mode 100644 index 0000000000..1fe2e752aa --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bdb/syncer_sources.md @@ -0,0 +1,30 @@ +--- +Title: Syncer sources object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the syncer_sources object used with Redis Enterprise Software + REST API calls. +linkTitle: syncer_sources +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bdb/syncer_sources/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| uid | integer | Unique ID of this source | +| client_cert | string | Client certificate to use if encryption is enabled | +| client_key | string | Client key to use if encryption is enabled | +| compression | integer, (range: 0-6) | Compression level for the replication link | +| encryption | boolean | Encryption enabled/disabled | +| lag | integer | Lag in milliseconds between source and destination (while synced) | +| last_error | string | Last error encountered when syncing from the source | +| last_update | string | Time when we last received an update from the source | +| rdb_size | integer | The source's RDB size to be transferred during the syncing phase | +| rdb_transferred | integer | Number of bytes transferred from the source's RDB during the syncing phase | +| replication_tls_sni | string | Replication TLS server name indication | +| server_cert | string | Server certificate to use if encryption is enabled | +| status | string | Sync status of this source | +| uri | string | Source Redis URI | diff --git a/content/operate/rs/7.4/references/rest-api/objects/bdb_group.md b/content/operate/rs/7.4/references/rest-api/objects/bdb_group.md new file mode 100644 index 0000000000..b9f3b54f9e --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bdb_group.md @@ -0,0 +1,20 @@ +--- +Title: BDB group object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents a group of databases with a shared memory pool +linkTitle: bdb_group +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bdb_group/' +--- + +An API object that represents a group of databases that share a memory pool. + +| Name | Type/Value | Description | +|------|------------|-------------| +| uid | integer | Cluster unique ID of the database group | +| members | array of strings | A list of UIDs of member databases (read-only) | +| memory_size | integer | The common memory pool size limit for all databases in the group, expressed in bytes | diff --git a/content/operate/rs/7.4/references/rest-api/objects/bootstrap/_index.md b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/_index.md new file mode 100644 index 0000000000..1eb73d2311 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/_index.md @@ -0,0 +1,44 @@ +--- +Title: Bootstrap object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object for bootstrap configuration +hideListLinks: true +linkTitle: bootstrap +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bootstrap/' +--- + +A bootstrap configuration object. + +| Name | Type/Value | Description | +|------|------------|-------------| +| action | 'create_cluster'
'join_cluster'
'recover_cluster' | Action to perform | +| cluster | [cluster_identity]({{< relref "/operate/rs/references/rest-api/objects/bootstrap/cluster_identity" >}}) object | Cluster to join or create | +| cnm_https_port | integer | Port to join a cluster with non-default cnm_https port | +| crdb_coordinator_port | integer, (range: 1024-65535) (default: 9081) | CRDB coordinator port | +| credentials | [credentials]({{< relref "/operate/rs/references/rest-api/objects/bootstrap/credentials" >}}) object | Cluster admin credentials | +| dns_suffixes | {{}} +[{ + "name": string, + "cluster_default": boolean, + "use_aaaa_ns": boolean, + "use_internal_addr": boolean, + "slaves": array +}, ...] +{{}} | Explicit configuration of DNS suffixes
**name**: DNS suffix name
**cluster_default**: Should this suffix be the default cluster suffix
**use_aaaa_ns**: Should AAAA records be published for NS records
**use_internal_addr**: Should internal cluster IPs be published for databases
**slaves**: List of replica servers that should be published as NS and notified | +| envoy_admin_port | integer, (range: 1024-65535) | Envoy admin port. Changing this port during runtime might result in an empty response because envoy serves as the cluster gateway.| +| envoy_mgmt_server_port | integer, (range: 1024-65535) | Envoy management server port| +| gossip_envoy_admin_port | integer, (range: 1024-65535) | Gossip envoy admin port| +| license | string | License string. If not provided, a trial license is set by default. | +| max_retries | integer | Max number of retries in case of recoverable errors | +| node | [node_identity]({{< relref "/operate/rs/references/rest-api/objects/bootstrap/node_identity" >}}) object | Node description | +| policy | [policy]({{< relref "/operate/rs/references/rest-api/objects/bootstrap/policy" >}}) object | Policy object | +| recovery_filename | string | Name of backup file to recover from | +| required_version | string | This node can only join the cluster if all nodes in the cluster have a version greater than the required_version | +| retry_time | integer | Max waiting time between retries (in seconds) | + + diff --git a/content/operate/rs/7.4/references/rest-api/objects/bootstrap/cluster_identity.md b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/cluster_identity.md new file mode 100644 index 0000000000..cf494788cf --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/cluster_identity.md @@ -0,0 +1,19 @@ +--- +Title: Cluster identity object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the cluster_identity object used with Redis Enterprise Software + REST API calls. +linkTitle: cluster_identity +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bootstrap/cluster_identity/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| name | string | Fully qualified cluster name. Limited to 64 characters and must comply with the IETF's RFC 952 standard and section 2.1 of the RFC 1123 standard. | +| nodes | array of strings | Array of IP addresses of existing cluster nodes | +| wait_command | boolean (default: true) | Supports Redis wait command | diff --git a/content/operate/rs/7.4/references/rest-api/objects/bootstrap/credentials.md b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/credentials.md new file mode 100644 index 0000000000..dbd14b0c02 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/credentials.md @@ -0,0 +1,18 @@ +--- +Title: Credentials object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the credentials object used with Redis Enterprise Software + REST API calls. +linkTitle: credentials +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bootstrap/credentials/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| password | string | Admin password | +| username | string | Admin username (pattern does not allow special characters &,\<,>,") | diff --git a/content/operate/rs/7.4/references/rest-api/objects/bootstrap/identity.md b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/identity.md new file mode 100644 index 0000000000..f9967acd6e --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/identity.md @@ -0,0 +1,24 @@ +--- +Title: Identity object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the identity object used with Redis Enterprise Software REST + API calls. +linkTitle: identity +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bootstrap/identity/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| uid | integer | Assumed node's UID to join cluster. Used to replace a dead node with a new one. | +| accept_servers | boolean (default: true) | If true, no shards will be created on the node | +| addr | string | Internal IP address of node | +| external_addr | complex object | External IP addresses of node. `GET` `/jsonschema` to retrieve the object's structure. | +| name | string | Node's name | +| override_rack_id | boolean | When replacing an existing node in a rack-aware cluster, allows the new node to be located in a different rack | +| rack_id | string | Rack ID, overrides cloud config | +| use_internal_ipv6 | boolean (default: false) | Node uses IPv6 for internal communication | diff --git a/content/operate/rs/7.4/references/rest-api/objects/bootstrap/limits.md b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/limits.md new file mode 100644 index 0000000000..436c3e048c --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/limits.md @@ -0,0 +1,18 @@ +--- +Title: Limits object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the limits object used with Redis Enterprise Software REST + API calls. +linkTitle: limits +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bootstrap/limits/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| max_listeners | integer (default: 100) | Max allowed listeners on node | +| max_redis_servers | integer (default: 100) | Max allowed Redis servers on node | diff --git a/content/operate/rs/7.4/references/rest-api/objects/bootstrap/node_identity.md b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/node_identity.md new file mode 100644 index 0000000000..dfe32fe3ee --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/node_identity.md @@ -0,0 +1,21 @@ +--- +Title: Node identity object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the node_identity object used with Redis Enterprise Software + REST API calls. +linkTitle: node_identity +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bootstrap/node_identity/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| bigstore_driver | 'rocksdb' | Bigstore driver name or none (deprecated) | +| bigstore_enabled | boolean | Bigstore enabled or disabled | +| identity | [identity]({{< relref "/operate/rs/references/rest-api/objects/bootstrap/identity" >}}) object | Node identity | +| limits | [limits]({{< relref "/operate/rs/references/rest-api/objects/bootstrap/limits" >}}) object | Node limits | +| paths | [paths]({{< relref "/operate/rs/references/rest-api/objects/bootstrap/paths" >}}) object | Storage paths object | diff --git a/content/operate/rs/7.4/references/rest-api/objects/bootstrap/paths.md b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/paths.md new file mode 100644 index 0000000000..ae56bfb392 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/paths.md @@ -0,0 +1,20 @@ +--- +Title: Paths object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the paths object used with Redis Enterprise Software REST API + calls. +linkTitle: paths +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bootstrap/paths/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| bigstore_path | string | Bigredis storage path | +| ccs_persistent_path | string | Persistent storage path of CCS | +| ephemeral_path | string | Ephemeral storage path | +| persistent_path | string | Persistent storage path | diff --git a/content/operate/rs/7.4/references/rest-api/objects/bootstrap/policy.md b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/policy.md new file mode 100644 index 0000000000..86abfeca8d --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/bootstrap/policy.md @@ -0,0 +1,22 @@ +--- +Title: Policy object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the policy object used with Redis Enterprise Software REST + API calls. +linkTitle: policy +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/bootstrap/policy/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| default_fork_evict_ram | boolean (default: false) | If true, the databases should evict data from RAM to ensure successful replication or persistence | +| default_non_sharded_proxy_policy | **'single'**
'all-master-shards'
'all-nodes' | Default proxy_policy for newly created non-sharded databases' endpoints | +| default_sharded_proxy_policy | 'single'
**'all-master-shards'**
'all-nodes' | Default proxy_policy for newly created sharded databases' endpoints | +| default_shards_placement | 'dense'
**'sparse'** | Default shards_placement for newly created databases | +| rack_aware | boolean | Cluster rack awareness | +| shards_overbooking | boolean (default: true) | If true, all databases' memory_size settings are ignored during shards placement | diff --git a/content/operate/rs/7.4/references/rest-api/objects/check_result.md b/content/operate/rs/7.4/references/rest-api/objects/check_result.md new file mode 100644 index 0000000000..b587b657cd --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/check_result.md @@ -0,0 +1,25 @@ +--- +Title: Check result object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that contains the results of a cluster check +linkTitle: check_result +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/check_result/' +--- + +Cluster check result + +| Name | Type/Value | Description | +|------|------------|-------------| +| cluster_test_result | boolean | Indication if any of the tests failed | +| nodes | {{}} +[{ + "node_uid": integer, + "result": boolean, + "error": string +}, ...] +{{}} | Nodes results | diff --git a/content/operate/rs/7.4/references/rest-api/objects/cluster/_index.md b/content/operate/rs/7.4/references/rest-api/objects/cluster/_index.md new file mode 100644 index 0000000000..a20c2ec5fe --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/cluster/_index.md @@ -0,0 +1,78 @@ +--- +Title: Cluster object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents a cluster +hideListLinks: true +linkTitle: cluster +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/cluster/' +--- + +An API object that represents the cluster. + +| Name | Type/Value | Description | +|------|------------|-------------| +| alert_settings | [alert_settings]({{< relref "/operate/rs/references/rest-api/objects/cluster/alert_settings" >}}) object | Cluster and node alert settings | +| bigstore_driver | 'speedb'
'rocksdb' | Storage engine for Auto Tiering | +| cluster_ssh_public_key | string | Cluster's autogenerated SSH public key | +| cm_port | integer, (range: 1024-65535) | UI HTTPS listening port | +| cm_session_timeout_minutes | integer (default: 15) | The timeout (in minutes) for the session to the CM | +| cnm_http_max_threads_per_worker | integer (default: 10) | Maximum number of threads per worker in the `cnm_http` service (deprecated) | +| cnm_http_port | integer, (range: 1024-65535) | API HTTP listening port | +| cnm_http_workers | integer (default: 1) | Number of workers in the `cnm_http` service | +| cnm_https_port | integer, (range: 1024-65535) | API HTTPS listening port | +| control_cipher_suites | string | Specifies the enabled ciphers for the control plane. The ciphers are specified in the format understood by the BoringSSL library. | +| control_cipher_suites_tls_1_3 | string | Specifies the enabled TLS 1.3 ciphers for the control plane. The ciphers are specified in the format understood by the BoringSSL library. (read-only) | +| crdb_coordinator_port | integer, (range: 1024-65535) (default: 9081) | CRDB coordinator port | +| crdt_rest_client_retries | integer | Maximum number of retries for the REST client used by the Active-Active management API | +| crdt_rest_client_timeout | integer | Timeout for REST client used by the Active-Active management API | +| created_time | string | Cluster creation date (read-only) | +| data_cipher_list | string | Specifies the enabled ciphers for the data plane. The ciphers are specified in the format understood by the OpenSSL library. | +| data_cipher_suites_tls_1_3 | string | Specifies the enabled TLS 1.3 ciphers for the data plane. | +| debuginfo_path | string | Path to a local directory used when generating support packages | +| default_non_sharded_proxy_policy | string (default: single) | Default proxy_policy for newly created non-sharded databases' endpoints (read-only) | +| default_sharded_proxy_policy | string (default: all-master-shards) | Default proxy_policy for newly created sharded databases' endpoints (read-only) | +| email_alerts | boolean (default: false) | Send node/cluster email alerts (requires valid SMTP and email_from settings) | +| email_from | string | Sender email for automated emails | +| encrypt_pkeys | boolean (default: false) | Enable or turn off encryption of private keys | +| envoy_admin_port | integer, (range: 1024-65535) | Envoy admin port. Changing this port during runtime might result in an empty response because envoy serves as the cluster gateway.| +| envoy_max_downstream_connections | integer, (range: 100-2048) | The max downstream connections envoy is allowed to open | +| envoy_mgmt_server_port | integer, (range: 1024-65535) | Envoy management server port| +| gossip_envoy_admin_port | integer, (range: 1024-65535) | Gossip envoy admin port| +| handle_redirects | boolean (default: false) | Handle API HTTPS requests and redirect to the master node internally | +| http_support | boolean (default: false) | Enable or turn off HTTP support | +| min_control_TLS_version | '1.2'
'1.3' | The minimum version of TLS protocol which is supported at the control path | +| min_data_TLS_version | '1.2'
'1.3' | The minimum version of TLS protocol which is supported at the data path | +| min_sentinel_TLS_version | '1.2'
'1.3' | The minimum version of TLS protocol which is supported at the data path | +| name | string | Cluster's fully qualified domain name (read-only) | +| password_complexity | boolean (default: false) | Enforce password complexity policy | +| password_expiration_duration | integer (default: 0) | The number of days a password is valid until the user is required to replace it | +| proxy_certificate | string | Cluster's proxy certificate | +| proxy_max_ccs_disconnection_time | integer | Cluster-wide proxy timeout policy between proxy and CCS | +| rack_aware | boolean | Cluster operates in a rack-aware mode (read-only) | +| reserved_ports | array of strings | List of reserved ports and/or port ranges to avoid using for database endpoints (for example `"reserved_ports": ["11000", "13000-13010"]`) | +| s3_url | string | Specifies the URL for S3 export and import | +| saslauthd_ldap_conf | string | saslauthd LDAP configuration | +| sentinel_cipher_suites | array | Specifies the list of enabled ciphers for the sentinel service. The supported ciphers are those implemented by the [cipher_suites.go]() package. | +| sentinel_cipher_suites_tls_1_3 | string | Specifies the list of enabled TLS 1.3 ciphers for the discovery (sentinel) service. The supported ciphers are those implemented by the [cipher_suites.go]() package.(read-only) | +| sentinel_tls_mode | 'allowed'
'disabled'
'required' | Determines whether the discovery service allows, blocks, or requires TLS connections (previously named `sentinel_ssl_policy`)
**allowed**: Allows both TLS and non-TLS connections
**disabled**: Allows only non-TLS connections
**required**: Allows only TLS connections | +| slave_ha | boolean (default: false) | Enable the replica high-availability mechanism (read-only) | +| slave_ha_bdb_cooldown_period | integer (default: 86400) | Time in seconds between runs of the replica high-availability mechanism on different nodes on the same database (read-only) | +| slave_ha_cooldown_period | integer (default: 3600) | Time in seconds between runs of the replica high-availability mechanism on different nodes (read-only) | +| slave_ha_grace_period | integer (default: 900) | Time in seconds between a node failure and when the replica high-availability mechanism starts relocating shards (read-only) | +| slowlog_in_sanitized_support | boolean | Whether to include slowlogs in the sanitized support package | +| smtp_host | string | SMTP server for automated emails | +| smtp_password | string | SMTP server password | +| smtp_port | integer | SMTP server port for automated emails | +| smtp_tls_mode | 'none'
'starttls'
'tls' | Specifies which TLS mode to use for SMTP access | +| smtp_use_tls | boolean (default: false) | Use TLS for SMTP access (deprecated as of Redis Enterprise v4.3.3, use smtp_tls_mode field instead) | +| smtp_username | string | SMTP server username (pattern does not allow special characters &,\<,>,") | +| syncer_certificate | string | Cluster's syncer certificate | +| upgrade_mode | boolean (default: false) | Is cluster currently in upgrade mode | +| use_external_ipv6 | boolean (default: true) | Should redislabs services listen on ipv6 | +| use_ipv6 | boolean (default: true) | Should redislabs services listen on ipv6 (deprecated as of Redis Enterprise v6.4.2, replaced with use_external_ipv6) | +| wait_command | boolean (default: true) | Supports Redis wait command (read-only) | diff --git a/content/operate/rs/7.4/references/rest-api/objects/cluster/alert_settings.md b/content/operate/rs/7.4/references/rest-api/objects/cluster/alert_settings.md new file mode 100644 index 0000000000..9760fbc983 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/cluster/alert_settings.md @@ -0,0 +1,43 @@ +--- +Title: Alert settings object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the alert_settings object used with Redis Enterprise Software + REST API calls. +linkTitle: alert_settings +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/cluster/alert_settings/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| cluster_certs_about_to_expire | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Cluster certificate will expire in x days | +| cluster_even_node_count | boolean (default: false) | True high availability requires an odd number of nodes in the cluster | +| cluster_flash_overcommit | boolean (default: false) | Flash memory committed to databases is larger than cluster total flash memory | +| cluster_inconsistent_redis_sw | boolean (default: false) | Some shards in the cluster are running different versions of Redis software | +| cluster_inconsistent_rl_sw | boolean (default: false) | Some nodes in the cluster are running different versions of Redis Enterprise software | +| cluster_internal_bdb | boolean (default: false) | Issues with internal cluster databases | +| cluster_multiple_nodes_down | boolean (default: false) | Multiple cluster nodes are down (this might cause data loss) | +| cluster_node_joined | boolean (default: false) | New node joined the cluster | +| cluster_node_remove_abort_completed | boolean (default: false) | Cancel node remove operation completed | +| cluster_node_remove_abort_failed | boolean (default: false) | Cancel node remove operation failed | +| cluster_node_remove_completed | boolean (default: false) | Node removed from the cluster | +| cluster_node_remove_failed | boolean (default: false) | Failed to remove a node from the cluster | +| cluster_ocsp_query_failed | boolean (default: false) | Failed to query the OCSP server | +| cluster_ocsp_status_revoked | boolean (default: false) | OCSP certificate status is REVOKED | +| cluster_ram_overcommit | boolean (default: false) | RAM committed to databases is larger than cluster total RAM | +| cluster_too_few_nodes_for_replication | boolean (default: false) | Replication requires at least 2 nodes in the cluster | +| node_aof_slow_disk_io | boolean (default: false) | AOF reaching disk I/O limits +| node_checks_error | boolean (default: false) | Some node checks have failed | +| node_cpu_utilization | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node CPU utilization has reached the threshold value (% of the utilization limit) | +| node_ephemeral_storage | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node ephemeral storage has reached the threshold value (% of the storage limit) | +| node_failed | boolean (default: false) | Node failed | +| node_free_flash | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node flash storage has reached the threshold value (% of the storage limit) | +| node_insufficient_disk_aofrw | boolean (default: false) | Insufficient AOF disk space | +| node_internal_certs_about_to_expire | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object| Internal certificate on node will expire in x days | +| node_memory | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node memory has reached the threshold value (% of the memory limit) | +| node_net_throughput | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node network throughput has reached the threshold value (bytes/s) | +| node_persistent_storage | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node persistent storage has reached the threshold value (% of the storage limit) | diff --git a/content/operate/rs/7.4/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold.md b/content/operate/rs/7.4/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold.md new file mode 100644 index 0000000000..5e2ee44a30 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold.md @@ -0,0 +1,18 @@ +--- +Title: Cluster alert settings with threshold object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the cluster_alert_settings_with_threshold object used with + Redis Enterprise Software REST API calls. +linkTitle: cluster_alert_settings_with_threshold +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| enabled | boolean (default: false) | Alert enabled or disabled | +| threshold | string | Threshold for alert going on/off | diff --git a/content/operate/rs/7.4/references/rest-api/objects/cluster_settings.md b/content/operate/rs/7.4/references/rest-api/objects/cluster_settings.md new file mode 100644 index 0000000000..e07077e8ac --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/cluster_settings.md @@ -0,0 +1,56 @@ +--- +Title: Cluster settings object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object for cluster resource management settings +linkTitle: cluster_settings +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/cluster_settings/' +--- + +Cluster resources management policy + +| Name | Type/Value | Description | +|------|------------|-------------| +| acl_pubsub_default | `resetchannels`
`allchannels` | Default pub/sub ACL rule for all databases in the cluster:
•`resetchannels` blocks access to all channels (restrictive)
•`allchannels` allows access to all channels (permissive) | +| auto_recovery | boolean (default: false) | Defines whether to use automatic recovery after shard failure | +| automatic_node_offload | boolean (default: true) | Defines whether the cluster will automatically migrate shards from a node, in case the node is overbooked | +| bigstore_migrate_node_threshold | integer | Minimum free memory (excluding reserved memory) allowed on a node before automatic migration of shards from it to free more memory | +| bigstore_migrate_node_threshold_p | integer | Minimum free memory (excluding reserved memory) allowed on a node before automatic migration of shards from it to free more memory | +| bigstore_provision_node_threshold | integer | Minimum free memory (excluding reserved memory) allowed on a node before new shards can no longer be added to it | +| bigstore_provision_node_threshold_p | integer | Minimum free memory (excluding reserved memory) allowed on a node before new shards can no longer be added to it | +| data_internode_encryption | boolean | Enable/deactivate encryption of the data plane internode communication | +| db_conns_auditing | boolean | [Audit connections]({{< relref "/operate/rs/security/audit-events" >}}) for new databases by default if set to true. | +| default_concurrent_restore_actions | integer | Default number of restore actions allowed at the same time. Set to 0 to allow any number of simultaneous restore actions. | +| default_fork_evict_ram | boolean | If true, the bdbs should evict data from RAM to ensure successful replication or persistence | +| default_non_sharded_proxy_policy | `single`

`all-master-shards`

`all-nodes` | Default proxy_policy for newly created non-sharded databases' endpoints | +| default_provisioned_redis_version | string | Default Redis version | +| default_sharded_proxy_policy | `single`

`all-master-shards`

`all-nodes` | Default proxy_policy for newly created sharded databases' endpoints | +| default_shards_placement | `dense`
`sparse` | Default shards_placement for a newly created databases | +| endpoint_rebind_propagation_grace_time | integer | Time to wait between the addition and removal of a proxy | +| failure_detection_sensitivity | `high`
`low` | Predefined thresholds and timeouts for failure detection (previously known as `watchdog_profile`)
• `high` (previously `local-network`) – high failure detection sensitivity, lower thresholds, faster failure detection and failover
• `low` (previously `cloud`) – low failure detection sensitivity, higher tolerance for latency variance (also called network jitter) | +| hide_user_data_from_log | boolean (default: false) | Set to `true` to enable the `hide-user-data-from-log` Redis configuration setting, which avoids logging user data | +| login_lockout_counter_reset_after | integer | Number of seconds that must elapse between failed sign in attempts before the lockout counter is reset to 0. | +| login_lockout_duration | integer | Duration (in secs) of account lockout. If set to 0, the account lockout will persist until released by an admin. | +| login_lockout_threshold | integer | Number of failed sign in attempts allowed before locking a user account | +| max_saved_events_per_type | integer | Maximum saved events per event type | +| max_simultaneous_backups | integer (default: 4) | Maximum number of backup processes allowed at the same time | +| parallel_shards_upgrade | integer | Maximum number of shards to upgrade in parallel | +| persistence_cleanup_scan_interval | string | [CRON expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that defines the Redis cleanup schedule | +| persistent_node_removal | boolean | When removing a node, wait for persistence files to be created for all migrated shards | +| rack_aware | boolean | Cluster operates in a rack-aware mode | +| redis_migrate_node_threshold | integer | Minimum free memory (excluding reserved memory) allowed on a node before automatic migration of shards from it to free more memory | +| redis_migrate_node_threshold_p | integer | Minimum free memory (excluding reserved memory) allowed on a node before automatic migration of shards from it to free more memory | +| redis_provision_node_threshold | integer | Minimum free memory (excluding reserved memory) allowed on a node before new shards can no longer be added to it | +| redis_provision_node_threshold_p | integer | Minimum free memory (excluding reserved memory) allowed on a node before new shards can no longer be added to it | +| redis_upgrade_policy | **`major`**
`latest` | Create/upgrade Redis Enterprise software on databases in the cluster by compatibility with major versions or latest versions of Redis Community Edition | +| resp3_default | boolean (default: true) | Determines the default value of the `resp3` option upon upgrading a database to version 7.2 | +| shards_overbooking | boolean | If true, all databases' memory_size is ignored during shards placement | +| show_internals | boolean | Show internal databases (and their shards and endpoints) REST APIs | +| slave_ha | boolean | Enable the replica high-availability mechanism. Deprecated as of Redis Enterprise Software v7.2.4. | +| slave_ha_bdb_cooldown_period | integer | Time in seconds between runs of the replica high-availability mechanism on different nodes on the same database | +| slave_ha_cooldown_period | integer | Time in seconds between runs of the replica high-availability mechanism on different nodes on the same database | +| slave_ha_grace_period | integer | Time in seconds between a node failure and when the replica high-availability mechanism starts relocating shards | diff --git a/content/operate/rs/7.4/references/rest-api/objects/crdb/_index.md b/content/operate/rs/7.4/references/rest-api/objects/crdb/_index.md new file mode 100644 index 0000000000..e5ad74ef70 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/crdb/_index.md @@ -0,0 +1,30 @@ +--- +Title: CRDB object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents an Active-Active database +hideListLinks: true +linkTitle: crdb +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/crdb/' +--- + +An object that represents an Active-Active database. + +| Name | Type/Value | Description | +|------|------------|-------------| +| guid | string | The global unique ID of the Active-Active database | +| causal_consistency | boolean | Enables causal consistency across CRDT instances | +| default_db_config| [CRDB database_config]({{< relref "/operate/rs/references/rest-api/objects/crdb/database_config" >}}) object | Default database configuration | +| encryption | boolean | Encrypt communication | +| featureset_version | integer | Active-Active database active FeatureSet version +| instances | array of [CRDB instance_info]({{< relref "/operate/rs/references/rest-api/objects/crdb/instance_info" >}}) objects | | +| local_databases | {{}}[{ + "bdb_uid": string, + "id": integer +}, ...] {{}} | Mapping of instance IDs for local databases to local BDB IDs | +| name | string | Name of Active-Active database | +| protocol_version | integer | Active-Active database active protocol version | diff --git a/content/operate/rs/7.4/references/rest-api/objects/crdb/cluster_info.md b/content/operate/rs/7.4/references/rest-api/objects/crdb/cluster_info.md new file mode 100644 index 0000000000..d02540e81d --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/crdb/cluster_info.md @@ -0,0 +1,26 @@ +--- +Title: CRDB cluster info object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents Active-Active cluster info +linkTitle: cluster_info +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/crdb/cluster_info/' +--- + +Configuration details for a cluster that is part of an Active-Active database. + +| Name | Type/Value | Description | +|------|------------|-------------| +| credentials | {{}} +{ + "username": string, + "password": string +} {{}} | Cluster access credentials (required) | +| name | string | Cluster fully qualified name, used to uniquely identify the cluster. Typically this is the same as the hostname used in the URL, although in some configruations the URL may point to a different name/address. (required) | +| replication_endpoint | string | Address to use for peer replication. If not specified, it is assumed that standard cluster naming conventions apply. | +| replication_tls_sni | string | Cluster SNI for TLS connections | +| url | string | Cluster access URL (required) | diff --git a/content/operate/rs/7.4/references/rest-api/objects/crdb/database_config.md b/content/operate/rs/7.4/references/rest-api/objects/crdb/database_config.md new file mode 100644 index 0000000000..58c7b40113 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/crdb/database_config.md @@ -0,0 +1,40 @@ +--- +Title: CRDB database config object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents the database configuration +linkTitle: database_config +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/crdb/database_config/' +--- + +An object that represents the database configuration. + +| Name | Type/Value | Description | +|------|------------|-------------| +| aof_policy | string | Policy for Append-Only File data persistence | +| authentication_admin_pass | string | Administrative databases access token | +| authentication_redis_pass | string | Redis AUTH password (deprecated as of Redis Enterprise v7.2, replaced with multiple passwords feature in version 6.0.X) | +| bigstore | boolean | Database driver is Auto Tiering | +| bigstore_ram_size | integer | Memory size of RAM size | +| data_persistence | string | Database on-disk persistence | +| enforce_client_authentication | **'enabled'**
'disabled' | Require authentication of client certificates for SSL connections to the database. If enabled, a certificate should be provided in either `authentication_ssl_client_certs` or `authentication_ssl_crdt_certs` | +| max_aof_file_size | integer | Hint for maximum AOF file size | +| max_aof_load_time | integer | Hint for maximum AOF reload time | +| memory_size | integer | Database memory size limit, in bytes | +| oss_cluster | boolean | Enables OSS Cluster mode | +| oss_cluster_api_preferred_ip_type | string | Indicates preferred IP type in OSS cluster API: internal/external | +| oss_sharding | boolean | An alternative to shard_key_regex for using the common case of the OSS shard hashing policy | +| port | integer | TCP port for database access | +| proxy_policy | string | The policy used for proxy binding to the endpoint | +| rack_aware | boolean | Require the database to be always replicated across multiple racks | +| replication | boolean | Database replication | +| sharding | boolean (default: false) | Cluster mode (server-side sharding). When true, shard hashing rules must be provided by either `oss_sharding` or `shard_key_regex` | +| shard_key_regex | `[{ "regex": string }, ...]` | Custom keyname-based sharding rules (required if sharding is enabled)

To use the default rules you should set the value to:
`[{ “regex”: “.*\\{(?< tag >.*)\\}.*” }, { “regex”: “(?< tag >.*)” }]` | +| shards_count | integer | Number of database shards | +| shards_placement | string | Control the density of shards: should they reside on as few or as many nodes as possible | +| snapshot_policy | array of [snapshot_policy]({{< relref "/operate/rs/references/rest-api/objects/bdb/snapshot_policy" >}}) objects | Policy for snapshot-based data persistence (required) | +| tls_mode | string | Encrypt communication | diff --git a/content/operate/rs/7.4/references/rest-api/objects/crdb/health_report/_index.md b/content/operate/rs/7.4/references/rest-api/objects/crdb/health_report/_index.md new file mode 100644 index 0000000000..885155998f --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/crdb/health_report/_index.md @@ -0,0 +1,33 @@ +--- +Title: CRDB health report object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents an Active-Active database health report. +hideListLinks: true +linkTitle: health_report +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/crdb/health_report/' +--- + +An object that represents an Active-Active database health report. + +| Name | Type/Value | Description | +|------|------------|-------------| +| active_config_version | integer | Active configuration version | +| cluster_name | string | Name of local Active-Active cluster | +| configurations | array of [health_report_configuration]({{< relref "/operate/rs/references/rest-api/objects/crdb/health_report/health_report_configuration" >}}) objects | Stored database configurations | +| connection_error | string | Error string if remote cluster is not available | +| connections | {{}} +[{ + "name": string, + "replication_links": [ + { + "link_uid": "bdb_uid:replica_uid", + "status": "up | down" + } ], + "status": string +}, ...] {{}} | Connections to other clusters and their statuses. A replication link's `bdb_uid` is the unique ID of a local database instance ([bdb]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}})) in the current cluster. The `replica_uid` is the unique ID of the database's remote replica, located in the connected cluster. | +| name | string | Name of the Active-Active database | diff --git a/content/operate/rs/7.4/references/rest-api/objects/crdb/health_report/health_report_configuration.md b/content/operate/rs/7.4/references/rest-api/objects/crdb/health_report/health_report_configuration.md new file mode 100644 index 0000000000..7532fe159c --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/crdb/health_report/health_report_configuration.md @@ -0,0 +1,37 @@ +--- +Title: CRDB health report configuration object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents the database configuration to include in an + Active-Active database health report. +linkTitle: health_report_configuration +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/crdb/health_report/health_report_configuration/' +--- + +An object that represents the database configuration to include in an Active-Active database health report. + +| Name | Type/Value | Description | +|------|------------|-------------| +| causal_consistency | boolean | Enables causal consistency across Active-Active replicas | +| encryption | boolean | Intercluster encryption | +| featureset_version | integer | CRDB active FeatureSet version | +| instances | {{}}[{ + // Unique instance ID + "id": integer, + // Local database instance ID + "db_uid": string, + "cluster": { + // Cluster FQDN + "name": string + // Cluster access URL + "url": string + } +}, ...] {{}} | Local database instances | +| name | string | Name of database | +| protocol_version | integer | CRDB active protocol version | +| status | string | Current status of the configuration.
Possible values:
**posted:** Configuration was posted to all replicas
**ready:** All replicas have finished processing posted configuration (create a database)
**committed**: Posted configuration is now active on all replicas
**commit-completed:** All replicas have finished processing committed configuration (database is active)
**failed:** Configuration failed to post | +| version | integer | Database configuration version | diff --git a/content/operate/rs/7.4/references/rest-api/objects/crdb/instance_info.md b/content/operate/rs/7.4/references/rest-api/objects/crdb/instance_info.md new file mode 100644 index 0000000000..699f186c5a --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/crdb/instance_info.md @@ -0,0 +1,22 @@ +--- +Title: CRDB instance info object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents Active-Active instance info +linkTitle: instance_info +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/crdb/instance_info/' +--- + +An object that represents Active-Active instance info. + +| Name | Type/Value | Description | +|------|------------|-------------| +| id | integer | Unique instance ID | +| cluster | [CRDB cluster_info]({{< relref "/operate/rs/references/rest-api/objects/crdb/cluster_info" >}}) object | | +| compression | integer | Compression level when syncing from this source | +| db_config | [CRDB database_config]({{< relref "/operate/rs/references/rest-api/objects/crdb/database_config" >}}) object | Database configuration | +| db_uid | string | ID of local database instance. This field is likely to be empty for instances other than the local one. | diff --git a/content/operate/rs/7.4/references/rest-api/objects/crdb/modify_request.md b/content/operate/rs/7.4/references/rest-api/objects/crdb/modify_request.md new file mode 100644 index 0000000000..c73bba219b --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/crdb/modify_request.md @@ -0,0 +1,22 @@ +--- +Title: CRDB modify request object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object to update an Active-Active database +linkTitle: modify_request +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/crdb/modify_request/' +--- + +An object to update an Active-Active database. + +| Name | Type/Value | Description | +|------|------------|-------------| +| add_instances | array of [CRDB instance_info]({{< relref "/operate/rs/references/rest-api/objects/crdb/instance_info" >}}) objects | List of new CRDB instances | +| crdb | [CRDB]({{< relref "/operate/rs/references/rest-api/objects/crdb" >}}) object | An object that represents an Active-Active database | +| force_update | boolean | (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. | +| remove_instances | array of integers | List of unique instance IDs | +| remove_instances.force_remove | boolean | 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. | diff --git a/content/operate/rs/7.4/references/rest-api/objects/crdb_task.md b/content/operate/rs/7.4/references/rest-api/objects/crdb_task.md new file mode 100644 index 0000000000..f6fb253a2b --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/crdb_task.md @@ -0,0 +1,26 @@ +--- +Title: CRDB task object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents a CRDB task +linkTitle: crdb_task +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/crdb_task/' +--- + +An object that represents an Active-Active (CRDB) task. + +| Name | Type/Value | Description | +|------|------------|-------------| +| id | string | CRDB task ID (read only) | +| crdb_guid | string | Globally unique Active-Active database ID (GUID) (read-only) | +| errors | {{}} +[{ + "cluster_name": string, + "description": string, + "error_code": string +}, ...] {{}} | Details for errors that occurred on a cluster | +| status | 'queued'
'started'
'finished'
'failed' | CRDB task status (read only) | diff --git a/content/operate/rs/7.4/references/rest-api/objects/db-conns-auditing-config.md b/content/operate/rs/7.4/references/rest-api/objects/db-conns-auditing-config.md new file mode 100644 index 0000000000..6b2bcab043 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/db-conns-auditing-config.md @@ -0,0 +1,22 @@ +--- +Title: Database connection auditing configuration object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object for database connection auditing settings +linkTitle: db_conns_auditing_config +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/db-conns-auditing-config/' +--- + +Database connection auditing configuration + +| Name | Type/Value | Description | +|------|------------|-------------| +| audit_address | string | TCP/IP address where one can listen for notifications. | +| audit_port | integer | Port where one can listen for notifications. | +| audit_protocol | `TCP`
`local` | Protocol used to process notifications. For production systems, `TCP` is the only valid value. | +| audit_reconnect_interval | integer | Interval (in seconds) between attempts to reconnect to the listener. Default is 1 second. | +| audit_reconnect_max_attempts | integer | Maximum number of attempts to reconnect. Default is 0 (infinite). | diff --git a/content/operate/rs/7.4/references/rest-api/objects/db_alerts_settings/_index.md b/content/operate/rs/7.4/references/rest-api/objects/db_alerts_settings/_index.md new file mode 100644 index 0000000000..69f07a7cc5 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/db_alerts_settings/_index.md @@ -0,0 +1,36 @@ +--- +Title: Database alerts settings object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object for database alerts configuration +hideListLinks: true +linkTitle: db_alerts_settings +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/db_alerts_settings/' +--- + +An API object that represents the database alerts configuration. + +| Name | Type/Value | Description | +|------|------------|-------------| +| bdb_backup_delayed | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | Periodic backup has been delayed for longer than specified threshold value (minutes) | +| bdb_crdt_src_high_syncer_lag | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | CRDB source sync lag is higher than specified threshold value (seconds) | +| bdb_crdt_src_syncer_connection_error | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | CRDB source sync had a connection error while trying to connect to replica source | +| bdb_crdt_src_syncer_general_error | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | CRDB sync encountered in general error | +| bdb_high_latency | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | Latency is higher than specified threshold value (microsec) | +| bdb_high_syncer_lag | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | Replica of sync lag is higher than specified threshold value (seconds) (deprecated as of Redis Enterprise v5.0.1) | +| bdb_high_throughput | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | Throughput is higher than specified threshold value (requests / sec) | +| bdb_long_running_action | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | An alert for state machines that are running for too long | +| bdb_low_throughput | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | Throughput is lower than specified threshold value (requests / sec) | +| bdb_ram_dataset_overhead | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | Dataset RAM overhead of a shard has reached the threshold value (% of its RAM limit) | +| bdb_ram_values | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | Percent of values kept in a shard's RAM is lower than (% of its key count) | +| bdb_replica_src_high_syncer_lag | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | Replica of source sync lag is higher than specified threshold value (seconds) | +| bdb_replica_src_syncer_connection_error | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | Replica of source sync has connection error while trying to connect replica source | +| bdb_replica_src_syncer_general_error | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | Replica of sync encountered in general error | +| bdb_shard_num_ram_values | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | Number of values kept in a shard's RAM is lower than (values) | +| bdb_size | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | Dataset size has reached the threshold value \(% of the memory limit) | +| bdb_syncer_connection_error | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | Replica of sync has connection error while trying to connect replica source (deprecated as of Redis Enterprise v5.0.1) | +| bdb_syncer_general_error | [bdb_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold" >}}) object | Replica of sync encountered in general error (deprecated as of Redis Enterprise v5.0.1) | diff --git a/content/operate/rs/7.4/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold.md b/content/operate/rs/7.4/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold.md new file mode 100644 index 0000000000..f2ed28cd12 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold.md @@ -0,0 +1,18 @@ +--- +Title: BDB alert settings with threshold object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the bdb_alert_settings_with_threshold object used with Redis + Enterprise Software REST API calls. +linkTitle: bdb_alert_settings_with_threshold +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/db_alerts_settings/bdb_alert_settings_with_threshold/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| enabled | boolean (default: false) | Alert enabled or disabled | +| threshold | string | Threshold for alert going on/off | diff --git a/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/_index.md b/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/_index.md new file mode 100644 index 0000000000..80c08b41df --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/_index.md @@ -0,0 +1,24 @@ +--- +Title: Job scheduler object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object for job scheduler settings +hideListLinks: true +linkTitle: job_scheduler +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/job_scheduler/' +--- + +An API object that represents the job scheduler settings in the cluster. + +| Name | Type/Value | Description | +|------|------------|-------------| +| backup_job_settings | [backup_job_settings]({{< relref "/operate/rs/references/rest-api/objects/job_scheduler/backup_job_settings" >}}) object | Backup job settings | +| cert_rotation_job_settings | [cert_rotation_job_settings]({{< relref "/operate/rs/references/rest-api/objects/job_scheduler/cert_rotation_job_settings" >}}) object | Job settings for internal certificate rotation | +| log_rotation_job_settings | [log_rotation_job_settings]({{< relref "/operate/rs/references/rest-api/objects/job_scheduler/log_rotation_job_settings" >}}) object | Log rotation job settings | +| node_checks_job_settings | [node_checks_job_settings]({{< relref "/operate/rs/references/rest-api/objects/job_scheduler/node_checks_job_settings" >}}) object | Node checks job settings | +| redis_cleanup_job_settings | [redis_cleanup_job_settings]({{< relref "/operate/rs/references/rest-api/objects/job_scheduler/redis_cleanup_job_settings" >}}) object | Redis cleanup job settings (deprecated as of Redis Enterprise v6.4.2, replaced with persistence_cleanup_scan_interval) | +| rotate_ccs_job_settings | [rotate_ccs_job_settings]({{< relref "/operate/rs/references/rest-api/objects/job_scheduler/rotate_ccs_job_settings" >}}) object | Rotate CCS job settings | diff --git a/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/backup_job_settings.md b/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/backup_job_settings.md new file mode 100644 index 0000000000..005dce185e --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/backup_job_settings.md @@ -0,0 +1,17 @@ +--- +Title: Backup job settings object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the backup_job_settings object used with Redis Enterprise Software + REST API calls. +linkTitle: backup_job_settings +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/job_scheduler/backup_job_settings/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| cron_expression | string | [CRON expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that defines the backup schedule | diff --git a/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/cert_rotation_job_settings.md b/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/cert_rotation_job_settings.md new file mode 100644 index 0000000000..ea73e99bd4 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/cert_rotation_job_settings.md @@ -0,0 +1,18 @@ +--- +Title: Certificate rotation job settings object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the cert_rotation_job_settings object used with Redis Enterprise + Software REST API calls. +linkTitle: cert_rotation_job_settings +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/job_scheduler/cert_rotation_job_settings/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| cron_expression | string | [CRON expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that defines the certificate rotation schedule | +| expiry_days_before_rotation | integer, (range: 1-90) (default: 60) | Number of days before a certificate expires before rotation | diff --git a/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/log_rotation_job_settings.md b/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/log_rotation_job_settings.md new file mode 100644 index 0000000000..d027d6883f --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/log_rotation_job_settings.md @@ -0,0 +1,17 @@ +--- +Title: Log rotation job settings object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the log_rotation_job_settings object used with Redis Enterprise + Software REST API calls. +linkTitle: log_rotation_job_settings +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/job_scheduler/log_rotation_job_settings/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| cron_expression | string | [CRON expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that defines the log rotation schedule | diff --git a/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/node_checks_job_settings.md b/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/node_checks_job_settings.md new file mode 100644 index 0000000000..889502498e --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/node_checks_job_settings.md @@ -0,0 +1,17 @@ +--- +Title: Node checks job settings object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the node_checks_job_settings object used with Redis Enterprise + Software REST API calls. +linkTitle: node_checks_job_settings +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/job_scheduler/node_checks_job_settings/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| cron_expression | string | [CRON expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that defines the node checks schedule | diff --git a/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/redis_cleanup_job_settings.md b/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/redis_cleanup_job_settings.md new file mode 100644 index 0000000000..8a2f4fec7d --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/redis_cleanup_job_settings.md @@ -0,0 +1,19 @@ +--- +Title: Redis cleanup job settings object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the redis_cleanup_job_settings object used with Redis Enterprise + Software REST API calls. +linkTitle: redis_cleanup_job_settings +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/job_scheduler/redis_cleanup_job_settings/' +--- + +Deprecated and replaced with `persistence_cleanup_scan_interval`. + +| Name | Type/Value | Description | +|------|------------|-------------| +| cron_expression | string | [CRON expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that defines the Redis cleanup schedule | diff --git a/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/rotate_ccs_job_settings.md b/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/rotate_ccs_job_settings.md new file mode 100644 index 0000000000..176e1cd764 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/job_scheduler/rotate_ccs_job_settings.md @@ -0,0 +1,19 @@ +--- +Title: Rotate CCS job settings object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the rotate_ccs_job_settings object used with Redis Enterprise + Software REST API calls. +linkTitle: rotate_ccs_job_settings +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/job_scheduler/rotate_ccs_job_settings/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| cron_expression | string | [CRON expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that defines the CCS rotation schedule | +| file_suffix | string (default: 5min) | String added to the end of the rotated RDB files | +| rotate_max_num | integer, (range: 1-100) (default: 24) | The maximum number of saved RDB files | diff --git a/content/operate/rs/7.4/references/rest-api/objects/jwt_authorize.md b/content/operate/rs/7.4/references/rest-api/objects/jwt_authorize.md new file mode 100644 index 0000000000..97c4b181cb --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/jwt_authorize.md @@ -0,0 +1,20 @@ +--- +Title: JWT authorize object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object for user authentication or a JW token refresh request +linkTitle: jwt_authorize +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/jwt_authorize/' +--- + +An API object for user authentication or a JW token refresh request. + +| Name | Type/Value | Description | +|------|------------|-------------| +| password | string | The user’s password (required) | +| ttl | integer (range: 1-86400) (default: 300) | Time to live - The amount of time in seconds the token will be valid | +| username | string | The user’s username (required) | diff --git a/content/operate/rs/7.4/references/rest-api/objects/ldap.md b/content/operate/rs/7.4/references/rest-api/objects/ldap.md new file mode 100644 index 0000000000..f0ec1f6e8c --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/ldap.md @@ -0,0 +1,30 @@ +--- +Title: LDAP object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that contains the cluster's LDAP configuration +linkTitle: ldap +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/ldap/' +--- + +An API object that represents the cluster's [LDAP]({{< relref "/operate/rs/security/access-control/ldap" >}}) configuration. + +| Name | Type/Value | Description | +|------|------------|-------------| +| bind_dn | string | DN used when binding with the LDAP server to run queries | +| bind_pass | string | Password used when binding with the LDAP server to run queries | +| ca_cert | string | PEM-encoded CA certificate(s) used to validate TLS connections to the LDAP server | +| cache_ttl | integer (default: 300) | Maximum TTL (in seconds) of cached entries | +| control_plane | boolean (default: false) | Use LDAP for user authentication/authorization in the control plane | +| data_plane | boolean (default: false) | Use LDAP for user authentication/authorization in the data plane | +| directory_timeout_s | integer (range: 5-60) (default: 5) | The connection timeout to the LDAP server when authenticating a user, in seconds | +| dn_group_attr | string | The name of an attribute of the LDAP user entity that contains a list of the groups that user belongs to. (Mutually exclusive with "dn_group_query") | +| dn_group_query | complex object | An LDAP search query for mapping from a user DN to the groups the user is a member of. The substring "%D" in the filter will be replaced with the user's DN. (Mutually exclusive with "dn_group_attr") | +| starttls | boolean (default: false) | Use StartTLS negotiation for the LDAP connection | +| uris | array of strings | URIs of LDAP servers that only contain the schema, host, and port | +| user_dn_query | complex object | An LDAP search query for mapping from a username to a user DN. The substring "%u" in the filter will be replaced with the username. (Mutually exclusive with "user_dn_template") | +| user_dn_template | string | A string template that maps between the username, provided to the cluster for authentication, and the LDAP DN. The substring "%u" will be replaced with the username. (Mutually exclusive with "user_dn_query") | diff --git a/content/operate/rs/7.4/references/rest-api/objects/ldap_mapping.md b/content/operate/rs/7.4/references/rest-api/objects/ldap_mapping.md new file mode 100644 index 0000000000..e01fe579c0 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/ldap_mapping.md @@ -0,0 +1,27 @@ +--- +Title: LDAP mapping object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents a mapping between an LDAP group and roles +linkTitle: ldap_mapping +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/ldap_mapping/' +--- + +An API object that represents an [LDAP mapping]({{< relref "/operate/rs/security/access-control/ldap/map-ldap-groups-to-roles" >}}) between an LDAP group and [roles]({{< relref "/operate/rs/references/rest-api/objects/role" >}}). + +| Name | Type/Value | Description | +|------|------------|-------------| +| uid | integer | LDAP mapping's unique ID | +| account_id | integer | SM account ID | +| action_uid | string | Action UID. If it exists, progress can be tracked by the `GET` `/actions/{uid}` API (read-only) | +| bdbs_email_alerts | complex object | UIDs of databases that associated email addresses will receive alerts for | +| cluster_email_alerts | boolean | Activate cluster email alerts for an associated email | +| dn | string | An LDAP group's distinguished name | +| email | string | Email address used for alerts (if set) | +| email_alerts | boolean (default: true) | Activate email alerts for an associated email | +| name | string | Role's name | +| role_uids | array of integers | List of role UIDs associated with the LDAP group | diff --git a/content/operate/rs/7.4/references/rest-api/objects/module.md b/content/operate/rs/7.4/references/rest-api/objects/module.md new file mode 100644 index 0000000000..de20d957ef --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/module.md @@ -0,0 +1,40 @@ +--- +Title: Module object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents a Redis module +linkTitle: module +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/module/' +--- + +Represents a [Redis module]({{< relref "/operate/oss_and_stack/stack-with-enterprise" >}}). + +| Name | Type/Value | Description | +|------|------------|-------------| +| uid | string | Cluster unique ID of module | +| architecture | string | Architecture used to compile the module | +| author | string | Module creator | +| capabilities | array of strings | List of capabilities supported by this module | +| capability_name | string | Short description of module functionality | +| command_line_args | string | Command line arguments passed to the module | +| config_command | string | Name of command to configure module arguments at runtime | +| dependencies | object dependencies | Module dependencies | +| description | string | Short description of the module +| display_name | string | Name of module for display purposes | +| email | string | Author's email address | +| homepage | string | Module's homepage | +| is_bundled | boolean | Whether module came bundled with a version of Redis Enterprise | +| license | string | Module is distributed under this license +| min_redis_pack_version | string | Minimum Redis Enterprise Software cluster version required by this module | +| min_redis_version | string | Minimum Redis database version required by this module | +| module_file | string | Module filename | +| module_name | `search`
`ReJSON`
`graph`
`timeseries`
`bf` | Module's name
| +| os | string | Operating system used to compile the module | +| os_list | array of strings | List of supported operating systems | +| semantic_version | string | Module's semantic version | +| sha256 | string | SHA256 of module binary | +| version | integer | Module's version | diff --git a/content/operate/rs/7.4/references/rest-api/objects/node.md b/content/operate/rs/7.4/references/rest-api/objects/node.md new file mode 100644 index 0000000000..d9551756d9 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/node.md @@ -0,0 +1,53 @@ +--- +Title: Node object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents a node in the cluster +linkTitle: node +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/node/' +--- + +An API object that represents a node in the cluster. + +| Name | Type/Value | Description | +|------|------------|-------------| +| uid | integer | Cluster unique ID of node (read-only) | +| accept_servers | boolean (default: true) | The node only accepts new shards if `accept_servers` is `true` | +| addr | string | Internal IP address of node | +| architecture | string | Hardware architecture (read-only) | +| bigredis_storage_path | string | Flash storage path (read-only) | +| bigstore_driver | 'ibm-capi-ga1'
'ibm-capi-ga2'
'ibm-capi-ga4'
'speedb'
'rocksdb' | Bigstore driver name or none (deprecated as of Redis Enterprise v7.2, use the [cluster object]({{< relref "/operate/rs/references/rest-api/objects/cluster" >}})'s bigstore_driver instead) | +| bigstore_size | integer | Storage size of bigstore storage (read-only) | +| cores | integer | Total number of CPU cores (read-only) | +| ephemeral_storage_path | string | Ephemeral storage path (read-only) | +| ephemeral_storage_size | number | Ephemeral storage size (bytes) (read-only) | +| external_addr | complex object | External IP addresses of node. `GET` `/jsonschema` to retrieve the object's structure. | +| max_listeners | integer | Maximum number of listeners on the node | +| max_redis_servers | integer | Maximum number of shards on the node | +| os_family | 'rhel'
'ubuntu'
'amzn' | Operating system family (read-only) | +| os_name | string | Operating system name (read-only) | +| os_semantic_version | string | Full version number (read-only) | +| os_version | string | Installed OS version (human-readable) (read-only) | +| persistent_storage_path | string | Persistent storage path (read-only) | +| persistent_storage_size | number | Persistent storage size (bytes) (read- only) | +| public_addr | string | Public IP address of node (deprecated as of Redis Enterprise v4.3.3, use external_addr instead) | +| rack_id | string | Rack ID where node is installed | +| recovery_path | string | Recovery files path | +| shard_count | integer | Number of shards on the node (read-only) | +| shard_list | array of integers | Cluster unique IDs of all node shards | +| software_version | string | Installed Redis Enterprise cluster software version (read-only) | +| status | 'active'
'decommissioning'
'down'
'provisioning' | Node status (read-only) | +| supported_database_versions | {{}} +[{ + "db_type": string, + "version": string +}, ...] +{{}} | Versions of Redis Community Edition databases supported by Redis Enterprise Software on the node (read-only)
**db_type**: Type of database
**version**: Version of database | +| system_time | string | System time (UTC) (read-only) | +| total_memory | integer | Total memory of node (bytes) (read-only) | +| uptime | integer | System uptime (seconds) (read-only) | +| use_internal_ipv6 | boolean (default: false) | Node uses IPv6 for internal communication. Value is taken from bootstrap identity (read-only) | diff --git a/content/operate/rs/7.4/references/rest-api/objects/ocsp.md b/content/operate/rs/7.4/references/rest-api/objects/ocsp.md new file mode 100644 index 0000000000..2d066d568d --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/ocsp.md @@ -0,0 +1,23 @@ +--- +Title: OCSP object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents the cluster's OCSP configuration +linkTitle: ocsp +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/ocsp/' +--- + +An API object that represents the cluster's OCSP configuration. + +| Name | Type/Value | Description | +|------|------------|-------------| +| ocsp_functionality | boolean (default: false) | Enables or turns off OCSP for the cluster | +| query_frequency | integer (range: 60-86400) (default: 3600) | The time interval in seconds between OCSP queries to check the certificate’s status | +| recovery_frequency | integer (range: 60-86400) (default: 60) | The time interval in seconds between retries after the OCSP responder returns an invalid status for the certificate | +| recovery_max_tries | integer (range: 1-100) (default: 5) | The number of retries before the validation query fails and invalidates the certificate | +| responder_url | string | The OCSP server URL embedded in the proxy certificate (if available) (read-only) | +| response_timeout | integer (range: 1-60) (default: 1) | The time interval in seconds to wait for a response before timing out | diff --git a/content/operate/rs/7.4/references/rest-api/objects/ocsp_status.md b/content/operate/rs/7.4/references/rest-api/objects/ocsp_status.md new file mode 100644 index 0000000000..789c08d06a --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/ocsp_status.md @@ -0,0 +1,23 @@ +--- +Title: OCSP status object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents the cluster's OCSP status +linkTitle: ocsp_status +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/ocsp_status/' +--- + +An API object that represents the cluster's OCSP status. + +| Name | Type/Value | Description | +|------|------------|-------------| +| cert_status | string | Indicates the proxy certificate's status: GOOD/REVOKED/UNKNOWN (read-only) | +| responder_url | string | The OCSP responder URL this status came from (read-only) | +| next_update | string | The expected date and time of the next certificate status update (read-only) | +| produced_at | string | The date and time when the OCSP responder signed this response (read-only) | +| revocation_time | string | The date and time when the certificate was revoked or placed on hold (read-only) | +| this_update | string | The most recent time that the responder confirmed the current status (read-only) | diff --git a/content/operate/rs/7.4/references/rest-api/objects/proxy.md b/content/operate/rs/7.4/references/rest-api/objects/proxy.md new file mode 100644 index 0000000000..cef9cdc00e --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/proxy.md @@ -0,0 +1,36 @@ +--- +Title: Proxy object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents a proxy in the cluster +linkTitle: proxy +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/proxy/' +--- + +An API object that represents a [proxy](https://en.wikipedia.org/wiki/Proxy_server) in the cluster. + +| Name | Type/Value | Description | +|------|------------|-------------| +| uid | integer | Unique ID of the proxy (read-only) | +| backlog | integer | TCP listen queue backlog | +| client_keepcnt | integer | Client TCP keepalive count | +| client_keepidle | integer | Client TCP keepalive idle | +| client_keepintvl | integer | Client TCP keepalive interval | +| conns | integer | Number of connections | +| duration_usage_threshold | integer, (range: 10-300) | Max number of threads | +| dynamic_threads_scaling | boolean | Automatically adjust the number of threads| +| ignore_bdb_cconn_limit | boolean | Ignore client connection limits | +| ignore_bdb_cconn_output_buff_limits | boolean | Ignore buffer limit | +| log_level | `crit`
`error`
`warn`
`info`
`trace`
`debug` | Minimum log level to log. Only logs with this level or greater will be logged. | +| max_listeners | integer | Max number of listeners | +| max_servers | integer | Max number of Redis servers | +| max_threads | integer, (range: 1-256) | Max number of threads | +| max_worker_client_conns | integer | Max client connections per thread | +| max_worker_server_conns | integer | Max server connections per thread | +| max_worker_txns | integer | Max in-flight transactions per thread | +| threads | integer, (range: 1-256) | Number of threads | +| threads_usage_threshold | integer, (range: 50-99) | Max number of threads | diff --git a/content/operate/rs/7.4/references/rest-api/objects/redis_acl.md b/content/operate/rs/7.4/references/rest-api/objects/redis_acl.md new file mode 100644 index 0000000000..05c063ae07 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/redis_acl.md @@ -0,0 +1,25 @@ +--- +Title: Redis ACL object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents a Redis access control list (ACL) +linkTitle: redis_acl +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/redis_acl/' +--- + +An API object that represents a Redis [access control list (ACL)]({{< relref "/operate/rs/security/access-control/create-db-roles" >}}) + +| Name | Type/Value | Description | +|------|------------|-------------| +| uid | integer | Object's unique ID | +| account_id | integer | SM account ID | +| acl | string | Redis ACL's string | +| action_uid | string | Action UID. If it exists, progress can be tracked by the `GET` `/actions/{uid}` API (read-only) | +| name | string | Redis ACL's name | +| min_version | string | Minimum database version that supports this ACL. Read only | +| max_version | string | Maximum database version that supports this ACL. Read only | + diff --git a/content/operate/rs/7.4/references/rest-api/objects/role.md b/content/operate/rs/7.4/references/rest-api/objects/role.md new file mode 100644 index 0000000000..2fb7a70439 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/role.md @@ -0,0 +1,22 @@ +--- +Title: Role object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents a role +linkTitle: role +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/role/' +--- + +An API object that represents a role. + +| Name | Type/Value | Description | +|------|------------|-------------| +| uid | integer | Role's unique ID | +| account_id | integer | SM account ID | +| action_uid | string | Action UID. If it exists, progress can be tracked by the GET /actions/{uid} API (read-only) | +| management | 'admin'
'db_member'
'db_viewer'
'cluster_member'
'cluster_viewer'
'none' | [Management role]({{< relref "/operate/rs/references/rest-api/permissions#roles" >}}) | +| name | string | Role's name | diff --git a/content/operate/rs/7.4/references/rest-api/objects/services_configuration/_index.md b/content/operate/rs/7.4/references/rest-api/objects/services_configuration/_index.md new file mode 100644 index 0000000000..997bd05a3f --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/services_configuration/_index.md @@ -0,0 +1,24 @@ +--- +Title: Services configuration object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object for optional cluster services settings +hideListLinks: true +linkTitle: services_configuration +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/services_configuration/' +--- + +Optional cluster services settings + +| Name | Type/Value | Description | +|------|------------|-------------| +| cm_server | [cm_server]({{< relref "/operate/rs/references/rest-api/objects/services_configuration/cm_server" >}}) object | Whether to enable/disable the CM server | +| crdb_coordinator | [crdb_coordinator]({{< relref "/operate/rs/references/rest-api/objects/services_configuration/crdb_coordinator" >}}) object | Whether to enable/disable the CRDB coordinator process | +| crdb_worker | [crdb_worker]({{< relref "/operate/rs/references/rest-api/objects/services_configuration/crdb_worker" >}}) object | Whether to enable/disable the CRDB worker processes | +| mdns_server | [mdns_server]({{< relref "/operate/rs/references/rest-api/objects/services_configuration/mdns_server" >}}) object | Whether to enable/disable the multicast DNS server | +| pdns_server | [pdns_server]({{< relref "/operate/rs/references/rest-api/objects/services_configuration/pdns_server" >}}) object | Whether to enable/disable the PDNS server | +| stats_archiver | [stats_archiver]({{< relref "/operate/rs/references/rest-api/objects/services_configuration/stats_archiver" >}}) object | Whether to enable/disable the stats archiver service | diff --git a/content/operate/rs/7.4/references/rest-api/objects/services_configuration/cm_server.md b/content/operate/rs/7.4/references/rest-api/objects/services_configuration/cm_server.md new file mode 100644 index 0000000000..76578c2a0a --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/services_configuration/cm_server.md @@ -0,0 +1,17 @@ +--- +Title: CM server object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the cm_server object used with Redis Enterprise Software REST + API calls. +linkTitle: cm_server +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/services_configuration/cm_server/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| operating_mode | 'disabled'
'enabled' | Enable/disable the CM server | diff --git a/content/operate/rs/7.4/references/rest-api/objects/services_configuration/crdb_coordinator.md b/content/operate/rs/7.4/references/rest-api/objects/services_configuration/crdb_coordinator.md new file mode 100644 index 0000000000..adcbddcc8f --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/services_configuration/crdb_coordinator.md @@ -0,0 +1,17 @@ +--- +Title: CRDB coordinator object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the crdb_coordinator object used with Redis Enterprise Software + REST API calls. +linkTitle: crdb_coordinator +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/services_configuration/crdb_coordinator/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| operating_mode | 'disabled'
'enabled' | Enable/disable the CRDB coordinator process | diff --git a/content/operate/rs/7.4/references/rest-api/objects/services_configuration/crdb_worker.md b/content/operate/rs/7.4/references/rest-api/objects/services_configuration/crdb_worker.md new file mode 100644 index 0000000000..096f109d98 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/services_configuration/crdb_worker.md @@ -0,0 +1,17 @@ +--- +Title: CRDB worker object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the crdb_worker object used with Redis Enterprise Software + REST API calls. +linkTitle: crdb_worker +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/services_configuration/crdb_worker/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| operating_mode | 'disabled'
'enabled' | Enable/disable the CRDB worker processes | diff --git a/content/operate/rs/7.4/references/rest-api/objects/services_configuration/mdns_server.md b/content/operate/rs/7.4/references/rest-api/objects/services_configuration/mdns_server.md new file mode 100644 index 0000000000..a984d12f23 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/services_configuration/mdns_server.md @@ -0,0 +1,17 @@ +--- +Title: MDNS server object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the mdns_server object used with Redis Enterprise Software + REST API calls. +linkTitle: mdns_server +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/services_configuration/mdns_server/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| operating_mode | 'disabled'
'enabled' | Enable/disable the multicast DNS server | diff --git a/content/operate/rs/7.4/references/rest-api/objects/services_configuration/pdns_server.md b/content/operate/rs/7.4/references/rest-api/objects/services_configuration/pdns_server.md new file mode 100644 index 0000000000..9c95cf5959 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/services_configuration/pdns_server.md @@ -0,0 +1,17 @@ +--- +Title: PDNS server object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the pdns_server object used with Redis Enterprise Software + REST API calls. +linkTitle: pdns_server +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/services_configuration/pdns_server/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| operating_mode | 'disabled'
'enabled' | Enable/disable the PDNS server | diff --git a/content/operate/rs/7.4/references/rest-api/objects/services_configuration/stats_archiver.md b/content/operate/rs/7.4/references/rest-api/objects/services_configuration/stats_archiver.md new file mode 100644 index 0000000000..fb6c58d9f6 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/services_configuration/stats_archiver.md @@ -0,0 +1,17 @@ +--- +Title: Stats archiver object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the stats_archiver object used with Redis Enterprise Software + REST API calls. +linkTitle: stats_archiver +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/services_configuration/stats_archiver/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| operating_mode | 'disabled'
'enabled' | Enable/disable the stats archiver service | diff --git a/content/operate/rs/7.4/references/rest-api/objects/shard/_index.md b/content/operate/rs/7.4/references/rest-api/objects/shard/_index.md new file mode 100644 index 0000000000..616acdaa92 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/shard/_index.md @@ -0,0 +1,31 @@ +--- +Title: Shard object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents a database shard +hideListLinks: true +linkTitle: shard +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/shard/' +--- + +An API object that represents a Redis shard in a database. + +| Name | Type/Value | Description | +|------|------------|-------------| +| uid | string | Cluster unique ID of shard | +| assigned_slots | string | Shards hash slot range | +| backup | [backup]({{< relref "/operate/rs/references/rest-api/objects/shard/backup" >}}) object | Current status of scheduled periodic backup process | +| bdb_uid | integer | The ID of the database this shard belongs to | +| bigstore_ram_weight | number | Shards RAM distribution weight | +| detailed_status | 'busy'
'down'
'importing'
'loading'
'ok'
'timeout'
'trimming'
'unknown' | A more detailed status of the shard | +| loading | [loading]({{< relref "/operate/rs/references/rest-api/objects/shard/loading" >}}) object | Current status of dump file loading | +| node_uid | string | The ID of the node this shard is located on | +| redis_info | redis_info object | A sub-dictionary of the [Redis INFO command]({{< relref "/commands/info" >}}) | +| report_timestamp | string | The time in which the shard's info was collected (read-only) | +| role | 'master'
'slave' | Role of this shard | +| status | 'active'
'inactive'
'trimming' | The current status of the shard | +| sync | [sync]({{< relref "/operate/rs/references/rest-api/objects/shard/sync.md" >}}) object | Shard's current sync status and progress | diff --git a/content/operate/rs/7.4/references/rest-api/objects/shard/backup.md b/content/operate/rs/7.4/references/rest-api/objects/shard/backup.md new file mode 100644 index 0000000000..9f73343148 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/shard/backup.md @@ -0,0 +1,18 @@ +--- +Title: Backup object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the backup object used with Redis Enterprise Software REST + API calls. +linkTitle: backup +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/shard/backup/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| progress | number, (range: 0-100) | Shard backup progress (percentage) | +| status | 'exporting'
'succeeded'
'failed' | Status of scheduled periodic backup process | diff --git a/content/operate/rs/7.4/references/rest-api/objects/shard/loading.md b/content/operate/rs/7.4/references/rest-api/objects/shard/loading.md new file mode 100644 index 0000000000..40b732f18a --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/shard/loading.md @@ -0,0 +1,18 @@ +--- +Title: Loading object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the loading object used with Redis Enterprise Software REST + API calls. +linkTitle: loading +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/shard/loading/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| progress | number, (range: 0-100) | Percentage of bytes already loaded | +| status | 'in_progress'
'idle' | Status of the load of a dump file (read-only) | diff --git a/content/operate/rs/7.4/references/rest-api/objects/shard/sync.md b/content/operate/rs/7.4/references/rest-api/objects/shard/sync.md new file mode 100644 index 0000000000..b73a432139 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/shard/sync.md @@ -0,0 +1,18 @@ +--- +Title: Sync object +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the sync object used with Redis Enterprise Software REST API + calls. +linkTitle: sync +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/shard/sync/' +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| progress | integer | Number of bytes remaining in current sync | +| status | 'in_progress'
'idle'
'link_down' | Indication of the shard's current sync status | diff --git a/content/operate/rs/7.4/references/rest-api/objects/state-machine.md b/content/operate/rs/7.4/references/rest-api/objects/state-machine.md new file mode 100644 index 0000000000..03494d2cb5 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/state-machine.md @@ -0,0 +1,28 @@ +--- +Title: State machine object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents a state machine. +linkTitle: state-machine +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/state-machine/' +--- + +A state machine object tracks the status of database actions. + +A state machine contains the following attributes: + +| Name | Type/Value | Description | +|-------------|------------|-------------| +| action_uid | string | A globally unique identifier of the action | +| object_name | string | Name of the object being manipulated by the state machine | +| status | pending | Requested state machine has not started | +| | active | State machine is currently running | +| | completed | Operation complete | +| | failed | Operation or state machine failed | +| name | string | Name of the running (or failed) state machine | +| state | string | Current state within the state machine, when known | +| error | string | A descriptive error string for failed state machine, when known | diff --git a/content/operate/rs/7.4/references/rest-api/objects/statistics/_index.md b/content/operate/rs/7.4/references/rest-api/objects/statistics/_index.md new file mode 100644 index 0000000000..124ebe8ce0 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/statistics/_index.md @@ -0,0 +1,78 @@ +--- +Title: Statistics +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that contains metrics for clusters, databases, nodes, or shards +hideListLinks: true +linkTitle: statistics +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/statistics/' +--- + +## Statistics overview + +Clusters, databases, nodes, and shards collect various statistics at regular time intervals. View the statistics for these objects using `GET stats` requests to their respective endpoints: +- [Cluster stats]({{< relref "/operate/rs/references/rest-api/requests/cluster/stats" >}}) +- [Database stats]({{< relref "/operate/rs/references/rest-api/requests/bdbs/stats" >}}) +- [Node stats]({{< relref "/operate/rs/references/rest-api/requests/nodes/stats" >}}) +- [Shard stats]({{< relref "/operate/rs/references/rest-api/requests/shards/stats" >}}) + +View endpoint stats using `GET` requests, see: +- [Endpoint stats]({{< relref "/operate/rs/references/rest-api/requests/endpoints-stats" >}}) + +### Response object + +Statistics returned from API requests always contain the following fields: +- `interval`: a string that represents the statistics time interval. Valid values include: + - 1sec + - 10sec + - 5min + - 15min + - 1hour + - 12hour + - 1week +- `stime`: a timestamp that represents the beginning of the interval, in the format "2015-05-27T12:00:00Z" +- `etime`: a timestamp that represents the end of the interval, in the format "2015-05-27T12:00:00Z" + +The statistics returned by the API also contain fields that represent the values of different metrics for an object during the specified time interval. + +More details about the metrics relevant to each object: +- [Cluster metrics]({{< relref "/operate/rs/references/rest-api/objects/statistics/cluster-metrics" >}}) +- [DB metrics]({{< relref "/operate/rs/references/rest-api/objects/statistics/db-metrics" >}}) +- [Node metrics]({{< relref "/operate/rs/references/rest-api/objects/statistics/node-metrics" >}}) +- [Shard metrics]({{< relref "/operate/rs/references/rest-api/objects/statistics/shard-metrics" >}}) + +{{}} +Certain statistics are not documented because they are for internal use only and should be ignored. Some statistics will only appear in API responses when they are relevant. +{{}} + +### Optional URL parameters + +There are several optional URL parameters you can pass to the various `GET stats` requests to filter the returned statistics. + +- `stime`: limit the start of the time range of the returned statistics +- `etime`: limit the end of the time range of the returned statistics +- `metrics`: only return the statistics for the specified metrics (comma-separated list) + +## Maximum number of samples per interval + +The system retains a maximum number of most recent samples for each interval. + +| Interval | Max samples | +|----------|-------------| +| 1sec | 10 | +| 10sec | 30 | +| 5min | 12 | +| 15min | 96 | +| 1hour | 168 | +| 12hour | 62 | +| 1week | 53 | + +The actual number of samples returned by a `GET stats` request depends on how many samples are available and any filters applied by the optional URL parameters. For example, newly created objects (clusters, nodes, databases, or shards) or a narrow time filter range will return fewer samples. + +{{}} +To reduce load generated by stats collection, relatively inactive databases or shards (less than 5 ops/sec) do not collect 1sec stats at one second intervals. Instead, they collect 1sec stats every 2-5 seconds but still retain the same maximum number of samples. +{{}} diff --git a/content/operate/rs/7.4/references/rest-api/objects/statistics/cluster-metrics.md b/content/operate/rs/7.4/references/rest-api/objects/statistics/cluster-metrics.md new file mode 100644 index 0000000000..3297bed753 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/statistics/cluster-metrics.md @@ -0,0 +1,37 @@ +--- +Title: Cluster metrics +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the cluster metrics used with Redis Enterprise Software REST + API calls. +linkTitle: cluster metrics +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/statistics/cluster-metrics/' +--- + +| Metric name | Type | Description | +|-------------|------|-------------| +| available_flash | float | Sum of available flash in all nodes (bytes) | +| available_memory | float | Sum of available memory in all nodes (bytes) | +| avg_latency | float | Average latency of requests handled by all cluster endpoints (micro-sec); returned only when there is traffic | +| bigstore_free | float | Sum of free space of backend flash (used by flash DB's BigRedis) on all cluster nodes (bytes); only returned when BigRedis is enabled | +| bigstore_iops | float | Rate of I/O operations against backend flash for all shards which are part of a flash-based DB (BigRedis) in the cluster (ops/sec); returned only when BigRedis is enabled | +| bigstore_kv_ops | float | Rate of value read/write operations against back-end flash for all shards which are part of a flash based DB (BigRedis) in cluster (ops/sec); only returned when BigRedis is enabled | +| bigstore_throughput | float | Throughput I/O operations against backend flash for all shards which are part of a flash-based DB (BigRedis) in the cluster (bytes/sec); only returned when BigRedis is enabled | +| conns | float | Total number of clients connected to all cluster endpoints | +| cpu_idle | float | CPU idle time portion, the value is weighted between all nodes based on number of cores in each node (0-1, multiply by 100 to get percent) | +| cpu_system | float | CPU time portion spent in kernel on the cluster, the value is weighted between all nodes based on number of cores in each node (0-1, multiply by 100 to get percent) | +| cpu_user | float | CPU time portion spent by users-pace processes on the cluster. The value is weighted between all nodes based on number of cores in each node (0-1, multiply by 100 to get percent). | +| egress_bytes | float | Sum of rate of outgoing network traffic on all cluster nodes (bytes/sec) | +| ephemeral_storage_avail | float | Sum of disk space available to Redis Enterprise processes on configured ephemeral disk on all cluster nodes (bytes) | +| ephemeral_storage_free | float | Sum of free disk space on configured ephemeral disk on all cluster nodes (bytes) | +| free_memory | float | Sum of free memory in all cluster nodes (bytes) | +| ingress_bytes | float | Sum of rate of incoming network traffic on all cluster nodes (bytes/sec) | +| persistent_storage_avail | float | Sum of disk space available to Redis Enterprise processes on configured persistent disk on all cluster nodes (bytes) | +| persistent_storage_free | float | Sum of free disk space on configured persistent disk on all cluster nodes (bytes) | +| provisional_flash | float | Sum of provisional flash in all nodes (bytes) | +| provisional_memory | float | Sum of provisional memory in all nodes (bytes) | +| total_req | float | Request rate handled by all endpoints on the cluster (ops/sec) | diff --git a/content/operate/rs/7.4/references/rest-api/objects/statistics/db-metrics.md b/content/operate/rs/7.4/references/rest-api/objects/statistics/db-metrics.md new file mode 100644 index 0000000000..049faa3166 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/statistics/db-metrics.md @@ -0,0 +1,78 @@ +--- +Title: DB metrics +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the DB metrics used with Redis Enterprise Software REST API + calls. +linkTitle: DB metrics +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/statistics/db-metrics/' +--- + +| Metric name | Type | Description | +|-------------|------|-------------| +| avg_latency | float | Average latency of operations on the DB (microseconds). Only returned when there is traffic. | +| avg_other_latency | float | Average latency of other (non read/write) operations (microseconds). Only returned when there is traffic. | +| avg_read_latency | float | Average latency of read operations (microseconds). Only returned when there is traffic. | +| avg_write_latency | float | Average latency of write operations (microseconds). Only returned when there is traffic. | +| big_del_flash | float | Rate of key deletes for keys on flash (BigRedis) (key access/sec). Only returned when BigRedis is enabled. | +| big_del_ram | float | Rate of key deletes for keys in RAM (BigRedis) (key access/sec); this includes write misses (new keys created). Only returned when BigRedis is enabled. | +| big_fetch_flash | float | Rate of key reads/updates for keys on flash (BigRedis) (key access/sec). Only returned when BigRedis is enabled. | +| big_fetch_ram | float | Rate of key reads/updates for keys in RAM (BigRedis) (key access/sec). Only returned when BigRedis is enabled. | +| big_io_ratio_flash | float | Rate of key operations on flash. Can be used to compute the ratio of I/O operations (key access/sec). Only returned when BigRedis is enabled. | +| big_io_ratio_redis | float | Rate of Redis operations on keys. Can be used to compute the ratio of I/O operations (key access/sec). Only returned when BigRedis is enabled. | +| big_write_flash | float | Rate of key writes for keys on flash (BigRedis) (key access/sec). Only returned when BigRedis is enabled. | +| big_write_ram | float | Rate of key writes for keys in RAM (BigRedis) (key access/sec); this includes write misses (new keys created). Only returned when BigRedis is enabled. | +| bigstore_io_dels | float | Rate of key deletions from flash (key access/sec). Only returned when BigRedis is enabled. | +| bigstore_io_read_bytes | float | Throughput of I/O read operations against backend flash |for all shards of the DB (BigRedis) (bytes/sec). Only returned when BigRedis is enabled. | +| bigstore_io_reads | float | Rate of key reads from flash (key access/sec). Only returned when BigRedis is enabled. | +| bigstore_io_write_bytes | float | Throughput of I/O write operations against backend flash |for all shards of the DB (BigRedis) (bytes/sec). Only returned when BigRedis is enabled. | +| bigstore_io_writes | float | Rate of key writes from flash (key access/sec). Only returned when BigRedis is enabled. | +| bigstore_iops | float | Rate of I/O operations against backend flash for all shards of the DB (BigRedis) (ops/sec). Only returned when BigRedis is enabled. | +| bigstore_kv_ops | float | Rate of value read/write/del operations against backend flash for all shards of the DB (BigRedis) (key access/sec). Only returned when BigRedis is enabled | +| bigstore_objs_flash | float | Value count on flash (BigRedis). Only returned when BigRedis is enabled. | +| bigstore_objs_ram | float | Value count in RAM (BigRedis). Only returned when BigRedis is enabled. | +| bigstore_throughput | float | Throughput of I/O operations against backend flash for all shards of the DB (BigRedis) (bytes/sec). Only returned when BigRedis is enabled. | +| conns | float | Number of client connections to the DB’s endpoints | +| disk_frag_ratio | float | Flash fragmentation ratio (used/required). Only returned when BigRedis is enabled. | +| egress_bytes | float | Rate of outgoing network traffic to the DB’s endpoint (bytes/sec) | +| evicted_objects | float | Rate of key evictions from DB (evictions/sec) | +| expired_objects | float | Rate keys expired in DB (expirations/sec) | +| fork_cpu_system | float | % cores utilization in system mode for all Redis shard fork child processes of this database | +| fork_cpu_user | float | % cores utilization in user mode for all Redis shard fork child processes of this database | +| ingress_bytes | float | Rate of incoming network traffic to the DB’s endpoint (bytes/sec) | +| instantaneous_ops_per_sec | float | Request rate handled by all shards of the DB (ops/sec) | +| last_req_time | date, ISO_8601 format | Last request time received to the DB (ISO format 2015-07-05T22:16:18Z). Returns 1/1/1970 when unavailable. | +| last_res_time | date, ISO_8601 format | Last response time received from DB (ISO format 2015-07-05T22:16:18Z). Returns 1/1/1970 when unavailable. | +| main_thread_cpu_system | float | % cores utilization in system mode for all Redis shard main threads of this database | +| main_thread_cpu_user | float | % cores utilization in user mode for all Redis shard main threads of this database | +| mem_frag_ratio | float | RAM fragmentation ratio (RSS/allocated RAM) | +| mem_not_counted_for_evict | float | Portion of used_memory (in bytes) not counted for eviction and OOM errors | +| mem_size_lua | float | Redis Lua scripting heap size (bytes) | +| monitor_sessions_count | float | Number of client connected in monitor mode to the DB | +| no_of_expires | float | Number of volatile keys in the DB | +| no_of_keys | float | Number of keys in the DB | +| other_req | float | Rate of other (non read/write) requests on DB (ops/sec) | +| other_res | float | Rate of other (non read/write) responses on DB (ops/sec) | +| pubsub_channels | float | Count the pub/sub channels with subscribed clients | +| pubsub_patterns | float | Count the pub/sub patterns with subscribed clients | +| ram_overhead | float | Non values RAM overhead (BigRedis) (bytes). Only returned when BigRedis is enabled. | +| read_hits | float | Rate of read operations accessing an existing key (ops/sec) | +| read_misses | float | Rate of read operations accessing a nonexistent key (ops/sec) | +| read_req | float | Rate of read requests on DB (ops/sec) | +| read_res | float | Rate of read responses on DB (ops/sec) | +| shard_cpu_system | float | % cores utilization in system mode for all Redis shard processes of this database | +| shard_cpu_user | float | % cores utilization in user mode for the Redis shard process | +| total_connections_received | float | Rate of new client connections to the DB (connections/sec) | +| total_req | float | Rate of all requests on DB (ops/sec) | +| total_res | float | Rate of all responses on DB (ops/sec) | +| used_bigstore | float | Flash used by DB (BigRedis) (bytes). Only returned when BigRedis is enabled. | +| used_memory | float | Memory used by DB (in BigRedis this includes flash) (bytes) | +| used_ram | float | RAM used by DB (BigRedis) (bytes). Only returned when BigRedis is enabled. | +| write_hits | float | Rate of write operations accessing an existing key (ops/sec) | +| write_misses | float | Rate of write operations accessing a nonexistent key (ops/sec) | +| write_req | float | Rate of write requests on DB (ops/sec) | +| write_res | float | Rate of write responses on DB (ops/sec) | diff --git a/content/operate/rs/7.4/references/rest-api/objects/statistics/node-metrics.md b/content/operate/rs/7.4/references/rest-api/objects/statistics/node-metrics.md new file mode 100644 index 0000000000..5a63394e44 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/statistics/node-metrics.md @@ -0,0 +1,38 @@ +--- +Title: Node metrics +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the node metrics used with Redis Enterprise Software REST API + calls. +linkTitle: node metrics +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/statistics/node-metrics/' +--- + +| Metric name | Type | Description | +|-------------|------|-------------| +| available_flash | float | Available flash on the node (bytes) | +| available_memory | float | Available RAM on the node (bytes) | +| avg_latency | float | Average latency of requests handled by endpoints on the node (micro-sec); returned only when there is traffic | +| bigstore_free | float | Free space of backend flash (used by flash DB's BigRedis) (bytes); returned only when BigRedis is enabled | +| bigstore_iops | float | Rate of I/O operations against backend flash for all shards which are part of a flash-based DB (BigRedis) on the node (ops/sec); returned only when BigRedis is enabled | +| bigstore_kv_ops | float | Rate of value read/write operations against backend flash for all shards which are part of a flash-based DB (BigRedis) on the node (ops/sec); returned only when BigRedis is enabled | +| bigstore_throughput | float | Throughput of I/O operations against backend flash for all shards which are part of a flash-based DB (BigRedis) on the node (bytes/sec); returned only when BigRedis is enabled | +| conns | float | Number of clients connected to endpoints on the node | +| cpu_idle | float | CPU idle time portion (0-1, multiply by 100 to get percent) | +| cpu_system | float | CPU time portion spent in kernel (0-1, multiply by 100 to get percent) | +| cpu_user | float | CPU time portion spent by users-pace processes (0-1, multiply by 100 to get percent) | +| cur_aof_rewrites | float | Number of current AOF rewrites by shards on this node | +| egress_bytes | float | Rate of outgoing network traffic to the node (bytes/sec) | +| ephemeral_storage_avail | float | Disk space available to Redis Enterprise processes on configured ephemeral disk (bytes) | +| ephemeral_storage_free | float | Free disk space on configured ephemeral disk (bytes) | +| free_memory | float | Free memory on the node (bytes) | +| ingress_bytes | float | Rate of incoming network traffic to the node (bytes/sec) | +| persistent_storage_avail | float | Disk space available to Redis Enterprise processes on configured persistent disk (bytes) | +| persistent_storage_free | float | Free disk space on configured persistent disk (bytes) | +| provisional_flash | float | Amount of flash available for new shards on this node, taking into account overbooking, max Redis servers, reserved flash, and provision and migration thresholds (bytes) | +| provisional_memory | float | Amount of RAM available for new shards on this node, taking into account overbooking, max Redis servers, reserved memory, and provision and migration thresholds (bytes) | +| total_req | float | Request rate handled by endpoints on the node (ops/sec) | diff --git a/content/operate/rs/7.4/references/rest-api/objects/statistics/shard-metrics.md b/content/operate/rs/7.4/references/rest-api/objects/statistics/shard-metrics.md new file mode 100644 index 0000000000..a1fb53fd10 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/statistics/shard-metrics.md @@ -0,0 +1,64 @@ +--- +Title: Shard metrics +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the shard metrics used with Redis Enterprise Software REST + API calls. +linkTitle: shard metrics +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/statistics/shard-metrics/' +--- + +| Metric name | Type | Description | +|-------------|------|-------------| +| aof_rewrite_inprog | float | The number of simultaneous AOF rewrites that are in progress | +| avg_ttl | float | Estimated average time to live of a random key (msec) | +| big_del_flash | float | Rate of key deletes for keys on flash (BigRedis) (key access/sec). Only returned when BigRedis is enabled. | +| big_del_ram | float | Rate of key deletes for keys in RAM (BigRedis) (key access/sec); this includes write misses (new keys created). Only returned when BigRedis is enabled. | +| big_fetch_flash | float | Rate of key reads/updates for keys on flash (BigRedis) (key access/sec). Only returned when BigRedis is enabled. | +| big_fetch_ram | float | Rate of key reads/updates for keys in RAM (BigRedis) (key access/sec). Only returned when BigRedis is enabled. | +| big_io_ratio_flash | float | Rate of key operations on flash. Can be used to compute the ratio of I/O operations (key access/sec). Only returned when BigRedis is enabled. | +| big_io_ratio_redis | float | Rate of Redis operations on keys. Can be used to compute the ratio of I/O operations) (key access/sec). Only returned when BigRedis is enabled. | +| big_write_flash | float | Rate of key writes for keys on flash (BigRedis) (key access/sec). Only returned when BigRedis is enabled. | +| big_write_ram | float | Rate of key writes for keys in RAM (BigRedis) (key access/sec); this includes write misses (new keys created). Only returned when BigRedis is enabled. | +| bigstore_io_dels | float | Rate of key deletions from flash (key access/sec). Only returned when BigRedis is enabled. | +| bigstore_io_read_bytes | float | Throughput of I/O read operations against backend flash for all shards of the DB (BigRedis) (bytes/sec). Only returned when BigRedis is enabled. | +| bigstore_io_reads | float | Rate of key reads from flash (key access/sec). Only returned when BigRedis is enabled. | +| bigstore_io_write_bytes | float | Throughput of I/O write operations against backend flash for all shards of the DB (BigRedis) (bytes/sec). Only returned when BigRedis is enabled. | +| bigstore_io_writes | float | Rate of key writes from flash (key access/sec). Only returned when BigRedis is enabled. | +| bigstore_iops | float | Rate of I/O operations against backend flash for all shards of the DB (BigRedis) (ops/sec). Only returned when BigRedis is enabled. | +| bigstore_kv_ops | float | Rate of value read/write/del operations against backend flash for all shards of the DB (BigRedis) (key access/sec). Only returned when BigRedis is enabled. | +| bigstore_objs_flash | float | Key count on flash (BigRedis). Only returned when BigRedis is enabled. | +| bigstore_objs_ram | float | Key count in RAM (BigRedis). Only returned when BigRedis is enabled. | +| bigstore_throughput | float | Throughput of I/O operations against backend flash for all shards of the DB (BigRedis) (bytes/sec). Only returned when BigRedis is enabled. | +| blocked_clients | float | Count the clients waiting on a blocking call | +| connected_clients | float | Number of client connections to the specific shard | +| disk_frag_ratio | float | Flash fragmentation ratio (used/required). Only returned when BigRedis is enabled. | +| evicted_objects | float | Rate of key evictions from DB (evictions/sec) | +| expired_objects | float | Rate keys expired in DB (expirations/sec) | +| fork_cpu_system | float | % cores utilization in system mode for the Redis shard fork child process | +| fork_cpu_user | float | % cores utilization in user mode for the Redis shard fork child process | +| last_save_time | float | Time of the last RDB save | +| main_thread_cpu_system | float | % cores utilization in system mode for the Redis shard main thread | +| main_thread_cpu_user | float | % cores utilization in user mode for the Redis shard main thread | +| mem_frag_ratio | float | RAM fragmentation ratio (RSS/allocated RAM) | +| mem_not_counted_for_evict | float | Portion of used_memory (in bytes) not counted for eviction and OOM errors | +| mem_size_lua | float | Redis Lua scripting heap size (bytes) | +| no_of_expires | float | Number of volatile keys on the shard | +| no_of_keys | float | Number of keys in DB | +| pubsub_channels | float | Count the pub/sub channels with subscribed clients | +| pubsub_patterns | float | Count the pub/sub patterns with subscribed clients | +| rdb_changes_since_last_save | float | Count changes since last RDB save | +| read_hits | float | Rate of read operations accessing an existing key (ops/sec) | +| read_misses | float | Rate of read operations accessing a nonexistent key (ops/sec) | +| shard_cpu_system | float | % cores utilization in system mode for the Redis shard process | +| shard_cpu_user | float | % cores utilization in user mode for the Redis shard process | +| total_req | float | Rate of operations on DB (ops/sec) | +| used_memory | float | Memory used by shard (in BigRedis this includes flash) (bytes) | +| used_memory_peak | float | The largest amount of memory used by this shard (bytes) | +| used_memory_rss | float | Resident set size of this shard (bytes) | +| write_hits | float | Rate of write operations accessing an existing key (ops/sec) | +| write_misses | float | Rate of write operations accessing a nonexistent key (ops/sec) | diff --git a/content/operate/rs/7.4/references/rest-api/objects/suffix.md b/content/operate/rs/7.4/references/rest-api/objects/suffix.md new file mode 100644 index 0000000000..f189bb11ac --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/suffix.md @@ -0,0 +1,23 @@ +--- +Title: Suffix object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents a DNS suffix +linkTitle: suffix +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/suffix/' +--- + +An API object that represents a DNS suffix in the cluster. + +| Name | Type/Value | Description | +|------|------------|-------------| +| default | boolean | Suffix is the default suffix for the cluster (read-only) | +| internal | boolean | Does the suffix point to internal IP addresses (read-only) | +| mdns | boolean | Support for multicast DNS (read-only) | +| name | string | Unique suffix name that represents its zone (read-only) | +| slaves | array of strings | Frontend DNS servers to be updated by this suffix | +| use_aaaa_ns | boolean | Suffix uses AAAA NS entries (read-only) | diff --git a/content/operate/rs/7.4/references/rest-api/objects/user.md b/content/operate/rs/7.4/references/rest-api/objects/user.md new file mode 100644 index 0000000000..29e4fbdf42 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/objects/user.md @@ -0,0 +1,32 @@ +--- +Title: User object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object that represents a Redis Enterprise user +linkTitle: user +weight: $weight +url: '/operate/rs/7.4/references/rest-api/objects/user/' +--- + +An API object that represents a Redis Enterprise user. + +| Name | Type/Value | Description | +|------|------------|-------------| +| uid | integer | User's unique ID | +| account_id | integer | SM account ID | +| action_uid | string | Action UID. If it exists, progress can be tracked by the `GET` `/actions/{uid}` API request (read-only) | +| auth_method | **'regular'** | User's authentication method (deprecated as of Redis Enterprise v7.2) | +| bdbs_email_alerts | complex object | UIDs of databases that user will receive alerts for | +| cluster_email_alerts | boolean | Activate cluster email alerts for a user | +| email | string | User's email (pattern matching only ASCII characters) | +| email_alerts | boolean (default: true) | Activate email alerts for a user | +| name | string | User's name (pattern does not allow non-ASCII and special characters &,\<,>,") | +| password | string | User's password. If `password_hash_method` is set to `1`, the password should be hashed using SHA-256. The format before hashing is `username:clustername:password`. | +| password_hash_method | '1' | Used when password is passed pre-hashed to specify the hashing method | +| password_issue_date | string | The date in which the password was set (read-only) | +| role | 'admin'
'cluster_member'
'cluster_viewer'
'db_member'
**'db_viewer'**
'none' | User's [role]({{< relref "/operate/rs/references/rest-api/permissions#roles" >}}) | +| role_uids | array of integers | UIDs of user's roles for role-based access control | +| status | 'active'
'locked' | User sign-in status (read-only)
**active**: able to sign in
**locked**: unable to sign in | diff --git a/content/operate/rs/7.4/references/rest-api/permissions.md b/content/operate/rs/7.4/references/rest-api/permissions.md new file mode 100644 index 0000000000..a311253135 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/permissions.md @@ -0,0 +1,136 @@ +--- +Title: Permissions +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the permissions used with Redis Enterprise Software REST API + calls. +linkTitle: Permissions +weight: 60 +url: '/operate/rs/7.4/references/rest-api/permissions/' +--- + +Some Redis Enterprise [REST API requests]({{< relref "/operate/rs/references/rest-api/requests" >}}) may require the user to have specific permissions. + +Administrators can assign a predefined role to a user with the [Cluster Manager UI]({{< relref "/operate/rs/security/access-control/create-users" >}}) or a [`PUT /users/{uid}` API request]({{< relref "/operate/rs/references/rest-api/requests/users#put-user" >}}) to grant necessary permissions to them. + +## Roles + +Each user in the cluster has an assigned cluster management role, which defines the permissions granted to the user. + +Available management roles include: + +- **none**: No REST API permissions. +- **[db_viewer](#db-viewer-role)**: Can view database info. +- **[db_member](#db-member-role)**: Can create or modify databases and view their info. +- **[cluster_viewer](#cluster-viewer-role)**: Can view cluster and database info. +- **[cluster_member](#cluster-member-role)**: Can modify the cluster and databases and view their info. +- **[admin](#admin-role)**: Can view and modify all elements of the cluster. + +## Permissions list for each role + +| Role | Permissions | +|------|-------------| +| none | No permissions | +|
admin | [add_cluster_module](#add_cluster_module), [cancel_cluster_action](#cancel_cluster_action), [cancel_node_action](#cancel_node_action), [config_ldap](#config_ldap), [config_ocsp](#config_ocsp), [create_bdb](#create_bdb), [create_crdb](#create_crdb), [create_ldap_mapping](#create_ldap_mapping), [create_new_user](#create_new_user), [create_redis_acl](#create_redis_acl), [create_role](#create_role), [delete_bdb](#delete_bdb), [delete_cluster_module](#delete_cluster_module), [delete_crdb](#delete_crdb), [delete_ldap_mapping](#delete_ldap_mapping), [delete_redis_acl](#delete_redis_acl), [delete_role](#delete_role), [delete_user](#delete_user), [edit_bdb_module](#edit_bdb_module), [flush_crdb](#flush_crdb), [install_new_license](#install_new_license), [migrate_shard](#migrate_shard), [purge_instance](#purge_instance), [reset_bdb_current_backup_status](#reset_bdb_current_backup_status), [reset_bdb_current_export_status](#reset_bdb_current_export_status), [reset_bdb_current_import_status](#reset_bdb_current_import_status), [start_bdb_export](#start_bdb_export), [start_bdb_import](#start_bdb_import), [start_bdb_recovery](#start_bdb_recovery), [start_cluster_action](#start_cluster_action), [start_node_action](#start_node_action), [test_ocsp_status](#test_ocsp_status), [update_bdb](#update_bdb), [update_bdb_alerts](#update_bdb_alerts), [update_bdb_with_action](#update_bdb_with_action), [update_cluster](#update_cluster), [update_crdb](#update_crdb), [update_ldap_mapping](#update_ldap_mapping), [update_node](#update_node), [update_proxy](#update_proxy), [update_redis_acl](#update_redis_acl), [update_role](#update_role), [update_user](#update_user), [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_ldap_mappings_info](#view_all_ldap_mappings_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_all_users_info](#view_all_users_info), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_keys](#view_cluster_keys), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_debugging_info](#view_debugging_info), [view_endpoint_stats](#view_endpoint_stats), [view_ldap_config](#view_ldap_config), [view_ldap_mapping_info](#view_ldap_mapping_info), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_ocsp_config](#view_ocsp_config), [view_ocsp_status](#view_ocsp_status), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_redis_pass](#view_redis_pass), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action), [view_user_info](#view_user_info) | +| cluster_member | [create_bdb](#create_bdb), [create_crdb](#create_crdb), [delete_bdb](#delete_bdb), [delete_crdb](#delete_crdb), [edit_bdb_module](#edit_bdb_module), [flush_crdb](#flush_crdb), [migrate_shard](#migrate_shard), [purge_instance](#purge_instance), [reset_bdb_current_backup_status](#reset_bdb_current_backup_status), [reset_bdb_current_export_status](#reset_bdb_current_export_status), [reset_bdb_current_import_status](#reset_bdb_current_import_status), [start_bdb_export](#start_bdb_export), [start_bdb_import](#start_bdb_import), [start_bdb_recovery](#start_bdb_recovery), [update_bdb](#update_bdb), [update_bdb_alerts](#update_bdb_alerts), [update_bdb_with_action](#update_bdb_with_action), [update_crdb](#update_crdb), [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_keys](#view_cluster_keys), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_debugging_info](#view_debugging_info), [view_endpoint_stats](#view_endpoint_stats), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_redis_pass](#view_redis_pass), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action) | +| cluster_viewer | [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_endpoint_stats](#view_endpoint_stats), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action) | +| db_member | [create_bdb](#create_bdb), [create_crdb](#create_crdb), [delete_bdb](#delete_bdb), [delete_crdb](#delete_crdb), [edit_bdb_module](#edit_bdb_module), [flush_crdb](#flush_crdb), [migrate_shard](#migrate_shard), [purge_instance](#purge_instance), [reset_bdb_current_backup_status](#reset_bdb_current_backup_status), [reset_bdb_current_export_status](#reset_bdb_current_export_status), [reset_bdb_current_import_status](#reset_bdb_current_import_status), [start_bdb_export](#start_bdb_export), [start_bdb_import](#start_bdb_import), [start_bdb_recovery](#start_bdb_recovery), [update_bdb](#update_bdb), [update_bdb_alerts](#update_bdb_alerts), [update_bdb_with_action](#update_bdb_with_action), [update_crdb](#update_crdb), [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_debugging_info](#view_debugging_info), [view_endpoint_stats](#view_endpoint_stats), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_redis_pass](#view_redis_pass), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action) | +| db_viewer | [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_endpoint_stats](#view_endpoint_stats), [view_license](#view_license), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action) | + +## Roles list per permission + +| Permission | Roles | +|------------|-------| +| add_cluster_module| admin | +| cancel_cluster_action | admin | +| cancel_node_action | admin | +| config_ldap | admin | +| config_ocsp | admin | +| create_bdb | admin
cluster_member
db_member | +| create_crdb | admin
cluster_member
db_member | +| create_ldap_mapping | admin | +| create_new_user | admin | +| create_redis_acl | admin | +| create_role | admin | +| delete_bdb | admin
cluster_member
db_member | +| delete_cluster_module | admin | +| delete_crdb | admin
cluster_member
db_member | +| delete_ldap_mapping | admin | +| delete_redis_acl | admin | +| delete_role | admin | +| delete_user | admin | +| edit_bdb_module | admin
cluster_member
db_member | +| flush_crdb | admin
cluster_member
db_member | +| install_new_license | admin | +| migrate_shard | admin
cluster_member
db_member | +| purge_instance | admin
cluster_member
db_member | +| reset_bdb_current_backup_status | admin
cluster_member
db_member | +| reset_bdb_current_export_status | admin
cluster_member
db_member | +| reset_bdb_current_import_status | admin
cluster_member
db_member | +| start_bdb_export | admin
cluster_member
db_member | +| start_bdb_import | admin
cluster_member
db_member | +| start_bdb_recovery | admin
cluster_member
db_member | +| start_cluster_action | admin | +| start_node_action | admin | +| test_ocsp_status | admin | +| update_bdb | admin
cluster_member
db_member | +| update_bdb_alerts | admin
cluster_member
db_member | +| update_bdb_with_action | admin
cluster_member
db_member | +| update_cluster | admin | +| update_crdb | admin
cluster_member
db_member | +| update_ldap_mapping | admin | +| update_node | admin | +| update_proxy | admin | +| update_redis_acl | admin | +| update_role | admin | +| update_user | admin | +| view_all_bdb_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_all_bdbs_alerts | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_all_bdbs_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_all_ldap_mappings_info | admin | +| view_all_nodes_alerts | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_all_nodes_checks | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_all_nodes_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_all_nodes_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_all_proxies_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_all_redis_acls_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_all_roles_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_all_shard_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_all_users_info | admin | +| view_bdb_alerts | admin
cluster_member
cluster_viewer
db_member
db_viewer |view_bdb_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_bdb_recovery_plan | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_bdb_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_cluster_alerts | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_cluster_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_cluster_keys | admin
cluster_member | +| view_cluster_modules | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_cluster_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_crdb | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_crdb_list | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_crdb_task | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_crdb_task_list | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_debugging_info | admin
cluster_member
db_member
| +| view_endpoint_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_ldap_config | admin | +| view_ldap_mapping_info | admin | +| view_license | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_logged_events | admin
cluster_member
cluster_viewer
db_member | +| view_node_alerts | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_node_check | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_node_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_node_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_ocsp_config | admin | +| view_ocsp_status | admin | +| view_proxy_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_redis_acl_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_redis_pass | admin
cluster_member
db_member | +| view_role_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_shard_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_status_of_all_node_actions | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_status_of_cluster_action | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_status_of_node_action | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| view_user_info | admin | diff --git a/content/operate/rs/7.4/references/rest-api/quick-start.md b/content/operate/rs/7.4/references/rest-api/quick-start.md new file mode 100644 index 0000000000..ef70676313 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/quick-start.md @@ -0,0 +1,323 @@ +--- +Title: Redis Enterprise Software REST API quick start +alwaysopen: false +categories: +- docs +- operate +- rs +description: Redis Enterprise Software REST API quick start +linkTitle: Quick start +weight: 20 +url: '/operate/rs/7.4/references/rest-api/quick-start/' +--- + +Redis Enterprise Software includes a REST API that allows you to automate certain tasks. This article shows you how to send a request to the Redis Enterprise Software REST API. + +## Fundamentals + +No matter which method you use to send API requests, there are a few common concepts to remember. + +| Type | Description | +|------|-------------| +| [Authentication]({{< relref "/operate/rs/references/rest-api#authentication" >}}) | Use [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication) with your cluster username (email) and password | +| [Ports]({{< relref "/operate/rs/references/rest-api#ports" >}}) | All calls are made to port 9443 by default | +| [Versions]({{< relref "/operate/rs/references/rest-api#versions" >}}) | Specify the version in the request [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) | +| [Headers]({{< relref "/operate/rs/references/rest-api#headers" >}}) | `Accept` and `Content-Type` should be `application/json` | +| [Response types and error codes]({{< relref "/operate/rs/references/rest-api#response-types-and-error-codes" >}}) | A response of `200 OK` means success; otherwise, the request failed due to an error | + +For more information, see [Redis Enterprise Software REST API]({{< relref "/operate/rs/references/rest-api/" >}}). + +## cURL example requests + +[cURL](https://curl.se/) is a command-line tool that allows you to send HTTP requests from a terminal. + +You can use the following options to build a cURL request: + +| Option | Description | +|--------|-------------| +| -X | Method (GET, PUT, PATCH, POST, or DELETE) | +| -H | Request header, can be specified multiple times | +| -u | Username and password information | +| -d | JSON data for PUT or POST requests | +| -F | Form data for PUT or POST requests, such as for the [`POST /v1/modules`]({{< relref "/operate/rs/references/rest-api/requests/modules/#post-module" >}}) or [`POST /v2/modules`]({{< relref "/operate/rs/references/rest-api/requests/modules/#post-module-v2" >}}) endpoint | +| -k | Turn off SSL verification | +| -i | Show headers and status code as well as the response body | + +See the [cURL documentation](https://curl.se/docs/) for more information. + +### GET request + +Use the following cURL command to get a list of databases with the [GET `/v1/bdbs/`]({{< relref "/operate/rs/references/rest-api/requests/bdbs/#get-all-bdbs" >}}) endpoint. + +```sh +$ curl -X GET -H "accept: application/json" \ + -u "[username]:[password]" \ + https://[host][:port]/v1/bdbs -k -i + +HTTP/1.1 200 OK +server: envoy +date: Tue, 14 Jun 2022 19:24:30 GMT +content-type: application/json +content-length: 2833 +cluster-state-id: 42 +x-envoy-upstream-service-time: 25 + +[ + { + ... + "name": "tr01", + ... + "uid": 1, + "version": "6.0.16", + "wait_command": true + } +] +``` + +In the response body, the `uid` is the database ID. You can use the database ID to view or update the database using the API. + +For more information about the fields returned by [GET `/v1/bdbs/`]({{< relref "/operate/rs/references/rest-api/requests/bdbs/#get-all-bdbs" >}}), see the [`bdbs` object]({{< relref "/operate/rs/references/rest-api/objects/bdb/" >}}). + +### PUT request + +Once you have the database ID, you can use [PUT `/v1/bdbs/`]({{< relref "/operate/rs/references/rest-api/requests/bdbs/#put-bdbs" >}}) to update the configuration of the database. + +For example, you can pass the database `uid` 1 as a URL parameter and use the `-d` option to specify the new `name` when you send the request. This changes the database's `name` from `tr01` to `database1`: + +```sh +$ curl -X PUT -H "accept: application/json" \ + -H "content-type: application/json" \ + -u "cameron.bates@redis.com:test123" \ + https://[host]:[port]/v1/bdbs/1 \ + -d '{ "name": "database1" }' -k -i +HTTP/1.1 200 OK +server: envoy +date: Tue, 14 Jun 2022 20:00:25 GMT +content-type: application/json +content-length: 2933 +cluster-state-id: 43 +x-envoy-upstream-service-time: 159 + +{ + ... + "name" : "database1", + ... + "uid" : 1, + "version" : "6.0.16", + "wait_command" : true +} +``` + +For more information about the fields you can update with [PUT `/v1/bdbs/`]({{< relref "/operate/rs/references/rest-api/requests/bdbs/#put-bdbs" >}}), see the [`bdbs` object]({{< relref "/operate/rs/references/rest-api/objects/bdb/" >}}). + +## Client examples + +You can also use client libraries to make API requests in your preferred language. + +To follow these examples, you need: + +- A [Redis Enterprise Software]({{< relref "/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart" >}}) node +- Python 3 and the [requests](https://pypi.org/project/requests/) Python library +- [node.js](https://nodejs.dev/) and [node-fetch](https://www.npmjs.com/package/node-fetch) + +### Python + +```python +import json +import requests + +# Required connection information - replace with your host, port, username, and password +host = "[host]" +port = "[port]" +username = "[username]" +password = "[password]" + +# Get the list of databases using GET /v1/bdbs +bdbs_uri = "https://{}:{}/v1/bdbs".format(host, port) + +print("GET {}".format(bdbs_uri)) +get_resp = requests.get(bdbs_uri, + auth = (username, password), + headers = { "accept" : "application/json" }, + verify = False) + +print("{} {}".format(get_resp.status_code, get_resp.reason)) +for header in get_resp.headers.keys(): + print("{}: {}".format(header, get_resp.headers[header])) + +print("\n" + json.dumps(get_resp.json(), indent=4)) + +# Rename all databases using PUT /v1/bdbs +for bdb in get_resp.json(): + uid = bdb["uid"] # Get the database ID from the JSON response + + put_uri = "{}/{}".format(bdbs_uri, uid) + new_name = "database{}".format(uid) + put_data = { "name" : new_name } + + print("PUT {} {}".format(put_uri, json.dumps(put_data))) + + put_resp = requests.put(put_uri, + data = json.dumps(put_data), + auth = (username, password), + headers = { "content-type" : "application/json" }, + verify = False) + + print("{} {}".format(put_resp.status_code, put_resp.reason)) + for header in put_resp.headers.keys(): + print("{}: {}".format(header, put_resp.headers[header])) + + print("\n" + json.dumps(put_resp.json(), indent=4)) +``` + +See the [Python requests library documentation](https://requests.readthedocs.io/en/latest/) for more information. + +#### Output + +```sh +$ python rs_api.py +python rs_api.py +GET https://[host]:[port]/v1/bdbs +InsecureRequestWarning: Unverified HTTPS request is being made to host '[host]'. +Adding certificate verification is strongly advised. +See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings + warnings.warn( +200 OK +server: envoy +date: Wed, 15 Jun 2022 15:49:43 GMT +content-type: application/json +content-length: 2832 +cluster-state-id: 89 +x-envoy-upstream-service-time: 27 + +[ + { + ... + "name": "tr01", + ... + "uid": 1, + "version": "6.0.16", + "wait_command": true + } +] + +PUT https://[host]:[port]/v1/bdbs/1 {"name": "database1"} +InsecureRequestWarning: Unverified HTTPS request is being made to host '[host]'. +Adding certificate verification is strongly advised. +See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings + warnings.warn( +200 OK +server: envoy +date: Wed, 15 Jun 2022 15:49:43 GMT +content-type: application/json +content-length: 2933 +cluster-state-id: 90 +x-envoy-upstream-service-time: 128 + +{ + ... + "name" : "database1", + ... + "uid" : 1, + "version" : "6.0.16", + "wait_command" : true +} +``` + +### node.js + +```js +import fetch, { Headers } from 'node-fetch'; +import * as https from 'https'; + +const HOST = '[host]'; +const PORT = '[port]'; +const USERNAME = '[username]'; +const PASSWORD = '[password]'; + +// Get the list of databases using GET /v1/bdbs +const BDBS_URI = `https://${HOST}:${PORT}/v1/bdbs`; +const USER_CREDENTIALS = Buffer.from(`${USERNAME}:${PASSWORD}`).toString('base64'); +const AUTH_HEADER = `Basic ${USER_CREDENTIALS}`; + +console.log(`GET ${BDBS_URI}`); + +const HTTPS_AGENT = new https.Agent({ + rejectUnauthorized: false +}); + +const response = await fetch(BDBS_URI, { + method: 'GET', + headers: { + 'Accept': 'application/json', + 'Authorization': AUTH_HEADER + }, + agent: HTTPS_AGENT +}); + +const responseObject = await response.json(); +console.log(`${response.status}: ${response.statusText}`); +console.log(responseObject); + +// Rename all databases using PUT /v1/bdbs +for (const database of responseObject) { + const DATABASE_URI = `${BDBS_URI}/${database.uid}`; + const new_name = `database${database.uid}`; + + console.log(`PUT ${DATABASE_URI}`); + + const response = await fetch(DATABASE_URI, { + method: 'PUT', + headers: { + 'Authorization': AUTH_HEADER, + 'Content-Type': 'application/json' + }, + body: JSON.stringify({ + 'name': new_name + }), + agent: HTTPS_AGENT + }); + + console.log(`${response.status}: ${response.statusText}`); + console.log(await(response.json())); +} +``` + +See the [node-fetch documentation](https://www.npmjs.com/package/node-fetch) for more info. + +#### Output + +```sh +$ node rs_api.js +GET https://[host]:[port]/v1/bdbs +200: OK +[ + { + ... + "name": "tr01", + ... + "slave_ha" : false, + ... + "uid": 1, + "version": "6.0.16", + "wait_command": true + } +] +PUT https://[host]:[port]/v1/bdbs/1 +200: OK +{ + ... + "name" : "tr01", + ... + "slave_ha" : true, + ... + "uid" : 1, + "version" : "6.0.16", + "wait_command" : true +} +``` + +## More info + +- [Redis Enterprise Software REST API]({{< relref "/operate/rs/references/rest-api/" >}}) +- [Redis Enterprise Software REST API requests]({{< relref "/operate/rs/references/rest-api/requests/" >}}) diff --git a/content/operate/rs/7.4/references/rest-api/requests/_index.md b/content/operate/rs/7.4/references/rest-api/requests/_index.md new file mode 100644 index 0000000000..c6bd4d5682 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/_index.md @@ -0,0 +1,27 @@ +--- +Title: Redis Enterprise REST API requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the requests supported by the Redis Enterprise Software REST + API calls. +hideListLinks: true +linkTitle: Requests +weight: 30 +url: '/operate/rs/7.4/references/rest-api/requests/' +--- + +A REST API request requires the following components: +- [HTTP method](https://restfulapi.net/http-methods/) (`GET`, `PUT`, `PATCH`, `POST`, `DELETE`) +- Base URL +- Endpoint + +Some requests may also require: +- URL parameters +- [Query parameters](https://en.wikipedia.org/wiki/Query_string) +- [JSON](http://www.json.org) request body +- [Permissions]({{< relref "/operate/rs/references/rest-api/permissions" >}}) + +{{< table-children columnNames="Request,Description" columnSources="LinkTitle,Description" enableLinks="LinkTitle" >}} diff --git a/content/operate/rs/7.4/references/rest-api/requests/actions/_index.md b/content/operate/rs/7.4/references/rest-api/requests/actions/_index.md new file mode 100644 index 0000000000..4cde17c18b --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/actions/_index.md @@ -0,0 +1,143 @@ +--- +Title: Actions requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Actions requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: actions +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/actions/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-actions) | `/v1/actions` | Get all actions | +| [GET](#get-action) | `/v1/actions/{uid}` | Get a single action | + +## Get all actions {#get-all-actions} + +``` +GET /v1/actions +``` + +Get the status of all actions (executing, queued, or completed) on all entities (clusters, nodes, and databases). This API tracks long-lived API requests that return either a `task_id` or an `action_uid`. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_status_of_cluster_action]({{< relref "/operate/rs/references/rest-api/permissions#view_status_of_cluster_action" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + +``` +GET /actions +``` + +### Response {#get-all-response} + +Returns a JSON array of [action objects]({{< relref "/operate/rs/references/rest-api/objects/action" >}}) and an array of [state-machine objects]({{< relref "/operate/rs/references/rest-api/objects/state-machine" >}}). + +Regardless of an action’s source, each action in the response contains the following attributes: `name`, `action_uid`, `status`, and `progress`. + +#### Example JSON body + +```json +{ + "actions": [ + { + "action_uid": "159ca2f8-7bf3-4cda-97e8-4eb560665c28", + "name": "retry_bdb", + "node_uid": "2", + "progress": "100", + "status": "completed", + "task_id": "159ca2f8-7bf3-4cda-97e8-4eb560665c28" + }, + { + "action_uid": "661697c5-c747-41bd-ab81-ffc8fd13c494", + "name": "retry_bdb", + "node_uid": "1", + "progress": "100", + "status": "completed", + "task_id": "661697c5-c747-41bd-ab81-ffc8fd13c494" + } + ], + "state-machines": [ + { + "action_uid": "a10586b1-60bc-428e-9bc6-392eb5f0d8ae", + "heartbeat": 1650378874, + "name": "SMCreateBDB", + "object_name": "bdb:1", + "progress": 100, + "status": "completed" + } + ] +} +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error, response provides info about an ongoing action | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Action does not exist (i.e. not currently running and no available status of last run).| + +## Get a specific action {#get-action} + +``` +GET /v1/actions/{uid} +``` + +Get the status of a currently executing, queued, or completed action. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_status_of_cluster_action]({{< relref "/operate/rs/references/rest-api/permissions#view_status_of_cluster_action" >}}) | + +### Request {#get-request} + +#### Example HTTP request + +``` +GET /actions/{uid} +``` + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | string | The action_uid to check | + +### Response {#get-response} + +Returns an [action object]({{< relref "/operate/rs/references/rest-api/objects/action" >}}). + +Regardless of an action’s source, each action contains the following attributes: `name`, `action_uid`, `status`, and `progress`. + +#### Example JSON body + +```json +{ + "action_uid": "159ca2f8-7bf3-4cda-97e8-4eb560665c28", + "name": "retry_bdb", + "node_uid": "2", + "progress": "100", + "status": "completed", + "task_id": "159ca2f8-7bf3-4cda-97e8-4eb560665c28" +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error, response provides info about an ongoing action | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Action does not exist (i.e. not currently running and no available status of last run) | diff --git a/content/operate/rs/7.4/references/rest-api/requests/actions/bdb.md b/content/operate/rs/7.4/references/rest-api/requests/actions/bdb.md new file mode 100644 index 0000000000..f995b5c352 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/actions/bdb.md @@ -0,0 +1,75 @@ +--- +Title: Database actions requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Database actions requests +headerRange: '[1-2]' +linkTitle: bdb +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/actions/bdb/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-db-actions) | `/v1/actions/bdb/{bdb_uid}` | Get the status of a specific database's actions | + +## Get database actions {#get-db-actions} + +``` +GET /v1/actions/bdb/{bdb_uid} +``` + +Get the status of all currently executing, pending, or completed state-machine-related actions for a specific database. This API tracks short-lived API requests that return `action_uid`. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_status_of_cluster_action]({{< relref "/operate/rs/references/rest-api/permissions#view_status_of_cluster_action" >}}) | + +### Request {#get-request} + +#### Example HTTP request + +``` +GET /actions/bdb/1 +``` + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| bdb_uid | string | Unique database ID | + +### Response {#get-response} + +Returns an array of JSON objects with attributes from [actions]({{< relref "/operate/rs/references/rest-api/objects/action" >}}) and [state machines]({{< relref "/operate/rs/references/rest-api/objects/state-machine" >}}). + +Each action contains the following attributes: `name`, `action_uid`, `status`, and `progress`. + +#### Example JSON body + +```json +[ + { + "action_uid": "8afc7f70-f3ae-4244-a5e9-5133e78b2e97", + "heartbeat": 1703067908, + "name": "SMUpdateBDB", + "object_name": "bdb:1", + "pending_ops": {}, + "progress": 50.0, + "state": "proxy_policy", + "status": "active" + } +] +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error, response provides info about state-machine actions | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | bdb not found | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/_index.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/_index.md new file mode 100644 index 0000000000..6197235720 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/_index.md @@ -0,0 +1,657 @@ +--- +Title: Database requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Database requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: bdbs +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-bdbs) | `/v1/bdbs` | Get all databases | +| [GET](#get-bdbs) | `/v1/bdbs/{uid}` | Get a single database | +| [PUT](#put-bdbs) | `/v1/bdbs/{uid}` | Update database configuration | +| [PUT](#put-bdbs-action) | `/v1/bdbs/{uid}/{action}` | Update database configuration and perform additional action | +| [POST](#post-bdbs-v1) | `/v1/bdbs` | Create a new database | +| [POST](#post-bdbs-v2) | `/v2/bdbs` | Create a new database | +| [DELETE](#delete-bdbs) | `/v1/bdbs/{uid}` | Delete a database | + +## Get all databases {#get-all-bdbs} + +```sh +GET /v1/bdbs +``` + +Get all databases in the cluster. + +### Permissions + +| Permission name | Roles | +|-----------------|---------| +| [view_all_bdbs_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_bdbs_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-all-request} + +#### Example HTTP request + +```sh +GET /v1/bdbs?fields=uid,name +``` + +#### Headers + +| Key | Value | +|-----|-------| +| Host | The domain name or IP of the cluster | +| Accept | application/json | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| fields | string | Comma-separated list of field names to return (by default all fields are returned). (optional) | + +### Response {#get-all-response} + +The response body contains a JSON array with all databases, represented as [BDB objects]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}). + +#### Body + +```json +[ + { + "uid": 1, + "name": "name of database #1", + "// additional fields..." + }, + { + "uid": 2, + "name": "name of database #2", + "// additional fields..." + } +] +``` + +#### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + +### Example requests + +#### cURL + +```sh +$ curl -k -X GET -u "[username]:[password]" \ + -H "accept: application/json" \ + https://[host][:port]/v1/bdbs?fields=uid,name +``` + +#### Python + +```python +import requests +import json + +url = "https://[host][:port]/v1/bdbs?fields=uid,name" +auth = ("[username]", "[password]") + +headers = { + 'Content-Type': 'application/json' +} + +response = requests.request("GET", url, auth=auth, headers=headers) + +print(response.text) +``` + +## Get a database {#get-bdbs} + +```sh +GET /v1/bdbs/{int: uid} +``` + +Get a single database. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /bdbs/1 +``` + +#### Headers + +| Key | Value | +|-----|-------| +| Host | The domain name or IP of the cluster | +| Accept | application/json | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database requested. | + + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| fields | string | Comma-separated list of field names to return (by default all fields are returned). (optional) | + +### Response {#get-response} + +Returns a [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}). + +#### Example JSON body + +```json +{ + "uid": 1, + "name": "name of database #1", + "// additional fields..." +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Database UID does not exist | + +## Update database configuration {#put-bdbs} + +```sh +PUT /v1/bdbs/{int: uid} +``` +Update the configuration of an active database. + +If called with the `dry_run` URL query string, the function will validate the [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}) against the existing database, but will not invoke the state machine that will update it. + +This is the basic version of the update request. See [Update database and perform action](#put-bdbs-action) to send an update request with an additional action. + +To track this request's progress, poll the [`/actions/` endpoint]({{< relref "/operate/rs/references/rest-api/requests/bdbs/actions" >}}) with the action_uid returned in the response body. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_bdb]({{< relref "/operate/rs/references/rest-api/permissions#update_bdb" >}}) | admin
cluster_member
db_member | + +### Request {#put-request} + +#### Example HTTP request + +```sh +PUT /bdbs/1 +``` + +#### Headers + +| Key | Value | +|-----|-------| +| Host | The domain name or IP of the cluster | +| Accept | application/json | +| Content-type | application/json | + +#### Query parameters + +| Field | Type | Description | +|---------|------|---------------| +| dry_run | | Validate the new [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}) but don't apply the update. | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database for which update is requested. | + +#### Body + +Include a [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}) with updated fields in the request body. + +##### Example JSON body + +```json +{ + "replication": true, + "data_persistence": "aof" +} +``` + +The above request attempts to modify a database configuration to enable in-memory data replication and append-only file data persistence. + +### Response {#put-response} + +Returns the updated [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}). + +#### Example JSON body + +```json +{ + "uid": 1, + "replication": true, + "data_persistence": "aof", + "// additional fields..." +} +``` + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The request is accepted and is being processed. The database state will be 'active-change-pending' until the request has been fully processed. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to change a nonexistent database. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The requested configuration is invalid. | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Attempting to change a database while it is busy with another configuration change. In this context, this is a temporary condition, and the request should be reattempted later. | + +#### Error codes {#put-error-codes} + +When errors are reported, the server may return a JSON object with `error_code` and `message` field that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| rack_awareness_violation | • Non rack-aware cluster.
• Not enough nodes in unique racks. | +| invalid_certificate | SSL client certificate is missing or malformed.| +| certificate_expired | SSL client certificate has expired. | +| duplicated_certs | An SSL client certificate appears more than once. | +| insufficient_resources | Shards count exceeds shards limit per bdb. | +| not_supported_action_on_crdt | `reset_admin_pass` action is not allowed on CRDT enabled BDB. | +| name_violation | CRDT database name cannot be changed. | +| bad_shards_blueprint | The sharding blueprint is broken or doesn’t fit the BDB. | +| replication_violation | CRDT database must use replication. | +| eviction_policy_violation | LFU eviction policy is not supported on bdb version<4 | +| replication_node_violation | Not enough nodes for replication. | +| replication_size_violation | Database limit too small for replication. | +| invalid_oss_cluster_configuration | BDB configuration does not meet the requirements for OSS cluster mode | +| missing_backup_interval | BDB backup is enabled but backup interval is missing. | +| crdt_sharding_violation | CRDB created without sharding cannot be changed to use sharding +| invalid_proxy_policy | Invalid proxy_policy value. | +| invalid_bdb_tags | Tag objects with the same key parameter were passed. | +| unsupported_module_capabilities | Not all modules configured for the database support the capabilities needed for the database configuration. | +| redis_acl_unsupported | Redis ACL is not supported for this database. | + +## Update database and perform action {#put-bdbs-action} + +```sh +PUT /v1/bdbs/{int: uid}/{action} +``` +Update the configuration of an active database and perform an additional action. + +If called with the `dry_run` URL query string, the function will validate the [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}) against the existing database, but will not invoke the state machine that will update it. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_bdb_with_action]({{< relref "/operate/rs/references/rest-api/permissions#update_bdb_with_action" >}}) | admin
cluster_member
db_member | + +### Request {#put-request-action} + +#### Example HTTP request + +```sh +PUT /bdbs/1/reset_admin_pass +``` +The above request resets the admin password after updating the database. + +#### Headers + +| Key | Value | +|-----|-------| +| Host | The domain name or IP of the cluster | +| Accept | application/json | +| Content-type | application/json | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database to update. | +| action | string | Additional action to perform. Currently supported actions are: `flush`, `reset_admin_pass`. | + +#### Query parameters + +| Field | Type | Description | +|---------|------|---------------| +| dry_run | | Validate the new [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}) but don't apply the update. | + +#### Body + +Include a [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}) with updated fields in the request body. + +##### Example JSON body + +```json +{ + "replication": true, + "data_persistence": "aof" +} +``` + +The above request attempts to modify a database configuration to enable in-memory data replication and append-only file data persistence. + +{{}} +To change the shard hashing policy, you must flush all keys from the database. +{{}} + +### Response {#put-response-action} + +If the request succeeds, the response body returns the updated [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}). If an error occurs, the response body may include an error code and message with more details. + +#### Status codes {#put-status-codes-action} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The request is accepted and is being processed. The database state will be 'active-change-pending' until the request has been fully processed. | +| [403 Forbidden](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4) | redislabs license expired. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to change a nonexistent database. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The requested configuration is invalid. | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Attempting to change a database while it is busy with another configuration change. In this context, this is a temporary condition, and the request should be reattempted later. | + +#### Error codes {#put-error-codes-action} + +When errors are reported, the server may return a JSON object with `error_code` and `message` field that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| rack_awareness_violation | • Non rack-aware cluster.
• Not enough nodes in unique racks. | +| invalid_certificate | SSL client certificate is missing or malformed.| +| certificate_expired | SSL client certificate has expired. | +| duplicated_certs | An SSL client certificate appears more than once. | +| insufficient_resources | Shards count exceeds shards limit per bdb. | +| not_supported_action_on_crdt | `reset_admin_pass` action is not allowed on CRDT enabled BDB. | +| name_violation | CRDT database name cannot be changed. | +| bad_shards_blueprint | The sharding blueprint is broken or doesn’t fit the BDB. | +| replication_violation | CRDT database must use replication. | +| eviction_policy_violation | LFU eviction policy is not supported on bdb version<4 | +| replication_node_violation | Not enough nodes for replication. | +| replication_size_violation | Database limit too small for replication. | +| invalid_oss_cluster_configuration | BDB configuration does not meet the requirements for OSS cluster mode | +| missing_backup_interval | BDB backup is enabled but backup interval is missing. | +| crdt_sharding_violation | CRDB created without sharding cannot be changed to use sharding +| invalid_proxy_policy | Invalid proxy_policy value. | +| invalid_bdb_tags | Tag objects with the same key parameter were passed. | +| unsupported_module_capabilities | Not all modules configured for the database support the capabilities needed for the database configuration. | +| redis_acl_unsupported | Redis ACL is not supported for this database. | + +## Create database v1 {#post-bdbs-v1} + +```sh +POST /v1/bdbs +``` +Create a new database in the cluster. + +The request must contain a single JSON [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}) with the configuration parameters for the new database. + +The following parameters are required to create the database: + +| Parameter | Type/Value | Description | +|----------|------------|-------------| +| name | string | Name of the new database | +| memory_size | integer | Size of the database, in bytes | + +If passed with the `dry_run` URL query string, the function will validate the [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}), but will not invoke the state machine that will create it. + +To track this request's progress, poll the [`/actions/` endpoint]({{< relref "/operate/rs/references/rest-api/requests/bdbs/actions" >}}) with the `action_uid` returned in the response body. + +The cluster will use default configuration for any missing database field. The cluster creates a database UID if it is missing. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [create_bdb]({{< relref "/operate/rs/references/rest-api/permissions#create_bdb" >}}) | admin
cluster_member
db_member | + +### Request {#post-request-v1} + +#### Example HTTP request + +```sh +POST /bdbs +``` + +#### Headers + +| Key | Value | +|-----|-------| +| Host | The domain name or IP of the cluster | +| Accept | application/json | +| Content-type | application/json | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| dry_run | | Validate the new [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}) but don't create the database. | + +#### Body + +Include a [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}) in the request body. + +The following parameters are required to create the database: + +| Paramter | Type/Value | Description | +|----------|------------|-------------| +| name | string | Name of the new database | +| memory_size | integer | Size of the database, in bytes | + +The `uid` of the database is auto-assigned by the cluster because it was not explicitly listed in this request. If you specify the database ID (`uid`), then you must specify the database ID for every subsequent database and make sure that the database ID does not conflict with an existing database. If you do not specify the database ID, then the it is automatically assigned in sequential order. + +Defaults are used for all other configuration parameters. + +#### Example JSON body + +```json +{ + "name": "test-database", + "type": "redis", + "memory_size": 1073741824 +} +``` + +The above request is an attempt to create a Redis database with a user-specified name and a memory limit of 1GB. + +### Response {#post-response-v1} + +The response includes the newly created [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}). + +#### Example JSON body + +```json +{ + "uid": 1, + "name": "test-database", + "type": "redis", + "memory_size": 1073741824, + "// additional fields..." +} +``` + +#### Error codes {#post-error-codes-v1} + +When errors are reported, the server may return a JSON object with `error_code` and `message` field that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| uid_exists | The specified database UID is already in use. | +| missing_db_name | DB name is a required property. | +| missing_memory_size | Memory Size is a required property. | +| missing_module | Modules missing from the cluster. | +| port_unavailable | The specified database port is reserved or already in use. | +| invalid_sharding | Invalid sharding configuration was specified. | +| bad_shards_blueprint | The sharding blueprint is broken. | +| not_rack_aware | Cluster is not rack-aware and a rack-aware database was requested. | +| invalid_version | An invalid database version was requested. | +| busy | The request failed because another request is being processed at the same time on the same database. | +| invalid_data_persistence | Invalid data persistence configuration. | +| invalid_proxy_policy | Invalid proxy_policy value. | +| invalid_sasl_credentials | SASL credentials are missing or invalid. | +| invalid_replication | Not enough nodes to perform replication. | +| insufficient_resources | Not enough resources in cluster to host the database. | +| rack_awareness_violation | • Rack awareness violation.
• Not enough nodes in unique racks. | +| invalid_certificate | SSL client certificate is missing or malformed. | +| certificate_expired | SSL client certificate has expired. | +| duplicated_certs | An SSL client certificate appears more than once. | +| replication_violation | CRDT database must use replication. | +| eviction_policy_violation | LFU eviction policy is not supported on bdb version<4 | +| invalid_oss_cluster_configuration | BDB configuration does not meet the requirements for OSS cluster mode | +| memcached_cannot_use_modules | Cannot create a memcached database with modules. | +| missing_backup_interval | BDB backup is enabled but backup interval is missing. | +| wrong_cluster_state_id | The given CLUSTER-STATE-ID does not match the current one +| invalid_bdb_tags | Tag objects with the same key parameter were passed. | +| unsupported_module_capabilities | Not all modules configured for the database support the capabilities needed for the database configuration. | +| redis_acl_unsupported | Redis ACL is not supported for this database. | + +#### Status codes {#post-status-codes-v1} + +| Code | Description | +|------|-------------| +| [403 Forbidden](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4) | redislabs license expired. | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Database with the same UID already exists. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Invalid configuration parameters provided. | +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, database is being created. | + +## Create database v2 {#post-bdbs-v2} + +```sh +POST /v2/bdbs +``` +Create a new database in the cluster. See [`POST /v1/bdbs`]({{< relref "/operate/rs/references/rest-api/requests/bdbs#post-bdbs-v1" >}}) for more information. + +The database's configuration should be under the "bdb" field. + +This endpoint allows you to specify a recovery_plan to recover a database. If you include a recovery_plan within the request body, the database will be loaded from the persistence files according to the recovery plan. The recovery plan must match the number of shards requested for the database. + +The persistence files must exist in the locations specified by the recovery plan. The persistence files must belong to a database with the same shard settings as the one being created (slot range distribution and shard_key_regex); otherwise, the operation will fail or yield unpredictable results. + +If you create a database with a shards_blueprint and a recovery plan, the shard placement may not fully follow the shards_blueprint. + +### Request {#post-request-v2} + +#### Example HTTP request + +```sh +POST /v2/bdbs +``` + +#### Headers + +| Key | Value | +|-----|-------| +| Host | The domain name or IP of the cluster | +| Accept | application/json | +| Content-type | application/json | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| dry_run | | Validate the new [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}) but don't create the database. | + +#### Body + +Include a JSON object that contains a [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}) and an optional `recovery_plan` object in the request body. + +##### Example JSON body + +```json +{ + "bdb": { + "name": "test-database", + "type": "redis", + "memory_size": 1073741824, + "shards_count": 1 + }, + "recovery_plan": { + "data_files": [ + { + "shard_slots": "0-16383", + "node_uid": "1", + "filename": "redis-4.rdb" + } + ] + } +} +``` + +### Response {#post-response-v2} + +The response includes the newly created [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}). + +#### Example JSON body + +```json +{ + "uid": 1, + "name": "test-database", + "type": "redis", + "memory_size": 1073741824, + "shards_count": 1, + "// additional fields..." +} +``` + +## Delete database {#delete-bdbs} + +```sh +DELETE /v1/bdbs/{int: uid} +``` +Delete an active database. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [delete_bdb]({{< relref "/operate/rs/references/rest-api/permissions#delete_bdb" >}}) | admin
cluster_member
db_member | + +### Request {#delete-request} + +#### Example HTTP request + +```sh +DELETE /bdbs/1 +``` +#### Headers + +| Key | Value | +|-----|-------| +| Host | The domain name or IP of the cluster | +| Accept | application/json | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database to delete. | + +### Response {#delete-response} + +Returns a status code that indicates the database deletion success or failure. + +### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The request is accepted and is being processed. The database state will be 'delete-pending' until the request has been fully processed. | +| [403 Forbidden](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4) | Attempting to delete an internal database. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to delete a nonexistent database. | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Either the database is not in 'active' state and cannot be deleted, or it is busy with another configuration change. In the second case, this is a temporary condition, and the request should be re-attempted later. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/_index.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/_index.md new file mode 100644 index 0000000000..141482b1f5 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/_index.md @@ -0,0 +1,47 @@ +--- +Title: Database actions requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Database action requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: actions +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/actions/' +--- + +## Backup + +| Method | Path | Description | +|--------|------|-------------| +| [PUT]({{< relref "./backup_reset_status#put-bdbs-actions-backup-reset-status" >}}) | `/v1/bdbs/{uid}/actions/backup_reset_status` | Reset database backup status | + +## Export + +| Method | Path | Description | +|--------|------|-------------| +| [PUT]({{< relref "./export_reset_status#put-bdbs-actions-export-reset-status" >}}) | `/v1/bdbs/{uid}/actions/export_reset_status` | Reset database export status | +| [POST]({{< relref "./export#post-bdbs-actions-export" >}}) | `/v1/bdbs/{uid}/actions/export` | Initiate database export | + +## Import + +| Method | Path | Description | +|--------|------|-------------| +| [PUT]({{< relref "./import_reset_status#put-bdbs-actions-import-reset-status" >}}) | `/v1/bdbs/{uid}/actions/import_reset_status` | Reset database import status | +| [POST]({{< relref "./import#post-bdbs-actions-import" >}}) | `/v1/bdbs/{uid}/actions/import` | Initiate manual dataset import | + +## Optimize shards placement + +| Method | Path | Description | +|--------|------|-------------| +| [GET]({{< relref "./optimize_shards_placement#get-bdbs-actions-optimize-shards-placement" >}}) | `/v1/bdbs/{uid}/actions/optimize_shards_placement` | Get optimized shards placement for a database | + +## Recover + +| Method | Path | Description | +|--------|------|-------------| +| [GET]({{}}) | `/v1/bdbs/{uid}/actions/recover` | Get database recovery plan | +| [POST]({{}}) | `/v1/bdbs/{uid}/actions/recover` | Recover database | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/backup_reset_status.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/backup_reset_status.md new file mode 100644 index 0000000000..22ddb1ea4a --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/backup_reset_status.md @@ -0,0 +1,66 @@ +--- +Title: Backup reset status database action requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Reset database backup status requests +headerRange: '[1-2]' +linkTitle: backup_reset_status +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/actions/backup_reset_status/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [PUT](#put-bdbs-actions-backup-reset-status) | `/v1/bdbs/{uid}/actions/backup_reset_status` | Reset database backup status | + +## Reset database backup status {#put-bdbs-actions-backup-reset-status} + +```sh +PUT /v1/bdbs/{int: uid}/actions/backup_reset_status +``` + +Resets the database's `backup_status` to idle if a backup is not in progress and clears the value of the `backup_failure_reason` field. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [reset_bdb_current_backup_status]({{< relref "/operate/rs/references/rest-api/permissions#reset_bdb_current_backup_status" >}}) | admin
cluster_member
db_member | + +### Request {#put-request} + +#### Example HTTP request + +```sh +PUT /bdbs/1/actions/backup_reset_status +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database | + +### Response {#put-response} + +Returns a status code. + +#### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The request is accepted and is being processed. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to perform an action on a nonexistent database. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Not all the modules loaded to the database support 'backup_restore' capability | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Database is currently busy with another action. In this context, this is a temporary condition and the request should be reattempted later. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/export.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/export.md new file mode 100644 index 0000000000..1606299ff2 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/export.md @@ -0,0 +1,90 @@ +--- +Title: Export database action requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Export database requests +headerRange: '[1-2]' +linkTitle: export +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/actions/export/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-bdbs-actions-export) | `/v1/bdbs/{uid}/actions/export` | Initiate database export | + +## Initiate database export {#post-bdbs-actions-export} + +```sh +POST /v1/bdbs/{int: uid}/actions/export +``` + +Initiate a database export. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [start_bdb_export]({{< relref "/operate/rs/references/rest-api/permissions#start_bdb_export" >}}) | admin
cluster_member
db_member | + +### Request {#post-request} + +#### Example HTTP request + +```sh +POST /bdbs/1/actions/export +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database | + + +#### Body + +The request body should contain a JSON object with the following export parameters: + +| Field | Type | Description | +|-------|------|-------------| +| export_location | [backup_location/export_location]({{< relref "/operate/rs/references/rest-api/objects/bdb/backup_location" >}}) object | Details for the export destination. Call [`GET /jsonschema`]({{< relref "/operate/rs/references/rest-api/requests/jsonschema#get-jsonschema" >}}) on the bdb object and review the `backup_location` field to retrieve the object's structure. | +| email_notification | boolean | Enable/disable an email notification on export failure/ completion. (optional) | + +##### Example JSON body + +```json +{ + "export_location": { + "type": "url", + "url": "ftp://..." + }, + "email_notification": true +} +``` + +The above request initiates an export operation to the specified location. + +### Response {#post-response} + +Returns a status code. + +#### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The request is accepted and is being processed. In order to monitor progress, the BDB's `export_status`, `export_progress`, and `export_failure_reason` attributes can be consulted. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to perform an action on a nonexistent database. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Not all the modules loaded to the database support 'backup_restore' capability | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Database is currently busy with another action. In this context, this is a temporary condition and the request should be reattempted later. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/export_reset_status.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/export_reset_status.md new file mode 100644 index 0000000000..d2857eec93 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/export_reset_status.md @@ -0,0 +1,63 @@ +--- +Title: Export resets status database action requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Reset database export status requests +headerRange: '[1-2]' +linkTitle: export_reset_status +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/actions/export_reset_status/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [PUT](#put-bdbs-actions-export-reset-status) | `/v1/bdbs/{uid}/actions/export_reset_status` | Reset database export status | + +## Reset database export status {#put-bdbs-actions-export-reset-status} + + PUT /v1/bdbs/{int: uid}/actions/export_reset_status + +Resets the database's `export_status` to idle if an export is not in progress and clears the value of the `export_failure_reason` field. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [reset_bdb_current_export_status]({{< relref "/operate/rs/references/rest-api/permissions#reset_bdb_current_export_status" >}}) | admin
cluster_member
db_member | + +### Request {#put-request} + +#### Example HTTP request + +```sh +PUT /bdbs/1/actions/export_reset_status +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database | + +### Response {#put-response} + +Returns a status code. + +#### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The request is accepted and is being processed. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to perform an action on a nonexistent database. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Not all the modules loaded to the database support 'backup_restore' capability | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Database is currently busy with another action. In this context, this is a temporary condition and the request should be reattempted later. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/import.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/import.md new file mode 100644 index 0000000000..261eb3af9c --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/import.md @@ -0,0 +1,99 @@ +--- +Title: Import database action requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Import database requests +headerRange: '[1-2]' +linkTitle: import +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/actions/import/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-bdbs-actions-import) | `/v1/bdbs/{uid}/actions/import` | Initiate manual dataset import | + +## Initiate manual dataset import {#post-bdbs-actions-import} + +```sh +POST /v1/bdbs/{int: uid}/actions/import +``` + +Initiate a manual import process. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [start_bdb_import]({{< relref "/operate/rs/references/rest-api/permissions#start_bdb_import" >}}) | admin
cluster_member
db_member | + +### Request {#post-request} + +#### Example HTTP request + +```sh +POST /bdbs/1/actions/import +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | +| Content-Length | 0 | Length of the request body in octets | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database | + +#### Body + +The request _may_ contain a subset of the [BDB JSON object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}), which includes the following import-related attributes: + +| Field | Type | Description | +|-------|------|-------------| +| dataset_import_sources | array of [dataset_import_sources]({{< relref "/operate/rs/references/rest-api/objects/bdb/dataset_import_sources" >}}) objects | Details for the import sources. Call [`GET /jsonschema`]({{< relref "/operate/rs/references/rest-api/requests/jsonschema#get-jsonschema" >}}) on the bdb object and review the `dataset_import_sources` field to retrieve the object's structure. | +| email_notification | boolean | Enable/disable an email notification on import failure/ completion. (optional) | + +{{}} +Other attributes are not allowed and will cause the request to fail. +{{}} + +##### Example JSON Body + +```json +{ + "dataset_import_sources": [ + { + "type": "url", + "url": "http://..." + }, + { + "type": "url", + "url": "redis://..." + } + ], + "email_notification": true +} +``` + +This request initiates an import process using `dataset_import_sources` values that were previously configured for the database. + +### Response {#post-response} + +Returns a status code. + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The request is accepted and is being processed. In order to monitor progress, the `import_status`, `import_progress`, and `import_failure_reason` attributes can be consulted. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to perform an action on a nonexistent database. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Not all the modules loaded to the database support 'backup_restore' capability. | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Database is currently busy with another action. In this context, this is a temporary condition and the request should be reattempted later. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/import_reset_status.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/import_reset_status.md new file mode 100644 index 0000000000..467fe94fb7 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/import_reset_status.md @@ -0,0 +1,65 @@ +--- +Title: Import reset status database action requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Reset database import status requests +headerRange: '[1-2]' +linkTitle: import_reset_status +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/actions/import_reset_status/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [PUT](#put-bdbs-actions-import-reset-status) | `/v1/bdbs/{uid}/actions/import_reset_status` | Reset database import status | + +## Reset database import status {#put-bdbs-actions-import-reset-status} + + PUT /v1/bdbs/{int: uid}/actions/import_reset_status + +Reset the database’s `import_status` to idle if a backup is not in progress and clears the value of the `import_failure_reason` field. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [reset_bdb_current_import_status]({{< relref "/operate/rs/references/rest-api/permissions#reset_bdb_current_import_status" >}}) | admin
cluster_member
db_member | + +### Request {#put-request} + +#### Example HTTP request + +```sh +PUT /bdbs/1/actions/import_reset_status +``` + + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database | + +### Response {#put-response} + +Returns a status code. + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The request is accepted and is being processed. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to perform an action on a nonexistent database. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Not all the modules loaded to the database support 'backup_restore' capability | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Database is currently busy with another action. In this context, this is a temporary condition and the request should be reattempted later. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/optimize_shards_placement.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/optimize_shards_placement.md new file mode 100644 index 0000000000..bade7b3669 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/optimize_shards_placement.md @@ -0,0 +1,171 @@ +--- +Title: Optimize shards placement database action requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Optimize shard placement requests +headerRange: '[1-2]' +linkTitle: optimize_shards_placement +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/actions/optimize_shards_placement/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-bdbs-actions-optimize-shards-placement) | `/v1/bdbs/{uid}/actions/optimize_shards_placement` | Get optimized shards placement for a database | + + +## Get optimized shards placement {#get-bdbs-actions-optimize-shards-placement} + +```sh +GET /v1/bdbs/{int: uid}/actions/optimize_shards_placement +``` + +Get optimized shards placement for the given database. + +#### Required permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /bdbs/1/actions/optimize_shards_placement +``` + +#### Query parameters + +Include query parameters in a `GET` request to generate an optimized shard placement blueprint for a database, using settings that are different from the database's current configuration. + +| Field | Type | Description | +|-------|------|-------------| +| avoid_nodes | list of integers | Comma-separated list of cluster node IDs to avoid when placing the database’s shards and binding its endpoints (for example, `avoid_nodes=1,2`) | +| memory_size | integer (default: 0) | Database memory limit (0 is unlimited), expressed in bytes | +| shards_count | integer, (range: 1-512) (default: 1) | Number of database server-side shards | +| shards_placement | `dense`
`sparse` | Control the density of shards
`dense`: Shards reside on as few nodes as possible
`sparse`: Shards reside on as many nodes as possible | +| bigstore_ram_size | integer (default: 0) | Memory size of bigstore RAM part, expressed in bytes | +| replication | `enabled`
`disabled` | In-memory database replication mode | + +The following example request includes `shards_count` and `memory_size` as query parameters: + +```sh +GET /bdbs/1/actions/optimize_shards_placement?shards_count=10&memory_size=10000 +``` + +### Response {#get-response} + +To rearrange the database shards, you can submit the blueprint returned in this response body as the `shards_blueprint` field in the [`PUT` `/bdbs/{uid}`](#put-bdbs-rearrange-shards) request. + +#### Example JSON body + +```json +[ + { + "nodes": [ + { + "node_uid": "3", + "role": "master" + }, + { + "node_uid": "1", + "role": "slave" + } + ], + "slot_range": "5461-10922" + }, + { + "nodes": [ + { + "node_uid": "3", + "role": "master" + }, + { + "node_uid": "1", + "role": "slave" + } + ], + "slot_range": "10923-16383" + }, + { + "nodes": [ + { + "node_uid": "3", + "role": "master" + }, + { + "node_uid": "1", + "role": "slave" + } + ], + "slot_range": "0-5460" + } +] +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Content-Length | 352 | Length of the request body in octets | +| cluster-state-id | 30 | Cluster state ID | + +#### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Database UID does not exist | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Not enough resources in the cluster to host the database | + +## Rearrange database shards {#put-bdbs-rearrange-shards} + +Use the blueprint returned by the [`GET` `/bdbs/{uid}/actions/optimize_shards_placement`]({{< relref "/operate/rs/references/rest-api/requests/bdbs/actions/optimize_shards_placement#get-bdbs-actions-optimize-shards-placement" >}}) request as the value of the `shards_blueprint` field to rearrange the database shards. + +To ensure that the optimized shard placement is relevant for the current cluster state, pass the `cluster-state-id`, taken from the response header of the `GET` request, in the [`PUT` `/bdbs/{uid}`]({{< relref "/operate/rs/references/rest-api/requests/bdbs#put-bdbs" >}}) request headers. + +The cluster will reject the update if its state was changed since the optimal shards placement was obtained. + +### Request + +#### Example HTTP request + +```sh +PUT /bdbs/1 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | +| cluster-state-id | 30 | Cluster state ID | + +#### Example JSON body + +```json +{ + "shards_blueprint": [ + { + "nodes": [ + { + "node_uid": "2", + "role": "master" + } + ], + "slot_range": "0-8191" + }, + "..." + ] +} +``` + +{{}} +If you submit such an optimized blueprint, it may cause strain on the cluster and its resources. Use with caution. +{{}} diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/recover.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/recover.md new file mode 100644 index 0000000000..6db740bd4c --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/actions/recover.md @@ -0,0 +1,156 @@ +--- +Title: Recover database requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: REST API requests for database recovery +headerRange: '[1-2]' +linkTitle: recover +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/actions/recover/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-bdbs-actions-recover) | `/v1/bdbs/{uid}/actions/recover` | Get database recovery plan | +| [POST](#post-bdbs-actions-recover) | `/v1/bdbs/{uid}/actions/recover` | Recover database | + +## Get recovery plan {#get-bdbs-actions-recover} + +```sh +GET /v1/bdbs/{int: uid}/actions/recover +``` + +Fetches the recovery plan for a database. The recovery plan provides information about the recovery status, such as whether recovery is possible, and details on available files to use for recovery. + +#### Required permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_bdb_recovery_plan]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_recovery_plan" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /bdbs/1/actions/recover +``` + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database. | + +### Response {#get-response} + +Returns a JSON object that represents the database's recovery plan, including recovery files and status. + +#### Example response body + +```json +{ + "data_files": [ + { + "filename": "appendonly-1.aof", + "last_modified": 1721164863.8883622, + "node_uid": "1", + "shard_role": "master", + "shard_slots": "1-2048", + "shard_uid": "1", + "size": 88 + }, + { + "filename": "appendonly-2.aof", + "last_modified": 1721164863.8883622, + "node_uid": "2", + "shard_role": "slave", + "shard_slots": "2049-4096", + "shard_uid": "2", + "size": 88 + } + ], + "status": "ready" +} +``` + +#### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error. | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Database UID does not exist. | + +## Recover database {#post-bdbs-actions-recover} + +```sh +POST /v1/bdbs/{int: uid}/actions/recover +``` + +Initiates [recovery for a database]({{}}) in a recoverable state where all the database's files are available after [cluster recovery]({{}}). + +#### Required permissions + +| Permission name | Roles | +|-----------------|-------| +| [start_bdb_recovery]({{< relref "/operate/rs/references/rest-api/permissions#start_bdb_recovery" >}}) | admin
cluster_member
db_member | + +### Request {#post-request} + +The request body can either be empty or include a recovery plan. + +If the request body is empty, the database will be recovered automatically: + +- Databases with no persistence are recovered with no data. + +- Persistent files such as AOF or RDB will be loaded from their expected storage locations where replica or primary shards were last active. + +- If persistent files are not found where expected but can be located on other cluster nodes, they will be used. + +#### Example HTTP request + +```sh +POST /bdbs/1/actions/recover +``` + +#### Example request body + +```json +{ + "data_files": [ + { + "filename": "appendonly-1.aof", + "node_uid": "1", + "shard_slots": "1-2048" + }, + { + "filename": "appendonly-2.aof", + "node_uid": "2", + "shard_slots": "2049-4096" + } + ], + "ignore_errors": false, + "recover_without_data": false +} +``` + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database to recover. | + +### Response {#post-response} + +Returns a status code. Also returns a JSON object with an `action_uid` in the request body if successful. + +#### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | The request is accepted and is being processed. When the database is recovered, its status will become `active`. | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Attempting to perform an action on a nonexistent database. | +| [409 Conflict](https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict) | Database is currently busy with another action, recovery is already in progress, or is not in a recoverable state. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/alerts.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/alerts.md new file mode 100644 index 0000000000..e1d66fd19a --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/alerts.md @@ -0,0 +1,279 @@ +--- +Title: Database alerts requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Database alert requests +headerRange: '[1-2]' +linkTitle: alerts +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/alerts/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-bdbs-alerts) | `/v1/bdbs/alerts` | Get all alert states for all databases | +| [GET](#get-bdbs-alerts) | `/v1/bdbs/alerts/{uid}` | Get all alert states for a specific database | +| [GET](#get-bdbs-alert) | `/v1/bdbs/alerts/{uid}/{alert}` | Get a specific database alert state | +| [POST](#post-bdbs-alerts) | `/v1/bdbs/alerts/{uid}` | Update a database’s alerts configuration | + +## Get all database alerts {#get-all-bdbs-alerts} + + GET /v1/bdbs/alerts + +Get all alert states for all databases. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_all_bdbs_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_all_bdbs_alerts" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + + GET /bdbs/alerts + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-all-response} + +Returns a hash of alert UIDs and the [alerts]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}) states for each database. + +#### Example JSON body + +```json +{ + "1": { + "bdb_size": { + "enabled": true, + "state": true, + "threshold": "80", + "change_time": "2014-08-29T11:19:49Z", + "severity": "WARNING", + "change_value": { + "state": true, + "threshold": "80", + "memory_util": 81.2 + } + }, + "..." + }, + "..." +} +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + +## Get database alerts {#get-bdbs-alerts} + + GET /v1/bdbs/alerts/{int: uid} + +Get all alert states for a database. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_bdb_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_alerts" >}}) | + +### Request {#get-request-alerts} + +#### Example HTTP request + + GET /bdbs/alerts/1 + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-response-alerts} + +Returns a hash of [alert objects]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}) and their states. + +#### Example JSON body + +```json +{ + "bdb_size": { + "enabled": true, + "state": true, + "threshold": "80", + "severity": "WARNING", + "change_time": "2014-08-29T11:19:49Z", + "change_value": { + "state": true, + "threshold": "80", + "memory_util": 81.2 + } + }, + "..." +} +``` + +### Status codes {#get-status-codes-alerts} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Specified bdb does not exist | + +## Get database alert {#get-bdbs-alert} + + GET /v1/bdbs/alerts/{int: uid}/{alert} + +Get a database alert state. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_bdb_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_alerts" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /bdbs/alerts/1/bdb_size + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database | +| alert | string | The alert name | + +### Response {#get-response} + +Returns an [alert object]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}). + +#### Example JSON body + +```json +{ + "enabled": true, + "state": true, + "threshold": "80", + "severity": "WARNING", + "change_time": "2014-08-29T11:19:49Z", + "change_value": { + "state": true, + "threshold": "80", + "memory_util": 81.2 + } +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad request | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Specified alert or bdb does not exist | + +## Update database alert {#post-bdbs-alerts} + + POST /v1/bdbs/alerts/{int: uid} + +Updates a database's alerts configuration. + +#### Required permissions + +| Permission name | +|-----------------| +| [update_bdb_alerts]({{< relref "/operate/rs/references/rest-api/permissions#update_bdb_alerts" >}}) | + +### Request {#post-request} + +If passed with the dry_run URL query string, the function will validate the alert thresholds, but not commit them. + +#### Example HTTP request + + POST /bdbs/alerts/1 + +#### Example JSON body + +```json +{ + "bdb_size":{ + "threshold":"80", + "enabled":true + }, + "bdb_high_syncer_lag":{ + "threshold":"", + "enabled":false + }, + "bdb_low_throughput":{ + "threshold":"1", + "enabled":true + }, + "bdb_high_latency":{ + "threshold":"3000", + "enabled":true + }, + "bdb_high_throughput":{ + "threshold":"1", + "enabled":true + }, + "bdb_backup_delayed":{ + "threshold":"1800", + "enabled":true + } +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | Database ID | +| dry_run | string | Validate the alert thresholds but do not apply them | + +#### Request body + +The request must contain a single JSON object with one or many database [alert objects]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}). + +### Response {#post-response} + +The response includes the updated database [alerts]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}). + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Specified database was not found. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Invalid configuration parameters provided. | +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, database alerts updated. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/crdt_sources-alerts.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/crdt_sources-alerts.md new file mode 100644 index 0000000000..8b2a7d9ee4 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/crdt_sources-alerts.md @@ -0,0 +1,267 @@ +--- +Title: Database CRDT sources alerts requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Conflict-free replicated data type (CRDT) source alert requests +headerRange: '[1-2]' +linkTitle: crdt_sources/alerts +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/crdt_sources-alerts/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-bdbs-crdt-sources-alerts) | `/v1/bdbs/crdt_sources/alerts` | Get all CRDT sources alert states for all CRDB databases | +| [GET](#get-bdbs-crdt-sources-alerts) | `/v1/bdbs/crdt_sources/alerts/{uid}` | Get all CRDT sources alert states for a database | +| [GET](#get-bdbs-crdt-source-all-alerts) | `/v1/bdbs/crdt_sources/alerts/{uid}/{crdt_src_id}` | Get all alert states for a CRDT source | +| [GET](#get-bdbs-crdt-source-alert) | `/v1/bdbs/crdt_sources/alerts/{uid}/{crdt_src_id}/{alert}` | Get a database alert state | + +## Get all CRDB CRDT source alert states {#get-all-bdbs-crdt-sources-alerts} + + GET /v1/bdbs/crdt_sources/alerts + +Get all alert states for all CRDT sources of all CRDBs. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_all_bdbs_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_all_bdbs_alerts" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + + GET /bdbs/crdt_sources/alerts + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-all-response} + +Returns a hash of alert UIDs and the [alerts states]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}) for each local BDB of CRDB. + +#### Example JSON body + +```json +{ + "1": { + "crdt_src_syncer_connection_error": { + "enabled": true, + "state": true, + "threshold": "80", + "change_time": "2014-08-29T11:19:49Z", + "severity": "WARNING", + "change_value": { + "state": true, + "threshold": "80", + "memory_util": 81.2 + } + }, + "..." + }, + "..." +} +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + +## Get all BDB CRDT sources alert states {#get-bdbs-crdt-sources-alerts} + + GET /v1/bdbs/crdt_sources/alerts/{int: uid} + +Get all alert states for all crdt sources for a specific local bdb of a CRDB. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_bdb_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_alerts" >}}) | + +### Request {#get-request-all-crdt-alerts} + +#### Example HTTP request + + GET /bdbs/crdt_sources/alerts/1 + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database | + +### Response {#get-response-all-crdt-alerts} + +Returns a hash of [alert objects]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}) and their states. + +#### Example JSON body + +```json +{ + "crdt_src_syncer_connection_error": { + "enabled": true, + "state": true, + "threshold": "80", + "severity": "WARNING", + "change_time": "2014-08-29T11:19:49Z", + "change_value": { + "state": true, + "threshold": "80", + "memory_util": 81.2 + } + }, + "..." +} +``` + +### Status codes {#get-status-codes-all-crdt-alerts} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Specified bdb does not exist | + +## Get all CRDT source alert states {#get-bdbs-crdt-source-all-alerts} + + GET /v1/bdbs/crdt_sources/alerts/{int: uid}/{int: crdt_src_id} + +Get all alert states for specific crdt source for a specific local BDB +of a CRDB. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_bdb_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_alerts" >}}) | + +### Request {#get-request-crdt-alerts} + +#### Example HTTP request + + GET /bdbs/crdt_sources/alerts/1/2 + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database | +| crdt_src_id | integer | The ID of the crdt source in this BDB | + +### Response {#get-response-crdt-alerts} + +Returns a hash of [alert objects]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}) and their states. + +#### Example JSON body + +```json +{ + "crdt_src_syncer_connection_error": { + "enabled": true, + "state": true, + "threshold": "80", + "severity": "WARNING", + "change_time": "2014-08-29T11:19:49Z", + "change_value": { + "state": true, + "threshold": "80", + "memory_util": 81.2 + } + }, + "..." +} +``` + +### Status codes {#get-status-codes-crdt-alerts} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Specified bdb does not exist | + +## Get database alert state {#get-bdbs-crdt-source-alert} + + GET /v1/bdbs/crdt_sources/alerts/{int: uid}/{int: crdt_src_id}/{alert} + +Get a BDB alert state. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_bdb_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_alerts" >}}) | + +### Request {#get-request-alert} + +#### Example HTTP request + + GET /bdbs/crdt_sources/alerts/1/2/crdt_src_syncer_connection_error + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database | +| crdt_src_id | integer | The ID of the crdt source in this BDB | +| alert | string | The alert name | + +### Response {#get-response-alert} + +Returns an [alert object]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}). + +#### Example JSON body + +```json +{ + "enabled": true, + "state": true, + "threshold": "80", + "severity": "WARNING", + "change_time": "2014-08-29T11:19:49Z", + "change_value": { + "state": true, + "threshold": "80", + "memory_util": 81.2 + } +} +``` + +### Status codes {#get-status-codes-alert} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad request | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Specified alert or bdb does not exist | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/debuginfo.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/debuginfo.md new file mode 100644 index 0000000000..dc98fd5db6 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/debuginfo.md @@ -0,0 +1,93 @@ +--- +Title: Database debug info requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the Redis Enterprise Software REST API /bdbs/debuginfo requests. +headerRange: '[1-2]' +linkTitle: debuginfo +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/debuginfo/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-debuginfo-bdb) | `/v1/bdbs/debuginfo` | Get debug info from all databases | +| [GET](#get-debuginfo-bdb) | `/v1/bdbs/{bdb_uid}/debuginfo` | Get debug info from a specific database | + +## Get debug info from all databases {#get-all-debuginfo-bdb} + + GET /v1/bdbs/debuginfo + +Downloads a tar file that contains debug info from all databases. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_debugging_info]({{< relref "/operate/rs/references/rest-api/permissions#view_debugging_info" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + + GET /bdbs/debuginfo + +### Response {#get-all-response} + +Downloads the debug info in a tar file called `filename.tar.gz`. Extract the files from the tar file to access the debug info. + +#### Response headers + +| Key | Value | Description | +|-----|-------|-------------| +| Content-Type | application/x-gzip | Media type of request/response body | +| Content-Length | 653350 | Length of the response body in octets | +| Content-Disposition | attachment; filename=debuginfo.tar.gz | Display response in browser + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success. | +| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Failed to get debug info. | + + +## Get database debug info {#get-debuginfo-bdb} + + GET /v1/bdbs/{int: bdb_uid}/debuginfo + +Downloads a tar file that contains debug info from the database specified by `bdb_uid`. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_debugging_info]({{< relref "/operate/rs/references/rest-api/permissions#view_debugging_info" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /bdbs/1/debuginfo + +### Response {#get-response} + +Downloads the debug info in a tar file called `filename.tar.gz`. Extract the files from the tar file to access the debug info. + +#### Response headers + +| Key | Value | Description | +|-----|-------|-------------| +| Content-Type | application/x-gzip | Media type of request/response body | +| Content-Length | 653350 | Length of the response body in octets | +| Content-Disposition | attachment; filename=debuginfo.tar.gz | Display response in browser + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success. | +| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Failed to get debug info. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/modules/_index.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/modules/_index.md new file mode 100644 index 0000000000..311602976a --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/modules/_index.md @@ -0,0 +1,24 @@ +--- +Title: Database modules requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Redis module requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: modules +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/modules/' +--- + +## Configure module +| Method | Path | Description | +|--------|------|-------------| +| [POST]({{< relref "/operate/rs/references/rest-api/requests/bdbs/modules/config#post-bdb-modules-config" >}}) | `/v1/bdbs/{uid}/modules/config` | Configure module | + +## Upgrade module +| Method | Path | Description | +|--------|------|-------------| +| [POST]({{< relref "/operate/rs/references/rest-api/requests/bdbs/modules/upgrade#post-bdb-modules-upgrade" >}}) | `/v1/bdbs/{uid}/modules/upgrade` | Upgrade module | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/modules/config.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/modules/config.md new file mode 100644 index 0000000000..15ee84d740 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/modules/config.md @@ -0,0 +1,89 @@ +--- +Title: Database modules config requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Configure Redis module requests +headerRange: '[1-2]' +linkTitle: config +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/modules/config/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-bdb-modules-config) | `/v1/bdbs/{uid}/modules/config` | Configure module | + +## Configure module {#post-bdb-modules-config} + + POST /v1/bdbs/{string: uid}/modules/config + +Use the module runtime configuration command (if defined) to configure new arguments for the module. + +#### Required permissions + +| Permission name | +|-----------------| +| [edit_bdb_module]({{< relref "/operate/rs/references/rest-api/permissions#edit_bdb_module" >}}) | + +### Request {#post-request} + +#### Example HTTP request + + POST /bdbs/1/modules/config + +#### Example JSON body + +```json +{ + "modules": [ + { + "module_name": "search", + "module_args": "MINPREFIX 3 MAXEXPANSIONS 1000" + } + ] +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Request body + +| Field | Type | Description | +|-------|------|-------------| +| modules | list of JSON objects | List of modules (module_name) and their new configuration settings (module_args) | +| module_name | `search`
`ReJSON`
`graph`
`timeseries`
`bf` | Module's name | +| module_args | string | Module command line arguments (pattern does not allow special characters &,<,>,”) | + +### Response {#post-response} + +Returns a status code. If an error occurs, the response body may include an error code and message with more details. + +### Error codes {#post-error-codes} + +When errors are reported, the server may return a JSON object with `error_code` and `message` field that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| db_not_exist | Database with given UID doesn't exist in cluster | +| missing_field | "module_name" or "module_args" are not defined in request | +| invalid_schema | JSON object received is not a dict object | +| param_error | "module_args" parameter was not parsed properly | +| module_not_exist | Module with given "module_name" does not exist for the database | + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, module updated on bdb. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | bdb not found. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Module does not support runtime configuration of arguments. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/modules/upgrade.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/modules/upgrade.md new file mode 100644 index 0000000000..ac5a1ecc4a --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/modules/upgrade.md @@ -0,0 +1,104 @@ +--- +Title: Database upgrade modules requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Upgrade Redis module requests +headerRange: '[1-2]' +linkTitle: upgrade +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/modules/upgrade/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-bdb-modules-upgrade) | `/v1/bdbs/{uid}/modules/upgrade` | Upgrade module | + +## Upgrade module {#post-bdb-modules-upgrade} + + POST /v1/bdbs/{string: uid}/modules/upgrade + +Upgrades module version on a specific BDB. + +#### Required permissions + +| Permission name | +|-----------------| +| [edit_bdb_module]({{< relref "/operate/rs/references/rest-api/permissions#edit_bdb_module" >}}) | + +### Request {#post-request} + +#### Example HTTP request + + POST /bdbs/1/modules/upgrade + +#### Example JSON body + +```json +{ + "modules": [ + {"module_name": "ReJson", + "current_semantic_version": "2.2.1", + "new_module": "aa3648d79bd4082d414587c42ea0b234"} + ], + "// Optional fields to fine-tune restart and failover behavior:", + "preserve_roles": true, + "may_discard_data": false +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Request body + +| Field | Type | Description | +|-------|------|-------------| +| modules | list | List of dicts representing the modules that will be upgraded. Each dict must include:

• **current_module**: uid of a module to upgrade

• **new_module**: UID of the module we want to upgrade to

• **new_module_args**: args list for the new module | +| preserve_roles | boolean | Preserve shards’ master/replica roles (optional) | +| may_discard_data | boolean | Discard data in a non-replicated non-persistent bdb (optional) | + +### Response {#post-response} + +Returns the upgraded [module object]({{< relref "/operate/rs/references/rest-api/objects/module" >}}). + +#### Example JSON body + +```json +{ + "uid": 1, + "name": "name of database #1", + "module_id": "aa3648d79bd4082d414587c42ea0b234", + "module_name": "ReJson", + "semantic_version": "2.2.2" + "// additional fields..." +} +``` + +### Error codes {#post-error-codes} + +When errors are reported, the server may return a JSON object with `error_code` and `message` field that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| missing_module | Module is not present in cluster.| +| module_downgrade_unsupported | Module downgrade is not allowed.| +| redis_incompatible_version | Module min_redis_version is bigger than the current Redis version.| +| redis_pack_incompatible_version | Module min_redis_pack_version is bigger than the current Redis Enterprise version.| +| unsupported_module_capabilities | New version of module does support all the capabilities needed for the database configuration| + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, module updated on bdb. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | bdb or node not found. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The requested configuration is invalid. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/passwords.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/passwords.md new file mode 100644 index 0000000000..c84a717893 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/passwords.md @@ -0,0 +1,198 @@ +--- +Title: Database passwords requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Database password requests +headerRange: '[1-2]' +linkTitle: passwords +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/passwords/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [PUT](#put-bdbs-password) | `/v1/bdbs/{uid}/passwords` | Update database password | +| [POST](#post-bdbs-password) | `/v1/bdbs/{uid}/passwords` | Add database password | +| [DELETE](#delete-bdbs-password) | `/v1/bdbs/{uid}/passwords` | Delete database password | + +## Update database password {#put-bdbs-password} + + PUT /v1/bdbs/{int: uid}/passwords + +Set a single password for the bdb's default user (i.e., for `AUTH` `` authentications). + +#### Required permissions + +| Permission name | +|-----------------| +| [update_bdb]({{< relref "/operate/rs/references/rest-api/permissions#update_bdb" >}}) | + +### Request {#put-request} + +#### Example HTTP request + + PUT /bdbs/1/passwords + +#### Example JSON body + +```json +{ + "password": "new password" +} +``` + +The above request resets the password of the bdb to ‘new password’. + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database to update the password. | + + +#### Request body + +| Field | Type | Description | +|-------|------|-------------| +| password | string | New password | + +### Response {#put-response} + +Returns a status code that indicates password update success or failure. + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The password was changed. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | A nonexistent database. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Invalid configuration parameters provided. | + +## Add database password {#post-bdbs-password} + + POST /v1/bdbs/{int: uid}/passwords + +Add a password to the bdb's default user (i.e., for `AUTH` `` authentications). + +#### Required permissions + +| Permission name | +|-----------------| +| [update_bdb]({{< relref "/operate/rs/references/rest-api/permissions#update_bdb" >}}) | + +### Request {#post-request} + +#### Example HTTP request + + POST /bdbs/1/passwords + +#### Example JSON body + +```json +{ + "password": "password to add" +} +``` + +The above request adds a password to the bdb. + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database to add password. | + +#### Request body + +| Field | Type | Description | +|-------|------|-------------| +| password | string | Password to add | + +### Response {#post-response} + +Returns a status code that indicates password creation success or failure. + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The password was added. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | A nonexistent database. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Invalid configuration parameters provided. | + +## Delete database password {#delete-bdbs-password} + + DELETE /v1/bdbs/{int: uid}/passwords + +Delete a password from the bdb's default user (i.e., for `AUTH` `` authentications). + +#### Required permissions + +| Permission name | +|-----------------| +| [update_bdb]({{< relref "/operate/rs/references/rest-api/permissions#update_bdb" >}}) | + +### Request {#delete-request} + +#### Example HTTP request + + DELETE /bdbs/1/passwords + +#### Example JSON body + +```json +{ + "password": "password to delete" +} +``` + +The above request deletes a password from the bdb. + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database to delete password. | + +#### Request body + +| Field | Type | Description | +|-------|------|-------------| +| password | string | Password to delete | + +### Response {#delete-response} + +Returns a status code that indicates password deletion success or failure. + +### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The password was deleted. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | A nonexistent database. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Invalid configuration parameters provided. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/peer_stats.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/peer_stats.md new file mode 100644 index 0000000000..188172a3fc --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/peer_stats.md @@ -0,0 +1,200 @@ +--- +Title: CRDB peer stats requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Active-Active peer instance statistics requests +headerRange: '[1-2]' +linkTitle: peer_stats +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/peer_stats/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-bdbs-peer_stats) | `/v1/bdbs/{bdb_uid}/peer_stats` | Get stats for all CRDB peer instances | +| [GET](#get-bdbs-peer_stats) | `/v1/bdbs/{bdb_uid}/peer_stats/{uid}` | Get stats for a specific CRDB peer instance | + +## Get all CRDB peer stats {#get-all-bdbs-peer_stats} + +```sh +GET /v1/bdbs/{bdb_uid}/peer_stats +``` + +Get statistics for all peer instances of a local CRDB instance. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-all-request} + +#### Example HTTP request + +```sh +GET /bdbs/1/peer_stats?interval=5min +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| bdb_uid | integer | The unique ID of the local CRDB instance. | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | + +### Response {#get-all-response} + +Returns [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for all CRDB peer instances. + +#### Example JSON body + +```json +{ "peer_stats": [ + { + "intervals": [ + { + "egress_bytes": 0.0, + "egress_bytes_decompressed": 0.0, + "etime": "2017-10-22T19:30:00Z", + "ingress_bytes": 18528, + "ingress_bytes_decompressed": 185992, + "interval": "5min", + "local_ingress_lag_time": 0.244, + "pending_local_writes_max": 0.0, + "pending_local_writes_min": 0.0, + "stime": "2017-10-22T19:25:00Z" + }, + { + "egress_bytes": 0.0, + "egress_bytes_decompressed": 0.0, + "etime": "2017-10-22T19:35:00Z", + "ingress_bytes": 18, + "ingress_bytes_decompressed": 192, + "interval": "5min", + "local_ingress_lag_time": 0.0, + "pending_local_writes_max": 0.0, + "pending_local_writes_min": 0.0, + "stime": "2017-10-22T19:30:00Z" + } + ], + "uid": "3" + } + ] + } +``` + +#### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Database does not exist. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Database is not a CRDB. | + +## Get CRDB peer stats {#get-bdbs-peer_stats} + +```sh +GET /v1/bdbs/{bdb_uid}/peer_stats/{int: uid} +``` + +Get statistics for a specific CRDB peer instance. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /bdbs/1/peer_stats/3?interval=5min +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| bdb_uid | integer | The unique ID of the local CRDB instance. | +| uid | integer | The peer instance uid, as specified in the CRDB instance list. | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | + +### Response {#get-response} + +Returns [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for a specific CRDB peer instance. + +#### Example JSON body + +```json +{ + "intervals": [ + { + "egress_bytes": 0.0, + "egress_bytes_decompressed": 0.0, + "etime": "2017-10-22T19:30:00Z", + "ingress_bytes": 18528, + "ingress_bytes_decompressed": 185992, + "interval": "5min", + "local_ingress_lag_time": 0.244, + "pending_local_writes_max": 0.0, + "pending_local_writes_min": 0.0, + "stime": "2017-10-22T19:25:00Z" + }, + { + "egress_bytes": 0.0, + "egress_bytes_decompressed": 0.0, + "etime": "2017-10-22T19:35:00Z", + "ingress_bytes": 18, + "ingress_bytes_decompressed": 192, + "interval": "5min", + "local_ingress_lag_time": 0.0, + "pending_local_writes_max": 0.0, + "pending_local_writes_min": 0.0, + "stime": "2017-10-22T19:30:00Z" + } + ], + "uid": "3" +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Database or peer does not exist. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Database is not a CRDB. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/replica_sources-alerts.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/replica_sources-alerts.md new file mode 100644 index 0000000000..09c7ec5a8a --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/replica_sources-alerts.md @@ -0,0 +1,268 @@ +--- +Title: Database replica sources alerts requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Replica source alert requests +headerRange: '[1-2]' +linkTitle: replica_sources/alerts +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/replica_sources-alerts/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-bdbs-replica-sources-alerts) | `/v1/bdbs/replica_sources/alerts` | Get all replica sources alert states for all BDBs | +| [GET](#get-bdbs-replica-sources-alerts) | `/v1/bdbs/replica_sources/alerts/{uid}` | Get all replica sources alert states for a BDB | +| [GET](#get-bdbs-replica_source-all-alerts) | `/v1/bdbs/replica_sources/alerts/{uid}/{replica_src_id}` | Get all alert states for a replica source | +| [GET](#get-bdbs-replica-source-alert) | `/v1/bdbs/replica_sources/alerts/{uid}/{replica_src_id}/{alert}` | Get a replica source alert state | + +## Get all DBs replica sources alert states {#get-all-bdbs-replica-sources-alerts} + + GET /v1/bdbs/replica_sources/alerts + +Get all alert states for all replica sources of all BDBs. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_all_bdbs_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_all_bdbs_alerts" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + + GET /bdbs/replica_sources/alerts + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-all-response} + +Returns a hash of alert UIDs and the alerts states for each BDB. + +See [REST API alerts overview]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}) for a description of the alert state object. + +#### Example JSON body + +```json +{ + "1": { + "replica_src_syncer_connection_error": { + "enabled": true, + "state": true, + "threshold": "80", + "change_time": "2014-08-29T11:19:49Z", + "severity": "WARNING", + "change_value": { + "state": true, + "threshold": "80", + "memory_util": 81.2 + } + }, + "..." + }, + "..." +} +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + +## Get DB replica source alert states {#get-bdbs-replica-sources-alerts} + + GET /v1/bdbs/replica_sources/alerts/{int: uid} + +Get all alert states for all replica sources of a specific bdb. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_bdb_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_alerts" >}}) | + +### Request {#get-request-all-replica-alerts} + +#### Example HTTP request + + GET /bdbs/replica_sources/alerts/1 + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database | + +### Response {#get-response-all-replica-alerts} + +Returns a hash of [alert objects]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}) and their states. + +#### Example JSON body + +```json +{ + "replica_src_syncer_connection_error": { + "enabled": true, + "state": true, + "threshold": "80", + "severity": "WARNING", + "change_time": "2014-08-29T11:19:49Z", + "change_value": { + "state": true, + "threshold": "80", + "memory_util": 81.2 + } + }, + "..." +} +``` + +### Status codes {#get-status-codes-all-replica-alerts} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Specified bdb does not exist | + +## Get replica source alert states {#get-bdbs-replica_source-all-alerts} + + GET /v1/bdbs/replica_sources/alerts/{int: uid}/{int: replica_src_id} + +Get all alert states for a specific replica source of a bdb. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_bdb_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_alerts" >}}) | + +### Request {#get-request-replica-alerts} + +#### Example HTTP request + + GET /bdbs/replica_sources/alerts/1/2 + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database | +| replica_src_id | integer | The ID of the replica source in this BDB | + +### Response {#get-response-replica-alerts} + +Returns a hash of [alert objects]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}) and their states. + +#### Example JSON body + +```json +{ + "replica_src_syncer_connection_error": { + "enabled": true, + "state": true, + "threshold": "80", + "severity": "WARNING", + "change_time": "2014-08-29T11:19:49Z", + "change_value": { + "state": true, + "threshold": "80", + "memory_util": 81.2 + } + }, + "..." +} +``` + +### Status codes {#get-status-codes-replica-alerts} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Specified bdb does not exist | + +## Get replica source alert state {#get-bdbs-replica-source-alert} + + GET /v1/bdbs/replica_sources/alerts/{int: uid}/{int: replica_src_id}/{alert} + +Get a replica source alert state of a specific bdb. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_bdb_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_alerts" >}}) | + +### Request {#get-request-alert} + +#### Example HTTP request + + GET /bdbs/replica_sources/alerts/1/2/replica_src_syncer_connection_error + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database | +| replica_src_id | integer | The ID of the replica source in this BDB | +| alert | string | The alert name | + +### Response {#get-response-alert} + +Returns an [alert state object]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}). + +#### Example JSON body + +```json +{ + "enabled": true, + "state": true, + "threshold": "80", + "severity": "WARNING", + "change_time": "2014-08-29T11:19:49Z", + "change_value": { + "state": true, + "threshold": "80", + "memory_util": 81.2 + } +} +``` + +### Status codes {#get-status-codes-alert} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad request | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Specified alert or bdb does not exist | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/shards.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/shards.md new file mode 100644 index 0000000000..389b98d11e --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/shards.md @@ -0,0 +1,82 @@ +--- +Title: Database shards requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: REST API requests for database shards +headerRange: '[1-2]' +linkTitle: shards +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/shards/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-bdb-shards) | `/v1/bdbs/{bdb_uid}/shards` | Get the status of a database's shards | + +## Get database shards {#get-bdb-shards} + + GET /v1/bdbs/{int: bdb_uid}/shards + +Gets the status for all shards that belong to the specified database. + +### Request {#get-request} + +#### Example HTTP request + + GET /bdbs/1/shards?extra_info_keys=used_memory_rss&extra_info_keys=connected_clients + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| bdb_uid | integer | The unique ID of the database. | + +### Response {#get-response} + +The response body contains a JSON array with all shards, represented as [shard objects]({{}}). + +#### Example JSON body + +```json +[ + { + "uid": "1", + "role": "master", + "assigned_slots": "0-8191", + "bdb_uid": 1, + "detailed_status": "ok", + "loading": { + "status": "idle" + }, + "node_uid": "1", + "redis_info": { + "connected_clients": 14, + "used_memory_rss": 12460032 + }, + "report_timestamp": "2024-09-13T15:28:10Z", + "status": "active" + }, + { + "uid": 2, + "role": "slave", + // additional fields... + } +] +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error. | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | bdb uid does not exist. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/stats/_index.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/stats/_index.md new file mode 100644 index 0000000000..85395d5de1 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/stats/_index.md @@ -0,0 +1,265 @@ +--- +Title: Database stats requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Database statistics requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: stats +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/stats/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-bdbs-stats) | `/v1/bdbs/stats` | Get stats for all databases | +| [GET](#get-bdbs-stats) | `/v1/bdbs/stats/{uid}` | Get stats for a specific database | + +## Get all database stats {#get-all-bdbs-stats} + +```sh +GET /v1/bdbs/stats +``` + +Get statistics for all databases. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_all_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_all_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-all-request} + +#### Example HTTP request + +```sh +GET /bdbs/stats?interval=1hour&stime=2014-08-28T10:00:00Z +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | + +### Response {#get-all-response} + +Returns [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for all databases. + +#### Example JSON body + +```json +[ + { + "uid": "1", + "intervals": [ + { + "interval": "1hour", + "stime": "2015-05-27T12:00:00Z", + "etime": "2015-05-28T12:59:59Z", + "avg_latency": 0.0, + "conns": 0.0, + "egress_bytes": 0.0, + "etime": "2015-05-28T00:00:00Z", + "evicted_objects": 0.0, + "expired_objects": 0.0, + "ingress_bytes": 0.0, + "instantaneous_ops_per_sec": 0.00011973180076628352, + "last_req_time": "1970-01-01T00:00:00Z", + "last_res_time": "1970-01-01T00:00:00Z", + "used_memory": 5656299.362068966, + "mem_size_lua": 35840.0, + "monitor_sessions_count": 0.0, + "no_of_keys": 0.0, + "other_req": 0.0, + "other_res": 0.0, + "read_hits": 0.0, + "read_misses": 0.0, + "read_req": 0.0, + "read_res": 0.0, + "total_connections_received": 0.0, + "total_req": 0.0, + "total_res": 0.0, + "write_hits": 0.0, + "write_misses": 0.0, + "write_req": 0.0, + "write_res": 0.0 + }, + { + "interval": "1hour", + "interval": "1hour", + "stime": "2015-05-27T13:00:00Z", + "etime": "2015-05-28T13:59:59Z", + "avg_latency": 599.08, + "// additional fields..." + } + ] + }, + { + "uid": "2", + "intervals": [ + { + "interval": "1hour", + "stime": "2015-05-27T12:00:00Z", + "etime": "2015-05-28T12:59:59Z", + "avg_latency": 0.0, + "// additional fields..." + }, + { + "interval": "1hour", + "stime": "2015-05-27T13:00:00Z", + "etime": "2015-05-28T13:59:59Z", + + "// additional fields..." + } + ] + } +] +``` + +#### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | No bdbs exist | + +### Example requests + +#### cURL + +```sh +$ curl -k -u "[username]:[password]" -X GET + https://[host][:port]/v1/bdbs/stats?interval=1hour +``` + +#### Python + +```python +import requests + +url = "https://[host][:port]/v1/bdbs/stats?interval=1hour" +auth = ("[username]", "[password]") + +response = requests.request("GET", url, auth=auth) + +print(response.text) +``` + +## Get database stats {#get-bdbs-stats} + +```sh +GET /v1/bdbs/stats/{int: uid} +``` + +Get statistics for a specific database. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /bdbs/stats/1?interval=1hour&stime=2014-08-28T10:00:00Z +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the BDB requested. | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | + +### Response {#get-response} + +Returns [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for a specific database. + +#### Example JSON body + +```json +{ + "uid": "1", + "intervals": [ + { + "interval": "1hour", + "stime": "2015-05-27T12:00:00Z", + "etime": "2015-05-28T12:59:59Z", + "avg_latency": 0.0, + "conns": 0.0, + "egress_bytes": 0.0, + "evicted_objects": 0.0, + "pubsub_channels": 0, + "pubsub_patterns": 0, + "expired_objects": 0.0, + "ingress_bytes": 0.0, + "instantaneous_ops_per_sec": 0.00011973180076628352, + "last_req_time": "1970-01-01T00:00:00Z", + "last_res_time": "1970-01-01T00:00:00Z", + "used_memory": 5656299.362068966, + "mem_size_lua": 35840.0, + "monitor_sessions_count": 0.0, + "no_of_keys": 0.0, + "other_req": 0.0, + "other_res": 0.0, + "read_hits": 0.0, + "read_misses": 0.0, + "read_req": 0.0, + "read_res": 0.0, + "total_connections_received": 0.0, + "total_req": 0.0, + "total_res": 0.0, + "write_hits": 0.0, + "write_misses": 0.0, + "write_req": 0.0, + "write_res": 0.0 + }, + { + "interval": "1hour", + "stime": "2015-05-27T13:00:00Z", + "etime": "2015-05-28T13:59:59Z", + "// additional fields..." + } + ] +} +``` + +#### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | bdb does not exist | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | bdb isn't currently active | +| [503 Service Unavailable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4) | bdb is in recovery state | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/stats/last.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/stats/last.md new file mode 100644 index 0000000000..6834be9275 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/stats/last.md @@ -0,0 +1,203 @@ +--- +Title: Latest database stats requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Most recent database statistics requests +headerRange: '[1-2]' +linkTitle: last +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/stats/last/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-bdbs-stats-last) | `/v1/bdbs/stats/last` | Get most recent stats for all databases | +| [GET](#get-bdbs-stats-last) | `/v1/bdbs/stats/last/{uid}` | Get most recent stats for a specific database | + +## Get latest stats for all databases {#get-all-bdbs-stats-last} + +```sh +GET /v1/bdbs/stats/last +``` + +Get the most recent statistics for all databases. + +#### Required permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_all_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_all_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-all-request} + +#### Example HTTP request + +1. Without metrics filter (returns all metrics by default) + ``` + GET /bdbs/stats/last + ``` + +2. With metrics filter + ``` + GET /bdbs/stats/last?metrics=no_of_keys,used_memory + ``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| metrics | string | Comma-separated list of metric names for which we want statistics (default is all). (optional) | + +### Response {#get-all-response} + +Returns [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for all databases. + +#### Example JSON body + +1. Without metrics filter (returns all metrics by default) + ```json + { + "1": { + "stime": "2015-05-28T08:06:37Z", + "etime": "2015-05-28T08:06:44Z", + "conns": 0.0, + "egress_bytes": 0.0, + "etime": "2015-05-28T08:06:44Z", + "evicted_objects": 0.0, + "expired_objects": 0.0, + "ingress_bytes": 0.0, + "instantaneous_ops_per_sec": 0.0, + "last_req_time": "1970-01-01T00:00:00Z", + "last_res_time": "1970-01-01T00:00:00Z", + "used_memory": 5651336.0, + "mem_size_lua": 35840.0, + "monitor_sessions_count": 0.0, + "no_of_keys": 0.0, + "other_req": 0.0, + "other_res": 0.0, + "read_hits": 0.0, + "read_misses": 0.0, + "read_req": 0.0, + "read_res": 0.0, + "total_connections_received": 0.0, + "total_req": 0.0, + "total_res": 0.0, + "write_hits": 0.0, + "write_misses": 0.0, + "write_req": 0.0, + "write_res": 0.0 + }, + "2": { + "stime": "2015-05-28T08:06:37Z", + "etime": "2015-05-28T08:06:44Z", + + "// additional fields..." + }, + + "// Additional BDBs..." + } + ``` + +2. With metrics filter + ```json + { + "1": { + "etime": "2015-05-28T08:06:44Z", + "used_memory": 5651576.0, + "no_of_keys": 0.0, + "stime": "2015-05-28T08:06:37Z" + }, + "2": { + "etime": "2015-05-28T08:06:44ZZ", + "used_memory": 5651440.0, + "no_of_keys": 0.0, + "stime": "2015-05-28T08:06:37Z" + }, + + "// Additional BDBs.." + } + ``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | No bdbs exist | + +## Get latest database stats {#get-bdbs-stats-last} + +```sh +GET /v1/bdbs/stats/last/{int: uid} +``` + +Get the most recent statistics for a specific database. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /bdbs/stats/last/1?metrics=no_of_keys,used_memory +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the requested BDB. | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| metrics | string | Comma-separated list of metric names for which we want statistics (default is all). (optional) | + +### Response {#get-response} + +Returns the most recent [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for a specific database. + +#### Example JSON body + +```json +{ + "1": { + "etime": "2015-06-23T12:05:08Z", + "used_memory": 5651576.0, + "no_of_keys": 0.0, + "stime": "2015-06-23T12:05:03Z" + } +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | bdb does not exist | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | bdb isn't currently active | +| [503 Service Unavailable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4) | bdb is in recovery state | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/sync_source_stats.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/sync_source_stats.md new file mode 100644 index 0000000000..05dfe92c2a --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/sync_source_stats.md @@ -0,0 +1,182 @@ +--- +Title: Database syncer source stats requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Syncer source statistics requests +headerRange: '[1-2]' +linkTitle: sync_source_stats +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/sync_source_stats/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-bdbs-sync_source_stats) | `/v1/bdbs/{bdb_uid}/sync_source_stats` | Get stats for all syncer sources | +| [GET](#get-bdbs-sync_source_stats) | `/v1/bdbs/{bdb_uid}/sync_source_stats/{uid}` | Get stats for a specific syncer instance | + +## Get all syncer source stats {#get-all-bdbs-sync_source_stats} + +```sh +GET /v1/bdbs/{bdb_uid}/sync_source_stats +``` + +Get stats for all syncer sources of a local database. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-all-request} + +#### Example HTTP request + +```sh +GET /bdbs/1/sync_source_stats?interval=5min +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| bdb_uid | integer | The unique ID of the local database. | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | Optional end time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | + +### Response {#get-all-response} + +Returns [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for all syncer sources. + +#### Example JSON body + +```json +{ "sync_source_stats": [ + { + "intervals": [ + { + "etime": "2017-10-22T19:30:00Z", + "ingress_bytes": 18528, + "ingress_bytes_decompressed": 185992, + "interval": "5min", + "local_ingress_lag_time": 0.244, + "stime": "2017-10-22T19:25:00Z" + }, + { + "etime": "2017-10-22T19:35:00Z", + "ingress_bytes": 18, + "ingress_bytes_decompressed": 192, + "interval": "5min", + "local_ingress_lag_time": 0.0, + "stime": "2017-10-22T19:30:00Z" + } + ], + "uid": "1" + } + ] + } +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Database does not exist. | + +## Get syncer instance stats {#get-bdbs-sync_source_stats} + +```sh +GET /v1/bdbs/{bdb_uid}/sync_source_stats/{int: uid} +``` + +Get stats for a specific syncer (Replica Of) instance. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /bdbs/1/sync_source_stats/1?interval=5min +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| bdb_uid | integer | The unique ID of the local database. | +| uid | integer | The sync_source uid. | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) | +| stime | ISO_8601 | Optional start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | Optional end time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | + +### Response {#get-response} + +Returns [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for a specific syncer instance. + +#### Example JSON body + +```json +{ + "intervals": [ + { + "etime": "2017-10-22T19:30:00Z", + "ingress_bytes": 18528, + "ingress_bytes_decompressed": 185992, + "interval": "5min", + "local_ingress_lag_time": 0.244, + "stime": "2017-10-22T19:25:00Z" + }, + { + "etime": "2017-10-22T19:35:00Z", + "ingress_bytes": 18, + "ingress_bytes_decompressed": 192, + "interval": "5min", + "local_ingress_lag_time": 0.0, + "stime": "2017-10-22T19:30:00Z" + } + ], + "uid": "1" +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Database or sync_source do not exist. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/syncer_state/_index.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/syncer_state/_index.md new file mode 100644 index 0000000000..d84f1dcdaf --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/syncer_state/_index.md @@ -0,0 +1,80 @@ +--- +Title: Syncer state requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Syncer state requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: syncer_state +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/syncer_state/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-syncer-state) | `/v1/bdbs/{uid}/syncer_state` | Get a CRDB's syncer state | + +## Get syncer state {#get-syncer-state} + +```sh +GET /v1/bdbs/{int: uid}/syncer_state +``` + +Get a CRDB's syncer state as JSON. + +{{}} +This endpoint is deprecated as of Redis Enterprise Software version 7.2.4 and will be removed in a future release. Use [`/v1/bdbs//syncer_state/crdt`]({{< relref "/operate/rs/references/rest-api/requests/bdbs/syncer_state/crdt" >}}) instead. +{{}} + +### Permissions + +| Permission name | Roles | +|-----------------|---------| +| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /v1/bdbs/1/syncer_state +``` + +#### Headers + +| Key | Value | +|-----|-------| +| Host | The domain name or IP of the cluster. | +| Accept | application/json | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database requested. | + +### Response {#get-response} + +Returns a JSON object that represents the syncer state. + +#### Example JSON body + +```json +{ + "DB": 22, + "RunID": 1584086516, + // additional fields... +} +``` + +#### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | OK | +| [404 Not Found](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Syncer state key does not exist | +| [500 Internal Server Error](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Internal error | +| [503 Service Unavailable](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4) | Redis connection error, service unavailable | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/syncer_state/crdt.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/syncer_state/crdt.md new file mode 100644 index 0000000000..6cbe7c253c --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/syncer_state/crdt.md @@ -0,0 +1,75 @@ +--- +Title: CRDT syncer state requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: CRDT syncer state requests +headerRange: '[1-2]' +linkTitle: crdt +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/syncer_state/crdt/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-syncer-state) | `/v1/bdbs/{uid}/syncer_state/crdt` | Get a CRDB's syncer state | + +## Get CRDB syncer state {#get-syncer-state} + +```sh +GET /v1/bdbs/{int: uid}/syncer_state/crdt +``` + +Get a CRDB's syncer state as JSON. + +### Permissions + +| Permission name | Roles | +|-----------------|---------| +| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /v1/bdbs/1/syncer_state/crdt +``` + +#### Headers + +| Key | Value | +|-----|-------| +| Host | The domain name or IP of the cluster. | +| Accept | application/json | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database requested. | + +### Response {#get-response} + +Returns a JSON object that represents the syncer state. + +#### Example JSON body + +```json +{ + "DB": 22, + "RunID": 1584086516, + // additional fields... +} +``` + +#### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | OK | +| [404 Not Found](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Syncer state key does not exist | +| [500 Internal Server Error](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Internal error | +| [503 Service Unavailable](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4) | Redis connection error, service unavailable | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/syncer_state/replica.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/syncer_state/replica.md new file mode 100644 index 0000000000..6bec6bede2 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/syncer_state/replica.md @@ -0,0 +1,75 @@ +--- +Title: Replica syncer state requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Replica syncer state requests +headerRange: '[1-2]' +linkTitle: replica +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/syncer_state/replica/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-syncer-state) | `/v1/bdbs/{uid}/syncer_state/replica` | Get a CRDB replica's syncer state | + +## Get replica syncer state {#get-syncer-state} + +```sh +GET /v1/bdbs/{int: uid}/syncer_state/replica +``` + +Get a CRDB replica's syncer state as JSON. + +### Permissions + +| Permission name | Roles | +|-----------------|---------| +| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /v1/bdbs/1/syncer_state/replica +``` + +#### Headers + +| Key | Value | +|-----|-------| +| Host | The domain name or IP of the cluster. | +| Accept | application/json | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database requested. | + +### Response {#get-response} + +Returns a JSON object that represents the syncer state. + +#### Example JSON body + +```json +{ + "DB": 22, + "RunID": 1584086516, + // additional fields... +} +``` + +#### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | OK | +| [404 Not Found](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Syncer state key does not exist | +| [500 Internal Server Error](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Internal error | +| [503 Service Unavailable](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4) | Redis connection error, service unavailable | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bdbs/upgrade.md b/content/operate/rs/7.4/references/rest-api/requests/bdbs/upgrade.md new file mode 100644 index 0000000000..0a5467b93c --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bdbs/upgrade.md @@ -0,0 +1,91 @@ +--- +Title: Database upgrade requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Database upgrade requests +headerRange: '[1-2]' +linkTitle: upgrade +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bdbs/upgrade/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-bdbs-upgrade) | `/v1/bdbs/{uid}/upgrade` | Upgrade database | + +## Upgrade database {#post-bdbs-upgrade} + + POST /v1/bdbs/{int: uid}/upgrade + +Upgrade a database. + +#### Required permissions + +| Permission name | +|-----------------| +| [update_bdb_with_action]({{< relref "/operate/rs/references/rest-api/permissions#update_bdb_with_action" >}}) | + +### Request {#post-request} + +#### Example HTTP request + + POST /bdbs/1/upgrade + +#### Example JSON body + +```json +{ + "swap_roles": true, + "may_discard_data": false +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Request body + +| Field | Type | Description | +|-------|------|-------------| +| force_restart | boolean | Restart shards even if no version change (default: false) | +| keep_redis_version | boolean | Keep current Redis version (default: false) | +| keep_crdt_protocol_version | boolean | Keep current crdt protocol version (default: false) | +| may_discard_data | boolean | Discard data in a non-replicated, non-persistent bdb (default: false) | +| force_discard | boolean | Discard data even if the bdb is replicated and/or persistent (default: false) | +| preserve_roles | boolean | Preserve shards' master/replica roles (requires an extra failover) (default: false) | +| parallel_shards_upgrade | integer | Max number of shards to upgrade in parallel (default: all) | +| modules | list of modules | List of dicts representing the modules that will be upgraded.

Each dict includes:

• `current_module`: uid of a module to upgrade

• `new_module`: uid of the module we want to upgrade to

• `new_module_args`: args list for the new module (no defaults for the three module-related parameters). +| redis_version | version number | Upgrades the database to the specified Redis version instead of the latest version | +| latest_with_modules | boolean | Upgrades the database to the latest Redis version and latest supported versions of modules available in the cluster | + +### Response {#post-response} + +Returns the upgraded [BDB object]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}). + +#### Example JSON body + +```json +{ + "uid": 1, + "replication": true, + "data_persistence": "aof", + "// additional fields..." +} +``` + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, bdb upgrade initiated (`action_uid` can be used to track progress) | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Malformed or bad command | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | bdb not found | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | New module version capabilities don't comply with the database configuration | +| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Internal error | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bootstrap/_index.md b/content/operate/rs/7.4/references/rest-api/requests/bootstrap/_index.md new file mode 100644 index 0000000000..2c0cc65125 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bootstrap/_index.md @@ -0,0 +1,238 @@ +--- +Title: Bootstrap requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Bootstrap requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: bootstrap +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bootstrap/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-bootstrap) | `/v1/boostrap` | Get the local node's bootstrap status | +| [POST](#post-bootstrap) | `/v1/bootstrap/{action}` | Initiate bootstrapping | + +## Get bootstrap status {#get-bootstrap} + +```sh +GET /v1/bootstrap +``` + +Get the local node's bootstrap status. + +This request is accepted as soon the cluster software is installed and before the node is part of an active cluster. + +Once the node is part of an active cluster, authentication is required. + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /bootstrap +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Accept | application/json | Accepted media type | + +### Response {#get-response} + +The JSON response object contains a `bootstrap_status` object and a `local_node_info` object. + +The `bootstrap_status` object contains the following information: + +| Field | Description | +|-------|-------------| +| state | Current bootstrap state.

`idle`: No bootstrapping started.

`initiated`: Bootstrap request received.

`creating_cluster`: In the process of creating a new cluster.

`recovering_cluster`: In the process of recovering a cluster.

`joining_cluster`: In the process of joining an existing cluster.

`error`: The last bootstrap action failed.

`completed`: The last bootstrap action completed successfully.| +| start_time | Bootstrap process start time | +| end_time | Bootstrap process end time | +| error_code | If state is `error`, this error code describes the type of error encountered. | +| error_details | An error-specific object that may contain additional information about the error. A common field in use is `message` which provides a more verbose error message. + +The `local_node_info` object is a subset of a [node object]({{< relref "/operate/rs/references/rest-api/objects/node" >}}) that provides information about the node configuration. + +#### Example JSON body + +```json +{ + "bootstrap_status": { + "start_time": "2014-08-29T11:19:49Z", + "end_time": "2014-08-29T11:19:49Z", + "state": "completed" + }, + "local_node_info": { + "uid": 3, + "software_version": "0.90.0-1", + "cores": 2, + "ephemeral_storage_path": "/var/opt/redislabs/tmp", + "ephemeral_storage_size": 1018889.8304, + "os_version": "Ubuntu 14.04 LTS", + "persistent_storage_path": "/var/opt/redislabs/persist/redis", + "persistent_storage_size": 1018889.8304, + "total_memory": 24137, + "uptime": 50278, + "available_addrs": [{ + "address": "172.16.50.122", + "format": "ipv4", + "if_name": "eth0", + "private": true + }, + { + "address": "10.0.3.1", + "format": "ipv4", + "if_name": "lxcbr0", + "private": true + }, + { + "address": "172.17.0.1", + "format": "ipv4", + "if_name": "docker0", + "private": true + }, + { + "address": "2001:db8:0:f101::1", + "format": "ipv6", + "if_name": "eth0", + "private": false + }] + } +} +``` + +### Error codes {#get-error-codes} + +| Code | Description | +|------|-------------| +| config_error | An error related to the bootstrap configuration provided (e.g. bad JSON). | +| connect_error | Failed to connect to cluster (e.g. FQDN DNS could not resolve, no/wrong node IP provided, etc. | +| access_denied | Invalid credentials supplied. | +| invalid_license | The license string provided is invalid. Additional info can be fetched from the `error_details` object, which includes the violation code in case the license is valid but its terms are violated. | +| repair_required | Cluster is in degraded mode and can only accept replacement nodes. When this happens, `error_details` contains two fields: `failed_nodes` and `replace_candidate`. The `failed_nodes` field is an array of objects, each describing a failed node with at least a `uid` field and an optional `rack_id`. `replace_candidate` is the UID of the node most suitable for replacement. | +| insufficient_node_memory | An attempt to replace a dead node fails because the replaced node does not have enough memory. When this happens, error_details contains a required_memory field which indicates the node memory requirement. | +| insufficient_node_flash | An attempt to replace a dead node fails because the replaced node does not have enough flash. When this happens, `error_details` contains a `required_flash` field which indicates the node flash requirement. | +| time_not_sync | An attempt to join a node with system time not synchronized with the rest of the cluster. | +| rack_id_required | An attempt to join a node with no `rack_id` in a rack-aware cluster. In addition, a `current_rack_ids` field will include an array of currently used rack ids. | +| socket_directory_mismatch | An attempt to join a node with a socket directory setting that differs from the cluster | +| node_config_mismatch | An attempt to join a node with a configuration setting (e.g. confdir, osuser, installdir) that differs from the cluster | +| path_error | A needed path does not exist or is not accessable. | +| internal_error | A different, unspecified internal error was encountered. | + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + +## Start bootstrapping {#post-bootstrap} + +```sh +POST /v1/bootstrap/{action} +``` + +Initiate bootstrapping. + +The request must contain a bootstrap configuration JSON object, as +described in [Object attributes]({{< relref "/operate/rs/references/rest-api/objects/" >}}) or a minimal subset. + +Bootstrapping is permitted only when the current bootstrap state is +`idle` or `error` (in which case the process will restart with the new +configuration). + +This request is asynchronous - once the request has been accepted, +the caller is expected to poll bootstrap status while waiting for it to +complete. + +### Request {#post-request} + +#### Example HTTP request + +```sh +POST /bootstrap/create_cluster +``` + +#### Example JSON body + +##### Join cluster +```json +{ + "action": "join_cluster", + "cluster": { + "nodes":[ "1.1.1.1", "2.2.2.2" ] + }, + "node": { + "paths": { + "persistent_path": "/path/to/persistent/storage", + "ephemeral_path": "/path/to/ephemeral/storage", + "bigstore_path": "/path/to/bigstore/storage" + }, + "bigstore_driver": "speedb", + "identity": { + "addr":"1.2.3.4", + "external_addr":["2001:0db8:85a3:0000:0000:8a2e:0370:7334", "3.4.5.6"] + } + }, + "credentials": { + "username": "my_username", + "password": "my_password" + } +} +``` + +##### Create cluster +```json +{ + "action": "create_cluster", + "cluster": { + "nodes": [], + "name": "my.cluster" + }, + "node": { + "paths": { + "persistent_path": "/path/to/persistent/storage", + "ephemeral_path": "/path/to/ephemeral/storage", + "bigstore_path": "/path/to/bigredis/storage" + }, + "identity": { + "addr":"1.2.3.4", + "external_addr":["2001:0db8:85a3:0000:0000:8a2e:0370:7334", "3.4.5.6"] + }, + "bigstore_driver": "rocksdb" + }, + "license": "----- LICENSE START -----\ndi+iK...KniI9\n----- LICENSE END -----\n", + "credentials": { + "username": "my_username", + "password": "my_password" + } +} +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Request body + +Include a [bootstrap object]({{< relref "/operate/rs/references/rest-api/objects/bootstrap" >}}) in the request body. + +### Response {#post-response} + +#### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Request received and processing begins. | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Bootstrap already in progress (check state) | diff --git a/content/operate/rs/7.4/references/rest-api/requests/bootstrap/validate.md b/content/operate/rs/7.4/references/rest-api/requests/bootstrap/validate.md new file mode 100644 index 0000000000..ccf68f5fca --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/bootstrap/validate.md @@ -0,0 +1,55 @@ +--- +Title: Bootstrap validation requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Boostrap validation requests +headerRange: '[1-2]' +linkTitle: validate +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/bootstrap/validate/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-bootstrap-validate) | `/v1/bootstrap/validate/{action}` | Perform bootstrap validation | + +## Bootstrap validation {#post-bootstrap-validate} + + POST /v1/bootstrap/validate/{action} + +Perform bootstrap validation. + +Unlike actual bootstrapping, this request blocks and immediately +returns with a response. + +### Request {#post-request} + +#### Example HTTP request + + POST /bootstrap/validate/join_cluster + +#### Request body + +The request must contain a [bootstrap configuration object]({{< relref "/operate/rs/references/rest-api/objects/bootstrap" >}}), similar to the one used for actual bootstrapping. + +### Response {#post-response} + +If an error occurs, the call returns a `bootstrap_status` JSON object that contains the following fields: + +| Field | Description | +|-------|-------------| +| state | Current bootstrap state.

`idle`: No bootstrapping started.

`initiated`: Bootstrap request received.

`creating_cluster`: In the process of creating a new cluster.

`joining_cluster`: In the process of joining an existing cluster.

`error`: The last bootstrap action failed.

`completed`: The last bootstrap action completed successfully.| +| start_time | Bootstrap process start time | +| end_time | Bootstrap process end time | +| error_code | If state is `error`, this error code describes the type of error encountered. | +| error_details | An error-specific object that may contain additional information about the error. A common field in use is `message` which provides a more verbose error message. + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error, validation was successful. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Validation failed, bootstrap status is returned as body. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/cluster/_index.md b/content/operate/rs/7.4/references/rest-api/requests/cluster/_index.md new file mode 100644 index 0000000000..b309ff922e --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/cluster/_index.md @@ -0,0 +1,165 @@ +--- +Title: Cluster requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Cluster settings requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: cluster +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/cluster/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-cluster) | `/v1/cluster` | Get cluster info | +| [PUT](#put-cluster) | `/v1/cluster` | Update cluster settings | + +## Get cluster info {#get-cluster} + + GET /v1/cluster + +Get cluster info. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_cluster_info]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_info" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /cluster + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-response} + +Returns a [cluster object]({{< relref "/operate/rs/references/rest-api/objects/cluster" >}}). + +#### Example JSON body + +```json +{ + "name": "my-rlec-cluster", + "alert_settings": { "..." }, + "created_time": "2015-04-29T09:09:25Z", + "email_alerts": false, + "email_from": "", + "rack_aware": false, + "smtp_host": "", + "smtp_password": "", + "smtp_port": 25, + "smtp_tls_mode": "none", + "smtp_username": "" +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + +## Update cluster settings {#put-cluster} + + PUT /v1/cluster + +Update cluster settings. + +If called with the `dry_run` URL query string, the function will +validate the [cluster object]({{< relref "/operate/rs/references/rest-api/objects/cluster" >}}), but will not apply the requested +changes. + +#### Required permissions + +| Permission name | +|-----------------| +| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | + +### Request {#put-request} + +#### Example HTTP request + + PUT /cluster + +#### Example JSON body + +```json +{ + "email_alerts": true, + "alert_settings": { + "node_failed": true, + "node_memory": { + "enabled": true, + "threshold": "80" + } + } +} +``` + +The above request will enable email alerts and alert reporting for node failures and node removals. + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| dry_run | string | Validate but don't apply the new cluster settings | + +#### Request body + +Include a [cluster object]({{< relref "/operate/rs/references/rest-api/objects/cluster" >}}) with updated fields in the request body. + +### Response {#put-response} + +#### Example JSON body + +```json +{ + "name": "mycluster.mydomain.com", + "email_alerts": true, + "alert_settings": { + "node_failed": true, + "node_memory": { + "enabled": true, + "threshold": "80" + } + }, + "// additional fields..." +} +``` + +### Error codes {#put-error-codes} + +When errors are reported, the server may return a JSON object with `error_code` and `message` field that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| bad_nginx_conf | • Designated port is already bound.

• nginx configuration is illegal. | +| bad_debuginfo_path | • Debuginfo path doesn't exist.

• Debuginfo path is inaccessible. | +| config_edit_conflict | Cluster config was edited by another source simultaneously. | + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad content provided. | + diff --git a/content/operate/rs/7.4/references/rest-api/requests/cluster/actions.md b/content/operate/rs/7.4/references/rest-api/requests/cluster/actions.md new file mode 100644 index 0000000000..018567a723 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/cluster/actions.md @@ -0,0 +1,199 @@ +--- +Title: Cluster actions requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Cluster action requests +headerRange: '[1-2]' +linkTitle: actions +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/cluster/actions/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-cluster-actions) | `/v1/cluster/actions` | Get the status of all actions | +| [GET](#get-cluster-action) | `/v1/cluster/actions/{action}` | Get the status of a specific action | +| [POST](#post-cluster-action) | `/v1/cluster/actions/{action}` | Initiate a cluster-wide action | +| [DELETE](#delete-cluster-action) | `/v1/cluster/actions/{action}` | Cancel action or remove action status | + +## Get all cluster actions {#get-all-cluster-actions} + + GET /v1/cluster/actions + +Get the status of all currently executing, queued, or completed cluster actions. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_status_of_cluster_action]({{< relref "/operate/rs/references/rest-api/permissions#view_status_of_cluster_action" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + + GET /cluster/actions + +### Response {#get-all-response} + +Returns a JSON array of [action objects]({{< relref "/operate/rs/references/rest-api/objects/action" >}}). + +#### Example JSON body + +```json +{ + "actions": [ + { + "name": "action_name", + "status": "queued", + "progress": 0.0 + } + ] +} +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error, response provides info about an ongoing action. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Action does not exist (i.e. not currently running and no available status of last run). | + +## Get cluster action {#get-cluster-action} + + GET /v1/cluster/actions/{action} + +Get the status of a currently executing, queued, or completed cluster action. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_status_of_cluster_action]({{< relref "/operate/rs/references/rest-api/permissions#view_status_of_cluster_action" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /cluster/actions/action_name + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| action | string | The action to check. | + +### Response {#get-response} + +Returns an [action object]({{< relref "/operate/rs/references/rest-api/objects/action" >}}). + +#### Example JSON body + +```json +{ + "name": "action_name", + "status": "queued", + "progress": 0.0 +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error, response provides info about an ongoing action. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Action does not exist (i.e. not currently running and no available status of last run). | + +## Initiate cluster-wide action {#post-cluster-action} + + POST /v1/cluster/actions/{action} + +Initiate a cluster-wide action. + +The API allows only a single instance of any action type to be +invoked at the same time, and violations of this requirement will +result in a `409 CONFLICT` response. + +The caller is expected to query and process the results of the +previously executed instance of the same action, which will be +removed as soon as the new one is submitted. + +#### Required permissions + +| Permission name | +|-----------------| +| [start_cluster_action]({{< relref "/operate/rs/references/rest-api/permissions#start_cluster_action" >}}) | + +### Request {#post-request} + +#### Example HTTP request + + POST /cluster/actions/action_name + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| action | string | The name of the action required. | + +Supported cluster actions: + +- `change_master`: Promotes a specified node to become the primary node of the cluster, which coordinates cluster-wide operations. Include the `node_uid` of the node you want to promote in the request body. + + ```sh + POST /v1/cluster/actions/change_master + { + "node_uid": "2" + } + ``` + +### Response {#post-response} + +The body content may provide additional action details. Currently, it is not used. + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error, action was initiated. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad action or content provided. | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | A conflicting action is already in progress. | + +## Cancel action {#delete-cluster-action} + + DELETE /v1/cluster/actions/{action} + +Cancel a queued or executing cluster action, or remove the status of +a previously executed and completed action. + +#### Required permissions + +| Permission name | +|-----------------| +| [cancel_cluster_action]({{< relref "/operate/rs/references/rest-api/permissions#cancel_cluster_action" >}}) | + +### Request {#delete-request} + +#### Example HTTP request + + DELETE /v1/cluster/actions/action_name + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| action | string | The name of the action to cancel, currently no actions are supported. | + +### Response {#delete-response} + +Returns a status code. + +### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Action will be cancelled when possible. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Action unknown or not currently running. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/cluster/alerts.md b/content/operate/rs/7.4/references/rest-api/requests/cluster/alerts.md new file mode 100644 index 0000000000..b1f62dc67a --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/cluster/alerts.md @@ -0,0 +1,132 @@ +--- +Title: Cluster alerts requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Cluster alert requests +headerRange: '[1-2]' +linkTitle: alerts +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/cluster/alerts/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-alerts) | `/v1/cluster/alerts` | Get all cluster alerts | +| [GET](#get-alert) | `/v1/cluster/alerts/{alert}` | Get a specific cluster alert | + +## Get all cluster alerts {#get-all-alerts} + + GET /v1/cluster/alerts + +Get all alert states for the cluster object. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_cluster_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_alerts" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + + GET /cluster/alerts + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| ignore_settings | boolean | Retrieve updated alert state regardless of the cluster’s alert_settings. When not present, a disabled alert will always be retrieved as disabled with a false state. (optional) | + +### Response {#get-all-response} + +Returns a hash of [alert objects]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}) and their states. + +#### Example JSON body + +```json +{ + "cluster_too_few_nodes_for_replication": { + "change_time": "2014-12-22T11:48:00Z", + "change_value": { + "state": false + }, + "enabled": true, + "state": "off", + "severity": "WARNING", + }, + "..." +} +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + +## Get cluster alert {#get-alert} + + GET /v1/cluster/alerts/{alert} + +Get a cluster alert state. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_cluster_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_alerts" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /cluster/alerts/cluster_too_few_nodes_for_replication + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| ignore_settings | boolean | Retrieve updated alert state regardless of the cluster’s alert_settings. When not present, a disabled alert will always be retrieved as disabled with a false state. (optional) | + +### Response {#get-response} + +Returns an [alert object]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}). + +#### Example JSON body + +```json +{ + "change_time": "2014-12-22T11:48:00Z", + "change_value": { + "state": false + }, + "enabled": true, + "state": "off", + "severity": "WARNING", +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Specified alert does not exist | diff --git a/content/operate/rs/7.4/references/rest-api/requests/cluster/auditing-db-conns.md b/content/operate/rs/7.4/references/rest-api/requests/cluster/auditing-db-conns.md new file mode 100644 index 0000000000..9091bf52e6 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/cluster/auditing-db-conns.md @@ -0,0 +1,196 @@ +--- +Title: Auditing database connections requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Auditing database connections requests +headerRange: '[1-2]' +linkTitle: auditing/db_conns +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/cluster/auditing-db-conns/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-cluster-audit-db-conns) | `/v1/cluster/auditing/db_conns` | Get database connection auditing settings | +| [PUT](#put-cluster-audit-db-conns) | `/v1/cluster/auditing/db_conns` | Update database connection auditing settings | +| [DELETE](#delete-cluster-audit-db-conns) | `/v1/cluster/auditing/db_conns` | Delete database connection auditing settings | + +## Get database auditing settings {#get-cluster-audit-db-conns} + + GET /v1/cluster/auditing/db_conns + +Gets the configuration settings for [auditing database connections]({{< relref "/operate/rs/security/audit-events" >}}). + +#### Required permissions + +| Permission name | +|-----------------| +| [view_cluster_info]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_info" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /cluster/auditing/db_conns + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-response} + +Returns a [database connection auditing configuration object]({{< relref "/operate/rs/references/rest-api/objects/db-conns-auditing-config" >}}). + +#### Example JSON body + +```json +{ + "audit_address": "127.0.0.1", + "audit_port": 12345, + "audit_protocol": "TCP", + "audit_reconnect_interval": 1, + "audit_reconnect_max_attempts": 0 +} +``` + +### Error codes {#get-error-codes} + +When errors are reported, the server may return a JSON object with `error_code` and `message` fields that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| db_conns_auditing_unsupported_by_capability | Not all nodes support DB Connections Auditing capability | + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success | +| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | Feature not supported for all nodes | + +## Update database auditing {#put-cluster-audit-db-conns} + + PUT /v1/cluster/auditing/db_conns + +Updates the configuration settings for [auditing database connections]({{< relref "/operate/rs/security/audit-events" >}}). + +#### Required permissions + +| Permission name | +|-----------------| +| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | + +### Request {#put-request} + +#### Example HTTP request + + PUT /cluster/auditing/db_conns + +#### Example JSON body + +```json +{ + "audit_protocol": "TCP", + "audit_address": "127.0.0.1", + "audit_port": 12345, + "audit_reconnect_interval": 1, + "audit_reconnect_max_attempts": 0 +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Request body + +Include a [database connection auditing configuration object]({{< relref "/operate/rs/references/rest-api/objects/db-conns-auditing-config" >}}) with updated fields in the request body. + +### Response {#put-response} + +Returns the updated [database connection auditing configuration object]({{< relref "/operate/rs/references/rest-api/objects/db-conns-auditing-config" >}}). + +#### Example JSON body + +```json +{ + "audit_address": "127.0.0.1", + "audit_port": 12345, + "audit_protocol": "TCP", + "audit_reconnect_interval": 1, + "audit_reconnect_max_attempts": 0 +} +``` + +### Error codes {#put-error-codes} + +When errors are reported, the server may return a JSON object with `error_code` and `message` fields that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| db_conns_auditing_unsupported_by_capability | Not all nodes support DB Connections Auditing capability | + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success | +| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | Feature not supported for all nodes | + +## Delete database auditing settings {#delete-cluster-audit-db-conns} + + DELETE /v1/cluster/auditing/db_conns + +Resets the configuration settings for [auditing database connections]({{< relref "/operate/rs/security/audit-events" >}}). + +#### Required permissions + +| Permission name | +|-----------------| +| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | + +### Request {#delete-request} + +#### Example HTTP request + + DELETE /cluster/auditing/db_conns + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#delete-response} + +Returns a status code that indicates whether the database connection auditing settings reset successfully or failed to reset. + +### Error codes {#delete-error-codes} + +When errors are reported, the server may return a JSON object with `error_code` and `message` fields that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| db_conns_audit_config_not_found | Unable to find the auditing configuration | +| cannot_delete_audit_config_when_policy_enabled | Auditing cluster policy is 'enabled' when trying to delete the auditing configuration | +| cannot_delete_audit_config_when_bdb_enabled | One of the databases has auditing configuration 'enabled' when trying to delete the auditing configuration | + +### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Configuration not found | +| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | Feature not supported for all nodes | diff --git a/content/operate/rs/7.4/references/rest-api/requests/cluster/certificates/_index.md b/content/operate/rs/7.4/references/rest-api/requests/cluster/certificates/_index.md new file mode 100644 index 0000000000..370c60c178 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/cluster/certificates/_index.md @@ -0,0 +1,152 @@ +--- +Title: Cluster certificates requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Cluster certificates requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: certificates +weight: $weight +aliases: + - /operate/rs/references/rest-api/requests/cluster/update-cert +url: '/operate/rs/7.4/references/rest-api/requests/cluster/certificates/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-cluster-certificates) | `/v1/cluster/certificates` | Get cluster certificates | +| [PUT](#put-cluster-update_cert) | `/v1/cluster/update_cert` | Update a cluster certificate | +| [DELETE](#delete-cluster-certificate) | `/v1/cluster/certificates/{certificate_name}` | Delete cluster certificate | + +## Get cluster certificates {#get-cluster-certificates} + + GET /v1/cluster/certificates + +Get the cluster's certificates. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_cluster_info]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_info" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /cluster/certificates + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-response} + +Returns a JSON object that contains the cluster's certificates and keys. + +#### Example JSON body + +```json +{ + "api_cert": "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----", + "api_key": "-----BEGIN RSA PRIVATE KEY-----...-----END RSA PRIVATE KEY-----" + "// additional certificates..." +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + + +## Update cluster certificate {#put-cluster-update_cert} + +```sh +PUT /v1/cluster/update_cert +``` + +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. + +See the [certificates table]({{< relref "/operate/rs/security/certificates" >}}) for the list of cluster certificates and their descriptions. + +### Request {#put-request} + +#### Example HTTP request + +```sh +PUT /cluster/update_cert +``` + +#### Example JSON body + +```json +{ + "name": "certificate1", + "key": "-----BEGIN RSA PRIVATE KEY-----\n[key_content]\n-----END RSA PRIVATE KEY-----", + "certificate": "-----BEGIN CERTIFICATE-----\n[cert_content]\n-----END CERTIFICATE-----", +} +``` + +Replace `[key_content]` with the content of the private key and `[cert_content]` with the content of the certificate. + +### Response {#put-response} + +Responds with the `200 OK` status code if the certificate replacement succeeds across the entire cluster. + +Otherwise, retry the certificate update in case the failure was due to a temporary issue in the cluster. + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Failed, invalid certificate. | +| [403 Forbidden](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4) | Failed, unknown certificate. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Failed, invalid certificate. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Failed, expired certificate. | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Failed, not all nodes have been updated. | + + +## Delete cluster certificate {#delete-cluster-certificate} + + DELETE /v1/cluster/certificates/{string: certificate_name} + +Removes the specified cluster certificate from both CCS and disk +across all nodes. Only optional certificates can be deleted through +this endpoint. See the [certificates table]({{< relref "/operate/rs/security/certificates" >}}) for the list of cluster certificates and their descriptions. + +### Request {#delete-request} + +#### Example HTTP request + + DELETE /cluster/certificates/ + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#delete-response} + +Returns a status code that indicates the certificate deletion success or failure. + +### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Operation successful | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Failed, requested deletion of an unknown certificate | +| [403 Forbidden](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4) | Failed, requested deletion of a required certificate | +| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Failed, error while deleting certificate from disk | diff --git a/content/operate/rs/7.4/references/rest-api/requests/cluster/certificates/rotate.md b/content/operate/rs/7.4/references/rest-api/requests/cluster/certificates/rotate.md new file mode 100644 index 0000000000..4f8c39b86d --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/cluster/certificates/rotate.md @@ -0,0 +1,51 @@ +--- +Title: Rotate cluster certificates requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Rotate cluster certificates requests +headerRange: '[1-2]' +linkTitle: rotate +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/cluster/certificates/rotate/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-cluster-certificates-rotate) | `/v1/cluster/certificates/rotate` | Regenerate all internal cluster certificates | + +## Rotate cluster certificates {#post-cluster-certificates-rotate} + + POST /v1/cluster/certificates/rotate + +Regenerates all _internal_ cluster certificates. + +The certificate rotation will be performed on all nodes within the cluster. If +"name" is provided, only rotate the specified certificate on all nodes within the cluster. + +### Request {#post-request} + +#### Example HTTP request + + POST /cluster/certificates/rotate + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#post-response} + +Responds with a `200 OK` status code if the internal certificates successfully rotate across the entire cluster. + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Failed, not all nodes have been updated. | +| [403 Forbidden](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4) | Unsupported internal certificate rotation. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/cluster/check.md b/content/operate/rs/7.4/references/rest-api/requests/cluster/check.md new file mode 100644 index 0000000000..818a8fa1eb --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/cluster/check.md @@ -0,0 +1,98 @@ +--- +Title: Check all cluster nodes requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Requests that run checks on all cluster nodes. +headerRange: '[1-2]' +linkTitle: check +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/cluster/check/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-cluster-check) | `/v1/cluster/check` | Runs checks on all cluster nodes | + +## Check all nodes {#get-cluster-check} + + GET /v1/cluster/check + +Runs the following checks on all cluster nodes: + +| Check name | Description | +|-----------|-------------| +| bootstrap_status | Verifies the local node's bootstrap process completed without errors. | +| services | Verifies all Redis Enterprise Software services are running. | +| port_range | Verifies the [`ip_local_port_range`](https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html) doesn't conflict with the ports Redis Enterprise might assign to shards. | +| pidfiles | Verifies all active local shards have PID files. | +| capabilities | Verifies all binaries have the proper capability bits. | +| existing_sockets | Verifies sockets exist for all processes that require them. | +| host_settings | Verifies the following:
• Linux `overcommit_memory` setting is 1.
• `transparent_hugepage` is disabled.
• Socket maximum connections setting `somaxconn` is 1024. | +| tcp_connectivity | Verifies this node can connect to all other alive nodes. | + +#### Required permissions + +| Permission name | +|-----------------| +| [view_all_nodes_checks]({{< relref "/operate/rs/references/rest-api/permissions#view_all_nodes_checks" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /cluster/check + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +### Response {#get-response} + +Returns a JSON array with results from all nodes. + +When errors occur, the server returns a JSON object with `result: false` and an `error` field that provides additional information for each node that had an error. If an error occurs during a check, the `error` field only includes a message for the first check that fails on each node. + +Possible `error` messages: + +- "bootstrap request to cnm_http failed,resp_code: ...,resp_content: ..." +- "process ... is not running or not responding (...)" +- "could not communicate with 'supervisorctl': ..." +- "connectivity check failed retrieving ports for testing" + +#### Example JSON body + +```json +{ + "cluster_test_result": false, + "nodes": [ + { + "node_uid": "1", + "result": true + }, + { + "node_uid": "2", + "result": true + }, + { + "node_uid": "3", + "result": false, + "error": "process alert_mgr is not running or not responding ([Errno 111] Connection refused)" + } + ] +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error | diff --git a/content/operate/rs/7.4/references/rest-api/requests/cluster/debuginfo.md b/content/operate/rs/7.4/references/rest-api/requests/cluster/debuginfo.md new file mode 100644 index 0000000000..f2bc24de2b --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/cluster/debuginfo.md @@ -0,0 +1,54 @@ +--- +Title: Cluster debug info requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the Redis Enterprise Software REST API /cluster/debuginfo requests. +headerRange: '[1-2]' +linkTitle: debuginfo +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/cluster/debuginfo/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-cluster-debuginfo) | `/v1/cluster/debuginfo` | Get debug info from all nodes and databases | + +## Get cluster debug info {#get-cluster-debuginfo} + + GET /v1/cluster/debuginfo + +Downloads a tar file that contains debug info from all nodes and databases. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_debugging_info]({{< relref "/operate/rs/references/rest-api/permissions#view_debugging_info" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /cluster/debuginfo + +### Response {#get-response} + +Downloads the debug info in a tar file called `filename.tar.gz`. Extract the files from the tar file to access the debug info for all nodes. + +#### Response headers + +| Key | Value | Description | +|-----|-------|-------------| +| Content-Type | application/x-gzip | Media type of request/response body | +| Content-Length | 653350 | Length of the response body in octets | +| Content-Disposition | attachment; filename=debuginfo.tar.gz | Display response in browser or download as attachment | + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success. | +| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Failed to get debug info. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/cluster/ldap.md b/content/operate/rs/7.4/references/rest-api/requests/cluster/ldap.md new file mode 100644 index 0000000000..e5ca35979b --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/cluster/ldap.md @@ -0,0 +1,171 @@ +--- +Title: Cluster LDAP requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: LDAP configuration requests +headerRange: '[1-2]' +linkTitle: ldap +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/cluster/ldap/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-cluster-ldap) | `/v1/cluster/ldap` | Get LDAP configuration | +| [PUT](#put-cluster-ldap) | `/v1/cluster/ldap` | Set/update LDAP configuration | +| [DELETE](#delete-cluster-ldap) | `/v1/cluster/ldap` | Delete LDAP configuration | + +## Get LDAP configuration {#get-cluster-ldap} + + GET /v1/cluster/ldap + +Get the LDAP configuration. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_ldap_config]({{< relref "/operate/rs/references/rest-api/permissions#view_ldap_config" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /cluster/ldap + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-response} + +Returns an [LDAP object]({{< relref "/operate/rs/references/rest-api/objects/ldap" >}}). + +#### Example JSON body + +```json +{ + "bind_dn": "rl_admin", + "bind_pass": "***", + "ca_cert": "", + "control_plane": false, + "data_plane": false, + "dn_group_attr": "MemberOf", + "dn_group_query": {}, + "starttls": false, + "uris": ["ldap://ldap.example.org:636"], + "user_dn_query": {}, + "user_dn_template": "cn=%u, ou=users,dc=example,dc=org" +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success | + +## Update LDAP configuration {#put-cluster-ldap} + + PUT /v1/cluster/ldap + +Set or update the cluster LDAP configuration. + +#### Required permissions + +| Permission name | +|-----------------| +| [config_ldap]({{< relref "/operate/rs/references/rest-api/permissions#config_ldap" >}}) | + +### Request {#put-request} + +#### Example HTTP request + + POST /cluster/ldap + +#### Example JSON body + +```json +{ + "uris": [ + "ldap://ldap.redislabs.com:389" + ], + "bind_dn": "rl_admin", + "bind_pass": "secret", + "user_dn_template": "cn=%u,dc=example,dc=org", + "dn_group_attr": "MemberOf", + "directory_timeout_s": 5 +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Request body + +Include an [LDAP object]({{< relref "/operate/rs/references/rest-api/objects/ldap" >}}) with updated fields in the request body. + +### Response {#put-response} + +Returns a status code. If an error occurs, the response body may include an error code and message with more details. + +### Error codes {#put-error-codes} + +Possible `error_code` values: + +| Code | Description | +|------|-------------| +| illegal_fields_combination | An unacceptable combination of fields was specified for the configuration object (e.g.: two mutually-exclusive fields), or a required field is missing.| + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, LDAP config has been set. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. | + +## Delete LDAP configuration {#delete-cluster-ldap} + + DELETE /v1/cluster/ldap + +Clear the LDAP configuration. + +#### Required permissions + +| Permission name | +|-----------------| +| [config_ldap]({{< relref "/operate/rs/references/rest-api/permissions#config_ldap" >}}) | + +### Request {#delete-request} + +#### Example HTTP request + + DELETE /cluster/ldap + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#delete-response} + +Returns a status code. + +### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success | diff --git a/content/operate/rs/7.4/references/rest-api/requests/cluster/module-capabilities.md b/content/operate/rs/7.4/references/rest-api/requests/cluster/module-capabilities.md new file mode 100644 index 0000000000..28bb897b8d --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/cluster/module-capabilities.md @@ -0,0 +1,65 @@ +--- +Title: Cluster module capabilities requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Redis module capabilities requests +headerRange: '[1-2]' +linkTitle: module-capabilities +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/cluster/module-capabilities/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-cluster-module-capabilities) | `/v1/cluster/module-capabilities` | List possible Redis module capabilities | + +## List Redis module capabilities {#get-cluster-module-capabilities} + + GET /v1/cluster/module-capabilities + +List possible Redis module capabilities. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_cluster_modules]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_modules" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /cluster/module-capabilities + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | \*/\* | Accepted media type | + +### Response {#get-response} + +Returns a JSON object that contains a list of capability names and descriptions. + +#### Example JSON body + +```json +{ + "all_capabilities": [ + {"name": "types", "desc": "module has its own types and not only operate on existing redis types"}, + {"name": "no_multi_key", "desc": "module has no methods that operate on multiple keys"} + "// additional capabilities..." + ] +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + diff --git a/content/operate/rs/7.4/references/rest-api/requests/cluster/policy.md b/content/operate/rs/7.4/references/rest-api/requests/cluster/policy.md new file mode 100644 index 0000000000..8ba57f59e8 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/cluster/policy.md @@ -0,0 +1,117 @@ +--- +Title: Cluster policy requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Cluster policy requests +headerRange: '[1-2]' +linkTitle: policy +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/cluster/policy/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-cluster-policy) | `/v1/cluster/policy` | Get cluster policy settings | +| [PUT](#put-cluster-policy) | `/v1/cluster/policy` | Update cluster policy settings | + +## Get cluster policy {#get-cluster-policy} + + GET /v1/cluster/policy + +Gets the cluster's current policy settings. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_cluster_info]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_info" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /cluster/policy + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-response} + +Returns a [cluster settings object]({{< relref "/operate/rs/references/rest-api/objects/cluster_settings" >}}). + +#### Example JSON body + +```json +{ + "db_conns_auditing": false, + "default_non_sharded_proxy_policy": "single", + "default_provisioned_redis_version": "6.0", + "default_sharded_proxy_policy": "single", + "default_shards_placement": "dense", + "redis_upgrade_policy": "major", + "// additional fields..." +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success | + +## Update cluster policy {#put-cluster-policy} + + PUT /v1/cluster/policy + +Update cluster policy settings. + +#### Required permissions + +| Permission name | +|-----------------| +| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | + +### Request {#put-request} + +#### Example HTTP request + + PUT /cluster/policy + +#### Example JSON body + +```json +{ + "default_shards_placement": "sparse", + "default_sharded_proxy_policy": "all-nodes" +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Request body + +Include a [cluster settings object]({{< relref "/operate/rs/references/rest-api/objects/cluster_settings" >}}) with updated fields in the request body. + +### Response {#put-response} + +Returns a status code that indicates the success or failure of the cluster settings update. + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success | +| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Failed to set parameters | diff --git a/content/operate/rs/7.4/references/rest-api/requests/cluster/services_configuration.md b/content/operate/rs/7.4/references/rest-api/requests/cluster/services_configuration.md new file mode 100644 index 0000000000..2338e217d5 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/cluster/services_configuration.md @@ -0,0 +1,131 @@ +--- +Title: Cluster services configuration requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Cluster services configuration requests +headerRange: '[1-2]' +linkTitle: services_configuration +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/cluster/services_configuration/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-cluster-services_config) | `/v1/cluster/services_configuration` | Get cluster services settings | +| [PUT](#put-cluster-services_config) | `/v1/cluster/services_configuration` | Update cluster services settings | + +## Get cluster services configuration {#get-cluster-services_config} + + GET /v1/cluster/services_configuration + +Get cluster services settings. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_cluster_info]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_info" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /cluster/services_configuration + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-response} + +Returns a [services configuration object]({{< relref "/operate/rs/references/rest-api/objects/services_configuration" >}}). + +#### Example JSON body + +```json +{ + "cm_server": { + "operating_mode": "disabled" + }, + "mdns_server": { + "operating_mode": "enabled" + }, + "// additional services..." +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + +## Update cluster services configuration {#put-cluster-services_config} + + PUT /v1/cluster/services_configuration + +Update the cluster services settings. + +#### Required permissions + +| Permission name | +|-----------------| +| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | + +### Request {#put-request} + +#### Example HTTP request + + PUT /cluster/services_configuration + +#### Example JSON body + +```json +{ + "cm_server": { + "operating_mode": "disabled" + }, + "// additional services..." +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Request body + +Include a [services configuration object]({{< relref "/operate/rs/references/rest-api/objects/services_configuration" >}}) with updated fields in the request body. + +### Response {#put-response} + +Returns the updated [services configuration object]({{< relref "/operate/rs/references/rest-api/objects/services_configuration" >}}). + +#### Example JSON body + +```json +{ + "cm_server": { + "operating_mode": "disabled" + }, + "mdns_server": { + "operating_mode": "enabled" + }, + "// additional services..." +} +``` + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | diff --git a/content/operate/rs/7.4/references/rest-api/requests/cluster/stats/_index.md b/content/operate/rs/7.4/references/rest-api/requests/cluster/stats/_index.md new file mode 100644 index 0000000000..a9ecb730a2 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/cluster/stats/_index.md @@ -0,0 +1,121 @@ +--- +Title: Cluster stats requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Cluster statistics requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: stats +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/cluster/stats/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-cluster-stats) | `/v1/cluster/stats` | Get cluster stats | + +## Get cluster stats {#get-cluster-stats} + +```sh +GET /v1/cluster/stats +``` + +Get cluster statistics. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_cluster_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /cluster/stats/1?interval=1hour&stime=2014-08-28T10:00:00Z +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | + +### Response {#get-response} + +Returns [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for the cluster. + +#### Example JSON body + +```json +{ + "intervals": [ + { + "interval": "1hour", + "stime": "2015-05-27T12:00:00Z", + "etime": "2015-05-28T12:59:59Z", + "conns": 0.0, + "cpu_idle": 0.8533959401503577, + "cpu_system": 0.01602159448549579, + "cpu_user": 0.08721123782294203, + "egress_bytes": 1111.2184745131947, + "ephemeral_storage_avail": 3406676307.1449075, + "ephemeral_storage_free": 4455091440.360014, + "free_memory": 2745470765.673594, + "ingress_bytes": 220.84083194769272, + "interval": "1week", + "persistent_storage_avail": 3406676307.1533995, + "persistent_storage_free": 4455091440.088265, + "total_req": 0.0 + }, + { + "interval": "1hour", + "stime": "2015-05-27T13:00:00Z", + "etime": "2015-05-28T13:59:59Z", + "// additional fields..." + } + ] +} +``` + +### Example requests + +#### cURL + +```sh +$ curl -k -u "[username]:[password]" -X GET + https://[host][:port]/v1/cluster/stats?interval=1hour +``` + +#### Python + +```python +import requests + +url = "https://[host][:port]/v1/cluster/stats?interval=1hour" +auth = ("[username]", "[password]") + +response = requests.request("GET", url, auth=auth) + +print(response.text) +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Internal server error | diff --git a/content/operate/rs/7.4/references/rest-api/requests/cluster/stats/last.md b/content/operate/rs/7.4/references/rest-api/requests/cluster/stats/last.md new file mode 100644 index 0000000000..c25131e354 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/cluster/stats/last.md @@ -0,0 +1,84 @@ +--- +Title: Cluster last stats requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Most recent cluster statistics requests +headerRange: '[1-2]' +linkTitle: last +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/cluster/stats/last/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-cluster-stats-last) | `/v1/cluster/stats/last` | Get most recent cluster stats | + +## Get latest cluster stats {#get-cluster-stats-last} + + GET /v1/cluster/stats/last + +Get the most recent cluster statistics. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_cluster_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_stats" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /cluster/stats/last?interval=1sec&stime=2015-10-14T06:44:00Z + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week. Default: 1sec. (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | + +### Response {#get-response} + +Returns the most recent [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for the cluster. + +#### Example JSON body + +```json +{ + "conns": 0.0, + "cpu_idle": 0.8424999999988358, + "cpu_system": 0.01749999999992724, + "cpu_user": 0.08374999999978172, + "egress_bytes": 7403.0, + "ephemeral_storage_avail": 151638712320.0, + "ephemeral_storage_free": 162375925760.0, + "etime": "2015-10-14T06:44:01Z", + "free_memory": 5862400000.0, + "ingress_bytes": 7469.0, + "interval": "1sec", + "persistent_storage_avail": 151638712320.0, + "persistent_storage_free": 162375925760.0, + "stime": "2015-10-14T06:44:00Z", + "total_req": 0.0 +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Internal server error | diff --git a/content/operate/rs/7.4/references/rest-api/requests/crdb_tasks/_index.md b/content/operate/rs/7.4/references/rest-api/requests/crdb_tasks/_index.md new file mode 100644 index 0000000000..1257eab6ef --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/crdb_tasks/_index.md @@ -0,0 +1,56 @@ +--- +Title: CRDB tasks requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Active-Active database task status requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: crdb_tasks +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/crdb_tasks/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-crdb_task) | `/v1/crdb_tasks/{task_id}` | Get the status of an executed task | + +## Get task status {#get-crdb_task} + + GET /v1/crdb_tasks/{task_id} + +Get the status of an executed task. + +The status of a completed task is kept for 500 seconds by default. + +### Request {#get-request} + +#### Example HTTP request + + GET /crdb_tasks/1 + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| X-Result-TTL | integer | Task time to live | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| task_id | string | Task ID | + +### Response {#get-response} + +Returns a [CRDB task object]({{< relref "/operate/rs/references/rest-api/objects/crdb_task" >}}). + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Task status. | +| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | Unauthorized request. Invalid credentials | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Task not found. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/crdbs/_index.md b/content/operate/rs/7.4/references/rest-api/requests/crdbs/_index.md new file mode 100644 index 0000000000..a0e8cdc652 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/crdbs/_index.md @@ -0,0 +1,278 @@ +--- +Title: CRDBs requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Active-Active database requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: crdbs +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/crdbs/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-crdbs) | `/v1/crdbs` | Get all Active-Active databases | +| [GET](#get-crdb) | `/v1/crdbs/{crdb_guid}` | Get a specific Active-Active database | +| [PATCH](#patch-crdbs) | `/v1/crdbs/{crdb_guid}` | Update an Active-Active database | +| [POST](#post-crdb) | `/v1/crdbs` | Create a new Active-Active database | +| [DELETE](#delete-crdb) | `/v1/crdbs/{crdb_guid}` | Delete an Active-Active database | + +## Get all Active-Active databases {#get-all-crdbs} + +```sh +GET /v1/crdbs +``` + +Get a list of all Active-Active databases on the cluster. + +### Request {#get-all-request} + +#### Example HTTP request + +```sh +GET /crdbs +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| X-Task-ID | string | Specified task ID | +| X-Result-TTL | integer | Time (in seconds) to keep task result | + +### Response {#get-all-response} + +Returns a JSON array of [CRDB objects]({{< relref "/operate/rs/references/rest-api/objects/crdb" >}}). + +##### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | A list of Active-Active database. | +| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | Unauthorized request. Invalid credentials | + +## Get an Active-Active database {#get-crdb} + +```sh +GET /v1/crdbs/{crdb_guid} +``` + +Get a specific Active-Active database. + +### Request {#get-request} + +#### Example HTTP request + +```sh + GET /crdbs/552bbccb-99f3-4142-bd17-93d245f0bc79 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| X-Task-ID | string | Specified task ID | +| X-Result-TTL | integer | Time (in seconds) to keep task result | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| crdb_guid | string | Globally unique Active-Active database ID (GUID) | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| instance_id | integer | Instance from which to get the Active-Active database information | + +### Response {#get-response} + +Returns a [CRDB object]({{< relref "/operate/rs/references/rest-api/objects/crdb" >}}). + +#### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Active-Active database information is returned. | +| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | Unauthorized request. Invalid credentials | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Database or configuration does not exist. | + +## Update an Active-Active database {#patch-crdbs} + +```sh +PATCH /v1/crdbs/{crdb_guid} +``` + +Update an Active-Active database's configuration. + +In order to add or remove instances, use [`POST crdbs/{crdb_guid}/updates`]({{< relref "/operate/rs/references/rest-api/requests/crdbs/updates#post-crdbs-updates" >}}) instead. + +### Request {#patch-request} + +#### Example HTTP request + +```sh + PATCH /crdbs/552bbccb-99f3-4142-bd17-93d245f0bc79 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| X-Task-ID | string | Specified task ID | +| X-Result-TTL | integer | Time (in seconds) to keep task result | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| crdb_guid | string | Globally unique Active-Active database ID (GUID) | + +#### Request body + +Include a [CRDB object]({{< relref "/operate/rs/references/rest-api/objects/crdb" >}}) with updated fields in the request body. + +### Response {#patch-response} + +Returns a [CRDB task object]({{< relref "/operate/rs/references/rest-api/objects/crdb_task" >}}). + +#### Status codes {#patch-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The request has been accepted. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | The posted Active-Active database contains invalid parameters. | +| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | Unauthorized request. Invalid credentials | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Configuration or Active-Active database not found. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The posted Active-Active database cannot be accepted. | + +## Create an Active-Active database {#post-crdb} + +```sh +POST /v1/crdbs +``` + +Create a new Active-Active database. + +### Request {#post-request} + +#### Example HTTP request + +```sh + POST /crdbs +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| X-Task-ID | string | Specified task ID | +| X-Result-TTL | integer | Time (in seconds) to keep task result | + +#### Request body + +Include a [CRDB object]({{< relref "/operate/rs/references/rest-api/objects/crdb" >}}), which defines the Active-Active database, in the request body. + +##### Example body + +```json +{ + "default_db_config": + { + "name": "sample-crdb", + "memory_size": 214748365 + }, + "instances": + [ + { + "cluster": + { + "url": "http://:9443", + "credentials": + { + "username": "", + "password": "" + }, + "name": "cluster-1" + }, + "compression": 6 + }, + { + "cluster": + { + "url": "http://:9443", + "credentials": + { + "username": "", + "password": "" + }, + "name": "cluster-2" + }, + "compression": 6 + } + ], + "name": "sample-crdb" +} +``` + +This JSON body creates an Active-Active database without TLS and with two participating clusters. + +### Response {#post-response} + +Returns a [CRDB task object]({{< relref "/operate/rs/references/rest-api/objects/crdb_task" >}}). + +#### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The request has been accepted. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | The request is invalid or malformed. | +| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | Unauthorized request. Invalid credentials | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The posted Active-Active database cannot be accepted. | + +## Delete an Active-Active database {#delete-crdb} + +```sh +DELETE /v1/crdbs/{crdb_guid} +``` + +Delete an Active-Active database. + +### Request {#delete-request} + +#### Example HTTP request + +```sh + DELETE /crdbs/552bbccb-99f3-4142-bd17-93d245f0bc79 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| X-Task-ID | string | Specified task ID | +| X-Result-TTL | integer | Time (in seconds) to keep task result | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| crdb_guid | string | Globally unique Active-Active database ID (GUID) | + +### Response {#delete-response} + +Returns a [CRDB task object]({{< relref "/operate/rs/references/rest-api/objects/crdb_task" >}}). + +#### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Action was successful. | +| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | Unauthorized request. Invalid credentials | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Configuration or Active-Active database not found. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The Active-Active GUID is invalid or the Active-Active database was already deleted. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/crdbs/flush.md b/content/operate/rs/7.4/references/rest-api/requests/crdbs/flush.md new file mode 100644 index 0000000000..1d74fe8f7a --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/crdbs/flush.md @@ -0,0 +1,60 @@ +--- +Title: CRDB flush requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Flush Active-Active database requests +headerRange: '[1-2]' +linkTitle: flush +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/crdbs/flush/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [PUT](#put-crdbs-flush) | `/v1/crdbs/{crdb_guid}/flush` | Flush an Active-Active database | + +## Flush an Active-Active database {#put-crdbs-flush} + +```sh +PUT /v1/crdbs/{crdb_guid}/flush +``` + +Flush an Active-Active database. + +### Request {#put-request} + +#### Example HTTP request + +```sh +PUT /crdbs/552bbccb-99f3-4142-bd17-93d245f0bc79/flush +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| X-Task-ID | string | Specified task ID | +| X-Result-TTL | integer | Time (in seconds) to keep task result | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| crdb_guid | string | Globally unique Active-Active database ID (GUID) | + +### Response {#put-response} + +Returns a [CRDB task object]({{< relref "/operate/rs/references/rest-api/objects/crdb_task" >}}). + +#### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Action was successful. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | The request is invalid or malformed. | +| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | Unauthorized request. Invalid credentials | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Configuration or Active-Active database not found. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Configuration cannot be accepted, typically because it was already committed. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/crdbs/health_report.md b/content/operate/rs/7.4/references/rest-api/requests/crdbs/health_report.md new file mode 100644 index 0000000000..fa9f21f17e --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/crdbs/health_report.md @@ -0,0 +1,52 @@ +--- +Title: CRDB health report requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Active-Active database health report requests +headerRange: '[1-2]' +linkTitle: health_report +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/crdbs/health_report/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-crdbs-health) | `/v1/crdbs/{crdb_guid}/health_report` | Get a health report for an Active-Active database | + +## Get health report {#get-crdbs-health} + + GET /v1/crdbs/{crdb_guid}/health_report + +Get a health report for an Active-Active database. + +### Request {#get-request} + +#### Example HTTP request + + GET /crdbs/{crdb_guid}/health_report + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| crdb_guid | string | Globally unique Active-Active database ID (GUID) | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| instance_id | integer | The request retrieves information from the specified Active-Active database instance. If this instance doesn’t exist, the request retrieves information from all instances. (optional) | + +### Response {#get-response} + +Returns a JSON array of [CRDB health report objects]({{< relref "/operate/rs/references/rest-api/objects/crdb/health_report" >}}). + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Action was successful. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Configuration or Active-Active database not found. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/crdbs/purge.md b/content/operate/rs/7.4/references/rest-api/requests/crdbs/purge.md new file mode 100644 index 0000000000..49340ee3f8 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/crdbs/purge.md @@ -0,0 +1,63 @@ +--- +Title: CRDB purge requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Purge removed Active-Active database requests +headerRange: '[1-2]' +linkTitle: purge +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/crdbs/purge/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [PUT](#put-crdbs-purge) | `/v1/crdbs/{crdb_guid}/purge` | Purge data from an instance that was forcibly removed from the Active-Active database | + +## Purge data from removed instance {#put-crdbs-purge} + + PUT /v1/crdbs/{crdb_guid}/purge + +Purge the data from an instance that was removed from the +Active-Active database by force. + +When you force the removal of an instance from an Active-Active +database, the removed instance keeps the data and configuration +according to the last successful synchronization. + +To delete the data and configuration from the forcefully removed +instance you must use this API (Must be executed locally on the +removed instance). + +### Request {#put-request} + +#### Example HTTP request + + PUT /crdbs/1/purge + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| crdb_guid | string | Globally unique Active-Active database ID (GUID) | + +#### Request body + +| Field | Type | Description | +|-------|------|-------------| +| instances | array of integers | Array of unique instance IDs | + +### Response {#put-response} + +Returns a [CRDB task object]({{< relref "/operate/rs/references/rest-api/objects/crdb_task" >}}). + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Action was successful. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | The request is invalid or malformed. | +| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | Unauthorized request. Invalid credentials | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Configuration, instance, or Active-Active database not found. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/crdbs/updates.md b/content/operate/rs/7.4/references/rest-api/requests/crdbs/updates.md new file mode 100644 index 0000000000..6039180413 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/crdbs/updates.md @@ -0,0 +1,70 @@ +--- +Title: CRDB updates requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Update Active-Active configuration requests +headerRange: '[1-2]' +linkTitle: updates +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/crdbs/updates/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-crdbs-updates) | `/v1/crdbs/{crdb_guid}/updates` | Modify Active-Active confgurarion | + +## Modify Active-Active configuration {#post-crdbs-updates} + + POST /v1/crdbs/{crdb_guid}/updates + +Modify Active-Active configuration. + +{{}} +This is a very powerful API request and can cause damage if used incorrectly. +{{}} + +In order to add or remove instances, you must use this API. For simple configuration updates, it is recommended to use PATCH on /crdbs/{crdb_guid} instead. + +Updating default_db_config affects both existing and new instances that may be added. + +When you update db_config, it changes the configuration of the database that you specify. This field overrides corresponding fields (if any) in default_db_config. + +### Request {#post-request} + +#### Example HTTP request + + POST /crdbs/1/updates + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| X-Task-ID | string | Specified task ID | +| X-Result-TTL | integer | Time (in seconds) to keep task result | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| crdb_guid | string | Globally unique Active-Active database ID (GUID) | + +#### Request body + +Include a [CRDB modify_request object]({{< relref "/operate/rs/references/rest-api/objects/crdb/modify_request" >}}) with updated fields in the request body. + +### Response {#post-response} + +Returns a [CRDB task object]({{< relref "/operate/rs/references/rest-api/objects/crdb_task" >}}). + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The request has been accepted. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | The posted Active-Active database contains invalid parameters. | +| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | Unauthorized request. Invalid credentials | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Configuration, instance or Active-Active database not found. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The posted Active-Active database cannot be accepted. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/debuginfo/_index.md b/content/operate/rs/7.4/references/rest-api/requests/debuginfo/_index.md new file mode 100644 index 0000000000..15f8a3e7a7 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/debuginfo/_index.md @@ -0,0 +1,33 @@ +--- +Title: Debug info requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Debug info requests +hideListLinks: true +linkTitle: debuginfo +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/debuginfo/' +--- + +{{}} +These REST API paths are deprecated as of Redis Enterprise Software version 7.4.2. Use the new paths [`/v1/cluster/debuginfo`]({{< relref "/operate/rs/references/rest-api/requests/cluster/debuginfo" >}}), [`/v1/nodes/debuginfo`]({{< relref "/operate/rs/references/rest-api/requests/nodes/debuginfo" >}}), and [`/v1/bdbs/debuginfo`]({{< relref "/operate/rs/references/rest-api/requests/bdbs/debuginfo" >}}) instead. +{{}} + +Downloads a support package, which includes logs and information about the cluster, nodes, databases, and shards, as a tar file called `filename.tar.gz`. Extract the files from the tar file to access the debug info. + +## Get debug info for all nodes in the cluster + +| Method | Path | Description | +|--------|------|-------------| +| [GET]({{< relref "./all#get-all-debuginfo" >}}) | `/v1/debuginfo/all` | Gets debug info for all nodes | +| [GET]({{< relref "./all/bdb#get-all-debuginfo-bdb" >}}) | `/v1/debuginfo/all/bdb/{bdb_uid}` | Gets debug info for a database from all nodes | + +## Get debug info for the current node + +| Method | Path | Description | +|--------|------|-------------| +| [GET]({{< relref "./node#get-debuginfo-node" >}}) | `/v1/debuginfo/node` | Gets debug info for the current node | +| [GET]({{< relref "./node/bdb#get-debuginfo-node-bdb" >}}) | `/v1/debuginfo/node/bdb/{bdb_uid}` | Gets debug info for a database from the current node | diff --git a/content/operate/rs/7.4/references/rest-api/requests/debuginfo/all/_index.md b/content/operate/rs/7.4/references/rest-api/requests/debuginfo/all/_index.md new file mode 100644 index 0000000000..c5349e8574 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/debuginfo/all/_index.md @@ -0,0 +1,59 @@ +--- +Title: All nodes debug info requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the Redis Enterprise Software REST API debuginfo/all requests. +headerRange: '[1-2]' +hideListLinks: true +linkTitle: all +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/debuginfo/all/' +--- + +{{}} +This REST API path is deprecated as of Redis Enterprise Software version 7.4.2. Use the new path [`/v1/cluster/debuginfo`]({{< relref "/operate/rs/references/rest-api/requests/cluster/debuginfo" >}}) instead. +{{}} + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-debuginfo) | `/v1/debuginfo/all` | Get debug info for all nodes | + +## Get debug info for all nodes {#get-all-debuginfo} + + GET /v1/debuginfo/all + +Downloads a tar file that contains debug info from all nodes. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_debugging_info]({{< relref "/operate/rs/references/rest-api/permissions#view_debugging_info" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + + GET /debuginfo/all + +### Response {#get-all-response} + +Downloads the debug info in a tar file called `filename.tar.gz`. Extract the files from the tar file to access the debug info for all nodes. + +#### Response headers + +| Key | Value | Description | +|-----|-------|-------------| +| Content-Type | application/x-gzip | Media type of request/response body | +| Content-Length | 653350 | Length of the response body in octets | +| Content-Disposition | attachment; filename=debuginfo.tar.gz | Display response in browser or download as attachment | + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success. | +| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Failed to get debug info. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/debuginfo/all/bdb.md b/content/operate/rs/7.4/references/rest-api/requests/debuginfo/all/bdb.md new file mode 100644 index 0000000000..2485492041 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/debuginfo/all/bdb.md @@ -0,0 +1,58 @@ +--- +Title: All nodes database debug info requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the Redis Enterprise Software REST API debuginfo/all/bdb requests. +headerRange: '[1-2]' +linkTitle: bdb +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/debuginfo/all/bdb/' +--- + +{{}} +This REST API path is deprecated as of Redis Enterprise Software version 7.4.2. Use the new path [`/v1/bdbs/debuginfo`]({{< relref "/operate/rs/references/rest-api/requests/bdbs/debuginfo" >}}) instead. +{{}} + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-debuginfo-bdb) | `/v1/debuginfo/all/bdb/{bdb_uid}` | Get debug info for a database from all nodes | + +## Get database debug info for all nodes {#get-all-debuginfo-bdb} + + GET /v1/debuginfo/all/bdb/{int: bdb_uid} + +Downloads a tar file that contains debug info for the specified database (`bdb_uid`) from all nodes. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_debugging_info]({{< relref "/operate/rs/references/rest-api/permissions#view_debugging_info" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + + GET /debuginfo/all/bdb/1 + +### Response {#get-all-response} + +Downloads the debug info in a tar file called `filename.tar.gz`. Extract the files from the tar file to access the debug info. + +#### Response headers + +| Key | Value | Description | +|-----|-------|-------------| +| Content-Type | application/x-gzip | Media type of request/response body | +| Content-Length | 653350 | Length of the response body in octets | +| Content-Disposition | attachment; filename=debuginfo.tar.gz | Display response in browser + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success. | +| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Failed to get debug info. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/debuginfo/node/_index.md b/content/operate/rs/7.4/references/rest-api/requests/debuginfo/node/_index.md new file mode 100644 index 0000000000..a007d4292c --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/debuginfo/node/_index.md @@ -0,0 +1,59 @@ +--- +Title: Current node debug info requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the Redis Enterprise Software REST API debuginfo/node requests. +headerRange: '[1-2]' +hideListLinks: true +linkTitle: node +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/debuginfo/node/' +--- + +{{}} +This REST API path is deprecated as of Redis Enterprise Software version 7.4.2. Use the new path [`/v1/nodes/debuginfo`]({{< relref "/operate/rs/references/rest-api/requests/nodes/debuginfo" >}}) instead. +{{}} + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-debuginfo-node) | `/v1/debuginfo/node` | Get debug info for the current node | + +## Get debug info for current node {#get-debuginfo-node} + + GET /v1/debuginfo/node + +Downloads a tar file that contains debug info for the current node. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_debugging_info]({{< relref "/operate/rs/references/rest-api/permissions#view_debugging_info" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /debuginfo/node + +### Response {#get-response} + +Downloads the debug info in a tar file called `filename.tar.gz`. Extract the files from the tar file to access the debug info. + +#### Response headers + +| Key | Value | Description | +|-----|-------|-------------| +| Content-Type | application/x-gzip | Media type of request/response body | +| Content-Length | 653350 | Length of the response body in octets | +| Content-Disposition | attachment; filename=debuginfo.tar.gz | Display response in browser or download as attachment | + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success. | +| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Failed to get debug info. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/debuginfo/node/bdb.md b/content/operate/rs/7.4/references/rest-api/requests/debuginfo/node/bdb.md new file mode 100644 index 0000000000..a15b001339 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/debuginfo/node/bdb.md @@ -0,0 +1,58 @@ +--- +Title: Current node database debug info requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the Redis Enterprise Software REST API debuginfo/node/bdb requests. +headerRange: '[1-2]' +linkTitle: bdb +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/debuginfo/node/bdb/' +--- + +{{}} +This REST API path is deprecated as of Redis Enterprise Software version 7.4.2. Use the new path [`/v1/bdbs/debuginfo`]({{< relref "/operate/rs/references/rest-api/requests/bdbs/debuginfo" >}}) instead. +{{}} + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-debuginfo-node-bdb) | `/v1/debuginfo/node/bdb/{bdb_uid}` | Get debug info for the current node regarding a specific database | + +## Get database debug info for current node {#get-debuginfo-node-bdb} + + GET /v1/debuginfo/node/bdb/{int: bdb_uid} + +Downloads a tar file that contains debug info for the specified database (`bdb_uid`) from the current node. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_debugging_info]({{< relref "/operate/rs/references/rest-api/permissions#view_debugging_info" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /debuginfo/node/bdb/1 + +### Response {#get-response} + +Downloads the debug info in a tar file called `filename.tar.gz`. Extract the files from the tar file to access the debug info. + +#### Response headers + +| Key | Value | Description | +|-----|-------|-------------| +| Content-Type | application/x-gzip | Media type of request/response body | +| Content-Length | 653350 | Length of the response body in octets | +| Content-Disposition | attachment; filename=debuginfo.tar.gz | Display response in browser + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success. | +| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Failed to get debug info. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/endpoints-stats/_index.md b/content/operate/rs/7.4/references/rest-api/requests/endpoints-stats/_index.md new file mode 100644 index 0000000000..0da4d0dd07 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/endpoints-stats/_index.md @@ -0,0 +1,157 @@ +--- +Title: Endpoints stats requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Endpoint statistics requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: endpoints/stats +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/endpoints-stats/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-endpoints-stats) | `/v1/endpoints/stats` | Get stats for all endpoints | + +## Get all endpoints stats {#get-endpoints-stats} + + GET /v1/endpoints/stats + +Get statistics for all endpoint-proxy links. + +{{}} +This method will return both endpoints and listeners stats for backwards +compatability. +{{}} + +#### Required permissions + +| Permission name | +|-----------------| +| [view_endpoint_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_endpoint_stats" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /endpoints/stats?interval=1hour&stime=2014-08-28T10:00:00Z + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | + +### Response {#get-response} + +The `uid` format in the response is: `"BDB_UID:ENDPOINT_UID:PROXY_UID"` + +For example: `{"uid": "1:2:3"}` means `BDB_UID=1`, `ENDPOINT_UID=2`, and `PROXY_UID=3` + +#### Example JSON body + +```json +[ + { + "uid" : "365:1:1", + "intervals" : [ + { + "interval" : "10sec", + "total_req" : 0, + "egress_bytes" : 0, + "cmd_get" : 0, + "monitor_sessions_count" : 0, + "auth_errors" : 0, + "acc_latency" : 0, + "stime" : "2017-01-12T14:59:50Z", + "write_res" : 0, + "total_connections_received" : 0, + "cmd_set" : 0, + "read_req" : 0, + "max_connections_exceeded" : 0, + "acc_write_latency" : 0, + "write_req" : 0, + "other_res" : 0, + "cmd_flush" : 0, + "acc_read_latency" : 0, + "other_req" : 0, + "conns" : 0, + "write_started_res" : 0, + "cmd_touch" : 0, + "read_res" : 0, + "auth_cmds" : 0, + "etime" : "2017-01-12T15:00:00Z", + "total_started_res" : 0, + "ingress_bytes" : 0, + "last_res_time" : 0, + "read_started_res" : 0, + "acc_other_latency" : 0, + "total_res" : 0, + "last_req_time" : 0, + "other_started_res" : 0 + } + ] + }, + { + "intervals" : [ + { + "acc_read_latency" : 0, + "other_req" : 0, + "etime" : "2017-01-12T15:00:00Z", + "auth_cmds" : 0, + "total_started_res" : 0, + "write_started_res" : 0, + "cmd_touch" : 0, + "conns" : 0, + "read_res" : 0, + "total_res" : 0, + "other_started_res" : 0, + "last_req_time" : 0, + "read_started_res" : 0, + "last_res_time" : 0, + "ingress_bytes" : 0, + "acc_other_latency" : 0, + "egress_bytes" : 0, + "interval" : "10sec", + "total_req" : 0, + "acc_latency" : 0, + "auth_errors" : 0, + "cmd_get" : 0, + "monitor_sessions_count" : 0, + "read_req" : 0, + "max_connections_exceeded" : 0, + "total_connections_received" : 0, + "cmd_set" : 0, + "acc_write_latency" : 0, + "write_req" : 0, + "stime" : "2017-01-12T14:59:50Z", + "write_res" : 0, + "cmd_flush" : 0, + "other_res" : 0 + } + ], + "uid" : "333:1:2" + } +] +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | diff --git a/content/operate/rs/7.4/references/rest-api/requests/jsonschema/_index.md b/content/operate/rs/7.4/references/rest-api/requests/jsonschema/_index.md new file mode 100644 index 0000000000..38611508c7 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/jsonschema/_index.md @@ -0,0 +1,67 @@ +--- +Title: JSON schema requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: API object JSON schema requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: jsonschema +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/jsonschema/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-jsonschema) | `/v1/jsonschema` | Get JSON schema of API objects | + +## Get object JSON schema {#get-jsonschema} + + GET /v1/jsonschema + +Get the JSON schema of various [Redis Enterprise REST API objects]({{< relref "/operate/rs/references/rest-api/objects" >}}). + +### Request {#get-request} + +#### Example HTTP request + + GET /jsonschema?object=bdb + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| object | string | Optional. The API object name: 'cluster', 'node', 'bdb' etc. | + +### Response {#get-response} + +Returns the JSON schema of the specified API object. + +#### Example JSON body + +```json +{ + "type": "object", + "description": "An API object that represents a managed database in the cluster.", + "properties": { + "...." + }, + "...." +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Invalid object. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/ldap_mappings/_index.md b/content/operate/rs/7.4/references/rest-api/requests/ldap_mappings/_index.md new file mode 100644 index 0000000000..1e95388f58 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/ldap_mappings/_index.md @@ -0,0 +1,353 @@ +--- +Title: LDAP mappings requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: LDAP mappings requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: ldap_mappings +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/ldap_mappings/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-ldap_mappings) | `/v1/ldap_mappings` | Get all LDAP mappings | +| [GET](#get-ldap_mapping) | `/v1/ldap_mappings/{uid}` | Get a single LDAP mapping | +| [PUT](#put-ldap_mapping) | `/v1/ldap_mappings/{uid}` | Update an LDAP mapping | +| [POST](#post-ldap_mappings) | `/v1/ldap_mappings` | Create a new LDAP mapping | +| [DELETE](#delete-ldap_mappings) | `/v1/ldap_mappings/{uid}` | Delete an LDAP mapping | + +## Get all LDAP mappings {#get-all-ldap_mappings} + + GET /v1/ldap_mappings + +Get all LDAP mappings. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_all_ldap_mappings_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_ldap_mappings_info" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + + GET /ldap_mappings + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-all-response} + +Returns a JSON array of [LDAP mapping objects]({{< relref "/operate/rs/references/rest-api/objects/ldap_mapping" >}}). + +#### Example JSON body + +```json +[ + { + "uid": 17, + "name": "Admins", + "dn": "OU=ops.group,DC=redislabs,DC=com", + "email": "ops.group@redislabs.com", + "role_uids": ["1"], + "email_alerts": true, + "bdbs_email_alerts": ["1","2"], + "cluster_email_alerts": true + } +] +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + +## Get LDAP mapping {#get-ldap_mapping} + + GET /v1/ldap_mappings/{int: uid} + +Get a specific LDAP mapping. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_ldap_mapping_info]({{< relref "/operate/rs/references/rest-api/permissions#view_ldap_mapping_info" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /ldap_mappings/1 + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The object's unique ID. | + +### Response {#get-response} + +Returns an [LDAP mapping object]({{< relref "/operate/rs/references/rest-api/objects/ldap_mapping" >}}). + +#### Example JSON body + +```json +{ + "uid": 17, + "name": "Admins", + "dn": "OU=ops.group,DC=redislabs,DC=com", + "email": "ops.group@redislabs.com", + "role_uids": ["1"], + "email_alerts": true, + "bdbs_email_alerts": ["1","2"], + "cluster_email_alerts": true +} +``` + +### Error codes {#get-error-codes} + +Possible `error_code` values: + +| Code | Description | +|------|-------------| +| unsupported_resource | The cluster is not yet able to handle this resource type. This could happen in a partially upgraded cluster, where some of the nodes are still on a previous version.| +| ldap_mapping_not_exist | An object does not exist| + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success. | +| [403 Forbidden](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4) | Operation is forbidden. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | ldap_mapping does not exist. | +| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support LDAP mappings yet. | + +## Update LDAP mapping {#put-ldap_mapping} + + PUT /v1/ldap_mappings/{int: uid} + +Update an existing ldap_mapping object. + +#### Required permissions + +| Permission name | +|-----------------| +| [update_ldap_mapping]({{< relref "/operate/rs/references/rest-api/permissions#update_ldap_mapping" >}}) | + +### Request {#put-request} + +#### Example HTTP request + + PUT /ldap_mappings/17 + +#### Example JSON body + +```json +{ + "dn": "OU=ops,DC=redislabs,DC=com", + "email": "ops@redislabs.com", + "email_alerts": true, + "bdbs_email_alerts": ["1","2"], + "cluster_email_alerts": true +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Request body + +Include an [LDAP mapping object]({{< relref "/operate/rs/references/rest-api/objects/ldap_mapping" >}}) with updated fields in the request body. + +### Response {#put-response} + +#### Example JSON body + +```json +{ + "uid": 17, + "name": "Admins", + "dn": "OU=ops,DC=redislabs,DC=com", + "email": "ops@redislabs.com", + "role_uids": ["1"], + "email_alerts": true, + "bdbs_email_alerts": ["1","2"], + "cluster_email_alerts": true +} +``` + +### Error codes {#put-error-codes} + +Possible `error_code` values: + +| Code | Description | +|------|-------------| +| unsupported_resource | The cluster is not yet able to handle this resource type. This could happen in a partially upgraded cluster, where some of the nodes are still on a previous version.| +| name_already_exists | An object of the same type and name exists| +| ldap_mapping_not_exist | An object does not exist| +| invalid_dn_param | A dn parameter has an illegal value| +| invalid_name_param | A name parameter has an illegal value| +| invalid_role_uids_param | A role_uids parameter has an illegal value| +| invalid_account_id_param | An account_id parameter has an illegal value| + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, LDAP mapping is created. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to change a non-existing LDAP mapping. | +| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support LDAP mapping yet. | + +## Create LDAP mapping {#post-ldap_mappings} + + POST /v1/ldap_mappings + +Create a new LDAP mapping. + +#### Required permissions + +| Permission name | +|-----------------| +| [create_ldap_mapping]({{< relref "/operate/rs/references/rest-api/permissions#create_ldap_mapping" >}}) | + +### Request {#post-request} + +#### Example HTTP request + + POST /ldap_mappings + +#### Example JSON body + +```json +{ + "name": "Admins", + "dn": "OU=ops.group,DC=redislabs,DC=com", + "email": "ops.group@redislabs.com", + "role_uids": ["1"] +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Request body + +Include an [LDAP mapping object]({{< relref "/operate/rs/references/rest-api/objects/ldap_mapping" >}}) in the request body. + +### Response {#post-response} + +#### Example JSON body + +```json +{ + "uid": 17, + "name": "Admins", + "dn": "OU=ops.group,DC=redislabs,DC=com", + "email": "ops.group@redislabs.com", + "role_uids": ["1"] +} +``` + +### Error codes {#post-error-codes} + +Possible `error_code` values: + +| Code | Description | +|------|-------------| +| unsupported_resource | The cluster is not yet able to handle this resource type. This could happen in a partially upgraded cluster, where some of the nodes are still on a previous version.| +| name_already_exists | An object of the same type and name exists| +| missing_field | A needed field is missing| +| invalid_dn_param | A dn parameter has an illegal value| +| invalid_name_param | A name parameter has an illegal value| +| invalid_role_uids_param | A role_uids parameter has an illegal value| + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, an LDAP-mapping object is created. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. | +| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support LDAP mappings yet. | + +## Delete LDAP mapping {#delete-ldap_mappings} + + DELETE /v1/ldap_mappings/{int: uid} + +Delete an LDAP mapping object. + +#### Required permissions + +| Permission name | +|-----------------| +| [delete_ldap_mapping]({{< relref "/operate/rs/references/rest-api/permissions#delete_ldap_mapping" >}}) | + +### Request {#delete-request} + +#### Example HTTP request + + DELETE /ldap_mappings/1 + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The ldap_mapping unique ID. | + +### Response {#delete-response} + +Returns a status code. If an error occurs, the response body may include a more specific error code and message. + +### Error codes {#delete-error-codes} + +Possible `error_code` values: + +| Code | Description | +|------|-------------| +| unsupported_resource | The cluster is not yet able to handle this resource type. This could happen in a partially upgraded cluster, where some of the nodes are still on a previous version.| +| ldap_mapping_not_exist | An object does not exist| + +### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, the ldap_mapping is deleted. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The request is not acceptable. | +| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support LDAP mappings yet. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/license/_index.md b/content/operate/rs/7.4/references/rest-api/requests/license/_index.md new file mode 100644 index 0000000000..51c8fc79d4 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/license/_index.md @@ -0,0 +1,146 @@ +--- +Title: License requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: License requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: license +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/license/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-license) | `/v1/license` | Get license details | +| [PUT](#put-license) | `/v1/license` | Update the license | + +## Get license {#get-license} + + GET /v1/license + +Returns the license details, including license string, expiration, +and supported features. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_license]({{< relref "/operate/rs/references/rest-api/permissions#view_license" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /license + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-response} + +Returns a JSON object that contains the license details: + +| Name | Type/Value | Description | +|------|------------|-------------| +| license | string | License data | +| cluster_name | string | The cluster name (FQDN) | +| expired | boolean | If the cluster key is expired (`true` or `false`) | +| activation_date | string | The date of the cluster key activation | +| expiration_date | string | The date of the cluster key expiration | +| key | string | License key | +| features | array of strings | Features supported by the cluster | +| owner | string | License owner | +| shards_limit | integer | The total number of shards allowed by the cluster key | +| ram_shards_limit | integer | The number of RAM shards allowed by the cluster key (as of v7.2) | +| ram_shards_in_use | integer | The number of RAM shards in use | +| flash_shards_limit | integer | The number of flash shards (Auto Tiering) allowed by the cluster key (as of v7.2) | +| flash_shards_in_use | integer | The number of flash shards in use | + +#### Example JSON body + +```json +{ + "license": "----- LICENSE START -----\\ndi+iK...KniI9\\n----- LICENSE END -----\\n", + "expired": true, + "activation_date":"2018-12-31T00:00:00Z", + "expiration_date":"2019-12-31T00:00:00Z", + "ram_shards_in_use": 0, + "ram_shards_limit": 300, + "flash_shards_in_use": 0, + "flash_shards_limit": 100, + "shards_limit": 400, + "features": ["bigstore"], + "owner": "Redis", + "cluster_name": "mycluster.local", + "key": "----- LICENSE START -----\\ndi+iK...KniI9\\n----- LICENSE END -----\\n" +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | License is returned in the response body. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | No license is installed. | + +## Update license {#put-license} + + PUT /v1/license + +Validate and install a new license string. + +If you do not provide a valid license, the cluster behaves as if the license was deleted. See [Expired cluster license]({{< relref "/operate/rs/clusters/configure/license-keys#expired-cluster-license" >}}) for a list of available actions and restrictions. + +#### Required permissions + +| Permission name | +|-----------------| +| [install_new_license]({{< relref "/operate/rs/references/rest-api/permissions#install_new_license" >}}) | + +### Request {#put-request} + +The request must be a JSON object with a single key named "license". + +#### Example HTTP request + + PUT /license + +#### Example JSON body + +```json +{ + "license": "----- LICENSE START -----\ndi+iK...KniI9\n----- LICENSE END -----\n" +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Accept | application/json | Accepted media type | + + +#### Request body + +Include a JSON object that contains the new `license` string in the request body. + +### Response {#put-response} + +Returns an error if the new license is not valid. + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | License installed successfully. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Invalid request, either bad JSON object or corrupted license was supplied. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | License violation. A response body provides more details on the specific cause. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/logs/_index.md b/content/operate/rs/7.4/references/rest-api/requests/logs/_index.md new file mode 100644 index 0000000000..dba6182018 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/logs/_index.md @@ -0,0 +1,101 @@ +--- +Title: Logs requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Cluster event logs requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: logs +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/logs/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-logs) | `/v1/logs` | Get cluster events log | + +## Get cluster events log {#get-logs} + + GET /v1/logs + +Get cluster events log. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_logged_events]({{< relref "/operate/rs/references/rest-api/permissions#view_logged_events" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /logs?order=desc + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| stime | ISO_8601 | Start time before which we don't want events. (optional) | +| etime | ISO_8601 | End time after which we don't want events. (optional) | +| order | string | desc/asc - get events in descending or ascending order. Defaults to asc. | +| limit | integer | Maximum number of events to return. (optional) | +| offset | integer | Skip offset events before returning first one (useful for pagination). (optional) | + +### Response {#get-response} + +Returns a JSON array of events. + +#### Example JSON body + +```json +[ + { + "time": "2014-08-29T11:19:49Z", + "type": "bdb_name_updated", + "severity": "INFO", + "bdb_uid": "1", + "old_val": "test", + "new_val": "test123" + }, + { + "time": "2014-08-29T11:18:48Z", + "type": "cluster_bdb_created", + "severity": "INFO", + "bdb_uid": "1", + "bdb_name": "test" + }, + { + "time": "2014-08-29T11:17:49Z", + "type": "cluster_node_joined", + "severity": "INFO", + "node_uid": 2 + } +] +``` + +#### Event object + +| Field | Description | +|-------|-------------| +| time | Timestamp when event happened. | +| type | Event type. Additional fields may be available for certain event types. | +| additional fields | Additional fields may be present based on event type.| + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | diff --git a/content/operate/rs/7.4/references/rest-api/requests/modules/_index.md b/content/operate/rs/7.4/references/rest-api/requests/modules/_index.md new file mode 100644 index 0000000000..7195ca1aea --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/modules/_index.md @@ -0,0 +1,412 @@ +--- +Title: Modules requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Redis modules requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: modules +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/modules/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#list-modules) | `/v1/modules` | List available modules | +| [GET](#get-module) | `/v1/modules/{uid}` | Get a specific module | +| [POST](#post-module) | `/v1/modules` | Upload a new module (deprecated) | +| [POST](#post-module-v2) | `/v2/modules` | Upload a new module | +| [DELETE](#delete-module) | `/v1/modules/{uid}` | Delete a module (deprecated) | +| [DELETE](#delete-module-v2) | `/v2/modules/{uid}` | Delete a module | + +## List modules {#list-modules} + +```sh +GET /v1/modules +``` + +List available modules, i.e. modules stored within the CCS. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_cluster_modules]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_modules" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#list-request} + +#### Example HTTP request + +```sh +GET /modules +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | 127.0.0.1:9443 | Domain name | +| Accept | \*/\* | Accepted media type | + +### Response {#list-response} + +Returns a JSON array of [module objects]({{< relref "/operate/rs/references/rest-api/objects/module" >}}). + +#### Status codes {#list-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + +## Get module {#get-module} + +```sh +GET /v1/modules/{string: uid} +``` + +Get specific available modules, i.e. modules stored within the CCS. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_cluster_modules]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_modules" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /modules/1 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | 127.0.0.1:9443 | Domain name | +| Accept | \*/\* | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The module's unique ID. | + +### Response {#get-response} + +Returns a [module object]({{< relref "/operate/rs/references/rest-api/objects/module" >}}). + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Module does not exist. | + +## Upload module v1 {#post-module} + +```sh +POST /v1/modules +``` + +{{}} +`POST /v1/modules` is deprecated as of Redis Enterprise Software version 7.2. Use [`POST /v2/modules`](#post-module-v2) instead. +{{}} + +Uploads a new module to the cluster. + +The request must contain a Redis module, bundled using [RedisModule +Packer](https://github.com/RedisLabs/RAMP). For modules in Redis Stack, download the module from the [download center](https://redis.com/redis-enterprise-software/download-center/software/). + +See [Install a module on a cluster]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster#rest-api-method" >}}) for more information. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | admin | + +### Request {#post-request} + +#### Example HTTP request + +```sh +POST /v1/modules +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | string | Domain name | +| Accept | \*/\* | Accepted media type | +| Content-Length | integer | Length of the request body in octets | +| Expect | 100-continue | Requires particular server behaviors | +| Content-Type | multipart/form-data | Media type of request/response body | + +### Response {#post-response} + +Returns a status code. If an error occurs, the response body may include an error code and message with more details. + +#### Error codes {#post-error-codes} + +The server may return a JSON object with `error_code` and `message` fields that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| no_module | Module wasn't provided or could not be found | +| invalid_module | Module either corrupted or packaged files are wrong | +| module_exists | Module already in system | +| min_redis_pack_version | Module isn't supported yet in this Redis pack | +| unsupported_module_capabilities | The module does not support required capabilities| +| os_not_supported | This module is not supported for this operating system | +| dependencies_not_supported | This endpoint does not support dependencies, see v2 | + +#### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Either missing module file or an invalid module file. | + +### Examples + +#### cURL + +```sh +$ curl -k -u "[username]:[password]" -X POST + -F "module=@/tmp/rejson.Linux-ubuntu18.04-x86_64.2.0.8.zip" + https://[host][:port]/v1/modules +``` + +#### Python + +```python +import requests + +url = "https://[host][:port]/v1/modules" + +files=[ + ('module', + ('rejson.Linux-ubuntu18.04-x86_64.2.0.8.zip', + open('/tmp/rejson.Linux-ubuntu18.04-x86_64.2.0.8.zip','rb'), + 'application/zip') + ) +] +auth=("[username]", "[password]") + +response = requests.request("POST", url, + auth=auth, files=files, verify=False) + +print(response.text) +``` + +## Upload module v2 {#post-module-v2} + +```sh +POST /v2/modules +``` + +Asynchronously uploads a new module to the cluster. + +The request must contain a Redis module bundled using [RedisModule Packer](https://github.com/RedisLabs/RAMP). + +For modules in Redis Stack, download the module from the [download center](https://redis.com/redis-enterprise-software/download-center/software/). See [Install a module on a cluster]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster#rest-api-method" >}}) for more information. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | admin | + +### Request {#post-request-v2} + +#### Example HTTP request + +```sh +POST /v2/modules +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | string| Domain name | +| Accept | \*/\* | Accepted media type | +| Content-Length | integer | Length of the request body in octets | +| Expect | 100-continue | Requires particular server behaviors | +| Content-Type | multipart/form-data; | Media type of request/response body | + +### Response {#post-response-v2} + +Returns a [module object]({{< relref "/operate/rs/references/rest-api/objects/module" >}}) with an additional `action_uid` field. + +You can use the `action_uid` to track the progress of the module upload. + +#### Example JSON body + +```json +{ + "action_uid":"dfc0152c-8449-4b1c-9184-480ea7cb526c", + "author":"RedisLabs", + "capabilities":[ + "types", + "crdb", + "failover_migrate", + "persistence_aof", + "persistence_rdb", + "clustering", + "backup_restore" + ], + "command_line_args":"Plugin gears_python CreateVenv 1", + "config_command":"RG.CONFIGSET", + "dependencies":{ + "gears_jvm":{ + "sha256":"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9", + "url":"http://example.com/redisgears_plugins/jvm_plugin/gears-jvm.linux-centos7-x64.0.1.0.tgz" + }, + "gears_python":{ + "sha256":"22dca9cd75484cb15b8130db37f5284e22e3759002154361f72f6d2db46ee682", + "url":"http://example.com/redisgears-python.linux-centos7-x64.1.2.1.tgz" + } + }, + "description":"Dynamic execution framework for your Redis data", + "display_name":"RedisGears", + "email":"user@example.com", + "homepage":"http://redisgears.io", + "is_bundled":false, + "license":"Redis Source Available License Agreement", + "min_redis_pack_version":"6.0.0", + "min_redis_version":"6.0.0", + "module_name":"rg", + "semantic_version":"1.2.1", + "sha256":"2935ea53611803c8acf0015253c5ae1cd81391bbacb23e14598841e1edd8d28b", + "uid":"98f255d5d33704c8e4e97897fd92e32d", + "version":10201 +} +``` + +### Error codes {#post-error-codes-v2} + +The server may return a JSON object with `error_code` and `message` fields that provide additional information. + +Possible `error_code` values include [`/v1/modules` error codes](#post-error-codes) and the following: + +| Code | Description | +|------|-------------| +| invalid_dependency_data | Provided dependencies have an unexpected format | + +### Status codes {#post-status-codes-v2} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, scheduled module upload. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Module name or version does not exist. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Dependency not found. | +| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Failed to get dependency. | + +## Delete module v1 {#delete-module} + +```sh +DELETE /v1/modules/{string: uid} +``` + +{{}} +`DELETE /v1/modules` is deprecated as of Redis Enterprise Software version 7.2. Use [`DELETE /v2/modules`](#delete-module-v2) instead. +{{}} + +Delete a module. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | admin | + +### Request {#delete-request} + +#### Example HTTP request + +```sh +DELETE /v1/modules/1 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The module's unique ID. | + +### Response {#delete-response} + +Returns a status code to indicate module deletion success or failure. + +#### Error codes {#delete-error-codes} + +| Code | Description | +|------|-------------| +| dependencies_not_supported | You can use the following API endpoint to delete this module with its dependencies: [`/v2/modules/`](#delete-module-v2) | + +#### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, the module is deleted. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to delete a nonexistent module. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The request is not acceptable. | + +## Delete module v2 {#delete-module-v2} + +```sh +DELETE /v2/modules/{string: uid} +``` + +Delete a module. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | admin | + +### Request {#delete-request-v2} + +#### Example HTTP request + +```sh +DELETE /v2/modules/1 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The module's unique ID. | + +### Response {#delete-response-v2} + +Returns a JSON object with an `action_uid` that allows you to track the progress of module deletion. + +#### Status codes {#delete-status-codes-v2} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, scheduled module deletion. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to delete a nonexistent module. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/modules/config.md b/content/operate/rs/7.4/references/rest-api/requests/modules/config.md new file mode 100644 index 0000000000..46817e89ff --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/modules/config.md @@ -0,0 +1,89 @@ +--- +Title: Configure module requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Configure module requests +headerRange: '[1-2]' +linkTitle: config/bdb +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/modules/config/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-modules-config-bdb) | `/v1/modules/config/bdb/{uid}` | Configure module | + +## Configure module {#post-modules-config-bdb} + + POST /v1/modules/config/bdb/{string: uid} + +Use the module runtime configuration command (if defined) to configure new arguments for the module. + +#### Required permissions + +| Permission name | +|-----------------| +| [edit_bdb_module]({{< relref "/operate/rs/references/rest-api/permissions#edit_bdb_module" >}}) | + +### Request {#post-request} + +#### Example HTTP request + + POST /modules/config/bdb/1 + +#### Example JSON body + +```json +{ + "modules": [ + { + "module_name": "search", + "module_args": "MINPREFIX 3 MAXEXPANSIONS 1000" + } + ] +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Request body + +| Field | Type | Description | +|-------|------|-------------| +| modules | list of JSON objects | List of modules (module_name) and their new configuration settings (module_args) | +| module_name | `search`
`ReJSON`
`graph`
`timeseries`
`bf` | Module's name | +| module_args | string | Module command line arguments (pattern does not allow special characters &,<,>,”) | + +### Response {#post-response} + +Returns a status code. If an error occurs, the response body may include an error code and message with more details. + +### Error codes {#post-error-codes} + +When errors are reported, the server may return a JSON object with `error_code` and `message` field that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| db_not_exist | Database with given UID doesn't exist in cluster | +| missing_field | "module_name" or "module_args" are not defined in request | +| invalid_schema | JSON object received is not a dict object | +| param_error | "module_args" parameter was not parsed properly | +| module_not_exist | Module with given "module_name" does not exist for the database | + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, module updated on bdb. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | bdb not found. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Module does not support runtime configuration of arguments. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/modules/upgrade.md b/content/operate/rs/7.4/references/rest-api/requests/modules/upgrade.md new file mode 100644 index 0000000000..b7019af77f --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/modules/upgrade.md @@ -0,0 +1,104 @@ +--- +Title: Upgrade module requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Upgrade module requests +headerRange: '[1-2]' +linkTitle: upgrade/bdb +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/modules/upgrade/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-modules-upgrade-bdb) | `/v1/modules/upgrade/bdb/{uid}` | Upgrade module | + +## Upgrade module {#post-modules-upgrade-bdb} + + POST /v1/modules/upgrade/bdb/{string: uid} + +Upgrades the module version on a specific database. + +#### Required permissions + +| Permission name | +|-----------------| +| [edit_bdb_module]({{< relref "/operate/rs/references/rest-api/permissions#edit_bdb_module" >}}) | + +### Request {#post-request} + +#### Example HTTP request + + POST /modules/upgrade/bdb/1 + +#### Example JSON body + +```json +{ + "modules": [ + {"module_name": "ReJson", + "current_semantic_version": "2.2.1", + "new_module": "aa3648d79bd4082d414587c42ea0b234"} + ], + "// Optional fields to fine-tune restart and failover behavior:", + "preserve_roles": true, + "may_discard_data": false +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Request body + +| Field | Type | Description | +|-------|------|-------------| +| modules | list | List of dicts representing the modules that will be upgraded. Each dict must include:

• **current_module**: UID of a module to upgrade

• **new_module**: UID of the module we want to upgrade to

• **new_module_args**: args list for the new module | +| preserve_roles | boolean | Preserve shards’ master/replica roles (optional) | +| may_discard_data | boolean | Discard data in a non-replicated non-persistent database (optional) | + +### Response {#post-response} + +Returns the upgraded [module object]({{< relref "/operate/rs/references/rest-api/objects/module" >}}). + +#### Example JSON body + +```json +{ + "uid": 1, + "name": "name of database #1", + "module_id": "aa3648d79bd4082d414587c42ea0b234", + "module_name": "ReJson", + "semantic_version": "2.2.2" + "// additional fields..." +} +``` + +### Error codes {#post-error-codes} + +When errors are reported, the server may return a JSON object with `error_code` and `message` field that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| missing_module | Module is not present in cluster.| +| module_downgrade_unsupported | Module downgrade is not allowed.| +| redis_incompatible_version | Module min_redis_version is bigger than the current Redis version.| +| redis_pack_incompatible_version | Module min_redis_pack_version is bigger than the current Redis Enterprise version.| +| unsupported_module_capabilities | New version of module does support all the capabilities needed for the database configuration| + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, module updated on bdb. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | bdb or node not found. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The requested configuration is invalid. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/nodes/_index.md b/content/operate/rs/7.4/references/rest-api/requests/nodes/_index.md new file mode 100644 index 0000000000..ec821addaf --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/nodes/_index.md @@ -0,0 +1,254 @@ +--- +Title: Nodes requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Node requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: nodes +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/nodes/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-nodes) | `/v1/nodes` | Get all cluster nodes | +| [GET](#get-node) | `/v1/nodes/{uid}` | Get a single cluster node | +| [PUT](#put-node) | `/v1/nodes/{uid}` | Update a node | + +## Get all nodes {#get-all-nodes} + +```sh +GET /v1/nodes +``` + +Get all cluster nodes. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_all_nodes_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_nodes_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-all-request} + +#### Example HTTP request + +```sh +GET /nodes +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-all-response} + +Returns a JSON array of [node objects]({{< relref "/operate/rs/references/rest-api/objects/node" >}}). + +#### Example JSON body + +```json +[ + { + "uid": 1, + "status": "active", + "uptime": 262735, + "total_memory": 6260334592, + "software_version": "0.90.0-1", + "ephemeral_storage_size": 20639797248, + "persistent_storage_path": "/var/opt/redislabs/persist", + "persistent_storage_size": 20639797248, + "os_version": "Ubuntu 14.04.2 LTS", + "ephemeral_storage_path": "/var/opt/redislabs/tmp", + "architecture": "x86_64", + "shard_count": 23, + "public_addr": "", + "cores": 4, + "rack_id": "", + "supported_database_versions": [ + { + "db_type": "memcached", + "version": "1.4.17" + }, + { + "db_type": "redis", + "version": "2.6.16" + }, + { + "db_type": "redis", + "version": "2.8.19" + } + ], + "shard_list": [1, 3, 4], + "addr": "10.0.3.61" + }, + { + "uid": 1, + "status": "active", + "// additional fields..." + } +] +``` + +#### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + +## Get node {#get-node} + +```sh +GET /v1/nodes/{int: uid} +``` + +Get a single cluster node. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_node_info]({{< relref "/operate/rs/references/rest-api/permissions#view_node_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /nodes/1 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the node requested. | + +### Response {#get-response} + +Returns a [node object]({{< relref "/operate/rs/references/rest-api/objects/node" >}}). + +#### Example JSON body + +```json +{ + "uid": 1, + "name": "node:1", + "// additional fields..." +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Node UID does not exist | + +## Update node {#put-node} + +```sh +PUT /v1/nodes/{int: uid} +``` + +Update a [node object]({{< relref "/operate/rs/references/rest-api/objects/node" >}}). + +Currently, you can edit the following attributes: + +- `addr` + +- `external_addr` + +- `recovery_path` + +- `accept_servers` + +{{}} +You can only update the `addr` attribute for offline nodes. Otherwise, the request returns an error. +{{}} + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_node]({{< relref "/operate/rs/references/rest-api/permissions#update_node" >}}) | admin | + +### Request {#put-request} + +#### Example HTTP request + +```sh +PUT /nodes/1 +``` + +#### Example JSON body + +```json +{ + "addr": "10.0.0.1", + "external_addr" : [ + "192.0.2.24" + ] +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | +| Content-Type | application/json | Media type of request/response body | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the updated node. | + + +#### Body + +| Field | Type | Description | +|-------|------|-------------| +| addr | string | Internal IP address of node | +| external_addr | JSON array | External IP addresses of the node | +| recovery_path | string | Path for recovery files | +| accept_servers | boolean | If true, no shards will be created on the node | + +### Response {#put-response} + +If the request is successful, the body will be empty. Otherwise, it may contain a JSON object with an error code and error message. + +#### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error, the request has been processed. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Update request cannot be processed. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad content provided. | + +#### Error codes {#put-error-codes} + +| Code | Description | +|------|-------------| +| node_not_found | Node does not exist | +| node_not_offline | Attempted to change node address while it is online | +| node_already_populated | The node contains shards or endpoints, cannot disable accept_servers | +| invalid_oss_cluster_port_mapping | Cannot enable "accept_servers" since there are databases with "oss_cluster_port_mapping" that do not have a port configuration for the current node | +| node_already_has_rack_id | Attempted to change node's rack_id when it already has one | diff --git a/content/operate/rs/7.4/references/rest-api/requests/nodes/actions.md b/content/operate/rs/7.4/references/rest-api/requests/nodes/actions.md new file mode 100644 index 0000000000..e86b06281f --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/nodes/actions.md @@ -0,0 +1,358 @@ +--- +Title: Node actions requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Node action requests +headerRange: '[1-2]' +linkTitle: actions +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/nodes/actions/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-nodes-actions) | `/v1/nodes/actions` | Get status of all actions on all nodes| +| [GET](#get-node-actions) | `/v1/nodes/{node_uid}/actions` | Get status of all actions on a specific node | +| [GET](#get-node-action) | `/v1/nodes/{node_uid}/actions/{action}` | Get status of an action on a specific node | +| [POST](#post-node-action) | `/v1/nodes/{node_uid}/actions/{action}` | Initiate node action | +| [DELETE](#delete-node-action) | `/v1/nodes/{node_uid}/actions/{action}` | Cancel action or remove action status | + +## Get all actions {#get-all-nodes-actions} + +```sh +GET /v1/nodes/actions +``` + +Get the status of all currently executing, pending, or completed +actions on all nodes. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_status_of_all_node_actions]({{< relref "/operate/rs/references/rest-api/permissions#view_status_of_all_node_actions" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-all-request} + +#### Example HTTP request + +```sh +GET /nodes/actions +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-all-response} + +Returns a list of [action objects]({{< relref "/operate/rs/references/rest-api/objects/action" >}}). + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error, response provides details about an ongoing action. | + +## Get node actions statuses {#get-node-actions} + +```sh +GET /v1/nodes/{node_uid}/actions +``` + +Get the status of all actions on a specific node. + +#### Required permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_status_of_node_action]({{< relref "/operate/rs/references/rest-api/permissions#view_status_of_node_action" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request-all-actions} + +#### Example HTTP request + +```sh +GET /nodes/1/actions +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| action | string | The action to check. | + +### Response {#get-response-all-actions} + +Returns a JSON object that includes a list of [action objects]({{< relref "/operate/rs/references/rest-api/objects/action" >}}) for the specified node. + +If no actions are available, the response will include an empty array. + +#### Example JSON body + +```json +{ + "actions": [ + { + "name": "remove_node", + "node_uid": "1", + "status": "running", + "progress": 10 + } + ] +} +``` + +### Error codes {#get-error-codes-all-actions} + +| Code | Description | +|------|-------------| +| internal_error | An internal error that cannot be mapped to a more precise error code has been encountered. | +| insufficient_resources | The cluster does not have sufficient resources to complete the required operation. | + +### Status codes {#get-status-codes-all-actions} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error, response provides details about an ongoing action. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Action does not exist (i.e. not currently running and no available status of last run). | + +## Get node action status {#get-node-action} + +```sh +GET /v1/nodes/{node_uid}/actions/{action} +``` + +Get the status of a currently executing, queued, or completed action on a specific node. + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /nodes/1/actions/remove +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-response} + +Returns an [action object]({{< relref "/operate/rs/references/rest-api/objects/action" >}}) for the specified node. + +### Error codes {#get-error-codes} + +| Code | Description | +|------|-------------| +| internal_error | An internal error that cannot be mapped to a more precise error code has been encountered. | +| insufficient_resources | The cluster does not have sufficient resources to complete the required operation. | + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error, response provides details about an ongoing action. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Action does not exist (i.e. not currently running and no available status of last run). | + +## Initiate node action {#post-node-action} + +```sh +POST /v1/nodes/{node_uid}/actions/{action} +``` + +Initiate a node action. + +The API allows only a single instance of any action type to be +invoked at the same time, and violations of this requirement will +result in a `409 CONFLICT` response. + +The caller is expected to query and process the results of the +previously executed instance of the same action, which will be +removed as soon as the new one is submitted. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [start_node_action]({{< relref "/operate/rs/references/rest-api/permissions#start_node_action" >}}) | admin | + +### Request {#post-request} + +#### Example HTTP request + +```sh +POST /nodes/1/actions/remove +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| action | string | The name of the action required. | + +Currently supported actions are: + +- `remove`: Removes the node from the cluster after migrating all bound resources to other nodes. As soon as a successful remove request is received, the cluster will no longer automatically migrate resources, such as shards and endpoints, to the node even if the remove task fails at some point. + + - 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. + + To change node removal to wait for the creation of new persistence files for all migrated shards, set `wait_for_persistence` to `true` in the request body or [update the cluster policy]({{}}) `persistent_node_removal` to `true` to change the cluster's default behavior. + + ```sh + POST /v1/nodes//actions/remove + { + "wait_for_persistence": true + } + ``` + +- `maintenance_on`: Creates a snapshot of the node, migrates shards to other nodes, and prepares the node for maintenance. See [maintenance mode]({{< relref "/operate/rs/clusters/maintenance-mode" >}}) for more information. + + - As of Redis Enterprise Software version 7.4.2, a new node snapshot is created only if no maintenance mode snapshots already exist or if you set `"overwrite_snapshot": true` in the request body. + + ```sh + POST /v1/nodes/1/actions/maintenance_on + { + "overwrite_snapshot": true + } + ``` + + - If there aren't enough resources to migrate shards out of the maintained node, set `"evict_ha_replica": false` and `"evict_active_active_replica": false` in the request body to keep the replica shards in place but demote any master shards. Use these two parameters instead of `keep_slave_shards`, which is deprecated as of Redis Enterprise Software version 7.4.2. + + ```sh + POST /v1/nodes/1/actions/maintenance_on + { + "overwrite_snapshot": true, + "evict_ha_replica": false, + "evict_active_active_replica": false + } + ``` + + - To specify databases whose shards should be evicted from the node when entering maintenance mode, set `"evict_dbs": ["List of database ID strings"]` in the request body. + + ```sh + POST /v1/nodes/1/actions/maintenance_on + { + "overwrite_snapshot": true, + "evict_dbs": ["1", "3"] + } + ``` + +- `maintenance_off`: Restores node to its previous state before maintenance started. See [maintenance mode]({{< relref "/operate/rs/clusters/maintenance-mode" >}}) for more information. + + - By default, it uses the latest node snapshot. + + - Use `"snapshot_name":` `"..."` in the request body to restore the state from a specific snapshot. + + - To avoid restoring shards at the node, use `"skip_shards_restore":` `true`. + +- `enslave_node`: Turn node into a replica. + +### Response {#post-response} + +The body content may provide additional action details. + +### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Action initiated successfully. | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Only a single instance of any action type can be invoked at the same time. | + +### Example requests + +#### cURL + +```sh +$ curl -k -X POST -u "[username]:[password]" -d "{}" + https://[host][:port]/v1/nodes/1/actions/remove +``` + +#### Python + +```python +import requests +import json + +url = "https://[host][port]/v1/nodes/1/actions/remove" + +payload = json.dumps({}) +headers = { + 'Content-Type': 'application/json', +} +auth = ("[username]", "[password]") + +response = requests.request("POST", url, auth=auth, headers=headers, data=payload) + +print(response.text) +``` + +## Cancel action {#delete-node-action} + +```sh +DELETE /v1/nodes/{node_uid}/actions/{action} +``` + +Cancel a queued or executing node action, or remove the status of a +previously executed and completed action. + +### Permissions + +| Permission name | +|-----------------| +| [cancel_node_action]({{< relref "/operate/rs/references/rest-api/permissions#cancel_node_action" >}}) | + +### Request {#delete-request} + +#### Example HTTP request + +```sh +DELETE /nodes/1/actions/remove +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| action | string | The name of the action to cancel. | + +### Response {#delete-response} + +Returns a status code. + +#### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Action will be cancelled when possible. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Action unknown or not currently running. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/nodes/alerts.md b/content/operate/rs/7.4/references/rest-api/requests/nodes/alerts.md new file mode 100644 index 0000000000..c06ec879dd --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/nodes/alerts.md @@ -0,0 +1,205 @@ +--- +Title: Node alerts requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Node alert requests +headerRange: '[1-2]' +linkTitle: alerts +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/nodes/alerts/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-nodes-alerts) | `/v1/nodes/alerts` | Get all alert states for all nodes | +| [GET](#get-node-alerts) | `/v1/nodes/alerts/{uid}` | Get all alert states for a node | +| [GET](#get-node-alert) | `/v1/nodes/alerts/{uid}/{alert}` | Get node alert state | + +## Get all alert states {#get-all-nodes-alerts} + + GET /v1/nodes/alerts + +Get all alert states for all nodes. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_all_nodes_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_all_nodes_alerts" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + + GET /nodes/alerts + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| ignore_settings | boolean | Retrieve updated alert state regardless of the cluster's alert_settings. When not present, a disabled alert will always be retrieved as disabled with a false state. (optional) | + +### Response {#get-all-response} + +Returns a hash of node UIDs and the [alert states]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}) for each node. + +#### Example JSON body + +```json +{ + "1": { + "node_cpu_utilization": { + "change_time": "2014-12-22T10:42:00Z", + "change_value": { + "cpu_util": 2.500000000145519, + "global_threshold": "1", + "state": true + }, + "enabled": true, + "state": true, + "severity": "WARNING" + }, + "..." + }, + "..." +} +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + +## Get node alert states {#get-node-alerts} + + GET /v1/nodes/alerts/{int: uid} + +Get all alert states for a node. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_node_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_node_alerts" >}}) | + +### Request {#get-request-all-alerts} + +#### Example HTTP request + + GET /nodes/alerts/1 + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| ignore_settings | boolean | Retrieve updated alert state regardless of the cluster's alert_settings. When not present, a disabled alert will always be retrieved as disabled with a false state. (optional) | + +### Response {#get-response-all-alerts} + +Returns a hash of [alert objects]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}) and their states for a specific node. + +#### Example JSON body + +```json +{ + "node_cpu_utilization": { + "change_time": "2014-12-22T10:42:00Z", + "change_value": { + "cpu_util": 2.500000000145519, + "global_threshold": "1", + "state": true + }, + "enabled": true, + "state": true, + "severity": "WARNING", + }, + "..." +} +``` + +### Status codes {#get-status-codes-all-alerts} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Specified node does not exist | + +## Get node alert state {#get-node-alert} + + GET /v1/nodes/alerts/{int: uid}/{alert} + +Get a node alert state. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_node_alerts]({{< relref "/operate/rs/references/rest-api/permissions#view_node_alerts" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /nodes/alerts/1/node_cpu_utilization + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| ignore_settings | boolean | Retrieve updated alert state regardless of the cluster's alert_settings. When not present, a disabled alert will always be retrieved as disabled with a false state. (optional) | + +### Response {#get-response} + +Returns an [alert object]({{< relref "/operate/rs/references/rest-api/objects/alert" >}}). + +#### Example JSON body + +```json +{ + "change_time": "2014-12-22T10:42:00Z", + "change_value": { + "cpu_util": 2.500000000145519, + "global_threshold": "1", + "state": true + }, + "enabled": true, + "state": true, + "severity": "WARNING", +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Specified alert or node does not exist | diff --git a/content/operate/rs/7.4/references/rest-api/requests/nodes/check.md b/content/operate/rs/7.4/references/rest-api/requests/nodes/check.md new file mode 100644 index 0000000000..4c334a2e61 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/nodes/check.md @@ -0,0 +1,90 @@ +--- +Title: Check node requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Requests that run checks on a cluster node. +headerRange: '[1-2]' +linkTitle: check +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/nodes/check/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-node-check) | `/v1/nodes/check/{uid}` | Runs checks on a cluster node | + +## Check node {#get-node-check} + + GET /v1/nodes/check/{int: uid} + +Runs the following checks on a cluster node: + +| Check name | Description | +|-----------|-------------| +| bootstrap_status | Verifies the local node's bootstrap process completed without errors. | +| services | Verifies all Redis Enterprise Software services are running. | +| port_range | Verifies the [`ip_local_port_range`](https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html) doesn't conflict with the ports Redis Enterprise might assign to shards. | +| pidfiles | Verifies all active local shards have PID files. | +| capabilities | Verifies all binaries have the proper capability bits. | +| existing_sockets | Verifies sockets exist for all processes that require them. | +| host_settings | Verifies the following:
• Linux `overcommit_memory` setting is 1.
• `transparent_hugepage` is disabled.
• Socket maximum connections setting `somaxconn` is 1024. | +| tcp_connectivity | Verifies this node can connect to all other alive nodes. | + +#### Required permissions + +| Permission name | +|-----------------| +| [view_node_check]({{< relref "/operate/rs/references/rest-api/permissions#view_node_check" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /nodes/check/1 + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The node's unique ID. | + + +### Response {#get-response} + +Returns a JSON object with the node's check results. + +When errors occur, the server returns a JSON object with `result: false` and an `error` field that provides additional information. If an error occurs during a check, the `error` field only includes a message for the first check that fails. + +Possible `error` messages: + +- "bootstrap request to cnm_http failed,resp_code: ...,resp_content: ..." +- "process ... is not running or not responding (...)" +- "could not communicate with 'supervisorctl': ..." +- "connectivity check failed retrieving ports for testing" + +#### Example JSON body + +```json +{ + "node_uid": 1, + "result": true +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error | diff --git a/content/operate/rs/7.4/references/rest-api/requests/nodes/debuginfo.md b/content/operate/rs/7.4/references/rest-api/requests/nodes/debuginfo.md new file mode 100644 index 0000000000..522e8e54ee --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/nodes/debuginfo.md @@ -0,0 +1,92 @@ +--- +Title: Node debug info requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Documents the Redis Enterprise Software REST API /nodes/debuginfo requests. +headerRange: '[1-2]' +linkTitle: debuginfo +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/nodes/debuginfo/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-debuginfo-all-nodes) | `/v1/nodes/debuginfo` | Get debug info from all nodes | +| [GET](#get-debuginfo-node) | `/v1/nodes/{node_uid}/debuginfo` | Get debug info from a specific node | + +## Get debug info from all nodes {#get-debuginfo-all-nodes} + + GET /v1/nodes/debuginfo + +Downloads a tar file that contains debug info from all nodes. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_debugging_info]({{< relref "/operate/rs/references/rest-api/permissions#view_debugging_info" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + + GET /nodes/debuginfo + +### Response {#get-all-response} + +Downloads the debug info in a tar file called `filename.tar.gz`. Extract the files from the tar file to access the debug info. + +#### Response headers + +| Key | Value | Description | +|-----|-------|-------------| +| Content-Type | application/x-gzip | Media type of request/response body | +| Content-Length | 653350 | Length of the response body in octets | +| Content-Disposition | attachment; filename=debuginfo.tar.gz | Display response in browser or download as attachment | + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success. | +| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Failed to get debug info. | + +## Get node debug info {#get-debuginfo-node} + + GET /v1/nodes/{int: node_uid}/debuginfo + +Downloads a tar file that contains debug info from a specific node. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_debugging_info]({{< relref "/operate/rs/references/rest-api/permissions#view_debugging_info" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /nodes/1/debuginfo + +### Response {#get-response} + +Downloads the debug info in a tar file called `filename.tar.gz`. Extract the files from the tar file to access the debug info. + +#### Response headers + +| Key | Value | Description | +|-----|-------|-------------| +| Content-Type | application/x-gzip | Media type of request/response body | +| Content-Length | 653350 | Length of the response body in octets | +| Content-Disposition | attachment; filename=debuginfo.tar.gz | Display response in browser or download as attachment | + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success. | +| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Failed to get debug info. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/nodes/snapshots.md b/content/operate/rs/7.4/references/rest-api/requests/nodes/snapshots.md new file mode 100644 index 0000000000..bcaef73b88 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/nodes/snapshots.md @@ -0,0 +1,141 @@ +--- +Title: Node snapshot requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Node snapshot requests +headerRange: '[1-2]' +linkTitle: snapshots +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/nodes/snapshots/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-snapshots) | `/v1/nodes/{uid}/snapshots` | Get node snapshots | +| [DELETE](#delete-snapshot) | `/v1/nodes/{uid}/snapshots/{snapshot_name}` | Delete a node snapshot | + +## Get node snapshots {#get-snapshots} + +```sh +GET /v1/nodes/{int: uid}/snapshots +``` + +Get all cluster node snapshots of the specified node. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_node_info]({{< relref "/operate/rs/references/rest-api/permissions#view_node_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /nodes/1/snapshots +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the node requested. | + +### Response {#get-response} + +Returns an array of node snapshot JSON objects. + +#### Example JSON body + +```json +[ + { + "created_time": "2024-01-10 20:55:54", + "name": "nightly_snapshot_1", + "node_uid": "1" + }, + { + "created_time": "2024-01-11 20:55:54", + "name": "nightly_snapshot_2", + "node_uid": "1" + } +] +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Node UID does not exist | + +## Delete node snapshot {#delete-snapshot} + +```sh +DELETE /v1/nodes/{int: uid}/snapshots/{snapshot_name} +``` + +Delete a cluster node snapshot. Snapshots created by maintenance mode are not deleted. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_node]({{< relref "/operate/rs/references/rest-api/permissions#update_node" >}}) | admin | + +### Request {#delete-request} + +#### Example HTTP request + +```sh +DELETE /nodes/1/snapshots/nightly_snapshot_19 +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the updated node. | +| snapshot_name | string | The unique name of the snapshot to delete. | + +### Response {#delete-response} + +Returns a JSON object that represents the deleted node snapshot. + +#### Example JSON body + +```json +{ + "created_time": "2024-01-11 20:55:54", + "name": "nightly_snapshot_19", + "node_uid": "1" +} +``` + +#### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [403 Forbidden](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4) | Node snapshot is a maintenance snapshot and cannot be deleted | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Node uid does not exist | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Snapshot name does not exist for this node uid | diff --git a/content/operate/rs/7.4/references/rest-api/requests/nodes/stats/_index.md b/content/operate/rs/7.4/references/rest-api/requests/nodes/stats/_index.md new file mode 100644 index 0000000000..7001710b75 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/nodes/stats/_index.md @@ -0,0 +1,222 @@ +--- +Title: Node stats requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Node statistics requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: stats +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/nodes/stats/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-nodes-stats) | `/v1/nodes/stats` | Get stats for all nodes | +| [GET](#get-node-stats) | `/v1/nodes/stats/{uid}` | Get stats for a single node | + +## Get all nodes stats {#get-all-nodes-stats} + +```sh +GET /v1/nodes/stats +``` + +Get statistics for all nodes. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_all_nodes_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_all_nodes_stats" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + +```sh +GET /nodes/stats?interval=1hour&stime=2014-08-28T10:00:00Z +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | + +### Response {#get-all-response} + +Returns a JSON array of [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for all nodes. + +#### Example JSON body + +```json +[ + { + "uid": "1", + "intervals": [ + { + "interval": "1sec", + "stime": "2015-05-28T08:40:11Z", + "etime": "2015-05-28T08:40:12Z", + "conns": 0.0, + "cpu_idle": 0.5499999999883585, + "cpu_system": 0.03499999999985448, + "cpu_user": 0.38000000000101863, + "egress_bytes": 0.0, + "ephemeral_storage_avail": 2929315840.0, + "ephemeral_storage_free": 3977830400.0, + "free_memory": 893485056.0, + "ingress_bytes": 0.0, + "persistent_storage_avail": 2929315840.0, + "persistent_storage_free": 3977830400.0, + "total_req": 0.0 + }, + { + "interval": "1sec", + "stime": "2015-05-28T08:40:12Z", + "etime": "2015-05-28T08:40:13Z", + "cpu_idle": 1.2, + "// additional fields..." + } + ] + }, + { + "uid": "2", + "intervals": [ + { + "interval": "1sec", + "stime": "2015-05-28T08:40:11Z", + "etime": "2015-05-28T08:40:12Z", + "conns": 0.0, + "cpu_idle": 0.5499999999883585, + "cpu_system": 0.03499999999985448, + "cpu_user": 0.38000000000101863, + "egress_bytes": 0.0, + "ephemeral_storage_avail": 2929315840.0, + "ephemeral_storage_free": 3977830400.0, + "free_memory": 893485056.0, + "ingress_bytes": 0.0, + "persistent_storage_avail": 2929315840.0, + "persistent_storage_free": 3977830400.0, + "total_req": 0.0 + }, + { + "interval": "1sec", + "stime": "2015-05-28T08:40:12Z", + "etime": "2015-05-28T08:40:13Z", + "cpu_idle": 1.2, + "// additional fields..." + } + ] + } +] +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | No nodes exist | + +## Get node stats {#get-node-stats} + +```sh +GET /v1/nodes/stats/{int: uid} +``` + +Get statistics for a node. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_node_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_node_stats" >}}) | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /nodes/stats/1?interval=1hour&stime=2014-08-28T10:00:00Z +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the node requested. | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | + +### Response {#get-response} + +Returns [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for the specified node. + +#### Example JSON body + +```json +{ + "uid": "1", + "intervals": [ + { + "interval": "1sec", + "stime": "2015-05-28T08:40:11Z", + "etime": "2015-05-28T08:40:12Z", + "conns": 0.0, + "cpu_idle": 0.5499999999883585, + "cpu_system": 0.03499999999985448, + "cpu_user": 0.38000000000101863, + "egress_bytes": 0.0, + "ephemeral_storage_avail": 2929315840.0, + "ephemeral_storage_free": 3977830400.0, + "free_memory": 893485056.0, + "ingress_bytes": 0.0, + "persistent_storage_avail": 2929315840.0, + "persistent_storage_free": 3977830400.0, + "total_req": 0.0 + }, + { + "interval": "1sec", + "stime": "2015-05-28T08:40:12Z", + "etime": "2015-05-28T08:40:13Z", + "cpu_idle": 1.2, + "// additional fields..." + } + ] +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Node does not exist | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Node isn't currently active | +| [503 Service Unavailable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4) | Node is in recovery state | diff --git a/content/operate/rs/7.4/references/rest-api/requests/nodes/stats/last.md b/content/operate/rs/7.4/references/rest-api/requests/nodes/stats/last.md new file mode 100644 index 0000000000..87960c427e --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/nodes/stats/last.md @@ -0,0 +1,182 @@ +--- +Title: Latest node stats requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Most recent node statistics requests +headerRange: '[1-2]' +linkTitle: last +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/nodes/stats/last/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-nodes-stats-last) | `/v1/nodes/stats/last` | Get latest stats for all nodes | +| [GET](#get-node-stats-last) | `/v1/nodes/stats/last/{uid}` | Get latest stats for a single node | + +## Get latest stats for all nodes {#get-all-nodes-stats-last} + +```sh +GET /v1/nodes/stats/last +``` + +Get latest statistics for all nodes. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_all_nodes_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_all_nodes_stats" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + +```sh +GET /nodes/stats/last?interval=1sec&stime=2015-10-14T06:29:43Z +``` + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week. Default: 1sec. (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | + +### Response {#get-all-response} + +Returns most recent [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for all nodes. + +#### Example JSON body + +```json +{ + "1": { + "conns": 0.0, + "cpu_idle": 0.922500000015134, + "cpu_system": 0.007499999999708962, + "cpu_user": 0.01749999999810825, + "cur_aof_rewrites": 0.0, + "egress_bytes": 7887.0, + "ephemeral_storage_avail": 75821363200.0, + "ephemeral_storage_free": 81189969920.0, + "etime": "2015-10-14T06:29:44Z", + "free_memory": 2956963840.0, + "ingress_bytes": 4950.0, + "interval": "1sec", + "persistent_storage_avail": 75821363200.0, + "persistent_storage_free": 81189969920.0, + "stime": "2015-10-14T06:29:43Z", + "total_req": 0.0 + }, + "2": { + "conns": 0.0, + "cpu_idle": 0.922500000015134, + "// additional fields..." + } +} +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | No nodes exist | + +## Get latest node stats {#get-node-stats-last} + +```sh +GET /v1/nodes/stats/last/{int: uid} +``` + +Get the latest statistics of a node. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_node_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_node_stats" >}}) | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /nodes/stats/last/1?interval=1sec&stime=2015-10-13T09:01:54Z +``` + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the node requested. | + + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week. Default: 1sec. (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601)format (optional) | +| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601)format (optional) | + +### Response {#get-response} + +Returns the most recent [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for the specified node. + +#### Example JSON body + +```json +{ + "1": { + "conns": 0.0, + "cpu_idle": 0.8049999999930151, + "cpu_system": 0.02750000000014552, + "cpu_user": 0.12000000000080036, + "cur_aof_rewrites": 0.0, + "egress_bytes": 2169.0, + "ephemeral_storage_avail": 75920293888.0, + "ephemeral_storage_free": 81288900608.0, + "etime": "2015-10-13T09:01:55Z", + "free_memory": 3285381120.0, + "ingress_bytes": 3020.0, + "interval": "1sec", + "persistent_storage_avail": 75920293888.0, + "persistent_storage_free": 81288900608.0, + "stime": "2015-10-13T09:01:54Z", + "total_req": 0.0 + } +} +``` + +### Error codes {#get-error-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Node does not exist | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Node isn't currently active | +| [503 Service Unavailable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4) | Mode is in recovery state | diff --git a/content/operate/rs/7.4/references/rest-api/requests/nodes/status.md b/content/operate/rs/7.4/references/rest-api/requests/nodes/status.md new file mode 100644 index 0000000000..221304eec0 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/nodes/status.md @@ -0,0 +1,174 @@ +--- +Title: Node status requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Requests that return a node's hostname and role. +headerRange: '[1-2]' +linkTitle: status +toc: 'true' +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/nodes/status/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-nodes-status) | `/v1/nodes/status` | Get the status of all nodes | +| [GET](#get-node-status) | `/v1/nodes/{uid}/status` | Get a node's status | + +## Get all node statuses {#get-all-nodes-status} + + GET /v1/nodes/status + +Gets the status of all nodes. Includes each node's hostname and role in the cluster: + +- Primary nodes return `"role": "master"` + +- Replica nodes return `"role": "slave"` + +#### Required permissions + +| Permission name | +|-----------------| +| [view_node_info]({{< relref "/operate/rs/references/rest-api/permissions#view_node_info" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + + GET /nodes/status + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-all-response} + +For each node in the cluster, returns a JSON object that contains each node's hostname, role, and other status details. + +If a maintenance snapshot exists due to an in-progress or improperly stopped [node maintenance]({{}}) process, the response includes a `maintenance_snapshot` field. + +#### Example JSON body + +```json +{ + "1": { + "cores": 8, + "free_provisional_ram": 0, + "free_ram": 3499368448, + "hostname": "3d99db1fdf4b", + "maintenance_snapshot": { + "created_time": "2024-09-06 20:47:23", + "name": "maintenance_mode_2024-09-06_20-47-23", + "node_uid": "1" + }, + "master_shards": [], + "node_overbooking_depth": 0, + "node_status": "active", + "role": "master", + "slave_shards": [], + "software_version": "7.4.6-22", + "software_version_sha": "6c37b1483b5fb6110c8055c1526aa58eec1d29d3519e92310859101419248831", + "total_memory": 6219673600, + "total_provisional_ram": 0 + }, + "2": { + "hostname": "fc7a3d332458", + "role": "slave", + // additional fields + }, + "3": { + "hostname": "b87cc06c830f", + "role": "slave", + // additional fields + } +} +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + + +## Get node status {#get-node-status} + + GET /v1/nodes/{int: uid}/status + +Gets the status of a node. Includes the node's hostname and role in the cluster: + +- Primary nodes return `"role": "master"` + +- Replica nodes return `"role": "slave"` + +#### Required permissions + +| Permission name | +|-----------------| +| [view_node_info]({{< relref "/operate/rs/references/rest-api/permissions#view_node_info" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /nodes/1/status + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The node's unique ID. | + + +### Response {#get-response} + +Returns a JSON object that contains the node's hostname, role, and other status details. + +If a maintenance snapshot exists due to an in-progress or improperly stopped [node maintenance]({{}}) process, the response includes a `maintenance_snapshot` field. + +#### Example JSON body + +```json +{ + "cores": 8, + "free_provisional_ram": 0, + "free_ram": 3504422912, + "hostname": "3d99db1fdf4b", + "maintenance_snapshot": { + "created_time": "2024-09-06 20:47:23", + "name": "maintenance_mode_2024-09-06_20-47-23", + "node_uid": "1" + }, + "master_shards": [], + "node_overbooking_depth": 0, + "node_status": "active", + "role": "master", + "slave_shards": [], + "software_version": "7.4.6-22", + "software_version_sha": "6c37b1483b5fb6110c8055c1526aa58eec1d29d3519e92310859101419248831", + "total_memory": 6219673600, + "total_provisional_ram": 0 +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Node UID does not exist | diff --git a/content/operate/rs/7.4/references/rest-api/requests/ocsp/_index.md b/content/operate/rs/7.4/references/rest-api/requests/ocsp/_index.md new file mode 100644 index 0000000000..2c5bfdfe78 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/ocsp/_index.md @@ -0,0 +1,140 @@ +--- +Title: OCSP requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: OCSP requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: ocsp +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/ocsp/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-ocsp) | `/v1/ocsp` | Get OCSP configuration | +| [PUT](#put-ocsp) | `/v1/ocsp` | Update OCSP configuration | + +## Get OCSP configuration {#get-ocsp} + + GET /v1/ocsp + +Gets the cluster's OCSP configuration. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_ocsp_config]({{< relref "/operate/rs/references/rest-api/permissions#view_ocsp_config" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /ocsp + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-response} + +Returns an [OCSP configuration object]({{< relref "/operate/rs/references/rest-api/objects/ocsp" >}}). + +#### Example JSON body + +```json +{ + "ocsp_functionality": true, + "responder_url": "http://responder.ocsp.url.com", + "query_frequency": 3800, + "response_timeout": 2, + "recovery_frequency": 80, + "recovery_max_tries": 20 +} +``` + +### Error codes {#get-error-codes} + +When errors occur, the server returns a JSON object with `error_code` and `message` fields that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| ocsp_unsupported_by_capability | Not all nodes support OCSP capability | + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Feature not supported in all nodes | + +## Update OCSP configuration {#put-ocsp} + + PUT /v1/ocsp + +Updates the cluster's OCSP configuration. + +#### Required permissions + +| Permission name | +|-----------------| +| [config_ocsp]({{< relref "/operate/rs/references/rest-api/permissions#config_ocsp" >}}) | + +### Request {#put-request} + +#### Example HTTP request + + PUT /ocsp + +#### Example JSON body + +```json +{ + "ocsp_functionality": true, + "query_frequency": 3800, + "response_timeout": 2, + "recovery_frequency": 80, + "recovery_max_tries": 20 +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Request body + +Include an [OCSP configuration object]({{< relref "/operate/rs/references/rest-api/objects/ocsp" >}}) with updated fields in the request body. + +### Response {#put-response} + +Returns the updated [OCSP configuration object]({{< relref "/operate/rs/references/rest-api/objects/ocsp" >}}). + +### Error codes {#put-error-codes} + +When errors occur, the server returns a JSON object with `error_code` and `message` fields that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| invalid_schema | An illegal parameter or a parameter with an illegal value | +| no_responder_url | Tried to enable OCSP with no responder URL configured | +| ocsp_unsupported_by_capability | Not all nodes support OCSP capability | + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, OCSP config has been set | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Feature not supported in all nodes | diff --git a/content/operate/rs/7.4/references/rest-api/requests/ocsp/status.md b/content/operate/rs/7.4/references/rest-api/requests/ocsp/status.md new file mode 100644 index 0000000000..498b98deaa --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/ocsp/status.md @@ -0,0 +1,76 @@ +--- +Title: OCSP status requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: OCSP status requests +headerRange: '[1-2]' +linkTitle: status +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/ocsp/status/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-status) | `/v1/ocsp/status` | Get OCSP status | + +## Get OCSP status {#get-status} + + GET /v1/ocsp/status + +Gets the latest cached status of the proxy certificate’s OCSP response. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_ocsp_status]({{< relref "/operate/rs/references/rest-api/permissions#view_ocsp_status" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /ocsp/status + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-response} + +Returns an [OCSP status object]({{< relref "/operate/rs/references/rest-api/objects/ocsp_status" >}}). + +#### Example JSON body + +```json +{ + "responder_url": "http://responder.ocsp.url.com", + "cert_status": "REVOKED", + "produced_at": "Wed, 22 Dec 2021 12:50:11 GMT", + "this_update": "Wed, 22 Dec 2021 12:50:11 GMT", + "next_update": "Wed, 22 Dec 2021 14:50:00 GMT", + "revocation_time": "Wed, 22 Dec 2021 12:50:04 GMT" +} +``` + +### Error codes {#get-error-codes} + +When errors occur, the server returns a JSON object with `error_code` and `message` fields that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| ocsp_unsupported_by_capability | Not all nodes support OCSP capability | +| invalid_ocsp_response | The server returned a response that is not OCSP-compatible | + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Feature not supported in all nodes | diff --git a/content/operate/rs/7.4/references/rest-api/requests/ocsp/test.md b/content/operate/rs/7.4/references/rest-api/requests/ocsp/test.md new file mode 100644 index 0000000000..7b6af74584 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/ocsp/test.md @@ -0,0 +1,78 @@ +--- +Title: OCSP test requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: OCSP test requests +headerRange: '[1-2]' +linkTitle: test +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/ocsp/test/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-test) | `/v1/ocsp/test` | Test OCSP | + +## Test OCSP {#post-test} + + POST /v1/ocsp/test + +Queries the OCSP server for the proxy certificate’s latest status and returns the response as JSON. It caches the response if the OCSP feature is enabled. + +#### Required permissions + +| Permission name | +|-----------------| +| [test_ocsp_status]({{< relref "/operate/rs/references/rest-api/permissions#test_ocsp_status" >}}) | + +### Request {#post-request} + +#### Example HTTP request + + POST /ocsp/test + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#post-response} + +Returns an [OCSP status object]({{< relref "/operate/rs/references/rest-api/objects/ocsp_status" >}}). + +#### Example JSON body + +```json +{ + "responder_url": "http://responder.ocsp.url.com", + "cert_status": "REVOKED", + "produced_at": "Wed, 22 Dec 2021 12:50:11 GMT", + "this_update": "Wed, 22 Dec 2021 12:50:11 GMT", + "next_update": "Wed, 22 Dec 2021 14:50:00 GMT", + "revocation_time": "Wed, 22 Dec 2021 12:50:04 GMT" +} +``` + +### Error codes {#post-error-codes} + +When errors occur, the server returns a JSON object with `error_code` and `message` fields that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| no_responder_url | Tried to test OCSP status with no responder URL configured | +| ocsp_unsupported_by_capability | Not all nodes support OCSP capability | +| task_queued_for_too_long | OCSP polling task was in status “queued” for over 5 seconds | +| invalid_ocsp_response | The server returned a response that is not compatible with OCSP | + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success querying the OCSP server | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Feature is not supported in all nodes | +| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | `responder_url` is not configured or polling task failed | diff --git a/content/operate/rs/7.4/references/rest-api/requests/proxies/_index.md b/content/operate/rs/7.4/references/rest-api/requests/proxies/_index.md new file mode 100644 index 0000000000..91dfd63bfe --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/proxies/_index.md @@ -0,0 +1,295 @@ +--- +Title: Proxy requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Proxy requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: proxies +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/proxies/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-proxies) | `/v1/proxies` | Get all proxies | +| [GET](#get-proxy) | `/v1/proxies/{uid}` | Get a proxy | +| [PUT](#put-proxy) | `/v1/proxies/{uid}` | Update a proxy | +| [PUT](#put-all-proxies) | `/v1/proxies` | Update all proxies | + +## Get all proxies {#get-all-proxies} + +```sh +GET /v1/proxies +``` + +Get all the proxies in the cluster. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_all_proxies_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_proxies_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-all-request} + +#### Example HTTP request + +```sh +GET /proxies +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-all-response} + +Returns a JSON array of [proxy objects]({{< relref "/operate/rs/references/rest-api/objects/proxy" >}}). + +#### Example JSON body + +```json +[ + { + "uid": 1, + "client_keepintvl": 30, + "max_worker_server_conns": 16384, + "client_keepcnt": 6, + "max_threads": 64, + "ignore_bdb_cconn_output_buff_limits": false, + "dynamic_threads_scaling": false, + "max_worker_client_conns": 16384, + "max_servers": 4096, + "client_keepidle": 180, + "duration_usage_threshold": 30, + "max_worker_txns": 65536, + "threads": 3, + "max_listeners": 1024, + "conns": 500000, + "ignore_bdb_cconn_limit": false, + "threads_usage_threshold": 80, + "backlog": 1024 + }, + { + "uid": 2, + "threads": 3, + // additional fields... + } +] +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + +## Get proxy {#get-proxy} + +```sh +GET /v1/proxies/{int: uid} +``` + +Get a single proxy's info. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_proxy_info]({{< relref "/operate/rs/references/rest-api/permissions#view_proxy_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /proxies/1 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The proxy's unique node ID | + +### Response {#get-response} + +Returns a [proxy object]({{< relref "/operate/rs/references/rest-api/objects/proxy" >}}). + +#### Example JSON body + +```json +{ + "uid": 1, + "client_keepintvl": 30, + "max_worker_server_conns": 16384, + "client_keepcnt": 6, + "max_threads": 64, + "ignore_bdb_cconn_output_buff_limits": false, + "dynamic_threads_scaling": false, + "max_worker_client_conns": 16384, + "max_servers": 4096, + "client_keepidle": 180, + "duration_usage_threshold": 30, + "max_worker_txns": 65536, + "threads": 3, + "max_listeners": 1024, + "conns": 500000, + "ignore_bdb_cconn_limit": false, + "threads_usage_threshold": 80, + "backlog": 1024 +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Proxy UID does not exist | + +## Update proxy {#put-proxy} + +```sh +PUT /v1/proxies/{int: uid} +``` + +Updates a proxy object, notifies the proxy, and waits for acknowledgment (ACK) unless the node is dead. + +Automatically restarts the proxy service if `allow_restart` is `true` and any updated parameters require a restart for the changes to take effect. For example, a restart is required if you change `threads` to a lower number. + +However, if `allow_restart` is `false`, such changes only take effect after the next proxy restart. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_proxy]({{< relref "/operate/rs/references/rest-api/permissions#update_proxy" >}}) | admin | + +### Request {#put-request} + +#### Example HTTP request + +```sh +PUT /proxies/1 +``` + +#### Example JSON body + +```json +{ + "allow_restart": true, + "proxy": { + "threads": 8 + } +} +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | +| Content-Type | application/json | Request body media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the updated proxy. Corresponds to the node ID. | + +#### Request body + +Include a JSON object in the request body. The JSON object can contain the boolean field `allow_restart` and a [proxy object]({{< relref "/operate/rs/references/rest-api/objects/proxy" >}}) with updated fields. + +### Response {#put-response} + +Returns a status code to indicate the success or failure of the proxy update. + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error, the request has been processed | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad content provided | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Proxy does not exist | +| [500 Internal Server Error](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Error while waiting for confirmation from proxy | +| [504 Gateway Timeout](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.5) | Timeout while waiting for confirmation from proxy | + +## Update all proxies {#put-all-proxies} + +```sh +PUT /v1/proxies +``` + +Updates all the proxy objects, notifies the proxies, and waits for acknowledgment (ACK) unless the node is dead. + +Automatically restarts the relevant proxy services if `allow_restart` is `true` and any updated parameters require a restart for the changes to take effect. + +However, if `allow_restart` is `false`, such changes only take effect after the next proxy restart. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_proxy]({{< relref "/operate/rs/references/rest-api/permissions#update_proxy" >}}) | admin | + +### Request {#put-all-request} + +#### Example HTTP request + +```sh +PUT /proxies +``` + +#### Example JSON body + +```json +{ + "allow_restart": true, + "proxy": { + "threads": 8, + "max_threads": 12 + } +} +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | +| Content-Type | application/json | Request body media type | + +#### Request body + +Include a JSON object in the request body. The JSON object can contain the boolean field `allow_restart` and a [proxy object]({{< relref "/operate/rs/references/rest-api/objects/proxy" >}}) with updated fields. + +### Response {#put-all-response} + +Returns a status code to indicate the success or failure of the proxy updates. + +### Status codes {#put-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error, the request has been processed | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad content provided | +| [500 Internal Server Error](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Error while waiting for confirmation from proxy | +| [504 Gateway Timeout](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.5) | Timeout while waiting for confirmation from proxy | diff --git a/content/operate/rs/7.4/references/rest-api/requests/redis_acls/_index.md b/content/operate/rs/7.4/references/rest-api/requests/redis_acls/_index.md new file mode 100644 index 0000000000..e923651385 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/redis_acls/_index.md @@ -0,0 +1,381 @@ +--- +Title: Redis access control list (ACL) requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Redis access control list (ACL) requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: redis_acls +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/redis_acls/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-redis_acls) | `/v1/redis_acls` | Get all Redis ACLs | +| [GET](#get-redis_acl) | `/v1/redis_acls/{uid}` | Get a single Redis ACL | +| [PUT](#put-redis_acl) | `/v1/redis_acls/{uid}` | Update a Redis ACL | +| [POST](#post-redis_acl) | `/v1/redis_acls` | Create a new Redis ACL | +| [DELETE](#delete-redis_acl) | `/v1/redis_acls/{uid}` | Delete a Redis ACL | + +## Get all Redis ACLs {#get-all-redis_acls} + +```sh +GET /v1/redis_acls +``` + +Get all Redis ACL objects. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_all_redis_acls_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_redis_acls_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-all-request} + +#### Example HTTP request + +```sh +GET /redis_acls +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-all-response} + +Returns a JSON array of [Redis ACL objects]({{< relref "/operate/rs/references/rest-api/objects/redis_acl" >}}). + +#### Example JSON body + +```json +[ + { + "uid": 1, + "name": "Full Access", + "acl": "+@all ~*" + }, + { + "uid": 2, + "name": "Read Only", + "acl": "+@read ~*" + }, + { + "uid": 3, + "name": "Not Dangerous", + "acl": "+@all -@dangerous ~*" + }, + { + "uid": 17, + "name": "Geo", + "acl": "~* +@geo" + } +] +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support redis_acl yet. | + +## Get Redis ACL {#get-redis_acl} + +```sh +GET /v1/redis_acls/{int: uid} +``` + +Get a single Redis ACL object. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_redis_acl_info]({{< relref "/operate/rs/references/rest-api/permissions#view_redis_acl_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /redis_acls/1 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The object's unique ID. | + +### Response {#get-response} + +Returns a [Redis ACL object]({{< relref "/operate/rs/references/rest-api/objects/redis_acl" >}}). + +#### Example JSON body + +```json +{ + "uid": 17, + "name": "Geo", + "acl": "~* +@geo" +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success. | +| [403 Forbidden](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4) | Operation is forbidden. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | redis_acl does not exist. | +| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support redis_acl yet. | + +## Update Redis ACL {#put-redis_acl} + +```sh +PUT /v1/redis_acls/{int: uid} +``` + +Update an existing Redis ACL object. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_redis_acl]({{< relref "/operate/rs/references/rest-api/permissions#update_redis_acl" >}}) | admin | + +### Request {#put-request} + +#### Example HTTP request + +```sh +PUT /redis_acls/17 +``` + +#### Example JSON body + +```json +{ + "acl": "~* +@geo -@dangerous" +} +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Request body + +Include a [Redis ACL object]({{< relref "/operate/rs/references/rest-api/objects/redis_acl" >}}) with updated fields in the request body. + +### Response {#put-response} + +Returns the updated [Redis ACL object]({{< relref "/operate/rs/references/rest-api/objects/redis_acl" >}}). + +#### Example JSON body + +```json +{ + "uid": 17, + "name": "Geo", + "acl": "~* +@geo -@dangerous" +} +``` + +### Error codes {#put-error-codes} + +| Code | Description | +|------|-------------| +| unsupported_resource | The cluster is not yet able to handle this resource type. This could happen in a partially upgraded cluster, where some of the nodes are still on a previous version.| +| name_already_exists | An object of the same type and name exists| +| invalid_param | A parameter has an illegal value| + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, redis_acl was updated. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to change a non-existent redis_acl. | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Cannot change a read-only object | +| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support redis_acl yet. | + +## Create Redis ACL {#post-redis_acl} + +```sh +POST /v1/redis_acls +``` + +Create a new Redis ACL object. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [create_redis_acl]({{< relref "/operate/rs/references/rest-api/permissions#create_redis_acl" >}}) | admin | + +### Request {#post-request} + +#### Example HTTP request + +```sh +POST /redis_acls +``` + +#### Example JSON body + +```json +{ + "name": "Geo", + "acl": "~* +@geo" +} +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Request body + +Include a [Redis ACL object]({{< relref "/operate/rs/references/rest-api/objects/redis_acl" >}}) in the request body. + +### Response {#post-response} + +Returns the newly created [Redis ACL object]({{< relref "/operate/rs/references/rest-api/objects/redis_acl" >}}). + +#### Example JSON body + +```json +{ + "uid": 17, + "name": "Geo", + "acl": "~* +@geo" +} +``` + +### Error codes {#post-error-codes} + +Possible `error_code` values: + +| Code | Description | +|------|-------------| +| unsupported_resource | The cluster is not yet able to handle this resource type. This could happen in a partially upgraded cluster, where some of the nodes are still on a previous version. | +| name_already_exists | An object of the same type and name exists | +| missing_field | A needed field is missing | +| invalid_param | A parameter has an illegal value | + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, redis_acl is created. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. | +| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support redis_acl yet. | + +### Examples + +#### cURL + +```sh +curl -k -u "[username]:[password]" -X POST \ + -H 'Content-Type: application/json' \ + -d '{ "name": "Geo", "acl": "~* +@geo" }' \ + https://[host][:port]/v1/redis_acls +``` + +#### Python + +```python +import requests +import json + +url = "https://[host][:port]/v1/redis_acls" + +headers = { + 'Content-Type': 'application/json' +} + +payload = json.dumps({ + "name": "Geo", + "acl": "~* +@geo" +}) +auth=("[username]", "[password]") + +response = requests.request("POST", url, + auth=auth, headers=headers, payload=payload, verify=False) + +print(response.text) +``` + +## Delete Redis ACL {#delete-redis_acl} + +```sh +DELETE /v1/redis_acls/{int: uid} +``` + +Delete a Redis ACL object. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [delete_redis_acl]({{< relref "/operate/rs/references/rest-api/permissions#delete_redis_acl" >}}) | admin | + +### Request {#delete-request} + +#### Example HTTP request + +```sh +DELETE /redis_acls/1 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The redis_acl unique ID. | + +### Response {#delete-response} + +Returns a status code that indicates the Redis ACL deletion success or failure. + +### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, the redis_acl is deleted. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The request is not acceptable. | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Cannot delete a read-only object | +| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support redis_acl yet. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/roles/_index.md b/content/operate/rs/7.4/references/rest-api/requests/roles/_index.md new file mode 100644 index 0000000000..c9905b1845 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/roles/_index.md @@ -0,0 +1,398 @@ +--- +Title: Roles requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Roles requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: roles +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/roles/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-roles) | `/v1/roles` | Get all roles | +| [GET](#get-role) | `/v1/roles/{uid}` | Get a single role | +| [PUT](#put-role) | `/v1/roles/{uid}` | Update an existing role | +| [POST](#post-role) | `/v1/roles` | Create a new role | +| [DELETE](#delete-role) | `/v1/roles/{uid}` | Delete a role | + +## Get all roles {#get-all-roles} + +```sh +GET /v1/roles +``` + +Get all roles' details. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_all_roles_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_roles_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-all-request} + +#### Example HTTP request + +```sh +GET /roles +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-all-response} + +Returns a JSON array of [role objects]({{< relref "/operate/rs/references/rest-api/objects/role" >}}). + +#### Example JSON body + +```json +[ + { + "uid": 1, + "name": "Admin", + "management": "admin" + }, + { + "uid": 2, + "name": "Cluster Member", + "management": "cluster_member" + }, + { + "uid": 3, + "name": "Cluster Viewer", + "management": "cluster_viewer" + }, + { + "uid": 4, + "name": "DB Member", + "management": "db_member" + }, + { + "uid": 5, + "name": "DB Viewer", + "management": "db_viewer" + }, + { + "uid": 6, + "name": "None", + "management": "none" + }, + { + "uid": 17, + "name": "DBA", + "management": "admin" + } +] +``` + +#### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support roles yet. | + +## Get role + +```sh +GET /v1/roles/{int: uid} +``` + +Get the details of a single role. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_role_info]({{< relref "/operate/rs/references/rest-api/permissions#view_role_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /roles/1 +``` + + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The role's unique ID. | + +### Response {#get-response} + +Returns a [role object]({{< relref "/operate/rs/references/rest-api/objects/role" >}}). + +#### Example JSON body + +```json +{ + "uid": 17, + "name": "DBA", + "management": "admin" +} +``` + +#### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success. | +| [403 Forbidden](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4) | Operation is forbidden. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Role does not exist. | +| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support roles yet. | + +## Update role {#put-role} + +```sh +PUT /v1/roles/{int: uid} +``` + +Update an existing role's details. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_role]({{< relref "/operate/rs/references/rest-api/permissions#update_role" >}}) | admin | + +### Request {#put-request} + +#### Example HTTP request + +```sh +PUT /roles/17 +``` + +#### Example JSON body + +```json +{ + "management": "cluster_member" +} +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Body + +Include a [role object]({{< relref "/operate/rs/references/rest-api/objects/role" >}}) with updated fields in the request body. + +### Response {#put-response} + +Returns a [role object]({{< relref "/operate/rs/references/rest-api/objects/role" >}}) with the updated fields. + +#### Example JSON body + +```json +{ + "uid": 17, + "name": "DBA", + "management": "cluster_member" +} +``` + +### Error codes {#put-error-codes} + +Possible `error_code` values: + +| Code | Description | +|------|-------------| +| unsupported_resource | The cluster is not yet able to handle this resource type. This could happen in a partially upgraded cluster, where some of the nodes are still on a previous version.| +| name_already_exists | An object of the same type and name exists.| +| change_last_admin_role_not_allowed | At least one user with admin role should exist.| + +#### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, role is created. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to change a non-existant role. | +| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support roles yet. | + +## Create role {#post-role} + +```sh +POST /v1/roles +``` + +Create a new role. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [create_role]({{< relref "/operate/rs/references/rest-api/permissions#create_role" >}}) | admin | + +### Request {#post-request} + +#### Example HTTP request + +```sh +POST /roles +``` + +#### Example JSON body + +```json +{ + "name": "DBA", + "management": "admin" +} +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Body + +Include a [role object]({{< relref "/operate/rs/references/rest-api/objects/role" >}}) in the request body. + +### Response {#post-response} + +Returns the newly created [role object]({{< relref "/operate/rs/references/rest-api/objects/role" >}}). + +#### Example JSON body + +```json +{ + "uid": 17, + "name": "DBA", + "management": "admin" +} +``` + +### Error codes {#post-error-codes} + +Possible `error_code`values: + +| Code | Description | +|------|-------------| +| unsupported_resource | The cluster is not yet able to handle this resource type. This could happen in a partially upgraded cluster, where some of the nodes are still on a previous version. | +| name_already_exists | An object of the same type and name exists | +| missing_field | A needed field is missing | + +#### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, role is created. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. | +| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support roles yet. | + +### Examples + +#### cURL + +```sh +curl -k -u "[username]:[password]" -X POST \ + -H 'Content-Type: application/json' \ + -d '{ "name": "DBA", "management": "admin" }' \ + https://[host][:port]/v1/roles +``` + +#### Python + +```python +import requests +import json + +url = "https://[host][:port]/v1/roles" + +headers = { + 'Content-Type': 'application/json' +} + +payload = json.dumps({ + "name": "DBA", + "management": "admin" +}) +auth=("[username]", "[password]") + +response = requests.request("POST", url, + auth=auth, headers=headers, payload=payload, verify=False) + +print(response.text) +``` + +## Delete role {#delete-role} + +```sh +DELETE /v1/roles/{int: uid} +``` + +Delete a role object. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [delete_role]({{< relref "/operate/rs/references/rest-api/permissions#delete_role" >}}) | admin | + +### Request {#delete-request} + +#### Example HTTP request + +```sh +DELETE /roles/1 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The role unique ID. | + +### Response {#delete-response} + +Returns a status code to indicate role deletion success or failure. + +#### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, the role is deleted. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Role does not exist. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The request is not acceptable. | +| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support roles yet. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/shards/_index.md b/content/operate/rs/7.4/references/rest-api/requests/shards/_index.md new file mode 100644 index 0000000000..4e3edd67cc --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/shards/_index.md @@ -0,0 +1,147 @@ +--- +Title: Shard requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: REST API requests for database shards +headerRange: '[1-2]' +hideListLinks: true +linkTitle: shards +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/shards/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-shards) | `/v1/shards` | Get all shards | +| [GET](#get-shard) | `/v1/shards/{uid}` | Get a specific shard | + +## Get all shards {#get-all-shards} + + GET /v1/shards + +Get information about all shards in the cluster. + +### Request {#get-all-request} + +#### Example HTTP request + + GET /shards?extra_info_keys=used_memory_rss&extra_info_keys=connected_clients + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| extra_info_keys | list of strings | A list of extra keys to be fetched (optional) | + +### Response {#get-all-response} + +Returns a JSON array of [shard objects]({{}}). + +#### Example JSON body + +```json +[ + { + "uid": "1", + "role": "master", + "assigned_slots": "0-16383", + "bdb_uid": 1, + "detailed_status": "ok", + "loading": { + "status": "idle" + }, + "node_uid": "1", + "redis_info": { + "connected_clients": 14, + "used_memory_rss": 12263424 + }, + "report_timestamp": "2024-06-28T18:44:01Z", + "status": "active" + }, + { + "uid": 2, + "role": "slave", + // additional fields... + } +] +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error. | + +## Get shard {#get-shard} + + GET /v1/shards/{int: uid} + +Gets information about a single shard. + +### Request {#get-request} + +#### Example HTTP request + + GET /shards/1?extra_info_keys=used_memory_rss&extra_info_keys=connected_clients + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the requested shard. | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| extra_info_keys | list of strings | A list of extra keys to be fetched (optional) | + +### Response {#get-response} + +Returns a [shard object]({{}}). + +#### Example JSON body + +```json +{ + "assigned_slots": "0-16383", + "bdb_uid": 1, + "detailed_status": "ok", + "loading": { + "status": "idle" + }, + "node_uid": "1", + "redis_info": { + "connected_clients": 14, + "used_memory_rss": 12263424 + }, + "role": "master", + "report_timestamp": "2024-06-28T18:44:01Z", + "status": "active", + "uid": "1" +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error. | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Shard UID does not exist. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/shards/actions/_index.md b/content/operate/rs/7.4/references/rest-api/requests/shards/actions/_index.md new file mode 100644 index 0000000000..66874ee9cf --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/shards/actions/_index.md @@ -0,0 +1,21 @@ +--- +Title: Shard actions requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: REST API requests to perform shard actions +headerRange: '[1-2]' +hideListLinks: true +linkTitle: actions +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/shards/actions/' +--- + +## Migrate + +| Method | Path | Description | +|--------|------|-------------| +| [POST]({{}}) | `/v1/shards/actions/migrate` | Migrate multiple shards | +| [POST]({{}}) | `/v1/shards/{uid}/actions/migrate` | Migrate a specific shard | diff --git a/content/operate/rs/7.4/references/rest-api/requests/shards/actions/migrate.md b/content/operate/rs/7.4/references/rest-api/requests/shards/actions/migrate.md new file mode 100644 index 0000000000..41dc4b26b3 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/shards/actions/migrate.md @@ -0,0 +1,170 @@ +--- +Title: Migrate shards requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: REST API requests to migrate database shards +headerRange: '[1-2]' +linkTitle: migrate +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/shards/actions/migrate/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-multi-shards) | `/v1/shards/actions/migrate` | Migrate multiple shards | +| [POST](#post-shard) | `/v1/shards/{uid}/actions/migrate` | Migrate a specific shard | + +## Migrate multiple shards {#post-multi-shards} + + POST /v1/shards/actions/migrate + +Migrates the list of given shard UIDs to the node specified by `target_node_uid`. The shards can be from multiple databases. This request is asynchronous. + +For more information about shard migration use cases and considerations, see [Migrate database shards]({{}}). + +#### Required permissions + +| Permission name | Roles | +|-----------------|-------| +| [migrate_shard]({{< relref "/operate/rs/references/rest-api/permissions#migrate_shard" >}}) | admin
cluster_member
db_member | + +### Request {#post-multi-request} + +#### Example HTTP request + + POST /shards/actions/migrate + +#### Example JSON body + +```json +{ + "shard_uids": ["2","4","6"], + "target_node_uid": 9, + "override_rack_policy": false, + "preserve_roles": false, + "max_concurrent_bdb_migrations": 3 +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Request body {#post-multi-request-body} + +The request body is a JSON object that can contain the following fields: + +| Field | Type | Description | +|-------|------|-------------| +| shard_uids | array of strings | List of shard UIDs to migrate. | +| target_node_uid | integer | UID of the node to where the shards should migrate. | +| override_rack_policy | boolean | If true, overrides and ignores rack-aware policy violations. | +| dry_run | boolean | Determines whether the migration is actually done. If true, will just do a dry run. If the dry run succeeds, the request returns a `200 OK` status code. Otherwise, it returns a JSON object with an error code and description. | +| preserve_roles | boolean | If true, preserves the migrated shards' roles after migration. | +| max_concurrent_bdb_migrations | integer | The number of concurrent databases that can migrate shards. | + +### Response {#post-multi-response} + +Returns a JSON object with an `action_uid`. You can track the action's progress with a [`GET /v1/actions/`]({{}}) request. + +#### Example JSON body + +```json +{ + "action_uid": "e5e24ddf-a456-4a7e-ad53-4463cd44880e", + "description": "Migrate was triggered" +} +``` + +### Status codes {#post-multi-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error. | +| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Conflicting parameters. | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | 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. | +| [500 Internal Server Error](https://www.rfc-editor.org/rfc/rfc9110.html#name-500-internal-server-error) | Migration failed. | + + +## Migrate shard {#post-shard} + + POST /v1/shards/{int: uid}/actions/migrate + +Migrates the shard with the given `shard_uid` to the node specified by `target_node_uid`. If the shard is already on the target node, nothing happens. This request is asynchronous. + +For more information about shard migration use cases and considerations, see [Migrate database shards]({{}}). + +#### Required permissions + +| Permission name | Roles | +|-----------------|-------| +| [migrate_shard]({{< relref "/operate/rs/references/rest-api/permissions#migrate_shard" >}}) | admin
cluster_member
db_member | + +### Request {#post-request} + +#### Example HTTP request + + POST /shards/1/actions/migrate + +#### Example JSON body + +```json +{ + "target_node_uid": 9, + "override_rack_policy": false, + "preserve_roles": false +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the shard to migrate. | + + +#### Request body {#post-request-body} + +The request body is a JSON object that can contain the following fields: + +| Field | Type | Description | +|-------|------|-------------| +| target_node_uid | integer | UID of the node to where the shard should migrate. | +| override_rack_policy | boolean | If true, overrides and ignores rack-aware policy violations. | +| dry_run | boolean | Determines whether the migration is actually done. If true, will just do a dry run. If the dry run succeeds, the request returns a `200 OK` status code. Otherwise, it returns a JSON object with an error code and description. | +| preserve_roles | boolean | If true, preserves the migrated shards' roles after migration. | + +### Response {#post-response} + +Returns a JSON object with an `action_uid`. You can track the action's progress with a [`GET /v1/actions/`]({{}}) request. + +#### Example JSON body + +```json +{ + "action_uid": "e5e24ddf-a456-4a7e-ad53-4463cd44880e", + "description": "Migrate was triggered" +} +``` + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error. | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Shard does not exist, or node UID is required and not given. | +| [409 Conflict](https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict) | Database is currently busy. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/shards/stats/_index.md b/content/operate/rs/7.4/references/rest-api/requests/shards/stats/_index.md new file mode 100644 index 0000000000..7769304ef6 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/shards/stats/_index.md @@ -0,0 +1,242 @@ +--- +Title: Shards stats requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Shard statistics requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: stats +weight: $weight +aliases: /operate/rs/references/rest-api/requests/shards-stats/ +url: '/operate/rs/7.4/references/rest-api/requests/shards/stats/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-shards-stats) | `/v1/shards/stats` | Get stats for all shards | +| [GET](#get-shard-stats) | `/v1/shards/stats/{uid}` | Get stats for a specific shard | + +## Get all shards stats {#get-all-shards-stats} + + GET /v1/shards/stats + +Get statistics for all shards. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_all_shard_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_all_shard_stats" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + + GET /shards/stats?interval=1hour&stime=2014-08-28T10:00:00Z + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| parent_uid | integer | Only return shard from the given BDB ID (optional) | +| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| metrics | list | Comma-separated list of [metric names]({{< relref "/operate/rs/references/rest-api/objects/statistics/shard-metrics" >}}) for which we want statistics (default is all) (optional) | + +### Response {#get-all-response} + +Returns a JSON array of [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for all shards. + +#### Example JSON body + +```json +[ + { + "status": "active", + "uid": "1", + "node_uid": "1", + "assigned_slots": "0-8191", + "intervals": [ + { + "interval": "1sec", + "stime": "2015-05-28T08:27:35Z", + "etime": "2015-05-28T08:27:40Z", + "used_memory_peak": 5888264.0, + "used_memory_rss": 5888264.0, + "read_hits": 0.0, + "pubsub_patterns": 0.0, + "no_of_keys": 0.0, + "mem_size_lua": 35840.0, + "last_save_time": 1432541051.0, + "sync_partial_ok": 0.0, + "connected_clients": 9.0, + "avg_ttl": 0.0, + "write_misses": 0.0, + "used_memory": 5651440.0, + "sync_full": 0.0, + "expired_objects": 0.0, + "total_req": 0.0, + "blocked_clients": 0.0, + "pubsub_channels": 0.0, + "evicted_objects": 0.0, + "no_of_expires": 0.0, + "interval": "1sec", + "write_hits": 0.0, + "read_misses": 0.0, + "sync_partial_err": 0.0, + "rdb_changes_since_last_save": 0.0 + }, + { + "interval": "1sec", + "stime": "2015-05-28T08:27:40Z", + "etime": "2015-05-28T08:27:45Z", + "// additional fields..." + } + ] + }, + { + "uid": "2", + "status": "active", + "node_uid": "1", + "assigned_slots": "8192-16383", + "intervals": [ + { + "interval": "1sec", + "stime": "2015-05-28T08:27:35Z", + "etime": "2015-05-28T08:27:40Z", + "// additional fields..." + }, + { + "interval": "1sec", + "stime": "2015-05-28T08:27:40Z", + "etime": "2015-05-28T08:27:45Z", + "// additional fields..." + } + ] + } +] +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | No shards exist | + +## Get shard stats {#get-shard-stats} + + GET /v1/shards/stats/{int: uid} + +Get statistics for a specific shard. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_shard_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_shard_stats" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /shards/stats/1?interval=1hour&stime=2014-08-28T10:00:00Z + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the shard requested. | + + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | + +### Response {#get-response} + +Returns [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for the specified shard. + +#### Example JSON body + +```json +{ + "uid": "1", + "status": "active", + "node_uid": "1", + "role": "master", + "intervals": [ + { + "interval": "1sec", + "stime": "2015-05-28T08:24:13Z", + "etime": "2015-05-28T08:24:18Z", + "avg_ttl": 0.0, + "blocked_clients": 0.0, + "connected_clients": 9.0, + "etime": "2015-05-28T08:24:18Z", + "evicted_objects": 0.0, + "expired_objects": 0.0, + "last_save_time": 1432541051.0, + "used_memory": 5651440.0, + "mem_size_lua": 35840.0, + "used_memory_peak": 5888264.0, + "used_memory_rss": 5888264.0, + "no_of_expires": 0.0, + "no_of_keys": 0.0, + "pubsub_channels": 0.0, + "pubsub_patterns": 0.0, + "rdb_changes_since_last_save": 0.0, + "read_hits": 0.0, + "read_misses": 0.0, + "stime": "2015-05-28T08:24:13Z", + "sync_full": 0.0, + "sync_partial_err": 0.0, + "sync_partial_ok": 0.0, + "total_req": 0.0, + "write_hits": 0.0, + "write_misses": 0.0 + }, + { + "interval": "1sec", + "stime": "2015-05-28T08:24:18Z", + "etime": "2015-05-28T08:24:23Z", + + "// additional fields..." + } + ] +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Shard does not exist | +| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | Shard isn't currently active | diff --git a/content/operate/rs/7.4/references/rest-api/requests/shards/stats/last.md b/content/operate/rs/7.4/references/rest-api/requests/shards/stats/last.md new file mode 100644 index 0000000000..e47381f23d --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/shards/stats/last.md @@ -0,0 +1,197 @@ +--- +Title: Latest shards stats requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Most recent shard statistics requests +headerRange: '[1-2]' +linkTitle: last +weight: $weight +aliases: /operate/rs/references/rest-api/requests/shards-stats/last/ +url: '/operate/rs/7.4/references/rest-api/requests/shards/stats/last/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-shards-stats-last) | `/v1/shards/stats/last` | Get most recent stats for all shards | +| [GET](#get-shard-stats-last) | `/v1/shards/stats/last/{uid}` | Get most recent stats for a specific shard | + +## Get latest stats for all shards {#get-all-shards-stats-last} + + GET /v1/shards/stats/last + +Get most recent statistics for all shards. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_all_shard_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_all_shard_stats" >}}) | + +### Request {#get-all-request} + +#### Example HTTP request + + GET /shards/stats/last?interval=1sec&stime=015-05-27T08:27:35Z + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week. Default: 1sec (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | + +### Response {#get-all-response} + +Returns most recent [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for all shards. + +#### Example JSON body + +```json +{ + "1": { + "interval": "1sec", + "stime": "2015-05-28T08:27:35Z", + "etime": "2015-05-28T08:28:36Z", + "used_memory_peak": 5888264.0, + "used_memory_rss": 5888264.0, + "read_hits": 0.0, + "pubsub_patterns": 0.0, + "no_of_keys": 0.0, + "mem_size_lua": 35840.0, + "last_save_time": 1432541051.0, + "sync_partial_ok": 0.0, + "connected_clients": 9.0, + "avg_ttl": 0.0, + "write_misses": 0.0, + "used_memory": 5651440.0, + "sync_full": 0.0, + "expired_objects": 0.0, + "total_req": 0.0, + "blocked_clients": 0.0, + "pubsub_channels": 0.0, + "evicted_objects": 0.0, + "no_of_expires": 0.0, + "interval": "1sec", + "write_hits": 0.0, + "read_misses": 0.0, + "sync_partial_err": 0.0, + "rdb_changes_since_last_save": 0.0 + }, + "2": { + "interval": "1sec", + "stime": "2015-05-28T08:27:40Z", + "etime": "2015-05-28T08:28:45Z", + "// additional fields..." + } +} +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | No shards exist | + +## Get latest shard stats {#get-shard-stats-last} + + GET /v1/shards/stats/last/{int: uid} + +Get most recent statistics for a specific shard. + +#### Required permissions + +| Permission name | +|-----------------| +| [view_shard_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_shard_stats" >}}) | + +### Request {#get-request} + +#### Example HTTP request + + GET /shards/stats/last/1?interval=1sec&stime=2015-05-28T08:27:35Z + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the shard requested. | + + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week. Default: 1sec. (optional) | +| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | +| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) | + +### Response {#get-response} + +Returns the most recent [statistics]({{< relref "/operate/rs/references/rest-api/objects/statistics" >}}) for the specified shard. + +#### Example JSON body + +```json +{ + "1": { + "interval": "1sec", + "stime": "2015-05-28T08:27:35Z", + "etime": "2015-05-28T08:27:36Z", + "used_memory_peak": 5888264.0, + "used_memory_rss": 5888264.0, + "read_hits": 0.0, + "pubsub_patterns": 0.0, + "no_of_keys": 0.0, + "mem_size_lua": 35840.0, + "last_save_time": 1432541051.0, + "sync_partial_ok": 0.0, + "connected_clients": 9.0, + "avg_ttl": 0.0, + "write_misses": 0.0, + "used_memory": 5651440.0, + "sync_full": 0.0, + "expired_objects": 0.0, + "total_req": 0.0, + "blocked_clients": 0.0, + "pubsub_channels": 0.0, + "evicted_objects": 0.0, + "no_of_expires": 0.0, + "interval": "1sec", + "write_hits": 0.0, + "read_misses": 0.0, + "sync_partial_err": 0.0, + "rdb_changes_since_last_save": 0.0 + } +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Shard does not exist | +| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | Shard isn't currently active | diff --git a/content/operate/rs/7.4/references/rest-api/requests/suffix/_index.md b/content/operate/rs/7.4/references/rest-api/requests/suffix/_index.md new file mode 100644 index 0000000000..946929dc72 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/suffix/_index.md @@ -0,0 +1,65 @@ +--- +Title: Suffix requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: DNS suffix requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: suffix +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/suffix/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-suffix) | `/v1/suffix/{name}` | Get a single DNS suffix | + +## Get suffix {#get-suffix} + + GET /v1/suffix/{string: name} + +Get a single DNS suffix. + +### Request {#get-request} + +#### Example HTTP request + + GET /suffix/cluster.fqdn + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| name | string | The unique name of the suffix requested. | + +### Response {#get-response} + +Returns a [suffix object]({{< relref "/operate/rs/references/rest-api/objects/suffix" >}}). + +#### Example JSON body + +```json +{ + "name": "cluster.fqdn", + "// additional fields..." +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Suffix name does not exist | diff --git a/content/operate/rs/7.4/references/rest-api/requests/suffixes/_index.md b/content/operate/rs/7.4/references/rest-api/requests/suffixes/_index.md new file mode 100644 index 0000000000..ddffe2a774 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/suffixes/_index.md @@ -0,0 +1,63 @@ +--- +Title: Suffixes requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: DNS suffixes requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: suffixes +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/suffixes/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-suffixes) | `/v1/suffixes` | Get all DNS suffixes | + +## Get all suffixes {#get-all-suffixes} + + GET /v1/suffixes + +Get all DNS suffixes in the cluster. + +### Request {#get-all-request} + +#### Example HTTP request + + GET /suffixes + + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-all-response} + +The response body contains a JSON array with all suffixes, represented as [suffix objects]({{< relref "/operate/rs/references/rest-api/objects/suffix" >}}). + +#### Example JSON body + +```json +[ + { + "name": "cluster.fqdn", + "// additional fields..." + }, + { + "name": "internal.cluster.fqdn", + "// additional fields..." + } +] +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | diff --git a/content/operate/rs/7.4/references/rest-api/requests/users/_index.md b/content/operate/rs/7.4/references/rest-api/requests/users/_index.md new file mode 100644 index 0000000000..1d8f7e5205 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/users/_index.md @@ -0,0 +1,441 @@ +--- +Title: Users requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: User requests +headerRange: '[1-2]' +hideListLinks: true +linkTitle: users +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/users/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-all-users) | `/v1/users` | Get all users | +| [GET](#get-user) | `/v1/users/{uid}` | Get a single user | +| [PUT](#put-user) | `/v1/users/{uid}` | Update a user's configuration | +| [POST](#post-user) | `/v1/users` | Create a new user | +| [DELETE](#delete-user) | `/v1/users/{uid}` | Delete a user | + +## Get all users {#get-all-users} + +```sh +GET /v1/users +``` + +Get a list of all users. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_all_users_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_users_info" >}}) | admin | + +### Request {#get-all-request} + +#### Example HTTP request + +```sh +GET /users +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-all-response} + +Returns a JSON array of [user objects]({{< relref "/operate/rs/references/rest-api/objects/user" >}}). + +#### Example JSON body + +```json +[ + { + "uid": 1, + "password_issue_date": "2017-03-02T09:43:34Z", + "email": "user@example.com", + "name": "John Doe", + "email_alerts": true, + "bdbs_email_alerts": ["1","2"], + "role": "admin", + "auth_method": "regular", + "status": "active" + }, + { + "uid": 2, + "password_issue_date": "2017-03-02T09:43:34Z", + "email": "user2@example.com", + "name": "Jane Poe", + "email_alerts": true, + "role": "db_viewer", + "auth_method": "regular", + "status": "active" + } +] +``` + +### Status codes {#get-all-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | + +## Get user {#get-user} + +```sh +GET /v1/users/{int: uid} +``` + +Get a single user's details. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_user_info]({{< relref "/operate/rs/references/rest-api/permissions#view_user_info" >}}) | admin | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /users/1 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The user's unique ID | + +### Response {#get-response} + +Returns a [user object]({{< relref "/operate/rs/references/rest-api/objects/user" >}}) that contains the details for the specified user ID. + +#### Example JSON body + +```json +{ + "uid": 1, + "password_issue_date": "2017-03-07T15:11:08Z", + "role": "db_viewer", + "email_alerts": true, + "bdbs_email_alerts": ["1","2"], + "email": "user@example.com", + "name": "John Doe", + "auth_method": "regular", + "status": "active" +} +``` + +### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success. | +| [403 Forbidden](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4) | Operation is forbidden. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | User does not exist. | + +## Update user {#put-user} + +```sh +PUT /v1/users/{int: uid} +``` + +Update an existing user's configuration. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_user]({{< relref "/operate/rs/references/rest-api/permissions#update_user" >}}) | admin | + +Any user can change their own name, password, or alert preferences. + +### Request {#put-request} + +#### Example HTTP request + +```sh +PUT /users/1 +``` + +#### Example JSON body + +```json +{ + "email_alerts": false, + "role_uids": [ 2, 4 ] +} +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The user's unique ID | + + +#### Request body + +Include a [user object]({{< relref "/operate/rs/references/rest-api/objects/user" >}}) with updated fields in the request body. + +### Response {#put-response} + +Returns the updated [user object]({{< relref "/operate/rs/references/rest-api/objects/user" >}}). + +#### Example JSON body + +```json +{ + "uid": 1, + "password_issue_date": "2017-03-07T15:11:08Z", + "email": "user@example.com", + "name": "Jane Poe", + "email_alerts": false, + "role": "db_viewer", + "role_uids": [ 2, 4 ], + "auth_method": "regular" +} +``` + +{{}} +For [RBAC-enabled clusters]({{< relref "/operate/rs/security/access-control" >}}), the returned user details include `role_uids` instead of `role`. +{{}} + +### Error codes {#put-error-codes} + +When errors are reported, the server may return a JSON object with `error_code` and `message` field that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| password_not_complex | The given password is not complex enough (Only works when the password_complexity feature is enabled).| +| new_password_same_as_current | The given new password is identical to the old password.| +| email_already_exists | The given email is already taken.| +| change_last_admin_role_not_allowed | At least one user with admin role should exist.| + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, the user is updated. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to change a non-existing user. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The requested configuration is invalid. | + +## Create user {#post-user} + +```sh +POST /v1/users +``` + +Create a new user. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [create_new_user]({{< relref "/operate/rs/references/rest-api/permissions#create_new_user" >}}) | admin | + +### Request {#post-request} + +#### Example HTTP request + +```sh +POST /users +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Body + +Include a single [user object]({{< relref "/operate/rs/references/rest-api/objects/user" >}}) in the request body. The user object must have an email, password, and role. + +{{}} +For [RBAC-enabled clusters]({{< relref "/operate/rs/security/access-control" >}}), use `role_uids` instead of `role` in the request body. +{{}} + +`email_alerts` can be configured either as: + +- `true` - user will receive alerts for all databases configured in `bdbs_email_alerts`. The user will receive alerts for all databases by default if `bdbs_email_alerts` is not configured. `bdbs_email_alerts` can be a list of database UIDs or `[‘all’]` meaning all databases. + +- `false` - user will not receive alerts for any databases + +##### Example JSON body + +```json +{ + "email": "newuser@example.com", + "password": "my-password", + "name": "Pat Doe", + "email_alerts": true, + "bdbs_email_alerts": ["1","2"], + "role_uids": [ 3, 4 ], + "auth_method": "regular" +} +``` + +### Response {#post-response} + +Returns the newly created [user object]({{< relref "/operate/rs/references/rest-api/objects/user" >}}). + +#### Example JSON body + +```json +{ + "uid": 1, + "password_issue_date": "2017-03-07T15:11:08Z", + "email": "newuser@example.com", + "name": "Pat Doe", + "email_alerts": true, + "bdbs_email_alerts": ["1","2"], + "role": "db_viewer", + "role_uids": [ 3, 4 ], + "auth_method": "regular" +} +``` + +### Error codes {#post-error-codes} + +When errors are reported, the server may return a JSON object with `error_code` and `message` field that provide additional information. + +The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| password_not_complex | The given password is not complex enough (Only works when the password_complexity feature is enabled).| +| email_already_exists | The given email is already taken.| +| name_already_exists | The given name is already taken.| + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, user is created. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. | +| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | User with the same email already exists. | + +### Examples + +#### cURL + +```sh +$ curl -k -X POST -u '[username]:[password]' \ + -H 'Content-Type: application/json' \ + -d '{ "email": "newuser@example.com", \ + "password": "my-password", \ + "name": "Pat Doe", \ + "email_alerts": true, \ + "bdbs_email_alerts": ["1","2"], \ + "role_uids": [ 3, 4 ], \ + "auth_method": "regular" }' \ + 'https://[host][:port]/v1/users' +``` + +#### Python + +```python +import requests +import json + +url = "https://[host][:port]/v1/users" +auth = ("[username]", "[password]") + +payload = json.dumps({ + "email": "newuser@example.com", + "password": "my-password", + "name": "Pat Doe", + "email_alerts": True, + "bdbs_email_alerts": [ + "1", + "2" + ], + "role_uids": [ + 3, + 4 + ], + "auth_method": "regular" +}) + +headers = { + 'Content-Type': 'application/json' +} + +response = requests.request("POST", url, auth=auth, headers=headers, data=payload, verify=False) + +print(response.text) +``` + +## Delete user {#delete-user} + +```sh +DELETE /v1/users/{int: uid} +``` + +Delete a user. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [delete_user]({{< relref "/operate/rs/references/rest-api/permissions#delete_user" >}}) | admin | + +### Request {#delete-request} + +#### Example HTTP request + +```sh +DELETE /users/1 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The user's unique ID | + +### Response {#delete-response} + +Returns a status code to indicate the success or failure of the user deletion. + +### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, the user is deleted. | +| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The request is not acceptable. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/users/authorize.md b/content/operate/rs/7.4/references/rest-api/requests/users/authorize.md new file mode 100644 index 0000000000..74dd28df82 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/users/authorize.md @@ -0,0 +1,78 @@ +--- +Title: Authorize user requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Users authorization requests +headerRange: '[1-2]' +linkTitle: authorize +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/users/authorize/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-authorize) | `/v1/users/authorize` | Authorize a user | + +## Authorize user {#post-authorize} + + POST /v1/users/authorize + +Generate a JSON Web Token (JWT) for a user to use as authorization to access the REST API. + +### Request {#post-request} + +#### Example HTTP request + + POST /users/authorize + +#### Example JSON body + + ```json + { + "username": "user@redislabs.com", + "password": "my_password" + } + ``` + +#### Request headers +| Key | Value | Description | +|--------|------------------|---------------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Request body + +Include a [JWT authorize object]({{< relref "/operate/rs/references/rest-api/objects/jwt_authorize" >}}) with a valid username and password in the request body. + +### Response {#post-response} + +Returns a JSON object that contains the generated access token. + +#### Example JSON body + + ```json + { + "access_token": "eyJ5bGciOiKIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXViOjE0NjU0NzU0ODYsInVpZFI1IjEiLCJleHAiOjE0NjU0Nz30OTZ9.2xYXumd1rDoE0edFzcLElMOHsshaqQk2HUNgdsUKxMU" + } + ``` + +### Error codes {#post-error-codes} + +When errors are reported, the server may return a JSON object with +`error_code` and `message` fields that provide additional information. +The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| password_expired | The password has expired and must be changed. | + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The user is authorized. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | The request could not be understood by the server due to malformed syntax. | +| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | The user is unauthorized. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/users/password.md b/content/operate/rs/7.4/references/rest-api/requests/users/password.md new file mode 100644 index 0000000000..983f6b95ac --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/users/password.md @@ -0,0 +1,199 @@ +--- +Title: User password requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: User password requests +headerRange: '[1-2]' +linkTitle: password +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/users/password/' +--- + +| Method | Path | Description | +|----------------------------|----------------------|-----------------------------| +| [PUT](#update-password) | `/v1/users/password` | Change an existing password | +| [POST](#add-password) | `/v1/users/password` | Add a new password | +| [DELETE](#delete-password) | `/v1/users/password` | Delete a password | + +## Update password {#update-password} + + PUT /v1/users/password + +Reset the password list of an internal user to include a new password. + +### Request {#put-request} + +#### Example HTTP request + + PUT /users/password + +#### Example JSON body + + ```json + { + "username": "johnsmith", + "old_password": "a password that exists in the current list", + "new_password": "the new (single) password" + } + ``` + +#### Request headers +| Key | Value | Description | +|--------|------------------|---------------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Request body + +The request must contain a single JSON object with the following fields: + +| Field | Type | Description | +|-------|------|-------------| +| username | string | Affected user (required) | +| old_password | string | A password that exists in the current list (required) | +| new_password | string | The new password (required) | + +### Response {#put-response} + +Returns a status code to indicate password update success or failure. + +### Error codes {#put-error-codes} + +When errors are reported, the server may return a JSON object with +`error_code` and `message` fields that provide additional information. +The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| password_not_complex | The given password is not complex enough (Only work when the password_complexity feature is enabled). | +| new_password_same_as_current | The given new password is identical to one of the already existing passwords. | + +### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, password changed | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing parameters. | +| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | The user is unauthorized. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to reset password to a non-existing user. | + +## Add password {#add-password} + + POST /v1/users/password + +Add a new password to an internal user's passwords list. + +### Request {#post-request} + +#### Example HTTP request + + POST /users/password + +#### Example JSON body + + ```json + { + "username": "johnsmith", + "old_password": "an existing password", + "new_password": "a password to add" + } + ``` + +#### Request headers +| Key | Value | Description | +|--------|------------------|---------------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Request body + +The request must contain a single JSON object with the following fields: + +| Field | Type | Description | +|-------|------|-------------| +| username | string | Affected user (required) | +| old_password | string | A password that exists in the current list (required) | +| new_password | string | The new (single) password (required) | + +### Response {#post-response} + +Returns a status code to indicate password creation success or failure. If an error occurs, the response body may include a more specific error code and message. + +### Error codes {#post-error-codes} + +When errors are reported, the server may return a JSON object with +`error_code` and `message` fields that provide additional information. +The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| password_not_complex | The given password is not complex enough (Only work when the password_complexity feature is enabled). | +| new_password_same_as_current | The given new password is identical to one of the already existing passwords. | + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, new password was added to the list of valid passwords. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing parameters. | +| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | The user is unauthorized. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to add a password to a non-existing user. | + +## Delete password {#delete-password} + DELETE /v1/users/password + +Delete a password from an internal user's passwords list. + +### Request {#delete-request} + +#### Example HTTP request + + DELETE /users/password + +#### Example JSON body + + ```json + { + "username": "johnsmith", + "old_password": "an existing password" + } + ``` + +#### Request headers +| Key | Value | Description | +|--------|------------------|---------------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Request body + +The request must contain a single JSON with the following fields: + +| Field | Type | Description | +|-------|------|-------------| +| username | string | Affected user (required) | +| old_password | string | Existing password to be deleted (required) | + +### Response {#delete-response} + +### Error codes {#delete-error-codes} + +When errors are reported, the server may return a JSON object with +`error_code` and `message` fields that provide additional information. +The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| cannot_delete_last_password | Cannot delete the last password of a user | + +### Status codes {#delete-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, new password was deleted from the list of valid passwords. | +| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing parameters. | +| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | The user is unauthorized. | +| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to delete a password to a non-existing user. | diff --git a/content/operate/rs/7.4/references/rest-api/requests/users/refresh_jwt.md b/content/operate/rs/7.4/references/rest-api/requests/users/refresh_jwt.md new file mode 100644 index 0000000000..8d53d21ea1 --- /dev/null +++ b/content/operate/rs/7.4/references/rest-api/requests/users/refresh_jwt.md @@ -0,0 +1,65 @@ +--- +Title: Refresh JWT requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Refresh JW token requests +headerRange: '[1-2]' +linkTitle: refresh_jwt +weight: $weight +url: '/operate/rs/7.4/references/rest-api/requests/users/refresh_jwt/' +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-refresh_jwt) | `/v1/users/refresh_jwt` | Get a new authentication token | + +## Get a new authentication token {#post-refresh_jwt} + + POST /v1/users/refresh_jwt + +Generate a new JSON Web Token (JWT) for authentication. + +Takes a valid token and returns the new token generated by the request. + +### Request {#post-request} + +#### Example HTTP request + + POST /users/refresh_jwt + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Authorization | JWT eyJ5bGciOiKIUzI1NiIsInR5cCI6IkpXVCJ9.

eyJpYXViOjE0NjU0NzU0ODYsInVpZFI1IjEiLCJ

leHAiOjE0NjU0Nz30OTZ9.2xYXumd1rDoE0e

dFzcLElMOHsshaqQk2HUNgdsUKxMU | Valid JSON Web Token (JWT) | + +#### Request body + +| Field | Type | Description | +|-------|------|-------------| +| ttl | integer | Time to live - The amount of time in seconds the token will be valid (optional) | + +### Response {#post-response} + +Returns a JSON object that contains the generated access token. + +#### Example JSON body + +```json + { + "access_token": "eyJ5bGciOiKIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXViOjE0NjU0NzU0ODYsInVpZFI1IjEiLCJleHAiOjE0NjU0Nz30OTZ9.2xYXumd1rDoE0edFzcLElMOHsshaqQk2HUNgdsUKxMU" + } +``` + + + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | A new token is given. | +| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | The token is invalid or password has expired. | diff --git a/content/operate/rs/7.4/references/supported-platforms.md b/content/operate/rs/7.4/references/supported-platforms.md new file mode 100644 index 0000000000..5f37e28471 --- /dev/null +++ b/content/operate/rs/7.4/references/supported-platforms.md @@ -0,0 +1,15 @@ +--- +Title: Supported platforms +alwaysopen: false +categories: +- docs +- operate +- rs +description: Redis Enterprise Software is supported on several operating systems, + cloud environments, and virtual environments. +linkTitle: Supported platforms +weight: 30 +tocEmbedHeaders: true +url: '/operate/rs/7.4/references/supported-platforms/' +--- +{{}} diff --git a/content/operate/rs/7.4/references/terminology.md b/content/operate/rs/7.4/references/terminology.md new file mode 100644 index 0000000000..fcdd1536de --- /dev/null +++ b/content/operate/rs/7.4/references/terminology.md @@ -0,0 +1,120 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: Explains terms used in Redis Enterprise Software and its docs. +linkTitle: Terminology +title: Terminology in Redis Enterprise Software +weight: $weight +url: '/operate/rs/7.4/references/terminology/' +--- +Here are explanations of some of the terms used in Redis Enterprise Software. + +## Node + +A _node_ is a physical machine, virtual machine, container or cloud +instance on which the RS installation package was installed and the +setup process was run in order to make the machine part of the cluster. + +Each node is a container for running multiple Redis +instances, referred to as "shards". + +The recommended configuration for a production cluster is an uneven +number of nodes, with a minimum of three. Note that in some +configurations, certain functionalities might be blocked. For example, +if a cluster has only one node you cannot enable database replication, +which helps to achieve high availability. + +A node is made up of several components, as detailed below, and works +together with the other cluster nodes. + +## Redis instance (shard) + +As indicated above, each node serves as a container for hosting multiple +database instances, referred to as "shards". + +Redis Enterprise Software supports various database configurations: + +- **Standard Redis database** - A single Redis shard with no + replication or clustering. +- **Highly available Redis database** - Every database master shard + has a replica shard, so that if the master shard fails the + cluster can automatically fail over to the replica with minimal impact. Master and replica shards are always placed on separate + nodes to ensure high availability. +- **Clustered Redis database** - The data stored in the database is + split across several shards. The number of shards can be defined by + the user. Various performance optimization algorithms define where + shards are placed within the cluster. During the lifetime of the + cluster, these algorithms might migrate a shard between nodes. +- **Clustered and highly available Redis database** - Each master shard + in the clustered database has a replica shard, enabling failover if + the master shard fails. + +## Proxy + +Each node includes one zero-latency, multi-threaded proxy +(written in low-level C) that masks the underlying system complexity. The +proxy oversees forwarding Redis operations to the database shards on +behalf of a Redis client. + +The proxy simplifies the cluster operation, from the application or +Redis client point of view, by enabling the use of a standard Redis +client. The zero-latency proxy is built over a cut-through architecture +and employs various optimization methods. For example, to help ensure +high-throughput and low-latency performance, the proxy might use +instruction pipelining even if not instructed to do so by the client. + +## Database endpoint + +Each database is served by a database endpoint that is part of and +managed by the proxies. The endpoint oversees forwarding Redis +operations to specific database shards. + +If the master shard fails and the replica shard is promoted to master, the +master endpoint is updated to point to the new master shard. + +If the master endpoint fails, the replica endpoint is promoted to be the +new master endpoint and is updated to point to the master shard. + +Similarly, if both the master shard and the master endpoint fail, then +both the replica shard and the replica endpoint are promoted to be the new +master shard and master endpoint. + +Shards and their endpoints do not +have to reside within the same node in the cluster. + +In the case of a clustered database with multiple database shards, only +one master endpoint acts as the master endpoint for all master shards, +forwarding Redis operations to all shards as needed. + +## Cluster manager + +The cluster manager oversees all node management-related tasks, and the +cluster manager in the master node looks after all the cluster related +tasks. + +The cluster manager is designed in a way that is totally decoupled from +the Redis operation. This enables RS to react in a much faster and +accurate manner to failure events, so that, for example, a node failure +event triggers mass failover operations of all the master endpoints +and master shards that are hosted on the failed node. + +In addition, this architecture guarantees that each Redis shard is only +dealing with processing Redis commands in a shared-nothing architecture, +thus maintaining the inherent high-throughput and low-latency of each +Redis process. Lastly, this architecture guarantees that any change in +the cluster manager itself does not affect the Redis operation. + +Some of the primary functionalities of the cluster manager include: + +- Deciding where shards are created +- Deciding when shards are migrated and to where +- Monitoring database size +- Monitoring databases and endpoints across all nodes +- Running the database resharding process +- Running the database provisioning and de-provisioning processes +- Gathering operational statistics +- Enforcing license and subscription limitations + diff --git a/content/operate/rs/7.4/references/upgrade-paths.md b/content/operate/rs/7.4/references/upgrade-paths.md new file mode 100644 index 0000000000..2fd4cbb81f --- /dev/null +++ b/content/operate/rs/7.4/references/upgrade-paths.md @@ -0,0 +1,19 @@ +--- +Title: Supported upgrade paths for Redis Software +alwaysopen: false +categories: +- docs +- operate +- rs +description: Supported paths to upgrade a Redis Software cluster. +linkTitle: Upgrade paths +weight: 30 +tocEmbedHeaders: true +url: '/operate/rs/7.4/references/upgrade-paths/' +--- + +{{}} + +For detailed upgrade instructions, see [Upgrade a Redis Enterprise Software cluster]({{}}). + +See the [Redis Enterprise Software product lifecycle]({{}}) for more information about release numbers and the end-of-life schedule. diff --git a/content/operate/rs/7.4/release-notes/_index.md b/content/operate/rs/7.4/release-notes/_index.md new file mode 100644 index 0000000000..0004adaccb --- /dev/null +++ b/content/operate/rs/7.4/release-notes/_index.md @@ -0,0 +1,16 @@ +--- +Title: Release notes +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +hideListLinks: true +weight: 90 +url: '/operate/rs/7.4/release-notes/' +--- + +Here's what changed recently in Redis Enterprise Software: + +{{< table-children columnNames="Version (Release date) ,Major changes,OSS Redis compatibility" columnSources="LinkTitle,Description,compatibleOSSVersion" enableLinks="LinkTitle" >}} diff --git a/content/operate/rs/7.4/release-notes/legacy-release-notes/_index.md b/content/operate/rs/7.4/release-notes/legacy-release-notes/_index.md new file mode 100644 index 0000000000..ee747ab8ea --- /dev/null +++ b/content/operate/rs/7.4/release-notes/legacy-release-notes/_index.md @@ -0,0 +1,16 @@ +--- +Title: Previous releases +alwaysopen: false +categories: +- docs +- operate +- rs +description: Release notes for Redis Enterprise Software 5.6.0 (April 2020) and earlier + versions. +hideListLinks: true +linkTitle: Previous releases +weight: 100 +url: '/operate/rs/7.4/release-notes/legacy-release-notes/' +--- + +{{}} diff --git a/content/operate/rs/7.4/rs-archive.md b/content/operate/rs/7.4/rs-archive.md new file mode 100644 index 0000000000..fe974404fe --- /dev/null +++ b/content/operate/rs/7.4/rs-archive.md @@ -0,0 +1,24 @@ +--- +Title: Archive +alwaysopen: false +categories: +- docs +- operate +- rs +description: Describes where to view the archive of Redis Enterprise Software documentation. +linkTitle: Archive +weight: 99 +url: '/operate/rs/7.4/rs-archive/' +--- + +Previous versions of Redis Enterprise Software documentation are available on the archived web site: + +- [Redis Enterprise Software v7.4 documentation archive](https://docs.redis.com/7.4/rs/)   + +- [Redis Enterprise Software v7.2 documentation archive](https://docs.redis.com/7.2/rs/) + +- [Redis Enterprise Software v6.4 documentation archive](https://docs.redis.com/6.4/rs/) + +- [Redis Enterprise Software v6.2 documentation archive](https://docs.redis.com/6.2/rs/) + +- [Redis Enterprise Software v6.0 documentation archive](https://docs.redis.com/6.0/rs/) diff --git a/content/operate/rs/7.4/security/_index.md b/content/operate/rs/7.4/security/_index.md new file mode 100644 index 0000000000..d9efb4d3ed --- /dev/null +++ b/content/operate/rs/7.4/security/_index.md @@ -0,0 +1,32 @@ +--- +Title: Security +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +hideListLinks: true +weight: 60 +aliases: + - /operate/rs/administering/designing-production/security +url: '/operate/rs/7.4/security/' +--- + +Redis Enterprise Software provides various features to secure your Redis Enterprise Software deployment: + +| Login and passwords | Users and roles | Encryption and TLS | Certificates and audit | +|---------------------|-----------------|--------------------|-----------------------| +| [Password attempts and session timeout]({{}}) | [Cluster and database access explained]({{}}) | [Enable TLS]({{}}) | [Create certificates]({{}}) | +| [Password complexity]({{}}) | [Create users]({{}}) | [Configure TLS protocols]({{}}) | [Monitor certificates]({{}}) | +| [Password expiration]({{}}) | [Create roles]({{}}) | [Configure cipher suites]({{}}) | [Update certificates]({{}}) | +| [Default database access]({{}}) | [Redis ACLs]({{}}) | [Encrypt private keys on disk]({{}}) | [Enable OCSP stapling]({{}}) | +| [Rotate user passwords]({{}}) | [Integrate with LDAP]({{}}) | [Internode encryption]({{}}) | [Audit database connections]({{}}) | + +## Recommended security practices + +See [Recommended security practices]({{}}) to learn how to protect Redis Enterprise Software. + +## Redis Trust Center + +Visit our [Trust Center](https://trust.redis.io/) to learn more about Redis security policies. If you find a suspected security bug, you can [submit a report](https://hackerone.com/redis-vdp?type=team). diff --git a/content/operate/rs/7.4/security/access-control/_index.md b/content/operate/rs/7.4/security/access-control/_index.md new file mode 100644 index 0000000000..42617ac0c8 --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/_index.md @@ -0,0 +1,54 @@ +--- +Title: Access control +alwaysopen: false +categories: +- docs +- operate +- rs +description: An overview of access control in Redis Enterprise Software. +hideListLinks: false +linkTitle: Access control +weight: 10 +aliases: + - /operate/rs/security/access-control/rbac/ + - /operate/rs/security/access-control/rbac/create-roles/ +url: '/operate/rs/7.4/security/access-control/' +--- + +Redis Enterprise Software lets you use role-based access control (RBAC) to manage users' access privileges. RBAC requires you to do the following: + +1. Create roles and define each role's access privileges. + +1. Create users and assign roles to them. The assigned role determines the user's access privileges. + +## Cluster access versus database access + +Redis Enterprise allows two separate paths of access: + +- **Cluster access** allows performing management-related actions, such as creating databases and viewing statistics. + +- **Database access** allows performing data-related actions, like reading and writing data in a database. + +You can grant cluster access, database access, or both to each role. These roles let you differentiate between users who can access databases and users who can access cluster management, according to your organization's security needs. + +The following diagram shows three different options for roles and users: + +{{Role-based access control diagram.}} + +- Role A was created with permission to access the cluster and perform management-related actions. Because user A was assigned role A, they can access the cluster but cannot access databases. + +- Role B was created with permission to access one or more databases and perform data-related actions. Because user B was assigned role B, they cannot access the cluster but can access databases. + +- Role C was created with cluster access and database access permissions. Because user C was assigned role C, they can access the cluster and databases. + +## Default database access + +When you create a database, [default user access]({{< relref "/operate/rs/security/access-control/manage-users/default-user" >}}) is enabled automatically. + +If you set up role-based access controls for your database and don't require compatibility with versions earlier than Redis 6, you can [deactivate the default user]({{< relref "/operate/rs/security/access-control/manage-users/default-user" >}}). + +{{}} +Before you [deactivate default user access]({{< relref "/operate/rs/security/access-control/manage-users/default-user#deactivate-default-user" >}}), make sure the role associated with the database is [assigned to a user]({{< relref "/operate/rs/security/access-control/create-users#assign-roles-to-users" >}}). Otherwise, the database will be inaccessible. +{{}} + +## More info diff --git a/content/operate/rs/7.4/security/access-control/create-cluster-roles.md b/content/operate/rs/7.4/security/access-control/create-cluster-roles.md new file mode 100644 index 0000000000..ded25a719e --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/create-cluster-roles.md @@ -0,0 +1,73 @@ +--- +Title: Create roles with cluster access only +alwaysopen: false +categories: +- docs +- operate +- rs +description: Create roles with cluster access only. +linkTitle: Create roles with cluster access only +weight: 14 +aliases: + - /operate/rs/security/access-control/admin-console-access/ +url: '/operate/rs/7.4/security/access-control/create-cluster-roles/' +--- + +Roles with cluster access allow access to the Cluster Management UI and REST API. + +## Default management roles + +Redis Enterprise Software includes five predefined roles that determine a user's level of access to the Cluster Manager UI and [REST API]({{}}). + +1. **DB Viewer** - Read database settings +1. **DB Member** - Administer databases +1. **Cluster Viewer** - Read cluster settings +1. **Cluster Member** - Administer the cluster +1. **Admin** - Full cluster access +1. **None** - For data access only - cannot access the Cluster Manager UI or use the REST API + +For more details about the privileges granted by each of these roles, see [Cluster Manager UI permissions](#cluster-manager-ui-permissions) or [REST API permissions]({{}}). + +## Cluster Manager UI permissions + +Here's a summary of the Cluster Manager UI actions permitted by each default management role: + +| Action | DB Viewer | DB Member | Cluster Viewer | Cluster Member | Admin | +|--------|:---------:|:---------:|:--------------:|:-----------:|:------:| +| Create support package | ❌ No | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | +| Edit database configuration | ❌ No | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | +| Reset slow log | ❌ No | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | +| View cluster configuration | ❌ No | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | +| View cluster logs | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes
| +| View cluster metrics | ❌ No | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | +| View database configuration | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | +| View database metrics | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | +| View node configuration | ❌ No | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | +| View node metrics | ❌ No | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | +| View Redis database password | ❌ No | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | +| View slow log | ❌ No | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | +| View and edit cluster settings |❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes | + +## Create roles for cluster access {#create-cluster-role} + +To create a role that grants cluster access but does not grant access to any databases: + +1. From **Access Control** > **Roles**, you can: + + - Point to a role and select {{< image filename="/images/rs/buttons/edit-button.png#no-click" alt="The Edit button" width="25px" class="inline" >}} to edit an existing role. + + - Select **+ Add role** to create a new role. + + {{Add role with name}} + +1. Enter a descriptive name for the role. + +1. Choose a **Cluster management role** to determine cluster management permissions. + + {{Select a cluster management role to set the level of cluster management permissions for the new role.}} + +1. To prevent database access when using this role, do not add any ACLs. + +1. Select **Save**. + +You can [assign the new role to users]({{}}) to grant cluster access. diff --git a/content/operate/rs/7.4/security/access-control/create-combined-roles.md b/content/operate/rs/7.4/security/access-control/create-combined-roles.md new file mode 100644 index 0000000000..c81f5d1df0 --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/create-combined-roles.md @@ -0,0 +1,76 @@ +--- +Title: Create roles with combined access +alwaysopen: false +categories: +- docs +- operate +- rs +description: Create roles with both cluster and database access. +linkTitle: Create roles with combined access +weight: 16 +url: '/operate/rs/7.4/security/access-control/create-combined-roles/' +--- + +To create a role that grants database access privileges and allows access to the Cluster Management UI and REST API: + +1. [Define Redis ACLs](#define-redis-acls) that determine database access privileges. + +1. [Create a role with ACLs](#create-role) added and choose a **Cluster management role** other than **None**. + +## Define Redis ACLs + +To define a Redis ACL rule that you can assign to a role: + +1. From **Access Control > Redis ACLs**, you can either: + + - Point to a Redis ACL and select {{< image filename="/images/rs/buttons/edit-button.png#no-click" alt="The Edit button" width="25px" class="inline" >}} to edit an existing Redis ACL. + + - Select **+ Add Redis ACL** to create a new Redis ACL. + +1. Enter a descriptive name for the Redis ACL. This will be used to associate the ACL rule with the role. + +1. Define the ACL rule. For more information about Redis ACL rules and syntax, see the [Redis ACL overview]({{}}). + + {{}} +The **ACL builder** does not support selectors and key permissions. Use **Free text command** to manually define them instead. + {{}} + +1. Select **Save**. + +{{}} +For multi-key commands on multi-slot keys, the return value is `failure`, but the command runs on the keys that are allowed. +{{}} + +## Create roles with ACLs and cluster access {#create-role} + +To create a role that grants database access privileges and allows access to the Cluster Management UI and REST API: + +1. From **Access Control** > **Roles**, you can: + + - Point to a role and select {{< image filename="/images/rs/buttons/edit-button.png#no-click" alt="The Edit button" width="25px" class="inline" >}} to edit an existing role. + + - Select **+ Add role** to create a new role. + + {{Add role with name}} + +1. Enter a descriptive name for the role. This will be used to reference the role when configuring users. + +1. Choose a **Cluster management role** other than **None**. For details about permissions granted by each role, see [Cluster Manager UI permissions]({{}}) and [REST API permissions]({{}}). + + {{Add role with name}} + +1. Select **+ Add ACL**. + + {{Add role database acl}} + +1. Choose a Redis ACL and databases to associate with the role. + + {{Add databases to access}} + +1. Select the check mark {{< image filename="/images/rs/buttons/checkmark-button.png#no-click" alt="The Check button" width="25px" class="inline" >}} to confirm. + +1. Select **Save**. + + {{Add databases to access}} + +You can [assign the new role to users]({{}}) to grant database access and access to the Cluster Manager UI and REST API. diff --git a/content/operate/rs/7.4/security/access-control/create-db-roles.md b/content/operate/rs/7.4/security/access-control/create-db-roles.md new file mode 100644 index 0000000000..bbd65e9c42 --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/create-db-roles.md @@ -0,0 +1,82 @@ +--- +Title: Create roles with database access only +alwaysopen: false +categories: +- docs +- operate +- rs +description: Create roles with database access only. +linkTitle: Create roles with database access only +weight: 15 +aliases: + - /operate/rs/security/access-control/database-access/ +url: '/operate/rs/7.4/security/access-control/create-db-roles/' +--- + +Roles with database access grant the ability to access and interact with a database's data. Database access privileges are determined by defining [Redis ACLs]({{}}) and adding them to roles. + +To create a role that grants database access without granting access to the Redis Enterprise Cluster Manager UI and REST API: + +1. [Define Redis ACLs](#define-redis-acls) that determine database access privileges. + +1. [Create a role with ACLs](#create-roles-with-acls) added and leave the **Cluster management role** as **None**. + +## Define Redis ACLs + +To define a Redis ACL rule that you can assign to a role: + +1. From **Access Control > Redis ACLs**, you can either: + + - Point to a Redis ACL and select {{< image filename="/images/rs/buttons/edit-button.png#no-click" alt="The Edit button" width="25px" class="inline" >}} to edit an existing Redis ACL. + + - Select **+ Add Redis ACL** to create a new Redis ACL. + +1. Enter a descriptive name for the Redis ACL. This will be used to associate the ACL rule with the role. + +1. Define the ACL rule. For more information about Redis ACL rules and syntax, see the [Redis ACL overview]({{}}). + + {{}} +The **ACL builder** does not support selectors and key permissions. Use **Free text command** to manually define them instead. + {{}} + +1. Select **Save**. + +{{}} +For multi-key commands on multi-slot keys, the return value is `failure`, but the command runs on the keys that are allowed. +{{}} + +## Create roles with ACLs + +To create a role that grants database access to users but blocks access to the Redis Enterprise Cluster Manager UI and REST API, set the **Cluster management role** to **None**. + +To define a role for database access: + +1. From **Access Control** > **Roles**, you can: + + - Point to a role and select {{< image filename="/images/rs/buttons/edit-button.png#no-click" alt="The Edit button" width="25px" class="inline" >}} to edit an existing role. + + - Select **+ Add role** to create a new role. + + {{Add role with name}} + +1. Enter a descriptive name for the role. This will be used to reference the role when configuring users. + +1. Leave **Cluster management role** as the default **None**. + + {{Add role with name}} + +1. Select **+ Add ACL**. + + {{Add role database acl}} + +1. Choose a Redis ACL and databases to associate with the role. + + {{Add databases to access}} + +1. Select the check mark {{< image filename="/images/rs/buttons/checkmark-button.png#no-click" alt="The Check button" width="25px" class="inline" >}} to confirm. + +1. Select **Save**. + + {{Add databases to access}} + +You can [assign the new role to users]({{}}) to grant database access. diff --git a/content/operate/rs/7.4/security/access-control/create-users.md b/content/operate/rs/7.4/security/access-control/create-users.md new file mode 100644 index 0000000000..31313989c7 --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/create-users.md @@ -0,0 +1,73 @@ +--- +Title: Create users +alwaysopen: false +categories: +- docs +- operate +- rs +description: Create users and assign access control roles. +linkTitle: Create users +weight: 10 +aliases: + - /operate/rs/security/access-control/manage-users/add-users/ + - /operate/rs/security/access-control/rbac/assign-user-role/ +url: '/operate/rs/7.4/security/access-control/create-users/' +--- + +## Prerequisites + +Before you create other users: + +1. Review the [access control overview]({{}}) to learn how to use role-based access control (RBAC) to manage users' cluster access and database access. + +1. Create roles you can assign to users. See [Create roles with cluster access only]({{}}), [Create roles with database access only]({{}}), or [Create roles with combined access]({{}}) for instructions. + +## Add users + +To add a user to the cluster: + +1. From the **Access Control > Users** tab in the Cluster Manager UI, select **+ Add user**. + + {{Add role with name}} + +1. Enter the name, email, and password of the new user. + + {{Add role with name}} + +1. Assign a **Role** to the user to grant permissions for cluster management and data access. + + {{Add role to user.}} + +1. Select the **Alerts** the user should receive by email: + + - **Receive alerts for databases** - The alerts that are enabled for the selected databases will be sent to the user. Choose **All databases** or **Customize** to select the individual databases to send alerts for. + + - **Receive cluster alerts** - The alerts that are enabled for the cluster in **Cluster > Alerts Settings** are sent to the user. + +1. Select **Save**. + +## Assign roles to users + +Assign a role, associated with specific databases and access control lists (ACLs), to a user to grant database access: + +1. From the **Access Control > Users** tab in the Cluster Manager UI, you can: + + - Point to an existing user and select {{< image filename="/images/rs/buttons/edit-button.png#no-click" alt="The Edit button" width="25px" class="inline" >}} to edit the user. + + - Select **+ Add user** to [create a new user]({{< relref "/operate/rs/security/access-control/create-users" >}}). + +1. Select a role to assign to the user. + + {{Add role to user.}} + +1. Select **Save**. + +## Next steps + +Depending on the type of the user's assigned role (cluster management role or data access role), the user can now: + +- [Connect to a database]({{< relref "/operate/rs/databases/connect" >}}) associated with the role and run limited Redis commands, depending on the role's Redis ACLs. + +- Sign in to the Redis Enterprise Software Cluster Manager UI. + +- Make a [REST API]({{< relref "/operate/rs/references/rest-api" >}}) request. diff --git a/content/operate/rs/7.4/security/access-control/ldap/_index.md b/content/operate/rs/7.4/security/access-control/ldap/_index.md new file mode 100644 index 0000000000..d99dda07f3 --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/ldap/_index.md @@ -0,0 +1,82 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: Describes how Redis Enterprise Software integrates LDAP authentication + and authorization. Also describes how to enable LDAP for your deployment of Redis + Enterprise Software. +hideListLinks: true +linkTitle: LDAP authentication +title: LDAP authentication +weight: 50 +url: '/operate/rs/7.4/security/access-control/ldap/' +--- + +Redis Enterprise Software supports [Lightweight Directory Access Protocol](https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol) (LDAP) authentication and authorization through its [role-based access controls]({{< relref "/operate/rs/security/access-control" >}}) (RBAC). You can use LDAP to authorize access to the Cluster Manager UI and to control database access. + +You can configure LDAP roles using the Redis Enterprise Cluster Manager UI or [REST API]({{< relref "/operate/rs/references/rest-api/requests/ldap_mappings/" >}}). + +## How it works + +Here's how role-based LDAP integration works: + +{{LDAP overview}} + +1. A user signs in with their LDAP credentials. + + Based on the LDAP configuration details, the username is mapped to an LDAP Distinguished Name. + +1. A simple [LDAP bind request](https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol#Bind_(authenticate)) is attempted using the Distinguished Name and the password. The sign-in fails if the bind fails. + +1. Obtain the user’s LDAP group memberships. + + Using configured LDAP details, obtain a list of the user’s group memberships. + +1. Compare the user’s LDAP group memberships to those mapped to local roles. + +1. Determine if one of the user's groups is authorized to access the target resource. If so, the user is granted the level of access authorized to the role. + +To access the Cluster Manager UI, the user needs to belong to an LDAP group mapped to an administrative role. + +For database access, the user needs to belong to an LDAP group mapped to a role listed in the database’s access control list (ACL). The rights granted to the group determine the user's level of access. + +## Prerequisites + +Before you enable LDAP in Redis Enterprise, you need: + +1. The following LDAP details: + + - Server URI, including host, port, and protocol details. + - Certificate details for secure protocols. + - Bind credentials, including Distinguished Name, password, and (optionally) client public and private keys for certificate authentication. + - Authentication query details, whether template or query. + - Authorization query details, whether attribute or query. + - The Distinguished Names of LDAP groups you’ll use to authorize access to Redis Enterprise resources. + +1. The LDAP groups that correspond to the levels of access you wish to authorize. Each LDAP group will be mapped to a Redis Enterprise access control role. + +1. A Redis Enterprise access control role for each LDAP group. Before you enable LDAP, you need to set up [role-based access controls]({{< relref "/operate/rs/security/access-control" >}}) (RBAC). + +## Enable LDAP + +To enable LDAP: + +1. From **Access Control > LDAP** in the Cluster Manager UI, select the **Configuration** tab and [enable LDAP access]({{< relref "/operate/rs/security/access-control/ldap/enable-role-based-ldap" >}}). + + {{Enable LDAP Panel}} + +2. Map LDAP groups to [access control roles]({{< relref "/operate/rs/security/access-control/ldap/map-ldap-groups-to-roles" >}}). + +3. Update database access control lists (ACLs) to [authorize role access]({{< relref "/operate/rs/security/access-control/ldap/update-database-acls" >}}). + +If you already have appropriate roles, you can update them to include LDAP groups. + +## More info + +- Enable and configure [role-based LDAP]({{< relref "/operate/rs/security/access-control/ldap/enable-role-based-ldap" >}}) +- Map LDAP groups to [access control roles]({{< relref "/operate/rs/security/access-control/ldap/map-ldap-groups-to-roles" >}}) +- Update database ACLs to [authorize LDAP access]({{< relref "/operate/rs/security/access-control/ldap/update-database-acls" >}}) +- Learn more about Redis Enterprise Software [security and practices]({{< relref "/operate/rs/security/" >}}) + diff --git a/content/operate/rs/7.4/security/access-control/ldap/enable-role-based-ldap.md b/content/operate/rs/7.4/security/access-control/ldap/enable-role-based-ldap.md new file mode 100644 index 0000000000..1b64a84f78 --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/ldap/enable-role-based-ldap.md @@ -0,0 +1,99 @@ +--- +Title: Enable role-based LDAP +alwaysopen: false +categories: +- docs +- operate +- rs +description: Describes how to enable role-based LDAP authentication and authorization + using the Cluster Manager UI. +weight: 25 +url: '/operate/rs/7.4/security/access-control/ldap/enable-role-based-ldap/' +--- + +Redis Enterprise Software uses a role-based mechanism to enable LDAP authentication and authorization. + +When a user attempts to access Redis Enterprise resources using LDAP credentials, the credentials are passed to the LDAP server in a bind request. If the request succeeds, the user’s groups are searched for a group that authorizes access to the original resource. + +Role-based LDAP lets you authorize cluster management users (previously known as _external users_) and database users. As with any access control role, you can define the level of access authorized by the role. + +## Set up LDAP connection + +To configure and enable LDAP from the Cluster Manager UI: + +1. Go to **Access Control > LDAP > Configuration**. + +1. Select **+ Create**. + +1. In **Set LDAP**, configure [LDAP server settings](#ldap-server-settings), [bind credentials](#bind-credentials), [authentication query](#authentication-query), and [authorization query](#authorization-query). + + {{The LDAP configuration screen in the Cluster Manager UI}} + +1. Select **Save & Enable**. + +### LDAP server settings + +The **LDAP server** settings define the communication settings used for LDAP authentication and authorization. These include: + +| _Setting_ | _Description_ | +|:----------|:--------------| +| **Protocol type** | Underlying communication protocol; must be _LDAP_, _LDAPS_, or _STARTTLS_ | +| **Host** | URL of the LDAP server | +| **Port** | LDAP server port number | +| **Trusted CA certificate** | _(LDAPS or STARTTLS protocols only)_ Certificate for the trusted certificate authority (CA) | + +When defining multiple LDAP hosts, the organization tree structure must be identical for all hosts. + +### Bind credentials + +These settings define the credentials for the bind query: + +| _Setting_ | _Description_ | +|:----------|:--------------| +| **Distinguished Name** | Example: `cd=admin,dc=example,dc=org` | +| **Password** | Example: `admin1` | +| **Client certificate authentication** |_(LDAPS or STARTTLS protocols only)_ Place checkmark to enable | +| **Client public key** | _(LDAPS or STARTTLS protocols only)_ The client public key for authentication | +| **Client private key** | _(LDAPS or STARTTLS protocols only)_ The client private key for authentication | + +### Authentication query + +These settings define the authentication query: + +| _Setting_ | _Description_ | +|:----------|:--------------| +| **Search user by** | Either _Template_ or _Query_ | +| **Template** | _(template search)_ Example: `cn=%u,ou=dev,dc=example,dc=com` | +| **Base** | _(query search)_ Example: `ou=dev,dc=example,dc=com` | +| **Filter** | _(query search)_ Example: `(cn=%u)` | +| **Scope** | _(query search)_ Must be _baseObject_, _singleLevel_, or _wholeSubtree_ | + +In this example, `%u` is replaced by the username attempting to access the Redis Enterprise resource. + +### Authorization query + +These settings define the group authorization query: + +| _Setting_ | _Description_ | +|:----------|:--------------| +| **Search groups by** | Either _Attribute_ or _Query_ | +| **Attribute** | _(attribute search)_ Example: `memberOf` (case-sensitive) | +| **Base** | _(query search)_ Example: `ou=groups,dc=example,dc=com` | +| **Filter** | _(query search)_ Example: `(members=%D)` | +| **Scope** | _(query search)_ Must be _baseObject_, _singleLevel_, or _wholeSubtree_ | + +In this example, `%D` is replaced by the Distinguished Name of the user attempting to access the Redis Enterprise resource. + +### Authentication timeout + +The **Authentication timeout** setting determines the connection timeout to the LDAP server during user authentication. + +By default, the timeout is 5 seconds, which is recommended for most cases. + +However, if you enable multi-factor authentication (MFA) for your LDAP server, you might need to increase the timeout to provide enough time for MFA verification. You can set it to any integer in the range of 5-60 seconds. + +## More info + +- Map LDAP groups to [access control roles]({{< relref "/operate/rs/security/access-control/ldap/map-ldap-groups-to-roles" >}}) +- Update database ACLs to [authorize LDAP access]({{< relref "/operate/rs/security/access-control/ldap/update-database-acls" >}}) +- Learn more about Redis Software [security and practices]({{< relref "/operate/rs/security/" >}}) diff --git a/content/operate/rs/7.4/security/access-control/ldap/map-ldap-groups-to-roles.md b/content/operate/rs/7.4/security/access-control/ldap/map-ldap-groups-to-roles.md new file mode 100644 index 0000000000..9e364859e1 --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/ldap/map-ldap-groups-to-roles.md @@ -0,0 +1,58 @@ +--- +Title: Map LDAP groups to roles +alwaysopen: false +categories: +- docs +- operate +- rs +description: Describes how to map LDAP authorization groups to Redis Enterprise roles + using the Cluster Manager UI. +weight: 35 +url: '/operate/rs/7.4/security/access-control/ldap/map-ldap-groups-to-roles/' +--- + +Redis Enterprise Software uses a role-based mechanism to enable LDAP authentication and authorization. + +Once LDAP is enabled, you need to map LDAP groups to Redis Enterprise access control roles. + +## Map LDAP groups to roles + +To map LDAP groups to access control roles in the Cluster Manager UI: + +1. Select **Access Control > LDAP > Mapping**. + + {{}} +You can map LDAP roles when LDAP configuration is not enabled, but they won't have any effect until you [configure and enable LDAP]({{< relref "/operate/rs/security/access-control/ldap/enable-role-based-ldap" >}}). + {{}} + + {{Enable LDAP mappings Panel}} + +1. Select the **+ Add LDAP Mapping** button to create a new mapping and then enter the following details: + + | _Setting_ | _Description_ | +|:----------|:--------------| +| **Name** | A descriptive, unique name for the mapping | +| **Distinguished Name** | The distinguished name of the LDAP group to be mapped.
Example: `cn=admins,ou=groups,dc=example,dc=com` | +| **Role** | The Redis Software access control role defined for this group | +| **Email** | _(Optional)_ An address to receive alerts| +| **Alerts** | Selections identifying the desired alerts. | + + {{Enable LDAP mappings Panel}} + +1. When finished, select the **Save** button. + +Create a mapping for each LDAP group used to authenticate and/or authorize access to Redis Enterprise Software resources. + +The scope of the authorization depends on the access control role: + +- If the role authorizes admin management, LDAP users are authorized as cluster management administrators. + +- If the role authorizes database access, LDAP users are authorized to use the database to the limits specified in the role. + +- To authorize LDAP users to specific databases, update the database access control lists (ACLs) to include the mapped LDAP role. + +## More info + +- Enable and configure [role-based LDAP]({{< relref "/operate/rs/security/access-control/ldap/enable-role-based-ldap" >}}) +- Update database ACLs to [authorize LDAP access]({{< relref "/operate/rs/security/access-control/ldap/update-database-acls" >}}) +- Learn more about Redis Enterprise Software [security and practices]({{< relref "/operate/rs/security/" >}}) diff --git a/content/operate/rs/7.4/security/access-control/ldap/migrate-to-role-based-ldap.md b/content/operate/rs/7.4/security/access-control/ldap/migrate-to-role-based-ldap.md new file mode 100644 index 0000000000..ad0a7638e6 --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/ldap/migrate-to-role-based-ldap.md @@ -0,0 +1,75 @@ +--- +Title: Migrate to role-based LDAP +alwaysopen: false +categories: +- docs +- operate +- rs +description: Describes how to migrate existing cluster-based LDAP deployments to role-based + LDAP. +weight: 55 +url: '/operate/rs/7.4/security/access-control/ldap/migrate-to-role-based-ldap/' +--- + +Redis Enterprise Software supports LDAP through a [role-based mechanism]({{< relref "/operate/rs/security/access-control/ldap/" >}}), first introduced [in v6.0.20]({{< relref "/operate/rs/release-notes/rs-6-0-20-april-2021" >}}). + +Earlier versions of Redis Enterprise Software supported a cluster-based mechanism; however, that mechanism was removed in v6.2.12. + +If you're using the cluster-based mechanism to enable LDAP authentication, you need to migrate to the role-based mechanism before upgrading to Redis Enterprise Software v6.2.12 or later. + +## Migration checklist + +This checklist covers the basic process: + +1. Identify accounts per app on the customer end. + +1. Create or identify an LDAP user account on the server that is responsible for LDAP authentication and authorization. + +1. Create or identify an LDAP group that contains the app team members. + +1. Verify or configure the Redis Enterprise ACLs. + +1. Configure each database ACL. + +1. Remove the earlier "external" (LDAP) users from Redis Enterprise. + +1. _(Recommended)_ Update cluster configuration to replace the cluster-based configuration file. + + You can use `rladmin` to update the cluster configuration: + + ``` bash + $ touch /tmp/saslauthd_empty.conf + $ rladmin cluster config saslauthd_ldap_conf \ + /tmp/saslauthd_empty.conf + ``` + + Here, a blank file replaces the earlier configuration. + +1. Use **Access Control > LDAP > Configuration** to enable role-based LDAP. + +1. Map your LDAP groups to access control roles. + +1. Test application connectivity using the LDAP credentials of an app team member. + +1. _(Recommended)_ Turn off default access for the database to avoid anonymous client connections. + + Because deployments and requirements vary, you’ll likely need to adjust these guidelines. + +## Test LDAP access + +To test your LDAP integration, you can: + +- Connect with `redis-cli` and use the [`AUTH` command]({{< relref "/commands/auth" >}}) to test LDAP username/password credentials. + +- Sign in to the Cluster Manager UI using LDAP credentials authorized for admin access. + +- Use [Redis Insight]({{< relref "/develop/connect/insight/" >}}) to access a database using authorized LDAP credentials. + +- Use the [REST API]({{< relref "/operate/rs/references/rest-api" >}}) to connect using authorized LDAP credentials. + +## More info + +- Enable and configure [role-based LDAP]({{< relref "/operate/rs/security/access-control/ldap/enable-role-based-ldap" >}}) +- Map LDAP groups to [access control roles]({{< relref "/operate/rs/security/access-control/ldap/map-ldap-groups-to-roles" >}}) +- Update database ACLs to [authorize LDAP access]({{< relref "/operate/rs/security/access-control/ldap/update-database-acls" >}}) +- Learn more about Redis Enterprise Software [security and practices]({{< relref "/operate/rs/security/" >}}) diff --git a/content/operate/rs/7.4/security/access-control/ldap/update-database-acls.md b/content/operate/rs/7.4/security/access-control/ldap/update-database-acls.md new file mode 100644 index 0000000000..a9bc3a2e61 --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/ldap/update-database-acls.md @@ -0,0 +1,37 @@ +--- +Title: Update database ACLs +alwaysopen: false +categories: +- docs +- operate +- rs +description: Describes how to use the Cluster Manager UI to update database access + control lists (ACLs) to authorize access to roles authorizing LDAP user access. +weight: 45 +url: '/operate/rs/7.4/security/access-control/ldap/update-database-acls/' +--- + +To grant LDAP users access to a database, assign the mapped access role to the access control list (ACL) for the database. + +1. In the Cluster Manager UI, go to **Databases**, then select the database from the list. + +1. From the **Security** tab, select the **Edit** button. + +1. In the **Access Control List** section, select **+ Add ACL**. + + {{Updating a database access control list (ACL)}} + +1. Select the appropriate roles and then save your changes. + +If you assign multiple roles to an ACL and a user is authorized by more than one of these roles, their access is determined by the first “matching” rule in the list. + +If the first rule gives them read access and the third rule authorizes write access, the user will only be able to read data. + +As a result, we recommend ordering roles so that higher access roles appear before roles with more limited access. + + +## More info + +- Enable and configure [role-based LDAP]({{< relref "/operate/rs/security/access-control/ldap/enable-role-based-ldap.md" >}}) +- Map LDAP groups to [access control roles]({{< relref "/operate/rs/security/access-control/ldap/map-ldap-groups-to-roles.md" >}}) +- Learn more about Redis Enterprise Software [security and practices]({{< relref "/operate/rs/security/" >}}) diff --git a/content/operate/rs/7.4/security/access-control/manage-passwords/_index.md b/content/operate/rs/7.4/security/access-control/manage-passwords/_index.md new file mode 100644 index 0000000000..a15bd966a4 --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/manage-passwords/_index.md @@ -0,0 +1,30 @@ +--- +Title: Set password policies +alwaysopen: false +categories: +- docs +- operate +- rs +description: Set password policies. +hideListLinks: true +linkTitle: Set password policies +toc: 'true' +weight: 30 +url: '/operate/rs/7.4/security/access-control/manage-passwords/' +--- + +Redis Enterprise Software provides several ways to manage the passwords of local accounts, including: + +- [Password complexity rules]({{< relref "/operate/rs/security/access-control/manage-passwords/password-complexity-rules" >}}) + +- [Password expiration]({{< relref "/operate/rs/security/access-control/manage-passwords/password-expiration" >}}) + +- [Password rotation]({{< relref "/operate/rs/security/access-control/manage-passwords/rotate-passwords" >}}) + +You can also manage a user's ability to [sign in]({{< relref "/operate/rs/security/access-control/manage-users/login-lockout#user-login-lockout" >}}) and control [session timeout]({{< relref "/operate/rs/security/access-control/manage-users/login-lockout#session-timeout" >}}). + +To enforce more advanced password policies, we recommend using [LDAP integration]({{< relref "/operate/rs/security/access-control/ldap" >}}) with an external identity provider, such as Active Directory. + +{{}} +Redis Enterprise Software stores all user passwords using the SHA-256 cryptographic hash function. +{{}} diff --git a/content/operate/rs/7.4/security/access-control/manage-passwords/active-active-admin-credentials.md b/content/operate/rs/7.4/security/access-control/manage-passwords/active-active-admin-credentials.md new file mode 100644 index 0000000000..6e5b74e0c9 --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/manage-passwords/active-active-admin-credentials.md @@ -0,0 +1,24 @@ +--- +Title: Update admin credentials for Active-Active databases +alwaysopen: false +categories: +- docs +- operate +- rs +description: Update admin credentials for Active-Active databases. +linkTitle: Update Active-Active admin credentials +weight: 90 +url: '/operate/rs/7.4/security/access-control/manage-passwords/active-active-admin-credentials/' +--- + +Active-Active databases use administrator credentials to manage operations. + +To update the administrator user password on a cluster with Active-Active databases: + +1. From the user management page, update the administrator user password on the clusters you want to update. + +1. For each participating cluster _and_ each Active-Active database, update the admin user credentials to match the changes in step 1. + +{{}} +Do not perform any management operations on the databases until these steps are complete. +{{}} diff --git a/content/operate/rs/7.4/security/access-control/manage-passwords/password-complexity-rules.md b/content/operate/rs/7.4/security/access-control/manage-passwords/password-complexity-rules.md new file mode 100644 index 0000000000..28cc995b50 --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/manage-passwords/password-complexity-rules.md @@ -0,0 +1,65 @@ +--- +Title: Enable password complexity rules +alwaysopen: false +categories: +- docs +- operate +- rs +description: Enable password complexity rules. +linkTitle: Password complexity rules +toc: 'true' +weight: 30 +url: '/operate/rs/7.4/security/access-control/manage-passwords/password-complexity-rules/' +--- + +Redis Enterprise Software provides optional password complexity rules that meet common requirements. When enabled, these rules require the password to have: + +- At least 8 characters +- At least one uppercase character +- At least one lowercase character +- At least one number +- At least one special character + +These requirements reflect v6.2.12 and later. Earlier versions did not support numbers or special characters as the first or the last character of a password. This restriction was removed in v6.2.12. + +In addition, the password: + +- Cannot contain the user's email address or the reverse of the email address. +- Cannot have more than three repeating characters. + +Password complexity rules apply when a new user account is created and when the password is changed. Password complexity rules are not applied to accounts authenticated by an external identity provider. + +You can use the Cluster Manager UI or the REST API to enable password complexity rules. + +## Enable using the Cluster Manager UI + +To enable password complexity rules using the Cluster Manager UI: + +1. Go to **Cluster > Security > Preferences**, then select **Edit**. + +1. In the **Password** section, turn on **Complexity rules**. + +1. Select **Save**. + +## Enable using the REST API + +To use the REST API to enable password complexity rules: + +``` REST +PUT https://[host][:port]/v1/cluster +{"password_complexity":true} +``` + +## Deactivate password complexity rules + +To deactivate password complexity rules: + +- Use the Cluster Manager UI: + + 1. Go to **Cluster > Security > Preferences**, then select **Edit**. + + 1. In the **Password** section, turn off **Complexity rules**. + + 1. Select **Save**. + +- Use the `cluster` REST API endpoint to set `password_complexity` to `false` diff --git a/content/operate/rs/7.4/security/access-control/manage-passwords/password-expiration.md b/content/operate/rs/7.4/security/access-control/manage-passwords/password-expiration.md new file mode 100644 index 0000000000..58c399d4fc --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/manage-passwords/password-expiration.md @@ -0,0 +1,49 @@ +--- +Title: Configure password expiration +alwaysopen: false +categories: +- docs +- operate +- rs +description: Configure password expiration to enforce expiration of a user's password + after a specified number of days. +linkTitle: Password expiration +toc: 'true' +weight: 50 +url: '/operate/rs/7.4/security/access-control/manage-passwords/password-expiration/' +--- + +## Enable password expiration + +To enforce an expiration of a user's password after a specified number of days: + +- Use the Cluster Manager UI: + + 1. Go to **Cluster > Security > Preferences**, then select **Edit**. + + 1. In the **Password** section, turn on **Expiration**. + + 1. Enter the number of days before passwords expire. + + 1. Select **Save**. + +- Use the `cluster` endpoint of the REST API + + ``` REST + PUT https://[host][:port]/v1/cluster + {"password_expiration_duration":} + ``` + +## Deactivate password expiration + +To deactivate password expiration: + +- Use the Cluster Manager UI: + + 1. Go to **Cluster > Security > Preferences**, then select **Edit**. + + 1. In the **Password** section, turn off **Expiration**. + + 1. Select **Save**. + +- Use the `cluster` REST API endpoint to set `password_expiration_duration` to `0` (zero). diff --git a/content/operate/rs/7.4/security/access-control/manage-passwords/rotate-passwords.md b/content/operate/rs/7.4/security/access-control/manage-passwords/rotate-passwords.md new file mode 100644 index 0000000000..fb1d747299 --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/manage-passwords/rotate-passwords.md @@ -0,0 +1,82 @@ +--- +Title: Rotate passwords +alwaysopen: false +categories: +- docs +- operate +- rs +description: Rotate user passwords. +linkTitle: Rotate passwords +toc: 'true' +weight: 70 +url: '/operate/rs/7.4/security/access-control/manage-passwords/rotate-passwords/' +--- + +Redis Enterprise Software lets you implement password rotation policies using the [REST API]({{< relref "/operate/rs/references/rest-api" >}}). + +You can add a new password for a database user without immediately invalidating the old one (which might cause authentication errors in production). + +{{< note >}} +Password rotation does not work for the default user. [Add additional users]({{< relref "/operate/rs/security/access-control/create-users" >}}) to enable password rotation. +{{< /note >}} + +## Password rotation policies + +For user access to the Redis Enterprise Software Cluster Manager UI, +you can set a [password expiration policy]({{< relref "/operate/rs/security/access-control/manage-passwords/password-expiration" >}}) to prompt the user to change their password. + +However, for database connections that rely on password authentication, +you need to allow for authentication with the existing password while you roll out the new password to your systems. + +With the Redis Enterprise Software REST API, you can add additional passwords to a user account for authentication to the database or the Cluster Manager UI and API. + +After the old password is replaced in the database connections, you can delete the old password to finish the password rotation process. + +{{< warning >}} +Multiple passwords are only supported using the REST API. +If you reset the password for a user in the Cluster Manager UI, +the new password replaces all other passwords for that user. +{{< /warning >}} + +The new password cannot already exist as a password for the user and must meet the [password complexity]({{< relref "/operate/rs/security/access-control/manage-passwords/password-complexity-rules" >}}) requirements, if enabled. + +## Rotate password + +To rotate the password of a user account: + +1. Add an additional password to a user account with [`POST /v1/users/password`]({{< relref "/operate/rs/references/rest-api/requests/users/password#add-password" >}}): + + ```sh + POST https://[host][:port]/v1/users/password + '{"username":"", "old_password":"", "new_password":""}' + ``` + + After you send this request, you can authenticate with both the old and the new password. + +1. Update the password in all database connections that connect with the user account. +1. Delete the original password with [`DELETE /v1/users/password`]({{< relref "/operate/rs/references/rest-api/requests/users/password#update-password" >}}): + + ```sh + DELETE https://[host][:port]/v1/users/password + '{"username":"", "old_password":""}' + ``` + + If there is only one valid password for a user account, you cannot delete that password. + +## Replace all passwords + +You can also replace all existing passwords for a user account with a single password that does not match any existing passwords. +This can be helpful if you suspect that your passwords are compromised and you want to quickly resecure the account. + +To replace all existing passwords for a user account with a single new password, use [`PUT /v1/users/password`]({{< relref "/operate/rs/references/rest-api/requests/users/password#delete-password" >}}): + +```sh +PUT https://[host][:port]/v1/users/password + '{"username":"", "old_password":"", "new_password":""}' +``` + +All of the existing passwords are deleted and only the new password is valid. + +{{}} +If you send the above request without specifying it is a `PUT` request, the new password is added to the list of existing passwords. +{{}} diff --git a/content/operate/rs/7.4/security/access-control/manage-users/_index.md b/content/operate/rs/7.4/security/access-control/manage-users/_index.md new file mode 100644 index 0000000000..21f058b246 --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/manage-users/_index.md @@ -0,0 +1,23 @@ +--- +Title: Manage user security +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manage user account security settings. +hideListLinks: false +linkTitle: Manage user security +weight: 20 +url: '/operate/rs/7.4/security/access-control/manage-users/' +--- + +Redis Enterprise supports the following user account security settings: + +- Password complexity +- Password expiration +- User lockouts +- Account inactivity timeout + +## Manage users and user security + diff --git a/content/operate/rs/7.4/security/access-control/manage-users/default-user.md b/content/operate/rs/7.4/security/access-control/manage-users/default-user.md new file mode 100644 index 0000000000..8863c7990a --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/manage-users/default-user.md @@ -0,0 +1,59 @@ +--- +Title: Manage default user +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manage a database's default user. +linkTitle: Manage default user +toc: 'true' +weight: 60 +url: '/operate/rs/7.4/security/access-control/manage-users/default-user/' +--- + +When you [create a database]({{< relref "/operate/rs/databases/create" >}}), default user database access is enabled by default (**Unauthenticated access** is selected). This gives the default user full access to the database and enables compatibility with versions of Redis before Redis 6. + +Select **Password-only authentication**, then enter and confirm a default database password to require authentication for connections to the database. + +{{Select Password-only authentication to require a password to access the database.}} + +## Authenticate as default user + +When you configure a password for your database, all connections to the database must authenticate using the [AUTH]({{< relref "/commands/auth" >}}) command. See Redis security's [authentication]({{}}) section for more information. + +```sh +AUTH +``` + +## Change default database password + +To change the default user's password: + +1. From the database's **Security** tab, select **Edit**. + +1. In the **Access Control** section, select **Password-only authentication** as the **Access method**. + +1. Enter and re-enter the new password. + +1. Select **Save**. + +## Deactivate default user + +If you set up [role-based access control]({{< relref "/operate/rs/security/access-control" >}}) with [access control lists]({{< relref "/operate/rs/security/access-control/create-db-roles" >}}) (ACLs) for your database and don't require backwards compatibility with versions earlier than Redis 6, you can [deactivate the default user]({{< relref "/operate/rs/security/access-control/manage-users/default-user" >}}). + +{{}} +Before you deactivate default user access, make sure the role associated with the database is [assigned to a user]({{< relref "/operate/rs/security/access-control/create-users" >}}). Otherwise, the database will be inaccessible. +{{}} + +To deactivate the default user: + +1. From the database's **Security** tab, select **Edit**. + +1. In the **Access Control** section, select **Using ACL only** as the **Access method**. + + {{Select Using ACL only to deactivate default user access to the database.}} + +1. Choose at least one role and Redis ACL to access the database. + +1. Select **Save**. diff --git a/content/operate/rs/7.4/security/access-control/manage-users/login-lockout.md b/content/operate/rs/7.4/security/access-control/manage-users/login-lockout.md new file mode 100644 index 0000000000..d616c02407 --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/manage-users/login-lockout.md @@ -0,0 +1,201 @@ +--- +Title: Manage user login +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manage user login lockout and session timeout. +linkTitle: Manage user login and session +toc: 'true' +weight: 40 +url: '/operate/rs/7.4/security/access-control/manage-users/login-lockout/' +--- + +Redis Enterprise Software secures user access in a few different ways, including automatically: + +- Locking user accounts after a series of authentication failures (invalid passwords) + +- Signing sessions out after a period of inactivity + +Here, you learn how to configure the relevant settings. + +## User login lockout + +By default, after 5 failed login attempts within 15 minutes, the user account is locked for 30 minutes. You can change the user login lockout settings in the Cluster Manager UI or with [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}). + +### View login lockout settings + +You can view the cluster's user login lockout settings from **Cluster > Security > Preferences > Lockout threshold** in the Cluster Manager UI or with [`rladmin info cluster`]({{< relref "/operate/rs/references/cli-utilities/rladmin/info#info-cluster" >}}): + +```sh +$ rladmin info cluster | grep login_lockout + login_lockout_counter_reset_after: 900 + login_lockout_duration: 1800 + login_lockout_threshold: 5 +``` + +### Configure user login lockout + +To change the user login lockout settings using the Cluster Manager UI: + +1. Go to **Cluster > Security > Preferences**, then select **Edit**. + +1. In the **Lockout threshold** section, make sure the checkbox is selected. + + {{The Lockout threshold configuration section}} + +1. Configure the following **Lockout threshold** settings: + + 1. **Log-in attempts until user is revoked** - The number of failed login attempts allowed before the user account is locked. + + 1. **Time between failed login attempts** in seconds, minutes, or hours - The amount of time during which failed login attempts are counted. + + 1. For **Unlock method**, select one of the following: + + - **Locked duration** to set how long the user account is locked after excessive failed login attempts. + + - **Only Admin can unlock the user by resetting the password**. + +1. Select **Save**. + +### Change allowed login attempts + +To change the number of failed login attempts allowed before the user account is locked, use one of the following methods: + +- [Cluster Manager UI](#configure-user-login-lockout) + +- [`rladmin tune cluster`]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): + + ```sh + rladmin tune cluster login_lockout_threshold + ``` + + For example, to set the lockout threshold to 10 failed login attempts, run: + + ```sh + rladmin tune cluster login_lockout_threshold 10 + ``` + + If you set the lockout threshold to 0, it turns off account lockout, and the cluster settings show `login_lockout_threshold: disabled`. + + ```sh + rladmin tune cluster login_lockout_threshold 0 + ``` + +### Change time before login attempts reset + +To change the amount of time during which failed login attempts are counted, use one of the following methods: + +- [Cluster Manager UI](#configure-user-login-lockout) + +- [`rladmin tune cluster`]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): + + ```sh + rladmin tune cluster login_lockout_counter_reset_after + ``` + + For example, to set the lockout reset to 1 hour, run: + + ```sh + rladmin tune cluster login_lockout_counter_reset_after 3600 + ``` + +### Change login lockout duration + +To change the amount of time that the user account is locked after excessive failed login attempts, use one of the following methods: + +- [Cluster Manager UI](#configure-user-login-lockout) + +- [`rladmin tune cluster`]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): + + ```sh + rladmin tune cluster login_lockout_duration + ``` + + For example, to set the lockout duration to 1 hour, run: + + ```sh + rladmin tune cluster login_lockout_duration 3600 + ``` + + If you set the lockout duration to 0, then the account can be unlocked only when an administrator changes the account's password. + + ```sh + rladmin tune cluster login_lockout_duration 0 + ``` + + The cluster settings now show `login_lockout_duration: admin-release`. + +### Unlock locked user accounts + +To unlock a user account in the Cluster Manager UI: + +1. Go to **Access Control > Users**. Locked users have a "User is locked out" label: + + {{The Access Control > Users configuration screen in the Cluster Manager UI}} + +1. Point to the user you want to unlock, then click **Reset to unlock**: + + {{Reset to unlock button appears when you point to a locked user in the list}} + +1. In the **Reset user password** dialog, enter a new password for the user: + + {{Reset user password dialog}} + +1. Select **Save** to reset the user's password and unlock their account. + +To unlock a user account or reset a user password with `rladmin`, run: + +```sh +rladmin cluster reset_password +``` + +To unlock a user account or reset a user password with the REST API, use [`PUT /v1/users`]({{< relref "/operate/rs/references/rest-api/requests/users#put-user" >}}): + +```sh +PUT /v1/users +{"password": ""} +``` + +### Turn off login lockout + +To turn off user login lockout and allow unlimited login attempts, use one of the following methods: + +- Cluster Manager UI: + + 1. Go to **Cluster > Security > Preferences**, then select **Edit**. + + 1. Clear the **Lockout threshold** checkbox. + + 1. Select **Save**. + +- [`rladmin tune cluster`]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): + + ```sh + rladmin tune cluster login_lockout_threshold 0 + ``` + +The cluster settings show `login_lockout_threshold: disabled`. + +## Configure session timeout + +The Redis Enterprise Cluster Manager UI supports session timeouts. By default, users are automatically logged out after 15 minutes of inactivity. + +To customize the session timeout, use one of the following methods: + +- Cluster Manager UI: + + 1. Go to **Cluster > Security > Preferences**, then select **Edit**. + + 1. For **Session timeout**, select minutes or hours from the list and enter the timeout value. + + 1. Select **Save**. + +- [`rladmin cluster config`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/config" >}}): + + ```sh + rladmin cluster config cm_session_timeout_minutes + ``` + + The `` is the number of minutes after which sessions will time out. diff --git a/content/operate/rs/7.4/security/access-control/redis-acl-overview.md b/content/operate/rs/7.4/security/access-control/redis-acl-overview.md new file mode 100644 index 0000000000..78dcd38eca --- /dev/null +++ b/content/operate/rs/7.4/security/access-control/redis-acl-overview.md @@ -0,0 +1,200 @@ +--- +Title: Overview of Redis ACLs in Redis Enterprise Software +alwaysopen: false +categories: +- docs +- operate +- rs +description: An overview of Redis ACLs, syntax, and ACL command support in Redis Enterprise Software. +linkTitle: Redis ACL overview +weight: 17 +aliases: + - /operate/rs/security/access-control/rbac/configure-acl/ +url: '/operate/rs/7.4/security/access-control/redis-acl-overview/' +--- + +Redis access control lists (Redis ACLs) allow you to define named permissions for specific Redis commands, keys, and pub/sub channels. You can use defined Redis ACLs for multiple databases and roles. + +## Predefined Redis ACLs + +Redis Enterprise Software provides one predefined Redis ACL named **Full Access**. This ACL allows all commands on all keys and cannot be edited. + +## Redis ACL syntax + +Redis ACLs are defined by a [Redis syntax]({{< relref "/operate/oss_and_stack/management/security/acl" >}}) where you specify the commands or command categories that are allowed for specific keys. + +### Commands and categories + +Redis ACL rules can allow or block specific [Redis commands]({{< relref "/commands" >}}) or [command categories]({{< relref "/operate/oss_and_stack/management/security/acl" >}}#command-categories). + +- `+` includes commands + +- `-` excludes commands + +- `+@` includes command categories + +- `-@` excludes command categories + +The following example allows all `read` commands and the `SET` command: + +```sh ++@read +SET +``` + +Module commands have several ACL limitations: + +- [Redis modules]({{< relref "/operate/oss_and_stack/stack-with-enterprise" >}}) do not have command categories. + +- Other [command category]({{< relref "/operate/oss_and_stack/management/security/acl" >}}#command-categories) ACLs, such as `+@read` and `+@write`, do not include Redis module commands. `+@all` is the only exception because it allows all Redis commands. + +- You have to include individual module commands in a Redis ACL rule to allow them. + + For example, the following Redis ACL rule allows read-only commands and the RediSearch commands `FT.INFO` and `FT.SEARCH`: + + ```sh + +@read +FT.INFO +FT.SEARCH + ``` + +### Key patterns + +To define access to specific keys or key patterns, use the following prefixes: + +- `~` or `%RW~` allows read and write access to keys. + +- `%R~` allows read access to keys. + +- `%W~` allows write access to keys. + +`%RW~`, `%R~`, and `%W~` are only supported for databases with Redis version 7.2 or later. + +The following example allows read and write access to all keys that start with "app1" and read-only access to all keys that start with "app2": + +```sh +~app1* %R~app2* +``` + +### Pub/sub channels + +The `&` prefix allows access to [pub/sub channels]({{< relref "/develop/interact/pubsub" >}}) (only supported for databases with Redis version 6.2 or later). + +To limit access to specific channels, include `resetchannels` before the allowed channels: + +```sh +resetchannels &channel1 &channel2 +``` + +### Selectors + +[Selectors]({{< relref "/operate/oss_and_stack/management/security/acl" >}}#selectors) let you define multiple sets of rules in a single Redis ACL (only supported for databases with Redis version 7.2 or later). A command is allowed if it matches the base rule or any selector in the Redis ACL. + +- `()` creates a new selector. + +- `clearselectors` deletes all existing selectors for a user. This action does not delete the base ACL rule. + +In the following example, the base rule allows `GET key1` and the selector allows `SET key2`: + +```sh ++GET ~key1 (+SET ~key2) +``` + +## Default pub/sub permissions + +Redis database version 6.2 introduced pub/sub ACL rules that determine which [pub/sub channels]({{< relref "/develop/interact/pubsub" >}}) a user can access. + +The configuration option `acl-pubsub-default`, added in Redis Enterprise Software version 6.4.2, determines the cluster-wide default level of access for all pub/sub channels. Redis Enterprise Software uses the following pub/sub permissions by default: + +- For versions 6.4.2 and 7.2, `acl-pubsub-default` is permissive (`allchannels` or `&*`) by default to accommodate earlier Redis versions. + +- In future versions, `acl-pubsub-default` will change to restrictive (`resetchannels`). Restrictive permissions block all pub/sub channels by default, unless explicitly permitted by an ACL rule. + +If you use ACLs and pub/sub channels, you should review your databases and ACL settings and plan to transition your cluster to restrictive pub/sub permissions in preparation for future Redis Enterprise Software releases. + +### Prepare for restrictive pub/sub permissions + +To secure pub/sub channels and prepare your cluster for future Redis Enterprise Software releases that default to restrictive pub/sub permissions: + +1. Upgrade Redis databases: + + - For Redis Enterprise Software version 6.4.2, upgrade all databases in the cluster to Redis DB version 6.2. + + - For Redis Enterprise Software version 7.2, upgrade all databases in the cluster to Redis DB version 7.2 or 6.2. + +1. Create or update ACLs with permissions for specific channels using the `resetchannels &channel` format. + +1. Associate the ACLs with relevant databases. + +1. Set default pub/sub permissions (`acl-pubsub-default`) to restrictive. See [Change default pub/sub permissions](#change-default-pubsub-permissions) for details. + +1. If any issues occur, you can temporarily change the default pub/sub setting back to permissive. Resolve any problematic ACLs before making pub/sub permissions restrictive again. + +{{}} +When you change the cluster's default pub/sub permissions to restrictive, `&*` is added to the **Full Access** ACL. Before you make this change, consider the following: + +- Because pub/sub ACL syntax was added in Redis 6.2, you can't associate the **Full Access** ACL with database versions 6.0 or lower after this change. + +- The **Full Access** ACL is not reverted if you change `acl-pubsub-default` to permissive again. + +- Every database with the default user enabled uses the **Full Access** ACL. +{{}} + +### Change default pub/sub permissions + +As of Redis Enterprise version 6.4.2, you can configure `acl_pubsub_default`, which determines the default pub/sub permissions for all databases in the cluster. You can set `acl_pubsub_default` to the following values: + +- `resetchannels` is restrictive and blocks access to all channels by default. + +- `allchannels` is permissive and allows access to all channels by default. + +To make default pub/sub permissions restrictive: + +1. [Upgrade all databases]({{< relref "/operate/rs/installing-upgrading/upgrading/upgrade-database" >}}) in the cluster to Redis version 6.2 or later. + +1. Set the default to restrictive (`resetchannels`) using one of the following methods: + + - New Cluster Manager UI (only available for Redis Enterprise versions 7.2 and later): + + 1. Navigate to **Access Control > Settings > Pub/Sub ACLs** and select **Edit**. + + 1. For **Default permissions for Pub/Sub ACLs**, select **Restrictive**, then **Save**. + + - [`rladmin tune cluster`]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): + + ```sh + rladmin tune cluster acl_pubsub_default resetchannels + ``` + + - [Update cluster policy]({{< relref "/operate/rs/references/rest-api/requests/cluster/policy#put-cluster-policy" >}}) REST API request: + + ```sh + PUT /v1/cluster/policy + { "acl_pubsub_default": "resetchannels" } + ``` + +## ACL command support + +Redis Enterprise Software does not support certain Redis ACL commands. Instead, you can manage access controls from the Cluster Manager UI. + +{{}} + +Redis ACLs also have the following differences in Redis Enterprise Software: + +- The `MULTI`, `EXEC`, `DISCARD` commands are always allowed, but ACLs are enforced on `MULTI` subcommands. + +- Nested selectors are not supported. + + For example, the following selectors are not valid in Redis Enterprise: `+GET ~key1 (+SET (+SET ~key2) ~key3)` + +- Key and pub/sub patterns do not allow the following characters: `'(', ')'` + +- The following password configuration syntax is not supported: `'>', '<', '#!', 'resetpass'` + + To configure passwords in Redis Enterprise Software, use one of the following methods: + + - [`rladmin cluster reset_password`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/reset_password" >}}): + + ```sh + rladmin cluster reset_password + ``` + + - REST API [`PUT /v1/users`]({{< relref "/operate/rs/references/rest-api/requests/users#put-user" >}}) request and provide `password` + diff --git a/content/operate/rs/7.4/security/audit-events.md b/content/operate/rs/7.4/security/audit-events.md new file mode 100644 index 0000000000..ffb206b20c --- /dev/null +++ b/content/operate/rs/7.4/security/audit-events.md @@ -0,0 +1,260 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: Describes how to audit connection events. +linkTitle: Audit events +title: Audit connection events +weight: 15 +url: '/operate/rs/7.4/security/audit-events/' +--- + +Starting with version 6.2.18, Redis Enterprise Software lets you audit database connection and authentication events. This helps you track and troubleshoot connection activity. + +The following events are tracked: + +- Database connection attempts +- Authentication requests, including requests for new and existing connections +- Database disconnects + +When tracked events are triggered, notifications are sent via TCP to an address and port defined when auditing is enabled. Notifications appear in near real time and are intended to be consumed by an external listener, such as a TCP listener, third-party service, or related utility. + +For development and testing environments, notifications can be saved to a local file; however, this is neither supported nor intended for production environments. + +For performance reasons, auditing is not enabled by default. In addition, auditing occurs in the background (asynchronously) and is non-blocking by design. That is, the action that triggered the notification continues without regard to the status of the notification or the listening tool. + +## Enable audit notifications + +### Cluster audits + +To enable auditing for your cluster, use: + +- `rladmin` + + ``` + rladmin cluster config auditing db_conns \ + audit_protocol \ + audit_address
\ + audit_port \ + audit_reconnect_interval \ + audit_reconnect_max_attempts + ``` + + where: + + - _audit\_protocol_ indicates the protocol used to process notifications. For production systems, _TCP_ is the only value. + + - _audit\_address_ defines the TCP/IP address where one can listen for notifications + + - _audit\_port_ defines the port where one can listen for notifications + + - _audit\_reconnect\_interval_ defines the interval (in seconds) between attempts to reconnect to the listener. Default is 1 second. + + - _audit\_reconnect\_max\_attempts_ defines the maximum number of attempts to reconnect. Default is 0. (infinite) + + Development systems can set _audit\_protocol_ to `local` for testing and training purposes; however, this setting is _not_ supported for production use. + + When `audit_protocol` is set to `local`, `
` should be set to a [stream socket](https://man7.org/linux/man-pages/man7/unix.7.html) defined on the machine running Redis Enterprise and _``_ should not be specified: + + ``` + rladmin cluster config auditing db_conns \ + audit_protocol local audit_address + ``` + + The output file (and path) must be accessible by the user and group running Redis Enterprise Software. + +- the [REST API]({{< relref "/operate/rs/references/rest-api/requests/cluster/auditing-db-conns#put-cluster-audit-db-conns" >}}) + + ``` + PUT /v1/cluster/auditing/db_conns + { + "audit_address": "
", + "audit_port": , + "audit_protocol": "TCP", + "audit_reconnect_interval": , + "audit_reconnect_max_attempts": + } + ``` + + where `
` is a string containing the TCP/IP address, `` is a numeric value representing the port, `` is a numeric value representing the interval in seconds, and `` is a numeric value representing the maximum number of attempts to execute. + +### Database audits + +Once auditing is enabled for your cluster, you can audit individual databases. To do so, use: + +- `rladmin` + + ``` + rladmin tune db db: db_conns_auditing enabled + ``` + + where the value of the _db:_ parameter is either the cluster ID of the database or the database name. + + To deactivate auditing, set `db_conns_auditing` to `disabled`. + + Use `rladmin info` to retrieve additional details: + + ``` + rladmin info db + rladmin info cluster + ``` + +- the [REST API]({{< relref "/operate/rs/references/rest-api/requests/bdbs#put-bdbs" >}}) + + ``` + PUT /v1/bdbs/1 + { "db_conns_auditing": true } + ``` + + To deactivate auditing, set `db_conns_auditing` to `false`. + +You must enable auditing for your cluster before auditing a database; otherwise, an error appears: + +> _Error setting description: Unable to enable DB Connections Auditing before feature configurations are set. +> Error setting error_code: db_conns_auditing_config_missing_ + +To resolve this error, enable the protocol for your cluster _before_ attempting to audit a database. + +### Policy defaults for new databases + +To audit connections for new databases by default, use: + +- `rladmin` + + ``` + rladmin tune cluster db_conns_auditing enabled + ``` + + To deactivate this policy, set `db_conns_auditing` to `disabled`. + +- the [REST API]({{< relref "/operate/rs/references/rest-api/requests/cluster/policy#put-cluster-policy" >}}) + + ``` + PUT /v1/cluster/policy + { "db_conns_auditing": true } + ``` + + To deactivate this policy, set `db_conns_auditing` to `false`. + +## Notification examples + +Audit event notifications are reported as JSON objects. + +### New connection + +This example reports a new connection for a database: + +``` json +{ + "ts":1655821384, + "new_conn": + { + "id":2285001002 , + "srcip":"127.0.0.1", + "srcp":"39338", + "trgip":"127.0.0.1", + "trgp":"12635", + "hname":"", + "bdb_name":"DB1", + "bdb_uid":"5" + } +} +``` + +### Authentication request + +Here is a sample authentication request for a database: + +``` json +{ + "ts":1655821384, + "action":"auth", + "id":2285001002 , + "srcip":"127.0.0.1", + "srcp":"39338", + "trgip":"127.0.0.1", + "trgp":"12635", + "hname":"", + "bdb_name":"DB1", + "bdb_uid":"5", + "status":2, + "username":"user_one", + "identity":"user:1", + "acl-rules":"~* +@all" +} +``` + +The `status` field reports the following: + +- Values of 2, 7, or 8 indicate success. + +- Values of 3 or 5 indicate that the client authentication is in progress and should conclude later. + +- Other values indicate failures. + +### Database disconnect + +Here's what's reported when a database connection is closed: + +``` json +{ + "ts":1655821384, + "close_conn": + { + "id":2285001002, + "srcip":"127.0.0.1", + "srcp":"39338", + "trgip":"127.0.0.1", + "trgp":"12635", + "hname":"", + "bdb_name":"DB1", + "bdb_uid":"5" + } +} +``` + +## Notification field reference + +The field value that appears immediately after the timestamp describes the action that triggered the notification. The following values may appear: + +- `new_conn` indicates a new external connection +- `new_int_conn` indicates a new internal connection +- `close_conn` occurs when a connection is closed +- `"action":"auth"` indicates an authentication request and can refer to new authentication requests or authorization checks on existing connections + +In addition, the following fields may also appear in audit event notifications: + +| Field name | Description | +|:---------:|-------------| +| `acl-rules` | ACL rules associated with the connection, which includes a rule for the `default` user. | +| `bdb_name` | Destination database name - The name of the database being accessed. | +| `bdb_uid` | Destination database ID - The cluster ID of the database being accessed. | +| `hname` | Client hostname - The hostname of the client. Currently empty; reserved for future use. | +| `id` | Connection ID - Unique connection ID assigned by the proxy. | +| `identity` | Identity - A unique ID the proxy assigned to the user for the current connection. | +| `srcip` | Source IP address - Source TCP/IP address of the client accessing the Redis database. | +| `srcp` | Source port - Port associated with the source IP address accessing the Redis database. Combine the port with the address to uniquely identify the socket. | +| `status` | Status result code - An integer representing the result of an authentication request. | +| `trgip` | Target IP address - The IP address of the destination being accessed by the action. | +| `trgp` | Target port - The port of the destination being accessed by the action. Combine the port with the destination IP address to uniquely identify the database being accessed. | +| `ts` | Timestamp - The date and time of the event, in [Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) (UTC). Granularity is within one second. | +| `username` | Authentication username - Username associated with the connection; can include `default` for databases that allow default access. (Passwords are _not_ recorded). | + +## Status result codes + +The `status` field reports the results of an authentication request as an integer. Here's what different values mean: + +| Error value | Error code | Description | +|:-------------:|------------|-------------| +| `0` | AUTHENTICATION_FAILED | Invalid username and/or password. | +| `1` | AUTHENTICATION_FAILED_TOO_LONG | Username or password are too long. | +| `2` | AUTHENTICATION_NOT_REQUIRED | Client tried to authenticate, but authentication isn't necessary. | +| `3` | AUTHENTICATION_DIRECTORY_PENDING | Attempting to receive authentication info from the directory in async mode. | +| `4` | AUTHENTICATION_DIRECTORY_ERROR | Authentication attempt failed because there was a directory connection error. | +| `5` | AUTHENTICATION_SYNCER_IN_PROGRESS | Syncer SASL handshake. Return SASL response and wait for the next request. | +| `6` | AUTHENTICATION_SYNCER_FAILED | Syncer SASL handshake. Returned SASL response and closed the connection. | +| `7` | AUTHENTICATION_SYNCER_OK | Syncer authenticated. Returned SASL response. | +| `8` | AUTHENTICATION_OK | Client successfully authenticated. | + diff --git a/content/operate/rs/7.4/security/certificates/_index.md b/content/operate/rs/7.4/security/certificates/_index.md new file mode 100644 index 0000000000..2f27ae56f3 --- /dev/null +++ b/content/operate/rs/7.4/security/certificates/_index.md @@ -0,0 +1,32 @@ +--- +Title: Certificates +alwaysopen: false +categories: +- docs +- operate +- rs +description: An overview of certificates in Redis Enterprise Software. +hideListLinks: true +linkTitle: Certificates +weight: 60 +url: '/operate/rs/7.4/security/certificates/' +--- + +Redis Enterprise Software uses self-signed certificates by default to ensure that the product is secure. If using a self-signed certificate is not the right solution for you, you can import a certificate signed by a certificate authority of your choice. + +Here's the list of self-signed certificates that create secure, encrypted connections to your Redis Enterprise cluster: + +| Certificate name | Description | +|------------------|-------------| +| `api` | Encrypts [REST API]({{< relref "/operate/rs/references/rest-api/" >}}) requests and responses. | +| `cm` | Secures connections to the Redis Enterprise Cluster Manager UI. | +| `ldap_client` | Secures connections between LDAP clients and LDAP servers. | +| `metrics_exporter` | Sends Redis Enterprise metrics to external [monitoring tools]({{< relref "/operate/rs/clusters/monitoring/" >}}) over a secure connection. | +| `proxy` | Creates secure, encrypted connections between clients and databases. | +| `syncer` | For [Active-Active]({{< relref "/operate/rs/databases/active-active/" >}}) or [Replica Of]({{< relref "/operate/rs/databases/import-export/replica-of/" >}}) databases, encrypts data during the synchronization of participating clusters. | + +These self-signed certificates are generated on the first node of each Redis Enterprise Software installation and are copied to all other nodes added to the cluster. + +When you use the default self-signed certificates and you connect to the Cluster Manager UI over a web browser, you'll see an untrusted connection notification. + +Depending on your browser, you can allow the connection for each session or add an exception to trust the certificate for all future sessions. diff --git a/content/operate/rs/7.4/security/certificates/create-certificates.md b/content/operate/rs/7.4/security/certificates/create-certificates.md new file mode 100644 index 0000000000..24c75a0de7 --- /dev/null +++ b/content/operate/rs/7.4/security/certificates/create-certificates.md @@ -0,0 +1,236 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: Create self-signed certificates to install on a Redis Enterprise cluster. +linkTitle: Create certificates +title: Create certificates +weight: 10 +url: '/operate/rs/7.4/security/certificates/create-certificates/' +--- + +When you first install Redis Enterprise Software, self-signed certificates are created to enable encryption for Redis Enterprise endpoints. These certificates expire after a year (365 days) and must be renewed. + +You can renew these certificates by replacing them with new self-signed certificates or by replacing them with certificates signed by a [certificate authority](https://en.wikipedia.org/wiki/Certificate_authority) (CA). + +## Renew self-signed certificates + +As of [v6.2.18-70]({{< relref "/operate/rs/release-notes/rs-6-2-18-releases/rs-6-2-18-70" >}}), Redis Enterprise Software includes a script to generate self-signed certificates. + +By default, the `generate_self_signed_certs.sh` script is located in `/opt/redislabs/utils/`. + +Here, you learn how to use this script to generate new certificates and how to install them. + +### Step 1: Generate new certificates + +Sign in to the machine hosting the cluster's master node and then run the following command: + +``` bash +% sudo -u redislabs /opt/redislabs/utils/generate_self_signed_certs.sh \ + -f "" -d -t +``` + +where: + +- _\_ is the fully qualified domain name (FQDN) of the cluster. (This is the name given to the cluster when first created.) +- _\_ is an optional FQDN for the cluster. Multiple domain names are allowed, separated by whitespace. Quotation marks (`""`) should enclose the full set of names. +- _\_ is an integer specifying the number of days the certificate should be valid. We recommend against setting this longer than a year (365 days). + + _\_ is optional and defaults to `365`. + +- _\_ is a string identifying the name of the certificate to generate. + + The following values are supported: + + | Value | Description | + |-------|-------------| + | `api` | The REST API | + | `cm` | The Cluster Manager UI | + | `metrics` | The metrics exporter | + | `proxy` | The database endpoint | + | `syncer` | The synchronization process | + | `all` | Generates all certificates in a single operation | + + _Type_ is optional and defaults to `all`. + +When you run the script, it either reports success (`"Self signed cert generated successfully"`) or an error message. Use the error message to troubleshoot any issues. + +The following example generates all self signed certificates for `mycluster.example.com`; these certificates expire one year after the command is run: + +``` bash +$ sudo -u redislabs /opt/redislabs/utils/generate_self_signed_certs.sh \ + -f "mycluster.example.com"` +``` + +Suppose you want to create a Cluster Manager UI certificate to support two clusters for a period of two years. The following example shows how: + +``` bash +$ sudo -u redislabs /opt/redislabs/utils/generate_self_signed_certs.sh \ + -f "mycluster.example.com anothercluster.example.com" -d 730 -t cm +``` + +Here, a certificate file and certificate key are generated to support the following domains: + +``` text +mycluster.example.com +*.mycluster.example.com +anothercluster.example.com +*.anothercluster.example.com +``` + +### Step 2: Locate the new certificate files + +When successful, the script generates two .PEM files for each generated certificate: a certificate file and a certificate key, each named after the type of certificate generated (see earlier table for individual certificate names.) + +These files can be found in the `/tmp` directory. + +``` bash +$ ls -la /tmp/*.pem +``` + +### Step 3: Set permissions + +We recommend setting the permissions of your new certificate files to limit read and write access to the file owner and to set group and other user permissions to read access. + +``` bash +$ sudo chmod 644 /tmp/*.pem +``` + +### Step 4: Replace existing certificates {#replace-self-signed} + +You can use `rladmin` to replace the existing certificates with new certificates: + +``` console +$ rladmin cluster certificate set certificate_file \ + .pem key_file .pem +``` + +The following values are supported for the _\_ parameter: + +| Value | Description | +|-------|-------------| +| `api` | The REST API | +| `cm` | The Cluster Manager UI | +| `metrics_exporter` | The metrics exporter | +| `proxy` | The database endpoint | +| `syncer` | The synchronization process | + +You can also use the REST API. To learn more, see [Update certificates]({{< relref "/operate/rs/security/certificates/updating-certificates#how-to-update-certificates" >}}). + +## Create CA-signed certificates + +You can use certificates signed by a [certificate authority](https://en.wikipedia.org/wiki/Certificate_authority) (CA). + +For best results, use the following guidelines to create the certificates. + +### TLS certificate guidelines + +When you create certificates signed by a certificate authority, you need to create server certificates and client certificates. The following provide guidelines that apply to both certificates and guidance for each certificate type. + +#### Guidelines for server and client certificates + +1. Include the full [certificate chain](https://en.wikipedia.org/wiki/X.509#Certificate_chains_and_cross-certification) when creating certificate .PEM files for either server or client certificates. + +1. List (_chain_) certificates in the .PEM file in the following order: + + ``` text + -----BEGIN CERTIFICATE----- + Domain (leaf) certificate + -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + Intermediate CA certificate + -----END CERTIFICATE---- + -----BEGIN CERTIFICATE----- + Trusted Root CA certificate + -----END CERTIFICATE----- + ``` + +#### Server certificate guidelines + +Server certificates support clusters. + +In addition to the general guidelines described earlier, the following guidelines apply to server certificates: + +1. Use the cluster's fully qualified domain name (FQDN) as the certificate Common Name (CN). + +1. Set the following values according to the values specified by your security team or certificate authority: + + - Country Name (C) + - State or Province Name (ST) + - Locality Name (L) + - Organization Name (O) + - Organization Unit (OU) + +1. The [Subject Alternative Name](https://en.wikipedia.org/wiki/Subject_Alternative_Name) (SAN) should include the following values based on the FQDN: + + ``` text + dns= + dns=*. + dns=internal. + dns=*.internal. + ``` + +1. The Extended Key Usage attribute should be set to `TLS Web Client Authentication` and `TLS Web Server Authentication`. + +1. We strongly recommend using a strong hash algorithm, such as SHA-256 or SHA-512. + + Individual operating systems might limit access to specific algorithms. For example, Ubuntu 20.04 [limits access](https://manpages.ubuntu.com/manpages/focal/man7/crypto-policies.7.html) to SHA-1. In such cases, Redis Enterprise Software is limited to the features supported by the underlying operating system. + + +#### Client certificate guidelines + +Client certificates support database connections. + +In addition to the general guidelines described earlier, the following guidelines apply to client certificates: + +1. The Extended Key Usage attribute should be set to `TLS Web Client Authentication`. + +1. We strongly recommend using a strong hash algorithm, such as SHA-256 or SHA-512. + + Individual operating systems might limit access to specific algorithms. For example, Ubuntu 20.04 [limits access](https://manpages.ubuntu.com/manpages/focal/man7/crypto-policies.7.html) to SHA-1. In such cases, Redis Enterprise Software is limited to the features supported by the underlying operating system. + +### Create certificates + +The actual process of creating CA-signed certificates varies according to the CA. In addition, your security team may have custom instructions that you need to follow. + +Here, we demonstrate the general process using OpenSSL. If your CA provides alternate tools, you should use those according to their instructions. + +However you choose to create the certificates, be sure to incorporate the guidelines described earlier. + +1. Create a private key. + + ``` bash + $ openssl genrsa -out .pem 2048 + ``` + +1. Create a certificate signing request. + + ``` bash + $ openssl req -new -key .pem -out \ + .csr -config .cnf + ``` + _Important: _ The .CNF file is a configuration file. Check with your security team or certificate authority for help creating a valid configuration file for your environment. + +3. Sign the private key using your certificate authority. + + ```sh + $ openssl x509 -req -in .csr -signkey .pem -out .pem + ``` + + The signing process varies for each organization and CA vendor. Consult your security team and certificate authority for specific instructions describing how to sign a certificate. + +4. Upload the certificate to your cluster. + + You can use [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/certificate" >}}) to replace the existing certificates with new certificates: + + ``` console + $ rladmin cluster certificate set certificate_file \ + .pem key_file .pem + ``` + + For a list of values supported by the `` parameter, see the [earlier table](#replace-self-signed). + + You can also use the REST API. To learn more, see [Update certificates]({{< relref "/operate/rs/security/certificates/updating-certificates#how-to-update-certificates" >}}). + diff --git a/content/operate/rs/7.4/security/certificates/monitor-certificates.md b/content/operate/rs/7.4/security/certificates/monitor-certificates.md new file mode 100644 index 0000000000..2e9135a730 --- /dev/null +++ b/content/operate/rs/7.4/security/certificates/monitor-certificates.md @@ -0,0 +1,37 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: Monitor certificates on a Redis Enterprise cluster. +linkTitle: Monitor certificates +title: Monitor certificates +weight: 10 +url: '/operate/rs/7.4/security/certificates/monitor-certificates/' +--- + +You can monitor certificates used by Redis Enterprise Software. + +### Monitor certificates with Prometheus + +Redis Enterprise Software exposes the expiration time (in seconds) of each certificate on each node. To learn how to monitor Redis Enterprise Software metrics using Prometheus, see the [Prometheus integration quick start]({{< relref "/integrate/prometheus-with-redis-enterprise/" >}}). + +Here are some examples of the `node_cert_expiration_seconds` metric: + +```sh +node_cert_expiration_seconds{cluster="mycluster.local",logical_name="cm",node="1",path="/etc/opt/redislabs/cm_cert.pem"} 31104000.0 +node_cert_expiration_seconds{cluster="mycluster.local",logical_name="api",node="1",path="/etc/opt/redislabs/api_cert.pem"} 31104000.0 +node_cert_expiration_seconds{cluster="mycluster.local",logical_name="proxy",node="1",path="/etc/opt/redislabs/proxy_cert.pem"} 31104000.0 +node_cert_expiration_seconds{cluster="mycluster.local",logical_name="metrics_exporter",node="1",path="/etc/opt/redislabs/metrics_exporter_cert.pem"} 31104000.0 +node_cert_expiration_seconds{cluster="mycluster.local",logical_name="syncer",node="1",path="/etc/opt/redislabs/syncer_cert.pem"} 31104000.0 +``` + +The following certificates relate to [internode communication TLS encryption]({{< relref "/operate/rs/security/encryption/internode-encryption" >}}) and are automatically rotated by Redis Enterprise Software: + +```sh +node_cert_expiration_seconds{cluster="mycluster.local",logical_name="ccs_internode_encryption",node="1",path="/etc/opt/redislabs/ccs_internode_encryption_cert.pem"} 2592000.0 +node_cert_expiration_seconds{cluster="mycluster.local",logical_name="data_internode_encryption",node="1",path="/etc/opt/redislabs/data_internode_encryption_cert.pem"} 2592000.0 +node_cert_expiration_seconds{cluster="mycluster.local",logical_name="mesh_ca_signed",node="1",path="/etc/opt/redislabs/mesh_ca_signed_cert.pem"} 2592000.0 +node_cert_expiration_seconds{cluster="mycluster.local",logical_name="gossip_ca_signed",node="1",path="/etc/opt/redislabs/gossip_ca_signed_cert.pem"} 2592000.0 +``` diff --git a/content/operate/rs/7.4/security/certificates/ocsp-stapling.md b/content/operate/rs/7.4/security/certificates/ocsp-stapling.md new file mode 100644 index 0000000000..15aaedf121 --- /dev/null +++ b/content/operate/rs/7.4/security/certificates/ocsp-stapling.md @@ -0,0 +1,96 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: Use OCSP stapling to verify certificates maintained by a third-party + CA and authenticate connection attempts between clients and servers. +linkTitle: Enable OCSP stapling +title: Enable OCSP stapling +weight: 50 +url: '/operate/rs/7.4/security/certificates/ocsp-stapling/' +--- + +OCSP ([Online Certificate Status Protocol](https://en.wikipedia.org/wiki/Online_Certificate_Status_Protocol)) lets a client or server verify the status (`GOOD`, `REVOKED`, or `UNKNOWN`) of a certificate maintained by a third-party [certificate authority (CA)](https://en.wikipedia.org/wiki/Certificate_authority). + +To check whether a certificate is still valid or has been revoked, a client or server can send a request to the CA's OCSP server (also called an OCSP responder). The OCSP responder checks the certificate's status in the CA's [certificate revocation list](https://en.wikipedia.org/wiki/Certificate_revocation_list) and sends the status back as a signed and timestamped response. + +## OCSP stapling overview + + With OCSP enabled, the Redis Enterprise server regularly polls the CA's OCSP responder for the certificate's status. After it receives the response, the server caches this status until its next polling attempt. + + When a client tries to connect to the Redis Enterprise server, they perform a [TLS handshake](https://en.wikipedia.org/wiki/Transport_Layer_Security#TLS_handshake) to authenticate the server and create a secure, encrypted connection. During the TLS handshake, [OCSP stapling](https://en.wikipedia.org/wiki/OCSP_stapling) lets the Redis Enterprise server send (or "staple") the cached certificate status to the client. + +If the stapled OCSP response confirms the certificate is still valid, the TLS handshake succeeds and the client connects to the server. + +The TLS handshake fails and the client blocks the connection to the server if the stapled OCSP response indicates either: + +- The certificate has been revoked. + +- The certificate's status is unknown. This can happen if the OCSP responder fails to send a response. + +## Set up OCSP stapling + +You can configure and enable OCSP stapling for your Redis Enterprise cluster with the [Cluster Manager UI](#cluster-manager-ui-method), the [REST API](#rest-api-method), or [`rladmin`](#rladmin-method). + +While OCSP is enabled, the server always staples the cached OCSP status when a client tries to connect. It is the client's responsibility to use the stapled OCSP status. Some Redis clients, such as [Jedis](https://github.com/redis/jedis) and [redis-py](https://github.com/redis/redis-py), already support OCSP stapling, but others might require additional configuration. + +### Cluster Manager UI method + +To set up OCSP stapling with the Redis Enterprise Cluster Manager UI: + +1. Go to **Cluster > Security > OCSP**. + +1. In the **Responder URI** section, select **Replace Certificate** to update the proxy certificate. + +1. Provide the key and certificate signed by your third-party CA, then select **Save**. + +1. Configure query settings if you don't want to use their default values: + + | Name | Default value | Description | + |------|---------------|-------------| + | **Query frequency** | 1 hour | The time interval between OCSP queries to the responder URI. | + | **Response timeout** | 1 second | The time interval in seconds to wait for a response before timing out. | + | **Recovery frequency** | 1 minute | The time interval between retries after a failed query. | + | **Recovery maximum tries** | 5 | The number of retries before the validation query fails and invalidates the certificate. | + +1. Select **Enable** to turn on OCSP stapling. + +### REST API method + +To set up OCSP stapling with the [REST API]({{< relref "/operate/rs/references/rest-api" >}}): + +1. Use the REST API to [replace the proxy certificate]({{< relref "/operate/rs/security/certificates/updating-certificates#use-the-rest-api" >}}) with a certificate signed by your third-party CA. + +1. To configure and enable OCSP, send a [`PUT` request to the `/v1/ocsp`]({{< relref "/operate/rs/references/rest-api/requests/ocsp#put-ocsp" >}}) endpoint and include an [OCSP JSON object]({{< relref "/operate/rs/references/rest-api/objects/ocsp" >}}) in the request body: + + ```json + { + "ocsp_functionality": true, + "query_frequency": 3600, + "response_timeout": 1, + "recovery_frequency": 60, + "recovery_max_tries": 5 + } + ``` + +### `rladmin` method + +To set up OCSP stapling with the [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) command-line utility: + +1. Use [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/certificate" >}}) to [replace the proxy certificate]({{< relref "/operate/rs/security/certificates/updating-certificates#use-the-cli" >}}) with a certificate signed by your third-party CA. + +1. Update the cluster's OCSP settings with the [`rladmin cluster ocsp config`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/ocsp#ocsp-config" >}}) command if you don't want to use their default values. + + For example: + + ```sh + rladmin cluster ocsp config recovery_frequency set 30 + ``` + +1. Enable OCSP: + + ```sh + rladmin cluster ocsp config ocsp_functionality set enabled + ``` diff --git a/content/operate/rs/7.4/security/certificates/updating-certificates.md b/content/operate/rs/7.4/security/certificates/updating-certificates.md new file mode 100644 index 0000000000..377b0626b1 --- /dev/null +++ b/content/operate/rs/7.4/security/certificates/updating-certificates.md @@ -0,0 +1,145 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: Update certificates in a Redis Enterprise cluster. +linkTitle: Update certificates +title: Update certificates +weight: 20 +url: '/operate/rs/7.4/security/certificates/updating-certificates/' +--- + +{{}} +When you update the certificates, the new certificate replaces the same certificates on all nodes in the cluster. +{{}} + +## How to update certificates + +You can use the [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) command-line interface (CLI) or the [REST API]({{< relref "/operate/rs/references/rest-api" >}}) to update certificates. The Cluster Manager UI lets you update proxy and syncer certificates on the **Cluster > Security > Certificates** screen. + +The new certificates are used the next time the clients connect to the database. + +When you upgrade Redis Enterprise Software, the upgrade process copies the certificates that are on the first upgraded node to all of the nodes in the cluster. + +{{}} +Don't manually overwrite the files located in `/etc/opt/redislabs`. Instead, upload new certificates to a temporary location on one of the cluster nodes, such as the `/tmp` directory. +{{}} + +### Use the Cluster Manager UI + +To replace proxy or syncer certificates using the Cluster Manager UI: + +1. Go to **Cluster > Security > Certificates**. + +1. Expand the section for the certificate you want to update: + - For the proxy certificate, expand **Server authentication**. + - For the syncer certificate, expand **Replica Of and Active-Active authentication**. + + {{Expanded proxy certificate for server authentication.}} + +1. Click **Replace Certificate** to open the dialog. + + {{Replace proxy certificate dialog.}} + +1. Upload the key file. + +1. Upload the new certificate. + +1. Click **Save**. + +### Use the CLI + +To replace certificates with the `rladmin` CLI, run the [`cluster certificate set`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/certificate" >}}) command: + +```sh + rladmin cluster certificate set certificate_file .pem key_file .pem +``` + +Replace the following variables with your own values: + +- `` - The name of the certificate you want to replace. See the [certificates table]({{< relref "/operate/rs/security/certificates" >}}) for the list of valid certificate names. +- `` - The name of your certificate file +- `` - The name of your key file + +For example, to replace the Cluster Manager UI (`cm`) certificate with the private key `key.pem` and the certificate file `cluster.pem`: + +```sh +rladmin cluster certificate set cm certificate_file cluster.pem key_file key.pem +``` + +### Use the REST API + +To replace a certificate using the REST API, use [`PUT /v1/cluster/update_cert`]({{< relref "/operate/rs/references/rest-api/requests/cluster/certificates#put-cluster-update_cert" >}}): + +```sh +PUT https://[host][:port]/v1/cluster/update_cert + '{ "name": "", "key": "", "certificate": "" }' +``` + +Replace the following variables with your own values: + +- `` - The name of the certificate to replace. See the [certificates table]({{< relref "/operate/rs/security/certificates" >}}) for the list of valid certificate names. +- `` - The contents of the \*\_key.pem file + + {{< tip >}} + + The key file contains `\n` end of line characters (EOL) that you cannot paste into the API call. + You can use `sed -z 's/\n/\\\n/g'` to escape the EOL characters. + {{< /tip >}} + +- `` - The contents of the \*\_cert.pem file + +## Replica Of database certificates + +This section describes how to update certificates for Replica Of databases. + +### Update proxy certificates {#update-ap-proxy-certs} + +To update the proxy certificate on clusters running Replica Of databases: + +1. Use the Cluster Manager UI, `rladmin`, or the REST API to update the proxy certificate on the source database cluster. + +1. From the Cluster Manager UI, update the destination database (_replica_) configuration with the [new certificate]({{< relref "/operate/rs/databases/import-export/replica-of/create#encrypt-replica-database-traffic" >}}). + +{{}} +- Perform step 2 as quickly as possible after performing step 1. Connections using the previous certificate are rejected after applying the new certificate. Until both steps are performed, recovery of the database sync cannot be established. +{{}} + +## Active-Active database certificates + +### Update proxy certificates {#update-aa-proxy-certs} + +To update proxy certificate on clusters running Active-Active databases: + +1. Use the Cluster Manager UI, `rladmin`, or the REST API to update proxy certificates on a single cluster, multiple clusters, or all participating clusters. + +1. Use the [`crdb-cli`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}}) utility to update Active-Active database configuration from the command line. Run the following command once for each Active-Active database residing on the modified clusters: + + ```sh + crdb-cli crdb update --crdb-guid --force + ``` + +{{}} +- Perform step 2 as quickly as possible after performing step 1. Connections using the previous certificate are rejected after applying the new certificate. Until both steps are performed, recovery of the database sync cannot be established.
+- Do not run any other `crdb-cli crdb update` operations between the two steps. +{{
}} + +### Update syncer certificates {#update-aa-syncer-certs} + +To update your syncer certificate on clusters running Active-Active databases, follow these steps: + +1. Update your syncer certificate on one or more of the participating clusters using the Cluster Manager UI, `rladmin`, or the REST API. You can update a single cluster, multiple clusters, or all participating clusters. + +1. Update the Active-Active database configuration from the command line with the [`crdb-cli`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}}) utility. Run this command once for each Active-Active database that resides on the modified clusters: + + ```sh + crdb-cli crdb update --crdb-guid --force + ``` + +{{}} +- Run step 2 as quickly as possible after step 1. Between the two steps, new syncer connections that use the ‘old’ certificate will get rejected by the cluster that has been updated with the new certificate (in step 1).
+- Do not run any other `crdb-cli crdb update` operations between the two steps.
+- **Known limitation**: Updating syncer certificate on versions prior to 6.0.20-81 will restart the proxy and syncer connections. In these cases, we recommend scheduling certificate replacement carefully to minimize customer impact. +{{
}} diff --git a/content/operate/rs/7.4/security/encryption/_index.md b/content/operate/rs/7.4/security/encryption/_index.md new file mode 100644 index 0000000000..808d8b47b7 --- /dev/null +++ b/content/operate/rs/7.4/security/encryption/_index.md @@ -0,0 +1,74 @@ +--- +Title: Encryption in Redis Enterprise Software +alwaysopen: false +categories: +- docs +- operate +- rs +description: Encryption in Redis Enterprise Software. +hideListLinks: true +linkTitle: Encryption +toc: 'true' +weight: 60 +url: '/operate/rs/7.4/security/encryption/' +--- + +Redis Enterprise Software uses encryption to secure communications between clusters, nodes, databases, and clients and to protect [data in transit](https://en.wikipedia.org/wiki/Data_in_transit), [at rest](https://en.wikipedia.org/wiki/Data_at_rest), and [in use](https://en.wikipedia.org/wiki/Data_in_use). + +## Encrypt data in transit + +### TLS + +Redis Enterprise Software uses [Transport Layer Security (TLS)]({{}}) to encrypt communications for the following: + +- Cluster Manager UI + +- Command-line utilities + +- REST API + +- Internode communication + +You can also [enable TLS authentication]({{< relref "/operate/rs/security/encryption/tls/enable-tls" >}}) for the following: + +- Communication from clients or applications to your database + +- Communication from your database to other clusters for replication using [Replica Of]({{< relref "/operate/rs/databases/import-export/replica-of/" >}}) + +- Communication to and from your database to other clusters for [Active-Active]({{< relref "/operate/rs/databases/active-active/_index.md" >}}) synchronization + +### Internode encryption + +[Internode encryption]({{}}) uses TLS to encrypt data in transit between cluster nodes. + +By default, internode encryption is enabled for the control plane, which manages the cluster and databases. If you also want to encrypt replication and proxy communications between database shards on different nodes, [enable data internode encryption]({{< relref "/operate/rs/security/encryption/internode-encryption#enable-data-internode-encryption" >}}). + +### Require HTTPS for REST API endpoints + +By default, the Redis Enterprise Software API supports communication over HTTP and HTTPS. However, you can [turn off HTTP support]({{< relref "/operate/rs/references/rest-api/encryption" >}}) to ensure that API requests are encrypted. + +## Encrypt data at rest + +### File system encryption + +To encrypt data stored on disk, use file system-based encryption capabilities available on Linux operating systems before you install Redis Enterprise Software. + +### Private key encryption + +Enable PEM encryption to [encrypt all private keys]({{< relref "/operate/rs/security/encryption/pem-encryption" >}}) on disk. + +## Encrypt data in use + +### Client-side encryption + +Use client-side encryption to encrypt the data an application stores in a Redis database. The application decrypts the data when it retrieves it from the database. + +You can add client-side encryption logic to your application or use built-in client functions. + +Client-side encryption has the following limitations: + +- Operations that must operate on the data, such as increments, comparisons, and searches will not function properly. + +- Increases management overhead. + +- Reduces performance. diff --git a/content/operate/rs/7.4/security/encryption/internode-encryption.md b/content/operate/rs/7.4/security/encryption/internode-encryption.md new file mode 100644 index 0000000000..aa9a819461 --- /dev/null +++ b/content/operate/rs/7.4/security/encryption/internode-encryption.md @@ -0,0 +1,121 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: Describes internode encryption which improves the security of data in + transit. +linkTitle: Internode encryption +title: Internode encryption +weight: 15 +url: '/operate/rs/7.4/security/encryption/internode-encryption/' +--- +As of v6.2.4, Redis Enterprise Software supports _internode encryption_, which encrypts internal communication between nodes. This improves the security of data as it travels within a cluster. + +Internode encryption is enabled for the _control plane_, which manages the cluster and its databases. + +Internode encryption is supported for the _data plane_, which encrypts communication used to replicate shards between nodes and proxy communication with shards located on different nodes. + +The following diagram shows how this works. + +{{A diagram showing the interaction between data internode encryption, control plane encryption, and various elements of a cluster.}} + +Data internode encryption is disabled by default for individual databases in order to optimize for performance. Encryption adds latency and overhead; the impact is measurable and varies according to the database, its field types, and the details of the underlying use case. + +You can enable data internode encryption for a database by changing the database configuration settings. This lets you choose when to favor performance and when to encrypt data. + +## Prerequisites + +Internode encryption requires certain prerequisites. + +You need to: + +- Upgrade all nodes in the cluster to v6.2.4 or later. + +- Open port 3342 for the TLS channel used for encrypted communication. + + +## Enable data internode encryption + +To enable internode encryption for a database (also called _data internode encryption_), you need to enable the appropriate setting for each database you wish to encrypt. To do so, you can: + +- Use the Cluster Manager UI to enable the **Internode Encryption** setting from the database **Security** screen. + +- Use the `rladmin` command-line utility to set the [data_internode_encryption]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-db" >}}) setting for the database: + + ``` shell + rladmin tune db data_internode_encryption enabled + ``` + +- Use the Redis Enterprise Software REST API to set the `data_internode_encryption` setting for the database. + + ``` rest + put /v1/bdbs/${database_id} + { “data_internode_encryption” : true } + ``` + +When you change the data internode encryption setting for a database, all active remote client connections are disconnected. This restarts the internal (DMC) proxy and disconnects all client connections. + +## Change cluster policy + +To enable internode encryption for new databases by default, use one of the following methods: + +- Cluster Manager UI + + 1. On the **Databases** screen, select {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="Toggle actions button" width="22px" class="inline" >}} to open a list of additional actions. + + 1. Select **Database defaults**. + + 1. Go to **Internode Encryption** and click **Change**. + + 1. Select **Enabled** to enable internode encryption for new databases by default. + + 1. Click **Change**. + + 1. Select **Save**. + +- [rladmin tune cluster]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): + + ```sh + rladmin tune cluster data_internode_encryption enabled + ``` + +- [Update cluster policy]({{< relref "/operate/rs/references/rest-api/requests/cluster/policy#put-cluster-policy" >}}) REST API request: + + ```sh + PUT /v1/cluster/policy + { "data_internode_encryption": true } + ``` + +## Encryption ciphers and settings + +To encrypt internode communications, Redis Enterprise Software uses TLS 1.2 and the following cipher suites: + +- ECDHE-RSA-AES256-GCM-SHA384 +- ECDHE-RSA-AES128-GCM-SHA256 + +As of Redis Enterprise Software v7.4, internode encryption also supports TLS 1.3 with the following cipher suites: + +- TLS_AES_128_GCM_SHA256 +- TLS_AES_256_GCM_SHA384 + +The TLS layer determines which TLS version to use. + +No configurable settings are exposed; internode encryption is used internally within a cluster and not exposed to any outside service. + +## Certificate authority and rotation + +Starting with v6.2.4, internode communication is managed, in part, by two certificates: one for the control plane and one for the data plane. These certificates are signed by a private certificate authority (CA). The CA is not exposed outside of the cluster, so it cannot be accessed by external processes or services. In addition, each cluster generates a unique CA that is not used anywhere else. + +The private CA is generated when a cluster is created or upgraded to 6.2.4. + +When nodes join the cluster, the cluster CA is used to generate certificates for the new node, one for each plane. Certificates signed by the private CA are not shared between clusters and they're not exposed outside the cluster. + +All certificates signed by the internal CA expire after ninety (90) days and automatically rotate every thirty (30) days. Alerts also monitor certificate expiration and trigger when certificate expiration falls below 45 days. If you receive such an alert, contact support. + +You can use the Redis Enterprise Software REST API to rotate certificates manually: + +``` rest +POST /v1/cluster/certificates/rotate +``` diff --git a/content/operate/rs/7.4/security/encryption/pem-encryption.md b/content/operate/rs/7.4/security/encryption/pem-encryption.md new file mode 100644 index 0000000000..4304a1087c --- /dev/null +++ b/content/operate/rs/7.4/security/encryption/pem-encryption.md @@ -0,0 +1,52 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: Enable PEM encryption to encrypt all private keys on disk. +linkTitle: Encrypt private keys +title: Encrypt private keys +toc: 'true' +weight: 50 +url: '/operate/rs/7.4/security/encryption/pem-encryption/' +--- + +Enable PEM encryption to automatically encrypt all private keys on disk. Public keys (`.cert` files) are not encrypted. + +When certificates are rotated, the encrypted private keys are also rotated. + +## Enable PEM encryption + +To enable PEM encryption and encrypt private keys on the disk, use [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) or the [REST API]({{< relref "/operate/rs/references/rest-api" >}}). + + +- [`rladmin cluster config`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/config" >}}): + + ```sh + rladmin cluster config encrypt_pkeys enabled + ``` + +- [Update cluster settings]({{< relref "/operate/rs/references/rest-api/requests/cluster#put-cluster" >}}) REST API request: + + ```sh + PUT /v1/cluster + { "encrypt_pkeys": true } + ``` + +## Deactivate PEM encryption + +To deactivate PEM encryption and decrypt private keys on the disk, use [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) or the [REST API]({{< relref "/operate/rs/references/rest-api" >}}). + +- [`rladmin cluster config`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/config" >}}): + + ```sh + rladmin cluster config encrypt_pkeys disabled + ``` + +- [Update cluster settings]({{< relref "/operate/rs/references/rest-api/requests/cluster#put-cluster" >}}) REST API request: + + ```sh + PUT /v1/cluster + { "encrypt_pkeys": false } + ``` diff --git a/content/operate/rs/7.4/security/encryption/tls/_index.md b/content/operate/rs/7.4/security/encryption/tls/_index.md new file mode 100644 index 0000000000..f05dfd85e1 --- /dev/null +++ b/content/operate/rs/7.4/security/encryption/tls/_index.md @@ -0,0 +1,26 @@ +--- +Title: Transport Layer Security (TLS) +alwaysopen: false +categories: +- docs +- operate +- rs +description: An overview of Transport Layer Security (TLS). +hideListLinks: true +linkTitle: TLS +weight: 10 +url: '/operate/rs/7.4/security/encryption/tls/' +--- +[Transport Layer Security (TLS)](https://en.wikipedia.org/wiki/Transport_Layer_Security), a successor to SSL, ensures the privacy of data sent between applications and Redis databases. TLS also secures connections between Redis Enterprise Software nodes. + +You can [use TLS authentication]({{< relref "/operate/rs/security/encryption/tls/enable-tls" >}}) for the following types of communication: + +- Communication from clients (applications) to your database +- Communication from your database to other clusters for replication using [Replica Of]({{< relref "/operate/rs/databases/import-export/replica-of" >}}) +- Communication to and from your database to other clusters for synchronization using [Active-Active]({{< relref "/operate/rs/databases/active-active/" >}}) + +## Protocols and ciphers + +TLS protocols and ciphers define the overall suite of algorithms that clients are able to connect to the servers with. + +You can change the [TLS protocols]({{< relref "/operate/rs/security/encryption/tls/tls-protocols" >}}) and [ciphers]({{< relref "/operate/rs/security/encryption/tls/ciphers" >}}) to improve the security of your Redis Enterprise cluster and databases. The default settings are in line with industry best practices, but you can customize them to match the security policy of your organization. diff --git a/content/operate/rs/7.4/security/encryption/tls/ciphers.md b/content/operate/rs/7.4/security/encryption/tls/ciphers.md new file mode 100644 index 0000000000..bfbf6a6021 --- /dev/null +++ b/content/operate/rs/7.4/security/encryption/tls/ciphers.md @@ -0,0 +1,140 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: Shows how to configure cipher suites. +linkTitle: Configure cipher suites +title: Configure cipher suites +weight: 60 +url: '/operate/rs/7.4/security/encryption/tls/ciphers/' +--- + +Ciphers are algorithms that help secure connections between clients and servers. You can change the ciphers to improve the security of your Redis Enterprise cluster and databases. The default settings are in line with industry best practices, but you can customize them to match the security policy of your organization. + +## TLS 1.2 cipher suites + +| Name | Configurable | Description | +|------------|--------------|-------------| +| control_cipher_suites | ✅ Yes | Cipher list for TLS 1.2 communications for cluster administration (control plane) | +| data_cipher_list | ✅ Yes | Cipher list for TLS 1.2 communications between applications and databases (data plane) | +| sentinel_cipher_suites | ✅ Yes | Cipher list for [discovery service]({{< relref "/operate/rs/databases/durability-ha/discovery-service" >}}) (Sentinel) TLS 1.2 communications | + +## TLS 1.3 cipher suites + +| Name | Configurable | Description | +|------------|--------------|-------------| +| control_cipher_suites_tls_1_3 | ❌ No | Cipher list for TLS 1.3 communications for cluster administration (control plane) | +| data_cipher_suites_tls_1_3 | ✅ Yes | Cipher list for TLS 1.3 communications between applications and databases (data plane) | +| sentinel_cipher_suites_tls_1_3 | ❌ No | Cipher list for [discovery service]({{< relref "/operate/rs/databases/durability-ha/discovery-service" >}}) (Sentinel) TLS 1.3 communications | + +## Configure cipher suites + +You can configure ciphers with the [Cluster Manager UI](#edit-ciphers-ui), [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/config" >}}), or the [REST API]({{< relref "/operate/rs/references/rest-api/requests/cluster#put-cluster" >}}). + +{{}} +Configuring cipher suites overwrites existing ciphers rather than appending new ciphers to the list. +{{}} + +When you modify your cipher suites, make sure: + +- The configured TLS version matches the required cipher suites. +- The certificates in use are properly signed to support the required cipher suites. + +{{}} +- Redis Enterprise Software doesn't support static [Diffie–Hellman (`DH`) key exchange](https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange) ciphers. + +- It does support Ephemeral Diffie–Hellman (`DHE` or `ECDHE`) key exchange ciphers on Red Hat Enterprise Linux (RHEL) 8 and Bionic OS. +{{}} + +### Edit cipher suites in the UI {#edit-ciphers-ui} + +To configure cipher suites using the Cluster Manager UI: + +1. Go to **Cluster > Security**, then select the **TLS** tab. + +1. In the **Cipher suites lists** section, click **Configure**: + + {{Cipher suites lists as shown in the Cluster Manager UI.}} + +1. Edit the TLS cipher suites in the text boxes: + + {{Edit cipher suites drawer in the Cluster Manager UI.}} + +1. Click **Save**. + +### Control plane cipher suites {#control-plane-ciphers-tls-1-2} + +As of Redis Enterprise Software version 6.0.12, control plane cipher suites can use the BoringSSL library format for TLS connections to the Cluster Manager UI. See the BoringSSL documentation for a full list of available [BoringSSL configurations](https://github.com/google/boringssl/blob/master/ssl/test/runner/cipher_suites.go#L99-L131). + +#### Configure TLS 1.2 control plane cipher suites + +To configure TLS 1.2 cipher suites for cluster communication, use the following [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) command syntax: + +```sh +rladmin cluster config control_cipher_suites +``` + +See the example below to configure cipher suites for the control plane: + +```sh +rladmin cluster config control_cipher_suites ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305 +``` +{{}} +- The deprecated 3DES and RC4 cipher suites are no longer supported. +{{}} + + +### Data plane cipher suites {#data-plane-ciphers-tls-1-2} + +Data plane cipher suites use the OpenSSL library format in Redis Enterprise Software version 6.0.20 or later. For a list of available OpenSSL configurations, see [Ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) (OpenSSL). + +#### Configure TLS 1.2 data plane cipher suites + +To configure TLS 1.2 cipher suites for communications between applications and databases, use the following [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) command syntax: + +```sh +rladmin cluster config data_cipher_list +``` + +See the example below to configure cipher suites for the data plane: + +```sh +rladmin cluster config data_cipher_list AES128-SHA:AES256-SHA +``` +{{}} +- The deprecated 3DES and RC4 cipher suites are no longer supported. +{{}} + +#### Configure TLS 1.3 data plane cipher suites + +To configure TLS 1.3 cipher suites for communications between applications and databases, use the following [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) command syntax: + +```sh +rladmin cluster config data_cipher_suites_tls_1_3 +``` + +The following example configures TLS 1.3 cipher suites for the data plane: + +```sh +rladmin cluster config data_cipher_suites_tls_1_3 TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256 +``` + +### Discovery service cipher suites {#discovery-service-ciphers-tls-1-2} + +Sentinel service cipher suites use the golang.org OpenSSL format for [discovery service]({{< relref "/operate/rs/databases/durability-ha/discovery-service" >}}) TLS connections in Redis Enterprise Software version 6.0.20 or later. See their documentation for a list of [available configurations](https://golang.org/src/crypto/tls/cipher_suites.go). + +#### Configure TLS 1.2 discovery service cipher suites + +To configure TLS 1.2 cipher suites for the discovery service cipher suites, use the following [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}) command syntax: + +```sh +rladmin cluster config sentinel_cipher_suites +``` + +See the example below to configure cipher suites for the sentinel service: + +```sh +rladmin cluster config sentinel_cipher_suites TLS_RSA_WITH_AES_128_CBC_SHA:TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 +``` diff --git a/content/operate/rs/7.4/security/encryption/tls/enable-tls.md b/content/operate/rs/7.4/security/encryption/tls/enable-tls.md new file mode 100644 index 0000000000..ca7f627091 --- /dev/null +++ b/content/operate/rs/7.4/security/encryption/tls/enable-tls.md @@ -0,0 +1,133 @@ +--- +Title: Enable TLS +alwaysopen: false +categories: +- docs +- operate +- rs +description: Shows how to enable TLS. +linkTitle: Enable TLS +weight: 40 +url: '/operate/rs/7.4/security/encryption/tls/enable-tls/' +--- + +You can use TLS authentication for one or more of the following types of communication: + +- Communication from clients (applications) to your database +- Communication from your database to other clusters for replication using [Replica Of]({{< relref "/operate/rs/databases/import-export/replica-of/" >}}) +- Communication to and from your database to other clusters for synchronization using [Active-Active]({{< relref "/operate/rs/databases/active-active/_index.md" >}}) + +{{}} +When you enable or turn off TLS, the change applies to new connections but does not affect existing connections. Clients must close existing connections and reconnect to apply the change. +{{}} + +## Enable TLS for client connections {#client} + +To enable TLS for client connections: + +1. From your database's **Security** tab, select **Edit**. + +1. In the **TLS - Transport Layer Security for secure connections** section, make sure the checkbox is selected. + +1. In the **Apply TLS for** section, select **Clients and databases + Between databases**. + +1. Select **Save**. + +To enable mutual TLS for client connections: + +1. Select **Mutual TLS (Client authentication)**. + + {{Mutual TLS authentication configuration.}} + +1. For each client certificate, select **+ Add certificate**, paste or upload the client certificate, then select **Done**. + + If your database uses Replica Of or Active-Active replication, you also need to add the syncer certificates for the participating clusters. See [Enable TLS for Replica Of cluster connections](#enable-tls-for-replica-of-cluster-connections) or [Enable TLS for Active-Active cluster connections](#enable-tls-for-active-active-cluster-connections) for instructions. + +1. You can configure **Additional certificate validations** to further limit connections to clients with valid certificates. + + Additional certificate validations occur only when loading a [certificate chain](https://en.wikipedia.org/wiki/Chain_of_trust#Computer_security) that includes the [root certificate](https://en.wikipedia.org/wiki/Root_certificate) and intermediate [CA](https://en.wikipedia.org/wiki/Certificate_authority) certificate but does not include a leaf (end-entity) certificate. If you include a leaf certificate, mutual client authentication skips any additional certificate validations. + + 1. Select a certificate validation option. + + | Validation option | Description | + |-------------------|-------------| + | _No validation_ | Authenticates clients with valid certificates. No additional validations are enforced. | + | _By Subject Alternative Name_ | A client certificate is valid only if its Common Name (CN) matches an entry in the list of valid subjects. Ignores other [`Subject`](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) attributes. | + | _By full Subject Name_ | A client certificate is valid only if its [`Subject`](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) attributes match an entry in the list of valid subjects. | + + 1. If you selected **No validation**, you can skip this step. Otherwise, select **+ Add validation** to create a new entry and then enter valid [`Subject`](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) attributes for your client certificates. All `Subject` attributes are case-sensitive. + + | Subject attribute
(case-sensitive) | Description | + |-------------------|-------------| + | _Common Name (CN)_ | Name of the client authenticated by the certificate (_required_) | + | _Organization (O)_ | The client's organization or company name | + | _Organizational Unit (OU)_ | Name of the unit or department within the organization | + | _Locality (L)_ | The organization's city | + | _State / Province (ST)_ | The organization's state or province | + | _Country (C)_ | 2-letter code that represents the organization's country | + + You can only enter a single value for each field, except for the _Organizational Unit (OU)_ field. If your client certificate has a `Subject` with multiple _Organizational Unit (OU)_ values, press the `Enter` or `Return` key after entering each value to add multiple Organizational Units. + + {{An example that shows adding a certificate validation with multiple organizational units.}} + + **Breaking change:** If you use the [REST API]({{< relref "/operate/rs/references/rest-api" >}}) instead of the Cluster Manager UI to configure additional certificate validations, note that `authorized_names` is deprecated as of Redis Enterprise v6.4.2. Use `authorized_subjects` instead. See the [BDB object reference]({{< relref "/operate/rs/references/rest-api/objects/bdb" >}}) for more details. + +1. Select **Save**. + + {{< note >}} +By default, Redis Enterprise Software validates client certificate expiration dates. You can use `rladmin` to turn off this behavior. + +```sh +rladmin tune db < db:id | name > mtls_allow_outdated_certs enabled +``` + + {{< /note >}} + +## Enable TLS for Active-Active cluster connections + +To enable TLS for Active-Active cluster connections: + +1. If you are using the new Cluster Manager UI, switch to the legacy admin console. + + {{Select switch to legacy admin console from the dropdown.}} + +1. [Retrieve syncer certificates.](#retrieve-syncer-certificates) + +1. [Configure TLS certificates for Active-Active.](#configure-tls-certificates-for-active-active) + +1. [Configure TLS on all participating clusters.](#configure-tls-on-all-participating-clusters) + +{{< note >}} +You cannot enable or turn off TLS after the Active-Active database is created, but you can change the TLS configuration. +{{< /note >}} + +### Retrieve syncer certificates + +For each participating cluster, copy the syncer certificate from the **general** settings tab. + +{{< image filename="/images/rs/general-settings-syncer-cert.png" alt="general-settings-syncer-cert" >}} + +### Configure TLS certificates for Active-Active + +1. During database creation (see [Create an Active-Active Geo-Replicated Database]({{< relref "/operate/rs/databases/active-active/create.md" >}}), select **Edit** from the **configuration** tab. +1. Enable **TLS**. + - **Enforce client authentication** is selected by default. If you clear this option, you will still enforce encryption, but TLS client authentication will be deactivated. +1. Select **Require TLS for CRDB communication only** from the dropdown menu. + {{< image filename="/images/rs/crdb-tls-all.png" alt="crdb-tls-all" >}} +1. Select **Add** {{< image filename="/images/rs/icon_add.png#no-click" alt="Add" >}} +1. Paste a syncer certificate into the text box. + {{< image filename="/images/rs/database-tls-replica-certs.png" alt="Database TLS Configuration" >}} +1. Save the syncer certificate. {{< image filename="/images/rs/icon_save.png#no-click" alt="Save" >}} +1. Repeat this process, adding the syncer certificate for each participating cluster. +1. Optional: If also you want to require TLS for client connections, select **Require TLS for All Communications** from the dropdown and add client certificates as well. +1. Select **Update** at the bottom of the screen to save your configuration. + +### Configure TLS on all participating clusters + +Repeat this process on all participating clusters. + +To enforce TLS authentication, Active-Active databases require syncer certificates for each cluster connection. If every participating cluster doesn't have a syncer certificate for every other participating cluster, synchronization will fail. + +## Enable TLS for Replica Of cluster connections + +{{}} diff --git a/content/operate/rs/7.4/security/encryption/tls/tls-protocols.md b/content/operate/rs/7.4/security/encryption/tls/tls-protocols.md new file mode 100644 index 0000000000..18563c8d7b --- /dev/null +++ b/content/operate/rs/7.4/security/encryption/tls/tls-protocols.md @@ -0,0 +1,130 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +linkTitle: Configure TLS protocol +title: Configure TLS protocol +weight: 50 +url: '/operate/rs/7.4/security/encryption/tls/tls-protocols/' +--- + +You can change TLS protocols to improve the security of your Redis Enterprise cluster and databases. The default settings are in line with industry best practices, but you can customize them to match the security policy of your organization. + +## Configure TLS protocol + +The communications for which you can modify TLS protocols are: + +- Control plane - The TLS configuration for cluster administration. +- Data plane - The TLS configuration for the communication between applications and databases. +- Discovery service (Sentinel) - The TLS configuration for the [discovery service]({{< relref "/operate/rs/databases/durability-ha/discovery-service.md" >}}). + +You can configure TLS protocols with the [Cluster Manager UI](#edit-tls-ui), [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/config" >}}), or the [REST API]({{< relref "/operate/rs/references/rest-api/requests/cluster#put-cluster" >}}). + +{{}} +- After you set the minimum TLS version, Redis Enterprise Software does not accept communications with TLS versions older than the specified version. + +- If you set TLS 1.3 as the minimum TLS version, clients must support TLS 1.3 to connect to Redis Enterprise. +{{}} + +TLS support depends on the operating system. You cannot enable support for protocols or versions that aren't supported by the operating system running Redis Enterprise Software. In addition, updates to the operating system or to Redis Enterprise Software can impact protocol and version support. + +If you have trouble enabling specific versions of TLS, verify that they're supported by your operating system and that they're configured correctly. + +{{}} +TLSv1.2 is generally recommended as the minimum TLS version for encrypted communications. Check with your security team to confirm which TLS protocols meet your organization's policies. +{{}} + +### Edit TLS settings in the UI {#edit-tls-ui} + +To configure minimum TLS versions using the Cluster Manager UI: + +1. Go to **Cluster > Security**, then select the **TLS** tab. + +1. Click **Edit**. + +1. Select the minimum TLS version for cluster connections, database connections, and the discovery service: + + {{Cluster > Security > TLS settings in edit mode in the Cluster Manager UI.}} + +1. Select the TLS mode for the discovery service: + + - **Allowed** - Allows both TLS and non-TLS connections + - **Required** - Allows only TLS connections + - **Disabled** - Allows only non-TLS connections + +1. Click **Save**. + +### Control plane TLS + +To set the minimum TLS protocol for the control plane using `rladmin`: + +- Default minimum TLS protocol: TLSv1.2 +- Syntax: `rladmin cluster config min_control_TLS_version ` +- TLS versions available: + - For TLSv1.2 - 1.2 + - For TLSv1.3 - 1.3 + +For example: + +```sh +rladmin cluster config min_control_TLS_version 1.2 +``` + +### Data plane TLS + +To set the minimum TLS protocol for the data path using `rladmin`: + +- Default minimum TLS protocol: TLSv1.2 +- Syntax: `rladmin cluster config min_data_TLS_version ` +- TLS versions available: + - For TLSv1.2 - 1.2 + - For TLSv1.3 - 1.3 + +For example: + +```sh +rladmin cluster config min_data_TLS_version 1.2 +``` + + +### Discovery service TLS + +To enable TLS for the discovery service using `rladmin`: + +- Default: Allows both TLS and non-TLS connections +- Syntax: `rladmin cluster config sentinel_tls_mode ` +- `ssl_policy` values available: + - `allowed` - Allows both TLS and non-TLS connections + - `required` - Allows only TLS connections + - `disabled` - Allows only non-TLS connections + +To set the minimum TLS protocol for the discovery service using `rladmin`: + +- Default minimum TLS protocol: TLSv1.2 +- Syntax: `rladmin cluster config min_sentinel_TLS_version ` +- TLS versions available: + - For TLSv1.2 - 1.2 + - For TLSv1.3 - 1.3 + +To enforce a minimum TLS version for the discovery service, run the following commands: + +1. Allow only TLS connections: + + ```sh + rladmin cluster config sentinel_tls_mode required + ``` + +1. Set the minimal TLS version: + + ```sh + rladmin cluster config min_sentinel_TLS_version 1.2 + ``` + +1. Restart the discovery service on all cluster nodes to apply your changes: + + ```sh + supervisorctl restart sentinel_service + ``` diff --git a/content/operate/rs/7.4/security/recommended-security-practices.md b/content/operate/rs/7.4/security/recommended-security-practices.md new file mode 100644 index 0000000000..f6af0c3fa1 --- /dev/null +++ b/content/operate/rs/7.4/security/recommended-security-practices.md @@ -0,0 +1,69 @@ +--- +Title: Recommended security practices +alwaysopen: false +categories: +- docs +- operate +- rs +description: null +linkTitle: Recommended security practices +hideListLinks: true +weight: 5 +aliases: + - /operate/rs/security/admin-console-security/ +url: '/operate/rs/7.4/security/recommended-security-practices/' +--- + +## Deployment security + +When deploying Redis Enterprise Software to production, we recommend the following practices: + +- **Deploy Redis Enterprise inside a trusted network**: Redis Enterprise is database software and should be deployed on a trusted network not accessible to the public internet. Deploying Redis Enterprise in a trusted network reduces the likelihood that someone can obtain unauthorized access to your data or the ability to manage your database configuration. + +- **Implement anti-virus exclusions**: To ensure that anti-virus solutions that scan files or intercept processes to protect memory do not interfere with Redis Enterprise software, you should ensure that anti-virus exclusions are implemented across all nodes in their Redis Enterprise cluster in a consistent policy. This helps ensure that anti-virus software does not impact the availability of your Redis Enterprise cluster. + + If you are replacing your existing antivirus solution or installing/supporting Redis Enterprise, make sure that the below paths are excluded: + + {{< note >}} +For antivirus solutions that intercept processes, binary files may have to be excluded directly depending on the requirements of your anti-virus vendor. + {{< /note >}} + + | **Path** | **Description** | + |------------|-----------------| + | /opt/redislabs | Main installation directory for all Redis Enterprise Software binaries | + | /opt/redislabs/bin | Binaries for all the utilities for command line access and managements such as "rladmin" or "redis-cli" | + | /opt/redislabs/config | System configuration files | + | /opt/redislabs/lib | System library files | + | /opt/redislabs/sbin | System binaries for tweaking provisioning | + +- **Send logs to a remote logging server**: Redis Enterprise is configured to send logs by default to syslog. To send these logs to a remote logging server you must [configure syslog]({{}}) based the requirements of the remote logging server vendor. Remote logging helps ensure that the logs are not deleted so that you can rotate the logs to prevent your server disk from filling up. + +- **Deploy clusters with an odd number of 3 or more nodes**: Redis is an available and partition-tolerant database. We recommend that Redis Enterprise be deployed in a cluster of an odd number of 3 or more nodes so that you are able to successfully failover in the event of a failure. + +- **Reboot nodes in a sequence rather than all at once**: It is best practice to frequently maintain reboot schedules. If you reboot too many servers at once, it is possible to cause a quorum failure that results in loss of availability of the database. We recommend that rebooting be done in a phased manner so that quorum is not lost. For example, to maintain quorum in a 3 node cluster, at least 2 nodes must be up at all times. Only one server should be rebooted at any given time to maintain quorum. + +- **Implement client-side encryption**: Client-side encryption, or the practice of encrypting data within an application before storing it in a database, such as Redis, is the most widely adopted method to achieve encryption in memory. Redis is an in-memory database and stores data in-memory. If you require encryption in memory, better known as encryption in use, then client side encryption may be the right solution for you. Please be aware that database functions that need to operate on data — such as simple searching functions, comparisons, and incremental operations — don’t work with client-side encryption. + +## Cluster security + +- **Control the level of access to your system**: Redis Enterprise lets you decide which users can access the cluster, which users can access databases, and which users can access both. We recommend preventing database users from accessing the cluster. See [Access control]({{}}) for more information. + +- **Enable LDAP authentication**: If your organization uses the Lightweight Directory Access Protocol (LDAP), we recommend enabling Redis Enterprise Software support for role-based LDAP authentication. + +- **Require HTTPS for API endpoints**: Redis Enterprise comes with a REST API to help automate tasks. This API is available in both an encrypted and unencrypted endpoint for backward compatibility. You can [disable the unencrypted endpoint]({{}}) with no loss in functionality. + +## Database security + +Redis Enterprise offers several database security controls to help protect your data against unauthorized access and to improve the operational security of your database. The following section details configurable security controls available for implementation. + +- **Use strong Redis passwords**: A frequent recommendation in the security industry is to use strong passwords to authenticate users. This helps to prevent brute force password guessing attacks against your database. Its important to check that your password aligns with your organizations security policy. + +- **Deactivate default user access**: Redis Enterprise comes with a "default" user for backwards compatibility with applications designed with versions of Redis prior to Redis Enterprise 6. The default user is turned on by default. This allows you to access the database without specifying a username and only using a shared secret. For applications designed to use access control lists, we recommend that you [deactivate default user access]({{}}). + +- **Configure Transport Layer Security (TLS)**: Similar to the control plane, you can also [configure TLS protocols]({{}}) to help support your security and compliance needs. + +- **Enable client certificate authentication**: To prevent unauthorized access to your data, Redis Enterprise databases support the [TLS protocol]({{}}), which includes authentication and encryption. Client certificate authentication can be used to ensure only authorized hosts can access the database. + +- **Install trusted certificates**: Redis implements self-signed certificates for the database proxy and replication service, but many organizations prefer to [use their own certificates]({{}}). + +- **Configure and verify database backups**: Implementing a disaster recovery strategy is an important part of data security. Redis Enterprise supports [database backups to many destinations]({{}}). diff --git a/content/operate/rs/_index.md b/content/operate/rs/_index.md index 9159a0e374..03cac016a1 100644 --- a/content/operate/rs/_index.md +++ b/content/operate/rs/_index.md @@ -8,6 +8,7 @@ categories: description: The self-managed, enterprise-grade version of Redis. hideListLinks: true weight: 10 +linkTitle: Redis Software --- [Redis Enterprise](https://redis.io/enterprise/) is a self-managed, enterprise-grade version of Redis. diff --git a/content/operate/rs/clusters/_index.md b/content/operate/rs/clusters/_index.md index 15f80a9d0d..c9415310bd 100644 --- a/content/operate/rs/clusters/_index.md +++ b/content/operate/rs/clusters/_index.md @@ -15,5 +15,5 @@ weight: 36 You can manage your Redis Enterprise Software clusters with several different tools: - Cluster Manager UI (the web-based user interface) -- Command-line tools ([rladmin]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}), [redis-cli]({{< relref "/develop/connect/cli" >}}), [crdb-cli]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}})) +- Command-line tools ([rladmin]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}), [redis-cli]({{< relref "/develop/tools/cli" >}}), [crdb-cli]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}})) - [REST API]({{< relref "/operate/rs/references/rest-api/_index.md" >}}) diff --git a/content/operate/rs/clusters/add-node.md b/content/operate/rs/clusters/add-node.md index e43d2f7620..e97a7f51da 100644 --- a/content/operate/rs/clusters/add-node.md +++ b/content/operate/rs/clusters/add-node.md @@ -1,5 +1,5 @@ --- -Title: Add a cluster node +Title: Add a node alwaysopen: false categories: - docs @@ -12,7 +12,8 @@ weight: 20 When you install Redis Enterprise Software on the first node of a cluster, you create the new cluster. After you install the first node, you can add more nodes to the cluster. -{{< note >}} +## Prerequisites + Before you add a node to the cluster: - The clocks on all nodes must always be [synchronized]({{< relref "/operate/rs/clusters/configure/sync-clocks.md" >}}). @@ -25,7 +26,8 @@ Before you add a node to the cluster: - We recommend that you add nodes one after the other rather than in parallel to avoid errors that occur because the connection to the other nodes in the cluster cannot be verified. -{{< /note >}} + +## Add node To add a node to an existing cluster: @@ -75,7 +77,18 @@ You can see it in the list of nodes in the cluster. If you see an error when you add the node, try adding the node again. -{{< tip >}} -We recommend that you run the [rlcheck utility]({{< relref "/operate/rs/references/cli-utilities/rlcheck" >}}) to verify that the node is functioning properly. -{{< /tip >}} +## Verify node + +We recommend that you verify the node is functioning properly using one of the following methods: + +- Cluster Manager UI method: + + 1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to verify. + + 1. Select **Verify node** from the list. + + {{Click the more actions button for a node to access node actions.}} + +- Command-line method: + Run the [`rlcheck`]({{< relref "/operate/rs/references/cli-utilities/rlcheck" >}}) utility from the node's command line. diff --git a/content/operate/rs/clusters/change-node-role.md b/content/operate/rs/clusters/change-node-role.md new file mode 100644 index 0000000000..7849da8509 --- /dev/null +++ b/content/operate/rs/clusters/change-node-role.md @@ -0,0 +1,47 @@ +--- +Title: Change node roles +alwaysopen: false +categories: +- docs +- operate +- rs +description: Change node roles to demote the primary node to a secondary node or promote a secondary node to become the primary node. +linkTitle: Change node roles +weight: 65 +--- + +A Redis Software cluster contains a primary node, which coordinates cluster-wide management operations, and multiple secondary nodes. Nodes with either role can host database shards. + +## Demote primary node + +To demote the primary node to a secondary node using the Cluster Manager UI: + +1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to promote. + + {{Click the more actions button for a node to access node actions.}} + +1. Select **Set as a secondary node** from the list. + +1. Select one of the options to determine the new primary node: + + - **Automatically**: The cluster decides which node becomes the new primary node. + + - **Choose specific node**: You can manually select which node becomes the new primary node. + + {{The Set as a secondary node dialog has two options to select the new primary node, either automatically or manually.}} + +1. Click **Confirm**. + +## Promote secondary node + +To promote a secondary node to become the primary node using the Cluster Manager UI: + +1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to promote. + + {{Click the more actions button for a node to access node actions.}} + +1. Select **Set as the primary node** from the list. + +1. Click **Confirm**. + +After this node becomes the primary node, all cluster management traffic is directed to it. diff --git a/content/operate/rs/clusters/configure/_index.md b/content/operate/rs/clusters/configure/_index.md index 01278ad023..5747f442b2 100644 --- a/content/operate/rs/clusters/configure/_index.md +++ b/content/operate/rs/clusters/configure/_index.md @@ -13,7 +13,7 @@ weight: 50 You can manage your Redis Enterprise Software clusters with several different tools: - Cluster Manager UI (the web-based user interface) -- Command-line tools ([rladmin]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}), [redis-cli]({{< relref "/develop/connect/cli" >}}), [crdb-cli]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}})) +- Command-line tools ([rladmin]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}), [redis-cli]({{< relref "/develop/tools/cli" >}}), [crdb-cli]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}})) - [REST API]({{< relref "/operate/rs/references/rest-api/_index.md" >}}) diff --git a/content/operate/rs/clusters/configure/license-keys.md b/content/operate/rs/clusters/configure/license-keys.md index 22d21473ef..de7fe71182 100644 --- a/content/operate/rs/clusters/configure/license-keys.md +++ b/content/operate/rs/clusters/configure/license-keys.md @@ -88,7 +88,46 @@ When the license is expired: - Fail over when a node fails and explicitly migrate shards between nodes. - Upgrade a node to a new version of Redis Enterprise Software. - + +## Configure license expiration alert + +By default, a cluster license alert is scheduled to occur 7 days before the cluster license expiration date. + +{{An alert appears in the Cluster Manager UI that says 'Your license will expire on day-month-year time. Contact support to renew your license.'}} + +You can adjust the threshold value of the cluster license expiration alert based on how far in advance you want to be notified of the license expiration. The value should be within a reasonable range that allows your organization enough time to take action, such as renewing the license, before it expires. + +To change the cluster license alert settings, use one of the following methods: + +- Cluster Manager UI: + + 1. On the **Cluster > Configuration** screen, select the **Alerts Settings** tab. + + 1. Click **Edit**. + + 1. In the **Cluster utilization** section, enable the alert setting "License expiry notifications will be sent \ days before the license expires" and enter a new value in the box. + + {{Cluster utilization alert settings.}} + + 1. Click **Save**. + + +- [Update cluster]({{}}) REST API request: + + The following example changes the cluster license alert to occur 30 days before the cluster license expiration date: + + ```sh + PUT /v1/cluster + { + "alert_settings": { + "cluster_license_about_to_expire": { + "enabled": true, + "threshold": "30" + } + } + } + ``` + ## Monitor cluster license As of version 7.2, Redis Enterprise exposes the license quotas and the shards consumption metrics in the Cluster Manager UI or via the [Prometheus integration]({{< relref "/integrate/prometheus-with-redis-enterprise/" >}}). diff --git a/content/operate/rs/clusters/logging/alerts-events.md b/content/operate/rs/clusters/logging/alerts-events.md index 58a856307b..fc30d6a221 100644 --- a/content/operate/rs/clusters/logging/alerts-events.md +++ b/content/operate/rs/clusters/logging/alerts-events.md @@ -8,11 +8,6 @@ categories: description: Logged alerts and events linkTitle: Alerts and events weight: 50 -aliases: - - /operate/rs/clusters/logging/rsyslog-logging/cluster-events/ - - /operate/rs/clusters/logging/rsyslog-logging/bdb-events/ - - /operate/rs/clusters/logging/rsyslog-logging/node-events/ - - /operate/rs/clusters/logging/rsyslog-logging/user-events/ --- The following alerts and events can appear in `syslog` and the Cluster Manager UI logs. diff --git a/content/operate/rs/clusters/logging/log-security.md b/content/operate/rs/clusters/logging/log-security.md index 6ba7e715aa..e0e15ecc74 100644 --- a/content/operate/rs/clusters/logging/log-security.md +++ b/content/operate/rs/clusters/logging/log-security.md @@ -26,13 +26,13 @@ By default, log rotation occurs when a log exceeds 200 MB. We recommend sending The following log rotation policy is enabled by default in Redis Enterprise Software, but you can modify it as needed. ```sh -/var/opt/redislabs/log/*.log { +${logdir}/*.log { su ${osuser} ${osgroup} - size 200M + maxsize 200M + daily missingok copytruncate - # 2000 is logrotate's way of saying 'infinite' - rotate 2000 + rotate 10 maxage 7 compress notifempty @@ -40,12 +40,12 @@ The following log rotation policy is enabled by default in Redis Enterprise Soft nosharedscripts prerotate # copy cluster_wd log to another file that will have longer retention - if [ "\$1" = "/var/opt/redislabs/log/cluster_wd.log" ]; then - cp -p /var/opt/redislabs/log/cluster_wd.log /var/opt/redislabs/log/cluster_wd.log.long_retention + if [ "\$1" = "${logdir}/cluster_wd.log" ]; then + cp -p ${logdir}/cluster_wd.log ${logdir}/cluster_wd.log.long_retention fi endscript } -/var/opt/redislabs/log/cluster_wd.log.long_retention { +${logdir}/cluster_wd.log.long_retention { su ${osuser} ${osgroup} daily missingok @@ -57,23 +57,25 @@ The following log rotation policy is enabled by default in Redis Enterprise Soft } ``` -- `/var/opt/redislabs/log/*.log` - `logrotate` checks the files under the `$logdir` directory (`/var/opt/redislabs/log/`) and rotates any files that end with the extension `.log`. +- `${logdir}/*.log`: `logrotate` checks the files under the `$logdir` directory (`/var/opt/redislabs/log/`) and rotates any files that end with the extension `.log`. + +- `${logdir}/cluster_wd.log.long_retention`: `cluster_wd.log` is copied to `cluster_wd.log.long_retention` before rotation. This copy is kept longer than usual, which is 30 days by default. -- `/var/opt/redislabs/log/cluster_wd.log.long_retention` - The contents of `cluster_wd.log` is copied to `cluster_wd.log.long_retention` before rotation, and this copy is kept for longer than normal (30 days). +- `maxsize 200M`: Rotate log files that exceed 200 MB. -- `size 200M` - Rotate log files that exceed 200 MB. +- `daily`: Rotate logs every day regardless of their size. -- `missingok` - If there are missing log files, do nothing. +- `missingok`: If there are missing log files, do nothing. -- `copytruncate` - Truncate the original log file to zero sizes after creating a copy. +- `copytruncate`: Truncate the original log file to zero sizes after creating a copy. -- `rotate 2000` - Keep up to 2000 (effectively infinite) log files. +- `rotate 10`: Save a maximum of 10 rotated log files. To keep effectively infinite log files, use `rotate 2000` instead. -- `compress` - gzip log files. +- `compress`: gzip log files. -- `maxage 7` - Keep the rotated log files for 7 days. +- `maxage 7`: Keep the rotated log files for 7 days. -- `notifempty` - Don't rotate the log file if it is empty. +- `notifempty`: Don't rotate the log file if it is empty. {{}} 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. diff --git a/content/operate/rs/clusters/monitoring/_index.md b/content/operate/rs/clusters/monitoring/_index.md index ad6d62cfc3..becff8195e 100644 --- a/content/operate/rs/clusters/monitoring/_index.md +++ b/content/operate/rs/clusters/monitoring/_index.md @@ -13,14 +13,21 @@ weight: 96 --- You can use the metrics that measure the performance of your Redis Enterprise Software clusters, nodes, databases, and shards to monitor the performance of your databases. -In the Redis Enterprise Cluster Manager UI, you can see real-time metrics and configure alerts that send notifications based on alert parameters. You can also access metrics and configure alerts through the REST API. +In the Redis Enterprise Cluster Manager UI, you can view metrics, configure alerts, and send notifications based on alert parameters. You can also access metrics and configure alerts through the REST API. + +Redis Enterprise version 7.8.2 introduces a preview of the new metrics stream engine that exposes the v2 Prometheus scraping endpoint at `https://:8070/v2`. +This new engine exports all time-series metrics to external monitoring tools such as Grafana, DataDog, NewRelic, and Dynatrace using Prometheus. + +The new engine enables real-time monitoring, including full monitoring during maintenance operations, providing full visibility into performance during events such as shards' failovers and scaling operations. + +If you are already using the existing scraping endpoint for integration, follow [this guide]({{}}) to transition and try the new engine. It is possible to scrape both existing and new endpoints simultaneously, allowing advanced dashboard preparation and a smooth transition. To integrate Redis Enterprise metrics into your monitoring environment, see the integration guides for [Prometheus and Grafana]({{< relref "/integrate/prometheus-with-redis-enterprise/" >}}) or [Uptrace]({{< relref "/integrate/uptrace-with-redis-enterprise/" >}}). Make sure you read the [definition of each metric]({{< relref "/operate/rs/references/metrics/" >}}) so that you understand exactly what it represents. -## Real-time metrics +## Cluster manager metrics You can see the metrics of the cluster in: diff --git a/content/operate/rs/clusters/remove-node.md b/content/operate/rs/clusters/remove-node.md index b81b711e76..3748e78331 100644 --- a/content/operate/rs/clusters/remove-node.md +++ b/content/operate/rs/clusters/remove-node.md @@ -1,5 +1,5 @@ --- -Title: Remove a cluster node +Title: Remove a node alwaysopen: false categories: - docs @@ -73,25 +73,25 @@ The [DNS records]({{< relref "/operate/rs/networking/cluster-dns" >}}) must be u To remove a node using the Cluster Manager UI: -1. If you are using the new Cluster Manager UI, switch to the legacy admin console. +1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to remove. - {{Select switch to legacy admin console from the dropdown.}} + {{Click the more actions button for a node to access node actions.}} -1. On the **nodes** page, select the node you want to remove. +1. Select **Remove node** from the list. -1. Click **Remove** at the top of the **node** page. +1. If there are shards on the node, select **Confirm node removal**. -1. Confirm you want to **Remove** the node when prompted. + {{The Confirm node removal checkbox is selected, and the Remove button is clickable.}} -1. Redis Enterprise Software examines the node and the cluster and takes the actions required - to remove the node. + If the node has no shards, the **Confirm node removal** checkbox does not appear. -1. At any point, you can click the **Abort** button to stop the - process. When aborted, the current internal action is completed, and - then the process stops. - -1. Once the process finishes, the node is no longer shown in - the UI. +1. Click **Remove**. + + Redis Enterprise Software examines the node and the cluster, then takes the actions required to remove the node, such as migrating shards to other nodes. After the process finishes, the node is no longer shown in the UI. + + {{}} +At any point, you can click the **Cancel removal** button to stop the process. When cancelled, the current internal action is completed, and then the process stops. + {{}} To remove a node using the REST API, use [`POST /v1/nodes//actions/remove`]({{< relref "/operate/rs/references/rest-api/requests/nodes/actions#post-node-action" >}}). diff --git a/content/operate/rs/databases/_index.md b/content/operate/rs/databases/_index.md index d76785dd86..a5366a808e 100644 --- a/content/operate/rs/databases/_index.md +++ b/content/operate/rs/databases/_index.md @@ -15,7 +15,7 @@ weight: 37 You can manage your Redis Enterprise Software databases with several different tools: - Cluster Manager UI (the web-based user interface) -- Command-line tools ([`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}), [`redis-cli`]({{< relref "/develop/connect/cli" >}}), [`crdb-cli`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}})) +- Command-line tools ([`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}), [`redis-cli`]({{< relref "/develop/tools/cli" >}}), [`crdb-cli`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}})) - [REST API]({{< relref "/operate/rs/references/rest-api/_index.md" >}}) diff --git a/content/operate/rs/databases/active-active/create.md b/content/operate/rs/databases/active-active/create.md index 1c9576ba12..c2bc8d1247 100644 --- a/content/operate/rs/databases/active-active/create.md +++ b/content/operate/rs/databases/active-active/create.md @@ -132,6 +132,8 @@ If you create a database with Auto Tiering enabled, you also need to set the RAM for this database. Minimum RAM is 10%. Maximum RAM is 50%. {{< /note >}} +- **Memory eviction** - The default [eviction policy]({{}}) for Active-Active databases is `noeviction`. Redis Enterprise versions 6.0.20 and later support all eviction policies for Active-Active databases, unless [Auto Tiering]({{}}) is enabled. + - [**Capabilities**]({{< relref "/operate/oss_and_stack/stack-with-enterprise" >}}) (previously **Modules**) - 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 [Redis Enterprise and Redis Stack feature compatibility ]({{< relref "/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities" >}}) for compatibility details. @@ -154,38 +156,39 @@ If you enable TLS when you create the Active-Active database, the nodes use the After you create the Active-Active database, you can set the TLS mode to **Require TLS for all communications** so client communication from applications are also authenticated and encryption. -### High availability & durability +### High availability - [**Replication**]({{< relref "/operate/rs/databases/durability-ha/replication" >}}) - We recommend that all Active-Active database use replication for best intercluster synchronization performance. When replication is enabled, every Active-Active database master shard is replicated to a corresponding replica shard. The replica shards are then used to synchronize data between the instances, and the master shards are dedicated to handling client requests. - We also recommend that you enable [replica HA]({{< relref "/operate/rs/databases/configure/replica-ha" >}}) to ensure that the replica shards are highly-available for this synchronization. - -- [**Data persistence**]({{< relref "/operate/rs/databases/configure/database-persistence.md" >}}) - To protect against loss of data stored in RAM, you can enable data persistence to store a copy of the data on disk. - - Active-Active databases support append-only file (AOF) persistence only. Snapshot persistence is not supported for Active-Active databases. - -- **Eviction policy** - The default eviction policy for Active-Active databases is `noeviction`. Redis Enterprise version 6.0.20 and later support all eviction policies for Active-Active databases, unless [Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering" >}}) is enabled. +- [**Replica high availability**]({{< relref "/operate/rs/databases/configure/replica-ha" >}}) - We also recommend that you enable replica high availability to ensure replica shards are highly-available for this synchronization. ### Clustering -- In the **Database clustering** option, you can either: +- In the [**Clustering**]({{}}) section, you can either: - - Make sure the Database clustering is enabled and select the number of shards - that you want to have in the database. When database clustering is enabled, - databases are subject to limitations on [Multi-key commands]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}). + - **Enable sharding** and select the number of shards you want to have in the database. When database clustering is enabled, databases have limitations for [multi-key operations]({{}}). + You can increase the number of shards in the database at any time. - - Clear the **Database clustering** option to use only one shard so that you - can use [Multi-key commands]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}) - without the limitations. + - Clear the **Enable sharding** option to use only one shard, which allows you to use [multi-key operations]({{}}) without the limitations. {{}} You cannot enable or turn off database clustering after the Active-Active database is created. {{}} -- [**OSS Cluster API**]({{< relref "/operate/rs/databases/configure/oss-cluster-api.md" >}}) - {{< embed-md "oss-cluster-api-intro.md" >}} +- [**OSS Cluster API**]({{< relref "/operate/rs/databases/configure/oss-cluster-api.md" >}}) - The OSS Cluster API configuration allows access to multiple endpoints for increased throughput. The OSS Cluster API setting applies to all instances of the Active-Active database across participating clusters. + + 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. + + When you enable the OSS Cluster API, shard placement changes to _Sparse_, and the database proxy policy changes to _All primary shards_ automatically. + +### Durability + +To protect against loss of data stored in RAM, you can enable [**Persistence**]({{}}) to store a copy of the data on disk. + +Active-Active databases support append-only file (AOF) persistence only. Snapshot persistence is not supported for Active-Active databases. ### Access control diff --git a/content/operate/rs/databases/active-active/get-started.md b/content/operate/rs/databases/active-active/get-started.md index 506f71f313..fdc04e64af 100644 --- a/content/operate/rs/databases/active-active/get-started.md +++ b/content/operate/rs/databases/active-active/get-started.md @@ -128,9 +128,9 @@ Each Active-Active instance must have a unique fully-qualified domain name (FQDN 1. Configure additional settings: - 1. In the **High availability & durability** section, turn off **Replication** since each cluster has only one node in this setup: + 1. In the **High availability** section, turn off **Replication** since each cluster has only one node in this setup: - {{Turn off replication in the High availability & durability section.}} + {{Turn off replication in the High availability section.}} 1. In the **Clustering** section, either: diff --git a/content/operate/rs/databases/auto-tiering/quickstart.md b/content/operate/rs/databases/auto-tiering/quickstart.md index e225900612..48a02b4f63 100644 --- a/content/operate/rs/databases/auto-tiering/quickstart.md +++ b/content/operate/rs/databases/auto-tiering/quickstart.md @@ -103,7 +103,7 @@ On the **Databases** screen: 1. Verify **Flash** is selected for **Runs on**. - {{Create a quick database with Runs on Flash selected.}} + {{Create a quick database with Runs on Flash selected.}} 1. Enter `12000` for the endpoint **Port** number. @@ -115,11 +115,8 @@ You now have a database with Auto Tiering enabled! ## Connect to your database -You are ready to connect to your database to store data. See the [test connectivity]({{< relref "/operate/rs/databases/connect/test-client-connectivity.md" >}}) page to learn how to connect to your database. +After you create the database, you can connect to it and store data. See [Test client connection]({{}}) for connection options and examples. ## Next steps -If you want to generate load against the -database or add a bunch of data for cluster testing, see the [memtier_benchmark quick start]({{< relref "/operate/rs/clusters/optimize/memtier-benchmark.md" >}}) for help. - To see the true performance and scale of Auto Tiering, you must tune your I/O path and set the flash path to the mounted path of SSD or NVMe flash memory as that is what it is designed to run on. For more information, see [Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering/" >}}). diff --git a/content/operate/rs/databases/configure/_index.md b/content/operate/rs/databases/configure/_index.md index 9dd066054b..914b7f2013 100644 --- a/content/operate/rs/databases/configure/_index.md +++ b/content/operate/rs/databases/configure/_index.md @@ -22,7 +22,7 @@ You can manage your Redis Enterprise Software databases with several tools: - [`crdb-cli`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli" >}}) for Active-Active database configuration - - [`redis-cli`]({{< relref "/develop/connect/cli" >}}) for Redis Community Edition configuration + - [`redis-cli`]({{< relref "/develop/tools/cli" >}}) for Redis Community Edition configuration - [REST API]({{< relref "/operate/rs/references/rest-api/_index.md" >}}) @@ -46,9 +46,13 @@ For [Active-Active database instances]({{< relref "/operate/rs/databases/active- ## Configuration settings {#config-settings} +### General + +- [**Tags**]({{}}) - Add custom tags to categorize the database. + - **Database version** - Select the Redis version when you create a database. -- **Name** - The database name requirements are: +- **Database name** - The database name requirements are: - Maximum of 63 characters @@ -65,32 +69,43 @@ You cannot change the [port number]({{< relref "/operate/rs/networking/port-conf after the database is created. {{< /note >}} +### Capacity + - **Memory limit** - [Database memory limits]({{< relref "/operate/rs/databases/memory-performance/memory-limit.md" >}}) include all database replicas and shards, including replica shards in database replication and database shards in database clustering. - If the total size of the database in the cluster reaches the memory limit, the data eviction policy for the database is enforced. + If the total size of the database in the cluster reaches the memory limit, the memory eviction policy for the database is enforced. - {{< note >}} -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%. - {{< /note >}} +- **RAM limit** - If you create a database with Auto Tiering enabled, you also need to set the RAM-to-Flash ratio. Minimum RAM is 10%. Maximum RAM is 50%. + +- [**Memory eviction**]({{}}) - By default, when the total size of the database reaches its memory limit, the database evicts keys according to the least recently used keys out of all keys with an "expire" field set to make room for new keys. You can select a different eviction policy. -- [**Capabilities**]({{< relref "/operate/oss_and_stack/stack-with-enterprise" >}}) (previously **Modules**) - 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 [Redis Enterprise and Redis Stack feature compatibility +### Capabilities + +When you create a new in-memory database, you can enable multiple Redis Stack [**Capabilities**]({{}}). + +For Auto Tiering databases, you can enable capabilities that support Auto Tiering. See [Redis Enterprise and Redis Stack feature compatibility ]({{< relref "/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities" >}}) for compatibility details. - - {{< note >}} + +{{}} To use Redis Stack capabilities, enable them when you create a new database. You cannot enable them after database creation. - {{< /note >}} - - To add capabilities to the database: +{{}} - 1. In the **Capabilities** section, select one or more capabilities. +To add capabilities to the database: + +1. In the **Capabilities** section, select one or more capabilities. - 1. To customize capabilities, select **Parameters** and enter the optional custom configuration. +1. To customize capabilities, click **Parameters** and enter the optional custom configuration. - 1. Select **Done**. +1. Click **Done**. + +To change capabilities' parameters for an existing database using the Cluster Manager UI: + + 1. In the **Capabilities** section, click **Edit Parameters**. -### High availability & durability + 1. After you finish editing the module's configuration parameters, click **Done** to close the parameter editor. + +### High Availability - [**Replication**]({{< relref "/operate/rs/databases/durability-ha/replication.md" >}}) - We recommend you use intra-cluster replication to create replica shards for each database for high availability. @@ -98,22 +113,23 @@ You cannot enable them after database creation. - [**Replica high availability**]({{< relref "/operate/rs/databases/configure/replica-ha" >}}) - Automatically migrates replica shards to an available node if a replica node fails or is promoted to primary. -- [**Persistence**]({{< relref "/operate/rs/databases/configure/database-persistence.md" >}}) - 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. - -- [**Data eviction policy**]({{< relref "/operate/rs/databases/memory-performance/eviction-policy.md" >}}) - 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. - ### Clustering -- **Sharding** - You can either: - - Turn on **Sharding** to enable [database clustering]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}) and select the number of database shards. +- **Enable sharding** - You can either: + + - Turn on sharding to enable [database clustering]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}) and select the number of database shards. When database clustering is enabled, databases are subject to limitations on [Multi-key commands]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}). You can increase the number of shards in the database at any time. - You can accept the [standard hashing policy]({{< relref "/operate/rs/databases/durability-ha/clustering#standard-hashing-policy" >}}), which is compatible with Redis Community Edition, or define a [custom hashing policy]({{< relref "/operate/rs/databases/durability-ha/clustering#custom-hashing-policy" >}}) to define where keys are located in the clustered database. + - Turn off sharding to use only one shard so that you can use [Multi-key commands]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}) without the limitations. - - Turn off **Sharding** to use only one shard so that you can use [Multi-key commands]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}) without the limitations. +- [**Shards placement**]({{< relref "/operate/rs/databases/memory-performance/shard-placement-policy" >}}) - Determines how to distribute database shards across nodes in the cluster. + + - _Dense_ places shards on the smallest number of nodes. + + - _Sparse_ spreads shards across many nodes. - [**OSS Cluster API**]({{< relref "/operate/rs/databases/configure/oss-cluster-api.md" >}}) - The OSS Cluster API configuration allows access to multiple endpoints for increased throughput. @@ -125,27 +141,15 @@ You cannot enable them after database creation. You must use a client that supports the cluster API to connect to a database that has the cluster API enabled. {{}} -- [**Shards placement**]({{< relref "/operate/rs/databases/memory-performance/shard-placement-policy" >}}) - Determines how to distribute database shards across nodes in the cluster. - - - _Dense_ places shards on the smallest number of nodes. - - - _Sparse_ spreads shards across many nodes. +- **Hashing policy** - You can accept the [standard hashing policy]({{}}), which is compatible with Redis Community Edition, or define a [custom hashing policy]({{}}) to define where keys are located in the clustered database. - [**Database proxy**]({{< relref "/operate/rs/databases/configure/proxy-policy" >}}) - Determines the number and location of active proxies, which manage incoming database operation requests. -### Replica Of - -With [**Replica Of**]({{< relref "/operate/rs/databases/import-export/replica-of/create.md" >}}), you can make the database a repository for keys from other databases. - -### Scheduled backup - -You can configure [periodic backups]({{< relref "/operate/rs/databases/import-export/schedule-backups" >}}) of the database, including the interval and backup location parameters. - -### Alerts +### Durability -Select [alerts]({{< relref "/operate/rs/clusters/monitoring#database-alerts" >}}) to show in the database status and configure their thresholds. +- [**Persistence**]({{}}) - 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. -You can also choose to [send alerts by email]({{< relref "/operate/rs/clusters/monitoring#send-alerts-by-email" >}}) to relevant users. +- **Scheduled backup** - You can configure [periodic backups]({{}}) of the database, including the interval and backup location parameters. ### TLS @@ -173,6 +177,22 @@ You can require [**TLS**]({{< relref "/operate/rs/security/encryption/tls/" >}}) 1. Select the check mark to add the ACL. +### Alerts + +Select [alerts]({{}}) to show in the database status and configure their thresholds. + +You can also choose to [send alerts by email]({{}}) to relevant users. + +### Replica Of + +With [**Replica Of**]({{}}), you can make the database a repository for keys from other databases. + +### RESP3 support + +[RESP]({{}}) (Redis Serialization Protocol) is the protocol clients use to communicate with Redis databases. If you enable RESP3 support, the database will support the RESP3 protocol in addition to RESP2. + +For more information about Redis Software's compatibility with RESP3, see [RESP compatibility with Redis Enterprise]({{}}). + ### Internode encryption Enable **Internode encryption** to encrypt data in transit between nodes for this database. See [Internode encryption]({{< relref "/operate/rs/security/encryption/internode-encryption" >}}) for more information. diff --git a/content/operate/rs/databases/configure/database-persistence.md b/content/operate/rs/databases/configure/database-persistence.md index bda89b73e8..7bf2810ff7 100644 --- a/content/operate/rs/databases/configure/database-persistence.md +++ b/content/operate/rs/databases/configure/database-persistence.md @@ -10,12 +10,10 @@ description: How to configure database persistence with either an append-only fi linktitle: Persistence weight: 30 --- -All data is stored and managed exclusively in either RAM or RAM + flash Memory ([Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering/" >}})) and therefore, is at risk of being lost upon a process or server -failure. As Redis Enterprise Software is not just a caching solution, but also a full-fledged database, [persistence](https://redis.com/redis-enterprise/technology/durable-redis/) to disk -is critical. Therefore, Redis Enterprise Software supports persisting data to disk on a per-database basis and in multiple ways. -[Persistence](https://redis.com/redis-enterprise/technology/durable-redis/) can be configured either during database creation or by editing an existing -database's configuration. While the persistence model can be changed dynamically, it can take time for your database to switch from one persistence model to the other. It depends on what you are switching from and to, but also on the size of your database. +Data is stored in RAM or a combination of RAM and flash memory ([Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering/" >}})), 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. + +You can configure [persistence](https://redis.com/redis-enterprise/technology/durable-redis/) 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. ## Configure database persistence @@ -25,7 +23,7 @@ You can configure persistence when you [create a database]({{< relref "/operate/ 1. Select **Edit**. -1. Expand the **High Availability** section. +1. Expand the **Durability** section. 1. For **Persistence**, select an [option](#data-persistence-options) from the list. diff --git a/content/operate/rs/databases/configure/db-tags.md b/content/operate/rs/databases/configure/db-tags.md new file mode 100644 index 0000000000..e05bf76d88 --- /dev/null +++ b/content/operate/rs/databases/configure/db-tags.md @@ -0,0 +1,54 @@ +--- +Title: Manage database tags +alwaysopen: false +categories: +- docs +- operate +- rs +description: Manage tags for databases in a Redis Software cluster. +linkTitle: Database tags +toc: 'true' +weight: 17 +--- + +You can create custom tags to categorize databases in a Redis Software cluster. + +The **Databases** screen shows tags for each database in the list. + +{{The databases screen includes tags for each database.}} + +## Add database tags + +You can add tags when you [create a database]({{}}) or [edit an existing database's configuration]({{}}). + +To add tags to a database using the Cluster Manager UI: + +1. While in edit mode on the database's configuration screen, click **Add tags**. + + {{The Add tags button on the database configuration screen.}} + +1. Enter a key and value for the tag. Keys and values previously used by existing tags will appear as suggestions. + + {{The Manage tags dialog lets you add, edit, or delete tags.}} + +1. To add additional tags, click **Add tag**. + +1. After you finish adding tags, click **Done** to close the tag manager. + +1. Click **Create** or **Save**. + +## Edit database tags + +To edit a database's existing tags using the Cluster Manager UI: + +1. Go to the database's **Configuration** screen, then click **Edit**. + +1. Next to the existing **Tags**, click {{< image filename="/images/rs/buttons/edit-db-tags-button.png#no-click" alt="Edit tags button" width="22px" class="inline" >}}. + + {{The Edit tags button on the database configuration screen.}} + +1. Edit or delete existing tags, or click **Add tag** to add new tags. + +1. After you finish editing tags, click **Done** to close the tag manager. + +1. Click **Save**. diff --git a/content/operate/rs/databases/configure/oss-cluster-api.md b/content/operate/rs/databases/configure/oss-cluster-api.md index ced02078c5..9be3091ffc 100644 --- a/content/operate/rs/databases/configure/oss-cluster-api.md +++ b/content/operate/rs/databases/configure/oss-cluster-api.md @@ -8,8 +8,6 @@ categories: description: null linkTitle: OSS Cluster API weight: 20 -aliases: - - /operate/rs/concepts/data-access/oss-cluster-api --- Review [Redis OSS Cluster API]({{< relref "/operate/rs/clusters/optimize/oss-cluster-api" >}}) to determine if you should enable this feature for your database. @@ -21,7 +19,7 @@ The Redis OSS Cluster API is supported only when a database meets specific crite The database must: - Use the standard [hashing policy]({{< relref "/operate/rs/databases/durability-ha/clustering#supported-hashing-policies" >}}). -- Have the [proxy policy]({{< relref "/operate/rs/databases/configure/proxy-policy" >}}) set to either `all-master-shards` or `all-nodes`. +- Have the [proxy policy]({{< relref "/operate/rs/databases/configure/proxy-policy" >}}) set to either _All primary shards_ or _All nodes_. In addition, the database must _not_: @@ -44,9 +42,11 @@ To enable the OSS Cluster API for an existing database in the Cluster Manager UI 1. Expand the **Clustering** section. -1. Turn on the **OSS Cluster API** toggle. +1. Select **Enable sharding**. - {{Use the *OSS Cluster API* setting to enable the API for the selected database.}} +1. Select **OSS Cluster API**. + + {{Use the *OSS Cluster API* setting to enable the API for the selected database.}} 1. Select **Save**. @@ -75,29 +75,25 @@ The OSS Cluster API setting applies to the specified database only; it does not ### Active-Active databases -Ensure the [prerequisites]({{< relref "/operate/rs/databases/configure/oss-cluster-api#prerequisites" >}}) have been configured. Then, use the `crdb-cli` utility to enable the OSS Cluster API for Active-Active databases: +The OSS Cluster API setting applies to all instances of the Active-Active database across participating clusters. To enable the OSS Cluster API for Active-Active databases, use the [Cluster Manager UI](#cluster-manager-ui) or the [`crdb-cli`]({{}}) utility. + +To create an Active-Active database and enable the OSS Cluster API with `crdb-cli`: ```sh -$ crdb-cli crdb update --crdb-guid --oss-cluster true +$ crdb-cli crdb create --name \ + --memory-size 10g --port \ + --sharding true --shards-count 2 \ + --replication true --oss-cluster true --proxy-policy all-master-shards \ + --instance fqdn=,username=,password= \ + --instance fqdn=,username=,password= \ + --instance fqdn=,username=,password= ``` -For best results, you should do this when you first create the database. +See the [`crdb-cli crdb create`]({{}}) reference for more options. -Here's the basic process: +To enable the OSS Cluster API for an existing Active-Active database with `crdb-cli`: -1. Create the Active-Active database: - - ```sh - $ crdb-cli crdb create --name \ - --memory-size 10g --port \ - --sharding true --shards-count 2 \ - --replication true --oss-cluster true --proxy-policy all-master-shards \ - --instance fqdn=,username=,password= \ - --instance fqdn=,username=,password= \ - --instance fqdn=,username=,password= - ``` - -1. Obtain the CRDB-GUID ID for the new database: +1. Obtain the `CRDB-GUID` for the new database: ```sh $ crdb-cli crdb list @@ -105,20 +101,18 @@ Here's the basic process: Test 4 cluster1.local ``` -1. Use the CRDB-GUID ID to enable the OSS Cluster API: +1. Use the `CRDB-GUID` to enable the OSS Cluster API: ```sh $ crdb-cli crdb update --crdb-guid \ --oss-cluster true ``` -The OSS Cluster API setting applies to all of the instances of the Active-Active database. - ## Turn off OSS Cluster API support To deactivate OSS Cluster API support for a database, either: -- Use the Cluster Manager UI to turn off the **OSS Cluster API** toggle from the database **Configuration** settings. +- Use the Cluster Manager UI to turn off the **OSS Cluster API** in the **Clustering** section of the database **Configuration** settings. - Use the appropriate utility to deactivate the OSS Cluster API setting. @@ -128,7 +122,7 @@ To deactivate OSS Cluster API support for a database, either: $ rladmin tune db oss_cluster disabled ``` - For Active-Active databases, use `crdb-cli`: + For Active-Active databases, use the Cluster Manager UI or `crdb-cli`: ```sh $ crdb-cli crdb update --crdb-guid \ diff --git a/content/operate/rs/databases/configure/proxy-policy.md b/content/operate/rs/databases/configure/proxy-policy.md index e224da374f..3d1744bf75 100644 --- a/content/operate/rs/databases/configure/proxy-policy.md +++ b/content/operate/rs/databases/configure/proxy-policy.md @@ -19,11 +19,11 @@ and wait for failovers. A database can have one of these proxy policies: -| **Proxy Policy** | **Description** | +| **Proxy policy** | **Description** | |------------|-----------------| | Single | There is only a single proxy that is bound to the database. This is the default database configuration and preferable in most use cases. | -| All Master Shards | There are multiple proxies that are bound to the database, one on each node that hosts a database master shard. This mode fits most use cases that require multiple proxies. | -| All Nodes | There are multiple proxies that are bound to the database, one on each node in the cluster, regardless of whether or not there is a shard from this database on the node. This mode should be used only in special cases, such as [using a load balancer]({{< relref "/operate/rs/networking/cluster-lba-setup.md" >}}). | +| All primary shards | There are multiple proxies that are bound to the database, one on each node that hosts a database primary shard. This mode fits most use cases that require multiple proxies. | +| All nodes | There are multiple proxies that are bound to the database, one on each node in the cluster, regardless of whether or not there is a shard from this database on the node. This mode should be used only in special cases, such as [using a load balancer]({{< relref "/operate/rs/networking/cluster-lba-setup.md" >}}). | {{< note >}} Manual intervention is also available via the rladmin bind add and @@ -64,7 +64,7 @@ cluster configuration: You can configure the proxy policy using the `bind` command in rladmin. The following command is an example that changes the bind policy for a database named "db1" with an endpoint id "1:1" to "All -Master Shards" proxy policy. +primary shards" proxy policy. ```sh rladmin bind db db1 endpoint 1:1 policy all-master-shards diff --git a/content/operate/rs/databases/configure/replica-ha.md b/content/operate/rs/databases/configure/replica-ha.md index 803acb1e21..5a111ea66f 100644 --- a/content/operate/rs/databases/configure/replica-ha.md +++ b/content/operate/rs/databases/configure/replica-ha.md @@ -12,7 +12,7 @@ weight: 50 --- When you enable [database replication]({{< relref "/operate/rs/databases/durability-ha/replication.md" >}}), -Redis Enterprise Software creates a replica of each primary (master) shard. The replica shard will always be +Redis Enterprise Software creates a replica of each primary shard. The replica shard will always be located on a different node than the primary shard to make your data highly available. If the primary shard fails or if the node hosting the primary shard fails, then the replica is promoted to primary. @@ -27,20 +27,20 @@ An available node: 1. Meets replica migration requirements, such as [rack-awareness]({{< relref "/operate/rs/clusters/configure/rack-zone-awareness.md" >}}). 1. Has enough available RAM to store the replica shard. -1. Does not also contain the master shard. +1. Does not also contain the primary shard. -In practice, replica migration creates a new replica shard and copies the data from the master shard to the new replica shard. +In practice, replica migration creates a new replica shard and copies the data from the primary shard to the new replica shard. For example: -1. Node:2 has a master shard and node:3 has the corresponding replica shard. +1. Node:2 has a primary shard and node:3 has the corresponding replica shard. 1. Either: - - Node:2 fails and the replica shard on node:3 is promoted to master. - - Node:3 fails and the master shard is no longer replicated to the replica shard on the failed node. + - Node:2 fails and the replica shard on node:3 is promoted to primary. + - Node:3 fails and the primary shard is no longer replicated to the replica shard on the failed node. 1. If replica HA is enabled, a new replica shard is created on an available node. -1. The data from the master shard is replicated to the new replica shard. +1. The data from the primary shard is replicated to the new replica shard. {{< note >}} - Replica HA follows all prerequisites of replica migration, such as [rack-awareness]({{< relref "/operate/rs/clusters/configure/rack-zone-awareness.md" >}}). @@ -50,7 +50,7 @@ For example: ## Configure high availability for replica shards If replica high availability is enabled for both the cluster and a database, -the database's replica shards automatically migrate to another node when a master or replica shard fails. +the database's replica shards automatically migrate to another node when a primary or replica shard fails. If replica HA is not enabled at the cluster level, replica HA will not migrate replica shards even if replica HA is enabled for a database. @@ -58,7 +58,7 @@ Replica high availability is enabled for the cluster by default. When you create a database using the Cluster Manager UI, replica high availability is enabled for the database by default if you enable replication. -{{When you select the Replication checkbox in the High availability & durability section of the database configuration screen, the Replica high availability checkbox is also selected by default.}} +{{When you select the Replication checkbox in the High availability section of the database configuration screen, the Replica high availability checkbox is also selected by default.}} To use replication without replication high availability, clear the **Replica high availability** checkbox. @@ -70,10 +70,6 @@ For Active-Active databases, replica HA is enabled for the database by default t ### Configure cluster policy for replica HA -{{}} -The replica HA cluster policy is deprecated as of Redis Enterprise Software version 7.2.4. -{{}} - To enable or turn off replica high availability by default for the entire cluster, use one of the following methods: - [rladmin tune cluster]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}): diff --git a/content/operate/rs/databases/connect/_index.md b/content/operate/rs/databases/connect/_index.md index 8a0a754351..4be90d67ba 100644 --- a/content/operate/rs/databases/connect/_index.md +++ b/content/operate/rs/databases/connect/_index.md @@ -29,6 +29,6 @@ Use one of the following connection methods to connect to your database: - [Redis Insight](https://redis.com/redis-enterprise/redis-insight/) -- [Redis client]({{< relref "/develop/connect/clients/" >}}) for your preferred programming language +- [Redis client]({{< relref "/develop/clients" >}}) for your preferred programming language For examples, see [Test client connection]({{< relref "/operate/rs/databases/connect/test-client-connectivity" >}}). \ No newline at end of file diff --git a/content/operate/rs/databases/connect/supported-clients-browsers.md b/content/operate/rs/databases/connect/supported-clients-browsers.md index 0520656927..e20cf2eb8b 100644 --- a/content/operate/rs/databases/connect/supported-clients-browsers.md +++ b/content/operate/rs/databases/connect/supported-clients-browsers.md @@ -12,7 +12,7 @@ You can connect to Redis Enterprise Software databases programmatically using cl ## Redis client libraries -To connect an application to a Redis database hosted by Redis Enterprise Software, use a [client library]({{< relref "/develop/connect/clients/" >}}) appropriate for your programming language. +To connect an application to a Redis database hosted by Redis Enterprise Software, use a [client library]({{< relref "/develop/clients" >}}) appropriate for your programming language. You can also use the `redis-cli` utility to connect to a database from the command line. @@ -28,11 +28,11 @@ Note: You cannot use client libraries to configure Redis Enterprise Software. I We recommend the following clients when using a [discovery service]({{< relref "/operate/rs/databases/durability-ha/discovery-service.md" >}}) based on the Redis Sentinel API: -- [redis-py]({{< relref "/develop/connect/clients/python" >}}) (Python client) -- [NRedisStack]({{< relref "/develop/connect/clients/dotnet" >}}) (.NET client) -- [Jedis]({{< relref "/develop/connect/clients/java/jedis" >}}) (synchronous Java client) -- [Lettuce]({{< relref "/develop/connect/clients/java/lettuce" >}}) (asynchronous Java client) -- [go-redis]({{< relref "/develop/connect/clients/go" >}}) (Go client) +- [redis-py]({{< relref "/develop/clients/redis-py" >}}) (Python client) +- [NRedisStack]({{< relref "/develop/clients/dotnet" >}}) (.NET client) +- [Jedis]({{< relref "/develop/clients/jedis" >}}) (synchronous Java client) +- [Lettuce]({{< relref "/develop/clients/lettuce" >}}) (asynchronous Java client) +- [go-redis]({{< relref "/develop/clients/go" >}}) (Go client) - [Hiredis](https://github.com/redis/hiredis) (C client) If you need to use another client, you can use [Sentinel Tunnel](https://github.com/RedisLabs/sentinel_tunnel) diff --git a/content/operate/rs/databases/connect/test-client-connectivity.md b/content/operate/rs/databases/connect/test-client-connectivity.md index 807b9762fb..75f0649d6b 100644 --- a/content/operate/rs/databases/connect/test-client-connectivity.md +++ b/content/operate/rs/databases/connect/test-client-connectivity.md @@ -42,7 +42,7 @@ database and store data using one of the following methods: - [Redis Insight](https://redis.com/redis-enterprise/redis-insight/), a free Redis GUI that is available for macOS, Windows, and Linux -- An application using a Redis client library, such as [`redis-py`](https://github.com/redis/redis-py) for Python. See the [client list]({{< relref "/develop/connect/clients/" >}}) to view all Redis clients by language. +- An application using a Redis client library, such as [`redis-py`](https://github.com/redis/redis-py) for Python. See the [client list]({{< relref "/develop/clients" >}}) to view all Redis clients by language. ### Connect with redis-cli @@ -62,7 +62,7 @@ For more `redis-cli` connection examples, see the [`redis-cli` reference]({{< re Redis Insight is a free Redis GUI that is available for macOS, Windows, and Linux. -1. [Install Redis Insight]({{< relref "/develop/connect/insight/" >}}). +1. [Install Redis Insight]({{< relref "/develop/tools/insight" >}}). 1. Open Redis Insight and select **Add Redis Database**. @@ -72,7 +72,7 @@ Redis Insight is a free Redis GUI that is available for macOS, Windows, and Linu 1. Select **Add Redis Database** to connect to the database. -See the [Redis Insight documentation]({{< relref "/develop/connect/insight/" >}}) for more information. +See the [Redis Insight documentation]({{< relref "/develop/tools/insight" >}}) for more information. ### Connect with Python diff --git a/content/operate/rs/databases/durability-ha/db-availability.md b/content/operate/rs/databases/durability-ha/db-availability.md new file mode 100644 index 0000000000..870179667b --- /dev/null +++ b/content/operate/rs/databases/durability-ha/db-availability.md @@ -0,0 +1,59 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- rs +db_type: database +description: Verify if a Redis Software database is available to perform read and write operations and can respond to queries from client applications. +linkTitle: Database availability +title: Check database availability +toc: 'true' +weight: 30 +--- + +You can use the [database availability API]({{}}) to verify whether a Redis Software database is available to perform read and write operations and can respond to queries from client applications. Load balancers and automated monitoring tools can use this API to monitor database availability. + +{{}} +Database availability does not guarantee data availability. +{{}} + +## Check database availability for monitoring + +To monitor database availability, use the following REST API request: + +```sh +GET /v1/bdbs//availability +``` + +If the OSS Cluster API is enabled, this request verifies all endpoints for this database are available. Otherwise, it verifies the database has at least one available endpoint. + +Returns the status code 200 OK if the database is available. + +If the database is unavailable, returns an error status code and a JSON object that contains [`error_code` and `description` fields]({{}}). + +## Check local database endpoint availability for load balancers + +To check database availability when using a load balancer and the recommended `all-nodes` proxy policy, use the local database endpoints for each node: + +```sh +GET /v1/local/bdbs//endpoint/availability +``` + +Returns the status code 200 OK if the local database endpoint is available. + +If the local database endpoint is unavailable, returns an error status code and a JSON object that contains [`error_code` and `description` fields]({{}}). + +## Availability by database status + +The following table shows the relationship between a database's status and availability. For more details about the database status values, see [BDB status field]({{}}). + +| Database status | Availability | +|-----------------|--------------| +| active | Available | +| active-change-pending | Available | +| creation-failed | :x: Not available | +| delete-pending | :warning: Availability not guaranteed | +| import-pending | Available | +| pending | Available | +| recovery | :x: Not available | diff --git a/content/operate/rs/databases/import-export/flush.md b/content/operate/rs/databases/import-export/flush.md index e0ae5e95fa..309ae15c81 100644 --- a/content/operate/rs/databases/import-export/flush.md +++ b/content/operate/rs/databases/import-export/flush.md @@ -46,18 +46,20 @@ Port 9443 is the default [port configuration]({{< relref "/operate/rs/networking When you flush an Active-Active database (formerly known as CRDB), all of the replicas flush their data at the same time. -To flush data from an Active-Active database: +To flush data from an Active-Active database, use one of the following methods: - Cluster Manager UI - 1. If you are using the new Cluster Manager UI, switch to the legacy admin console. + 1. On the **Databases** screen, select the database from the list, then click **Configuration**. - {{Select switch to legacy admin console from the dropdown.}} + 1. Click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="Toggle actions button" width="22px" class="inline" >}} to open a list of additional actions. + + 1. Select **Flush database**. - 1. Go to **database** and select the Active-Active database that you want to flush. - 1. Go to **configuration** and click **Flush** at the bottom of the page. 1. Enter the name of the Active-Active database to confirm that you want to flush the data. + 1. Click **Flush**. + - Command line 1. To find the ID of the Active-Active database, run: diff --git a/content/operate/rs/databases/import-export/schedule-backups.md b/content/operate/rs/databases/import-export/schedule-backups.md index 192ba0dd30..bfb49e1a97 100644 --- a/content/operate/rs/databases/import-export/schedule-backups.md +++ b/content/operate/rs/databases/import-export/schedule-backups.md @@ -57,9 +57,9 @@ To schedule periodic backups for a database: 1. Select the **Edit** button. -1. Expand the **Scheduled backup** section. +1. Expand the **Durability** section. -1. Select **Add backup path** to open the **Path configuration** dialog. +1. In the **Scheduled backup** section, click **Add backup path** to open the **Path configuration** dialog. 1. Select the tab that corresponds to your storage location type, enter the location details, and select **Done**. diff --git a/content/operate/rs/databases/memory-performance/_index.md b/content/operate/rs/databases/memory-performance/_index.md index ccb9bc1cd2..9bf073ccb0 100644 --- a/content/operate/rs/databases/memory-performance/_index.md +++ b/content/operate/rs/databases/memory-performance/_index.md @@ -104,4 +104,10 @@ If applications need to access a value that is in flash, Redis Enterprise automatically brings the value into RAM. Depending on the flash hardware in use, applications experience slightly higher latency when bringing values back into RAM from flash. However subsequent -accesses to the same value is fast, once the value is in RAM. \ No newline at end of file +accesses to the same value is fast, once the value is in RAM. + +## Client-side caching + +Client-side caching allows Redis clients to store a subset of data in a local cache and avoid sending repeated requests to the Redis database. When used to cache frequently accessed data, this technique can improve performance by decreasing network traffic, latency, and load on the database. For more information about client-side caching, see the [client-side caching introduction]({{}}). + +Redis Software supports client-side caching for databases with Redis versions 7.4 and later. See [Client-side caching compatibility with Redis Software]({{}}) for more information about compatibility and configuration options. diff --git a/content/operate/rs/installing-upgrading/creating-support-package.md b/content/operate/rs/installing-upgrading/creating-support-package.md index 877280a0bb..c603bdbd72 100644 --- a/content/operate/rs/installing-upgrading/creating-support-package.md +++ b/content/operate/rs/installing-upgrading/creating-support-package.md @@ -12,15 +12,98 @@ toc: 'true' weight: $weight --- If you encounter any issues that you are not able to resolve yourself -and need to [contact Redis support](https://redis.com/company/support/) for assistance, you can create a -support package that gathers all essential information to help debug +and need to [contact Redis support](https://redis.io/support/) for assistance, you can [create a support package](#create-support-package) that gathers all essential information to help debug your issues. {{< note >}} The process of creating the support package can take several minutes and generates load on the system. {{< /note >}} -## Cluster Manager UI method +## Support package files + +The support package is a zip file that contains all cluster configuration and logs. + +When downloaded from the Cluster Manager UI, the support package's name is `debuginfo.tar.gz`. + +### Database support package files + +Cluster and database support packages collect database details in `database_` directories, where `` is the database ID, and Redis shard details in `` directories. + +The following table describes the included files: + +| File | Description | +|------|-------------| +| ccs-redis.json | Primary node's local cluster configuration store (CCS). | +| /database_/ | Directory that includes files for a specific database. is the database ID. | +| database__ccs_info.txt | Database information from the cluster configuration store (CCS). Includes settings for databases, endpoints, shards, replicas, and CRDB. | +| database_.clientlist | List of clients connected to the database when the support package was created. | +| database_.info | Redis information and statistics for the database. See [`INFO`]({{}}) for details about the collected fields. | +| database_.rladmin | Database information. See [`rladmin info db`]({{}}) for an example of collected fields. Also includes creation time, last changed time, Redis version, memory limit, persistence type, eviction policy, hashing policy, and whether SSL, backups, and email alerts are enabled. | +| database_.slowlog | Contains slowlog output, which includes commands that took longer than 10 milliseconds. Only included if `slowlog_in_sanitized_support` is `true` in cluster settings. | +| /node_/redis_.txt | For each shard of the specified database only. Includes shard configuration and [information]({{}}), slowlog information, and latency information. | + +### Node support package files + +Cluster and node support packages collect node details in `node_` directories, where `` is the node ID. + +The following table describes the included files: + +| File | Description | +|------|-------------| +| ccs-redis.json | The node's local cluster configuration store (CCS). | +| /conf/ | Directory that contains configuration files. | +| /logs/ | Directory that includes logs. | +| node_.ccs | Includes cluster configuration, node configuration, and DMC proxy configuration. | +| node__envoy_config.json | Envoy configuration. | +| node_.rladmin | Information about the cluster's nodes, databases, endpoints, and shards. See [`rladmin status`]({{}}) for example output. | +| node__sys_info.txt | Node's system information including:
• Socket files list
• Log files list
• Processes running on the node
• Disk usage
• Persistent files list
• Memory usage
• Network interfaces
• Installed packages
• Active iptables
• OS and platform
• Network connection
• Status of Redis processes | +| redis_.txt | For each shard of the specified database only. Includes shard configuration and [information]({{}}), slowlog information, and latency information. | + +Each node's `/conf/` directory contains the following files: + +- bootstrap_status.json +- ccs-paths.conf +- config.json +- envoy.yaml +- gossip_envoy.yaml +- heartbeatd-config.json +- last_bootstrap.json +- local_addr.conf +- node.id +- node_local_config.json +- redislabs_env_config.sh +- socket.conf +- supervisord_alert_mgr.conf +- supervisord_cm_server.conf +- supervisord_crdb_coordinator.conf +- supervisord_crdb_worker.conf +- supervisord_mdns_server.conf +- supervisord_pdns_server.conf + +Each node's `/conf/` directory also contains the following key and cert modulus files: + +- api_cert.modulus +- api_key.modulus +- ccs_internode_encryption_cert.modulus +- ccs_internode_encryption_key.modulus +- cm_cert.modulus +- cm_key.modulus +- data_internode_encryption_cert.modulus +- data_internode_encryption_key.modulus +- gossip_ca_signed_cert.modulus +- gossip_ca_signed_key.modulus +- mesh_ca_signed_cert.modulus +- mesh_ca_signed_key.modulus +- metrics_exporter_cert.modulus +- metrics_exporter_key.modulus +- proxy_cert.modulus +- proxy_key.modulus +- syncer_cert.modulus +- syncer_key.modulus + +## Create support package + +### Cluster Manager UI method To create a support package from the Cluster Manager UI: @@ -34,7 +117,7 @@ To create a support package from the Cluster Manager UI: 1. The package is created and downloaded by your browser. -## Command-line method +### Command-line method If package creation fails with `internal error` or if you cannot access the UI, create a support package for the cluster from the command line on any node in the cluster using the [`rladmin cluster debug_info`]({{< relref "/operate/rs/references/cli-utilities/rladmin/cluster/debug_info" >}}) command: @@ -66,7 +149,7 @@ If package creation fails with `internal error` or if you cannot access the UI, Upload the tar file to [Redis support](https://redis.com/company/support/). The path to the archive is shown in the command output. -## REST API method +### REST API method You can also use `debuginfo` [REST API]({{< relref "/operate/rs/references/rest-api" >}}) requests to create and download support packages. diff --git a/content/operate/rs/installing-upgrading/product-lifecycle.md b/content/operate/rs/installing-upgrading/product-lifecycle.md index 0998254ee5..fd7622216e 100644 --- a/content/operate/rs/installing-upgrading/product-lifecycle.md +++ b/content/operate/rs/installing-upgrading/product-lifecycle.md @@ -8,6 +8,7 @@ categories: description: The product lifecycle of Redis Enterprise Software. linkTitle: Product lifecycle weight: 100 +tocEmbedHeaders: true --- The Redis Enterprise Software product lifecycle fully reflects the [subscription agreement](https://redis.com/software-subscription-agreement). However, for any discrepancy between the two policies, the subscription agreement prevails. @@ -39,7 +40,8 @@ This update to the EOL policy allows a lead time of at least 24 months to upgrad | Version - Release date | End of Life (EOL) | | ----------------------------------------- | ------------------ | -| 7.4 – February 2024 | - | +| 7.8 – November 2024 | - | +| 7.4 – February 2024 | November 30, 2026 | | 7.2 – August 2023 | February 28, 2026 | | 6.4 – February 2023 | August 31, 2025 | | 6.2 – August 2021 | February 28, 2025 | @@ -47,3 +49,11 @@ This update to the EOL policy allows a lead time of at least 24 months to upgrad | 5.6 – April 2020 | October 31, 2021 | | 5.4 – December 2018 | December 31, 2020 | | 5.2 – June 2018 | December 31, 2019 | + +{{}} + +For detailed upgrade instructions, see [Upgrade a Redis Enterprise Software cluster]({{}}). + +{{}} +Redis Enterprise for Kubernetes has its own support lifecycle, which accounts for the Kubernetes distribution lifecycle. For details, see [Supported Kubernetes distributions]({{}}). +{{}} diff --git a/content/operate/rs/installing-upgrading/quickstarts/docker-quickstart.md b/content/operate/rs/installing-upgrading/quickstarts/docker-quickstart.md index a77debbe13..9064430288 100644 --- a/content/operate/rs/installing-upgrading/quickstarts/docker-quickstart.md +++ b/content/operate/rs/installing-upgrading/quickstarts/docker-quickstart.md @@ -9,7 +9,6 @@ description: Set up a development or test deployment of Redis Enterprise Softwar using Docker. linkTitle: Docker quickstart weight: 2 -aliases: /operate/rs/installing-upgrading/get-started-docker/ --- {{< warning >}} Docker containers are currently only supported for development and test environments, not for production. Use [Redis Enterprise on Kubernetes]({{< relref "/operate/kubernetes" >}}) for a supported containerized deployment. @@ -70,7 +69,7 @@ with `-p :` or use the `--network host` option to ope ## Create a database -{{}} +{{}} {{< note >}} {{< embed-md "docker-memory-limitation.md" >}} diff --git a/content/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart.md b/content/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart.md index 7697342fcd..68ba845612 100644 --- a/content/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart.md +++ b/content/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart.md @@ -88,7 +88,7 @@ To set up your machine as a Redis Enterprise Software cluster: ## Create a database -{{}} +{{}} ## Connect to your database @@ -98,21 +98,5 @@ See [Test client connection]({{< relref "/operate/rs/databases/connect/test-clie ## Supported web browsers To use the Redis Enterprise Software Cluster Manager UI, you need a modern browser with JavaScript enabled. - -The following browsers have been tested with the current version of the Cluster Manager UI: - -- Microsoft Windows, version 10 or later. - - [Google Chrome](https://www.google.com/chrome/), version 48 and later - - [Microsoft Edge](https://www.microsoft.com/edge), version 20 and later - - [Mozilla Firefox](https://www.mozilla.org/firefox/), version 44 and and later - - [Opera](https://www.opera.com/), version 35 and later - -- Apple macOS: - - [Google Chrome](https://www.google.com/chrome/), version 48 and later - - [Mozilla Firefox](https://www.mozilla.org/firefox/), version 44 and and later - - [Opera](https://www.opera.com/), version 35 and later - -- Linux: - - [Google Chrome](https://www.google.com/chrome/), version 49 and later - - [Mozilla Firefox](https://www.mozilla.org/firefox/), version 44 and and later - - [Opera](https://www.opera.com/), version 35 and later + +The Cluster Manager UI is officially supported for the latest version of [Google Chrome](https://www.google.com/chrome/), as well as the three previous and three subsequent versions. diff --git a/content/operate/rs/installing-upgrading/upgrading/upgrade-active-active.md b/content/operate/rs/installing-upgrading/upgrading/upgrade-active-active.md index c06a7efd16..8ffe7c742e 100644 --- a/content/operate/rs/installing-upgrading/upgrading/upgrade-active-active.md +++ b/content/operate/rs/installing-upgrading/upgrading/upgrade-active-active.md @@ -68,15 +68,11 @@ To upgrade an Active-Active database (CRDB) instance: {{< image filename="/images/rs/crdb-upgrade-node.png" >}} -1. To upgrade each Active-Active instance, including the Redis version and CRDB protocol version, run: +1. To upgrade each Active-Active instance and its modules, including the Redis version and CRDB protocol version, run: - - To upgrade a database without modules: - - ```sh - rladmin upgrade db - ``` - - - If the database has modules enabled and new module versions are available in the cluster, run `rladmin upgrade db` with additional parameters to upgrade the module versions when you upgrade the database. See [Upgrade modules]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module" >}}) for more details. + ```sh + rladmin upgrade db + ``` If the protocol version is old, read the warning message carefully and confirm. diff --git a/content/operate/rs/installing-upgrading/upgrading/upgrade-cluster.md b/content/operate/rs/installing-upgrading/upgrading/upgrade-cluster.md index 6f5a641caa..51c4ff0fbf 100644 --- a/content/operate/rs/installing-upgrading/upgrading/upgrade-cluster.md +++ b/content/operate/rs/installing-upgrading/upgrading/upgrade-cluster.md @@ -9,21 +9,17 @@ description: Upgrade a Redis Enterprise Software cluster. linkTitle: Upgrade cluster toc: 'true' weight: 30 +tocEmbedHeaders: true --- -## Supported upgrade paths - -The following upgrade paths are supported: - -| Current
cluster version | Upgrade to
cluster version | -|:-----:|:-----:| -| 7.2.x | 7.4.x | -| 6.4.x | 7.4.x
7.2.x | -| 6.2.x | 7.4.x
7.2.x
6.4.x | -| 6.0.x | 7.2.x
6.4.x
6.2.x | +{{}} See the [Redis Enterprise Software product lifecycle]({{}}) for more information about release numbers and the end-of-life schedule. +{{}} +Redis Enterprise for Kubernetes has its own support lifecycle, which accounts for the Kubernetes distribution lifecycle. For details, see [Supported Kubernetes distributions]({{}}). +{{}} + ## Upgrade prerequisites Before upgrading a cluster: diff --git a/content/operate/rs/installing-upgrading/upgrading/upgrade-database.md b/content/operate/rs/installing-upgrading/upgrading/upgrade-database.md index 1996885082..17f4dd4e21 100644 --- a/content/operate/rs/installing-upgrading/upgrading/upgrade-database.md +++ b/content/operate/rs/installing-upgrading/upgrading/upgrade-database.md @@ -25,9 +25,10 @@ To view available Redis database versions: The default Redis database version differs between Redis Enterprise releases as follows: -| Redis
Enterprise | Bundled Redis
DB versions | Default DB version
(upgraded/new databases) | +| Redis
Software | Bundled Redis
DB versions | Default DB version
(upgraded/new databases) | |-------|----------|-----| -| 7.4.2 | 6.0, 6.2, 7.2 | 7.2 | +| 7.8.2 | 6.2, 7.2, 7.4 | 7.4 | +| 7.4.x | 6.0, 6.2, 7.2 | 7.2 | | 7.2.4 | 6.0, 6.2, 7.2 | 7.2 | | 6.4.2 | 6.0, 6.2 | 6.2 | | 6.2.x | 6.0, 6.2 | 6.0 | @@ -81,7 +82,7 @@ To upgrade a database: 1. Use [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin/upgrade" >}}) to upgrade the database. During the upgrade process, the database will restart without losing any data. - - To upgrade a database without modules: + - To upgrade a database and its modules: ``` shell rladmin upgrade db @@ -99,8 +100,6 @@ To upgrade a database: Done ``` - - If the database has modules enabled and new module versions are available in the cluster, run `rladmin upgrade db` with additional parameters to upgrade the module versions when you upgrade the database. See [Upgrade modules]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module" >}}) for more details. - - To upgrade the database to a version other than the default version, use the `redis_version` parameter: ```sh diff --git a/content/operate/rs/networking/multi-ip-ipv6.md b/content/operate/rs/networking/multi-ip-ipv6.md index 11391194a6..f0df131d18 100644 --- a/content/operate/rs/networking/multi-ip-ipv6.md +++ b/content/operate/rs/networking/multi-ip-ipv6.md @@ -1,5 +1,5 @@ --- -Title: Multi-IP and IPv6 +Title: Manage IP addresses alwaysopen: false categories: - docs @@ -7,7 +7,7 @@ categories: - rs description: Information and requirements for using multiple IP addresses or IPv6 addresses with Redis Enterprise Software. -linkTitle: Multi-IP and IPv6 +linkTitle: Manage IP addresses weight: $weight --- Redis Enterprise Software supports servers, instances, and VMs with @@ -73,8 +73,6 @@ The host file `/etc/hosts` on each node in the cluster must include the followin ## Change internal IP address -If you need to update the internal IP address in the OS, you must remove that node from the Redis Enterprise cluster, make the IP change, and then add the node back into the cluster. - Before you change an internal IP address, consider the following: - Verify the address is valid and bound to an active interface on the node. Failure to do so prevents the node from coming back online and rejoining the cluster. @@ -83,11 +81,11 @@ Before you change an internal IP address, consider the following: - Joining a node that only has IPv6 network interfaces to a master node that does not have IPv6 enabled causes a `NodeBootstrapError`. -{{}} -You cannot change the internal address from IPv4 to IPv6 or IPv6 to IPv4 in a running cluster. You can only change the internal address within the same protocol as the cluster. -{{}} +- You cannot change the internal address from IPv4 to IPv6 or IPv6 to IPv4 in a running cluster. You can only change the internal address within the same protocol as the cluster. + +If you need to update the internal IP address in the OS, one option is to remove that node from the cluster, change the IP address, and then add the node back into the cluster. -To update a node's internal IP address: +Alternatively, you can use the following steps to update a node's internal IP address without removing it from the cluster: 1. Turn the node into a replica using [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin/node/enslave" >}}): diff --git a/content/operate/rs/networking/port-configurations.md b/content/operate/rs/networking/port-configurations.md index d0df735d01..388cf6141f 100644 --- a/content/operate/rs/networking/port-configurations.md +++ b/content/operate/rs/networking/port-configurations.md @@ -27,16 +27,16 @@ Redis Enterprise Software's port usage falls into three general categories: | Protocol | Port | Configurable | Connection source | Description | |----------|------|--------------|-------------------|-------------| | TCP | 8001 | ❌ No | Internal, External | Traffic from application to Redis Enterprise Software [Discovery Service]({{< relref "/operate/rs/databases/durability-ha/discovery-service.md" >}}) | -| TCP | 8000, 8070, 8071, 9090, 9125 | ❌ No | Internal, External | Metrics exported and managed by the web proxy | +| TCP | 8070 | ❌ No | External | Metrics exported and managed by the web proxy | +| TCP | 3347-3349, 8000, 8071, 9091, 9125 | ❌ No | Internal | Internal metrics ports | | TCP | 8443 | ✅ Yes | Internal, External | Secure (HTTPS) access to the management web UI | | TCP | 9081 | ✅ Yes | Internal | CRDB coordinator for Active-Active management (internal) | -| TCP | 9443 (Recommended), 8080 | ✅ Yes | Internal, External, Active-Active | REST API traffic, including cluster management and node bootstrap | +| TCP | 9443, 8080 | ✅ Yes | Internal, External, Active-Active | REST API traffic, including cluster management and node bootstrap | | TCP | 10050 | ❌ No | Internal | Zabbix monitoring | | TCP | 10000-10049, 10051-19999 | ✅ Yes | Internal, External, Active-Active | Database traffic | | UDP | 53, 5353 | ❌ No | Internal, External | DNS/mDNS traffic | -| ICMP | * | ❌ No | Internal | Connectivity checking between nodes | | TCP | 1968 | ❌ No | Internal | Proxy traffic | -| TCP | 3333-3345, 36379, 36380 | ❌ No | Internal | Internode communication | +| TCP | 3333-3345, 3350, 36379, 36380 | ❌ No | Internal | Internode communication | | TCP | 20000-29999 | ❌ No | Internal | Database shard traffic | | TCP | 8002, 8004, 8006 | ✅ Yes | Internal | Default system health monitoring (envoy admin, envoy management server, gossip envoy admin)| | TCP | 8444, 9080 | ❌ No | Internal | Traffic between web proxy and cnm_http/cm | diff --git a/content/operate/rs/references/cli-utilities/redis-cli/_index.md b/content/operate/rs/references/cli-utilities/redis-cli/_index.md index a222c1e75b..18fd8cc140 100644 --- a/content/operate/rs/references/cli-utilities/redis-cli/_index.md +++ b/content/operate/rs/references/cli-utilities/redis-cli/_index.md @@ -15,7 +15,7 @@ weight: $weight The `redis-cli` command-line utility lets you interact with a Redis database. With `redis-cli`, you can run [Redis commands]({{< relref "/commands" >}}) directly from the command-line terminal or with [interactive mode](#interactive-mode). -If you want to run Redis commands without `redis-cli`, you can [connect to a database with Redis Insight]({{< relref "/develop/connect/insight/" >}}) and use the built-in [CLI]({{< relref "/develop/connect/insight/" >}}) prompt instead. +If you want to run Redis commands without `redis-cli`, you can [connect to a database with Redis Insight]({{< relref "/develop/tools/insight" >}}) and use the built-in [CLI]({{< relref "/develop/tools/insight" >}}) prompt instead. ## Install `redis-cli` @@ -102,15 +102,15 @@ $ redis-cli -h -p 12000 GET mykey "Hello world" ``` -For more information, see [Command line usage]({{< relref "/develop/connect/cli" >}}#command-line-usage). +For more information, see [Command line usage]({{< relref "/develop/tools/cli" >}}#command-line-usage). ## Interactive mode -In `redis-cli` [interactive mode]({{< relref "/develop/connect/cli" >}}#interactive-mode), you can: +In `redis-cli` [interactive mode]({{< relref "/develop/tools/cli" >}}#interactive-mode), you can: - Run any `redis-cli` command without prefacing it with `redis-cli`. -- Enter `?` for more information about how to use the `HELP` command and [set `redis-cli` preferences]({{< relref "/develop/connect/cli" >}}#preferences). -- Enter [`HELP`]({{< relref "/develop/connect/cli" >}}#showing-help-about-redis-commands) followed by the name of a command for more information about the command and its options. +- Enter `?` for more information about how to use the `HELP` command and [set `redis-cli` preferences]({{< relref "/develop/tools/cli" >}}#preferences). +- Enter [`HELP`]({{< relref "/develop/tools/cli" >}}#showing-help-about-redis-commands) followed by the name of a command for more information about the command and its options. - Press the `Tab` key for command completion. - Enter `exit` or `quit` or press `Control+D` to exit interactive mode and return to the terminal prompt. @@ -144,9 +144,9 @@ Scan the database for big keys: redis-cli -h -p --bigkeys ``` -See [Scanning for big keys]({{< relref "/develop/connect/cli" >}}#scanning-for-big-keys) for more information. +See [Scanning for big keys]({{< relref "/develop/tools/cli" >}}#scanning-for-big-keys) for more information. ## More info -- [Redis CLI documentation]({{< relref "/develop/connect/cli" >}}) +- [Redis CLI documentation]({{< relref "/develop/tools/cli" >}}) - [Redis commands reference]({{< relref "/commands/" >}} diff --git a/content/operate/rs/references/cli-utilities/rladmin/status.md b/content/operate/rs/references/cli-utilities/rladmin/status.md index 39272159c3..f76fba1b19 100644 --- a/content/operate/rs/references/cli-utilities/rladmin/status.md +++ b/content/operate/rs/references/cli-utilities/rladmin/status.md @@ -189,7 +189,7 @@ Displays the current status of modules installed on the cluster and modules used ``` sh rladmin status modules [ db { db: | } ... { db: | } ] - [ extra { all | min_redis_version | module_id } ] + [ extra { all | compatible_redis_version | min_redis_version | module_id } ] ``` ### Parameters @@ -199,6 +199,7 @@ rladmin status modules | db db:\ | Provide a list of database IDs to show only modules used by the specified databases
(for example: `rladmin status modules db db:1 db:2`) | | db \ | Provide a list of database names to show only modules used by the specified databases
(for example: `rladmin status modules db name1 name2`) | | extra all | Shows all extra information | +| extra compatible_redis_version | Shows the compatible Redis database version for the module | | extra module_id | Shows module IDs | | extra min_redis_version | Shows the minimum compatible Redis database version for each module | diff --git a/content/operate/rs/references/cli-utilities/rladmin/tune.md b/content/operate/rs/references/cli-utilities/rladmin/tune.md index 3a8e197035..30cf6a8006 100644 --- a/content/operate/rs/references/cli-utilities/rladmin/tune.md +++ b/content/operate/rs/references/cli-utilities/rladmin/tune.md @@ -47,6 +47,9 @@ rladmin tune cluster [ acl_pubsub_default { resetchannels | allchannels } ] [ resp3_default { enabled | disabled } ] [ automatic_node_offload { enabled | disabled } ] + [ default_tracking_table_max_keys_policy ] + [ default_oss_sharding { enabled | disabled } ] + ] ``` ### Parameters @@ -59,9 +62,11 @@ rladmin tune cluster | db_conns_auditing | `enabled`
`disabled` | Activates or deactivates [connection auditing]({{< relref "/operate/rs/security/audit-events" >}}) by default for new databases of a cluster | | default_concurrent_restore_actions | integer
`all` | Default number of concurrent actions when restoring a node from a snapshot (positive integer or "all") | | default_non_sharded_proxy_policy | `single`

`all-master-shards`

`all-nodes` | Default [proxy policy]({{< relref "/operate/rs/databases/configure/proxy-policy" >}}) for newly created non-sharded databases' endpoints | +| default_oss_sharding | `enabled`
`disabled` | Default hashing policy to use for new databases. Set to `disabled` by default. This field is for future use only and should not be changed. | | default_redis_version | version number | The default Redis database compatibility version used to create new databases.

The value parameter should be a version number in the form of "x.y" where _x_ represents the major version number and _y_ represents the minor version number. The final value corresponds to the desired version of Redis.

You cannot set _default_redis_version_ to a value higher than that supported by the current _redis_upgrade_policy_ value. | | default_sharded_proxy_policy | `single`

`all-master-shards`

`all-nodes` | Default [proxy policy]({{< relref "/operate/rs/databases/configure/proxy-policy" >}}) for newly created sharded databases' endpoints | | default_shards_placement | `dense`
`sparse` | New databases place shards according to the default [shard placement policy]({{< relref "/operate/rs/databases/memory-performance/shard-placement-policy" >}}) | +| default_tracking_table_max_keys_policy | integer (default: 1000000) | Defines the default value of the client-side caching invalidation table size for new databases. 0 makes the cache unlimited. | | expose_hostnames_for_all_suffixes | `enabled`
`disabled` | Exposes hostnames for all DNS suffixes | | failure_detection_sensitivity | `high`
`low` | Predefined thresholds and timeouts for failure detection (previously known as `watchdog_profile`)
• `high` (previously `local-network`) – high failure detection sensitivity, lower thresholds, faster failure detection and failover
• `low` (previously `cloud`) – low failure detection sensitivity, higher tolerance for latency variance (also called network jitter) | | login_lockout_counter_reset_after | time in seconds | Time after failed login attempt before the counter resets to 0 | @@ -105,7 +110,7 @@ Configures database parameters. ``` sh rladmin tune db { db: | } - [ slave_buffer ] + [ slave_buffer ] [ client_buffer ] [ repl_backlog ] [ crdt_repl_backlog ] @@ -141,6 +146,7 @@ rladmin tune db { db: | } [ data_internode_encryption { enabled | disabled } ] [ db_conns_auditing { enabled | disabled } ] [ resp3 { enabled | disabled } ] + [ tracking_table_max_keys ] ``` ### Parameters @@ -181,11 +187,12 @@ rladmin tune db { db: | } | resp3 | `enabled`
`disabled` | Enables or deactivates RESP3 support (defaults to `enabled`) | | schedpolicy | `cmp`
`mru`
`spread`
`mnp` | Controls how server-side connections are used when forwarding traffic to shards | | skip_import_analyze | `enabled`
`disabled` | Skips the analyzing step when importing a database | -| slave_buffer | value in MB
hard:soft:time | Redis replica output buffer limits | +| slave_buffer | `auto`
value in MB
hard:soft:time | Redis replica output buffer limits
• `auto`: dynamically adjusts the buffer limit based on the shard’s current used memory
• value in MB: sets the buffer limit in MB
• hard:soft:time: sets the hard limit (maximum buffer size in MB), soft limit in MB, and the time in seconds that the soft limit can be exceeded | | slave_ha | `enabled`
`disabled` | Activates or deactivates replica high availability (defaults to the cluster setting) | | slave_ha_priority | integer | Priority of the database in the replica high-availability mechanism | | syncer_mode | `distributed`
`centralized`| Configures syncer to run in distributed or centralized mode. For distributed syncer, the DMC policy must be all-nodes or all-master-nodes | | syncer_monitoring | `enabled`
`disabled` | Activates syncer monitoring | +| tracking_table_max_keys | integer | The client-side caching invalidation table size. 0 makes the cache unlimited. | | XADD behavior mode | Description | | - | - | diff --git a/content/operate/rs/references/cli-utilities/rladmin/upgrade.md b/content/operate/rs/references/cli-utilities/rladmin/upgrade.md index fca8a73a5b..8e61d84142 100644 --- a/content/operate/rs/references/cli-utilities/rladmin/upgrade.md +++ b/content/operate/rs/references/cli-utilities/rladmin/upgrade.md @@ -35,18 +35,20 @@ rladmin upgrade db { db: | } As of v6.2.4, the default behavior for `upgrade db` has changed. It is now controlled by a new parameter that sets the default upgrade policy used to create new databases and to upgrade ones already in the cluster. To learn more, see [`tune cluster default_redis_version`]({{< relref "/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster" >}}). +As of Redis Enterprise Software version 7.8.2, `upgrade db` will always upgrade modules. + ### Parameters | Parameters | Type/Value | Description | |----------------------------|--------------------------|------------------------------------------------------------------------------------------------------------------------| | db | db:\
name | Database to upgrade | -| and module | [upgrade module](#upgrade-module) command | Clause that allows the upgrade of a database and a specified Redis module in a single step with only one restart (can be specified multiple times) | +| and module | [upgrade module](#upgrade-module) command | Clause that allows the upgrade of a database and a specified Redis module in a single step with only one restart (can be specified multiple times). Deprecated as of Redis Enterprise Software v7.8.2. | | discard_data | | Indicates that data will not be saved after the upgrade | | force | | Forces upgrade and skips warnings and confirmations | | force_discard | | Forces `discard_data` if replication or persistence is enabled | | keep_crdt_protocol_version | | Keeps the current CRDT protocol version | -| keep_redis_version | | Upgrades to a new patch release, not to the latest major.minor version | -| latest_with_modules | | Upgrades the Redis Enterprise Software version and all modules in the database | +| keep_redis_version | | Upgrades to a new patch release, not to the latest major.minor version. Deprecated as of Redis Enterprise Software v7.8.2. To upgrade modules without upgrading the Redis database version, set `redis_version` to the current Redis database version instead. | +| latest_with_modules | | Upgrades the Redis Enterprise Software version and all modules in the database. As of Redis Enterprise Software version 7.8.2, `upgrade db` will always upgrade modules. | | parallel_shards_upgrade | integer
'all' | Maximum number of shards to upgrade all at once | | preserve_roles | | Performs an additional failover to guarantee the shards' roles are preserved | | redis_version | Redis version | Upgrades the database to the specified version instead of the latest version | @@ -72,7 +74,7 @@ Done ## `upgrade module` -Upgrades Redis modules in use by a specific database. +Upgrades Redis modules in use by a specific database. Deprecated as of Redis Enterprise Software v7.8.2. Use [`upgrade db`](#upgrade-db) instead. For more information, see [Upgrade modules]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module" >}}). diff --git a/content/operate/rs/references/client_references/_index.md b/content/operate/rs/references/client_references/_index.md index 5644bab515..1c9c43022c 100644 --- a/content/operate/rs/references/client_references/_index.md +++ b/content/operate/rs/references/client_references/_index.md @@ -18,15 +18,15 @@ To connect to Redis instances from within your application, use a Redis client l | Language | Client name | | :---------- | :------------- | -| .Net | [NRedisStack]({{< relref "/develop/connect/clients/dotnet" >}}) | -| Go | [go-redis]({{< relref "/develop/connect/clients/go" >}}) | -| Java | [Jedis]({{< relref "/develop/connect/clients/java/jedis" >}}) (Synchronous) and [Lettuce]({{< relref "/develop/connect/clients/java/lettuce" >}}) (Asynchronous) | -| Node.js | [node-redis]({{< relref "/develop/connect/clients/nodejs" >}}) | -| Python | [redis-py]({{< relref "/develop/connect/clients/python" >}}) | +| .Net | [NRedisStack]({{< relref "/develop/clients/dotnet" >}}) | +| Go | [go-redis]({{< relref "/develop/clients/go" >}}) | +| Java | [Jedis]({{< relref "/develop/clients/jedis" >}}) (Synchronous) and [Lettuce]({{< relref "/develop/clients/lettuce" >}}) (Asynchronous) | +| Node.js | [node-redis]({{< relref "/develop/clients/nodejs" >}}) | +| Python | [redis-py]({{< relref "/develop/clients/redis-py" >}}) | Select a client name to see its quick start. ## Other clients For a list of community-driven Redis clients, which are available for more programming languages, see -[Community-supported clients]({{< relref "/develop/connect/clients#community-supported-clients" >}}). +[Community-supported clients]({{< relref "/develop/clients#community-supported-clients" >}}). diff --git a/content/operate/rs/references/compatibility/_index.md b/content/operate/rs/references/compatibility/_index.md index 0c39452568..66ca2d873a 100644 --- a/content/operate/rs/references/compatibility/_index.md +++ b/content/operate/rs/references/compatibility/_index.md @@ -20,6 +20,10 @@ Both Redis Enterprise Software and [Redis Cloud]({{< relref "/operate/rc" >}}) a Redis Enterprise Software and Redis Cloud support RESP2 and RESP3. See [RESP compatibility with Redis Enterprise]({{< relref "/operate/rs/references/compatibility/resp" >}}) for more information. +## Client-side caching compatibility + +Redis Software and Redis Cloud support [client-side caching]({{}}) for databases with Redis versions 7.4 or later. See [Client-side caching compatibility with Redis Software and Redis Cloud]({{}}) for more information about compatibility and configuration options. + ## Compatibility with open source Redis Cluster API Redis Enterprise supports [Redis OSS Cluster API]({{< relref "/operate/rs/clusters/optimize/oss-cluster-api" >}}) if it is enabled for a database. For more information, see [Enable OSS Cluster API]({{< relref "/operate/rs/databases/configure/oss-cluster-api" >}}). diff --git a/content/operate/rs/references/compatibility/client-side-caching.md b/content/operate/rs/references/compatibility/client-side-caching.md new file mode 100644 index 0000000000..1a3c2859c1 --- /dev/null +++ b/content/operate/rs/references/compatibility/client-side-caching.md @@ -0,0 +1,84 @@ +--- +Title: Client-side caching compatibility with Redis Software and Redis Cloud +alwaysopen: false +categories: +- docs +- operate +- rs +description: Redis Software and Redis Cloud compatibility with client-side caching. +linkTitle: Client-side caching +toc: 'true' +weight: 80 +--- + +Redis Software and Redis Cloud support [client-side caching]({{}}) for databases with Redis versions 7.4 or later. + +## Required database versions + +Client-side caching in Redis Software and Redis Cloud requires Redis database versions 7.4 or later. + +The following table shows the differences in client-side caching support by product: + +| Redis product | Client-side caching support | +|-------------------------|-----------------------------| +| Redis Community Edition | Redis v6.0 and later | +| Redis Cloud | Redis database v7.4 and later | +| Redis Software | Redis database v7.4 and later | + +## Supported RESP versions + +Client-side caching in Redis Software and Redis Cloud requires [RESP3]({{< relref "/develop/reference/protocol-spec#resp-versions" >}}). + +The following table shows the differences in client-side caching support for RESP by product: + +| Redis product with client-side caching | RESP2 | RESP3 | +|-------------------------|-------|-------| +| Redis Community Edition | | | +| Redis Cloud | | | +| Redis Software | | | + +## Two connections mode with REDIRECT not supported + +Unlike Redis Community Edition, Redis Software and Redis Cloud do not support [two connections mode]({{}}) or the `REDIRECT` option for [`CLIENT TRACKING`]({{}}). + +## Change tracking_table_max_keys for a database + +When client-side caching is enabled, Redis uses an invalidation table to track which keys are cached by each connected client. + +The configuration setting `tracking-table-max-keys` determines the maximum number of keys stored in the invalidation table and is set to `1000000` keys by default. Redis Software does not support using `CONFIG SET` to change this value, but you can use the REST API or rladmin instead. + +To change `tracking_table_max_keys` for a database in a Redis Software cluster: + +- [`rladmin tune db`]({{}}): + + ```sh + rladmin tune db db: tracking_table_max_keys 2000000 + ``` + + You can use the database name in place of `db:` in the preceding command. + +- [Update database configuration]({{}}) REST API request: + + ```sh + PUT /v1/bdbs/ + { "tracking_table_max_keys": 2000000 } + ``` + +## Change default tracking_table_max_keys + +The cluster-wide option `default_tracking_table_max_keys_policy` determines the default value of `tracking_table_max_keys` for new databases in a Redis Software cluster. `default_tracking_table_max_keys_policy` is set to `1000000` keys by default. + +To change `default_tracking_table_max_keys_policy`, use one of the following methods: + +- [`rladmin tune cluster`]({{}}) + + ```sh + rladmin tune cluster default_tracking_table_max_keys_policy 2000000 + ``` + +- [Update cluster policy]({{}}) REST API request: + + ```sh + PUT /v1/cluster/policy + { "default_tracking_table_max_keys_policy": 2000000 } + ``` diff --git a/content/operate/rs/references/compatibility/commands/connection.md b/content/operate/rs/references/compatibility/commands/connection.md index 5d7375effb..bf297f2d3c 100644 --- a/content/operate/rs/references/compatibility/commands/connection.md +++ b/content/operate/rs/references/compatibility/commands/connection.md @@ -30,8 +30,8 @@ The following tables show which Redis Community Edition [connection management c | [CLIENT REPLY]({{< relref "/commands/client-reply" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | | [CLIENT SETINFO]({{< relref "/commands/client-setinfo" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | [CLIENT SETNAME]({{< relref "/commands/client-setname" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | -| [CLIENT TRACKING]({{< relref "/commands/client-tracking" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | -| [CLIENT TRACKINGINFO]({{< relref "/commands/client-trackinginfo" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | +| [CLIENT TRACKING]({{< relref "/commands/client-tracking" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [CLIENT TRACKINGINFO]({{< relref "/commands/client-trackinginfo" >}}) |✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | [CLIENT UNBLOCK]({{< relref "/commands/client-unblock" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | [CLIENT UNPAUSE]({{< relref "/commands/client-unpause" >}}) | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | | | [ECHO]({{< relref "/commands/echo" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | diff --git a/content/operate/rs/references/compatibility/commands/data-types.md b/content/operate/rs/references/compatibility/commands/data-types.md index 0b5e08a01a..a2bc57cb13 100644 --- a/content/operate/rs/references/compatibility/commands/data-types.md +++ b/content/operate/rs/references/compatibility/commands/data-types.md @@ -50,6 +50,9 @@ The following tables show which Redis Community Edition data type commands are c |:--------|:----------------------|:-----------------|:------| | [HDEL]({{< relref "/commands/hdel" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | [HEXISTS]({{< relref "/commands/hexists" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HEXPIRE]({{< relref "/commands/hexpire" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HEXPIREAT]({{< relref "/commands/hexpireat" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HEXPIRETIME]({{< relref "/commands/hexpiretime" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | [HGET]({{< relref "/commands/hget" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | [HGETALL]({{< relref "/commands/hgetall" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | [HINCRBY]({{< relref "/commands/hincrby" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | @@ -58,11 +61,17 @@ The following tables show which Redis Community Edition data type commands are c | [HLEN]({{< relref "/commands/hlen" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | [HMGET]({{< relref "/commands/hmget" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | [HMSET]({{< relref "/commands/hmset" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Deprecated as of Redis v4.0.0. | +| [HPERSIST]({{< relref "/commands/hpersist" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HPEXPIRE]({{< relref "/commands/hpexpire" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HPEXPIREAT]({{< relref "/commands/hpexpireat" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HPEXPIRETIME]({{< relref "/commands/hpexpiretime" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HPTTL]({{< relref "/commands/hpttl" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | [HRANDFIELD]({{< relref "/commands/hrandfield" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | [HSCAN]({{< relref "/commands/hscan" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | [HSET]({{< relref "/commands/hset" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | [HSETNX]({{< relref "/commands/hsetnx" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | [HSTRLEN]({{< relref "/commands/hstrlen" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| [HTTL]({{< relref "/commands/httl" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | [HVALS]({{< relref "/commands/hvals" >}}) | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | diff --git a/content/operate/rs/references/compatibility/config-settings.md b/content/operate/rs/references/compatibility/config-settings.md index 28cd81b7c9..df5ac53de0 100644 --- a/content/operate/rs/references/compatibility/config-settings.md +++ b/content/operate/rs/references/compatibility/config-settings.md @@ -32,6 +32,7 @@ Redis Enterprise Software and [Redis Cloud]({{< relref "/operate/rc" >}}) only s | slowlog-max-len | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Value must be between 128 and 1024. | | stream-node-max-bytes | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | stream-node-max-entries | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| tracking-table-max-keys | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | For Redis Software, use an [update database configuration]({{}}) REST API request or [`rladmin tune db`]({{}}) to set `tracking_table_max_keys` instead. | | zset-max-listpack-entries | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | zset-max-listpack-value | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | zset-max-ziplist-entries | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | diff --git a/content/operate/rs/references/rest-api/objects/bdb/_index.md b/content/operate/rs/references/rest-api/objects/bdb/_index.md index 32a56d1ca4..1628eefdbe 100644 --- a/content/operate/rs/references/rest-api/objects/bdb/_index.md +++ b/content/operate/rs/references/rest-api/objects/bdb/_index.md @@ -29,7 +29,7 @@ An API object that represents a managed database in the cluster. | authorized_subjects | {{}}[{
"CN": string,
"O": string,
"OU": [array of strings],
"L": string,
"ST": string,
"C": string
}, ...]{{
}} A list of valid subjects used for additional certificate validations during TLS client authentication. All subject attributes are case-sensitive.
**Required subject fields**:
"CN" for Common Name
**Optional subject fields:**
"O" for Organization
"OU" for Organizational Unit (array of strings)
"L" for Locality (city)
"ST" for State/Province
"C" for 2-letter country code | | auto_upgrade | boolean (default: false); Upgrade the database automatically after a cluster upgrade | | avoid_nodes | array of strings; Cluster node UIDs to avoid when placing the database's shards and binding its endpoints | -| background_op | {{}}[{
"status": string,
"name": string,
"error": object,
"progress": number
}, ...]{{
}} (read-only); **progress**: Percent of completed steps in current operation | +| background_op | Deprecated as of Redis Enterprise Software v7.8.2. Use [`GET /v1/actions/bdb/`]({{}}) instead.
{{}}[{
"status": string,
"name": string,
"error": object,
"progress": number
}, ...]{{
}} (read-only); **progress**: Percent of completed steps in current operation | | backup | boolean (default: false); Policy for periodic database backup | | backup_failure_reason | Reason of last failed backup process (read-only)
Values:
'no-permission'
'wrong-file-path'
'general-error' | | backup_history | integer (default: 0); Backup history retention policy (number of days, 0 is forever) | @@ -57,6 +57,7 @@ An API object that represents a managed database in the cluster. | crdt_replicas | string; Replica set configuration, for internal use only. | | crdt_sources | array of [syncer_sources]({{< relref "/operate/rs/references/rest-api/objects/bdb/syncer_sources" >}}) objects; Remote endpoints/peers of CRDB database to sync from. See the 'bdb -\> replica_sources' section | | crdt_sync | Enable, disable, or pause syncing from specified crdt_sources. Applicable only for Active-Active databases. See [replica_sync]({{< relref "/operate/rs/references/rest-api/objects/bdb/replica_sync" >}}) for more details.
Values:
'enabled'
**'disabled'**
'paused'
'stopped' | +| crdt_sync_connection_alarm_timeout_seconds | integer (default: 0); If the syncer takes longer than the specified number of seconds to connect to an Active-Active database, raise a connection alarm | | crdt_sync_dist | boolean; Enable/disable distributed syncer in master-master | | crdt_syncer_auto_oom_unlatch | boolean (default: true); Syncer automatically attempts to recover synchronisation from peers after this database throws an Out-Of-Memory error. Otherwise, the syncer exits | | crdt_xadd_id_uniqueness_mode | XADD strict ID uniqueness mode. CRDT only.
Values:
‘liberal’
**‘strict’**
‘semi-strict’ | @@ -101,7 +102,7 @@ An API object that represents a managed database in the cluster. | memory_size | integer (default: 0); Database memory limit (0 is unlimited), expressed in bytes. | | metrics_export_all | boolean; Enable/disable exposing all shard metrics through the metrics exporter | | mkms | boolean (default: true); Are MKMS (Multi Key Multi Slots) commands supported? | -| module_list | {{}}[{
"module_id": string,
"module_args": [
u'string',
u'null'],
"module_name": string,
"semantic_version": string
}, ...]{{
}} List of modules associated with the database

**module_id**: Module UID
**module_args**: Module command-line arguments (pattern does not allow special characters &,\<,>,")
**module_name**: Module's name
**semantic_version**: Module's semantic version

As of Redis Enterprise Software v7.4.2, **module_id** and **semantic_version** are optional. | +| module_list | {{}}[{
"module_id": string,
"module_args": [
u'string',
u'null'],
"module_name": string,
"semantic_version": string
}, ...]{{
}} List of modules associated with the database

**module_id**: Module UID (deprecated; use `module_name` instead)
**module_args**: Module command-line arguments (pattern does not allow special characters &,\<,>,")
**module_name**: Module's name
**semantic_version**: Module's semantic version (deprecated; use `module_args` instead)

**module_id** and **semantic_version** are optional as of Redis Enterprise Software v7.4.2 and deprecated as of v7.8.2. | | mtls_allow_outdated_certs | boolean; An optional mTLS relaxation flag for certs verification | | mtls_allow_weak_hashing | boolean; An optional mTLS relaxation flag for certs verification | | name | string; Database name. Only letters, numbers, or hyphens are valid characters. The name must start and end with a letter or number. | @@ -117,6 +118,7 @@ An API object that represents a managed database in the cluster. | repl_backlog_size | string; Redis replication backlog size ('auto' or size in bytes) | | replica_sources | array of [syncer_sources]({{< relref "/operate/rs/references/rest-api/objects/bdb/syncer_sources" >}}) objects; Remote endpoints of database to sync from. See the 'bdb -\> replica_sources' section | | [replica_sync]({{< relref "/operate/rs/references/rest-api/objects/bdb/replica_sync" >}}) | Enable, disable, or pause syncing from specified replica_sources
Values:
'enabled'
**'disabled'**
'paused'
'stopped' | +| replica_sync_connection_alarm_timeout_seconds | integer (default: 0); If the syncer takes longer than the specified number of seconds to connect to a replica, raise a connection alarm | | replica_sync_dist | boolean; Enable/disable distributed syncer in replica-of | | replication | boolean (default: false); In-memory database replication mode | | resp3 | boolean (default: true); Enables or deactivates RESP3 support | @@ -144,6 +146,7 @@ An API object that represents a managed database in the cluster. | syncer_mode | The syncer for replication between database instances is either on a single node (centralized) or on each node that has a proxy according to the proxy policy (distributed). (read-only)
Values:
'distributed'
'centralized' | | tags | {{}}[{
"key": string,
"value": string
}, ...]{{
}} Optional list of tag objects attached to the database. Each tag requires a key-value pair.
**key**: Represents the tag's meaning and must be unique among tags (pattern does not allow special characters &,\<,>,")
**value**: The tag's value.| | tls_mode | Require TLS-authenticated and encrypted connections to the database
Values:
'enabled'
**'disabled'**
'replica_ssl' | +| tracking_table_max_keys | integer; The client-side caching invalidation table size. 0 makes the cache unlimited. | | type | Type of database
Values:
**'redis'**
'memcached' | | use_nodes | array of strings; Cluster node UIDs to use for database shards and bound endpoints | | version | string; Database compatibility version: full Redis/memcached version number, such as 6.0.6. This value can only change during database creation and database upgrades.| diff --git a/content/operate/rs/references/rest-api/objects/cluster/_index.md b/content/operate/rs/references/rest-api/objects/cluster/_index.md index c54b49279b..71aa443db9 100644 --- a/content/operate/rs/references/rest-api/objects/cluster/_index.md +++ b/content/operate/rs/references/rest-api/objects/cluster/_index.md @@ -50,6 +50,7 @@ An API object that represents the cluster. | name | string | Cluster's fully qualified domain name (read-only) | | password_complexity | boolean (default: false) | Enforce password complexity policy | | password_expiration_duration | integer (default: 0) | The number of days a password is valid until the user is required to replace it | +| password_min_length | integer, (range: 8-256) (default: 8) | The minimum length required for a password. | | proxy_certificate | string | Cluster's proxy certificate | | proxy_max_ccs_disconnection_time | integer | Cluster-wide proxy timeout policy between proxy and CCS | | rack_aware | boolean | Cluster operates in a rack-aware mode (read-only) | diff --git a/content/operate/rs/references/rest-api/objects/cluster/alert_settings.md b/content/operate/rs/references/rest-api/objects/cluster/alert_settings.md index ddc9415b39..4203026ebb 100644 --- a/content/operate/rs/references/rest-api/objects/cluster/alert_settings.md +++ b/content/operate/rs/references/rest-api/objects/cluster/alert_settings.md @@ -13,30 +13,31 @@ weight: $weight | Name | Type/Value | Description | |------|------------|-------------| -| cluster_certs_about_to_expire | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Cluster certificate will expire in x days | -| cluster_even_node_count | boolean (default: false) | True high availability requires an odd number of nodes in the cluster | -| cluster_flash_overcommit | boolean (default: false) | Flash memory committed to databases is larger than cluster total flash memory | -| cluster_inconsistent_redis_sw | boolean (default: false) | Some shards in the cluster are running different versions of Redis software | -| cluster_inconsistent_rl_sw | boolean (default: false) | Some nodes in the cluster are running different versions of Redis Enterprise software | -| cluster_internal_bdb | boolean (default: false) | Issues with internal cluster databases | -| cluster_multiple_nodes_down | boolean (default: false) | Multiple cluster nodes are down (this might cause data loss) | -| cluster_node_joined | boolean (default: false) | New node joined the cluster | -| cluster_node_remove_abort_completed | boolean (default: false) | Cancel node remove operation completed | -| cluster_node_remove_abort_failed | boolean (default: false) | Cancel node remove operation failed | -| cluster_node_remove_completed | boolean (default: false) | Node removed from the cluster | -| cluster_node_remove_failed | boolean (default: false) | Failed to remove a node from the cluster | -| cluster_ocsp_query_failed | boolean (default: false) | Failed to query the OCSP server | -| cluster_ocsp_status_revoked | boolean (default: false) | OCSP certificate status is REVOKED | -| cluster_ram_overcommit | boolean (default: false) | RAM committed to databases is larger than cluster total RAM | -| cluster_too_few_nodes_for_replication | boolean (default: false) | Replication requires at least 2 nodes in the cluster | -| node_aof_slow_disk_io | boolean (default: false) | AOF reaching disk I/O limits -| node_checks_error | boolean (default: false) | Some node checks have failed | -| node_cpu_utilization | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node CPU utilization has reached the threshold value (% of the utilization limit) | -| node_ephemeral_storage | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node ephemeral storage has reached the threshold value (% of the storage limit) | -| node_failed | boolean (default: false) | Node failed | -| node_free_flash | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node flash storage has reached the threshold value (% of the storage limit) | -| node_insufficient_disk_aofrw | boolean (default: false) | Insufficient AOF disk space | -| node_internal_certs_about_to_expire | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object| Internal certificate on node will expire in x days | -| node_memory | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node memory has reached the threshold value (% of the memory limit) | -| node_net_throughput | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node network throughput has reached the threshold value (bytes/s) | -| node_persistent_storage | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node persistent storage has reached the threshold value (% of the storage limit) | +| cluster_certs_about_to_expire | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Cluster certificate will expire in x days | +| cluster_even_node_count | boolean (default: false) | True high availability requires an odd number of nodes in the cluster | +| cluster_flash_overcommit | boolean (default: false) | Flash memory committed to databases is larger than cluster total flash memory | +| cluster_inconsistent_redis_sw | boolean (default: false) | Some shards in the cluster are running different versions of Redis software | +| cluster_inconsistent_rl_sw | boolean (default: false) | Some nodes in the cluster are running different versions of Redis Enterprise software | +| cluster_internal_bdb | boolean (default: false) | Issues with internal cluster databases | +| cluster_license_about_to_expire | [cluster_alert_settings_with_threshold]({{}}) object | Cluster license will expire in x days. This alert is enabled by default. Its default threshold is 7 days before license expiration. | +| cluster_multiple_nodes_down | boolean (default: false) | Multiple cluster nodes are down (this might cause data loss) | +| cluster_node_joined | boolean (default: false) | New node joined the cluster | +| cluster_node_remove_abort_completed | boolean (default: false) | Cancel node remove operation completed | +| cluster_node_remove_abort_failed | boolean (default: false) | Cancel node remove operation failed | +| cluster_node_remove_completed | boolean (default: false) | Node removed from the cluster | +| cluster_node_remove_failed | boolean (default: false) | Failed to remove a node from the cluster | +| cluster_ocsp_query_failed | boolean (default: false) | Failed to query the OCSP server | +| cluster_ocsp_status_revoked | boolean (default: false) | OCSP certificate status is REVOKED | +| cluster_ram_overcommit | boolean (default: false) | RAM committed to databases is larger than cluster total RAM | +| cluster_too_few_nodes_for_replication | boolean (default: false) | Replication requires at least 2 nodes in the cluster | +| node_aof_slow_disk_io | boolean (default: false) | AOF reaching disk I/O limits +| node_checks_error | boolean (default: false) | Some node checks have failed | +| node_cpu_utilization | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node CPU utilization has reached the threshold value (% of the utilization limit) | +| node_ephemeral_storage | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node ephemeral storage has reached the threshold value (% of the storage limit) | +| node_failed | boolean (default: false) | Node failed | +| node_free_flash | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node flash storage has reached the threshold value (% of the storage limit) | +| node_insufficient_disk_aofrw | boolean (default: false) | Insufficient AOF disk space | +| node_internal_certs_about_to_expire | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object| Internal certificate on node will expire in x days | +| node_memory | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node memory has reached the threshold value (% of the memory limit) | +| node_net_throughput | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node network throughput has reached the threshold value (bytes/s) | +| node_persistent_storage | [cluster_alert_settings_with_threshold]({{< relref "/operate/rs/references/rest-api/objects/cluster/cluster_alert_settings_with_threshold" >}}) object | Node persistent storage has reached the threshold value (% of the storage limit) | diff --git a/content/operate/rs/references/rest-api/objects/cluster_settings.md b/content/operate/rs/references/rest-api/objects/cluster_settings.md index d5520294b1..410521b435 100644 --- a/content/operate/rs/references/rest-api/objects/cluster_settings.md +++ b/content/operate/rs/references/rest-api/objects/cluster_settings.md @@ -26,9 +26,11 @@ Cluster resources management policy | default_concurrent_restore_actions | integer | Default number of restore actions allowed at the same time. Set to 0 to allow any number of simultaneous restore actions. | | default_fork_evict_ram | boolean | If true, the bdbs should evict data from RAM to ensure successful replication or persistence | | default_non_sharded_proxy_policy | `single`

`all-master-shards`

`all-nodes` | Default proxy_policy for newly created non-sharded databases' endpoints | +| default_oss_sharding | boolean (default: false) | Default hashing policy to use for new databases. This field is for future use only and should not be changed. | | default_provisioned_redis_version | string | Default Redis version | | default_sharded_proxy_policy | `single`

`all-master-shards`

`all-nodes` | Default proxy_policy for newly created sharded databases' endpoints | | default_shards_placement | `dense`
`sparse` | Default shards_placement for a newly created databases | +| default_tracking_table_max_keys_policy | integer (default: 1000000) | Defines the default value of the client-side caching invalidation table size for new databases. 0 makes the cache unlimited. | | endpoint_rebind_propagation_grace_time | integer | Time to wait between the addition and removal of a proxy | | failure_detection_sensitivity | `high`
`low` | Predefined thresholds and timeouts for failure detection (previously known as `watchdog_profile`)
• `high` (previously `local-network`) – high failure detection sensitivity, lower thresholds, faster failure detection and failover
• `low` (previously `cloud`) – low failure detection sensitivity, higher tolerance for latency variance (also called network jitter) | | hide_user_data_from_log | boolean (default: false) | Set to `true` to enable the `hide-user-data-from-log` Redis configuration setting, which avoids logging user data | diff --git a/content/operate/rs/references/rest-api/objects/cm_settings.md b/content/operate/rs/references/rest-api/objects/cm_settings.md new file mode 100644 index 0000000000..9a8bfc619f --- /dev/null +++ b/content/operate/rs/references/rest-api/objects/cm_settings.md @@ -0,0 +1,15 @@ +--- +Title: Cluster Manager settings object +alwaysopen: false +categories: +- docs +- operate +- rs +description: A REST API object that represents Cluster Manager UI settings +linkTitle: cm_settings +weight: $weight +--- + +| Name | Type/Value | Description | +|------|------------|-------------| +| timezone | string | Configurable [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for the Cluster Manager UI. The default time zone is UTC. | diff --git a/content/operate/rs/references/rest-api/objects/module.md b/content/operate/rs/references/rest-api/objects/module.md index 38dfa288dc..bff829b52b 100644 --- a/content/operate/rs/references/rest-api/objects/module.md +++ b/content/operate/rs/references/rest-api/objects/module.md @@ -20,6 +20,7 @@ Represents a [Redis module]({{< relref "/operate/oss_and_stack/stack-with-enterp | capabilities | array of strings | List of capabilities supported by this module | | capability_name | string | Short description of module functionality | | command_line_args | string | Command line arguments passed to the module | +| compatible_redis_version | string | Redis version required by this module | | config_command | string | Name of command to configure module arguments at runtime | | dependencies | object dependencies | Module dependencies | | description | string | Short description of the module @@ -29,7 +30,7 @@ Represents a [Redis module]({{< relref "/operate/oss_and_stack/stack-with-enterp | is_bundled | boolean | Whether module came bundled with a version of Redis Enterprise | | license | string | Module is distributed under this license | min_redis_pack_version | string | Minimum Redis Enterprise Software cluster version required by this module | -| min_redis_version | string | Minimum Redis database version required by this module | +| min_redis_version | string | Minimum Redis database version required by this module. Only relevant for Redis databases earlier than v7.4. | | module_file | string | Module filename | | module_name | `search`
`ReJSON`
`graph`
`timeseries`
`bf` | Module's name
| | os | string | Operating system used to compile the module | diff --git a/content/operate/rs/references/rest-api/objects/role.md b/content/operate/rs/references/rest-api/objects/role.md index dd5e78bce8..3478265baa 100644 --- a/content/operate/rs/references/rest-api/objects/role.md +++ b/content/operate/rs/references/rest-api/objects/role.md @@ -17,5 +17,5 @@ An API object that represents a role. | uid | integer | Role's unique ID | | account_id | integer | SM account ID | | action_uid | string | Action UID. If it exists, progress can be tracked by the GET /actions/{uid} API (read-only) | -| management | 'admin'
'db_member'
'db_viewer'
'cluster_member'
'cluster_viewer'
'none' | [Management role]({{< relref "/operate/rs/references/rest-api/permissions#roles" >}}) | +| management | 'admin'
'db_member'
'db_viewer'
'cluster_member'
'cluster_viewer'
'user_manager'
'none' | [Management role]({{< relref "/operate/rs/references/rest-api/permissions#roles" >}}) | | name | string | Role's name | diff --git a/content/operate/rs/references/rest-api/objects/user.md b/content/operate/rs/references/rest-api/objects/user.md index 4bbaa66e0d..ad1a2c03c6 100644 --- a/content/operate/rs/references/rest-api/objects/user.md +++ b/content/operate/rs/references/rest-api/objects/user.md @@ -5,19 +5,17 @@ categories: - docs - operate - rs -description: An object that represents a Redis Enterprise user +description: An API object that represents a Redis Enterprise user linkTitle: user weight: $weight --- -An API object that represents a Redis Enterprise user. - | Name | Type/Value | Description | |------|------------|-------------| | uid | integer | User's unique ID | | account_id | integer | SM account ID | | action_uid | string | Action UID. If it exists, progress can be tracked by the `GET` `/actions/{uid}` API request (read-only) | -| auth_method | **'regular'** | User's authentication method (deprecated as of Redis Enterprise v7.2) | +| auth_method | **'regular'**
'certificate'
'entraid' | User's authentication method | | bdbs_email_alerts | complex object | UIDs of databases that user will receive alerts for | | cluster_email_alerts | boolean | Activate cluster email alerts for a user | | email | string | User's email (pattern matching only ASCII characters) | @@ -26,6 +24,6 @@ An API object that represents a Redis Enterprise user. | password | string | User's password. If `password_hash_method` is set to `1`, the password should be hashed using SHA-256. The format before hashing is `username:clustername:password`. | | password_hash_method | '1' | Used when password is passed pre-hashed to specify the hashing method | | password_issue_date | string | The date in which the password was set (read-only) | -| role | 'admin'
'cluster_member'
'cluster_viewer'
'db_member'
**'db_viewer'**
'none' | User's [role]({{< relref "/operate/rs/references/rest-api/permissions#roles" >}}) | +| role | 'admin'
'cluster_member'
'cluster_viewer'
'db_member'
**'db_viewer'**
'user_manager'
'none' | User's [role]({{< relref "/operate/rs/references/rest-api/permissions#roles" >}}) | | role_uids | array of integers | UIDs of user's roles for role-based access control | -| status | 'active'
'locked' | User sign-in status (read-only)
**active**: able to sign in
**locked**: unable to sign in | +| status | 'active'
'locked'
'password_expired' | User sign-in status (read-only)
**active**: able to sign in
**locked**: unable to sign in
**password_expired**: unable to sign in because the password expired | diff --git a/content/operate/rs/references/rest-api/permissions.md b/content/operate/rs/references/rest-api/permissions.md index 8bbf366fc0..bbaa2a9dda 100644 --- a/content/operate/rs/references/rest-api/permissions.md +++ b/content/operate/rs/references/rest-api/permissions.md @@ -26,6 +26,7 @@ Available management roles include: - **[db_member](#db-member-role)**: Can create or modify databases and view their info. - **[cluster_viewer](#cluster-viewer-role)**: Can view cluster and database info. - **[cluster_member](#cluster-member-role)**: Can modify the cluster and databases and view their info. +- **[user_manager](#user-manager-role)**: Can modify users and view their info. - **[admin](#admin-role)**: Can view and modify all elements of the cluster. ## Permissions list for each role @@ -33,101 +34,106 @@ Available management roles include: | Role | Permissions | |------|-------------| | none | No permissions | -| admin | [add_cluster_module](#add_cluster_module), [cancel_cluster_action](#cancel_cluster_action), [cancel_node_action](#cancel_node_action), [config_ldap](#config_ldap), [config_ocsp](#config_ocsp), [create_bdb](#create_bdb), [create_crdb](#create_crdb), [create_ldap_mapping](#create_ldap_mapping), [create_new_user](#create_new_user), [create_redis_acl](#create_redis_acl), [create_role](#create_role), [delete_bdb](#delete_bdb), [delete_cluster_module](#delete_cluster_module), [delete_crdb](#delete_crdb), [delete_ldap_mapping](#delete_ldap_mapping), [delete_redis_acl](#delete_redis_acl), [delete_role](#delete_role), [delete_user](#delete_user), [edit_bdb_module](#edit_bdb_module), [flush_crdb](#flush_crdb), [install_new_license](#install_new_license), [migrate_shard](#migrate_shard), [purge_instance](#purge_instance), [reset_bdb_current_backup_status](#reset_bdb_current_backup_status), [reset_bdb_current_export_status](#reset_bdb_current_export_status), [reset_bdb_current_import_status](#reset_bdb_current_import_status), [start_bdb_export](#start_bdb_export), [start_bdb_import](#start_bdb_import), [start_bdb_recovery](#start_bdb_recovery), [start_cluster_action](#start_cluster_action), [start_node_action](#start_node_action), [test_ocsp_status](#test_ocsp_status), [update_bdb](#update_bdb), [update_bdb_alerts](#update_bdb_alerts), [update_bdb_with_action](#update_bdb_with_action), [update_cluster](#update_cluster), [update_crdb](#update_crdb), [update_ldap_mapping](#update_ldap_mapping), [update_node](#update_node), [update_proxy](#update_proxy), [update_redis_acl](#update_redis_acl), [update_role](#update_role), [update_user](#update_user), [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_ldap_mappings_info](#view_all_ldap_mappings_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_all_users_info](#view_all_users_info), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_keys](#view_cluster_keys), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_debugging_info](#view_debugging_info), [view_endpoint_stats](#view_endpoint_stats), [view_ldap_config](#view_ldap_config), [view_ldap_mapping_info](#view_ldap_mapping_info), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_ocsp_config](#view_ocsp_config), [view_ocsp_status](#view_ocsp_status), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_redis_pass](#view_redis_pass), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action), [view_user_info](#view_user_info) | -| cluster_member | [create_bdb](#create_bdb), [create_crdb](#create_crdb), [delete_bdb](#delete_bdb), [delete_crdb](#delete_crdb), [edit_bdb_module](#edit_bdb_module), [flush_crdb](#flush_crdb), [migrate_shard](#migrate_shard), [purge_instance](#purge_instance), [reset_bdb_current_backup_status](#reset_bdb_current_backup_status), [reset_bdb_current_export_status](#reset_bdb_current_export_status), [reset_bdb_current_import_status](#reset_bdb_current_import_status), [start_bdb_export](#start_bdb_export), [start_bdb_import](#start_bdb_import), [start_bdb_recovery](#start_bdb_recovery), [update_bdb](#update_bdb), [update_bdb_alerts](#update_bdb_alerts), [update_bdb_with_action](#update_bdb_with_action), [update_crdb](#update_crdb), [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_keys](#view_cluster_keys), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_debugging_info](#view_debugging_info), [view_endpoint_stats](#view_endpoint_stats), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_redis_pass](#view_redis_pass), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action) | -| cluster_viewer | [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_endpoint_stats](#view_endpoint_stats), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action) | -| db_member | [create_bdb](#create_bdb), [create_crdb](#create_crdb), [delete_bdb](#delete_bdb), [delete_crdb](#delete_crdb), [edit_bdb_module](#edit_bdb_module), [flush_crdb](#flush_crdb), [migrate_shard](#migrate_shard), [purge_instance](#purge_instance), [reset_bdb_current_backup_status](#reset_bdb_current_backup_status), [reset_bdb_current_export_status](#reset_bdb_current_export_status), [reset_bdb_current_import_status](#reset_bdb_current_import_status), [start_bdb_export](#start_bdb_export), [start_bdb_import](#start_bdb_import), [start_bdb_recovery](#start_bdb_recovery), [update_bdb](#update_bdb), [update_bdb_alerts](#update_bdb_alerts), [update_bdb_with_action](#update_bdb_with_action), [update_crdb](#update_crdb), [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_debugging_info](#view_debugging_info), [view_endpoint_stats](#view_endpoint_stats), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_redis_pass](#view_redis_pass), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action) | -| db_viewer | [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_endpoint_stats](#view_endpoint_stats), [view_license](#view_license), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action) | +| admin | [add_cluster_module](#add_cluster_module), [cancel_cluster_action](#cancel_cluster_action), [cancel_node_action](#cancel_node_action), [config_ldap](#config_ldap), [config_ocsp](#config_ocsp), [create_bdb](#create_bdb), [create_crdb](#create_crdb), [create_ldap_mapping](#create_ldap_mapping), [create_new_user](#create_new_user), [create_redis_acl](#create_redis_acl), [create_role](#create_role), [delete_bdb](#delete_bdb), [delete_cluster_module](#delete_cluster_module), [delete_crdb](#delete_crdb), [delete_ldap_mapping](#delete_ldap_mapping), [delete_redis_acl](#delete_redis_acl), [delete_role](#delete_role), [delete_user](#delete_user), [edit_bdb_module](#edit_bdb_module), [failover_shard](#failover_shard), [flush_crdb](#flush_crdb), [install_new_license](#install_new_license), [migrate_shard](#migrate_shard), [purge_instance](#purge_instance), [reset_bdb_current_backup_status](#reset_bdb_current_backup_status), [reset_bdb_current_export_status](#reset_bdb_current_export_status), [reset_bdb_current_import_status](#reset_bdb_current_import_status), [start_bdb_export](#start_bdb_export), [start_bdb_import](#start_bdb_import), [start_bdb_recovery](#start_bdb_recovery), [start_cluster_action](#start_cluster_action), [start_node_action](#start_node_action), [test_ocsp_status](#test_ocsp_status), [update_bdb](#update_bdb), [update_bdb_alerts](#update_bdb_alerts), [update_bdb_with_action](#update_bdb_with_action), [update_cluster](#update_cluster), [update_crdb](#update_crdb), [update_ldap_mapping](#update_ldap_mapping), [update_node](#update_node), [update_proxy](#update_proxy), [update_redis_acl](#update_redis_acl), [update_role](#update_role), [update_user](#update_user), [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_ldap_mappings_info](#view_all_ldap_mappings_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_all_users_info](#view_all_users_info), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_keys](#view_cluster_keys), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_debugging_info](#view_debugging_info), [view_endpoint_stats](#view_endpoint_stats), [view_ldap_config](#view_ldap_config), [view_ldap_mapping_info](#view_ldap_mapping_info), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_ocsp_config](#view_ocsp_config), [view_ocsp_status](#view_ocsp_status), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_redis_pass](#view_redis_pass), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action), [view_user_info](#view_user_info) | +| cluster_member | [create_bdb](#create_bdb), [create_crdb](#create_crdb), [delete_bdb](#delete_bdb), [delete_crdb](#delete_crdb), [edit_bdb_module](#edit_bdb_module), [failover_shard](#failover_shard), [flush_crdb](#flush_crdb), [migrate_shard](#migrate_shard), [purge_instance](#purge_instance), [reset_bdb_current_backup_status](#reset_bdb_current_backup_status), [reset_bdb_current_export_status](#reset_bdb_current_export_status), [reset_bdb_current_import_status](#reset_bdb_current_import_status), [start_bdb_export](#start_bdb_export), [start_bdb_import](#start_bdb_import), [start_bdb_recovery](#start_bdb_recovery), [update_bdb](#update_bdb), [update_bdb_alerts](#update_bdb_alerts), [update_bdb_with_action](#update_bdb_with_action), [update_crdb](#update_crdb), [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_keys](#view_cluster_keys), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_debugging_info](#view_debugging_info), [view_endpoint_stats](#view_endpoint_stats), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_redis_pass](#view_redis_pass), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action) | +| cluster_viewer | [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_endpoint_stats](#view_endpoint_stats), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action) | +| db_member | [create_bdb](#create_bdb), [create_crdb](#create_crdb), [delete_bdb](#delete_bdb), [delete_crdb](#delete_crdb), [edit_bdb_module](#edit_bdb_module), [failover_shard](#failover_shard), [flush_crdb](#flush_crdb), [migrate_shard](#migrate_shard), [purge_instance](#purge_instance), [reset_bdb_current_backup_status](#reset_bdb_current_backup_status), [reset_bdb_current_export_status](#reset_bdb_current_export_status), [reset_bdb_current_import_status](#reset_bdb_current_import_status), [start_bdb_export](#start_bdb_export), [start_bdb_import](#start_bdb_import), [start_bdb_recovery](#start_bdb_recovery), [update_bdb](#update_bdb), [update_bdb_alerts](#update_bdb_alerts), [update_bdb_with_action](#update_bdb_with_action), [update_crdb](#update_crdb), [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_debugging_info](#view_debugging_info), [view_endpoint_stats](#view_endpoint_stats), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_redis_pass](#view_redis_pass), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action) | +| db_viewer | [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_endpoint_stats](#view_endpoint_stats), [view_license](#view_license), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action) | +| user_manager | [config_ldap](#config_ldap), [create_ldap_mapping](#create_ldap_mapping), [create_new_user](#create_new_user), [create_role](#create_role), [create_redis_acl](#create_redis_acl), [delete_ldap_mapping](#delete_ldap_mapping), [delete_redis_acl](#delete_redis_acl), [delete_role](#delete_role), [delete_user](#delete_user), [install_new_license](#install_new_license), [update_ldap_mapping](#update_ldap_mapping), [update_proxy](#update_proxy), [update_role](#update_role), [update_redis_acl](#update_redis_acl), [update_user](#update_user), [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_ldap_mappings_info](#view_all_ldap_mappings_info), [view_all_nodes_alerts](view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_all_users_info](#view_all_users_info), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_keys](#view_cluster_keys), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_endpoint_stats](#view_endpoint_stats), [view_ldap_config](#view_ldap_config), [view_ldap_mapping_info](#view_ldap_mapping_info), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_redis_pass](#view_redis_pass), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action), [view_user_info](#view_user_info) + | ## Roles list per permission | Permission | Roles | |------------|-------| -| add_cluster_module| admin | -| cancel_cluster_action | admin | -| cancel_node_action | admin | -| config_ldap | admin | -| config_ocsp | admin | -| create_bdb | admin
cluster_member
db_member | -| create_crdb | admin
cluster_member
db_member | -| create_ldap_mapping | admin | -| create_new_user | admin | -| create_redis_acl | admin | -| create_role | admin | -| delete_bdb | admin
cluster_member
db_member | -| delete_cluster_module | admin | -| delete_crdb | admin
cluster_member
db_member | -| delete_ldap_mapping | admin | -| delete_redis_acl | admin | -| delete_role | admin | -| delete_user | admin | -| edit_bdb_module | admin
cluster_member
db_member | -| flush_crdb | admin
cluster_member
db_member | -| install_new_license | admin | -| migrate_shard | admin
cluster_member
db_member | -| purge_instance | admin
cluster_member
db_member | -| reset_bdb_current_backup_status | admin
cluster_member
db_member | -| reset_bdb_current_export_status | admin
cluster_member
db_member | -| reset_bdb_current_import_status | admin
cluster_member
db_member | -| start_bdb_export | admin
cluster_member
db_member | -| start_bdb_import | admin
cluster_member
db_member | -| start_bdb_recovery | admin
cluster_member
db_member | -| start_cluster_action | admin | -| start_node_action | admin | -| test_ocsp_status | admin | -| update_bdb | admin
cluster_member
db_member | -| update_bdb_alerts | admin
cluster_member
db_member | -| update_bdb_with_action | admin
cluster_member
db_member | -| update_cluster | admin | -| update_crdb | admin
cluster_member
db_member | -| update_ldap_mapping | admin | -| update_node | admin | -| update_proxy | admin | -| update_redis_acl | admin | -| update_role | admin | -| update_user | admin | -| view_all_bdb_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_all_bdbs_alerts | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_all_bdbs_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_all_ldap_mappings_info | admin | -| view_all_nodes_alerts | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_all_nodes_checks | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_all_nodes_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_all_nodes_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_all_proxies_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_all_redis_acls_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_all_roles_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_all_shard_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_all_users_info | admin | -| view_bdb_alerts | admin
cluster_member
cluster_viewer
db_member
db_viewer |view_bdb_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_bdb_recovery_plan | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_bdb_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_cluster_alerts | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_cluster_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_cluster_keys | admin
cluster_member | -| view_cluster_modules | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_cluster_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_crdb | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_crdb_list | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_debugging_info | admin
cluster_member
db_member
| -| view_endpoint_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_ldap_config | admin | -| view_ldap_mapping_info | admin | -| view_license | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_logged_events | admin
cluster_member
cluster_viewer
db_member | -| view_node_alerts | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_node_check | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_node_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_node_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_ocsp_config | admin | -| view_ocsp_status | admin | -| view_proxy_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_redis_acl_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_redis_pass | admin
cluster_member
db_member | -| view_role_info | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_shard_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_status_of_all_node_actions | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_status_of_cluster_action | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_status_of_node_action | admin
cluster_member
cluster_viewer
db_member
db_viewer | -| view_user_info | admin | +| add_cluster_module| admin | +| cancel_cluster_action | admin | +| cancel_node_action | admin | +| config_ldap | admin
user_manager | +| config_ocsp | admin | +| create_bdb | admin
cluster_member
db_member | +| create_crdb | admin
cluster_member
db_member | +| create_ldap_mapping | admin
user_manager | +| create_new_user | admin
user_manager | +| create_redis_acl | admin
user_manager | +| create_role | admin
user_manager | +| delete_bdb | admin
cluster_member
db_member | +| delete_cluster_module | admin | +| delete_crdb | admin
cluster_member
db_member | +| delete_ldap_mapping | admin
user_manager | +| delete_redis_acl | admin
user_manager | +| delete_role | admin
user_manager | +| delete_user | admin
user_manager | +| edit_bdb_module | admin
cluster_member
db_member | +| failover_shard | admin
cluster_member
db_member | +| flush_crdb | admin
cluster_member
db_member | +| install_new_license | admin
user_manager | +| migrate_shard | admin
cluster_member
db_member | +| purge_instance | admin
cluster_member
db_member | +| reset_bdb_current_backup_status | admin
cluster_member
db_member | +| reset_bdb_current_export_status | admin
cluster_member
db_member | +| reset_bdb_current_import_status | admin
cluster_member
db_member | +| start_bdb_export | admin
cluster_member
db_member | +| start_bdb_import | admin
cluster_member
db_member | +| start_bdb_recovery | admin
cluster_member
db_member | +| start_cluster_action | admin | +| start_node_action | admin | +| test_ocsp_status | admin | +| update_bdb | admin
cluster_member
db_member | +| update_bdb_alerts | admin
cluster_member
db_member | +| update_bdb_with_action | admin
cluster_member
db_member | +| update_cluster | admin | +| update_crdb | admin
cluster_member
db_member | +| update_ldap_mapping | admin
user_manager | +| update_node | admin | +| update_proxy | admin
user_manager | +| update_redis_acl | admin
user_manager | +| update_role | admin
user_manager | +| update_user | admin
user_manager | +| view_all_bdb_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_all_bdbs_alerts | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_all_bdbs_info | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_all_ldap_mappings_info | admin
user_manager | +| view_all_nodes_alerts | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_all_nodes_checks | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_all_nodes_info | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_all_nodes_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_all_proxies_info | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_all_redis_acls_info | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_all_roles_info | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_all_shard_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_all_users_info | admin
user_manager | +| view_bdb_alerts | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager |view_bdb_info | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_bdb_recovery_plan | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_bdb_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_cluster_alerts | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_cluster_info | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_cluster_keys | admin
cluster_member
user_manager | +| view_cluster_modules | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_cluster_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_crdb | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_crdb_list | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_crdb_task | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_crdb_task_list | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_debugging_info | admin
cluster_member
db_member
user_manager | +| view_endpoint_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_ldap_config | admin
user_manager | +| view_ldap_mapping_info | admin
user_manager | +| view_license | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_logged_events | admin
cluster_member
cluster_viewer
db_member
user_manager | +| view_node_alerts | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_node_check | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_node_info | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_node_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_ocsp_config | admin | +| view_ocsp_status | admin | +| view_proxy_info | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_redis_acl_info | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_redis_pass | admin
cluster_member
db_member
user_manager | +| view_role_info | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_shard_stats | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_status_of_all_node_actions | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_status_of_cluster_action | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_status_of_node_action | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | +| view_user_info | admin
user_manager | diff --git a/content/operate/rs/references/rest-api/requests/bdbs/_index.md b/content/operate/rs/references/rest-api/requests/bdbs/_index.md index d3fb1cc95c..e90102c7c1 100644 --- a/content/operate/rs/references/rest-api/requests/bdbs/_index.md +++ b/content/operate/rs/references/rest-api/requests/bdbs/_index.md @@ -34,7 +34,7 @@ Get all databases in the cluster. | Permission name | Roles | |-----------------|---------| -| [view_all_bdbs_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_bdbs_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_all_bdbs_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_bdbs_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-all-request} @@ -124,7 +124,7 @@ Get a single database. | Permission name | Roles | |-----------------|-------| -| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request} diff --git a/content/operate/rs/references/rest-api/requests/bdbs/actions/_index.md b/content/operate/rs/references/rest-api/requests/bdbs/actions/_index.md index e85f3cbe9e..43f2d79e55 100644 --- a/content/operate/rs/references/rest-api/requests/bdbs/actions/_index.md +++ b/content/operate/rs/references/rest-api/requests/bdbs/actions/_index.md @@ -38,9 +38,25 @@ weight: $weight |--------|------|-------------| | [GET]({{< relref "./optimize_shards_placement#get-bdbs-actions-optimize-shards-placement" >}}) | `/v1/bdbs/{uid}/actions/optimize_shards_placement` | Get optimized shards placement for a database | +## Rebalance + +| Method | Path | Description | +|--------|------|-------------| +| [PUT]({{}}) | `/v1/bdbs/{uid}/actions/rebalance` | Rebalance database shards | + ## Recover | Method | Path | Description | |--------|------|-------------| | [GET]({{}}) | `/v1/bdbs/{uid}/actions/recover` | Get database recovery plan | | [POST]({{}}) | `/v1/bdbs/{uid}/actions/recover` | Recover database | + +## Resume traffic +| Method | Path | Description | +|--------|------|-------------| +| [POST]({{}}) | `/v1/bdbs/{uid}/actions/resume_traffic` | Resume database traffic | + +## Stop traffic +| Method | Path | Description | +|--------|------|-------------| +| [POST]({{}}) | `/v1/bdbs/{uid}/actions/stop_traffic` | Stop database traffic | diff --git a/content/operate/rs/references/rest-api/requests/bdbs/actions/optimize_shards_placement.md b/content/operate/rs/references/rest-api/requests/bdbs/actions/optimize_shards_placement.md index 32a3e265ea..0b1cf7c7c5 100644 --- a/content/operate/rs/references/rest-api/requests/bdbs/actions/optimize_shards_placement.md +++ b/content/operate/rs/references/rest-api/requests/bdbs/actions/optimize_shards_placement.md @@ -28,7 +28,7 @@ Get optimized shards placement for the given database. | Permission name | Roles | |-----------------|-------| -| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request} diff --git a/content/operate/rs/references/rest-api/requests/bdbs/actions/rebalance.md b/content/operate/rs/references/rest-api/requests/bdbs/actions/rebalance.md new file mode 100644 index 0000000000..e90a7ec3fb --- /dev/null +++ b/content/operate/rs/references/rest-api/requests/bdbs/actions/rebalance.md @@ -0,0 +1,135 @@ +--- +Title: Rebalance database requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: REST API requests to rebalance database shards +headerRange: '[1-2]' +linkTitle: rebalance +weight: $weight +--- + +| Method | Path | Description | +|--------|------|-------------| +| [PUT](#put-bdbs-actions-rebalance) | `/v1/bdbs/{uid}/actions/rebalance` | Rebalance database shards | + +## Rebalance database shards {#put-bdbs-actions-rebalance} + +```sh +PUT /v1/bdbs/{int: uid}/actions/rebalance +``` + +Distributes the database's shards across nodes based on the database's shard placement policy. See [Shard placement policy]({{}}) for more information about shard placement and available policies. + +#### Required permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | + +### Request {#put-request} + +#### Example HTTP request + +```sh +PUT /bdbs/1/actions/rebalance +``` + +Dry-run example: + +```sh +PUT /bdbs/1/actions/rebalance?only_failovers=true&dry_run=true +``` + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database to rebalance. | + +#### Query parameters + +| Field | Type | Description | +|-------|------|-------------| +| dry_run | boolean | If true, returns the blueprint of the rebalanced database without actually changing the database. Default is false. | +| only_failovers | boolean | If true, only runs failovers and no migrations. Default is false. | +| max_operations | integer | Optional. The number of operations to do. Only works if `only_failovers` is true. If not provided, uses the number of the database's primary-replica pairs. | + +### Response {#put-response} + +- If `dry_run` is `false`, returns an `action_uid`. You can track the action's progress with a [`GET /v1/actions/`]({{}}) request. + +- If `dry_run` is `true`, returns the balanced shards' blueprint. + + You can rearrange shards according to this blueprint if you use it in the `shards_blueprint` field of a [rearrange database shards]({{}}) request. + + You should also pass the rebalance shards' `cluster-state-id` response header as a request header of the rearrange database shards request to make sure the optimized shard placement is relevant for the current cluster state. The cluster will reject the update if its state changed since the optimal shards placement blueprint was generated. + +#### Example response + +If `dry_run` is `false`: + +```sh +{ + "action_uid": "21ad01d5-55aa-4ec6-b5c0-44dc95176486" +} +``` + +If `dry_run` is `true`: + +```sh +[ + { + "nodes": [ + { + "node_uid": "3", + "role": "master" + }, + { + "node_uid": "1", + "role": "slave" + } + ], + "slot_range": "5461-10922" + }, + { + "nodes": [ + { + "node_uid": "3", + "role": "master" + }, + { + "node_uid": "1", + "role": "slave" + } + ], + "slot_range": "10923-16383" + }, + { + "nodes": [ + { + "node_uid": "3", + "role": "master" + }, + { + "node_uid": "1", + "role": "slave" + } + ], + "slot_range": "0-5460" + } +] +``` + +#### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | When `dry_run` is false: The request is accepted and is being processed. When the database is recovered, its status will become active.
When `dry_run` is true: No error. | +| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Bad request. Invalid input parameters. | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Attempting to perform an action on a nonexistent database. | +| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | Not enough resources in the cluster to host the database. | +| [409 Conflict](https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict) | Database is currently busy with another action, recovery is already in progress, or is not in a recoverable state. | +| [500 Internal Server Error](https://www.rfc-editor.org/rfc/rfc9110.html#name-500-internal-server-error) | Internal server error. | diff --git a/content/operate/rs/references/rest-api/requests/bdbs/actions/resume_traffic.md b/content/operate/rs/references/rest-api/requests/bdbs/actions/resume_traffic.md new file mode 100644 index 0000000000..a1d42001d5 --- /dev/null +++ b/content/operate/rs/references/rest-api/requests/bdbs/actions/resume_traffic.md @@ -0,0 +1,58 @@ +--- +Title: Resume database traffic requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: REST API requests to resume traffic for a database +headerRange: '[1-2]' +linkTitle: resume_traffic +weight: $weight +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-bdbs-actions-resume-traffic) | `/v1/bdbs/{uid}/actions/resume_traffic` | Resume database traffic | + +## Resume database traffic {#post-bdbs-actions-resume-traffic} + +```sh +POST /v1/bdbs/{int: uid}/actions/resume_traffic +``` + +Resume traffic handling for the database. + +Use this action to resume read and write traffic on a database, where traffic was previously paused using the [`stop_traffic`]({{}}) action. + +#### Required permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_bdb_with_action]({{< relref "/operate/rs/references/rest-api/permissions#update_bdb_with_action" >}}) | admin
cluster_member
db_member | + +### Request {#post-request} + +#### Example HTTP request + +```sh +POST /bdbs/1/actions/resume_traffic +``` + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database. | + +### Response {#post-response} + +Returns a JSON object with an `action_uid`. You can track the action's progress with a [`GET /v1/actions/`]({{}}) request. + +#### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | The request is accepted and is being processed. The database state will be `active-change-pending` until the request has been fully processed. | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Attempting to perform an action on a nonexistent database. | +| [409 Conflict](https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict) | Attempting to change a database while it is busy with another configuration change. This is a temporary condition, and the request should be reattempted later. | diff --git a/content/operate/rs/references/rest-api/requests/bdbs/actions/stop_traffic.md b/content/operate/rs/references/rest-api/requests/bdbs/actions/stop_traffic.md new file mode 100644 index 0000000000..d06fa0fe8e --- /dev/null +++ b/content/operate/rs/references/rest-api/requests/bdbs/actions/stop_traffic.md @@ -0,0 +1,58 @@ +--- +Title: Stop database traffic requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: REST API requests to stop traffic for a database +headerRange: '[1-2]' +linkTitle: stop_traffic +weight: $weight +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-bdbs-actions-stop-traffic) | `/v1/bdbs/{uid}/actions/stop_traffic` | Stop database traffic | + +## Stop database traffic {#post-bdbs-actions-stop-traffic} + +```sh +POST /v1/bdbs/{int: uid}/actions/stop_traffic +``` + +Stop handling traffic for the database. + +Use this action to stop read and write traffic on a database. To resume traffic afterward, use the [`resume_traffic`]({{}}) action. + +#### Required permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_bdb_with_action]({{< relref "/operate/rs/references/rest-api/permissions#update_bdb_with_action" >}}) | admin
cluster_member
db_member | + +### Request {#post-request} + +#### Example HTTP request + +```sh +POST /bdbs/1/actions/stop_traffic +``` + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database. | + +### Response {#post-response} + +Returns a JSON object with an `action_uid`. You can track the action's progress with a [`GET /v1/actions/`]({{}}) request. + +#### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | The request is accepted and is being processed. The database state will be `active-change-pending` until the request has been fully processed. | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Attempting to perform an action on a nonexistent database. | +| [409 Conflict](https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict) | Attempting to change a database while it is busy with another configuration change. This is a temporary condition, and the request should be reattempted later. | diff --git a/content/operate/rs/references/rest-api/requests/bdbs/availability.md b/content/operate/rs/references/rest-api/requests/bdbs/availability.md new file mode 100644 index 0000000000..143bcfc7e1 --- /dev/null +++ b/content/operate/rs/references/rest-api/requests/bdbs/availability.md @@ -0,0 +1,142 @@ +--- +Title: Database availability requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: REST API requests to check database availability +headerRange: '[1-2]' +linkTitle: availability +weight: $weight +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-db-endpoint-availability) | `/v1/local/bdbs/{uid}/endpoint/availability` | Verifies local database endpoint availability | +| [GET](#get-db-availability) | `/v1/bdbs/{uid}/availability` | Verifies database availability | + +## Get database endpoint availability {#get-db-endpoint-availability} + +```sh +GET /v1/local/bdbs/{uid}/endpoint/availability +``` + +Verifies the local database endpoint is available. This request does not redirect to the primary node. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | + +### Request {#get-endpoint-request} + +#### Example HTTP request + +```sh +GET /local/bdbs/1/endpoint/availability +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database. | + +### Response {#get-endpoint-response} + +Returns the status code `200 OK` if the local database endpoint is available. + +If the local database endpoint is unavailable, returns an error status code and a JSON object that contains `error_code` and `description` fields. + +### Error codes {#get-endpoint-error-codes} + +When errors are reported, the server may return a JSON object with +`error_code` and `description` fields that provide additional information. +The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| no_quorum | Master healthcheck failed (no quorum in the cluster) | +| db_not_found | Database does not exist in the cluster | +| bdb_endpoint_unavailable | Local database endpoint is not available | + +### Status codes {#get-endpoint-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Database endpoint is available. | +| [503 Service Unavailable](https://www.rfc-editor.org/rfc/rfc9110.html#name-503-service-unavailable) | Database endpoint is unavailable. | + + +## Get database availability {#get-db-availability} + +```sh +GET /v1/bdbs/{uid}/availability +``` + +Gets the availability status of a database. + +- If the OSS Cluster API is enabled, verifies all endpoints for this database are available. + +- Otherwise, verifies the database has at least one available endpoint. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | + +### Request {#get-db-request} + +#### Example HTTP request + +```sh +GET /bdbs/1/availability +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the database. | + +### Response {#get-db-response} + +Returns the status code `200 OK` if the database is available. + +If the database is unavailable, returns an error status code and a JSON object that contains `error_code` and `description` fields. + +### Error codes {#get-db-error-codes} + +When errors are reported, the server may return a JSON object with +`error_code` and `description` fields that provide additional information. +The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| no_quorum | Master healthcheck failed (no quorum in the cluster) | +| db_not_found | Database does not exist in the cluster | +| bdb_unavailable | Database is not available | + +### Status codes {#get-db-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Database is available. | +| [503 Service Unavailable](https://www.rfc-editor.org/rfc/rfc9110.html#name-503-service-unavailable) | Database is unavailable or doesn't have quorum. | diff --git a/content/operate/rs/references/rest-api/requests/bdbs/peer_stats.md b/content/operate/rs/references/rest-api/requests/bdbs/peer_stats.md index 72402fd2cd..00e92f0973 100644 --- a/content/operate/rs/references/rest-api/requests/bdbs/peer_stats.md +++ b/content/operate/rs/references/rest-api/requests/bdbs/peer_stats.md @@ -28,7 +28,7 @@ Get statistics for all peer instances of a local CRDB instance. | Permission name | Roles | |-----------------|-------| -| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-all-request} @@ -120,7 +120,7 @@ Get statistics for a specific CRDB peer instance. | Permission name | Roles | |-----------------|-------| -| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request} diff --git a/content/operate/rs/references/rest-api/requests/bdbs/stats/_index.md b/content/operate/rs/references/rest-api/requests/bdbs/stats/_index.md index 603afbf14b..80b25ab042 100644 --- a/content/operate/rs/references/rest-api/requests/bdbs/stats/_index.md +++ b/content/operate/rs/references/rest-api/requests/bdbs/stats/_index.md @@ -29,7 +29,7 @@ Get statistics for all databases. | Permission name | Roles | |-----------------|-------| -| [view_all_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_all_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_all_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_all_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-all-request} @@ -170,7 +170,7 @@ Get statistics for a specific database. | Permission name | Roles | |-----------------|-------| -| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request} diff --git a/content/operate/rs/references/rest-api/requests/bdbs/stats/last.md b/content/operate/rs/references/rest-api/requests/bdbs/stats/last.md index 17ad2b3e03..6bef3c195f 100644 --- a/content/operate/rs/references/rest-api/requests/bdbs/stats/last.md +++ b/content/operate/rs/references/rest-api/requests/bdbs/stats/last.md @@ -28,7 +28,7 @@ Get the most recent statistics for all databases. | Permission name | Roles | |-----------------|-------| -| [view_all_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_all_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_all_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_all_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-all-request} @@ -146,7 +146,7 @@ Get the most recent statistics for a specific database. | Permission name | Roles | |-----------------|-------| -| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request} diff --git a/content/operate/rs/references/rest-api/requests/bdbs/sync_source_stats.md b/content/operate/rs/references/rest-api/requests/bdbs/sync_source_stats.md index dcc49c5d74..3e4fc426fe 100644 --- a/content/operate/rs/references/rest-api/requests/bdbs/sync_source_stats.md +++ b/content/operate/rs/references/rest-api/requests/bdbs/sync_source_stats.md @@ -28,7 +28,7 @@ Get stats for all syncer sources of a local database. | Permission name | Roles | |-----------------|-------| -| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-all-request} @@ -111,7 +111,7 @@ Get stats for a specific syncer (Replica Of) instance. | Permission name | Roles | |-----------------|-------| -| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_bdb_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request} diff --git a/content/operate/rs/references/rest-api/requests/bdbs/syncer_state/_index.md b/content/operate/rs/references/rest-api/requests/bdbs/syncer_state/_index.md index e999fd26d4..ad593f9954 100644 --- a/content/operate/rs/references/rest-api/requests/bdbs/syncer_state/_index.md +++ b/content/operate/rs/references/rest-api/requests/bdbs/syncer_state/_index.md @@ -32,7 +32,7 @@ This endpoint is deprecated as of Redis Enterprise Software version 7.2.4 and wi | Permission name | Roles | |-----------------|---------| -| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request} diff --git a/content/operate/rs/references/rest-api/requests/bdbs/syncer_state/crdt.md b/content/operate/rs/references/rest-api/requests/bdbs/syncer_state/crdt.md index 3299535873..f14401513d 100644 --- a/content/operate/rs/references/rest-api/requests/bdbs/syncer_state/crdt.md +++ b/content/operate/rs/references/rest-api/requests/bdbs/syncer_state/crdt.md @@ -27,7 +27,7 @@ Get a CRDB's syncer state as JSON. | Permission name | Roles | |-----------------|---------| -| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager| ### Request {#get-request} diff --git a/content/operate/rs/references/rest-api/requests/bdbs/syncer_state/replica.md b/content/operate/rs/references/rest-api/requests/bdbs/syncer_state/replica.md index 18cc8d2ddf..dd6a9388e6 100644 --- a/content/operate/rs/references/rest-api/requests/bdbs/syncer_state/replica.md +++ b/content/operate/rs/references/rest-api/requests/bdbs/syncer_state/replica.md @@ -27,7 +27,7 @@ Get a CRDB replica's syncer state as JSON. | Permission name | Roles | |-----------------|---------| -| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request} diff --git a/content/operate/rs/references/rest-api/requests/bdbs/upgrade.md b/content/operate/rs/references/rest-api/requests/bdbs/upgrade.md index f960b7e479..d257bce995 100644 --- a/content/operate/rs/references/rest-api/requests/bdbs/upgrade.md +++ b/content/operate/rs/references/rest-api/requests/bdbs/upgrade.md @@ -54,15 +54,15 @@ Upgrade a database. | Field | Type | Description | |-------|------|-------------| | force_restart | boolean | Restart shards even if no version change (default: false) | -| keep_redis_version | boolean | Keep current Redis version (default: false) | +| keep_redis_version | boolean | Keep current Redis version (default: false). Deprecated as of Redis Enterprise Software v7.8.2. To upgrade modules without upgrading the Redis database version, set `redis_version` to the current Redis database version instead. | | keep_crdt_protocol_version | boolean | Keep current crdt protocol version (default: false) | | may_discard_data | boolean | Discard data in a non-replicated, non-persistent bdb (default: false) | | force_discard | boolean | Discard data even if the bdb is replicated and/or persistent (default: false) | | preserve_roles | boolean | Preserve shards' master/replica roles (requires an extra failover) (default: false) | | parallel_shards_upgrade | integer | Max number of shards to upgrade in parallel (default: all) | -| modules | list of modules | List of dicts representing the modules that will be upgraded.

Each dict includes:

• `current_module`: uid of a module to upgrade

• `new_module`: uid of the module we want to upgrade to

• `new_module_args`: args list for the new module (no defaults for the three module-related parameters). -| redis_version | version number | Upgrades the database to the specified Redis version instead of the latest version | -| latest_with_modules | boolean | Upgrades the database to the latest Redis version and latest supported versions of modules available in the cluster | +| modules | list of modules | List of dicts representing the modules that will be upgraded. As of Redis Enterprise Software v7.8.2, `current_module` and `new_module` are deprecated.

Each dict includes:

• `current_module`: uid of a module to upgrade (deprecated)

• `new_module`: uid of the module we want to upgrade to (deprecated)

• `new_module_args`: args list for the new module (no defaults for the three module-related parameters). +| redis_version | version number | Upgrades the database to the specified Redis version instead of the latest version. To upgrade modules without upgrading the Redis database version, set `redis_version` to the current Redis database version instead. | +| latest_with_modules | boolean | Upgrades the database to the latest Redis version and latest supported versions of modules available in the cluster. (default: true as of v7.8.2) Deprecated as of Redis Enterprise Software v7.8.2. | ### Response {#post-response} diff --git a/content/operate/rs/references/rest-api/requests/cluster/certificates/_index.md b/content/operate/rs/references/rest-api/requests/cluster/certificates/_index.md index 91be16e450..fc8bd7c2bb 100644 --- a/content/operate/rs/references/rest-api/requests/cluster/certificates/_index.md +++ b/content/operate/rs/references/rest-api/requests/cluster/certificates/_index.md @@ -10,8 +10,6 @@ headerRange: '[1-2]' hideListLinks: true linkTitle: certificates weight: $weight -aliases: - - /operate/rs/references/rest-api/requests/cluster/update-cert --- | Method | Path | Description | diff --git a/content/operate/rs/references/rest-api/requests/cluster/stats/_index.md b/content/operate/rs/references/rest-api/requests/cluster/stats/_index.md index a06a6fd2a2..938449166c 100644 --- a/content/operate/rs/references/rest-api/requests/cluster/stats/_index.md +++ b/content/operate/rs/references/rest-api/requests/cluster/stats/_index.md @@ -28,7 +28,7 @@ Get cluster statistics. | Permission name | Roles | |-----------------|-------| -| [view_cluster_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_cluster_stats]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_stats" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request} diff --git a/content/operate/rs/references/rest-api/requests/cm_settings/_index.md b/content/operate/rs/references/rest-api/requests/cm_settings/_index.md new file mode 100644 index 0000000000..19fb278e98 --- /dev/null +++ b/content/operate/rs/references/rest-api/requests/cm_settings/_index.md @@ -0,0 +1,126 @@ +--- +Title: Cluster Manager settings requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: REST API requests for Cluster Manager UI settings +headerRange: '[1-2]' +hideListLinks: true +linkTitle: cm_settings +weight: $weight +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-cm-settings) | `/v1/cm_settings` | Get Cluster Manager UI settings | +| [PUT](#put-cm-settings) | `/v1/cm_settings` | Update Cluster Manager UI settings | + +## Get CM settings {#get-cm-settings} + +```sh +GET /v1/cm_settings +``` + +Get Cluster Manager UI settings. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_cluster_info]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | + +### Request {#get-request} + +#### Example HTTP request + +```sh +GET /cm_settings +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +### Response {#get-response} + +Returns a [cm_settings object]({{}}). + +#### Example JSON body + +```json +{ + "timezone": "UTC" +} +``` + +#### Status codes {#get-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error | + +## Update CM settings {#put-cm-settings} + +```sh +PUT /v1/cm_settings +``` + +Update Cluster Manager UI settings. + +### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | admin | + +### Request {#put-request} + +#### Example HTTP request + +```sh +PUT /cm_settings +``` + +#### Example JSON body + +```json +{ + "timezone": "US/Pacific" +} +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### Body + +Include a [cm_settings object]({{}}) with updated fields in the request body. + +### Response {#put-response} + +Returns a [cm_settings object]({{}}) with the updated fields. + +#### Example JSON body + +```json +{ + "timezone": "US/Pacific" +} +``` + +#### Status codes {#put-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success, time zone config has been set. | +| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Bad or missing configuration parameters. | diff --git a/content/operate/rs/references/rest-api/requests/modules/_index.md b/content/operate/rs/references/rest-api/requests/modules/_index.md index 3d714990a7..1fd703474d 100644 --- a/content/operate/rs/references/rest-api/requests/modules/_index.md +++ b/content/operate/rs/references/rest-api/requests/modules/_index.md @@ -33,7 +33,7 @@ List available modules, i.e. modules stored within the CCS. | Permission name | Roles | |-----------------|-------| -| [view_cluster_modules]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_modules" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_cluster_modules]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_modules" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#list-request} @@ -72,7 +72,7 @@ Get specific available modules, i.e. modules stored within the CCS. | Permission name | Roles | |-----------------|-------| -| [view_cluster_modules]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_modules" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_cluster_modules]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_modules" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request} diff --git a/content/operate/rs/references/rest-api/requests/modules/upgrade.md b/content/operate/rs/references/rest-api/requests/modules/upgrade.md index f289bd1bb3..6e443ba9e8 100644 --- a/content/operate/rs/references/rest-api/requests/modules/upgrade.md +++ b/content/operate/rs/references/rest-api/requests/modules/upgrade.md @@ -19,7 +19,7 @@ weight: $weight POST /v1/modules/upgrade/bdb/{string: uid} -Upgrades the module version on a specific database. +Upgrades the module version on a specific database. Deprecated as of Redis Enterprise Software v7.8.2. Use [`POST /v1/bdbs//upgrade`]({{}}) instead. #### Required permissions diff --git a/content/operate/rs/references/rest-api/requests/nodes/_index.md b/content/operate/rs/references/rest-api/requests/nodes/_index.md index ffc7086f92..13f8947415 100644 --- a/content/operate/rs/references/rest-api/requests/nodes/_index.md +++ b/content/operate/rs/references/rest-api/requests/nodes/_index.md @@ -30,7 +30,7 @@ Get all cluster nodes. | Permission name | Roles | |-----------------|-------| -| [view_all_nodes_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_nodes_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_all_nodes_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_nodes_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-all-request} @@ -114,7 +114,7 @@ Get a single cluster node. | Permission name | Roles | |-----------------|-------| -| [view_node_info]({{< relref "/operate/rs/references/rest-api/permissions#view_node_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_node_info]({{< relref "/operate/rs/references/rest-api/permissions#view_node_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request} diff --git a/content/operate/rs/references/rest-api/requests/nodes/actions.md b/content/operate/rs/references/rest-api/requests/nodes/actions.md index 461a7bd7e8..00c2f1ca43 100644 --- a/content/operate/rs/references/rest-api/requests/nodes/actions.md +++ b/content/operate/rs/references/rest-api/requests/nodes/actions.md @@ -32,7 +32,7 @@ actions on all nodes. | Permission name | Roles | |-----------------|-------| -| [view_status_of_all_node_actions]({{< relref "/operate/rs/references/rest-api/permissions#view_status_of_all_node_actions" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_status_of_all_node_actions]({{< relref "/operate/rs/references/rest-api/permissions#view_status_of_all_node_actions" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-all-request} @@ -71,7 +71,7 @@ Get the status of all actions on a specific node. | Permission name | Roles | |-----------------|-------| -| [view_status_of_node_action]({{< relref "/operate/rs/references/rest-api/permissions#view_status_of_node_action" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_status_of_node_action]({{< relref "/operate/rs/references/rest-api/permissions#view_status_of_node_action" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request-all-actions} diff --git a/content/operate/rs/references/rest-api/requests/nodes/snapshots.md b/content/operate/rs/references/rest-api/requests/nodes/snapshots.md index 4c1d1bdbab..62ecebb9d2 100644 --- a/content/operate/rs/references/rest-api/requests/nodes/snapshots.md +++ b/content/operate/rs/references/rest-api/requests/nodes/snapshots.md @@ -28,7 +28,7 @@ Get all cluster node snapshots of the specified node. | Permission name | Roles | |-----------------|-------| -| [view_node_info]({{< relref "/operate/rs/references/rest-api/permissions#view_node_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_node_info]({{< relref "/operate/rs/references/rest-api/permissions#view_node_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request} diff --git a/content/operate/rs/references/rest-api/requests/proxies/_index.md b/content/operate/rs/references/rest-api/requests/proxies/_index.md index 5d65fe1c4a..5513a44d05 100644 --- a/content/operate/rs/references/rest-api/requests/proxies/_index.md +++ b/content/operate/rs/references/rest-api/requests/proxies/_index.md @@ -31,7 +31,7 @@ Get all the proxies in the cluster. | Permission name | Roles | |-----------------|-------| -| [view_all_proxies_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_proxies_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_all_proxies_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_proxies_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-all-request} @@ -102,7 +102,7 @@ Get a single proxy's info. | Permission name | Roles | |-----------------|-------| -| [view_proxy_info]({{< relref "/operate/rs/references/rest-api/permissions#view_proxy_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_proxy_info]({{< relref "/operate/rs/references/rest-api/permissions#view_proxy_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request} @@ -177,7 +177,7 @@ However, if `allow_restart` is `false`, such changes only take effect after the | Permission name | Roles | |-----------------|-------| -| [update_proxy]({{< relref "/operate/rs/references/rest-api/permissions#update_proxy" >}}) | admin | +| [update_proxy]({{< relref "/operate/rs/references/rest-api/permissions#update_proxy" >}}) | admin
user_manager | ### Request {#put-request} @@ -246,7 +246,7 @@ However, if `allow_restart` is `false`, such changes only take effect after the | Permission name | Roles | |-----------------|-------| -| [update_proxy]({{< relref "/operate/rs/references/rest-api/permissions#update_proxy" >}}) | admin | +| [update_proxy]({{< relref "/operate/rs/references/rest-api/permissions#update_proxy" >}}) | admin
user_manager | ### Request {#put-all-request} diff --git a/content/operate/rs/references/rest-api/requests/redis_acls/_index.md b/content/operate/rs/references/rest-api/requests/redis_acls/_index.md index ec9e9f022e..48dccc189d 100644 --- a/content/operate/rs/references/rest-api/requests/redis_acls/_index.md +++ b/content/operate/rs/references/rest-api/requests/redis_acls/_index.md @@ -32,7 +32,7 @@ Get all Redis ACL objects. | Permission name | Roles | |-----------------|-------| -| [view_all_redis_acls_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_redis_acls_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_all_redis_acls_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_redis_acls_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-all-request} @@ -99,7 +99,7 @@ Get a single Redis ACL object. | Permission name | Roles | |-----------------|-------| -| [view_redis_acl_info]({{< relref "/operate/rs/references/rest-api/permissions#view_redis_acl_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_redis_acl_info]({{< relref "/operate/rs/references/rest-api/permissions#view_redis_acl_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request} @@ -158,7 +158,7 @@ Update an existing Redis ACL object. | Permission name | Roles | |-----------------|-------| -| [update_redis_acl]({{< relref "/operate/rs/references/rest-api/permissions#update_redis_acl" >}}) | admin | +| [update_redis_acl]({{< relref "/operate/rs/references/rest-api/permissions#update_redis_acl" >}}) | admin
user_manager | ### Request {#put-request} @@ -232,7 +232,7 @@ Create a new Redis ACL object. | Permission name | Roles | |-----------------|-------| -| [create_redis_acl]({{< relref "/operate/rs/references/rest-api/permissions#create_redis_acl" >}}) | admin | +| [create_redis_acl]({{< relref "/operate/rs/references/rest-api/permissions#create_redis_acl" >}}) | admin
user_manager | ### Request {#post-request} @@ -343,7 +343,7 @@ Delete a Redis ACL object. | Permission name | Roles | |-----------------|-------| -| [delete_redis_acl]({{< relref "/operate/rs/references/rest-api/permissions#delete_redis_acl" >}}) | admin | +| [delete_redis_acl]({{< relref "/operate/rs/references/rest-api/permissions#delete_redis_acl" >}}) | admin
user_manager | ### Request {#delete-request} diff --git a/content/operate/rs/references/rest-api/requests/roles/_index.md b/content/operate/rs/references/rest-api/requests/roles/_index.md index 0925e13858..165d5a8394 100644 --- a/content/operate/rs/references/rest-api/requests/roles/_index.md +++ b/content/operate/rs/references/rest-api/requests/roles/_index.md @@ -32,7 +32,7 @@ Get all roles' details. | Permission name | Roles | |-----------------|-------| -| [view_all_roles_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_roles_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_all_roles_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_roles_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-all-request} @@ -114,7 +114,7 @@ Get the details of a single role. | Permission name | Roles | |-----------------|-------| -| [view_role_info]({{< relref "/operate/rs/references/rest-api/permissions#view_role_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer | +| [view_role_info]({{< relref "/operate/rs/references/rest-api/permissions#view_role_info" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | ### Request {#get-request} @@ -174,7 +174,7 @@ Update an existing role's details. | Permission name | Roles | |-----------------|-------| -| [update_role]({{< relref "/operate/rs/references/rest-api/permissions#update_role" >}}) | admin | +| [update_role]({{< relref "/operate/rs/references/rest-api/permissions#update_role" >}}) | admin
user_manager | ### Request {#put-request} @@ -249,7 +249,7 @@ Create a new role. | Permission name | Roles | |-----------------|-------| -| [create_role]({{< relref "/operate/rs/references/rest-api/permissions#create_role" >}}) | admin | +| [create_role]({{< relref "/operate/rs/references/rest-api/permissions#create_role" >}}) | admin
user_manager | ### Request {#post-request} @@ -359,7 +359,7 @@ Delete a role object. | Permission name | Roles | |-----------------|-------| -| [delete_role]({{< relref "/operate/rs/references/rest-api/permissions#delete_role" >}}) | admin | +| [delete_role]({{< relref "/operate/rs/references/rest-api/permissions#delete_role" >}}) | admin
user_manager | ### Request {#delete-request} diff --git a/content/operate/rs/references/rest-api/requests/shards/actions/failover.md b/content/operate/rs/references/rest-api/requests/shards/actions/failover.md new file mode 100644 index 0000000000..9099c31cd2 --- /dev/null +++ b/content/operate/rs/references/rest-api/requests/shards/actions/failover.md @@ -0,0 +1,186 @@ +--- +Title: Shard failover requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: REST API requests to fail over database shards +headerRange: '[1-2]' +linkTitle: failover +weight: $weight +--- + +| Method | Path | Description | +|--------|------|-------------| +| [POST](#post-multi-shards) | `/v1/shards/actions/failover` | Fail over multiple shards | +| [POST](#post-shard) | `/v1/shards/{uid}/actions/failover` | Fail over a specific shard | + +## Fail over multiple shards {#post-multi-shards} + + POST /v1/shards/actions/failover + +Performs failover on the primary shards specified by `shard_uids` in the request body, and promotes their replicas to primary shards. This request is asynchronous. + +The cluster automatically manages failover to ensure high availability. Use this failover REST API request only for testing and planned maintenance. + +#### Required permissions + +| Permission name | Roles | +|-----------------|-------| +| [failover_shard]({{< relref "/operate/rs/references/rest-api/permissions#failover_shard" >}}) | admin
cluster_member
db_member | + +### Request {#post-multi-request} + +#### Example HTTP request + + POST /shards/actions/failover + +#### Example JSON body + +```json +{ + "shard_uids": ["2","4","6"] +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Request body {#post-multi-request-body} + +The request body is a JSON object that can contain the following fields: + +| Field | Type | Description | +|-------|------|-------------| +| shard_uids | array of strings | List of primary shard UIDs to fail over. The shards must belong to the same database. | +| dead_uids | array of strings | Primary shards to avoid stopping. Optional. | +| dead_nodes | array of strings | Nodes that should not be drained or used for promoted replica shards. Optional. | +| dry_run | boolean | Determines whether the failover is actually done. If true, will just do a dry run. If the dry run succeeds, the request returns a `200 OK` status code. Otherwise, it returns a JSON object with an error code and description. Optional. | +| force_rebind | boolean | Rebind after promotion. Optional. | +| redis_version_upgrade | string | New version of the promoted primary shards. Optional. | + +### Response {#post-multi-response} + +Returns a JSON object with an `action_uid`. You can track the action's progress with a [`GET /v1/actions/`]({{}}) request. + +#### Example JSON body + +```json +{ + "action_uid": "e5e24ddf-a456-4a7e-ad53-4463cd44880e", + "description": "Failover was triggered" +} +``` + +### Status codes {#post-multi-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error. | +| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Shard is a replica or the specified failover shards are not in the same database. | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | A list of shard UIDs is required and not given, or a specified shard does not exist. | +| [409 Conflict](https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict) | Database is currently busy. | + +### Error codes {#put-multi-error-codes} + +When errors are reported, the server may return a JSON object with `error_code` and `message` field that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| db_busy | Database is currently busy. | +| failover_shards_different_bdb | All failover shards should be in the same database. | +| shard_is_slave | Shard is a replica. | +| shard_not_exist | Shard does not exist. | +| shard_uids_required | List of shard UIDs is required and not given. | + +## Fail over shard {#post-shard} + + POST /v1/shards/{int: uid}/actions/failover + +Performs failover on the primary shard with the specified `shard_uid`, and promotes its replica shard to a primary shard. This request is asynchronous. + +The cluster automatically manages failover to ensure high availability. Use this failover REST API request only for testing and planned maintenance. + +#### Required permissions + +| Permission name | Roles | +|-----------------|-------| +| [failover_shard]({{< relref "/operate/rs/references/rest-api/permissions#failover_shard" >}}) | admin
cluster_member
db_member | + +### Request {#post-request} + +#### Example HTTP request + + POST /shards/1/actions/failover + +#### Example JSON body + +```json +{ + "force_rebind": true +} +``` + +#### Request headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | integer | The unique ID of the shard to fail over. | + + +#### Request body {#post-request-body} + +The request body is a JSON object that can contain the following fields: + +| Field | Type | Description | +|-------|------|-------------| +| dead_uid | string | Primary shard to avoid stopping. Optional. | +| dead_nodes | array of strings | Nodes that should not be drained or used for promoted replica shards. Optional. | +| dry_run | boolean | Determines whether the failover is actually done. If true, will just do a dry run. If the dry run succeeds, the request returns a `200 OK` status code. Otherwise, it returns a JSON object with an error code and description. Optional. | +| force_rebind | boolean | Rebind after promotion. Optional. | +| redis_version_upgrade | string | New version of the promoted primary shards. Optional. | + +### Response {#post-response} + +Returns a JSON object with an `action_uid`. You can track the action's progress with a [`GET /v1/actions/`]({{}}) request. + +#### Example JSON body + +```json +{ + "action_uid": "e5e24ddf-a456-4a7e-ad53-4463cd44880e", + "description": "Failover was triggered" +} +``` + +### Status codes {#post-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error. | +| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Shard is a replica. | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Specified shard does not exist. | +| [409 Conflict](https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict) | Database is currently busy. | + +### Error codes {#put-error-codes} + +When errors are reported, the server may return a JSON object with `error_code` and `message` field that provide additional information. The following are possible `error_code` values: + +| Code | Description | +|------|-------------| +| db_busy | Database is currently busy. | +| shard_is_slave | Shard is a replica. | +| shard_not_exist | Shard does not exist. | diff --git a/content/operate/rs/references/rest-api/requests/shards/stats/_index.md b/content/operate/rs/references/rest-api/requests/shards/stats/_index.md index f81b8e690e..04a8fc7186 100644 --- a/content/operate/rs/references/rest-api/requests/shards/stats/_index.md +++ b/content/operate/rs/references/rest-api/requests/shards/stats/_index.md @@ -10,7 +10,6 @@ headerRange: '[1-2]' hideListLinks: true linkTitle: stats weight: $weight -aliases: /operate/rs/references/rest-api/requests/shards-stats/ --- | Method | Path | Description | diff --git a/content/operate/rs/references/rest-api/requests/shards/stats/last.md b/content/operate/rs/references/rest-api/requests/shards/stats/last.md index 133c53d3cb..3fa9bcf29e 100644 --- a/content/operate/rs/references/rest-api/requests/shards/stats/last.md +++ b/content/operate/rs/references/rest-api/requests/shards/stats/last.md @@ -9,7 +9,6 @@ description: Most recent shard statistics requests headerRange: '[1-2]' linkTitle: last weight: $weight -aliases: /operate/rs/references/rest-api/requests/shards-stats/last/ --- | Method | Path | Description | diff --git a/content/operate/rs/references/rest-api/requests/users/_index.md b/content/operate/rs/references/rest-api/requests/users/_index.md index 8ccdfb417c..14c6a9e847 100644 --- a/content/operate/rs/references/rest-api/requests/users/_index.md +++ b/content/operate/rs/references/rest-api/requests/users/_index.md @@ -32,7 +32,7 @@ Get a list of all users. | Permission name | Roles | |-----------------|-------| -| [view_all_users_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_users_info" >}}) | admin | +| [view_all_users_info]({{< relref "/operate/rs/references/rest-api/permissions#view_all_users_info" >}}) | admin
user_manager | ### Request {#get-all-request} @@ -99,7 +99,7 @@ Get a single user's details. | Permission name | Roles | |-----------------|-------| -| [view_user_info]({{< relref "/operate/rs/references/rest-api/permissions#view_user_info" >}}) | admin | +| [view_user_info]({{< relref "/operate/rs/references/rest-api/permissions#view_user_info" >}}) | admin
user_manager | ### Request {#get-request} @@ -162,7 +162,7 @@ Update an existing user's configuration. | Permission name | Roles | |-----------------|-------| -| [update_user]({{< relref "/operate/rs/references/rest-api/permissions#update_user" >}}) | admin | +| [update_user]({{< relref "/operate/rs/references/rest-api/permissions#update_user" >}}) | admin
user_manager | Any user can change their own name, password, or alert preferences. @@ -257,7 +257,7 @@ Create a new user. | Permission name | Roles | |-----------------|-------| -| [create_new_user]({{< relref "/operate/rs/references/rest-api/permissions#create_new_user" >}}) | admin | +| [create_new_user]({{< relref "/operate/rs/references/rest-api/permissions#create_new_user" >}}) | admin
user_manager | ### Request {#post-request} @@ -405,7 +405,7 @@ Delete a user. | Permission name | Roles | |-----------------|-------| -| [delete_user]({{< relref "/operate/rs/references/rest-api/permissions#delete_user" >}}) | admin | +| [delete_user]({{< relref "/operate/rs/references/rest-api/permissions#delete_user" >}}) | admin
user_manager | ### Request {#delete-request} diff --git a/content/operate/rs/references/upgrade-paths.md b/content/operate/rs/references/upgrade-paths.md new file mode 100644 index 0000000000..1b6773f112 --- /dev/null +++ b/content/operate/rs/references/upgrade-paths.md @@ -0,0 +1,22 @@ +--- +Title: Supported upgrade paths for Redis Software +alwaysopen: false +categories: +- docs +- operate +- rs +description: Supported paths to upgrade a Redis Software cluster. +linkTitle: Upgrade paths +weight: 30 +tocEmbedHeaders: true +--- + +{{}} + +For detailed upgrade instructions, see [Upgrade a Redis Enterprise Software cluster]({{}}). + +See the [Redis Enterprise Software product lifecycle]({{}}) for more information about release numbers and the end-of-life schedule. + +{{}} +Redis Enterprise for Kubernetes has its own support lifecycle, which accounts for the Kubernetes distribution lifecycle. For details, see [Supported Kubernetes distributions]({{}}). +{{}} diff --git a/content/operate/rs/release-notes/_index.md b/content/operate/rs/release-notes/_index.md index 2da6b6d67a..f259f930cd 100644 --- a/content/operate/rs/release-notes/_index.md +++ b/content/operate/rs/release-notes/_index.md @@ -12,4 +12,4 @@ weight: 90 Here's what changed recently in Redis Enterprise Software: -{{< table-children columnNames="Version (Release date) ,Major changes,OSS Redis compatibility" columnSources="LinkTitle,Description,compatibleOSSVersion" enableLinks="LinkTitle" >}} +{{< table-children columnNames="Version (Release date) ,Major changes,Redis CE compatibility" columnSources="LinkTitle,Description,compatibleOSSVersion" enableLinks="LinkTitle" >}} diff --git a/content/operate/rs/release-notes/rs-7-8-releases/_index.md b/content/operate/rs/release-notes/rs-7-8-releases/_index.md new file mode 100644 index 0000000000..8ab06b97a4 --- /dev/null +++ b/content/operate/rs/release-notes/rs-7-8-releases/_index.md @@ -0,0 +1,248 @@ +--- +Title: Redis Software release notes 7.8.2 +alwaysopen: false +categories: +- docs +- operate +- rs +compatibleOSSVersion: Redis 7.4.0 +description: Redis Community Edition 7.4 features. Hash field expiration. Client-side caching support. Metrics stream engine preview. New APIs to check database availability, rebalance shards, fail over shards, and control database traffic. Cluster Manager UI enhancements for node actions, database tags, and database configuration. User manager role. Log rotation based on both size and time. Module management enhancements. Configurable minimum password length. Configurable license expiration alert threshold. +hideListLinks: true +linkTitle: 7.8.2 releases +toc: 'true' +weight: 69 +--- + +​[​Redis Software version 7.8.2](https://redis.com/redis-enterprise-software/download-center/software/) is now available! + +## Highlights + +This version offers: + +- Redis Community Edition 7.4 features + +- Hash field expiration + +- Client-side caching support + +- Metrics stream engine preview + +- New APIs to check database availability, rebalance shards, fail over shards, and control database traffic + +- Cluster Manager UI enhancements for node actions, database tags, and database configuration + +- User manager role + +- Log rotation based on both size and time + +- Module management enhancements + +- Configurable minimum password length + +- Configurable license expiration alert threshold + +## Detailed release notes + +For more detailed release notes, select a build version from the following table: + +{{}} + +## Version changes + +- Added validation to verify the LDAP server URI contains a host and port when updating LDAP configuration. + +- The value of the `oss_sharding` API field had no effect in previous versions of Redis Software. However, `oss_sharding` is now set to take effect as part of future plans. Until further notice, set this field to `false` to avoid unintended impacts. + +### Breaking changes + +Redis Software version 7.8.2 introduces the following breaking changes: + +- When you upgrade a database, the upgrade process also attempts to upgrade database modules by default. + + - The default value of `latest_with_modules` has changed to `true`. + + - [`rladmin upgrade db`]({{}}) will always upgrade the database's modules. + + - When you [upgrade a database]({{}}) using the REST API, you can set `"latest_with_modules": false` in the request body to prevent module upgrades. + +#### Redis database version 7.4 breaking changes {#redis-74-breaking-changes} + +When new major versions of Redis Community Edition change existing commands, upgrading your database to a new version can potentially break some functionality. Before you upgrade, read the provided list of breaking changes that affect Redis Software and update any applications that connect to your database to handle these changes. + +Confirm your Redis database version (`redis_version`) using the Cluster Manager UI or run the following [`INFO`]({{< relref "/commands/info" >}}) command with [`redis-cli`]({{< relref "/operate/rs/references/cli-utilities/redis-cli" >}}): + +```sh +$ redis-cli -p INFO +"# Server +redis_version:7.0.8 +..." +``` + +##### Security behavior changes + +- [#13108](https://github.com/redis/redis/pull/13108) Lua: LRU eviction for scripts generated with `EVAL`. + +##### Other general behavior changes + +- [#13133](https://github.com/redis/redis/pull/13133) Lua: allocate VM code with jemalloc instead of libc and count it as used memory. + +- [#12171](https://github.com/redis/redis/pull/12171) `ACL LOAD`: do not disconnect all clients. + +### Product lifecycle updates + +#### End-of-life policy extension + +The end-of-life policy for Redis Software versions 6.2 and later has been extended to 24 months after the formal release of the subsequent major version. For the updated end-of-life schedule, see the [Redis Software product lifecycle]({{}}). + +#### Supported upgrade paths + +Redis Software versions 6.2.4 and 6.2.8 do not support direct upgrades beyond version 7.4.x. Versions 6.2.10, 6.2.12, and 6.2.18 are part of the [upgrade path]({{}}). To upgrade from 6.2.4 or 6.2.8 to versions later than 7.4.x, an intermediate upgrade is required. + +The next major Redis Software release will still bundle Redis database version 6.2 and allow database upgrades from Redis database version 6.2 to 7.x. + +See the [Redis Software product lifecycle]({{}}) for more information about release numbers. + +#### End of triggers and functions preview + +The [triggers and functions]({{}}) (RedisGears) preview has been discontinued. + +- Commands such as `TFCALL`, `TFCALLASYNC`, and `TFUNCTION` will be deprecated and will return error messages. + +- Any JavaScript functions stored in Redis will be removed. + +- JavaScript-based triggers will be blocked. + +- Lua functions and scripts will not be affected. + +If your database currently uses triggers and functions, you need to: + +1. Adjust your applications to accommodate these changes. + +1. Delete all triggers and functions libraries from your existing database: + + 1. Run `TFUNCTION LIST`. + + 1. Copy all library names. + + 1. Run `TFUNCTION DELETE` for each library in the list. + + If any triggers and functions libraries remain in the database, the RDB snapshot won't load on a cluster without RedisGears. + +1. Migrate your database to a new database without the RedisGears module. + +### Deprecations + +#### API deprecations + +- Deprecated `background_op` field from BDB REST API object. Use [`GET /v1/actions/bdb/`]({{}}) instead. + +- Deprecated the following fields for [upgrade database]({{}}) REST API requests: + + - `keep_redis_version`; use `redis_version` instead + + - `current_module`; use `new_module_args` instead + + - `new_module`; use `new_module_args` instead + +- Deprecated the following `module_list` fields for [create database]({{}}) REST API requests: + + - `module_id`; use `module_name` instead + + - `semantic_version`; use module_args instead + +- `min_redis_version` is only relevant to Redis database versions earlier than 7.4 and is replaced with `compatible_redis_version` in [module REST API]({{}}) responses. + +- Deprecated the [`rladmin upgrade modules`]({{}}) command. Use [`rladmin upgrade db`]({{}}) instead. + +- Deprecated [`POST /v1/modules/upgrade/bdb/`]({{}}) REST API request. Use [`POST /v1/bdbs//upgrade`]({{}}) to upgrade modules instead. + +#### V1 Prometheus metrics deprecation + + V1 Prometheus metrics are deprecated. To transition to the new metrics stream engine, either migrate your existing dashboards using [Prometheus v1 metrics and equivalent v2 PromQL]({{}}) now, or wait to use new preconfigured dashboards when they become available in a future release. + +#### Download center modules deprecation + +New Redis modules will not be available for download from the Redis download center. + +#### Legacy UI not supported + +The legacy UI was deprecated in favor of the new Cluster Manager UI in Redis Software version 7.2.4 and is no longer supported as of Redis Software version 7.8.2. + +#### Redis 6.0 databases not supported + +Redis database version 6.0 was deprecated in Redis Software version 7.4.2 and is no longer supported as of Redis Software version 7.8.2. + +To prepare for the removal of Redis database version 6.0 before you upgrade to Redis Software version 7.8.2: + +- For Redis Software 6.2.* clusters, upgrade Redis 6.0 databases to Redis 6.2. See the [Redis 6.2 release notes](https://raw.githubusercontent.com/redis/redis/6.2/00-RELEASENOTES) for the list of changes. + +- For Redis Software 7.2.4 and 7.4.2 clusters, upgrade Redis 6.0 databases to Redis 7.2. Before you upgrade your databases, see the list of [Redis 7.2 breaking changes]({{< relref "/operate/rs/release-notes/rs-7-2-4-releases/rs-7-2-4-52#redis-72-breaking-changes" >}}) and update any applications that connect to your database to handle these changes. + +#### Ubuntu 18.04 not supported + +Ubuntu 18.04 was deprecated in Redis Software version 7.2.4 and is no longer supported as of Redis Software version 7.8.2. + +### Upcoming changes + +#### Default image change for Redis Software containers + +Starting with version 7.8, Redis Software containers with the image tag `x.y.z-build` will be based on RHEL instead of Ubuntu. + +This change will only affect you if you use containers outside the official [Redis Enterprise for Kubernetes]({{}}) product and use Ubuntu-specific commands. + +To use Ubuntu-based images after this change, you can specify the operating system suffix in the image tag. For example, use the image tag `7.4.2-216.focal` instead of `7.4.2-216`. + +### Supported platforms + +The following table provides a snapshot of supported platforms as of this Redis Software release. See the [supported platforms reference]({{< relref "/operate/rs/references/supported-platforms" >}}) for more details about operating system compatibility. + + Supported – The platform is supported for this version of Redis Software and Redis Stack modules. + +:warning: Deprecation warning – The platform is still supported for this version of Redis Software, but support will be removed in a future release. + +| Redis Software
major versions | 7.8 | 7.4 | 7.2 | 6.4 | 6.2 | +|---------------------------------|:-----:|:-----:|:-----:|:-----:|:-----:| +| **Release date** | Nov 2024 | Feb 2024 | Aug 2023 | Feb 2023 | Aug 2021 | +| [**End-of-life date**]({{< relref "/operate/rs/installing-upgrading/product-lifecycle#endoflife-schedule" >}}) | Determined after
next major release | Nov 2026 | Feb 2026 | Aug 2025 | Feb 2025 | +| **Platforms** | | | | | | +| RHEL 9 &
compatible distros[1](#table-note-1) | | | – | – | – | +| RHEL 9
FIPS mode[5](#table-note-5) | | – | – | – | – | +| RHEL 8 &
compatible distros[1](#table-note-1) | | | | | | +| RHEL 7 &
compatible distros[1](#table-note-1) | – | – | :warning: | | | +| Ubuntu 20.04[2](#table-note-2) | | | | | – | +| Ubuntu 18.04[2](#table-note-2) | – | :warning: | :warning: | | | +| Ubuntu 16.04[2](#table-note-2) | – | – | :warning: | | | +| Amazon Linux 2 | | | | | – | +| Amazon Linux 1 | – | – | | | | +| Kubernetes[3](#table-note-3) | | | | | | +| Docker[4](#table-note-4) | | | | | | + +1. The RHEL-compatible distributions CentOS, CentOS Stream, Alma, and Rocky are supported if they have full RHEL compatibility. Oracle Linux running the Red Hat Compatible Kernel (RHCK) is supported, but the Unbreakable Enterprise Kernel (UEK) is not supported. + +2. The server version of Ubuntu is recommended for production installations. The desktop version is only recommended for development deployments. + +3. See the [Redis Enterprise for Kubernetes documentation]({{< relref "/operate/kubernetes/reference/supported_k8s_distributions" >}}) for details about support per version and Kubernetes distribution. + +4. [Docker images]({{< relref "/operate/rs/installing-upgrading/quickstarts/docker-quickstart" >}}) of Redis Software are certified for development and testing only. + +5. Supported only if [FIPS was enabled during RHEL installation](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/security_hardening/switching-rhel-to-fips-mode_security-hardening#proc_installing-the-system-with-fips-mode-enabled_switching-rhel-to-fips-mode) to ensure FIPS compliance. + +## Known issues + +- RS131972: Creating an ACL that contains a line break in the Cluster Manager UI can cause shard migration to fail due to ACL errors. + +## Known limitations + +#### New Cluster Manager UI limitations + +The following legacy UI features are not yet available in the new Cluster Manager UI: + +- Purge an Active-Active instance. + + Use [`crdb-cli crdb purge-instance`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli/crdb/purge-instance" >}}) instead. + +- Search and export the log. + +#### RedisGraph prevents upgrade to RHEL 9 + +You cannot upgrade from a prior RHEL version to RHEL 9 if the Redis Software cluster contains a RedisGraph module, even if unused by any database. The [RedisGraph module has reached end-of-life](https://redis.com/blog/redisgraph-eol/) and is completely unavailable in RHEL 9. diff --git a/content/operate/rs/release-notes/rs-7-8-releases/rs-7-8-2-34.md b/content/operate/rs/release-notes/rs-7-8-releases/rs-7-8-2-34.md new file mode 100644 index 0000000000..f03267471d --- /dev/null +++ b/content/operate/rs/release-notes/rs-7-8-releases/rs-7-8-2-34.md @@ -0,0 +1,525 @@ +--- +Title: Redis Software release notes 7.8.2-34 (November 2024) +alwaysopen: false +categories: +- docs +- operate +- rs +compatibleOSSVersion: Redis 7.4.0 +description: Redis Community Edition 7.4 features. Hash field expiration. Client-side caching support. Metrics stream engine preview. New APIs to check database availability, rebalance shards, fail over shards, and control database traffic. Cluster Manager UI enhancements for node actions, database tags, and database configuration. User manager role. Log rotation based on both size and time. Module management enhancements. Configurable minimum password length. Configurable license expiration alert threshold. +linkTitle: 7.8.2-34 (November 2024) +weight: 90 +aliases: /operate/rs/release-notes/rs-7-8-releases/rs-7-8-2-tba/ +--- + +​[​Redis Software version 7.8.2](https://redis.com/redis-enterprise-software/download-center/software/) is now available! + +## Highlights + +This version offers: + +- Redis Community Edition 7.4 features + +- Hash field expiration + +- Client-side caching support + +- Metrics stream engine preview + +- New APIs to check database availability, rebalance shards, fail over shards, and control database traffic + +- Cluster Manager UI enhancements for node actions, database tags, and database configuration + +- User manager role + +- Log rotation based on both size and time + +- Module management enhancements + +- Configurable minimum password length + +- Configurable license expiration alert threshold + +## New in this release + +### New features + +- Redis Community Edition and Redis Stack 7.4 features are now available when you [create]({{}}) or [upgrade]({{}}) a database with database version 7.4, including: + + - [Hash field expiration]({{}}) + + - New vector data types to reduce ‌memory usage + + - Time series insertion filters + + - See the [Redis 7.4 release blog post](https://redis.io/blog/announcing-redis-community-edition-and-redis-stack-74/) and [Redis Community Edition 7.4 release notes]({{}}) for details. + +- Client-side caching support: + + - Client-side caching allows Redis clients to store a subset of data in a local cache and avoid sending repeated read requests to the Redis database. + + - When used to cache frequently accessed data, this technique can improve performance by decreasing network traffic, latency, and load on the database. + + - Supported for Redis databases with Redis versions 7.4 and later. + + - For more information, see the [client-side caching introduction]({{}}) and [client-side caching compatibility with Redis Software]({{}}). + +- Database availability API: + + - Verifies whether a Redis Software database is available to perform read and write operations and can respond to queries from client applications. + + - Load balancers and automated monitoring tools can use this API to monitor database availability. + + - See [Check database availability]({{}}) and the [REST API reference]({{}}) for details. + +- Metrics stream engine preview: + + - The new metrics stream engine's exporter-based infrastructure provides access to more accurate, real-time data. This enhanced, scalable monitoring system allows you to set up more effective alerts and respond to issues faster. + + - Exposes a new `/v2` Prometheus scraping endpoint that you can use to export metrics to external monitoring tools such as Grafana, DataDog, NewRelic, and Dynatrace. + + - Exports raw data instead of aggregated data to improve monitoring at scale and accuracy compared to v1 Prometheus metrics. + + - For an initial list of metrics exported by the new metrics stream engine, see [Prometheus metrics v2]({{}}). While the metrics stream engine is in preview, this document provides only a partial list. More metrics will be added. + + - V1 Prometheus metrics are deprecated. To transition to the new metrics stream engine, either migrate your existing dashboards using [Prometheus v1 metrics and equivalent v2 PromQL]({{}}) now, or wait to use new preconfigured dashboards when they become available in a future release. + +- [Rebalance shard placement REST API request]({{}}), which distributes the database's shards across nodes based on the database's shard placement policy. See [Shard placement policy]({{}}) for more information about shard placement and available policies. + +- [Shard failover REST API requests]({{}}), which perform failover on specified primary shards and promotes their replicas to primary shards. + +- REST API requests to [stop traffic]({{}}) or [resume traffic]({{}}) to a database. + +### Enhancements + +- New Cluster Manager UI enhancements: + + - Perform node actions from the **Nodes** screen to [verify nodes]({{}}), [set a node as primary or secondary]({{}}), [remove nodes]({{}}), and manage node alert settings. + + - Categorize databases with [custom tags]({{}}). When you add new tags to a database, the keys and values already used by existing tags will appear as suggestions. + + - Moved several settings on the database configuration screen: + + - The eviction setting now appears in the [**Capacity**]({{}}) section. + + - [**High availability**]({{}}) and [**Durability**]({{}}) have separate sections. + + - Improved error messages on the sign-in screen for locked out users versus incorrect or expired passwords. + + - Flush an Active-Active database. + +- A new **User Manager** role designed for user administration is available for [role-based access control]({{}}). + + - This management role allows assigned users to create, edit, and delete users using the Cluster Manager UI and REST API. + + - For more details about the privileges granted by the **User Manager** role, see [Cluster Manager UI permissions]({{}}) and [REST API permissions]({{}}). + +- When you upgrade a database, the upgrade process also attempts to upgrade database modules by default. + + - [`rladmin upgrade db`]({{}}) will always upgrade the database's modules. + + - If you [upgrade a database]({{}}) using the REST API, you can set `"latest_with_modules": false` in the request body to prevent module upgrades. + +- Added support for [log rotation]({{}}) based on both size and time. + +- [Minimum password length]({{}}), previously hardcoded as 8 characters, is now configurable in the Cluster Manager UI and the REST API. + +- The [cluster license expiration alert threshold]({{}}), which determines how far in advance you want to be notified of the license expiration, is configurable in the Cluster Manager UI and the REST API. + +- The Cluster Manager UI's time zone can be configured with an [update CM settings REST API request]({{}}). + +- Timeouts for raising connection alarms can be configured with an [update database configuration REST API request]({{}}): + + - `crdt_sync_connection_alarm_timeout_seconds`: if the syncer takes longer than the specified number of seconds to connect to an Active-Active database, raise a connection alarm. + + - `replica_sync_connection_alarm_timeout_seconds`: if the syncer takes longer than the specified number of seconds to connect to a replica, raise a connection alarm. + +- Reserved the following ports: + + | Port | Process name | Usage | + |------|--------------|-------| + | 3347 | cert_exporter | Reports cluster certificate metrics | + | 3348 | process_exporter | Reports process metrics for DMC and Redis processes | + | 3349 | cluster_wd_exporter | Reports cluster watchdog metrics | + | 3350 | db_controller | Internode communication | + | 9091 | node_exporter | Reports host node metrics related to CPU, memory, disk, and more | + | 9125 | statsd_exporter | Reports push metrics related to the DMC and syncer, and some cluster and node metrics | + +### Redis database versions + +Redis Software version 7.8.2 includes three Redis database versions: 7.4, 7.2, and 6.2. + +The [default Redis database version]({{}}) is 7.4. + +### Redis module feature sets + +Redis Software comes packaged with several modules. As of version 7.8.2, Redis Software includes three feature sets, compatible with different Redis database versions. + +The following table shows which Redis modules are compatible with each Redis database version included in this release. + +| Redis database version | Compatible Redis modules | +|------------------------|--------------------------| +| 7.4 | [RediSearch 2.10.8]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-2.10-release-notes.md" >}})
[RedisJSON 2.8.4]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redisjson/redisjson-2.8-release-notes.md" >}})
[RedisTimeSeries 1.12.3]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redistimeseries/redistimeseries-1.12-release-notes.md" >}})
[RedisBloom 2.8.2]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redisbloom/redisbloom-2.8-release-notes.md" >}}) | +| 7.2 | [RediSearch 2.8.19]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-2.8-release-notes.md" >}})
[RedisJSON 2.6.13]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redisjson/redisjson-2.6-release-notes.md" >}})
[RedisTimeSeries 1.10.15]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redistimeseries/redistimeseries-1.10-release-notes.md" >}})
[RedisBloom 2.6.15]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redisbloom/redisbloom-2.6-release-notes.md" >}}) | +| 6.2 | [RediSearch 2.6.23]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-2.6-release-notes.md" >}})
[RedisJSON 2.4.9]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redisjson/redisjson-2.4-release-notes.md" >}})
[RedisTimeSeries 1.8.15]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redistimeseries/redistimeseries-1.8-release-notes.md" >}})
[RedisBloom 2.4.12]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redisbloom/redisbloom-2.4-release-notes.md" >}})
[RedisGraph v2.10.15]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redisgraph/redisgraph-2.10-release-notes.md" >}})[1](#module-note-1) | + +1. RedisGraph end-of-life has been announced and will be removed in a future release. See the [RedisGraph end-of-life announcement](https://redis.io/blog/redisgraph-eol/) for more details. + +### Resolved issues + +- RS123645: Fixed inconsistent behavior for shard creation when you enable sharding. Now, when creating a database with sharding enabled, you must always provide a `shard_key_regex`. + +- RS130444: Fixed an issue that prevented creating or editing users without an email address in the Cluster Manager UI. + +- RS121796: The "multiple endpoint" configuration database default setting should also enable sharding when selected. + +- RS128768: Fixed an issue that prevented metric graph timestamp details from displaying in the Cluster Manager UI. + +- RS127120: Fixed an issue where `crdt_replicas` were not properly updated when flushing an Active-Active database. + +- RS127054: Fixed an issue where the install script incorrectly reported "Port 53 is occupied" instead of the correct value of the occupied port. + +- RS125934: Fixed validation that prevented updating the Active-Active database configuration if existing TLS certificates expired. + +- RS125412: Fixed an issue where deleted external IP addresses were still listed as available during node configuration when joining a cluster. + +- RS122012: Fixed an issue that sent a cutoff email message for long-running alerts. + +- RS121726: Block the `remove_shards` option for `rlutil`. You can use Replica Of to decrease the shard count instead. + +- RS121076: Added a 5-minute connection timeout when promoting a replica shard to a primary role. + +- RS118103: Removed the inaccurate shard `BACKUP_PROGRESS` column from the `rladmin status` command's output. + +- RS116990: Fixed an issue with flash-enabled databases where `FLUSHDB` could cause shard crashes in versions 7.0 and 7.2, and cause clients to stop responding in earlier versions. + +- RS114923: Fixed an issue where the legacy RDB parser could generate an `XGROUP CREATE` command with an incorrect `ENTRIESREAD` value when syncing a source RDB to a database with Redis version 7.0 or later. + +- RS114258: Fixed an issue where an Active-Active database instance could lose keys during partial syncing if the destination shard was stale. + +- RS133653: Fixed a validation issue where expired client certificates prevented updates to database configuration unrelated to TLS. + +- RS126235: Fixed an issue where database updates could time out and enter a change pending state due to outdated shard data. + +- RS125128: Improved real-time logging for installation and upgrade for better visibility. + +- RS119958: Removed the log file limit that caused the debuginfo script to fail with the error "/bin/tar: Argument list too long" in Auto Tiering clusters and improved RocksDB log file rotation. + +- RS137396: Providing an email address is no longer mandatory when creating new ACL users in the Cluster Manager UI. + +- RS134238: Improved database sorting performance in the Cluster Manager UI. + +- RS129418: Improved log rotation mechanism for Auto Tiering clusters to reduce excessive logs. + +- RS137231: Fixed an issue where database shards could become stuck during migration due to outdated node data. + +## Version changes + +- Added validation to verify the LDAP server URI contains a host and port when updating LDAP configuration. + +- The value of the `oss_sharding` API field had no effect in previous versions of Redis Software. However, `oss_sharding` is now set to take effect as part of future plans. Until further notice, set this field to `false` to avoid unintended impacts. + +### Breaking changes + +Redis Software version 7.8.2 introduces the following breaking changes: + +- When you upgrade a database, the upgrade process also attempts to upgrade database modules by default. + + - The default value of `latest_with_modules` has changed to `true`. + + - [`rladmin upgrade db`]({{}}) will always upgrade the database's modules. + + - When you [upgrade a database]({{}}) using the REST API, you can set `"latest_with_modules": false` in the request body to prevent module upgrades. + +### Redis database version 7.4 breaking changes {#redis-74-breaking-changes} + +When new major versions of Redis Community Edition change existing commands, upgrading your database to a new version can potentially break some functionality. Before you upgrade, read the provided list of breaking changes that affect Redis Software and update any applications that connect to your database to handle these changes. + +Confirm your Redis database version (`redis_version`) using the Cluster Manager UI or run the following [`INFO`]({{< relref "/commands/info" >}}) command with [`redis-cli`]({{< relref "/operate/rs/references/cli-utilities/redis-cli" >}}): + +```sh +$ redis-cli -p INFO +"# Server +redis_version:7.0.8 +..." +``` + +#### Security behavior changes + +- [#13108](https://github.com/redis/redis/pull/13108) Lua: LRU eviction for scripts generated with `EVAL`. + +#### Other general behavior changes + +- [#13133](https://github.com/redis/redis/pull/13133) Lua: allocate VM code with jemalloc instead of libc and count it as used memory. + +- [#12171](https://github.com/redis/redis/pull/12171) `ACL LOAD`: do not disconnect all clients. + +### Product lifecycle updates + +#### End-of-life policy extension + +The end-of-life policy for Redis Software versions 6.2 and later has been extended to 24 months after the formal release of the subsequent major version. For the updated end-of-life schedule, see the [Redis Software product lifecycle]({{}}). + +#### Supported upgrade paths + +Redis Software versions 6.2.4 and 6.2.8 do not support direct upgrades beyond version 7.4.x. Versions 6.2.10, 6.2.12, and 6.2.18 are part of the [upgrade path]({{}}). To upgrade from 6.2.4 or 6.2.8 to versions later than 7.4.x, an intermediate upgrade is required. + +The next major Redis Software release will still bundle Redis database version 6.2 and allow database upgrades from Redis database version 6.2 to 7.x. + +See the [Redis Software product lifecycle]({{}}) for more information about release numbers. + +#### End of triggers and functions preview + +The [triggers and functions]({{}}) (RedisGears) preview has been discontinued. + +- Commands such as `TFCALL`, `TFCALLASYNC`, and `TFUNCTION` will be deprecated and will return error messages. + +- Any JavaScript functions stored in Redis will be removed. + +- JavaScript-based triggers will be blocked. + +- Lua functions and scripts will not be affected. + +If your database currently uses triggers and functions, you need to: + +1. Adjust your applications to accommodate these changes. + +1. Delete all triggers and functions libraries from your existing database: + + 1. Run `TFUNCTION LIST`. + + 1. Copy all library names. + + 1. Run `TFUNCTION DELETE` for each library in the list. + + If any triggers and functions libraries remain in the database, the RDB snapshot won't load on a cluster without RedisGears. + +1. Migrate your database to a new database without the RedisGears module. + +### Deprecations + +#### API deprecations + +- Deprecated `background_op` field from BDB REST API object. Use [`GET /v1/actions/bdb/`]({{}}) instead. + +- Deprecated the following fields for [upgrade database]({{}}) REST API requests: + + - `keep_redis_version`; use `redis_version` instead + + - `current_module`; use `new_module_args` instead + + - `new_module`; use `new_module_args` instead + +- Deprecated the following `module_list` fields for [create database]({{}}) REST API requests: + + - `module_id`; use `module_name` instead + + - `semantic_version`; use module_args instead + +- `min_redis_version` is only relevant to Redis database versions earlier than 7.4 and is replaced with `compatible_redis_version` in [module REST API]({{}}) responses. + +- Deprecated the [`rladmin upgrade modules`]({{}}) command. Use [`rladmin upgrade db`]({{}}) instead. + +- Deprecated [`POST /v1/modules/upgrade/bdb/`]({{}}) REST API request. Use [`POST /v1/bdbs//upgrade`]({{}}) to upgrade modules instead. + +#### V1 Prometheus metrics deprecation + + V1 Prometheus metrics are deprecated. To transition to the new metrics stream engine, either migrate your existing dashboards using [Prometheus v1 metrics and equivalent v2 PromQL]({{}}) now, or wait to use new preconfigured dashboards when they become available in a future release. + +#### Download center modules deprecation + +New Redis modules will not be available for download from the Redis download center. + +#### Legacy UI not supported + +The legacy UI was deprecated in favor of the new Cluster Manager UI in Redis Software version 7.2.4 and is no longer supported as of Redis Software version 7.8.2. + +#### Redis 6.0 databases not supported + +Redis database version 6.0 was deprecated in Redis Software version 7.4.2 and is no longer supported as of Redis Software version 7.8.2. + +To prepare for the removal of Redis database version 6.0 before you upgrade to Redis Software version 7.8.2: + +- For Redis Software 6.2.* clusters, upgrade Redis 6.0 databases to Redis 6.2. See the [Redis 6.2 release notes](https://raw.githubusercontent.com/redis/redis/6.2/00-RELEASENOTES) for the list of changes. + +- For Redis Software 7.2.4 and 7.4.2 clusters, upgrade Redis 6.0 databases to Redis 7.2. Before you upgrade your databases, see the list of [Redis 7.2 breaking changes]({{< relref "/operate/rs/release-notes/rs-7-2-4-releases/rs-7-2-4-52#redis-72-breaking-changes" >}}) and update any applications that connect to your database to handle these changes. + +#### Ubuntu 18.04 not supported + +Ubuntu 18.04 was deprecated in Redis Software version 7.2.4 and is no longer supported as of Redis Software version 7.8.2. + +### Upcoming changes + +#### Default image change for Redis Software containers + +Starting with version 7.8, Redis Software containers with the image tag `x.y.z-build` will be based on RHEL instead of Ubuntu. + +This change will only affect you if you use containers outside the official [Redis Enterprise for Kubernetes]({{}}) product and use Ubuntu-specific commands. + +To use Ubuntu-based images after this change, you can specify the operating system suffix in the image tag. For example, use the image tag `7.4.2-216.focal` instead of `7.4.2-216`. + +### Supported platforms + +The following table provides a snapshot of supported platforms as of this Redis Software release. See the [supported platforms reference]({{< relref "/operate/rs/references/supported-platforms" >}}) for more details about operating system compatibility. + + Supported – The platform is supported for this version of Redis Software and Redis Stack modules. + +:warning: Deprecation warning – The platform is still supported for this version of Redis Software, but support will be removed in a future release. + +| Redis Software
major versions | 7.8 | 7.4 | 7.2 | 6.4 | 6.2 | +|---------------------------------|:-----:|:-----:|:-----:|:-----:|:-----:| +| **Release date** | Nov 2024 | Feb 2024 | Aug 2023 | Feb 2023 | Aug 2021 | +| [**End-of-life date**]({{< relref "/operate/rs/installing-upgrading/product-lifecycle#endoflife-schedule" >}}) | Determined after
next major release | Nov 2026 | Feb 2026 | Aug 2025 | Feb 2025 | +| **Platforms** | | | | | | +| RHEL 9 &
compatible distros[1](#table-note-1) | | | – | – | – | +| RHEL 9
FIPS mode[5](#table-note-5) | | – | – | – | – | +| RHEL 8 &
compatible distros[1](#table-note-1) | | | | | | +| RHEL 7 &
compatible distros[1](#table-note-1) | – | – | :warning: | | | +| Ubuntu 20.04[2](#table-note-2) | | | | | – | +| Ubuntu 18.04[2](#table-note-2) | – | :warning: | :warning: | | | +| Ubuntu 16.04[2](#table-note-2) | – | – | :warning: | | | +| Amazon Linux 2 | | | | | – | +| Amazon Linux 1 | – | – | | | | +| Kubernetes[3](#table-note-3) | | | | | | +| Docker[4](#table-note-4) | | | | | | + +1. The RHEL-compatible distributions CentOS, CentOS Stream, Alma, and Rocky are supported if they have full RHEL compatibility. Oracle Linux running the Red Hat Compatible Kernel (RHCK) is supported, but the Unbreakable Enterprise Kernel (UEK) is not supported. + +2. The server version of Ubuntu is recommended for production installations. The desktop version is only recommended for development deployments. + +3. See the [Redis Enterprise for Kubernetes documentation]({{< relref "/operate/kubernetes/reference/supported_k8s_distributions" >}}) for details about support per version and Kubernetes distribution. + +4. [Docker images]({{< relref "/operate/rs/installing-upgrading/quickstarts/docker-quickstart" >}}) of Redis Software are certified for development and testing only. + +5. Supported only if [FIPS was enabled during RHEL installation](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/security_hardening/switching-rhel-to-fips-mode_security-hardening#proc_installing-the-system-with-fips-mode-enabled_switching-rhel-to-fips-mode) to ensure FIPS compliance. + +## Downloads + +The following table shows the SHA256 checksums for the available packages: + +| Package | SHA256 checksum (7.8.2-34 Nov release) | +|---------|---------------------------------------| +| Ubuntu 20 | 17500356d8338e4f8fd8a37e7b39a190d05ca66d35ae6c4aa3aa8cbc7bb99864 | +| Red Hat Enterprise Linux (RHEL) 8 | caa2ccd24749ae1fb904841df50a8b69b69c74441458649ca49b9b617e286191 | +| Red Hat Enterprise Linux (RHEL) 9 | 31f9d07beb7dfd9239083ecad99ecbfe3cdfcf96673881ebed08171d8194bff3 | +| Amazon Linux 2 | a737ca86d800caf9ca266d5771fbcffd3f973a7fb8e63e7b819681322ff6ed67 | + +## Known issues + +- RS131972: Creating an ACL that contains a line break in the Cluster Manager UI can cause shard migration to fail due to ACL errors. + +## Known limitations + +#### New Cluster Manager UI limitations + +The following legacy UI features are not yet available in the new Cluster Manager UI: + +- Purge an Active-Active instance. + + Use [`crdb-cli crdb purge-instance`]({{< relref "/operate/rs/references/cli-utilities/crdb-cli/crdb/purge-instance" >}}) instead. + +- Search and export the log. + +#### RedisGraph prevents upgrade to RHEL 9 + +You cannot upgrade from a prior RHEL version to RHEL 9 if the Redis Software cluster contains a RedisGraph module, even if unused by any database. The [RedisGraph module has reached End-of-Life](https://redis.com/blog/redisgraph-eol/) and is completely unavailable in RHEL 9. + +## Security + +#### Open source Redis security fixes compatibility + +As part of Redis's commitment to security, Redis Software implements the latest [security fixes](https://github.com/redis/redis/releases) available with [open source Redis](https://github.com/redis/redis). Redis Software has already included the fixes for the relevant CVEs. + +Some CVEs announced for open source Redis do not affect Redis Software due to different or additional functionality available in Redis Software that is not available in open source Redis. + +Redis Software 7.8.2-34 supports open source Redis 7.4, 7.2, and 6.2. Below is the list of open source Redis CVEs fixed by version. + +Redis 7.2.x: + +- (CVE-2024-31449) An authenticated user may use a specially crafted Lua script to trigger a stack buffer overflow in the bit library, which may potentially lead to remote code execution. + +- (CVE-2024-31228) An authenticated user can trigger a denial-of-service by using specially crafted, long string match patterns on supported commands such as `KEYS`, `SCAN`, `PSUBSCRIBE`, `FUNCTION LIST`, `COMMAND LIST`, and ACL definitions. Matching of extremely long patterns may result in unbounded recursion, leading to stack overflow and process crashes. + +- (CVE-2023-41056) In some cases, Redis may incorrectly handle resizing of memory buffers, which can result in incorrect accounting of buffer sizes and lead to heap overflow and potential remote code execution. + +- (CVE-2023-41053) Redis does not correctly identify keys accessed by `SORT_RO` and, as a result, may grant users executing this command access to keys that are not explicitly authorized by the ACL configuration. (Redis 7.2.1) + +Redis 7.0.x: + +- (CVE-2024-31449) An authenticated user may use a specially crafted Lua script to trigger a stack buffer overflow in the bit library, which may potentially lead to remote code execution. + +- (CVE-2024-31228) An authenticated user can trigger a denial-of-service by using specially crafted, long string match patterns on supported commands such as `KEYS`, `SCAN`, `PSUBSCRIBE`, `FUNCTION LIST`, `COMMAND LIST`, and ACL definitions. Matching of extremely long patterns may result in unbounded recursion, leading to stack overflow and process crashes. + +- (CVE-2023-41056) In some cases, Redis may incorrectly handle resizing of memory buffers, which can result in incorrect accounting of buffer sizes and lead to heap overflow and potential remote code execution. + +- (CVE-2023-41053) Redis does not correctly identify keys accessed by `SORT_RO` and, as a result, may grant users executing this command access to keys that are not explicitly authorized by the ACL configuration. (Redis 7.0.13) + +- (CVE-2023-36824) Extracting key names from a command and a list of arguments may, in some cases, trigger a heap overflow and result in reading random heap memory, heap corruption, and potentially remote code execution. Specifically: using `COMMAND GETKEYS*` and validation of key names in ACL rules. (Redis 7.0.12) + +- (CVE-2023-28856) Authenticated users can use the `HINCRBYFLOAT` command to create an invalid hash field that will crash Redis on access. (Redis 7.0.11) + +- (CVE-2023-28425) Specially crafted `MSETNX` commands can lead to assertion and denial-of-service. (Redis 7.0.10) + +- (CVE-2023-25155) Specially crafted `SRANDMEMBER`, `ZRANDMEMBER`, and `HRANDFIELD` commands can trigger an integer overflow, resulting in a runtime assertion and termination of the Redis server process. (Redis 7.0.9) + +- (CVE-2023-22458) Integer overflow in the Redis `HRANDFIELD` and `ZRANDMEMBER` commands can lead to denial-of-service. (Redis 7.0.8) + +- (CVE-2022-36021) String matching commands (like `SCAN` or `KEYS`) with a specially crafted pattern to trigger a denial-of-service attack on Redis can cause it to hang and consume 100% CPU time. (Redis 7.0.9) + +- (CVE-2022-35977) Integer overflow in the Redis `SETRANGE` and `SORT`/`SORT_RO` commands can drive Redis to OOM panic. (Redis 7.0.8) + +- (CVE-2022-35951) Executing an `XAUTOCLAIM` command on a stream key in a specific state, with a specially crafted `COUNT` argument, may cause an integer overflow, a subsequent heap overflow, and potentially lead to remote code execution. The problem affects Redis versions 7.0.0 or newer. (Redis 7.0.5) + +- (CVE-2022-31144) A specially crafted `XAUTOCLAIM` command on a stream key in a specific state may result in heap overflow and potentially remote code execution. The problem affects Redis versions 7.0.0 or newer. (Redis 7.0.4) + +- (CVE-2022-24834) A specially crafted Lua script executing in Redis can trigger a heap overflow in the cjson and cmsgpack libraries, and result in heap corruption and potentially remote code execution. The problem exists in all versions of Redis with Lua scripting support, starting from 2.6, and affects only authenticated and authorized users. (Redis 7.0.12) + +- (CVE-2022-24736) An attacker attempting to load a specially crafted Lua script can cause NULL pointer dereference which will result in a crash of the `redis-server` process. This issue affects all versions of Redis. (Redis 7.0.0) + +- (CVE-2022-24735) By exploiting weaknesses in the Lua script execution environment, an attacker with access to Redis can inject Lua code that will execute with the (potentially higher) privileges of another Redis user. (Redis 7.0.0) + +Redis 6.2.x: + +- (CVE-2024-31449) An authenticated user may use a specially crafted Lua script to trigger a stack buffer overflow in the bit library, which may potentially lead to remote code execution. + +- (CVE-2024-31228) An authenticated user can trigger a denial-of-service by using specially crafted, long string match patterns on supported commands such as `KEYS`, `SCAN`, `PSUBSCRIBE`, `FUNCTION LIST`, `COMMAND LIST`, and ACL definitions. Matching of extremely long patterns may result in unbounded recursion, leading to stack overflow and process crashes. + +- (CVE-2023-28856) Authenticated users can use the `HINCRBYFLOAT` command to create an invalid hash field that will crash Redis on access. (Redis 6.2.12) + +- (CVE-2023-25155) Specially crafted `SRANDMEMBER`, `ZRANDMEMBER`, and `HRANDFIELD` commands can trigger an integer overflow, resulting in a runtime assertion and termination of the Redis server process. (Redis 6.2.11) + +- (CVE-2023-22458) Integer overflow in the Redis `HRANDFIELD` and `ZRANDMEMBER` commands can lead to denial-of-service. (Redis 6.2.9) + +- (CVE-2022-36021) String matching commands (like `SCAN` or `KEYS`) with a specially crafted pattern to trigger a denial-of-service attack on Redis can cause it to hang and consume 100% CPU time. (Redis 6.2.11) + +- (CVE-2022-35977) Integer overflow in the Redis `SETRANGE` and `SORT`/`SORT_RO` commands can drive Redis to OOM panic. (Redis 6.2.9) + +- (CVE-2022-24834) A specially crafted Lua script executing in Redis can trigger a heap overflow in the cjson and cmsgpack libraries, and result in heap corruption and potentially remote code execution. The problem exists in all versions of Redis with Lua scripting support, starting from 2.6, and affects only authenticated and authorized users. (Redis 6.2.13) + +- (CVE-2022-24736) An attacker attempting to load a specially crafted Lua script can cause NULL pointer dereference which will result in a crash of the `redis-server` process. This issue affects all versions of Redis. (Redis 6.2.7) + +- (CVE-2022-24735) By exploiting weaknesses in the Lua script execution environment, an attacker with access to Redis can inject Lua code that will execute with the (potentially higher) privileges of another Redis user. (Redis 6.2.7) + +- (CVE-2021-41099) Integer to heap buffer overflow handling certain string commands and network payloads, when `proto-max-bulk-len` is manually configured to a non-default, very large value. (Redis 6.2.6) + +- (CVE-2021-32762) Integer to heap buffer overflow issue in `redis-cli` and `redis-sentinel` parsing large multi-bulk replies on some older and less common platforms. (Redis 6.2.6) + +- (CVE-2021-32761) An integer overflow bug in Redis version 2.2 or newer can be exploited using the `BITFIELD` command to corrupt the heap and potentially result with remote code execution. (Redis 6.2.5) + +- (CVE-2021-32687) Integer to heap buffer overflow with intsets, when `set-max-intset-entries` is manually configured to a non-default, very large value. (Redis 6.2.6) + +- (CVE-2021-32675) Denial Of Service when processing RESP request payloads with a large number of elements on many connections. (Redis 6.2.6) + +- (CVE-2021-32672) Random heap reading issue with Lua Debugger. (Redis 6.2.6) + +- (CVE-2021-32628) Integer to heap buffer overflow handling ziplist-encoded data types, when configuring a large, non-default value for `hash-max-ziplist-entries`, `hash-max-ziplist-value`, `zset-max-ziplist-entries` or `zset-max-ziplist-value`. (Redis 6.2.6) + +- (CVE-2021-32627) Integer to heap buffer overflow issue with streams, when configuring a non-default, large value for `proto-max-bulk-len` and `client-query-buffer-limit`. (Redis 6.2.6) + +- (CVE-2021-32626) Specially crafted Lua scripts may result with Heap buffer overflow. (Redis 6.2.6) + +- (CVE-2021-32625) An integer overflow bug in Redis version 6.0 or newer can be exploited using the STRALGO LCS command to corrupt the heap and potentially result with remote code execution. This is a result of an incomplete fix by CVE-2021-29477. (Redis 6.2.4) + +- (CVE-2021-29478) An integer overflow bug in Redis 6.2 could be exploited to corrupt the heap and potentially result with remote code execution. The vulnerability involves changing the default set-max-intset-entries configuration value, creating a large set key that consists of integer values and using the COPY command to duplicate it. The integer overflow bug exists in all versions of Redis starting with 2.6, where it could result with a corrupted RDB or DUMP payload, but not exploited through COPY (which did not exist before 6.2). (Redis 6.2.3) + +- (CVE-2021-29477) An integer overflow bug in Redis version 6.0 or newer could be exploited using the STRALGO LCS command to corrupt the heap and potentially result in remote code execution. The integer overflow bug exists in all versions of Redis starting with 6.0. (Redis 6.2.3) diff --git a/content/operate/rs/security/_index.md b/content/operate/rs/security/_index.md index 8138edcad4..9e128f82be 100644 --- a/content/operate/rs/security/_index.md +++ b/content/operate/rs/security/_index.md @@ -8,8 +8,6 @@ categories: description: null hideListLinks: true weight: 60 -aliases: - - /operate/rs/administering/designing-production/security --- Redis Enterprise Software provides various features to secure your Redis Enterprise Software deployment: @@ -28,4 +26,4 @@ See [Recommended security practices]({{❌ No | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | -| Edit database configuration | ❌ No | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | -| Reset slow log | ❌ No | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | -| View cluster configuration | ❌ No | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | -| View cluster logs | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes
| -| View cluster metrics | ❌ No | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | -| View database configuration | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | -| View database metrics | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | -| View node configuration | ❌ No | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | -| View node metrics | ❌ No | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | -| View Redis database password | ❌ No | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | -| View slow log | ❌ No | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | -| View and edit cluster settings |❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes | +| Action | DB Viewer | DB Member | Cluster Viewer | Cluster Member | Admin | User Manager | +|--------|:---------:|:---------:|:--------------:|:-----------:|:------:|:------:| +| Create, edit, delete users and LDAP mappings | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes | ✅ Yes | +| Create support package | ❌ No | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | ❌ No | +| Edit database configuration | ❌ No | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | ❌ No | +| Reset slow log | ❌ No | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | ❌ No | +| View cluster configuration | ❌ No | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | +| View cluster logs | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes
| ✅ Yes
| +| View cluster metrics | ❌ No | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | +| View database configuration | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | +| View database metrics | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | +| View node configuration | ❌ No | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | +| View node metrics | ❌ No | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | +| View Redis database password | ❌ No | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes | +| View slow log | ❌ No | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | ❌ No | +| View and edit cluster settings | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes | ❌ No | ## Create roles for cluster access {#create-cluster-role} diff --git a/content/operate/rs/security/access-control/create-db-roles.md b/content/operate/rs/security/access-control/create-db-roles.md index a025156140..e3152c12e0 100644 --- a/content/operate/rs/security/access-control/create-db-roles.md +++ b/content/operate/rs/security/access-control/create-db-roles.md @@ -8,8 +8,6 @@ categories: description: Create roles with database access only. linkTitle: Create roles with database access only weight: 15 -aliases: - - /operate/rs/security/access-control/database-access/ --- Roles with database access grant the ability to access and interact with a database's data. Database access privileges are determined by defining [Redis ACLs]({{}}) and adding them to roles. diff --git a/content/operate/rs/security/access-control/create-users.md b/content/operate/rs/security/access-control/create-users.md index 67daa117cc..d18c66d157 100644 --- a/content/operate/rs/security/access-control/create-users.md +++ b/content/operate/rs/security/access-control/create-users.md @@ -8,9 +8,6 @@ categories: description: Create users and assign access control roles. linkTitle: Create users weight: 10 -aliases: - - /operate/rs/security/access-control/manage-users/add-users/ - - /operate/rs/security/access-control/rbac/assign-user-role/ --- ## Prerequisites diff --git a/content/operate/rs/security/access-control/ldap/migrate-to-role-based-ldap.md b/content/operate/rs/security/access-control/ldap/migrate-to-role-based-ldap.md index a708491ddc..797e3ea149 100644 --- a/content/operate/rs/security/access-control/ldap/migrate-to-role-based-ldap.md +++ b/content/operate/rs/security/access-control/ldap/migrate-to-role-based-ldap.md @@ -62,7 +62,7 @@ To test your LDAP integration, you can: - Sign in to the Cluster Manager UI using LDAP credentials authorized for admin access. -- Use [Redis Insight]({{< relref "/develop/connect/insight/" >}}) to access a database using authorized LDAP credentials. +- Use [Redis Insight]({{< relref "/develop/tools/insight" >}}) to access a database using authorized LDAP credentials. - Use the [REST API]({{< relref "/operate/rs/references/rest-api" >}}) to connect using authorized LDAP credentials. diff --git a/content/operate/rs/security/access-control/manage-passwords/password-complexity-rules.md b/content/operate/rs/security/access-control/manage-passwords/password-complexity-rules.md index 1859817040..1fa73c1467 100644 --- a/content/operate/rs/security/access-control/manage-passwords/password-complexity-rules.md +++ b/content/operate/rs/security/access-control/manage-passwords/password-complexity-rules.md @@ -1,11 +1,11 @@ --- -Title: Enable password complexity rules +Title: Configure password complexity rules alwaysopen: false categories: - docs - operate - rs -description: Enable password complexity rules. +description: Enable password complexity rules and configure minimum password length. linkTitle: Password complexity rules toc: 'true' weight: 30 @@ -28,32 +28,59 @@ In addition, the password: Password complexity rules apply when a new user account is created and when the password is changed. Password complexity rules are not applied to accounts authenticated by an external identity provider. -You can use the Cluster Manager UI or the REST API to enable password complexity rules. +## Enable password complexity rules -## Enable using the Cluster Manager UI +To enable password complexity rules, use one of the following methods: -To enable password complexity rules using the Cluster Manager UI: +- Cluster Manager UI: -1. Go to **Cluster > Security > Preferences**, then select **Edit**. + 1. Go to **Cluster > Security > Preferences**, then select **Edit**. + + 1. In the **Password** section, enable **Complexity rules**. + + 1. Select **Save**. + +- [Update cluster]({{}}) REST API request: + + ```sh + PUT https://[host][:port]/v1/cluster + { "password_complexity": true } + ``` + +## Change minimum password length -1. In the **Password** section, turn on **Complexity rules**. +When password complexity rules are enabled, passwords must have at least 8 characters by default. -1. Select **Save**. +If you change the minimum password length, the new minimum is enforced for new users and when existing users change their passwords. -## Enable using the REST API +To change the minimum password length, use one of the following methods: -To use the REST API to enable password complexity rules: +- Cluster Manager UI: -``` REST -PUT https://[host][:port]/v1/cluster -{"password_complexity":true} -``` + 1. Go to **Cluster > Security > Preferences**. + + 1. Click **Edit**. + + 1. In the **Password** section, enable **Complexity rules**. + + 1. Set the number of characters for **Minimum password length**. + + {{The minimum password length setting appears in the password section of the cluster security preferences screen when complexity rules are enabled.}} + + 1. Click **Save**. + +- [Update cluster]({{}}) REST API request: + + ```sh + PUT https://[host][:port]/v1/cluster + { "password_min_length": } + ``` ## Deactivate password complexity rules -To deactivate password complexity rules: +To deactivate password complexity rules, use one of the following methods: -- Use the Cluster Manager UI: +- Cluster Manager UI: 1. Go to **Cluster > Security > Preferences**, then select **Edit**. @@ -61,4 +88,9 @@ To deactivate password complexity rules: 1. Select **Save**. -- Use the `cluster` REST API endpoint to set `password_complexity` to `false` +- [Update cluster]({{}}) REST API request: + + ```sh + PUT https://[host][:port]/v1/cluster + { "password_complexity": false } + ``` diff --git a/content/operate/rs/security/access-control/redis-acl-overview.md b/content/operate/rs/security/access-control/redis-acl-overview.md index ce3f373e8e..8ce99d2d8d 100644 --- a/content/operate/rs/security/access-control/redis-acl-overview.md +++ b/content/operate/rs/security/access-control/redis-acl-overview.md @@ -8,8 +8,6 @@ categories: description: An overview of Redis ACLs, syntax, and ACL command support in Redis Enterprise Software. linkTitle: Redis ACL overview weight: 17 -aliases: - - /operate/rs/security/access-control/rbac/configure-acl/ --- Redis access control lists (Redis ACLs) allow you to define named permissions for specific Redis commands, keys, and pub/sub channels. You can use defined Redis ACLs for multiple databases and roles. diff --git a/content/operate/rs/security/encryption/tls/enable-tls.md b/content/operate/rs/security/encryption/tls/enable-tls.md index 102c8e4b5e..4c9a10dffc 100644 --- a/content/operate/rs/security/encryption/tls/enable-tls.md +++ b/content/operate/rs/security/encryption/tls/enable-tls.md @@ -36,11 +36,11 @@ To enable mutual TLS for client connections: 1. Select **Mutual TLS (Client authentication)**. - {{Mutual TLS authentication configuration.}} + {{Mutual TLS authentication configuration.}} 1. For each client certificate, select **+ Add certificate**, paste or upload the client certificate, then select **Done**. - If your database uses Replica Of or Active-Active replication, you also need to add the syncer certificates for the participating clusters. See [Enable TLS for Replica Of cluster connections](#enable-tls-for-replica-of-cluster-connections) or [Enable TLS for Active-Active cluster connections](#enable-tls-for-active-active-cluster-connections) for instructions. + If your database uses Replica Of, you also need to add the syncer certificates for the participating clusters. See [Enable TLS for Replica Of cluster connections](#enable-tls-for-replica-of-cluster-connections) for instructions. 1. You can configure **Additional certificate validations** to further limit connections to clients with valid certificates. @@ -73,59 +73,27 @@ To enable mutual TLS for client connections: 1. Select **Save**. - {{< note >}} By default, Redis Enterprise Software validates client certificate expiration dates. You can use `rladmin` to turn off this behavior. ```sh rladmin tune db < db:id | name > mtls_allow_outdated_certs enabled ``` - - {{< /note >}} ## Enable TLS for Active-Active cluster connections -To enable TLS for Active-Active cluster connections: - -1. If you are using the new Cluster Manager UI, switch to the legacy admin console. - - {{Select switch to legacy admin console from the dropdown.}} - -1. [Retrieve syncer certificates.](#retrieve-syncer-certificates) - -1. [Configure TLS certificates for Active-Active.](#configure-tls-certificates-for-active-active) - -1. [Configure TLS on all participating clusters.](#configure-tls-on-all-participating-clusters) - -{{< note >}} You cannot enable or turn off TLS after the Active-Active database is created, but you can change the TLS configuration. -{{< /note >}} - -### Retrieve syncer certificates -For each participating cluster, copy the syncer certificate from the **general** settings tab. - -{{< image filename="/images/rs/general-settings-syncer-cert.png" alt="general-settings-syncer-cert" >}} +To enable TLS for Active-Active cluster connections: -### Configure TLS certificates for Active-Active +1. During [database creation]({{}}), expand the **TLS** configuration section. -1. During database creation (see [Create an Active-Active Geo-Replicated Database]({{< relref "/operate/rs/databases/active-active/create.md" >}}), select **Edit** from the **configuration** tab. -1. Enable **TLS**. - - **Enforce client authentication** is selected by default. If you clear this option, you will still enforce encryption, but TLS client authentication will be deactivated. -1. Select **Require TLS for CRDB communication only** from the dropdown menu. - {{< image filename="/images/rs/crdb-tls-all.png" alt="crdb-tls-all" >}} -1. Select **Add** {{< image filename="/images/rs/icon_add.png#no-click" alt="Add" >}} -1. Paste a syncer certificate into the text box. - {{< image filename="/images/rs/database-tls-replica-certs.png" alt="Database TLS Configuration" >}} -1. Save the syncer certificate. {{< image filename="/images/rs/icon_save.png#no-click" alt="Save" >}} -1. Repeat this process, adding the syncer certificate for each participating cluster. -1. Optional: If also you want to require TLS for client connections, select **Require TLS for All Communications** from the dropdown and add client certificates as well. -1. Select **Update** at the bottom of the screen to save your configuration. +1. Select **On** to enable TLS. -### Configure TLS on all participating clusters + {{TLS is enabled on the Cluster Manager UI screen.}} -Repeat this process on all participating clusters. +1. Click **Create**. -To enforce TLS authentication, Active-Active databases require syncer certificates for each cluster connection. If every participating cluster doesn't have a syncer certificate for every other participating cluster, synchronization will fail. +If you also want to require TLS for client connections, you must edit the Active-Active database configuration after creation. See [Enable TLS for client connections](#client) for instructions. ## Enable TLS for Replica Of cluster connections diff --git a/content/operate/rs/security/recommended-security-practices.md b/content/operate/rs/security/recommended-security-practices.md index 3ea0f0d665..7a40badeac 100644 --- a/content/operate/rs/security/recommended-security-practices.md +++ b/content/operate/rs/security/recommended-security-practices.md @@ -9,8 +9,6 @@ description: null linkTitle: Recommended security practices hideListLinks: true weight: 5 -aliases: - - /operate/rs/security/admin-console-security/ --- ## Deployment security diff --git a/insert_url_frontmatter.bash b/insert_url_frontmatter.bash deleted file mode 100755 index cbbd7c5791..0000000000 --- a/insert_url_frontmatter.bash +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -dir="$1" -pages="$(find $dir -name "*.md")" - -for page in $pages; do - if [[ "$page" =~ \/_index.md$ ]]; then - url=$(sed "s/_index.md$/'/; s/^content/'/"<<< $page) - else - url=$(sed "s/.md$/\/'/; s/^content/'/"<<< $page) - fi - # skip if url property is already present - if ! grep -q "$url" $page; then - awk -v url="$url" '$1 == "---" {delim++; if (delim==2){printf "%s\n", "url: "url}} {print}' $page > tmp.md - mv tmp.md $page - fi -done \ No newline at end of file diff --git a/layouts/partials/docs-nav.html b/layouts/partials/docs-nav.html index f21c919ad3..b9138f17f7 100644 --- a/layouts/partials/docs-nav.html +++ b/layouts/partials/docs-nav.html @@ -37,6 +37,7 @@ diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index af94157f71..a82336776b 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -3,8 +3,8 @@