Skip to content

Commit 831fe39

Browse files
committed
ttl-readme-added
1 parent a24e7d7 commit 831fe39

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,17 @@ export POD_NAME=$(kubectl get pods --namespace kubviz -l "app.kubernetes.io/name
214214
kubectl --namespace kubviz port-forward $POD_NAME 3000
215215
```
216216

217-
3. Access "localhost:3000" in your web browser, where you'll be prompted to enter your credentials. Utilize the username "admin" and the password obtained from step 1 to proceed.
217+
3. Access "localhost:3000" in your web browser, where you'll be prompted to enter your credentials. Utilize the username "admin" and the password obtained from step 1 to proceed.
218+
219+
#### TTL - Time-To-Live Feature
220+
221+
We've implemented a Time-To-Live (TTL) feature to streamline the management of data within your ClickHouse tables. With TTL, historical data can be automatically relocated to alternative storage or purged to optimize storage space. This feature is particularly valuable for scenarios like time-series data or logs where older data gradually loses its relevance over time.
222+
223+
#### Configuring TTL
224+
225+
The TTL value is customizable, empowering you to define the specific duration after which data is marked as 'expired'.
226+
227+
To guide you through the process of setting up a TTL, [please follow these steps](docs/CONFIGURATION_TTL.md)
218228

219229
## Use Cases
220230

docs/CONFIGURATION_TTL.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Configuring TTL: Guidelines and Instructions
2+
3+
- **TTL_INTERVAL**: This parameter sets the numeric value for the TTL duration. For instance, if you wish for data to expire after a duration of 2 time units, set this value to 2. The default value is 1.
4+
5+
- **TTL_UNIT**: This parameter specifies the time unit for the TTL duration. It accepts valid values such as SECOND, MINUTE, HOUR, DAY, MONTH, and more. For example, to set a TTL of 2 hours, you would set TTL_INTERVAL to 2 and TTL_UNIT to HOUR. The default unit is MONTH.
6+
7+
# Usage
8+
9+
## Setting Environment Variables
10+
11+
To configure TTL for your application, set the desired environment variables. Here's an example of how to do this:
12+
13+
```bash
14+
export TTL_INTERVAL=5
15+
export TTL_UNIT=MINUTE
16+
```
17+

0 commit comments

Comments
 (0)