api7 / api7/aisix

Exporter delivery task pins itself to one worker in thread-per-core mode

Open
#901 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
157
Forks
32
Avg merge
1h 25m
Merged PRs (30d)
145

Description

Split out of #891 (thread-per-core workers), which flagged this as a known gap.

ExporterPipelines::get_or_create spawns its delivery task from the request path. In thread-per-core mode that task lands on whichever worker first emits a usage event for that exporter and stays there, so the whole process's export delivery for that exporter runs on one worker's single-thread runtime.

Not a correctness problem — delivery still happens — but it concentrates export I/O and serialization on one core while the others stay idle, and that worker's proxy latency absorbs the exporter's load spikes.

Possible directions (pick during implementation): spawn delivery tasks on a dedicated background runtime instead of the request-path runtime, or shard exporters across workers at creation time.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at ExporterPipelines::get_or_create and read the thread-per-core worker and task-spawning path described in #891. Compare the two proposed runtime or worker-sharding approaches, then validate that an exporter’s delivery work is no longer pinned to the first worker while delivery remains functional across usage events.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.