Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DSIP-35][Alert] Refactor the alert thread model #15931

Closed
2 tasks done
Tracked by #14102
ruanwenjun opened this issue Apr 28, 2024 · 0 comments · Fixed by #15932
Closed
2 tasks done
Tracked by #14102

[DSIP-35][Alert] Refactor the alert thread model #15931

ruanwenjun opened this issue Apr 28, 2024 · 0 comments · Fixed by #15932
Assignees

Comments

@ruanwenjun
Copy link
Member

ruanwenjun commented Apr 28, 2024

Search before asking

  • I had searched in the DSIP and found no similar DSIP.

Motivation

The alert server is designed as HA, and we use single thread in the active server to loop alert event and send alert event to remote e.g HTTP/Slack/Email...

image

The current thread model has some problems

  • Once an alert is blocked due to the remote server network block, the whole alert server will be blocked.
  • The throughput of the AlertServer depends on the main thread on the active server, and due to the event sending is io blocking operation, so the throughput is very small.

Design Detail

This issue aims to improve the throughput of the alert server.

image

In the new thread model, there will exist three kinds of threads in the alert server

  • Event fetch thread
  • Event loop thread
  • Evend sending threads

Each kind of threads will not block others.

Compatibility, Deprecation, and Migration Plan

Compatibility with latest version.

Test Plan

Test by UT.

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant