[Feature Request] Improve OpenSearch Cluster Manager Metadata Handling with RocksDB #17337
Labels
Cluster Manager
enhancement
Enhancement or improvement to existing feature or request
Roadmap:Modular Architecture
Project-wide roadmap label
Is your feature request related to a problem? Please describe
Problem
Right now, OpenSearch stores all metadata (indexes, aliases, templates, etc.) in ClusterState, which has some problems:
Too Tightly Coupled
High Memory Usage
Slow Recovery After Crash
Not Cloud-Native
Describe the solution you'd like
Proposed Solution: Use RocksDB for Metadata Storage
Instead of keeping metadata only in memory, I am proposing , we can store it in RocksDB (a fast key-value database).
This will decouple metadata storage from ClusterState, making OpenSearch faster and more scalable.
How This Helps
Faster Index Creation & Updates
Better Memory Efficiency
Crash Recovery is Instant
Supports Stateless Cluster Manager
Implementation Plan
1️⃣ Store Metadata in RocksDB
Related component
Cluster Manager
Describe alternatives you've considered
Evaluating Metadata Storage Solutions for OpenSearch Cluster Manager
Comparison of Metadata Storage Options
Why RocksDB is the Best Fit for OpenSearch
Fast Reads and Writes
RocksDB provides microsecond-level read and write latency because it runs locally within OpenSearch. Other options like DynamoDB and S3 introduce network overhead, increasing response times.
Strong Consistency and Durability
RocksDB ensures strong consistency through Write-Ahead Logging (WAL), allowing metadata changes to be recovered after a crash. DynamoDB is eventually consistent unless configured for strong consistency, which adds cost and complexity. S3 does not provide transactional consistency.
Works in Any Deployment Environment
RocksDB is embedded in OpenSearch and does not rely on external cloud services. It works in on-premise, hybrid, and multi-cloud environments. In contrast, DynamoDB and S3 are AWS-only solutions, making them unsuitable for OpenSearch clusters deployed across multiple cloud providers or on-premise.
Lower Operational Overhead
RocksDB runs inside OpenSearch without requiring external database management. There are no API rate limits, IAM role configurations, or additional networking costs. In comparison, DynamoDB requires fine-tuning capacity settings and monitoring costs, while S3 is not built for real-time metadata storage.
High-Throughput Metadata Operations
OpenSearch needs to perform fast, atomic metadata updates such as index creation and alias management. RocksDB supports millions of writes per second with batch transactions. DynamoDB scales well but incurs additional latency due to network requests. S3 is not suitable for live metadata updates.
Would love to gather feedback on this choice before moving forward with a proof of concept.
Additional context
No response
The text was updated successfully, but these errors were encountered: