Skip to content

Investigate Python SDK concurrency limitations #975

Description

@sicoyle

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

Activity

  1. added this to the v1.18 milestone on Apr 2, 2026
  2. added theissue type on Apr 2, 2026
  3. olitomlinson commented on Apr 16, 2026

    @olitomlinson
    Contributor

    related #897

  4. moved this from Backlog to In progress in v1.18 Release Tracking Boardon Apr 28, 2026
  5. dapr-bot commented on Jul 24, 2026

    @dapr-bot
    Collaborator

    This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

  6. olitomlinson commented on Jul 27, 2026

    @olitomlinson
    Contributor

    bump

  7. removed
    staleIssue marked as stale by Dapr Bot
    on Jul 27, 2026
  8. dapr-bot commented on Sep 25, 2026

    @dapr-bot
    Collaborator

    This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

  9. dapr-bot commented on Oct 2, 2026

    @dapr-bot
    Collaborator

    This issue has been automatically closed because it was marked stale with no further activity for 7 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1staleIssue marked as stale by Dapr Bot

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions