You have a broken :) service which you would like to load balance with
persistence.
If it wasn't broken, what would it do?
I don't know how I shall answer this question. I hope his service is not broken.
But how do you understand his problem? It should be solved by setting up port 0
service, right?
Sometimes things have to be done in a more complex way. The only thing that they
shouldn't do is migrate sessions within the real server pool for CPU load
sharing, as is not uncommon for servlet technology. If they do this, they need
to have a common pool for allocated resources (and thus have the process
migration overhead) which then again defeats the purpose of inter-node CPU load
balancing at first hand. But we do not know what exactly he's trying to come up
with.
Another possibility would be to set up persistent fwmark pools consisting of a
mark for incoming to service:80 and the same mark for incoming to
service:defined_portrange. With the System.Properties in JDK you can set the
port range which will be allocated and thus you can pretty much restrict the
service fwmark pool. You then of course load balance the fwmark pool. I only
told him to use port 0 because he doesn't know the application so with higher
possibility he wouldn't know the dynamically opened ports of this application
either and therefor would not be able to restrict it accordingly.
Then again he could do something like:
iptables -t mangle -A PREROUTING -j MARK --set-mark 1 -p tcp -d ${VIP}/32
--dport 80
iptables -t mangle -A PREROUTING -j MARK --set-mark 1 -p tcp -d ${VIP}/32
--dport 1023:61000
ipvsadm -A -f 1 -s wlc -p 300 -M 255.255.255.255
ipvsadm -a -f 1 -r ${RIP1} -g -w 1
ipvsadm -a -f 1 -r ${RIP2} -g -w 1
[...]
:)
Regards,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc
|