-
Notifications
You must be signed in to change notification settings - Fork 200
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
[rfc] redesign the process management tree #546
Comments
How are producers and consumers expected to behave when a client dies? |
For consumers, it's just a matter of time to wait for a new connection to be established to partition leader(s).
|
This is an "RFC" so here's a "C", heh! I found myself on this issue after tracking down some error logs my app occasionally emits when shutting down as part of new deploys. The logs look like this:
From dumping the process IDs prior to the deploy, I cross referenced the PIDs and see that This is in response to a It's not the worst thing, but I would like for the app to shut down cleanly. I know the general way Erlang apps shut down is recursively through the supervision tree in the reverse order. And I know an OTP supervisor will try to gently stop a child with a timeout as configured by its I don't know exactly how And I also don't know how best to handle I haven't quite worked out the timing and exit signals, but I'm currently thinking that my error logs have to do with So I support the process architecture in the RFC here, if for no other reason than it's a bit easier for me to reason about when shutting down the application. |
supervisor3 was a bad choice
supervisor3
is stale, lagging behind with the changes in OTP's supervisor.erlsupervisor3
can be addressed withsupervisor
with some additional retry mechanism.brod
)not following OTP design principal
brod_client
directlyspawn_link
consumer and producer supervisor makes the processes unreachable from application root supervisor. i.e. it's not a tree.this makes the release handler unable to traverse all processes from the supervision tree to perform hot-upgrades.
design proposal
brod_client
should run in a delayed-retry loop to startbrod_producers_sup
and/orbrod_consumers_sup
per configurationbrod_producers|consumers_sup
is started, it should not die at connection restarts (in fact this is the current behavior, it runs in a loop to to poll new leader connection frombrod_client
.The text was updated successfully, but these errors were encountered: