Hello,
(80 and xxx) I see no way to say
"when user interacts with server, set persistency rule for yyy time that
maps user:80 to node1:80 AND ALSO user:whatever to node1:xxx"
set up a service with port 0.
No, that will not work for me... I think you've misread my question:
Have you tried it?
If I do it your way I'll have "any" port redirected to my realservers.
Yes, but with client->ANY_PORT stickyness regarding destination.
Nothing keeps my client from getting to RS1 with the http request, and then
go to RS2 with the 2nd (not http request)... Or is it me that I'm failing to
understand this?
Probably yes. If you don't believe me I can quote the corresponding ipvsadm man
page paragraph for you:
-t, --tcp-service service-address
Use TCP service. The service-address is of the form
host[:port]. Host may be one of a plain IP address
or a hostname. Port may be either a plain port num-
ber or the service name of port. The Port may be
omitted, in which case zero will be used. A Port
of zero is only valid if the service is persistent
as the -p|--persistent option, in which case it is
a wild-card port, that is connections will be
accepted to any port.
So, again in other words I understood your problem as follows:
You have a broken :) service which you would like to load balance with
persistence.
Normal state of affairs
-----------------------
client A sends http request to VIP:80 and gets to RIP1:80
client A receives some new port information (31337) in the reply
client A sends some request to VIP:31337 and gets to RIP2:31337 where the
service of course will not have opened the port because RIP1 did.
Port 0 state of affairs
-----------------------
client A sends http request to VIP:80 and gets to RIP1:80
client A receives some new port information (31337) in the reply
client A sends some request to VIP:31337 and gets to RIP1:31337 which is very
happily accepting the connection because it told the client A to connect to this
port.
Unless I'm completely off the track (happened before as long-lurking readers of
this list will surely acknowledge) the port 0 should magically solve your problems.
will control the connection from there on (there is a pool of instances
waiting to take over).
What part of J2EE are we talking about? Besides if you have good contact
to some J2EE developer I'd be interested in getting it because the
bloody ServerSocketImpl is broken as hell under Linux. Did they ever
test the stuff with a packet filter?
Well, most of the development is being done in windows, altough it's suposed
to be run over Linux..
Just don't set a DROP policy in the filter table for OUTPUT chain and a DROP for
the loopback device or the application will do strange things :).
And, I must say, the developer I'm working with is not that expert... he's
learning J2EE with this project..
Ok.
As far as I understood, he created a thread running in the servlet container
that listens in a port... but I've not seen the code and don't know the
That doesn't help very much yet. Does the servlet have an asynchronous receive
which then opens a new dynamic port for further communication?
details (for now, at least)... Hey, maybe latest sdk has some bug fixes in
that area?
The latest SDK is rather broken :). Regarding ServerSocketImpl and SMP support
under Linux.
Will lvs route those connections, that it doesnt even know of?
No, not if they don't match the service template criteria. Port 0 will
take care of it.
Yes, but... it'll be "unmatched" with the http requests from the same
client... What I mean is that the connection with a different port will be
tought of a totally unrelated connection..
No, because port 0 is with persistency and if you have persistency you will have
a template which is consisting for example of the client srcIP. Think of it like
a loose connection tracking functionality. As soon as it see this client again
before the template expires it will send him to the same real server, if either
the dest port is the same or if you selected port 0 as service port.
Unless.. hmmm.. does the setup with port 0 makes the same thing as explained
in "persistency granularity" howto section? But with ports instead of
client netmasks?
:) Sort of, yes.
Anyway, every client within a specific IP will be directed to one RS... as
it happen when you have a ISP proxy...
I don't see your analogy here.
Yes, we could probably also develop a helper function but we would need
to know how exactly you're using the API.
I see.. a kernel-level matching mechanism, as there is one for ftp... Well,
I'm not even sure the developer who wrote this protocol can explain it to
the remaining team, so I think I'll need a brute-force approach to the
problem...
Now, please excuse my effrontery and don't take it personally (I'm just very
curious): But wouldn't it be extremely wise to have someone cleanly design your
web application? It looks to me as not a lot of people understand where they are
going. There's a difference between walking a path and knowing the path you're
walking.
Thank you Roberto for your reply and I'm sorry for the delay
Joao Clemente
Inesc-ID - Portugal
You're welcome and I hope I have not insulted you in any way. I also hope the
port 0 will settle your problems and if not I already have another solution how
to solve you problem :)
Best regards,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc
|