dev@glassfish.java.net

Re: Why Monitoring/Management GrizzlyAdapter deploys on all http-listener (port)?

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Fri, 28 Aug 2009 12:48:25 -0400

Salut,

Prashanth Abbagani wrote:
> Jeanfrancois,
>
> I need to understand this more. The monitoring level for http-service
> (under module-monitoring-levels) is turned off by default. So, there
> shouldn't be any overhead related to monitoring on Grizzly side.

Not Grizzly, v3 in that case.

  Can you
> please give me more details for the following statement.
>
> /"We have observed some performance regressions recently at runtime
> and one reason is the fact that the Monitoring & Management support
> (implemented as GrizzlyAdapter) are *always* registered as startup. "/

When v3 starts, the monitoring/management code register two GrizzlyAdapter:

   * http://is.gd/2E99F

implementation to the grizzly-kernel:

org.glassfish.admin.rest.RestMonitoringAdapter
org.glassfish.admin.rest.RestManagementAdapter

Those Adapter are needed to supports the REST management/monitoring
requests to <host>:<port>/management or /monitoring via http or a
(that's how it works right now).

The issue is those two must not be registered to listen on port 8080,
8181, etc., but only on port 4848:

http://localhost:4848/management (works)
http://localhost:8080/management (must not works)

The issue is if there is more than one GrizzlyAdapter deployed let's say
on port 8080, the request must be mapped against (1) The Container and
(2) Web Application. If the is a single grizzlyAdapter we don't have to
execute (1). So to keep the mapping operations as minimal as possible,
we try to only have a single GrizzlyAdapter on port 8080,8181, etc by
default --> it's the CoyoteAdapter, for servicing Servlet/JSP.

Another example is JRubyAdapter in the GF gems...it will also suffer the
same issue as there is two extra GrizzlyAdapter now, hence operations
(1) happens on all requests.

So it's simple to fix on the monitoring/management code by registering
only to the admin port.

Hope that help.

-- Jeanfrancois

>
>
> thanks
> Prashanth
>
> Jeanfrancois Arcand wrote:
>> Hi,
>>
>> we recently observed a performance regression when
>> monitoring/management got enabled:
>>
>> * https://glassfish.dev.java.net/issues/show_bug.cgi?id=9286
>>
>> The problem is the GrizzlyAdapter used for implementing the features
>> are registered on port 8080, 8181, etc. Should they be only registered
>> on port 4848 like all the GrizzlyAdapter used by to support admin? Why
>> do they need to be available on all port?
>>
>> Thanks
>>
>> -- Jeanfrancois
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>