lvs on freebsd setup problem,

View: New views
6 Messages — Rating Filter:   Alert me  

lvs on freebsd setup problem,

by wenew zhang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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!
_______________________________________________
freebsd-cluster@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-cluster
To unsubscribe, send any mail to "freebsd-cluster-unsubscribe@..."

Re: lvs on freebsd setup problem,

by Lasse Johnsen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

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

/Lasse


On 14 Jul 2009, at 09:06, wenew zhang wrote:

> 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!
> _______________________________________________
> freebsd-cluster@... mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-cluster
> To unsubscribe, send any mail to "freebsd-cluster-unsubscribe@...
> "

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

Re: lvs on freebsd setup problem,

by Maciej Suszko-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Lasse Johnsen <lasse@...> 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 (203 bytes) Download Attachment

Re: lvs on freebsd setup problem,

by wenew zhang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
_______________________________________________
freebsd-cluster@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-cluster
To unsubscribe, send any mail to "freebsd-cluster-unsubscribe@..."

Re: lvs on freebsd setup problem,

by Oliver Fromme :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

wenew zhang <wenewboy@...> wrote:
 > 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

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
_______________________________________________
freebsd-cluster@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-cluster
To unsubscribe, send any mail to "freebsd-cluster-unsubscribe@..."

Re: lvs on freebsd setup problem,

by wenew zhang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
_______________________________________________
freebsd-cluster@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-cluster
To unsubscribe, send any mail to "freebsd-cluster-unsubscribe@..."