Hello,
On Fri, 18 Feb 2000, Jean-Francois Nadeau wrote:
> On Fri, 18 Feb 2000, Julian Anastasov wrote:
> > Hello,
>
> > You are probably using VS/DR or VS/TUN in your test.
>
> I'm using DR on the cluster with 2 real servers. I'm trying to control the
> number of connections to acheive this :
>
> The cluster in normal mode balances requests on the 2 real servers.
> If the real servers reaches a point where they can't serve clients fast
> enough, a new entry with a weight of 10000 is entered in LVS to send the
> overflow locally on a web server with a static web page saying "we're too
> busy".
> It's a cgi that intercept 'deep links' in our site and return a predefined
> page.
> A 600 seconds persistency ensure that already connected clients stays on the
> server they began to browse. The client only have to hit refresh until the
> number of AciveConns (I hoped) on the real servers gets lower and the overflow
> entry gets deleted.
>
> Got the idea... Load balancing with overflow control.
Good idea. But the LVS can't help you. When the clients are
redirected to the Director they stay there for 600 seconds.
>
> But when we activate the local redirection of requests due to overflow,
> ActiveConn continues to grow in LVS, while Inactconn decreases as expected.
> So the load on the real server gets OK... but LVS doesnt sees it and doesnt
> let
> new clients in. (it takes 12 minutes before ActiveConns decreases enough to
> reopen the site)
This is due to the very big weight for the Director compared
to the real servers.
>
> I need a way, a value to check at that says the server is
> overloaded, begin redirecing locally and the opposite.
>
> I know that seems a little complicated....
Yep.
>
> Help and ideas are welcome
What about trying to:
- use persistent timeout 1 second for the virtual service.
If you have one entry for this client you have all entries
from this client to the same real server. I didn't tested it but
may be a client will load the whole web page. If the server is
overloaded the next web page will be "we're too busy".
- switch the weight for the Director between 0 and 10000. Don't
delete the Director as real server.
Weight 0 means "No new connections to the server". You
have to play with the weight for the Director, for example:
- if your real servers are loaded near 99% set the weight to 10000
- if you real servers are loaded before 95% set the weight to 0
You can check the free ram or the cpu idle time for the
real servers. By this way you can correctly set the weights for
the real servers and to switch the weight for the Director.
These recommendations can be completely wrong. I've never
tested them. If they can't help try to set httpd.conf:MaxClients
to some reasonable value. Why not to put the Director as real
server permanently. With 3 real servers is better.
Regards
--
Julian Anastasov <uli@xxxxxxxxxxxxxxxxxxxxxx>
|