Investigate Python SDK concurrency limitations
@seherv 已经在做这个了。
开始于 2026年4月28日。
评估
这个 Issue 还没有评估数据。
描述
The Python Dapr SDK currently relies on threadpool-based execution for workflow and activity processing. This model has known limitations:
- The GIL (Global Interpreter Lock) constrains true parallelism for CPU-bound work
- Thread pool exhaustion under high concurrency can delay sidecar acknowledgments
Native asyncio execution would allow the SDK to handle a higher volume of concurrent workflow tasks without the overhead and contention introduced by thread management, reducing sidecar response latency under sustained load.
Goals
- Quantify the throughput and latency characteristics of the current threadpool implementation under sustained workflow load
- Rewrite workflow and activity execution to use native asyncio
- Validate that the rewrite improves sidecar response latency and throughput under load conditions
Tasks
- Benchmark current threadpool implementation — measure workflow throughput, activity concurrency, and sidecar acknowledgment latency under sustained load
- Document failure conditions — identify load thresholds at which sidecar response times begin to degrade
- Design asyncio execution model — propose the replacement architecture for workflow and activity dispatch
- Implement asyncio rewrite — replace threadpool-based execution with native asyncio in the workflow worker
- Ensure existing workflow and activity behavior is preserved
- Load validate — re-run benchmarks against the rewritten implementation under production-representative load and confirm improvement in sidecar response latency and throughput
- Document operational guidance — update SDK documentation with concurrency configuration recommendations for workflow-heavy deployments
- Write Dapr OSS blog on findings
- 主要语言
- Python
- 星标
- 272
- 派生
- 152
- 平均合并
- 3 天 21 小时
- 30 天内合并 PR
- 5
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dapr/python-sdk 的其他 Issue
-
dapr-ext-workflow good first issue kind/enhancement P2
难度 2/5 1-2 天 新手友好度 72/100
dapr/python-sdk#853 · 4 条评论 ·
-
kind/bug
难度 4/5 3-5 天 新手友好度 45/100
dapr/python-sdk#1230 ·
-
feature-request
难度 3/5 1-2 天 新手友好度 76/100
dapr/python-sdk#1214 · 已指派 1 人 ·
-
dapr-ext-workflow kind/enhancement
难度 3/5 1-2 天 新手友好度 78/100
dapr/python-sdk#1213 ·
-
难度 3/5 1-2 天 新手友好度 76/100
dapr/python-sdk#1200 ·
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
难度 1/5 1 小时以内 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 70/100
huggingface/Repo2RLEnv#163 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
难度 2/5 1-3 小时 新手友好度 70/100
NousResearch/hermes-agent#121143 ·