Skip to content

Use of singleton SyncHttpScheduler limits concurrency of requestToken calls #1001

@zknill

Description

@zknill

Calls to requestToken are sync in the SDK, and use a singleton executor in the SyncHttpScheduler. This means that requests will queue behind each other.

If you have 50 threads creating tokens, the executor can only do 1 thread worth of throughput.
Also related, adding more threads creating tokens means that all threads end up taking longer (not just the later threads taking linearly longer).

Token id: 12 with time since start 5123ms
Token id: 4 with time since start 5122ms
Token id: 14 with time since start 5122ms
Token id: 26 with time since start 5122ms
Token id: 39 with time since start 5121ms
Token id: 16 with time since start 5100ms
Token id: 1 with time since start 5124ms
Token id: 7 with time since start 5100ms
Token id: 18 with time since start 5123ms
Token id: 30 with time since start 5112ms

┆Issue is synchronized with this Jira Task by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improved functionality.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions