Morning, Comments below...
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 10, 2001 11:20 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: acive session count?
>
>
> Hi,
>
> > Solution: Dan Milstein is adding my patch to mod_jk. It
> forces an instance
> > of Tomcat in the load balance list to reject new
> connections, but continue
> > to service existing sessions. (by setting worker.name.active=0, and
> > restarting my apaches)
>
> Question: can this be done _without_ restarting apache ?
>
Not without having some platform/product specific code...
As you suggest below, I would have to add function to Apache only, and I would really like this to work for all web servers. Granted, it would be good to be able to change a containers status without a restart, but I didn't/don't consider restarting the web server to be bad. (In our case, we do it as required with a 'killall -USR1 httpd' for a graceful restart), but we do have 6 Apaches LVS'd...)
> I was thinking about the whole
> "configuration/reconfiguration/signales" mechanism,
> and IMHO there is a simpler solution: instead of using
> signals and AJP13
> extensions, it may be better to just use plain HTTP and normal
> servlets/apache handlers.
The extensions I made to AJP12 were to _query_ the TC instance for an acive session count (from the command line).
>
> Creating a simple /jk_admin is not difficult ( a simple
> handler that will
> accept an authenticated HTTP request and alter the
> configuration ). That
> will allow run-time addition of apps and workers without restarting
> apache.
>
> For tomcat side, few extra servlets on the admin app will be
> much easier
> and safer to develop than changing the protocols or other
> internals ( and
> will probably be more re-usable ).
I have to agree that the changes I've made to the protocol are quite intrusive.
Again, I'm looking for a simple way to get the active session count from a specific TC instance.
I agree that a jk_admin type application to control the load balancer and get session info would be great and very usefull, but that would have to access information from the web server (who's in the list, who's active) and each TC (how many sessions). So even if I built an Apache admin app, I would still have to add methods to Tomcat to return active session counts. (Although I would not have to modify AJP12...)
As another solution, I could leave 8080 running on each TC and have a servlet that accesses the Response to get the session count (with the getSessionCount() methods I've added) (ie the /admin app as you suggested before with minor modifications). Although, I'm not too fond of this solution because I'd have to keep the 8080 TCP listener, (in order to access a specific TC) and have a login for each query...
But for simplicity's sake, it may be the way to go.
Whatever the front end is, I'll still need to add getSessionCount() methods to the ContextManager, StandardManager, and StandardSessionManager. (yes?)
Sorry for the long rant, but I think I'm working on some good functionality that others could use as well, and I want to get it right.
Thanks,
mk