Skip to content

[Task] Design virtual thread support for ShenYu runtime and plugins #6369

Description

@Aias00

Description

Background

A future ShenYu main repo change may use Java virtual threads to improve blocking IO handling in runtime and plugin execution paths.

Before implementation, we need a design that identifies where virtual threads are useful, where they are risky, and how to keep a fallback path.

Tasks

  • Inventory current thread pool usage in bootstrap/runtime/plugin code.
  • Identify blocking IO paths that may benefit from virtual threads.
  • Identify CPU-bound paths that should not use virtual threads.
  • Design a unified executor abstraction for plugin/runtime use.
  • Define configuration flags for enabling/disabling virtual threads.
  • Define fallback behavior when virtual threads are unavailable.
  • Define observability requirements: thread naming, metrics, tracing, logs.
  • Define benchmark scenarios comparing platform threads and virtual threads.
  • Identify compatibility impact on plugins.

Expected Output

A virtual thread design proposal covering:

  • Candidate execution paths
  • Non-candidate execution paths
  • Executor abstraction
  • Configuration model
  • Fallback model
  • Benchmark plan
  • Risk analysis

Acceptance Criteria

  • The proposal does not require Java client code to upgrade JDK.
  • The proposal includes a safe fallback path.
  • The proposal includes measurable benchmark criteria.

Task List

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions