How to cause each new request to run in a new task/thread?
I've been looking through axum, tower and axum-server docs this evening, but I couldn't find anything concrete: there's a lot of abstractions and I'm going cross eyed!
My goal is to go beyond saturating a single core when processing requests. I have a very hot route that uses the Json extractor and that seems to be causing the acceptor thread/task to bear the cost of that json parsing before it calls into my implementation. I'd like to push the request out to another thread before the extractors are invoked so that I can make better use of the available cores on my system.
I think I want to wrap my Router up in a tokio::spawn somehow, I just don't have a good sense of specifically what to do, or where to put it.
What do you recommend as a way to achieve this with axum-server?
Thank you!