From 7c3b601b998879ab7343ee0e49c40906518776fb Mon Sep 17 00:00:00 2001 From: Rachel Elledge Date: Fri, 11 Oct 2024 15:22:03 -0500 Subject: [PATCH 1/5] DOC-4307 Create DB availability placeholder article --- .../durability-ha/db-availability.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 content/operate/rs/databases/durability-ha/db-availability.md 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..7d11e9791d --- /dev/null +++ b/content/operate/rs/databases/durability-ha/db-availability.md @@ -0,0 +1,40 @@ +--- +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. + +## Availability by database status + +| 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 | + +## Availability by shard status + +| Shard status | Availability | +|--------------|--------------| +| busy | Available | +| down | :x: Not available | +| importing | Available | +| loading | Available | +| ok | Available | +| timeout | ? | +| trimming | Available | +| unknown | ? | From 057a2e95cb13f23fd2cadcdd18989bd59c7baf75 Mon Sep 17 00:00:00 2001 From: Rachel Elledge Date: Fri, 11 Oct 2024 15:58:57 -0500 Subject: [PATCH 2/5] DOC-4307 Add DB availability API examples --- .../durability-ha/db-availability.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/content/operate/rs/databases/durability-ha/db-availability.md b/content/operate/rs/databases/durability-ha/db-availability.md index 7d11e9791d..667d5af97e 100644 --- a/content/operate/rs/databases/durability-ha/db-availability.md +++ b/content/operate/rs/databases/durability-ha/db-availability.md @@ -14,6 +14,32 @@ 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. +## Check database availability + +To check the availability status of a database: + +```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 + +To check the availability of a local database endpoint: + +```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 | Database status | Availability | From 98d898cfaf3bfe7ab9a7ccd34de45dcb5271a04c Mon Sep 17 00:00:00 2001 From: Rachel Elledge Date: Mon, 28 Oct 2024 17:17:36 -0500 Subject: [PATCH 3/5] DOC-4307 Feedback update to add use cases for load balancers vs. monitoring --- .../operate/rs/databases/durability-ha/db-availability.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/operate/rs/databases/durability-ha/db-availability.md b/content/operate/rs/databases/durability-ha/db-availability.md index 667d5af97e..f0d162c611 100644 --- a/content/operate/rs/databases/durability-ha/db-availability.md +++ b/content/operate/rs/databases/durability-ha/db-availability.md @@ -14,9 +14,9 @@ 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. -## Check database availability +## Check database availability for monitoring -To check the availability status of a database: +To monitor database availability, use the following REST API request: ```sh GET /v1/bdbs//availability @@ -28,9 +28,9 @@ 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 +## Check local database endpoint availability for load balancers -To check the availability of a local database endpoint: +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 From ab8e1cbe8882b2a9e4e245764f41e698b0ed9c99 Mon Sep 17 00:00:00 2001 From: Rachel Elledge Date: Tue, 29 Oct 2024 15:51:48 -0500 Subject: [PATCH 4/5] DOC-4307 Feedback updates to add note about data availability & DB status link --- .../operate/rs/databases/durability-ha/db-availability.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/operate/rs/databases/durability-ha/db-availability.md b/content/operate/rs/databases/durability-ha/db-availability.md index f0d162c611..598337d1a1 100644 --- a/content/operate/rs/databases/durability-ha/db-availability.md +++ b/content/operate/rs/databases/durability-ha/db-availability.md @@ -14,6 +14,10 @@ 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: @@ -42,6 +46,8 @@ If the local database endpoint is unavailable, returns an error status code and ## 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 | From 7753a7062bf9c9317173c8124056730c6059e6cd Mon Sep 17 00:00:00 2001 From: Rachel Elledge Date: Fri, 1 Nov 2024 16:05:08 -0500 Subject: [PATCH 5/5] DOC-4307 Feedback update to remove shard status table --- .../rs/databases/durability-ha/db-availability.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/content/operate/rs/databases/durability-ha/db-availability.md b/content/operate/rs/databases/durability-ha/db-availability.md index 598337d1a1..870179667b 100644 --- a/content/operate/rs/databases/durability-ha/db-availability.md +++ b/content/operate/rs/databases/durability-ha/db-availability.md @@ -57,16 +57,3 @@ The following table shows the relationship between a database's status and avail | import-pending | Available | | pending | Available | | recovery | :x: Not available | - -## Availability by shard status - -| Shard status | Availability | -|--------------|--------------| -| busy | Available | -| down | :x: Not available | -| importing | Available | -| loading | Available | -| ok | Available | -| timeout | ? | -| trimming | Available | -| unknown | ? |