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

Add hook_fork so plugins can fork their own workers. #2099

Closed
smfreegard opened this issue Sep 11, 2017 · 1 comment
Closed

Add hook_fork so plugins can fork their own workers. #2099

smfreegard opened this issue Sep 11, 2017 · 1 comment

Comments

@smfreegard
Copy link
Collaborator

This is to fix an annoyance I have on my spam trap. I start up a bunch of HTTP proxies in hook_init_master which starts the listeners etc.

The problem with this is that if one of them crashes, then it completely brings down Haraka as the master process dies. It's also sub-optimal from a performance standpoint as the master is then dealing with some really busy sockets.

I can't put the HTTP listeners in hook_init_child because the sockets are so busy it affects SMTP handling as the event-loop becomes saturated.

So I'd like to look into a way of creating a hook_fork which when run under cluster would fork nodes= children, assign their process.title to the plugin name and then manage respawning them.

@smfreegard smfreegard self-assigned this Sep 11, 2017
@msimerson msimerson changed the title Add hook_fork as a simple way for plugins to fork their own workers. Add hook_fork so plugins can fork their own workers. Jan 19, 2018
@msimerson
Copy link
Member

moved to ideas section of wiki

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

No branches or pull requests

2 participants