Getting started Community Training Tutorials Documentation APIs, AI & Tools
OpenShift route
Omni Gateway offers these timeouts to improve service quality and reduce computing resource waste:
Stream Idle Timeout
The Stream Idle Timeout enables you to set a maximum amount of a time a stream can remain idle without receiving any data in either the inbound (client to Omni Gateway) or outbound (Omni Gateway to upstream service) direction.
By default, all Omni Gateway API instances have a stream timeout of 300 seconds.
Upstream Idle Timeout
The Upstream Idle Timeout enables you to set a maximum amount of time a stream between Omni Gateway and the upstream service can remain idle between requests.
By default, all Omni Gateway API instances have an upstream idle timeout of 60 seconds.
Response Timeout
The Response Timeout enables you to set a maximum amount of a time Omni Gateway waits for a response from an upstream service. The timeout time starts at the last request sent by Omni Gateway.
By default, all Omni Gateway API instances have a response timeout of 15 seconds.
You can configure these timeouts for Managed Omni Gateway via:
Managed Omni Gateway deployment: Set initial timeout values when you create the gateway.
Runtime Manager runtime configurations: Applies to all API instances in the gateway after the gateway is deployed.
Policy: Applies to one API instance or upstream and provides granular control.
When you configure a setting in more than one place, Omni Gateway uses the first value that is set, in this order of precedence:
Policy: A policy applied to the API instance.
Runtime Manager runtime configuration: Used if no policy value is set.
Built-in default: Used if neither of the other values is set. A policy value overrides the gateway-level value for the API instance it’s applied to. API instances without the policy use the gateway-level value.
Set timeout values in the deployment flow when you create a Managed Omni Gateway. For the UI steps and parameter descriptions, see Deploy a Managed Omni Gateway.
In Anypoint Platform, select Runtime Manager.
Select Omni Gateways.
Select your Omni Gateway.
Open Runtime Configurations.
Open Timeouts.
Set values for Stream Idle Timeout, Upstream Connection Idle Timeout, and Upstream Response Timeout.
Apply the changes.
On Runtime Fabric on Red Hat OpenShift, the OpenShift route in front of Managed Omni Gateway has its own timeout. Requests can time out at either layer.
| Layer | Timeout | Default | Where to Configure | Result When Exceeded |
|---|---|---|---|---|
OpenShift route |
Route timeout |
30 seconds |
|
|
Managed Omni Gateway |
Response timeout |
15 seconds |
|
|
Managed Omni Gateway |
Upstream idle timeout |
60 seconds |
Connection reset |
|
Managed Omni Gateway |
Stream idle timeout |
300 seconds |
Connection reset |
If you increase the response timeout above the route timeout, the route returns 504 Gateway Timeout before Managed Omni Gateway receives the upstream response. Set the route timeout higher than the longest Managed Omni Gateway timeout that applies to requests through the route.
On Runtime Fabric, the agent creates the route from a route template. Add the haproxy.router.openshift.io/timeout annotation to the template, not to the route. See Configuring Red Hat OpenShift Routes in Runtime Fabric.