ALB quota calculation methods

Updated at:

Quotas limit resource usage or access frequency over a period. This topic explains how ALB counts quotas for standard ALB instances, server groups, listeners, and forwarding rules so you can estimate consumption before deployment.

How quotas are calculated

ALB routes traffic through a four-level hierarchy: ALB instance → Ingresses → backend server groups (Service:port pairs) → pods. Quotas are counted at each level.

image

Examples below reference this diagram.

Key multiplier rule: When an Ingress is associated with multiple listeners, its forwarding rules, backend pods, and certificates are each counted once per listener.

ALB instance quotas

Additional certificates per ALB instance

Quota ID: alb_quota_loadbalancer_certificates_num_standard_edition

Certificate count = sum of additional certificates across all listeners.

Certificate count per Ingress depends on the configuration method:

Configuration method How certificates are counted
Automatic certificate discovery Certificates associated with the domain in Certificate Management Service
Kubernetes Secrets Secrets in the secretName field of spec.tls. Cross-namespace Secrets are included; same-namespace Secrets count once.
AlbConfig CertificateId field Certificates in the CertificateId field
Multiple methods combined Depends on method compatibility
Multiple listeners Counted once per associated listener

Scenario example:

Ingress Listeners Certificate count
ALB Ingress 1 HTTP Listener 1 0 (HTTP requires no certificates)
ALB Ingress 2 HTTP Listener 2 0 (HTTP requires no certificates)
ALB Ingress 3 HTTPS Listener 3, HTTPS Listener 4 (1 cert each) 2 (1 cert x 2 listeners)

Forwarding rules per ALB instance (excluding default rules)

Quota ID: alb_quota_loadbalancer_rules_num_standard_edition

Forwarding rule count = sum across all Ingresses on all listeners.

Rule count per Ingress = number of path entries under host in spec.rules. If associated with multiple listeners, rules are counted once per listener.

Scenario example:

Ingress Rules Listeners Total rules counted
ALB Ingress 1 1 1 1
ALB Ingress 2 1 1 1
ALB Ingress 3 1 2 2 (1 rule x 2 listeners)

Backend servers per ALB instance

Quota ID: alb_quota_loadbalancer_servers_num_standard_edition

Backend server count = sum of pods across all Ingresses on all listeners.

Per-Ingress backend server count = total pods across all forwarding rules. If associated with multiple listeners, pods are counted once per listener.

Scenario example:

Ingress Pods Listeners Total servers counted
ALB Ingress 1 3 1 3
ALB Ingress 2 3 1 3
ALB Ingress 3 2 2 4 (2 pods x 2 listeners)

Listeners per ALB instance

Quota ID: alb_quota_loadbalancer_listeners_num_standard_edition

Listener count = number of port:protocol pairs in the AlbConfig Listeners parameter. Per-Ingress listener count depends on the alb.ingress.kubernetes.io/listen-ports annotation.

Scenario example:

Ingress Listener count
ALB Ingress 1 1
ALB Ingress 2 1
ALB Ingress 3 2

Server group quotas

Server groups per backend server

Quota ID: alb_quota_server_added_num

Tracks how many ALB server groups contain a given pod IP.

A pod referenced in multiple forwarding rules is counted once per rule. If a rule has multiple listeners, the pod is counted once per listener per rule.

Scenario example:

Pod Service:port pairs Forwarding rules Listeners Server group count
Pod 1 Service 1:80, Service 2:80 1 rule per Service 1 per rule 2
Pod 2 Service 1:80, Service 2:80 1 rule per Service 1 per rule 2
Pod 3 Service 1:80, Service 2:80 1 rule per Service 1 per rule 2
Pod 4 Service 3:80 1 rule 2 listeners 2
Pod 5 Service 3:80 1 rule 2 listeners 2

Listener and rule associations per server group

Quota ID: alb_quota_servergroup_attached_num

Tracks how many listener and rule associations a server group (Service:port pair) has.

Count = forwarding rules referencing the Service:port pair. If a rule has multiple listeners, the group is counted once per listener.

Scenario example:

Service:port Forwarding rules Listeners Association count
Service 1:80 1 1 1
Service 2:80 1 1 1
Service 3:80 1 2 2 (1 rule x 2 listeners)

Backend servers per server group

Quota ID: alb_quota_servergroup_servers_num

Backend server count = number of pod:port pairs in the server group.

Scenario example:

Service:port Backend servers
Service 1:80 3
Service 2:80 3
Service 3:80 2

Listener quotas

Network ACLs per listener

Network ACL count per listener = entries in non-empty aclConfig fields across port:protocol pairs in the AlbConfig Listeners parameter.

Scenario example:

Listener Network ACL count
Listener 1 1
Listener 2 1
Listener 3 0
Listener 4 0

Network ACL entries per listener

ACL entry count per listener = total entries in non-empty aclConfig fields across port:protocol pairs in the AlbConfig Listeners parameter.

Scenario example:

Listener ACL entry count
Listener 1 Equals the entry count of the ACL specified in the aclId field
Listener 2 2
Listener 3 0
Listener 4 0

Forwarding rule quotas

Actions per forwarding rule

The action count for a forwarding rule depends on the value of the servicePort field:

servicePort value Action count
use-annotation Custom actions specified by annotations
Any other value Custom annotation actions + 1

Scenario example: ALB Ingress 1 has one rule with servicePort = 80 and no custom actions. Action count: 1.

Match conditions per forwarding rule

Quota ID: alb_quota_rule_matchevaluations_num

Match condition count = non-empty hosts + path conditions + custom annotation conditions.

Path conditions are counted as follows based on pathType:

pathType value Conditions per path
Prefix 2
Any other value 1

Scenario example:

Ingress Hosts Paths Custom conditions Match condition count
ALB Ingress 1 1 1 1 3
ALB Ingress 2 1 1 0 2
ALB Ingress 3 1 1 0 2

Wildcard characters per forwarding rule

Wildcard count = total wildcard characters across the rule's actions and match conditions.

Scenario example: ALB Ingress 2 has one rule with one wildcard (*) in the host condition. Wildcard count: 1.

Create an alert rule for a quota item

Some ALB quota items support alerts. You can set a threshold for the quota usage or the remaining quota. When the preset threshold is reached, the system sends an alert message to the preset callback URL by using an HTTP POST request. By creating an alert rule for a quota item, you can request a quota increase in time before the quota is exhausted. This prevents reconciliation failures caused by quota exhaustion, in which forwarding rules or backend servers fail to be added to the ALB instance. You can also run the kubectl describe and kubectl get event commands to view the details and events of resources such as AlbConfig, Ingress, and Service in the cluster, and check whether the reconciliation succeeds.

Create an alert rule in Quota Center

  1. Log on to the Quota Center console.

  2. Use one of the following methods to create an alert rule for a quota item.

    • Method 1: On the Products with General Quotas page, in the Networking section, click Application Load Balancer to go to the General Quotas page.

    • Method 2: In the left-side navigation pane, click Alarm Rules. On the Alarm Rules page, click Create Quota Alert Rule. On the General Quotas page, select Application Load Balancer.

  3. On the General Quotas page, find the target quota and click Create Alarm Rule in the Actions column.

  4. On the Create Alarm Rule page, configure the alert rule, and then click Confirm.

    Table 1. Quota alert rule parameters

    ParameterDescriptionExample
    Alarm Rule Name

    The name of the alert rule.

    Alert rule for the maximum number of vCPUs for restricted spot instances

    Alarm Metric

    The metric of the quota alert. Valid values:

    • Quota

    • Quota usage

    • Usage percentage (%)

    • Available percentage (%)

    Usage percentage (%)

    Threshold and Alarm Level

    The alert level and the threshold that corresponds to the level.

    The notification methods that correspond to each alert level are as follows: Critical: phone call, SMS, email, and alert callback. Warn: SMS, email, and alert callback. Info: email and alert callback.

    You must also select the number of consecutive periods during which the monitoring metric must reach the alert threshold before an alert notification is sent. Valid values: 1, 3, 5, 10, 15, 30, 60, 70, 90, 120, and 180 consecutive periods.

    You can configure multiple alert levels. When the threshold falls into a different range, the alert maps to a different level, and CloudMonitor sends alert notifications through different channels.

    • Alert level: Info. The default notification method of this level is email and alert callback.

    • Threshold: >=80%.

    Mute Period

    The interval at which the alert notification is resent when the alert is not cleared. Valid values: 5 minutes, 15 minutes, 30 minutes, 60 minutes, 3 hours, 6 hours, 12 hours, and 24 hours.

    When a monitoring metric reaches the alert threshold, an alert notification is sent. If the monitoring metric stays above the alert threshold within the mute period, no duplicate notification is sent during that period. If the monitoring metric has not returned to normal after the mute period ends, CloudMonitor sends the notification again.

    For example, if you set Mute Period to 24 hours and the alert is not cleared, CloudMonitor sends the notification again after 24 hours.

    5 minutes

    Effective period

    The time period during which the alert rule takes effect. Alert notifications are sent only within the effective period on the specified days, from Monday to Sunday.

    • Days: Monday to Sunday

    • Time: 00:00 to 23:59

    Alarm Contact Group

    The alert contact group that receives alerts.

    Alert notifications are sent to the alert contacts in this alert contact group. An alert contact group can contain one or more alert contacts.

    For instructions, see Create an alert contact or an alert contact group.

    ECS specification quota administrator

    Alert callback

    A URL that is accessible over the Internet and receives the alert information that CloudMonitor pushes by using POST requests. Only HTTP is supported.

    To test the connectivity of the alert callback URL, perform the following steps:

    1. Click Test next to the callback URL. On the Test Result page, you can check and troubleshoot the connectivity of the alert callback URL based on the status code and the test result details that the webhook returns.

      Note

      You can also set the Language of the webhook and click Test again to obtain the corresponding test result details.

    2. Click Close.

    http://alert.aliyun.com:8080/callback

    Labels

    The tags of the alert rule. You can configure up to six tags.

    k1,v1

    Push Channel

    The channels to which the alert information is delivered. Valid values:

    • Simple Log Service: If you turn on the Simple Log Service switch, the alert information is sent to a Logstore of Simple Log Service when an alert is triggered. You must specify the Region, ProjectName, and Logstore of Simple Log Service. For instructions, see Create a project and a Logstore.

    • Message Service - topic: If you turn on the Message Service - topic switch, the alert information is sent to a topic of Simple Message Queue (formerly MNS) when an alert is triggered. You must specify the region and the topic of Simple Message Queue (formerly MNS). For instructions, see Create a topic.

    • Function Compute: If you turn on the Function Compute switch, the alert notification is sent to Function Compute for formatting when an alert is triggered. You must specify the region, the service, and the function of Function Compute. For instructions, see Create a service and a function.

    Turn off the switch

    Recovery Notification

    Specifies whether to send a recovery notification when the alert is cleared. This switch is turned on by default.

    Turn on the switch

    Method to handle alarms when no monitoring data is found

    The action to take when no monitoring data is available. Valid values:

    • Do not do anything (default value)

    • Send alarm notifications

    • Treated as normal

    Do nothing

  5. In the left-side navigation pane, click Alarm Rules to view the alert rule that you created.

    You can use the Alarm Rules page to manage the alert rules that you created, such as viewing, modifying, and deleting alert rules.

  6. (Optional) View the alert callback result.

    If you configured an alert callback and the callback succeeds, you can view the alert callback records and the applications for automatic quota increase.

    1. In the left-side navigation pane, click Alarm History to view the alert callback records.

      If the Notification Channel of the target alert history record includes Alert Callback, the alert callback succeeds.

    2. In the left-side navigation pane, click Application History to view the applications for automatic quota increase.

Create an alert rule in the SLB console

  1. Log on to the Quota Center page of the SLB console.

  2. On the Quota Center page, click the ALB tab.

  3. Set Quota Category to General Quotas, find the target general quota, and then click Create Alarm Rule in the Actions column.

  4. On the Create Alarm Rule page, configure the alert rule, and then click Confirm.

    Table 1. Quota alert rule parameters

    ParameterDescriptionExample
    Alarm Rule Name

    The name of the alert rule.

    Alert rule for the maximum number of vCPUs for restricted spot instances

    Alarm Metric

    The metric of the quota alert. Valid values:

    • Quota

    • Quota usage

    • Usage percentage (%)

    • Available percentage (%)

    Usage percentage (%)

    Threshold and Alarm Level

    The alert level and the threshold that corresponds to the level.

    The notification methods that correspond to each alert level are as follows: Critical: phone call, SMS, email, and alert callback. Warn: SMS, email, and alert callback. Info: email and alert callback.

    You must also select the number of consecutive periods during which the monitoring metric must reach the alert threshold before an alert notification is sent. Valid values: 1, 3, 5, 10, 15, 30, 60, 70, 90, 120, and 180 consecutive periods.

    You can configure multiple alert levels. When the threshold falls into a different range, the alert maps to a different level, and CloudMonitor sends alert notifications through different channels.

    • Alert level: Info. The default notification method of this level is email and alert callback.

    • Threshold: >=80%.

    Mute Period

    The interval at which the alert notification is resent when the alert is not cleared. Valid values: 5 minutes, 15 minutes, 30 minutes, 60 minutes, 3 hours, 6 hours, 12 hours, and 24 hours.

    When a monitoring metric reaches the alert threshold, an alert notification is sent. If the monitoring metric stays above the alert threshold within the mute period, no duplicate notification is sent during that period. If the monitoring metric has not returned to normal after the mute period ends, CloudMonitor sends the notification again.

    For example, if you set Mute Period to 24 hours and the alert is not cleared, CloudMonitor sends the notification again after 24 hours.

    5 minutes

    Effective period

    The time period during which the alert rule takes effect. Alert notifications are sent only within the effective period on the specified days, from Monday to Sunday.

    • Days: Monday to Sunday

    • Time: 00:00 to 23:59

    Alarm Contact Group

    The alert contact group that receives alerts.

    Alert notifications are sent to the alert contacts in this alert contact group. An alert contact group can contain one or more alert contacts.

    For instructions, see Create an alert contact or an alert contact group.

    ECS specification quota administrator

    Alert callback

    A URL that is accessible over the Internet and receives the alert information that CloudMonitor pushes by using POST requests. Only HTTP is supported.

    To test the connectivity of the alert callback URL, perform the following steps:

    1. Click Test next to the callback URL. On the Test Result page, you can check and troubleshoot the connectivity of the alert callback URL based on the status code and the test result details that the webhook returns.

      Note

      You can also set the Language of the webhook and click Test again to obtain the corresponding test result details.

    2. Click Close.

    http://alert.aliyun.com:8080/callback

    Labels

    The tags of the alert rule. You can configure up to six tags.

    k1,v1

    Push Channel

    The channels to which the alert information is delivered. Valid values:

    • Simple Log Service: If you turn on the Simple Log Service switch, the alert information is sent to a Logstore of Simple Log Service when an alert is triggered. You must specify the Region, ProjectName, and Logstore of Simple Log Service. For instructions, see Create a project and a Logstore.

    • Message Service - topic: If you turn on the Message Service - topic switch, the alert information is sent to a topic of Simple Message Queue (formerly MNS) when an alert is triggered. You must specify the region and the topic of Simple Message Queue (formerly MNS). For instructions, see Create a topic.

    • Function Compute: If you turn on the Function Compute switch, the alert notification is sent to Function Compute for formatting when an alert is triggered. You must specify the region, the service, and the function of Function Compute. For instructions, see Create a service and a function.

    Turn off the switch

    Recovery Notification

    Specifies whether to send a recovery notification when the alert is cleared. This switch is turned on by default.

    Turn on the switch

    Method to handle alarms when no monitoring data is found

    The action to take when no monitoring data is available. Valid values:

    • Do not do anything (default value)

    • Send alarm notifications

    • Treated as normal

    Do nothing

  5. Refresh the page to go back to the General Quota tab. Find the quota that you want, and then click Alarm Rules in the Actions column.

  6. On the Alarm Rules page, you can view the alert rules that you created.

Next steps