Skip to content

rack.after_reply #170

Answered by ioquatix
tleish asked this question in General
Discussion options

You must be logged in to vote

We are looking to standardise the behaviour: rack/rack#1802 - once it's done I'll implement support for the SPEC.

In any case, there are better ways to deal with this kind of issue:

  • Background thread with work queue & batching.
  • Async task + batching (probably best approach).

Most use cases for after_reply are simply better handled with background batch processing IMHO. Not only would it be more responsive, it won't stall other request handling which conceivably with persistent connections on HTTP, it will if it's executed on the same thread.

If we do end up supporting "after_reply" or whatever ends up in the SPEC, we might not do it in the same request handler because it's bad for perfo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tleish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #169 on April 15, 2022 00:17.