Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{ACR} Add connection pooling with ACR registries. #30520

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

oxpa
Copy link

@oxpa oxpa commented Dec 15, 2024

Related command
az acr repository list

Description
I have a registry of 60000 (sixty thousands) images. Listing them usually takes ~10 minutes on my internet connection. Largely because listing happens in pages by 100 entries per page. So az cli does ~600 requests to list all images. Each request uses it's own connection.
With this change a request to the same registry will reuse an existing connection (if any) or open a new one.
Connection pooling cuts time from 10+ minutes for listing to under a minute (for my specific case). So at least 60 times better.
It should not break things as I make no initial configuration for a session so no parameters are reused. But I'm happy to fix my code if this naïve approach doesn't work.

Testing Guide
az acr repository list --debug --name some_very_large_repository
Before the patch, every request to a registry would produce a message like this:

urllib3.connectionpool: Starting new HTTPS connection ......

With the patch the message goes away, only the first request creates a connection.
The message still there for authentication and other requests.

This checklist is used to make sure that common guidelines for a pull request are followed.

Copy link

Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

Copy link

Validation for Breaking Change Starting...

Thanks for your contribution!

@yonzhan
Copy link
Collaborator

yonzhan commented Dec 15, 2024

Thank you for your contribution! We will review the pull request and get back to you soon.

Copy link

⚠️Your changes in this PR will be released on Jan 14, 2025 due to CCOA (extend to Jan 6, 2025)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Container Registry az acr customer-reported Issues that are reported by GitHub users external to the Azure organization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants