ray.serve.schema.HTTPOptionsSchema#

pydantic model ray.serve.schema.HTTPOptionsSchema[source]#

Options to start the HTTP Proxy with.

NOTE: This config allows extra parameters to make it forward-compatible (ie

older versions of Serve are able to accept configs from a newer versions, simply ignoring new parameters).

Show JSON schema
{
   "title": "HTTPOptionsSchema",
   "description": "Options to start the HTTP Proxy with.\n\nNOTE: This config allows extra parameters to make it forward-compatible (ie\n      older versions of Serve are able to accept configs from a newer versions,\n      simply ignoring new parameters).",
   "type": "object",
   "properties": {
      "host": {
         "title": "Host",
         "description": "Host for HTTP servers to listen on. Defaults to \"0.0.0.0\", which exposes Serve publicly. Cannot be updated once Serve has started running. Serve must be shut down and restarted with the new host instead.",
         "default": "0.0.0.0",
         "type": "string"
      },
      "port": {
         "title": "Port",
         "description": "Port for HTTP server. Defaults to 8000. Cannot be updated once Serve has started running. Serve must be shut down and restarted with the new port instead.",
         "default": 8000,
         "type": "integer"
      },
      "root_path": {
         "title": "Root Path",
         "description": "Root path to mount the serve application (for example, \"/serve\"). All deployment routes will be prefixed with this path. Defaults to \"\".",
         "default": "",
         "type": "string"
      },
      "request_timeout_s": {
         "title": "Request Timeout S",
         "description": "The timeout for HTTP requests. Defaults to no timeout.",
         "type": "number"
      },
      "keep_alive_timeout_s": {
         "title": "Keep Alive Timeout S",
         "description": "The HTTP proxy will keep idle connections alive for this duration before closing them when no requests are ongoing. Defaults to 5 seconds.",
         "default": 5,
         "type": "integer"
      }
   }
}

Fields:
field host: str = '0.0.0.0'#

Host for HTTP servers to listen on. Defaults to “0.0.0.0”, which exposes Serve publicly. Cannot be updated once Serve has started running. Serve must be shut down and restarted with the new host instead.

field keep_alive_timeout_s: int = 5#

The HTTP proxy will keep idle connections alive for this duration before closing them when no requests are ongoing. Defaults to 5 seconds.

field port: int = 8000#

Port for HTTP server. Defaults to 8000. Cannot be updated once Serve has started running. Serve must be shut down and restarted with the new port instead.

field request_timeout_s: float = None#

The timeout for HTTP requests. Defaults to no timeout.

field root_path: str = ''#

Root path to mount the serve application (for example, “/serve”). All deployment routes will be prefixed with this path. Defaults to “”.