Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Bernhard Bock <mailinglists@bock.nu>
To: netfilter@vger.kernel.org
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Subject: conntrackd failover works partially, was Re: conntrack performance test results in INVALID packets
Date: Fri, 18 Jul 2008 16:20:42 +0200	[thread overview]
Message-ID: <4880A6BA.6030007@bock.nu> (raw)
In-Reply-To: <4880891C.4090004@netfilter.org>

Hi Pablo,

Pablo Neira Ayuso wrote:
> This document is a nice kick off:
> 
> http://www.wallfire.org/misc/netfilter_conntrack_perf.txt

Alright, I increased the nf_conntrack_buckets to 256k and it seems to 
have solved this problem. Thanks so far!

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.

One more detail worth mentioning is that we in any case see many 
"connections destroyed failed" in conntrackd statistics, but it does not 
have any visible impact.

We use conntrackd version 0.9.6 included with Fedora 9 in Alarm mode. 
Below I have attached the relevant config files snippets.

Can you (again) give any helpful pointers where I can search?

best regards
Bernhard

------------------------------conntrackd.conf---------------------------------

Sync {
         Mode Alarm {
                 RefreshTime 15
                 CacheTimeout 180
                 CommitTimeout 180
         }
         Multicast {
                 IPv4_address 225.0.0.50
                 Interface bond2
                 Group 3780
         }
         Checksum on
         CacheWriteThrough On
}
General {
         HashSize 262144
         HashLimit 2097152
         LogFile /var/log/conntrackd.log
         Syslog on
         LockFile /var/lock/conntrack.lock
         UNIX {
                 Path /tmp/sync.sock
                 Backlog 20
         }
         SocketBufferSize 268435456
         SocketBufferSizeMaxGrown 1073741824
}


------------------------------keepalived.conf---------------------------------
notify_master /etc/keepalived/script_master.sh
notify_backup /etc/keepalived/script_backup.sh

vrrp_instance VI_1 {
     interface bond1
     state BACKUP
     garp_master_delay 0
     virtual_router_id 20
     priority 104
     advert_int 1
     preempt_delay 30
}

------------------------------script_master.sh---------------------------------
#!/bin/sh
/usr/bin/logger "getting master"
/usr/sbin/conntrackd -c
/usr/sbin/conntrackd -R
/usr/bin/logger "got master"

------------------------------script_backup.sh---------------------------------
#!/bin/sh
/usr/bin/logger "getting backup"
/usr/sbin/conntrackd -B
/usr/bin/logger "got backup"

  reply	other threads:[~2008-07-18 14:20 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       ` Bernhard Bock [this message]
2008-07-21  0:37         ` conntrackd failover works partially, was " 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         ` conntrackd failover works partially, was Re: conntrack performance test results in INVALID packets Pablo Neira Ayuso
2008-08-08 12:58           ` 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=4880A6BA.6030007@bock.nu \
    --to=mailinglists@bock.nu \
    --cc=netfilter@vger.kernel.org \
    --cc=pablo@netfilter.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