Armeria - blockling task executor #5341
Unanswered
Sethuraman
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Hi! Thank for asking a great question, @Sethuraman. If I understood correctly, you have two types of blocking tasks here:
and if one type of tasks (A) dominates the blocking task executor, the other type of tasks (B) will not have a chance to be executed, because the executor is busy handling (A). In such as case, it is recommended to use a different thread pool for different type of tasks. For example, you could create another thread pool to handle the task type (B). |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I am trying to get some advice on event loop threads and blocking task executors. The general advice for armeria based on docs and prior discussions is not to block the event loop threads.
We currently have a service that uses a blocking task executor for all exposed endpoints. Some of these calls are processing events from kafka and writing them down in a db. Some other calls are grpc endpoints that retrieve data from the DB.
We had an issue where the event writes were taking too much DB time and timing out (lock time outs). This resulted in the grpc read calls to respond back with RST_STREAM errors. Basically the clients making the grpc calls were timing out.
We were thinking, the event processor threads were not allowing the reads threads to proceed.
The event processor threads and the read threads are blocking event loop threads. If we continue to let them be blocking but whenever a DB call is being made from these threads we offload the DB call onto another thread pool, would that help? Or would we have to stop using blocking executors all together.
What would that actually mean? Would it change the way we implement event processing + read api calls altogether?
Beta Was this translation helpful? Give feedback.
All reactions