Skip to content

Commit

Permalink
[2.9.0] Document the SQLite-backed caching experimental feature (#1337)
Browse files Browse the repository at this point in the history
* Document the SQLite-backed caching experimental feature

Signed-off-by: Silvio Moioli <[email protected]>

* fix vale warnings

Signed-off-by: Silvio Moioli <[email protected]>

* Apply suggestions from code review

Co-authored-by: Marty Hernandez Avedon <[email protected]>

* specify hotkey by OS

Signed-off-by: Silvio Moioli <[email protected]>

* whitespace fix

Signed-off-by: Silvio Moioli <[email protected]>

* port fixes to 2.9 version

Signed-off-by: Silvio Moioli <[email protected]>

* Apply suggestions from code review

Co-authored-by: Richard Cox <[email protected]>

* Update docs/how-to-guides/advanced-user-guides/enable-experimental-features/sqlite-caching.md

Co-authored-by: Richard Cox <[email protected]>

* use clearer title, fix vale warning

Signed-off-by: Silvio Moioli <[email protected]>

* Apply suggestions from code review

Co-authored-by: Marty Hernandez Avedon <[email protected]>

* Apply suggestions from code review

Signed-off-by: Silvio Moioli <[email protected]>

* add flag to installation guide

Signed-off-by: Silvio Moioli <[email protected]>

---------

Signed-off-by: Silvio Moioli <[email protected]>
Co-authored-by: Marty Hernandez Avedon <[email protected]>
Co-authored-by: Richard Cox <[email protected]>
  • Loading branch information
3 people authored Jul 31, 2024
1 parent 65611d5 commit 89a5646
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ The following is a list of feature flags available in Rancher. If you've upgrade
- `rke2`: Enables provisioning RKE2 clusters. This flag is enabled by default.
- `token-hashing`: Enables token hashing. Once enabled, existing tokens will be hashed and all new tokens will be hashed automatically with the SHA256 algorithm. Once a token is hashed it can't be undone. This flag can't be disabled after its enabled. See [API Tokens](../../../api/api-tokens.md#token-hashing) for more information.
- `unsupported-storage-drivers`: Enables types for storage providers and provisioners that aren't enabled by default. See [Allow Unsupported Storage Drivers](../../../how-to-guides/advanced-user-guides/enable-experimental-features/unsupported-storage-drivers.md) for more information.
- `ui-sql-cache`: Enables a SQLite-based cache for UI tables. See [UI Server-Side Pagination](../../../how-to-guides/advanced-user-guides/enable-experimental-features/ui-server-side-pagination.md) for more information.


The following table shows the availability and default values for some feature flags in Rancher. Features marked "GA" are generally available:

Expand All @@ -42,3 +44,4 @@ The following table shows the availability and default values for some feature f
| `rke1-custom-node-cleanup`| `true` | GA | v2.6.0 |
| `rke2` | `true` | Experimental | v2.6.0 |
| `token-hashing` | `false` for new installs, `true` for upgrades | GA | v2.6.0 |
| `ui-sql-cache` | `false` | Highly experimental | v2.9.0 |
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: UI Server-Side Pagination
---

<head>
<link rel="canonical" href="https://ranchermanager.docs.rancher.com/how-to-guides/advanced-user-guides/enable-experimental-features/ui-server-side-pagination"/>
</head>

:::caution
UI server-side pagination is not intended for use in production at this time. This feature is considered highly experimental. SUSE customers should consult SUSE Support before activating this feature.
:::


UI server-side pagination caching provides an optional SQLite-backed cache of Kubernetes objects to improve performance. This unlocks sorting, filtering and pagination features used by the UI to restrict the amount of resources it fetches and stores in browser memory. These features are primarily used to improve list performance for resources with high counts.

This feature creates file system based caches in the `rancher` pods of the upstream cluster, and in the `cattle-cluster-agent` pods of the downstream clusters. In most environments, disk usage and I/O should not be significant. However, you should monitor activity after you enable caching.

SQLite-backed caching persists copies of any cached Kubernetes objects to disk. See [Encrypting SQLite-backed Caching](#encrypting-sqlite-backed-caches) if this is a security concern.

## Enabling UI Server-Side Pagination

1. In the upper left corner, click **☰ > Global Settings > Feature Flags**.
1. Find **`ui-sql-cache`** and select **⋮ > Activate > Activate**.
1. Wait for Rancher to restart. This also restarts agents on all downstream clusters.
1. In the upper left corner, click **☰ > Global Settings > Performance**.
1. Go to **Server-side Pagination** and check the **Enable Server-side Pagination** option.
1. Click **Apply**.
1. Reload the page with the browser button (or the equivalent keyboard combination, typically `CTRL + R` on Windows and Linux, and `⌘ + R` on macOS).


## Encrypting SQLite-backed Caches

UI server-side pagination persists copies of any cached Kubernetes objects to disk. If you're concerned about the safety of this data, you can encrypt all objects before they are persisted to disk, by setting the environment variable `CATTLE_ENCRYPT_CACHE_ALL` to `true` in `rancher` pods in the upstream cluster and `cattle-cluster-agent` pods in the downstream clusters.

Secrets and security Tokens are always encrypted regardless of the above setting.

## Known Limitations of UI Server-Side Pagination

This initial release improves the performance of Pods, Secrets, Nodes and ConfigMaps in the Cluster Explorer pages, and most resources in the Explorer's **More Resources** section.

Pages can't be automatically refreshed. You can manually refresh table contents by clicking the **Refresh** button.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ The following is a list of feature flags available in Rancher. If you've upgrade
- `rke2`: Enables provisioning RKE2 clusters. This flag is enabled by default.
- `token-hashing`: Enables token hashing. Once enabled, existing tokens will be hashed and all new tokens will be hashed automatically with the SHA256 algorithm. Once a token is hashed it can't be undone. This flag can't be disabled after its enabled. See [API Tokens](../../../api/api-tokens.md#token-hashing) for more information.
- `unsupported-storage-drivers`: Enables types for storage providers and provisioners that aren't enabled by default. See [Allow Unsupported Storage Drivers](../../../how-to-guides/advanced-user-guides/enable-experimental-features/unsupported-storage-drivers.md) for more information.
- `ui-sql-cache`: Enables a SQLite-based cache for UI tables. See [UI Server-Side Pagination](../../../how-to-guides/advanced-user-guides/enable-experimental-features/ui-server-side-pagination.md) for more information.


The following table shows the availability and default values for some feature flags in Rancher. Features marked "GA" are generally available:

Expand All @@ -41,3 +43,4 @@ The following table shows the availability and default values for some feature f
| `rke1-custom-node-cleanup`| `true` | GA | v2.6.0 |
| `rke2` | `true` | Experimental | v2.6.0 |
| `token-hashing` | `false` for new installs, `true` for upgrades | GA | v2.6.0 |
| `ui-sql-cache` | `false` | Highly experimental | v2.9.0 |
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: UI Server-Side Pagination
---

<head>
<link rel="canonical" href="https://ranchermanager.docs.rancher.com/how-to-guides/advanced-user-guides/enable-experimental-features/ui-server-side-pagination"/>
</head>

:::caution
UI server-side pagination is not intended for use in production at this time. This feature is considered highly experimental. SUSE customers should consult SUSE Support before activating this feature.
:::


UI server-side pagination caching provides an optional SQLite-backed cache of Kubernetes objects to improve performance. This unlocks sorting, filtering and pagination features used by the UI to restrict the amount of resources it fetches and stores in browser memory. These features are primarily used to improve list performance for resources with high counts.

This feature creates file system based caches in the `rancher` pods of the upstream cluster, and in the `cattle-cluster-agent` pods of the downstream clusters. In most environments, disk usage and I/O should not be significant. However, you should monitor activity after you enable caching.

SQLite-backed caching persists copies of any cached Kubernetes objects to disk. See [Encrypting SQLite-backed Caching](#encrypting-sqlite-backed-caches) if this is a security concern.

## Enabling UI Server-Side Pagination

1. In the upper left corner, click **☰ > Global Settings > Feature Flags**.
1. Find **`ui-sql-cache`** and select **⋮ > Activate > Activate**.
1. Wait for Rancher to restart. This also restarts agents on all downstream clusters.
1. In the upper left corner, click **☰ > Global Settings > Performance**.
1. Go to **Server-side Pagination** and check the **Enable Server-side Pagination** option.
1. Click **Apply**.
1. Reload the page with the browser button (or the equivalent keyboard combination, typically `CTRL + R` on Windows and Linux, and `⌘ + R` on macOS).


## Encrypting SQLite-backed Caches

UI server-side pagination persists copies of any cached Kubernetes objects to disk. If you're concerned about the safety of this data, you can encrypt all objects before they are persisted to disk, by setting the environment variable `CATTLE_ENCRYPT_CACHE_ALL` to `true` in `rancher` pods in the upstream cluster and `cattle-cluster-agent` pods in the downstream clusters.

Secrets and security Tokens are always encrypted regardless of the above setting.

## Known Limitations of UI Server-Side Pagination

This initial release improves the performance of Pods, Secrets, Nodes and ConfigMaps in the Cluster Explorer pages, and most resources in the Explorer's **More Resources** section.

Pages can't be automatically refreshed. You can manually refresh table contents by clicking the **Refresh** button.

0 comments on commit 89a5646

Please sign in to comment.