I've been developing an actix-web application for the last few weeks. Actix being multithreaded is proving to be a complete pain - I'm building a system that uses HTTP to proxy data, and I'd really rather have one thread per session token, but there's no way to do that in Actix. I've almost got it working but it's such a mess I've decided I need to rewrite it.
I'd like to have a separate instance (be it via threading or a whole separate application) of Actix (or some other web framework? Is there one that is faster in single-threaded mode? I don't need many bells and whistles) per session, with requests load-balanced based on that token header. If a token is unknown it should check it's legitimate (via decrypting its payload) then start a new instance for it.
How would you recommend going about this? I really don't want to rewrite it twice.