Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

lvs on freebsd setup problem,

0 views
Skip to first unread message

wenew zhang

unread,
Jul 14, 2009, 4:06:49 AM7/14/09
to freebsd...@freebsd.org
i have three freebsd 7.0 server,every server have 10M bandwidth,first i use
nginx proxy,all the data through the nginx proxy,
so,np is the bottleneck,
i don't need master-slave host redundancy,so don't need carp,that's right?
i try install ipvs as follow steps:

1install freebsd source ,base and sys,
2.cd /usr/ports/net/ipvs make patch-system (i suppose that will patch the
kernel,right?)
3.make depend
make
make install
reboot

4./usr/ports/net/ipvs make
锟斤拷===> Building for ipvs-0.4.0_2
===> ipvs
Warning: Object directory not changed from original
/usr/ports/net/ipvs/work/ipvs-0.4.0_2/ipvs
cc -O2 -fno-strict-aliasing -pipe -D_KERNEL -DKLD_MODULE -std=c99
-nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000 --param
inline-unit-growth=100 --param large-function-growth=1000 -fno-common
-mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow
-mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Wall -Wredundant-decls
-Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
-Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c
ip_vs_core.c
In file included from ip_vs.h:246,
from ip_vs_core.c:33:
@/sys/socketvar.h:391: error: field 'cv' has incomplete type
@/sys/socketvar.h:406: error: redefinition of 'struct nf_sockopt_ops'
@/sys/socketvar.h:422: error: field 'cv' has incomplete type
@/sys/socketvar.h:426: warning: redundant redeclaration of
'nf_register_sockopt'
@/sys/socketvar.h:395: warning: previous declaration of
'nf_register_sockopt' was here
@/sys/socketvar.h:427: warning: redundant redeclaration of
'nf_unregister_sockopt'
@/sys/socketvar.h:396: warning: previous declaration of
'nf_unregister_sockopt' was here
@/sys/socketvar.h:428: warning: redundant redeclaration of 'nf_sockopt_init'
@/sys/socketvar.h:397: warning: previous declaration of 'nf_sockopt_init'
was here
what' wrong with it?


any reply is very appreciated!

Lasse Johnsen

unread,
Jul 14, 2009, 4:42:39 AM7/14/09
to wenew zhang, freebsd...@freebsd.org
Hi,

As far as I know, LVS support on FreeBSD has not been available since
FreeBSD 5.4. It's no longer maintained.

/Lasse

> _______________________________________________
> freebsd...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-cluster
> To unsubscribe, send any mail to "freebsd-clust...@freebsd.org
> "

Maciej Suszko

unread,
Jul 14, 2009, 11:03:09 AM7/14/09
to Lasse Johnsen, freebsd...@freebsd.org
Lasse Johnsen <la...@freebsdcluster.org> wrote:
> Hi,
>
> As far as I know, LVS support on FreeBSD has not been available
> since FreeBSD 5.4. It's no longer maintained.

Patchset can be addapted to 7.2-RELEASE - I've done it but never used.
You can try net/haproxy instead - it should suit your needs. BTW anyone
using haproxy here? Any pros and cons?
--
regards, Maciej Suszko.

signature.asc

wenew zhang

unread,
Jul 14, 2009, 10:11:18 PM7/14/09
to Maciej Suszko, freebsd...@freebsd.org
thanks Maciej,
i tring haproxy,in below situation,LB forward http header to A,B,C,C,
but how about the Web Server response the client's,
the response data still through then LB1?that the point,
LB1 only have 10M bandwidth as Web Servers,
in my situation,clients need download big-flash file about 5M,
i need web server response the client directly,
sorry to say it again,
i need confidence!


192.168.1.1 192.168.1.11-192.168.1.14 192.168.1.2
-------+-----------+-----+-----+-----+--------+----
| | | | | _|_db
+--+--+ +-+-+ +-+-+ +-+-+ +-+-+ (___)
| LB1 | | A | | B | | C | | D | (___)
+-----+ +---+ +---+ +---+ +---+ (___)
haproxy 4 cheap web servers


Best Regards,Wenew

Oliver Fromme

unread,
Jul 15, 2009, 3:31:53 AM7/15/09
to freebsd...@freebsd.org, wene...@gmail.com

Just a question: Did you consider DNS-based round-robin?
It's a very simple solution if you just need LB (not HA),
and the traffic doesn't have to go through a single proxy
so there is no bottle-neck problem.

The downside is, of course, that you need multiple external
IP addresses.

If you have only one IP address, a "poor man's round-robin"
solution would be to balance the traffic by port numbers:
The internal web servers are assigned port numbers from 81
to 84. On port 80 there is only a simple script that
returns redirects to ports 81 to 84 in random order.
The downside is that the port number appears in the URL
line of the client browser, which is ugly. (Putting a
proper <BASE> tag in the header of all of your HTML pages
mitigates the problem a little bit, though.)

A "clean" solution will involve some kind of transparent
proxy or gateway that handles the incoming packets and
forwards them to a random web server (but it must be the
same web server for all packets belonging to the same TCP
connection), then have the web server send the reply
directly to the client.

I think you might be able to do this with a bunch of IPFW
"fwd" rules. The LB machine will have "fwd" rules with
the "prob" tag to forward incoming packets to a random web
server. Using the "keep-state" tag will make sure that
packets belonging to the same TCP connection will go to
the same web server. The web servers should send the
reply packets directly to your outgoing router. You have
to be careful with NAT. I haven't tried to do this myself,
but it should be possible to make it work.

All of the above can be done without third-party software.

Best regards
Oliver

--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Gesch�ftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M�n-
chen, HRB 125758, Gesch�ftsf�hrer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd

"The last good thing written in C was
Franz Schubert's Symphony number 9."
-- Erwin Dieterich

wenew zhang

unread,
Jul 15, 2009, 4:42:17 AM7/15/09
to freebsd...@freebsd.org, wene...@gmail.com
Thanks,Oliver,
the user driver me crazy and the game driver the user crazy,
i never so dispointed with freebsd before this time,
i'm not familiar to IPFW,
i think i need LVS/TUN but not sure about ip-tune between rhel and freebsd,i
should try,
the isp setup rhel now,
thanks all

Best Regards
Wenew

0 new messages