All of lore.kernel.org
 help / color / mirror / Atom feed
From: Franchoze Eric <franchoze@yandex.ru>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: wensong@linux-vs.org, lvs-devel@vger.kernel.org,
	netdev@vger.kernel.org, netfilter-devel@vger.kernel.org
Subject: Re: Re: Fwd: LVS on local node
Date: Thu, 22 Jul 2010 22:45:33 +0400	[thread overview]
Message-ID: <125461279824333@web13.yandex.ru> (raw)
In-Reply-To: <1279781811.2405.15.camel@edumazet-laptop>

>  > I will be happy to hear any idea how to do connection in this environment.
>  > 
>  
>  lvs seems not very SMP friendly and a bit complex.
>  
>  I would use an iptables setup and a slighly modified REDIRECT target
>  (and/or a nf_nat_setup_info() change)
>  
>  Say you have 8 daemons listening on different ports (1000 to 1007)
>  
>  iptables -t nat -A PREROUTING -p tcp --dport 1234 -j REDIRECT --rxhash-dist --to-port 1000-1007
>  
>  rxhash would be provided by RPS on recent kernels or locally computed if
>  not already provided by core network (or old kernel)
>  
>  This rule would be triggered only at connection establishment.
>  conntracking take care of following packets and is SMP friendly.
>  

Thanks Eric,  your solution woks (I checked  with  -A PREROUTING  -j DNAT).  But there were 3 reasons why I wanted to do it with LVS:
1. use more smart schedules than simple random (schedule according to number connections or try make equal network load to all ports).
2. keepalive. LVS knows if service is dead or does not respond and skips route connections to it.
3. connection tracking - statistic how many clients on each port and were they were switched.

  parent reply	other threads:[~2010-07-22 18:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-22  3:51 Fwd: LVS on local node Franchoze Eric
2010-07-22  6:56 ` Eric Dumazet
2010-07-22  9:10   ` Changli Gao
2010-07-22  9:46     ` Eric Dumazet
2010-07-22  9:52       ` Changli Gao
2010-07-22  9:59         ` Eric Dumazet
2010-07-22 10:06           ` Changli Gao
2010-07-23 10:54       ` Patrick McHardy
2010-07-22 12:24   ` Simon Horman
2010-07-22 12:59     ` Eric Dumazet
2010-07-22 13:20       ` Simon Horman
2010-07-22 18:45   ` Franchoze Eric [this message]
2010-07-22 13:25 ` Simon Horman
2010-07-22 16:59   ` Franchoze Eric
2010-09-20  5:56     ` Simon Horman

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=125461279824333@web13.yandex.ru \
    --to=franchoze@yandex.ru \
    --cc=eric.dumazet@gmail.com \
    --cc=lvs-devel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@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.