|
| 1 | +--- |
| 2 | +title: Introducing Stash v2025.6.30 |
| 3 | +date: "2025-06-30" |
| 4 | +weight: 10 |
| 5 | +authors: |
| 6 | +- Md Anisur Rahman |
| 7 | +tags: |
| 8 | +- backup |
| 9 | +- cli |
| 10 | +- disaster-recovery |
| 11 | +- kubernetes |
| 12 | +- pendingtask |
| 13 | +- restore |
| 14 | +- stash |
| 15 | +- taskqueue |
| 16 | +--- |
| 17 | + |
| 18 | +We are pleased to announce the release of [Stash v2025.6.30](https://stash.run/docs/v2025.6.30/setup/), packed with major improvement. You can check out the full changelog [HERE](https://github.com/stashed/CHANGELOG/blob/master/releases/v2025.6.30/README.md). In this post, we'll highlight the changes done in this release. |
| 19 | + |
| 20 | +### New Feature: `TaskQueue` |
| 21 | + |
| 22 | +We're excited to introduce a new feature in this release. This feature can be enabled during the installation or upgrade of `Stash`. |
| 23 | + |
| 24 | +`TaskQueue` acts as a centralized controller that manages the execution of `BackupSessions` based on a defined **Maximum Concurrency Limit**. It queues incoming `BackupSessions` and ensures they are processed one at a time (or concurrently, up to the configured limit), maintaining their original order of arrival. |
| 25 | + |
| 26 | +#### Why is `TaskQueue` important? |
| 27 | + |
| 28 | +In environments where multiple `BackupConfigurations` share the same schedule, all corresponding `BackupSessions` may be triggered simultaneously. Without `TaskQueue`, this can overwhelm the system, leading to resource contention and backup failures. |
| 29 | + |
| 30 | +By enforcing a controlled execution flow, `TaskQueue` ensures: |
| 31 | + |
| 32 | +* Ensures the number of active `BackupSessions` never exceeds the defined concurrency limit. |
| 33 | +* It maintains a `Queue` and processes `BackupSessions` in order, one after another or up to the allowed concurrency. |
| 34 | +* Prevents simultaneous backup job creation, resources are used efficiently, reducing resource spikes. |
| 35 | +* Cluster System resources are used efficiently, based on the concurrency limit. |
| 36 | +* Optimizes resource usage across the cluster by distributing backup execution over time. |
| 37 | +* Backups have a higher chance of completing successfully without overloading the cluster. |
| 38 | +* Increases the reliability of backups by minimizing the risk of failure due to resource exhaustion. |
| 39 | + |
| 40 | +#### How to Enable `TaskQueue`? |
| 41 | + |
| 42 | +To enable `TaskQueue`, you can use the `--enable-task-queue` flag during the installation or upgrade of Stash. Here is an example: |
| 43 | + |
| 44 | +```bash |
| 45 | +$ helm install stash oci://ghcr.io/appscode-charts/stash \ |
| 46 | + --version v2025.6.30 \ |
| 47 | + --namespace stash --create-namespace \ |
| 48 | + --set features.enterprise=true \ |
| 49 | + --set global.taskQueue.enabled=true \ |
| 50 | + --set global.taskQueue.maxConcurrentSessions=<max_concurrent_sessions> \ |
| 51 | + --set-file global.license=/path/to/the/license.txt \ |
| 52 | + --wait --burst-limit=10000 --debug |
| 53 | +``` |
| 54 | + |
| 55 | +Here, |
| 56 | +- `global.taskQueue.enabled` is set to `true` to enable the `TaskQueue` feature. |
| 57 | +- `global.taskQueue.maxConcurrentSessions` is set to define the maximum number of concurrent `BackupSessions` that can be executed at a time. |
| 58 | + |
| 59 | +> Note: The `TaskQueue` feature is available **only in the Enterprise Edition** of Stash. To use this feature, make sure you install the Enterprise Edition. |
| 60 | +> Installation instructions can be found [here](https://stash.run/docs/latest/setup/). |
| 61 | +
|
| 62 | +#### How Stash utilize `TaskQueue`? |
| 63 | + |
| 64 | +When this feature enabled, `Stash` uses a separate controller called `TaskQueueController`, |
| 65 | + |
| 66 | +**It works as follows:** |
| 67 | + |
| 68 | +1. Instead of triggering `BackupSessions` directly, the `Stash` operator creates a resource called `PendingTask` for each `BackupSession`. |
| 69 | +2. Each PendingTask contains the actual `BackupSession` and is monitored by the `TaskQueueController`. |
| 70 | +3. The `TaskQueueController` processes these `PendingTask` resources based on the defined maximum concurrency limit. |
| 71 | + |
| 72 | +**Example of `TaskQueue` YAML** |
| 73 | + |
| 74 | +```yaml |
| 75 | +apiVersion: batch.k8s.appscode.com/v1alpha1 |
| 76 | +kind: TaskQueue |
| 77 | +metadata: |
| 78 | + name: appscode-stash-task-queue |
| 79 | +spec: |
| 80 | + maxConcurrentTasks: 10 |
| 81 | + tasks: |
| 82 | + - rules: |
| 83 | + failed: has(self.status.phase) && self.status.phase == 'Failed' |
| 84 | + inProgress: has(self.status.phase) && self.status.phase == 'Running' |
| 85 | + success: has(self.status.phase) && self.status.phase == 'Succeeded' |
| 86 | + type: |
| 87 | + group: stash.appscode.com |
| 88 | + kind: BackupSession |
| 89 | +``` |
| 90 | +
|
| 91 | +Here, |
| 92 | +- `maxConcurrentTasks` is set to `10`, meaning a maximum of 10 `BackupSessions` can be executed concurrently. |
| 93 | +- If you need to reconfigure the `TaskQueue` after enabling it, you can modify the `maxConcurrentTasks` value according to your cluster's capacity. |
| 94 | + |
| 95 | + |
| 96 | +**Example of `PendingTask` YAML** |
| 97 | + |
| 98 | +```yaml |
| 99 | +apiVersion: batch.k8s.appscode.com/v1alpha1 |
| 100 | +kind: PendingTask |
| 101 | +metadata: |
| 102 | + name: backupconfiguration-demo-s3-pvc-backup |
| 103 | +spec: |
| 104 | + resource: |
| 105 | + metadata: |
| 106 | + name: s3-pvc-backup-2-1751630401 |
| 107 | + namespace: demo |
| 108 | + ownerReferences: |
| 109 | + - apiVersion: stash.appscode.com/v1beta1 |
| 110 | + blockOwnerDeletion: true |
| 111 | + controller: true |
| 112 | + kind: BackupConfiguration |
| 113 | + name: s3-pvc-backup-2 |
| 114 | + uid: c00376b7-1baf-4b7a-98df-c55f848e936c |
| 115 | + spec: |
| 116 | + invoker: |
| 117 | + apiGroup: stash.appscode.com |
| 118 | + kind: BackupConfiguration |
| 119 | + name: s3-pvc-backup |
| 120 | + status: {} |
| 121 | + taskType: |
| 122 | + group: stash.appscode.com |
| 123 | + kind: BackupSession |
| 124 | +status: |
| 125 | + taskQueueName: appscode-stash-task-queue |
| 126 | +``` |
| 127 | + |
| 128 | +## What Next? |
| 129 | +Please try the latest release and give us your valuable feedback. |
| 130 | + |
| 131 | +- If you want to install Stash in a clean cluster, please follow the installation instruction from [HERE](https://stash.run/docs/latest/setup/). |
| 132 | +- If you want to upgrade Stash from a previous version, please follow the upgrade instruction from [HERE](https://stash.run/docs/latest/setup/upgrade/). |
| 133 | + |
| 134 | +### Support |
| 135 | + |
| 136 | +To speak with us, please leave a message on [our website](https://appscode.com/contact/). |
| 137 | + |
| 138 | +To receive product announcements, follow us on [Twitter/X](https://twitter.com/KubeStash). |
| 139 | + |
| 140 | +If you have found a bug with Stash or want to request new features, please [file an issue](https://github.com/stashed/project/issues/new). |
0 commit comments