dcloud lb services updateChange a service’s health check or sticky sessions
Only the fields sent change; the rules across fields are checked against the service as it then is. healthCheckTimeout may not exceed healthCheckInterval, an interval under 3 s is refused on lb11/lb21/lb31, and sticky sessions are refused (400) on a tcp service. The change reaches the load balancer within seconds; an https service still waiting for its certificate gets it when the certificate is served.
Synopsis
dcloud lb services update id serviceId [flags]Arguments
<id>Requiredstring
Also accepted as
--id. Constraints: uuid<serviceId>Requiredstring
Also accepted as
--service-id. Constraints: uuid
Flags
--health-check-protocolOptionalenum
http (default): GET the health-check path, 2xx/3xx is healthy. tcp: a connection is enough
One of:
http,tcp--health-check-pathOptionalstring
HTTP path probed for health when healthCheckProtocol is http: starts with /, at most 256 characters (default /)
Constraints: 1-256 chars, /^\//
--health-check-intervalOptionalnumber
Seconds between health checks (default 15): 3–60 on lb11/lb21/lb31 (400 below 3), 1–60 on application and dedicated load balancers
Constraints: integer, 1-60
--health-check-timeoutOptionalnumber
Seconds a health check may take, 1–60 and at most the interval (400 above it; default 10)
Constraints: integer, 1-60
--health-check-retriesOptionalnumber
Failed checks in a row before a target stops taking traffic (0–5, default 3). A dead target keeps traffic for about interval × (retries + 1)
Constraints: integer, 0-5
--sticky-sessionsOptionalboolean (--sticky-sessions / --no-sticky-sessions)
http/https: pin each client to one target with a cookie the load balancer sets (default false; refused with 400 on a tcp service)
--sticky-cookie-nameOptionalstring
Name of the sticky-session cookie (default EWSLB)
Constraints: /^[A-Za-z0-9_-]{1,64}$/
--sticky-cookie-lifetimeOptionalnumber
Seconds the sticky-session cookie lasts (60 s – 7 days, default 300)
Constraints: integer, 60-604800
Example
dcloud lb services update id serviceIdGenerated from the API description, the same one the API checks requests against and the CLI is built from.