connect.timeout and io.timeout -query

mytre4411
Participant IV

As io.timeout is the timeout set to receive response from backend ,and connect.timeout is the timeout set to establish connection with backend,I believe connect.timeout should be very much lesser than io.timeout.

As per my understanding,io.timeout can be little higher than the maximum response SLA of backend.If backend max response SLA is 1 minute,we can set io.timeout as 65s ,while connect.timeout can be set as 5000ms.

But I am not sure why they both are given same values in apigee docs posted in http://studylib.net/doc/7018421/api-proxy-documentation link.

<HTTPTargetConnection>
<Properties>
<Property name="connect.timeout.millis">30000</Property>
<Property name="io.time
out.millis">30000</Property>
</Properties>
<URL>http://www.apigee.com</URL>
</HTTPTargetConnection>

I would like to understand the reason behind applying same timeout milliseconds for both connect.timeout and io.timeout.Please help me understand this and how we should usually set.

0 4 3,973
4 REPLIES 4

Not applicable

They are just sample values. In general, io.timeout should be higher than the connect.timeout

Thanks @Sathish Balasubramaniyan .This helps..

aswinsegu
Participant IV

Hi @Subbu R,

Please find the following differences

Property NameDefault ValueDescription
connect.timeout.millis3000Target connection timeout. Edge returns an HTTP 503 status code if a connection timeout occurs.
io.timeout.millis120000If there is no data to read for the specified number of milliseconds, or if the socket is not ready to write data for specified number of milliseconds, then the transaction is treated as a timeout.
  • If a timeout happens while reading HTTP request, 408,RequestTimeout is returned.
  • If a timeout happens while reading HTTP response, 504,GatewayTimeoutis returned.

Refer to Endpoint Properties Reference

@Subbu R, @Sathish Balasubramaniyan @Aswin Segu

Is their any way to dynamically set these properties per environment using KVM : will that work ?

<Property name="connect.timeout.millis">3000</Property>

<Property name="io.timeout.millis">3000</Property>