Skip to content

Cluster.Run on the thread pool #124

@verdie-g

Description

@verdie-g

tendThread = new Thread(new ThreadStart(this.Run));

Currently, Cluster.Run is executed on a dedicated threads. This is not great for several reasons:

  1. it's a inefficient use of resource, especially when the application is connected to many clusters
  2. it involves extra context switches
  3. when investigating thread pool starvation, a trace could show that Cluster.Run was the method that spent the most time blocking threads. After some time, you realize that it's a in dedicated thread so it can be ignored for the investigation.
    image

What do you think about making the Aerospike client a good citizen by turning this code async and running it in the thread pool?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions