tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: how to make http port to open after application startup
Date Thu, 06 Dec 2012 21:10:29 GMT
2012/12/6 Vladimir Girnet <vgirnetz@yahoo.com>:
> I'm using Tomcat 6.0 (6.035 for now).
>
> I've got an issue with balancing multiple connections from httpd to tomcat.
> It looks like tomcat is opening http port (8080) right after startup, and is accepting
connections on it.
> At the same time, application itself is starting for about 1-2 minutes, depending on
server speed.
>
> Because connections are accepted to http port, httpd is not removing starting tomcat
from balancer members.
> As result, a lot of connections are directed to currently starting tomcat, but no connections
are served during application startup.
>
> I have multiple tomcat servers behind http. If I want to restart one of these servers,
httpd will still pass requests to it, making users to wait long time before response is received.
>
> Is it possible to configure tomcat to open http port only after application is fully
started?
>
> I found that AJP port is started only after application startup, unfortunately system
is fully configured to use http, and migrating to AJP generate too much overhead for us.

1. Is it really better to reject a request?

2.
a) You can configure connector programmatically e.g. via JMX, or by
using Tomcat classes directly.

JMX support is better in Tomcat 7. It may be scarce in Tomcat 6.

b) You can configure a rule in a firewall and manage it programmatically,

c) You can manage your load balancer programmatically.

http://httpd.apache.org/docs/2.4/mod/mod_proxy_balancer.html#balancer_manager

> I found that AJP port is started only after application startup

3. Is it really true? It might be there, but it is the first time I
hear about such feature.

AJP protocol supports ping/pong requests, so it can check
responsiveness of the server before sending the actual request.


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message