Skip to content

feat(metrics): add proxy HTTP connection pool monitoring#1252

Open
Issac-Newton wants to merge 1 commit into
alibaba:masterfrom
Issac-Newton:feat/http-pool-metrics
Open

feat(metrics): add proxy HTTP connection pool monitoring#1252
Issac-Newton wants to merge 1 commit into
alibaba:masterfrom
Issac-Newton:feat/http-pool-metrics

Conversation

@Issac-Newton

Copy link
Copy Markdown
Collaborator

Summary

  • Add periodic metrics collection (every 10s) for the proxy httpx connection pool: active connections, idle connections, and pending requests waiting for a free connection
  • Increase proxy pool max_connections from 100 to 2000 and max_keepalive_connections from 50 to 100 to reduce request queueing under load
  • Fix empty error messages in handle_exceptions decorator by falling back to repr(e)

Fixes #1251

Test plan

  • Verify metrics appear in monitoring dashboard (xrl_gateway.http_pool.active_connections, idle_connections, pending_requests)
  • Confirm pool stats logging in pod logs: http pool metrics: active=X, idle=Y, pending=Z
  • Validate no regression in existing proxy operations under load
  • Check that increased pool limits reduce pending request queueing

🤖 Generated with Claude Code

- Add periodic metrics collection (every 10s) for the proxy httpx pool:
  xrl_gateway.http_pool.proxy.active_connections,
  xrl_gateway.http_pool.proxy.idle_connections,
  xrl_gateway.http_pool.proxy.pending_requests
- Add get_pool_stats(name) to HttpPoolManager for targeted pool introspection
- Increase proxy pool max_connections from 100 to 2000 and
  max_keepalive_connections from 50 to 100 to reduce request queueing
- Fix pending_requests to report truly queued requests (total - active)
- Fix empty error messages in handle_exceptions decorator (fallback to repr)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Issac-Newton
Issac-Newton force-pushed the feat/http-pool-metrics branch from f1eb5fe to 4811f84 Compare July 16, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add proxy HTTP connection pool monitoring

1 participant