From: Andy Gospodarek <andy@greyhouse.net>
To: Horms <horms@verge.net.au>
Cc: Andy Gospodarek <andy@greyhouse.net>,
netdev@vger.kernel.org, wensong@linux-vs.org, ja@ssi.bg
Subject: Re: [rfc][patch] ipvs: use proper timeout instead of fixed value
Date: Thu, 4 May 2006 22:51:11 -0400 [thread overview]
Message-ID: <20060505025111.GA29142@gospo.rdu.redhat.com> (raw)
In-Reply-To: <20060505004754.GA6943@verge.net.au>
On Fri, May 05, 2006 at 09:47:56AM +0900, Horms wrote:
> On Thu, May 04, 2006 at 04:11:16PM -0400, Andy Gospodarek wrote:
> >
> > Instead of using the default timeout of 3 minutes, this uses the timeout
> > specific to the protocol used for the connection. The 3 minute timeout
> > seems somewhat arbitrary (though I know it is used other places in the
> > ipvs code) and when failing over it would be much nicer to use one of
> > the configured timeout values.
>
> Hi Andy,
>
> I agree that the current value is somewhat arbitary,
> however I'm more in favour of setting it idependantly
> of other timeouts, perhaps via proc. In any case,
> won't pp->timeout_table[cp->state] be rather long in
> the ESTABLISHED case?
>
Horms,
I agree that there could be a long timeout for ESTABLISHED connections,
but I've run across a situation where I need exactly that. When testing
failover from master to backup I realize that all of my interactive
sessions get dropped much sooner than the timeout I've configured (mine
is currently set for much longer than 3 minutes). If I wanted
established connections to timeout quickly I would set the timeout to be
a small value.
-andy
> > Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
> > ---
> >
> > ip_vs_sync.c | 5 +++--
> > 1 files changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/ipv4/ipvs/ip_vs_sync.c b/net/ipv4/ipvs/ip_vs_sync.c
> > --- a/net/ipv4/ipvs/ip_vs_sync.c
> > +++ b/net/ipv4/ipvs/ip_vs_sync.c
> > @@ -67,7 +67,6 @@ struct ip_vs_sync_conn_options {
> > struct ip_vs_seq out_seq; /* outgoing seq. struct */
> > };
> >
> > -#define IP_VS_SYNC_CONN_TIMEOUT (3*60*HZ)
> > #define SIMPLE_CONN_SIZE (sizeof(struct ip_vs_sync_conn))
> > #define FULL_CONN_SIZE \
> > (sizeof(struct ip_vs_sync_conn) + sizeof(struct ip_vs_sync_conn_options))
> > @@ -279,6 +278,7 @@ static void ip_vs_process_message(const
> > struct ip_vs_sync_conn *s;
> > struct ip_vs_sync_conn_options *opt;
> > struct ip_vs_conn *cp;
> > + struct ip_vs_protocol *pp;
> > char *p;
> > int i;
> >
> > @@ -337,7 +337,8 @@ static void ip_vs_process_message(const
> > p += SIMPLE_CONN_SIZE;
> >
> > atomic_set(&cp->in_pkts, sysctl_ip_vs_sync_threshold[0]);
> > - cp->timeout = IP_VS_SYNC_CONN_TIMEOUT;
> > + pp = ip_vs_proto_get(s->protocol);
> > + cp->timeout = pp->timeout_table[cp->state];
> > ip_vs_conn_put(cp);
> >
> > if (p > buffer+buflen) {
>
> --
> Horms http://www.vergenet.net/~horms/
>
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2006-05-05 2:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-04 20:11 [rfc][patch] ipvs: use proper timeout instead of fixed value Andy Gospodarek
2006-05-05 0:47 ` Horms
2006-05-05 2:51 ` Andy Gospodarek [this message]
2006-05-05 3:20 ` Horms
2006-05-05 18:57 ` Andy Gospodarek
2006-05-07 4:38 ` Horms
2006-05-08 3:13 ` Andy Gospodarek
2006-05-08 8:56 ` Horms
2006-05-07 15:32 ` Wensong Zhang
2006-05-08 3:27 ` Andy Gospodarek
2006-05-08 16:39 ` Wensong Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060505025111.GA29142@gospo.rdu.redhat.com \
--to=andy@greyhouse.net \
--cc=horms@verge.net.au \
--cc=ja@ssi.bg \
--cc=netdev@vger.kernel.org \
--cc=wensong@linux-vs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.