kong icon indicating copy to clipboard operation
kong copied to clipboard

feat(*) add support for exit_worker_by_lua

Open bungle opened this issue 3 years ago • 1 comments

Summary

Adds support for an OpenResty phase exit_worker in Kong core, and enables that phase for plugins too.

bungle avatar Mar 02 '22 20:03 bungle

Shall we modify pdk.private.phases.lua, add a new constant exit_worker?

chronolaw avatar Mar 09 '22 07:03 chronolaw

@bungle can you rebase this over master please?

kikito avatar Nov 02 '22 08:11 kikito

Guess we should also support it for plugin servers?

StarlightIbuki avatar Nov 02 '22 09:11 StarlightIbuki

For the benefit of everybody outside of the Kong core team, here's a bit of explanation: The exit_worker phase of nginx happens when it has already closed all connections, stopped processing timers and handling its internal event loop. This means that then environment in which exit_worker callbacks would execute would be very limited and much different from the normal execution environment provided to plugins. As we are working on changes to plugins to provide a more useful way to hook into the orderly shutdown process and we also have no clear usecase for exit_worker, we have decided not to pursue this PR further.

hanshuebner avatar Feb 28 '23 10:02 hanshuebner