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

Using native tracer on .NET 6+ app significantly impacts performance and scalability of Azure Function Isolated Worker w/ ASP.net Core Integration #5370

Open
jhaygood86 opened this issue Mar 30, 2024 · 0 comments

Comments

@jhaygood86
Copy link

jhaygood86 commented Mar 30, 2024

Describe the bug
Inside an Azure Function .NET Isolated application, with the ASP.net Core integration (aka using the nuget package Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore in conjunction with "ConfigureFunctionsWebApplication"), which is the default when building an HttpTrigger application with the Azure Function SDK in .NET Isolated, performance is seriously hampered, to the point where it fails completely under load

To Reproduce
Steps to reproduce the behavior:

  1. Open the attached project SampleAspNetCoreFunctionWorker.zip
  2. Open Dockerfile and uncomment the 2 lines that start with CORECLR_PROFILER (it works when commented, hence the bug report over here and not in the Azure repo)
  3. Build docker image with "docker build -t sample ."
  4. Run built image with "docker run -p 7071:7071 -d sample
  5. Run a load testing tool. I used bombadier with "bombardier -c 150 -n 2000 -l http://localhost:7071/api/Function1

Note: you can reproduce on Windows Azure Functions with the DataDog APM .NET extension as well, which isn't Docker based.

Expected behavior
Application works, and you get 2000 successful requests

Screenshots"

The top bombardier run is with the DD native ClrProfiler enabled, the bottom is with it disabled
image

Runtime environment (please complete the following information):

  • Instrumentation mode: Docker container
  • Tracer version: 2.49.0
  • OS: Ubuntu 22 LTS (Microsoft standard Docker container)
  • CLR: .NET 6 / Azure Function Runtime 4

Additional context
Note, this doesn't happen when using the raw Azure Function Worker HttpTrigger (aka taking HttpRequestData as input and returning HttpResponseData). It only happens when using the compatability API which returns IActionResult.

@jhaygood86 jhaygood86 changed the title Using native tracer on .NET 6+ app inside Docker significantly impacts performance and scalability of Azure Function Isolated Worker w/ ASP.net Core Integration Using native tracer on .NET 6+ app significantly impacts performance and scalability of Azure Function Isolated Worker w/ ASP.net Core Integration Apr 11, 2024
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

No branches or pull requests

1 participant