Skip to content

Commit

Permalink
RS-289: add information about hard bucket quota (#94)
Browse files Browse the repository at this point in the history
* add information about hard bucket quota

* fix build
  • Loading branch information
atimin authored Sep 12, 2024
1 parent 792d7e6 commit 4c2faee
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
if: matrix.example == 'rust'
with:
toolchain: 1.75
toolchain: 1.80.1

- name: Install Python dependencies
if: matrix.example == 'python'
Expand Down
14 changes: 7 additions & 7 deletions docs/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ Below you will find the available settings for each resource type.

You can provision buckets by setting environment variables. The following table lists the available settings:

| Name | Default | Description |
| ---------------------------------- | ------- | ------------------------------------------------------------------- |
| `RS_BUCKET_<ID>_NAME` | | Provisioned bucket name (required) |
| `RS_BUCKET_<ID>_QUOTA_TYPE` | NONE | It can be NONE or FIFO. If it is FIFO, the bucket removes old data. |
| `RS_BUCKET_<ID>_QUOTA_SIZE` | 0 | Size of quota to start removing old data e.g. 1 KB, 10.4 MB etc. |
| `RS_BUCKET_<ID>_MAX_BLOCK_SIZE` | 64Mb | Maximal block size for batched records |
| `RS_BUCKET_<ID>_MAX_BLOCK_RECORDS` | 1024 | Maximal number of batched records in a block |
| Name | Default | Description |
| ---------------------------------- | ------- | ---------------------------------------------------------------- |
| `RS_BUCKET_<ID>_NAME` | | Provisioned bucket name (required) |
| `RS_BUCKET_<ID>_QUOTA_TYPE` | NONE | It can be NONE, FIFO or HARD. |
| `RS_BUCKET_<ID>_QUOTA_SIZE` | 0 | Size of quota to start removing old data e.g. 1 KB, 10.4 MB etc. |
| `RS_BUCKET_<ID>_MAX_BLOCK_SIZE` | 64Mb | Maximal block size for batched records |
| `RS_BUCKET_<ID>_MAX_BLOCK_RECORDS` | 1024 | Maximal number of batched records in a block |

For more information about the bucket settings, see the **[Buckets Guide](/docs/guides/buckets.mdx#bucket-settings)**.

Expand Down
4 changes: 3 additions & 1 deletion docs/guides/buckets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ Each bucket has settings that determine how data is stored and accessed. These s

### Quota Type

The quota type determines the method of quota enforcement and can be set to either NONE or FIFO.
The quota type determines the method of quota enforcement and can be set to either NONE, FIFO or HARD.

NONE implies no quota, allowing data to be stored without any restrictions.

FIFO, short for first-in-first-out, enforces the quota by deleting the oldest block to accommodate new data once the quota is reached. ReductStore ensures that the data does not surpass the quota size, refusing to store new data if there's insufficient room.

HARD is a strict quota type that prevents data from being stored once the quota is reached. This setting is useful when you want to limit the amount of data stored in a bucket but don't want to delete old data.

### Quota Size

The quota size defines the maximum size of the bucket in bytes. It's ignored if the quota type is set to NONE.
Expand Down
3 changes: 2 additions & 1 deletion docs/how-does-it-work.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ A container for entries which provides the following storage settings:

- **Maximum block size.** The storage engine creates a new block after the size of the current block reaches this limit. A block might be bigger than this size because the storage engine can write a belated record.
- **Maximum number of records.** When the current block has more records than this limit, the storage engine creates a new block.
- **Quota type.** The storage supports two quota types:
- **Quota type.** The storage supports the following quota types:
- No quota. The bucket will grow to consume as much free disk space as is available - relative to how much data is written.
- FIFO. The bucket removes the oldest block of some entry when it reaches the quota limit.
- Hard. The bucket stops writing data when it reaches the quota limit.
- **Quota size.**

A user can manage bucket with [**Bucket API**](./http-api/bucket-api).
Expand Down

0 comments on commit 4c2faee

Please sign in to comment.