Fork me on GitHub

With that being said @weavejester, if performance and efficiency are something of high importance, then is asynchronous handler is the absolute way to go? Or is it not a silver bullet in terms of performance (e.g. in some cases it could hinder performance instead)?


My first reaction to that is "nothing is a silver bullet" 🙂 Everything is trade offs...


Yeah, that is as expected, but I'd like to be more informed on what is the trade off on using async handlers beside the complexity it introduces.


If you handler does "slow" IO (and has an async interface) async would be more efficient, if not that's a bit useless, ex: for a simple "fast" handler the cost of context switching might cost you more if you use async. async handlers also come with a cost in complexity. So yeah the answer is "it depends"


in general, I would say don't bother with async at the beginning


Thank you @mpenet for clarifying, I was contemplating to use async but unsure whether the benefit will outweigh the effort.