unified-storage: setup ring to shard requests (#103783)

* Updates the instrumentation_server service to use mux instead of the builtin router, and have it store the router in the module server: this is so we can register the /ring endpoint to check the status of the ring
* Create a new Ring service that depends on the instrumentation server and declares it as a dependency for the storage server
* Create standalone MemberlistKV service for Ring service to use
* Update the storage server Search and GetStats handler to distribute requests if applicable
This commit is contained in:
Will Assis
2025-04-25 13:08:44 -04:00
committed by GitHub
parent ff7b923d33
commit 4adebd6058
19 changed files with 654 additions and 25 deletions
+5
View File
@@ -547,6 +547,11 @@ type Cfg struct {
IndexMaxBatchSize int
IndexFileThreshold int
IndexMinCount int
EnableSharding bool
MemberlistBindAddr string
MemberlistAdvertiseAddr string
MemberlistJoinMember string
InstanceID string
SprinklesApiServer string
SprinklesApiServerPageLimit int
CACertPath string
+5
View File
@@ -54,6 +54,11 @@ func (cfg *Cfg) setUnifiedStorageConfig() {
cfg.IndexPath = section.Key("index_path").String()
cfg.IndexWorkers = section.Key("index_workers").MustInt(10)
cfg.IndexMaxBatchSize = section.Key("index_max_batch_size").MustInt(100)
cfg.EnableSharding = section.Key("enable_sharding").MustBool(false)
cfg.MemberlistBindAddr = section.Key("memberlist_bind_addr").String()
cfg.MemberlistAdvertiseAddr = section.Key("memberlist_advertise_addr").String()
cfg.MemberlistJoinMember = section.Key("memberlist_join_member").String()
cfg.InstanceID = section.Key("instance_id").String()
cfg.IndexFileThreshold = section.Key("index_file_threshold").MustInt(10)
cfg.IndexMinCount = section.Key("index_min_count").MustInt(1)
cfg.SprinklesApiServer = section.Key("sprinkles_api_server").String()