[SERVER-13898] Dynamic, date based, tag (zone) ranges Created: 10/May/14  Updated: 16/Jan/24

Status: Open
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Jason Zucchetto Assignee: Backlog - Cluster Scalability
Resolution: Unresolved Votes: 9
Labels: PM497, oldshardingemea, sharding-common-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Cluster Scalability
Participants:

 Description   

Method to create dynamic, date based, tag ranges for shard tags. E.g. Within the past 7 days => "recent", greater than 7 days => "archive".

Currently, this can be done with a cron job to continually adjust tag ranges, however, this is only becoming more popular and the cron job option adds another level of complexity to deployments.

e.g. all recent photo albums are on "recent" tagged shards (where the ratio of data size to RAM is much lower or the drive is SSD)

sh.addTagRange("photos.albums", 
{ "date_uploaded" : { $currentDate : true }  }, 
{ "date_uploaded" : { $currentDate : -7 }  }, 
"recent")



 Comments   
Comment by Asya Kamsky [ 14/Aug/17 ]

This would require having a global concept of $currentDate across the entire sharded cluster.

Generated at Thu Feb 08 03:33:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.