From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Bernhard Bock <mailinglists@bock.nu>
Cc: netfilter@vger.kernel.org
Subject: Re: conntrackd failover works partially, was Re: conntrack performance test results in INVALID packets
Date: Fri, 08 Aug 2008 10:47:49 +0200 [thread overview]
Message-ID: <489C0835.3090900@netfilter.org> (raw)
In-Reply-To: <4880A6BA.6030007@bock.nu>
Hi Bernhard,
Bernhard Bock wrote:
> My next step is to run two firewalls in a cluster with conntrackd.
>
> The basic setup works like a charm. I have increased the HashSize
> parameter in conntrackd as well. It replicates the states to the backup
> firewall just fine.
>
> Unfortunately, failover works only in about 50% of all tests. There is
> no obvious pattern as to when this failures occur.
>
> We trigger the failover softly by advertising a higher priority on the
> backup firewall, not by switching off the primary one. If it goes well,
> we do not loose a single connection. If it doesn't go well, we basically
> loose all connections and the apachebench dies. There are hundreds of
> INVALID packets in the syslog, and also some NEW (not SYN). In this
> case, we also see lost packets in "multicast sequence tracking" in the
> conntrackd stats.
I think that I have reproduced your problem in my testbed. Say you have
two nodes: A and B. Initially, A is primary and B is backup.
1) you generate tons of http traffic: A succesfully replicates states to B.
2) you trigger the fail-over: B becomes primary and A becomes backup. B
successfully recovers the connections. Moreover, if you do `conntrack -L
-p tcp' in A, you see lots of entries.
3) Just a bit later - 30 seconds later or so - you trigger the fail-over
again from B to A. In this case, A fails to recover the entries showing
tons of INVALID messages.
The problem are the entries that are stuck in A (see step 2). Those
former entries clashes with newly committed entries and the TCP state
tracking code gets confused with old state information.
This problem is fixed in the git repository. Now, we purge the entries
in A once this node becomes backup after 15 seconds - this parameter is
tunable via PurgeTimeout. Thus, the old entries does not clash with the
brand new.
Moreover, I have completely reworked the fail-over script, you can find
it under doc/ in the conntrack-tools git tree [1]. You may give it a
try. I expect to release a new version of the conntrack-tools with these
updates soon. New (more complete) documentation is also on the way.
Please, let me know how it goes.
[1] http://git.netfilter.org
--
"Los honestos son inadaptados sociales" -- Les Luthiers
next prev parent reply other threads:[~2008-08-08 8:47 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 9:39 conntrack performance test results in INVALID packets Bernhard Bock
2008-07-18 10:13 ` Jan Engelhardt
2008-07-18 10:52 ` Bernhard Bock
2008-07-18 12:14 ` Pablo Neira Ayuso
2008-07-18 14:20 ` conntrackd failover works partially, was " Bernhard Bock
2008-07-21 0:37 ` Pablo Neira Ayuso
2008-07-21 14:22 ` conntrackd failover works partially Bernhard Bock
2008-07-23 8:51 ` Bernhard Bock
2008-07-23 12:50 ` Pablo Neira Ayuso
2008-07-23 15:20 ` Bernhard Bock
2008-08-08 8:47 ` Pablo Neira Ayuso [this message]
2008-08-08 12:58 ` conntrackd failover works partially, was Re: conntrack performance test results in INVALID packets Bernhard Bock
2008-09-02 9:39 ` Bernhard Bock
2008-09-02 9:56 ` Pablo Neira Ayuso
2008-09-02 12:34 ` Bernhard Bock
2008-09-02 12:48 ` Pablo Neira Ayuso
2008-09-02 15:18 ` Bernhard Bock
2008-09-02 16:22 ` Pablo Neira Ayuso
2008-09-02 16:55 ` Bernhard Bock
2008-09-03 9:13 ` Pablo Neira Ayuso
2008-09-03 11:26 ` Bernhard Bock
2008-09-04 12:29 ` Pablo Neira Ayuso
2008-09-04 13:27 ` Bernhard Bock
2008-09-05 10:55 ` Pablo Neira Ayuso
2008-09-04 11:40 ` Pablo Neira Ayuso
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=489C0835.3090900@netfilter.org \
--to=pablo@netfilter.org \
--cc=mailinglists@bock.nu \
--cc=netfilter@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox