1

When I switch to Reactor-Netty 0.9.5.RELEASE (Spring Boot 2.5.RELEASE), connection pool metrics aggregation change.

I use a named connection pool, as for example:

ConnectionProvider.create("a_name", 100);

When I look at metrics, it seems I get a Gauge per opened connection:

reactor_netty_connection_provider_a_name_total_connections{id="211417729",remote_address="remote.host:443",} 1.0
reactor_netty_connection_provider_a_name_total_connections{id="211417729",remote_address="remote.host:443",} 1.0
reactor_netty_connection_provider_a_name_total_connections{id="211417729",remote_address="remote.host:443",} 1.0
reactor_netty_connection_provider_a_name_total_connections{id="211417729",remote_address="remote.host:443",} 1.0
reactor_netty_connection_provider_a_name_total_connections{id="-928004310",remote_address="remote.host:443",} 1.0
reactor_netty_connection_provider_a_name_total_connections{id="1727380098",remote_address="remote.host:443",} 1.0
...

NB: I use Apache ab to perform so light tests with concurrency

That makes the metrics unusable cause I have no mean to know what the actual pool total size is. If I go back to prior versions, using something like:

ConnectionProvider.fixed("a_name", 100);

I always get one Gauge with - I assume - accurate total connections.

To bring the full picture, I'd like to have the ratio between configured max pool size and actual pool size (connections acquired in pool, no matter their state).

Am I misusing or misunderstanding something ?

Thanks in advance.

jflrt
  • 11
  • 2
  • If you think this is a regression, please create an issue with a reproducible example. Thanks – Violeta Georgieva Mar 24 '20 at 19:24
  • Done here: https://github.com/reactor/reactor-netty/issues/1041 – jflrt Mar 25 '20 at 15:32
  • A workaround provided by @VioletaGeorgieva on the github issue is to enable the metrics not at the tcp client configuration level, but a the connection provider one. – jflrt Mar 26 '20 at 09:24

0 Answers0