Deployment HTTP Options
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.
  • 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

  • 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

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”

Full SDL code samples used throughout this guide
---
version: "2.0"
services:
web:
image: pengbai/docker-supermario
expose:
- port: 8080
as: 80
to:
- global: true
http_options:
max_body_size: 3145728
read_timeout: 50000
send_timeout: 51000
next_cases: ["error", "500"]
next_tries: 2
accept:
- supermariotest.akash.network
profiles:
compute:
web:
resources:
cpu:
units: 0.1
memory:
size: 512Mi
storage:
size: 512Mi
placement:
westcoast:
signedBy:
anyOf:
- "akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63"
pricing:
web:
denom: uakt
amount: 3000
deployment:
web:
westcoast:
profile: web
count: 1
Copy link
On this page
Overview
Example HTTP Options Usage
Next Cases Attribute Usage
SDL Example Utilized