Akash deployment SDL services stanza definitions have been augmented to include “http_options” allowing granular specification of HTTP endpoint parameters. Inclusion of the parameters in this section are optional but will afford detailed definitions of attributes such as body/payload max size where necessary.
The following “http_options” have been introduced in this version. In subsequent sections of this guide the placement of “http_options” within the SDL services stanza will be detailed.\
NOTE - the default HTTP option settings can be found here
- max_body_size - sets the maximum size of an individual HTTP request body
- read_timeout - duration the proxy will wait for a response from the service
- send_timeout - duration the proxy will wait for the service to accept a request
- next_cases - defines the cases where the proxy will try another replica in the service. Reference the upcoming “Next Cases Attribute Usage” section for details pertaining to allowed values.
- next_tries - number of attempts the proxy will attempt another replica
- next_timeout - amount of time the proxy will wait before considering a timeout has occurred
Example HTTP Options Usage
- Depiction displays the placement and structure of the http_options key within the greater services section and within a specific service’s expose key.
- Service section of the greater SDL isolated for focus.
- Depiction displays the placement of http_options within the entire, greater SDL definition
Next Cases Attribute Usage
The “http_options” key of “next_cases” accepts an array of values which may contain one or more of the following values. When included in the “next_cases” array value - the specified HTTP response code/message will provoke an attempt to service the request by one of the other container members/replicas of the deployment. The “next_cases” attempt to service via an additional container will only provoke if the SDL defines a count of greater than one (1). A deployment with a count of one (1) would have no other replicas to facilitate the additional service attempt.
- error”
- “timeout”
- “403”
- “404”
- “429”
- “500”
- “502”
- “503”
- “504”
- “off”
SDL Example Utilized
Full SDL code samples used throughout this guide