Service Profiles

Service profiles provide Linkerd additional information about a service. This is a reference for everything that can be done with service profiles.

Spec

A service profile spec must contain the following top level fields:

field value
routes a list of route objects
retryBudget a retry budget object that defines the maximum retry rate to this service

Route

A route object must contain the following fields:

field value
name the name of this route as it will appear in the route label
condition a request match object that defines if a request matches this route
responses (optional) a list of response class objects
isRetryable indicates that requests to this route are always safe to retry and will cause the proxy to retry failed requests on this route whenever possible
timeout the maximum amount of time to wait for a response (including retries) to complete after the request is sent

Request Match

A request match object must contain exactly one of the following fields:

field value
pathRegex a regular expression to match the request path against
method one of GET, POST, PUT, DELETE, OPTION, HEAD, TRACE
all a list of request match objects which must all match
any a list of request match objects, at least one of which must match
not a request match object which must not match

Response Class

A response class object must contain the following fields:

field value
condition a response match object that defines if a response matches this response class
isSuccess a boolean that defines if these responses should be classified as successful

Response Match

A response match object must contain exactly one of the following fields:

field value
status a status range object to match the response status code against
all a list of response match objects which must all match
any a list of response match objects, at least one of which must match
not a response match object which must not match

Status Range

A status range object must contain at least one of the following fields. Specifying only one of min or max matches just that one status code.

field value
min the status code must be greater than or equal to this value
max the status code must be less than or equal to this value

Retry Budget

A retry budget specifies the maximum total number of retries that should be sent to this service as a ratio of the original request volume.

field value
retryRatio the maximum ratio of retries requests to original requests
minRetriesPerSecond allowance of retries per second in addition to those allowed by the retryRatio
ttl indicates for how long requests should be considered for the purposes of calculating the retryRatio