Merged in fix/redis-adjust-batch-settings (pull request #2374)
fix: adjust batch size and remove timeout between delete-calls * fix: adjust batch size and remove timeout between delete-calls * chore: adjust scaling Approved-by: Linus Flood
This commit is contained in:
@@ -5,8 +5,8 @@ param location string
|
||||
param containerAppName string
|
||||
param containerImage string
|
||||
param containerPort int
|
||||
param minReplicas int = environment == 'prod' ? 2 : 1
|
||||
param maxReplicas int = 15
|
||||
param minReplicas int = environment == 'prod' ? 5 : 1
|
||||
param maxReplicas int = 40
|
||||
param pollingInterval int = 5
|
||||
param envVars EnvironmentVar[] = []
|
||||
param userAssignedIdentityId string
|
||||
@@ -76,7 +76,7 @@ resource containerApp 'Microsoft.App/containerApps@2024-10-02-preview' = {
|
||||
name: 'http-rule'
|
||||
http: {
|
||||
metadata: {
|
||||
concurrentRequests: '100'
|
||||
concurrentRequests: '500'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,7 +86,7 @@ resource containerApp 'Microsoft.App/containerApps@2024-10-02-preview' = {
|
||||
type: 'cpu'
|
||||
metadata: {
|
||||
type: 'Utilization'
|
||||
value: '70' // Trigger scaling if CPU > 70%
|
||||
value: '65' // Trigger scaling if CPU > X%
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,7 +96,7 @@ resource containerApp 'Microsoft.App/containerApps@2024-10-02-preview' = {
|
||||
type: 'memory'
|
||||
metadata: {
|
||||
type: 'Utilization'
|
||||
value: '75' // Scale up if memory usage > 75%
|
||||
value: '70' // Scale up if memory usage > X%
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ function validateKey(key: string) {
|
||||
|
||||
async function deleteWithPattern(pattern: string) {
|
||||
let cursor = "0";
|
||||
const SCAN_SIZE = 500;
|
||||
const SCAN_SIZE = 1000;
|
||||
|
||||
let totalDeleteCount = 0;
|
||||
|
||||
@@ -134,8 +134,6 @@ async function deleteWithPattern(pattern: string) {
|
||||
|
||||
cacheRouteLogger.info(`Deleted ${deleteCount} keys in this batch.`);
|
||||
totalDeleteCount += deleteCount;
|
||||
|
||||
await timeout(10);
|
||||
} while (cursor !== "0");
|
||||
|
||||
return totalDeleteCount;
|
||||
|
||||
Reference in New Issue
Block a user