shuffle cdn shard configs to allow for multiple file shards to handle one file, randomly distributing
This commit is contained in:
@@ -59,6 +59,7 @@ public partial class MareHub
|
||||
{
|
||||
var forbiddenFile = forbiddenFiles.SingleOrDefault(f => string.Equals(f.Hash, file.Hash, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
shardConfig.Shuffle();
|
||||
var matchedShardConfig = shardConfig.Find(f => f.FileMatchRegex.Match(file.Hash).Success);
|
||||
var baseUrl = matchedShardConfig?.CdnFullUrl ?? _mainCdnFullUrl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user