Azure / Azure/azure-functions-host
Log the request latency between host and worker
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
Not sure if this is already possible or what is needed here, but it would be useful to emit telemetry about how long it takes between the host sending a request to the worker and the worker starting work on that request.
Especially for single threaded language workers like Python and Node, this would indicate that there a function is blocking others from executing, resulting in a queue up of requests between the host and the worker. We can use this telemetry to build detectors and perhaps apply heuristics to dynamically alter concurrency within in a single instance.
If combined with a metric like CPU utilization, we can make recommendations to the customer. In a Python app, long latency with low CPU could benefit from switch the code to async or increasing the number of workers. Long latency and high CPU usually means a CPU bound workload that needs concurrency to be dialed down.
@cgillum @anirudhgarg I think we were talking about this?
Contributor guide
Research direction
No files or tests are named. Start by tracing the host-to-worker request dispatch and the worker entry point, then determine where request-send and work-start timestamps can be recorded; done means emitting latency telemetry that exposes queueing between those points for Python and Node workers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, node.js, python
- Domain
- backend, distributed-systems, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100