Merged in feature/SW-2531-redis-api-scaling (pull request #1895)
Redis-Api: increase max replica count and cpu/memory Approved-by: Linus Flood
This commit is contained in:
@@ -5,8 +5,8 @@ param location string
|
|||||||
param containerAppName string
|
param containerAppName string
|
||||||
param containerImage string
|
param containerImage string
|
||||||
param containerPort int
|
param containerPort int
|
||||||
param minReplicas int = 1
|
param minReplicas int = environment == 'prod' ? 2 : 1
|
||||||
param maxReplicas int = 3
|
param maxReplicas int = 15
|
||||||
param envVars EnvironmentVar[] = []
|
param envVars EnvironmentVar[] = []
|
||||||
param userAssignedIdentityId string
|
param userAssignedIdentityId string
|
||||||
|
|
||||||
@@ -61,14 +61,45 @@ resource containerApp 'Microsoft.App/containerApps@2024-10-02-preview' = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
resources: {
|
resources: {
|
||||||
cpu: json('0.25')
|
cpu: json('0.5')
|
||||||
memory: '0.5Gi'
|
memory: '1.0Gi'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
scale: {
|
scale: {
|
||||||
minReplicas: minReplicas
|
minReplicas: minReplicas
|
||||||
maxReplicas: maxReplicas
|
maxReplicas: maxReplicas
|
||||||
|
pollingInterval: 15
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
name: 'http-rule'
|
||||||
|
http: {
|
||||||
|
metadata: {
|
||||||
|
concurrentRequests: '100'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: 'cpu-scaler'
|
||||||
|
custom: {
|
||||||
|
type: 'cpu'
|
||||||
|
metadata: {
|
||||||
|
type: 'Utilization'
|
||||||
|
value: '70' // Trigger scaling if CPU > 70%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name: 'memory-scaler'
|
||||||
|
custom: {
|
||||||
|
type: 'memory'
|
||||||
|
metadata: {
|
||||||
|
type: 'Utilization'
|
||||||
|
value: '75' // Scale up if memory usage > 75%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user