Skip to content

Conversation

@ajcasagrande
Copy link
Contributor

AIPERF_HTTP_CONNECTION_LIMIT

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces the ability to configure HTTP connection limits and worker pull concurrency through the environment variable AIPERF_HTTP_CONNECTION_LIMIT. The change moves away from hardcoded connection limits to a configurable system that defaults to 2500 connections.

  • Adds AIPERF_HTTP_CONNECTION_LIMIT environment variable configuration
  • Updates HTTP client defaults to use the configurable limit instead of hardcoded values
  • Sets worker pull concurrency to match the HTTP connection limit to prevent oversubscription

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
aiperf/common/constants.py Adds the new AIPERF_HTTP_CONNECTION_LIMIT constant that reads from environment
aiperf/clients/http/defaults.py Updates HTTP client defaults to use the configurable limit and sets per-host limit to 0
aiperf/workers/worker.py Configures worker pull concurrency to match HTTP connection limit
tests/clients/http/test_tcp_connector.py Updates test assertions to use the new constant and expect per-host limit of 0

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@biswapanda biswapanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm !

@ajcasagrande ajcasagrande merged commit 70af594 into main Sep 20, 2025
2 of 3 checks passed
@ajcasagrande ajcasagrande deleted the ajc/limits2 branch September 20, 2025 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants