Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Increase throughput#5

Merged
elgopher merged 1 commit intomasterfrom
nonblocking-batches
May 5, 2022
Merged

Increase throughput#5
elgopher merged 1 commit intomasterfrom
nonblocking-batches

Conversation

@elgopher
Copy link
Owner

@elgopher elgopher commented May 5, 2022

Current implementation is not optimal. It is using fixed-size go-routines pool. If the pool specified by the user is too small, one slow resource could block processing of other resources (different keys, but same hash). User can adjust the pool size, but it is very hard to figure out this number upfront (before running the app on production).

The new implementation spawn a dedicated go-routine for each new batch. At max one go-routine is created for given resource key. Go-routine is destroyed once batch ends.

@elgopher elgopher force-pushed the nonblocking-batches branch 4 times, most recently from 7ebdaa6 to a1496f0 Compare May 5, 2022 17:28
Current implementation is not optimal. It is using fixed-size go-routines pool. If the pool specified by the user is too small, one slow resource could block processing of other resources (different keys, but same hash). User can adjust the pool size, but it is very hard to figure out this number upfront (before running the app on production).

The new implementation spawn a dedicated go-routine for each new batch. At max one go-routine is created for given resource key. Go-routine is destroyed once batch ends.
@elgopher elgopher force-pushed the nonblocking-batches branch from a1496f0 to 53a3090 Compare May 5, 2022 18:26
@elgopher elgopher merged commit a90382b into master May 5, 2022
@elgopher elgopher deleted the nonblocking-batches branch May 5, 2022 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant