Skip to content

Commit eb5ff48

Browse files
authored
feat(schema): cache adjustments (#6747)
1 parent 7a3a8dd commit eb5ff48

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

deployment/services/redis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function deployRedis(input: { environment: Environment }) {
2121
}).deploy({
2222
limits: input.environment.isProduction
2323
? {
24-
memory: '4Gi',
24+
memory: '6Gi',
2525
cpu: '1000m',
2626
}
2727
: {

deployment/services/schema.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ export function deploySchema({
2626
docker: Docker;
2727
sentry: Sentry;
2828
}) {
29+
const minuteInMS = 60 * 1000;
30+
const hourInMS = minuteInMS * 60;
31+
2932
return new ServiceDeployment(
3033
'schema-service',
3134
{
@@ -38,8 +41,8 @@ export function deploySchema({
3841
REQUEST_BROKER: '1',
3942
SCHEMA_CACHE_POLL_INTERVAL_MS: '150',
4043
SCHEMA_CACHE_TTL_MS: '65000' /* 65s */,
41-
SCHEMA_CACHE_SUCCESS_TTL_MS: '43200000' /* 12h */,
42-
SCHEMA_COMPOSITION_TIMEOUT_MS: '60000' /* 60s */,
44+
SCHEMA_CACHE_SUCCESS_TTL_MS: String(hourInMS * 2),
45+
SCHEMA_COMPOSITION_TIMEOUT_MS: String(minuteInMS),
4346
OPENTELEMETRY_COLLECTOR_ENDPOINT:
4447
observability.enabled && observability.tracingEndpoint
4548
? observability.tracingEndpoint

deployment/utils/redis.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,7 @@ export class Redis {
108108
// Note: this is needed, otherwise local config is not loaded at all
109109
command: ['/opt/bitnami/scripts/redis/entrypoint.sh'],
110110
// This is where we can pass actual flags to the bitnami/redis runtime
111-
args: [
112-
'/opt/bitnami/scripts/redis/run.sh',
113-
`--maxmemory ${memoryInMegabytes}mb`,
114-
'--maxmemory-policy volatile-ttl',
115-
],
111+
args: ['/opt/bitnami/scripts/redis/run.sh', `--maxmemory ${memoryInMegabytes}mb`],
116112
readinessProbe: {
117113
initialDelaySeconds: 5,
118114
periodSeconds: 8,

0 commit comments

Comments
 (0)