Change a health check or sticky sessions

Change how a service checks its targets, or pin each client to one target with a cookie.

Last updated 18 November 2026View as Markdown

Only the health check and sticky sessions of a service can change. Protocol, ports and certificate cannot: remove the service and add it again.

Prerequisites

  • Permission for lb:UpdateService.

Change the settings

Only the fields you send change; the rules across fields are checked against the service as it then is.

Not available in Console. The console cannot change a service; use the CLI, API or Terraform.

Field Values Default
healthCheckProtocol http or tcp http
healthCheckPath starts with /, at most 256 characters /
healthCheckInterval 1–60 s; at least 3 on lb11–lb31 15
healthCheckTimeout 1–60 s, at most the interval 10
healthCheckRetries 0–5 3
stickySessions true or false; http and https only false
stickyCookieName letters, digits, - and _, at most 64 EWSLB
stickyCookieLifetime 60–604800 seconds 300

With sticky sessions, the load balancer sets the cookie on a client's first response and sends the client's later requests carrying it to the same target.

Result

200 with the service as now set. On application and dedicated the fleet picks up the change within seconds. On lb11–lb31 it is sent to the provider in the background, and a refusal there is recorded as an event on the load balancer; an https service still waiting for its certificate gets the settings when the certificate is served.

When it is refused

  • 400 Nothing to change: send at least one field.
  • 400 healthCheckInterval must be at least 3s on … for an interval under 3 seconds on lb11–lb31.
  • 400 healthCheckTimeout (…s) must not exceed healthCheckInterval (…s).
  • 400 Sticky sessions work on http and https services only: a tcp service cannot set a cookie.
  • 404 Service not found.
  • 409 for a load balancer another service owns.
Did this page help you?