-
Notifications
You must be signed in to change notification settings - Fork 724
feat(lifecycle): Integrate cold tiering support #1050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hey @tennisleng , Thank you for your contribution. Could you please provide a detailed design plan? |
📋 Detailed Design Plan: Cold Tiering IntegrationThank you for the review! Here's the detailed design plan for this PR. OverviewThis PR implements cold tiering support for RustFS, enabling automatic migration of infrequently accessed objects to cheaper storage tiers based on configurable policies. This addresses issue #1022. ArchitectureKey Components1. Configuration (
|
| Setting | Env Variable | Default | Description |
|---|---|---|---|
enabled |
COLD_TIER_ENABLED |
false |
Enable/disable cold tiering |
threshold_days |
COLD_TIER_THRESHOLD_DAYS |
30 |
Days since last access before object is "cold" |
target_tier |
COLD_TIER_TARGET |
GLACIER |
Target storage class |
min_size_bytes |
COLD_TIER_MIN_SIZE |
1MB |
Skip small objects |
sample_rate |
COLD_TIER_SAMPLE_RATE |
1.0 |
Fraction of objects to evaluate |
concurrency |
COLD_TIER_CONCURRENCY |
4 |
Parallel migration workers |
2. Access Time Tracking
ObjectInfo.last_access_time: New field tracking when object was last accessedFileInfo.last_access_time: Persisted in file metadata- Fallback: If
last_access_timeisNone, usesmod_timeinstead
3. Lifecycle Integration
ObjectOpts.access_time: Exposes access time to lifecycle rulesObjectOpts.is_cold(threshold): Returnstrueifnow - access_time > thresholdeffective_access_time(): Returnsaccess_timeor falls back tomod_time
Data Flow
GET Object Request
│
▼
Update last_access_time in metadata
│
▼
Lifecycle Scanner (periodic)
│
▼
For each object: is_cold(threshold_days)?
│
├─ No → Skip
└─ Yes → Transition to target_tier
Related PRs
This is Part 2 of splitting #1042. Part 1 (#1049) adds the core cold tier config module.
Testing Plan
- Unit tests for
is_cold()with various thresholds - Integration tests for access time updates on GET
- End-to-end test for lifecycle transition to cold tier
|
Hey @tennisleng , Our lifecycle management still has bugs. Cold tier related issues need to be reviewed and merged after lifecycle management is complete. |
Splitting #1042: Integration of cold tiering.