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.

Overview

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

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
1
---
2
version: "2.0"
3
services:
4
web:
5
image: pengbai/docker-supermario
6
expose:
7
- port: 8080
8
as: 80
9
to:
10
- global: true
11
http_options:
12
max_body_size: 3145728
13
read_timeout: 50000
14
send_timeout: 51000
15
next_cases: ["error", "500"]
16
next_tries: 2
17
accept:
18
- supermariotest.akash.network
19
profiles:
20
compute:
21
web:
22
resources:
23
cpu:
24
units: 0.1
25
memory:
26
size: 512Mi
27
storage:
28
size: 512Mi
29
placement:
30
westcoast:
31
signedBy:
32
anyOf:
33
- "akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63"
34
pricing:
35
web:
36
denom: uakt
37
amount: 3000
38
deployment:
39
web:
40
westcoast:
41
profile: web
42
count: 1
Copied!