mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sangjin Lee" <sjl...@gmail.com>
Subject Re: connect timeout
Date Mon, 11 Feb 2008 00:10:40 GMT
I can see cases where one might need a very short connect timeout.  If your
use case requires a very low fault tolerance and if you would rather fail
calls than waiting for any longer than is necessary, then 1 second might not
be an adequate minimum value.  The characteristic would be a high-load
situation where low latency (i.e. high bandwidth) is normally expected and
For example, if one set of services is making calls to another set of
services within a single network (i.e. intranet) in high volumes, then the
expectation on the latency is usually very low.  Normally calls should
succeed within a very short amount of time.  Suppose the remote services
start having problems and suddenly connects and reads are taking longer.
 Having a short connect timeout and a short read timeout is a good way to
*contain* that risk.  If connect timeout can only be 1 second or longer,
then there would be many situations where the problems from that remote
service will quickly spread over to any calling services and have a
cascading effect...


On Feb 9, 2008 12:39 AM, Alan D. Cabrera <list@toolazydogs.com> wrote:

> On Feb 4, 2008, at 5:29 PM, Sangjin Lee wrote:
> > I had a quick question on the connect timeout...
> > The connect timeout supplied to connectors is in the unit of
> > seconds, and it
> > appears the minimum value you can use is 1 second (
> > AbstractIoConnector.setConnectTimeout() in the case of the trunk).
> > Is this
> > by design?  I can see cases where one needs to have a shorter connect
> > timeout, but it seems it is not possible today.  One solution might
> > be to
> > use ConnectFuture.join() with a timeout, but that works only if you
> > want to
> > block until it times out...
> >
> > It also seems that this minimum timeout value is somewhat tied to the
> > timeout value used in the select() loop in the connector, which is
> > hard
> > coded to be 1 second.  Would it be a good idea to support connect
> > timeout
> > values in milliseconds, and make it shorter than 1 second?
> It doesn't matter to me but I'm just curious.  Why would one want a
> timeout less than a second?
> Regards,
> Alan

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message