playframework / playframework/playframework
Improve Graceful termination
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 12.6k
- Forks
- 4k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 29
Description
Play 2.8.1 introduces graceful termination when using the Akka-HTTP backend (default). See #9970 .
As mentioned in https://github.com/akka/akka-http/issues/1210#issuecomment-484344006, there's an even better approach. The improvement is small and trivial and relies on the fact that, on AkkaHTTP, .terminate invokes .unbind and .unbind is idempotent. So, instead of just calling .terminate on a given Shutdown phase, we can call unbind on an initial phase and call terminate on a later phase.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Play shutdown phases and the Akka-HTTP backend termination path described in the issue. Verify how terminate and unbind are currently scheduled; the work is done when unbind runs in an earlier shutdown phase and terminate runs later, with the relevant termination behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100