Tyk v2.2 Documentation Components

HomeTyk v2.2 Documentation ComponentsEnforced Timeouts

Enforced Timeouts

Enforced timeouts are a good way to ensure that your service always responds within a given amount of time. Even if a long-running process hangs. This is important in high-availability systems where response performance is crucial so errors can be dealt with cleanly.

Enabling enforced Timeouts in API Definitons

To enable an enforced timeout on a path, you must add to your versions’ extended_paths section:

extended_paths: {
        transform_response_headers: [],
    hard_timeouts: [{
        path: "delay/5",
        method: "GET",
        timeout: 3

Enabling enforced Timeouts in API Designer

To enable an enforced timeout on an endpoint, simply select it from the drop down:

enter image description here

… and enter the timeout in seconds for the endpoint:

enter image description here

Service discovery

If you are using the service discovery option, hard timeouts will force the service discovery module to refresh the host / host list.

Was this article helpful to you? Yes No