merlimat commented on a change in pull request #1453: Added Throttling
mechanism to Pulsar Proxy
URL: https://github.com/apache/incubator-pulsar/pull/1453#discussion_r177932888
##########
File path:
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java
##########
@@ -95,6 +95,11 @@ public ProxyConnection(ProxyService proxyService) {
public void channelActive(ChannelHandlerContext ctx) throws Exception {
super.channelActive(ctx);
activeConnections.inc();
+ if (activeConnections.get() >=
service.getConfiguration().getMaxConcurrentInboundConnections()) {
+ LOG.warn("[{}] Too many connection opened {}", remoteAddress,
activeConnections.get());
Review comment:
We should rather use a counter exposed in the metrics and leave the log at
debug level. In proxy we're already using prometheus client to expose
stats/counters.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services