Configure advanced ALB Ingress features such as routing rules, HTTPS redirects, rewrites, canary releases, and session persistence.
Forward requests based on domain names
Create an Ingress to forward requests based on a domain name or an empty domain name.
Domain name
This example sets the routing path to/hello. Requests todemo.domain.ingress.top/hello are forwarded to the backend service.
-
Deploy the following manifest to create a Service, a Deployment, and an Ingress that forwards requests based on the specified domain name.
-
Run
kubectl get ingto obtain the address of the ALB instance. Then, run the following command, replacingADDRESSwith the instance's address.curl -H "host: demo.domain.ingress.top" ADDRESS/helloExpected output:
{"hello":"coffee"}
Empty domain name
With an empty domain name and routing path/hello, requests to ADDRESS/hello are forwarded to the backend service.
-
Deploy the following manifest to create a Service, a Deployment, and an Ingress.
-
Run
kubectl get ingto obtain the address of the ALB instance. Then, run the following command, replacingADDRESSwith the instance's address.curl ADDRESS/helloExpected output:
{"hello":"coffee"}
Path-based forwarding
ALB Ingress forwards requests based on URL paths. Specify the match mode in the pathType field. pathType supports three modes.
-
Exact match (
Exact): Matches the URL path exactly. -
Default (
ImplementationSpecific): ALB Ingress Controller treats this as an exact match. If path is not specified, defaults to/. -
Prefix match (
Prefix): Matches the prefix of the URL path.
-
When
pathTypeisExactorPrefix, path must be a non-empty absolute path. Otherwise, validation fails. -
If URL matching policies conflict, requests are forwarded based on forwarding rule priority.
-
Simple paths (/, /foo, /foo/)
Match mode
Rule path
Request path
Matched?
Prefix match (Prefix)
/
/ (matches all paths)
Yes
/foo
-
/foo
-
/foo/
Yes
/foo/
-
/foo
-
/foo/
Yes
/aaa
/ccc
No. The prefix does not match.
Exact match (Exact) or default (ImplementationSpecific)
/foo
/foo
Yes
/bar
No
/foo/
No
/foo/
/foo
No
-
-
Hierarchical paths (/aaa/bb, /aaa/bbb, /aaa/bbb/)
Match mode
Rule path
Request path
Matched?
Prefix match (Prefix)
/aaa/bb
/aaa/bbb
No
/aaa/bbb
/aaa/bbb
Yes
/aaa/bbb/
/aaa/bbb
Yes. The trailing slash in the rule path is ignored.
/aaa/bbb
/aaa/bbb/
Yes. The trailing slash in the request path is matched.
/aaa/bbb/ccc
Yes. The rule path is a prefix of the request path.
-
Two rule paths
Match mode
Rule path
Request path
Matched?
Prefix match (Prefix)
-
/
-
/aaa
/aaa/ccc
Yes. The request path matches the
/aaarule path.-
/aaa
-
/
/aaa/ccc
Yes. The request path matches the
/aaarule path./ccc
Yes. The request path matches the
/rule path.-
/aaa
-
/bbb
/ccc
No. The prefix does not match.
-
Examples for each match mode:
Prefix match (Prefix)
This mode performs a case-sensitive prefix match on URL path elements, which are separated by /.
Rule path / matches all paths starting with /, such as /hello.
-
Deploy the following manifest to create the ingress resource.
-
Run
kubectl get ingto get the address of the ALB instance. Then, run the following command, replacingADDRESSwith the retrieved address.curl ADDRESS/helloExpected output:
{"hello":"coffee"}
Exact match or default
Rule path /hello matches only requests to /hello.
-
Deploy the following manifest to create the ingress resource.
-
Run
kubectl get ingto get the address of the ALB instance. Then, run the following command, replacingADDRESSwith the retrieved address.curl ADDRESS/helloExpected output:
{"hello":"coffee"}
Configure health checks
Use annotations to configure health checks for ALB Ingress.
Example annotations:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: cafe-ingress
annotations:
alb.ingress.kubernetes.io/healthcheck-enabled: "true"
alb.ingress.kubernetes.io/healthcheck-path: "/"
alb.ingress.kubernetes.io/healthcheck-protocol: "HTTP"
alb.ingress.kubernetes.io/healthcheck-httpversion: "HTTP1.1"
alb.ingress.kubernetes.io/healthcheck-method: "HEAD"
alb.ingress.kubernetes.io/healthcheck-code: "http_2xx"
alb.ingress.kubernetes.io/healthcheck-timeout-seconds: "5"
alb.ingress.kubernetes.io/healthcheck-interval-seconds: "2"
alb.ingress.kubernetes.io/healthy-threshold-count: "3"
alb.ingress.kubernetes.io/unhealthy-threshold-count: "3"
spec:
... ...
|
Parameter |
Description |
Default |
|
|
Specifies whether to enable health checks for the backend server group.
|
|
|
|
The path used for health checks. |
|
|
|
The protocol used for health checks.
|
|
|
|
HTTP protocol version. Takes effect only when
|
|
|
|
The method used for health checks.
Important
If |
|
|
|
Status code(s) indicating a healthy backend server. Specify one or more options, separated by commas.
|
|
|
|
Status code(s) indicating a healthy backend server. Takes precedence over Valid values depend on
|
|
|
|
The health check timeout in seconds. Valid values: 1 to 300. |
|
|
|
The health check interval in seconds. Valid values: 1 to 50. |
|
|
|
The number of consecutive successful health checks required to mark a backend server as healthy. Valid values: 2 to 10. |
|
|
|
The number of consecutive failed health checks required to mark a backend server as unhealthy. Valid values: 2 to 10. |
|
|
|
The port used for health checks. |
Note
A value of |
Redirect HTTP requests to HTTPS
Add the following annotation to redirect HTTP requests to HTTPS port 443.
-
This feature applies only to HTTP forwarding rules on listener port 80.
-
This annotation must be used with annotations for custom forwarding actions, such as
RemoveHeader,InsertHeader, andCors. -
Before using this annotation, ensure an HTTPS listener is configured on port 443 in the AlbConfig. See Use an AlbConfig to configure an ALB listener.
|
Parameter |
Description |
Annotation example |
|
|
Redirects HTTP requests to HTTPS port 443. |
|
Configure backend HTTPS or gRPC
Add the following annotation to use HTTPS or gRPC as the backend protocol.
The backend protocol cannot be modified after ingress creation. Delete and recreate the ingress to change it.
|
Parameter |
Description |
YAML example |
|
|
|
|
Configure regular expressions
Use the alb.ingress.kubernetes.io/use-regex: "true" annotation to enable regular expression matching for path rules in spec.rules with pathType: Prefix.
-
Applies only to path rules with
pathType: Prefix. Enables regex syntax in thepathfield ofspec.rules, independent of custom forwarding conditions. -
This annotation enables regex matching regardless of its value (
trueorfalse). Remove the annotation to disable. -
Without this annotation, Ingress creation fails if the path contains special characters such as
=^()[]|, etc.. -
Path values in a custom forwarding condition (
alb.ingress.kubernetes.io/conditions.YOUR-SVC-NAME) are passed directly to ALB and do not require theuse-regexannotation. To enable regex matching, add the~*or~prefix to the path value. Theuse-regexannotation affects only thepathfield inspec.rules.
Custom forwarding rules
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
alb.ingress.kubernetes.io/conditions.YOUR-SVC-NAME: | ## Replace YOUR-SVC-NAME with the actual Service name. It must match backend.service.name below.
[{
"type": "Path",
"pathConfig": {
"values": [
"~*/pathvalue1", ## Add the ~* or ~ prefix to a regular expression. The text after the prefix is the regular expression itself. ~* indicates a case-sensitive match, and ~ indicates a case-insensitive match.
"/pathvalue2" ## An exact match does not require a prefix.
]
}
}]
name: ingress-example
spec:
ingressClassName: alb
rules:
- http:
paths:
- path: /test-path-for-alb
pathType: Prefix
backend:
service:
name: YOUR-SVC-NAME ## YOUR-SVC-NAME here must match the Service name specified in the custom forwarding condition annotation to define the association.
port:
number: 88
Spec.rules
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
alb.ingress.kubernetes.io/use-regex: "true" ## Allows the path in spec.rules to use a regular expression.
name: ingress-example
spec:
ingressClassName: alb
rules:
- http:
paths:
- path: /test-[a-z]-alb[()^]*
pathType: Prefix
backend:
service:
name: tea-svc
port:
number: 88
|
Parameter |
Description |
|
|
|
Enables regular expressions for path rules in |
|
|
|
Configures a custom forwarding condition. See Customize forwarding rules for an ALB Ingress. Replace |
|
The following table describes the regular expression matching rules.
|
Object |
Prefix |
Rule example |
Client path |
Match? |
Description |
|
Domain name |
Starts with |
|
test.EXAMPLE.com |
Yes |
Domain names support case-insensitive regular expression matching. |
|
Path |
Starts with |
|
/API |
Yes |
Paths support case-insensitive regular expression matching. |
|
Starts with |
|
/Api |
No |
Paths support case-sensitive regular expression matching. |
Regex prefix match
Regex matching defaults to a 'contains match'. To match only paths that start with specific content, add ^ to the beginning of the expression. For example, ^/api matches only paths starting with /api.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-example
annotations:
alb.ingress.kubernetes.io/use-regex: "true" ## Enable regex matching.
alb.ingress.kubernetes.io/conditions.YOUR-SVC-NAME: | ## Replace YOUR-SVC-NAME with the actual service name. This must match backend.service.name below.
[
{
"type": "Path",
"pathConfig": {
"values": [
"~*^/pathvalue1", # A path that starts with ~* or ~ indicates a regex match. The caret (^) indicates "starts with /pathvalue1".
"/pathvalue2" # For a standard prefix or exact match, do not add ~* or ~.
]
}
}
]
spec:
ingressClassName: alb
rules:
- http:
paths:
- path: /test-path-for-alb
pathType: Prefix
backend:
service:
name: YOUR-SVC-NAME # Replace with the actual service name, which must match the annotation.
port:
number: 88
Configure rewrites
ALB Ingress rewrites request paths before forwarding to the backend Service. Use the following two annotations:
-
alb.ingress.kubernetes.io/rewrite-target: /path/${number}: Specifies the path to which requests are rewritten.Important-
Use
${number}variables to reference capture groups from the regular expression in the Ingress path. Up to three capture groups can be referenced using${1},${2}, and${3}. -
The
pathTypeof the Ingress must be set toPrefix.
-
-
alb.ingress.kubernetes.io/use-regex: true: Enables the use of a regular expression in the path. This is enabled by default when you configurerewrite-target.Important-
This annotation enables regex matching regardless of its value (
trueorfalse). Remove the annotation to disable. -
Without this annotation, Ingress creation fails if the path contains special characters such as
"%#;!()[]^,"\"".
-
Configuration examples
Example 1: Remove a prefix
In the following YAML example, the path: /something(/|$)(.*) uses a regular expression to divide the client request path into three parts:
-
/something: Matches the prefix to be removed. -
(/|$): The first capture group, which matches either a/after/somethingor the end of the path ($). -
(.*): The second capture group, which matches all characters after/something/and is referenced as${2}in the rewritten path.
The alb.ingress.kubernetes.io/rewrite-target annotation specifies the rewritten path as / followed by ${2}. The following table shows the rewrite results.
|
Original client path |
Path regex match |
Rewritten path |
|
|
Match. The second capture group is empty. |
|
|
|
Match. The second capture group is empty. |
|
|
|
Match. The second capture group is |
|
|
|
No match. In this example, because the request does not match any routing rule, ALB Ingress returns a 503 status code. |
|
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: rewrite-ingress
annotations:
alb.ingress.kubernetes.io/use-regex: "true" # Allows the path field to use a regular expression.
alb.ingress.kubernetes.io/rewrite-target: /${2} # This annotation supports regular expression replacement.
spec:
ingressClassName: alb
rules:
- host: demo.alb.ingress.top
http:
paths:
- path: /something(/|$)(.*)
pathType: Prefix
backend:
service:
name: rewrite-svc
port:
number: 9080
Example 2: Capture and rearrange multiple parts
The following example captures and rearranges multiple parts of the path /items/(.*)/(.*)/(.*). It also converts path segments into query parameters, which requires no client-side changes. The rewritten path is constructed as /, followed by the second capture group ${2}, the string ?code=, and the third capture group ${3}. The following table shows the rewrite results.
This example requires the client to use a fixed path format with four segments.
|
Original client path |
Path regex match |
Rewritten path |
|
|
Match. The second capture group is |
|
|
|
Match. The second capture group is |
|
|
|
No match. In this example, because the request does not match any routing rule, ALB Ingress returns a 503 status code. |
|
|
|
No match. In this example, because the request does not match any routing rule, ALB Ingress returns a 503 status code. |
|
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: rewrite-ingress
annotations:
alb.ingress.kubernetes.io/use-regex: "true" # Allows the path field to use a regular expression.
alb.ingress.kubernetes.io/rewrite-target: /${2}?code=${3} # This annotation supports regular expression replacement.
spec:
ingressClassName: alb
rules:
- host: demo.alb.ingress.top
http:
paths:
- path: /items/(.*)/(.*)/(.*)
pathType: Prefix
backend:
service:
name: rewrite-svc
port:
number: 9080
Example 3: Rewrite multiple paths to a single path
The following example uses a regular expression to match multiple paths (/app-a(/|$)(.*) and /app-b(/|$)(.*)) and rewrites them to a single path. The rewritten path is /app-c/ followed by ${2}. The following table shows the rewrite results.
|
Original client path |
Path regex match |
Rewritten path |
|
|
Match. The second capture group is |
|
|
|
Match. The second capture group is |
|
|
|
Match. The second capture group is empty. |
|
|
|
No match. In this example, because the request does not match any routing rule, ALB Ingress returns a 503 status code. |
|
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: rewrite-ingress
annotations:
alb.ingress.kubernetes.io/use-regex: "true" # allows the path field to use a regular expression.
alb.ingress.kubernetes.io/rewrite-target: /app-c/${2} # This annotation supports regular expression replacement.
spec:
ingressClassName: alb
rules:
- host: demo.alb.ingress.top
http:
paths:
- path: /app-a(/|$)(.*)
pathType: Prefix
backend:
service:
name: rewrite-svc
port:
number: 9080
- path: /app-b(/|$)(.*)
pathType: Prefix
backend:
service:
name: rewrite-svc
port:
number: 9080
Example 4: Rewrite domain name
The alb.ingress.kubernetes.io/rewrite-target annotation only supports changing the path. To change other parts of the URL, such as the domain name or query parameters, use a custom forwarding rule.
Test rewrite rules
Use the sed
command to test whether a client path matches the path's regular expression and to preview the rewritten path.
This example uses the capture path /items/(.*)/(.*)/(.*) and rewrite rule /${2}?code=${3} from Example 2: Capture and rearrange multiple parts.
-
Save the following sample paths to a file named
path2.txt:/items/electronics/computers/554 /items/produce/fruits/12 /items/headphones/5 /drinks/41 -
Check whether the paths match and view the rewritten paths:
The following command adapts the example's path regular expression (
/items/(.*)/(.*)/(.*)) and rewritten path (/${2}?code=${3}) for sed. When using sed, special characters like/must be escaped with a backslash (\), and capture group references are written as\2instead of${2}.sed -E 's#\/items\/(.*)\/(.*)\/(.*)#Matched: [] --- Rewritten: [/\2?code=\3]#' path2.txtThe following output is expected. The first two paths match the rule and are rewritten, while the last two do not match and remain unchanged.
Matched: [/items/electronics/computers/554] --- Rewritten: [/computers?code=554] Matched: [/items/produce/fruits/12] --- Rewritten: [/fruits?code=12] /items/headphones/5 /drinks/41
Configure custom listener ports
Add an annotation to expose a service on both port 80 (HTTP) and port 443 (HTTPS).
ALB does not support creating listeners directly in an Ingress. First create the required listener ports and protocols in an AlbConfig, then reference them in the Ingress. See Use an AlbConfig to configure an ALB listener.
|
Parameter |
Description |
YAML example |
|
|
Exposes the service on ports 80 and 443. |
|
Configure forwarding rule priority
By default, ALB prioritizes forwarding rules based on the following criteria:
-
The system sorts Ingress resources lexicographically by
namespace/name. An Ingress with a smaller lexicographical value has a higher priority.Namespaces are compared first, then names character by character.
-
Within a single Ingress, rules are prioritized by their order in the
rulesfield. Rules listed first have a higher priority.rules: - host: www.example.com http: ... - host: www.test.com http: ...
To specify the priority of an ALB forwarding rule without changing the namespace/name of the Ingress, add the following Ingress annotation:
|
Parameter |
Description |
Value |
YAML example |
|
|
Specifies the priority of the ALB forwarding rule. A lower value indicates a higher priority. The priority of each rule must be unique within the same listener. |
[1, 1000] Default: 10 |
|
Implement canary releases with annotations
ALB supports canary releases based on headers, cookies, and weights. See Implement canary releases by using an ALB Ingress for best practices.
|
Parameter |
Description |
Description |
|
|
Enables the canary release feature. |
|
-
Distribute canary traffic based on a specified header
Parameter
Description
YAML example
alb.ingress.kubernetes.io/canary-by-headerThese annotations define a custom request header and value for traffic routing. Both annotations are required.
-
When the
headerandheader-valuein a request match the configured values, request traffic is directed to the canary service entry point. -
Unmatched requests are evaluated against lower-priority rules.
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: alb.ingress.kubernetes.io/order: "1" alb.ingress.kubernetes.io/canary: "true" alb.ingress.kubernetes.io/canary-by-header: "location" alb.ingress.kubernetes.io/canary-by-header-value: "hz" name: demo-canary spec: ... ...alb.ingress.kubernetes.io/canary-by-header-valueIf a request contains the
location: hzheader, ALB routes the traffic to the canary Service. Other requests are evaluated against lower-priority rules, such as those based on a cookie or weight. -
-
Distribute canary traffic based on a specified cookie
Parameter
Cookie value
YAML example
alb.ingress.kubernetes.io/canary-by-cookie-
always: Routes all requests to the canary Service. -
never: Never routes requests to the canary Service.
Cookie-based canary releases do not support custom values, only
alwaysandnever.apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: alb.ingress.kubernetes.io/order: "2" alb.ingress.kubernetes.io/canary: "true" alb.ingress.kubernetes.io/canary-by-cookie: "demo" name: demo-canary-cookie ... ...If a request contains the
Cookie: demo=alwaysheader, ALB routes traffic to the canary Service. If the header containsCookie: demo=never, ALB does not route traffic to the canary Service. -
-
Distribute traffic by weight
Parameter
Description
YAML example
alb.ingress.kubernetes.io/canary-weightPercentage of traffic routed to the canary Service. Valid values: 0 to 100.
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: alb.ingress.kubernetes.io/order: "3" alb.ingress.kubernetes.io/canary: "true" alb.ingress.kubernetes.io/canary-weight: "50" name: demo-canary-weight
Configure session persistence with annotations
Use the following annotations to configure session persistence for an ALB Ingress.
Example annotations:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: cafe-ingress-v3
annotations:
alb.ingress.kubernetes.io/sticky-session: "true"
alb.ingress.kubernetes.io/sticky-session-type: "Server" # To use a custom cookie, set this annotation to Server.
alb.ingress.kubernetes.io/cookie-timeout: "1800"
alb.ingress.kubernetes.io/cookie: "test"
spec:
... ...
|
Parameter |
Description |
Default |
|
|
Specifies whether to enable session persistence.
|
|
|
|
Specifies how the load balancer handles the cookie.
Note
Applies only when |
|
|
|
The cookie timeout in seconds. Valid values: 1 to 86400. Applies only when |
1000 |
|
|
The value of the custom cookie. Required (non-empty) when |
"" |
Specify the load balancing algorithm
Use an annotation to specify the load balancing algorithm for a backend server group.
|
Parameter |
Value |
Description |
|
|
|
|
Weighted round robin. Servers with higher weights receive more requests. (Default) |
|
|
|
Distributes requests based on weight and current connection count. If weights are equal, the server with fewest connections is selected. |
||
|
|
Routes requests from the same source IP to the same backend server. |
||
|
|
Routes requests based on a hash of a specified URL parameter. Use the
|
CORS configuration
Use the following annotations to configure Cross-Origin Resource Sharing (CORS) for ALB Ingress.
Example annotations:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: alb-ingress
annotations:
alb.ingress.kubernetes.io/enable-cors: "true"
alb.ingress.kubernetes.io/cors-expose-headers: ""
alb.ingress.kubernetes.io/cors-allow-methods: "GET,POST"
alb.ingress.kubernetes.io/cors-allow-credentials: "true"
alb.ingress.kubernetes.io/cors-max-age: "600"
alb.ingress.kubernetes.io/cors-allow-origin: "Allowed origin domain name"
spec:
... ...
|
Parameter |
Description |
Default |
|
|
Enables Cross-Origin Resource Sharing (CORS). |
Default value: |
|
|
Specifies which origins can access resources on the server. Use a comma (,) to separate multiple origins. Each value must start with |
|
|
|
Specifies the allowed HTTP methods for cross-origin requests. The values are case-insensitive. Use a comma (,) to separate multiple HTTP methods. |
|
|
|
Specifies the allowed request headers for cross-origin requests. Set this parameter to
|
|
|
|
Specifies which response headers to expose to the client. Set this parameter to
|
|
|
|
Specifies whether to include credentials in cross-origin requests. |
|
|
|
Cache duration for preflight responses, in seconds. Valid values: 0 to 172,800. |
Default value: |
Backend persistent connection
Backend persistent connections let ALB reuse TCP connections to backend servers, reducing connection overhead in high-throughput scenarios.
|
Parameter |
Description |
YAML example |
|
|
Enables backend persistent connections to reduce TCP connection overhead. |
|
IPv6 backend attachment for server groups
IPv6 backend attachment allows both IPv4 and IPv6 Pods in a server group, but requires a dual-stack cluster. See Create an ACK managed cluster.
The following limitations apply when IPv6 backend attachment is enabled:
-
To enable IPv6 backend attachment for a server group, IPv6 must be enabled for the server group's VPC.
-
IPv6 backend attachment is not supported for server groups of type IP or Function Compute when attached using a custom forwarding action.
-
If an Ingress is associated with an IPv4-only ALB instance, you cannot enable IPv6 backend attachment for its server groups.
Configure the Service and ALB Ingress for dual-stack. After you create a dual-stack ALB instance, you can attach both IPv4 and IPv6 backend servers to the server group.
|
Configuration object |
Parameter |
Value |
Description |
YAML example |
|
Service |
|
|
Specifies the available IP address types for the Service. |
|
|
|
|
Sets the IP policy for the Service, enabling dual-stack networking. |
||
|
ALB Ingress |
|
|
Enables IPv6 backend attachment for the server group. |
|
Configure QPS throttling
Add the following annotation to enable QPS throttling for forwarding rules.
|
Annotation |
Description |
YAML example |
|
|
Specifies the QPS limit for forwarding rules. Valid values: 1 to 1,000,000. |
|
Slow start
Slow start gradually ramps up traffic to newly added Pods, preventing overload from sudden traffic surges.
|
Parameter |
Description |
YAML example |
|
|
Specifies whether to enable slow start. Disabled by default.
|
|
|
|
Slow start ramp-up duration in seconds. Valid values: 30–900. Default: 30. |
Connection draining
When a Pod enters the Terminating state, ALB Ingress removes it from the server group but does not immediately close existing connections, which may cause request errors or prevent graceful shutdown. Connection draining keeps existing connections open for a configurable timeout before closing them. See Use connection draining with an ALB Ingress to gracefully shut down a service.
ALB Ingress does not guarantee Pods remain running until connection draining completes. To control Pod availability during termination, configure spec.terminationGracePeriodSeconds or use a preStop Hook.
|
Parameter |
Description |
YAML example |
|
|
Specifies whether to enable connection draining.
|
|
|
|
Specifies the connection draining timeout in seconds. Valid values: [0, 900]. Default: 300. |
Disable cross-AZ load balancing
ALB distributes traffic across availability zones by default. Disabling cross-AZ load balancing restricts traffic to backend services in the same zone.
If you disable cross-AZ load balancing, ensure each availability zone has sufficient backend resources.
Use the following example to disable cross-AZ load balancing:
|
Parameter |
Description |
YAML example |
|
|
Specifies whether to enable cross-AZ load balancing. Enabled by default.
|
|