Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.37k stars 4.78k forks source link

[FEATURE/PERFORMANCE] Search Client AzureKeyCredential request aggregation #46663

Open philipborg opened 3 days ago

philipborg commented 3 days ago

Library name

Azure.Search.Documents

Please describe the feature.

While stress-testing our search solution we have discovered an issue with HTTP requests. It occasionally makes up to ~50 requests at once to https://login.microsoftonline.com/{UUID}/v2.0/.well-known/openid-configuration which causes severe performance issues.

In our setup we have a singleton SearchClient in ASP.NET.

Our hypothesis is that this is during authentication renewal and that there is a missing request aggregation in the SDK, causing all new searches until authentication is renewed to trigger a new separate HTTP request to authenticate.

github-actions[bot] commented 3 days ago

Thank you for your feedback. Tagging and routing to the team member best able to assist.