[clsi-cache] shard each zone into three instances (#25301)

* [clsi-cache] shard per zone into three instances

Keep the old instance as read fallback. We can remove it in 4 days.

Disk size: 2Ti gives us the maximum write throughput of 240MiB/s on a
N2D instance with fewer than 8 vCPUs.

* [clsi] fix format

* [k8s] clsi-cache: bring back storage-classes

* [k8s] clsi-cache: fix reference to zonal storage-classes

* [k8s] clsi-cache: add logging configs

* [clsi] improve sharding

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [clsi] fix sharding

Index needs to be positive.

* [clsi] fix sharding

The random part is static per machine/process.

* [clsi] restrict clsi-cache to user projects

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [k8s] clsi-cache: align CLSI_CACHE_NGINX_HOST with service LB

---------

Co-authored-by: Brian Gough <brian.gough@overleaf.com>
GitOrigin-RevId: 1efb1b3245c8194c305420b25e774ea735251fb3
This commit is contained in:
Jakob Ackermann
2025-05-06 13:32:00 +02:00
committed by Copybot
parent aa97dbdbb6
commit 5ce1685b5b
15 changed files with 87 additions and 34 deletions

View File

@@ -129,6 +129,7 @@ describe('CompileController', function () {
url: `${this.Settings.apis.clsi.url}/project/${this.project_id}/build/${file.build}/output/${file.path}`,
...file,
})),
clsiCacheShard: undefined,
},
})
.should.equal(true)
@@ -156,6 +157,7 @@ describe('CompileController', function () {
url: `${this.Settings.apis.clsi.url}/project/${this.project_id}/build/${file.build}/output/${file.path}`,
...file,
})),
clsiCacheShard: undefined,
},
})
.should.equal(true)
@@ -203,6 +205,7 @@ describe('CompileController', function () {
url: `${this.Settings.apis.clsi.url}/project/${this.project_id}/build/${file.build}/output/${file.path}`,
...file,
})),
clsiCacheShard: undefined,
},
})
})
@@ -250,6 +253,7 @@ describe('CompileController', function () {
url: `${this.Settings.apis.clsi.url}/project/${this.project_id}/build/${file.build}/output/${file.path}`,
...file,
})),
clsiCacheShard: undefined,
},
})
})
@@ -281,6 +285,7 @@ describe('CompileController', function () {
buildId: this.buildId,
stats: this.stats,
timings: this.timings,
clsiCacheShard: undefined,
},
})
.should.equal(true)
@@ -315,6 +320,7 @@ describe('CompileController', function () {
timings: this.timings,
// JSON.stringify will omit these undefined values
buildId: undefined,
clsiCacheShard: undefined,
},
})
.should.equal(true)
@@ -348,6 +354,7 @@ describe('CompileController', function () {
timings: this.timings,
// JSON.stringify will omit these undefined values
buildId: undefined,
clsiCacheShard: undefined,
},
})
.should.equal(true)
@@ -379,6 +386,7 @@ describe('CompileController', function () {
timings: this.timings,
// JSON.stringify will omit these undefined values
buildId: undefined,
clsiCacheShard: undefined,
},
})
.should.equal(true)