Apologies if this isn't the proper place to ask, but I'm looking for some tips on how to improve my app's networking.
I have a mobile app that currently uses multiple dedicated threads, each with their own io_context. When I'm on wifi, everything completes instantly and without issue. When I'm off wifi using 5G, tasks consistently timeout (I have a 30 second timeout). I currently will submit potentially over 1000 requests on a single ioc in a single thread. It seems to be too much when on a slower connection.
Will there be any benefit to spawning a thread pool and sharing a single io_context across them and submitting new tasks using post() instead of my current model?
Does io_context have any kind of internal queue that'd make it more efficient at managing tasks when there's some that are already in flight?
Any help would be appreciated.
Apologies if this isn't the proper place to ask, but I'm looking for some tips on how to improve my app's networking.
I have a mobile app that currently uses multiple dedicated threads, each with their own io_context. When I'm on wifi, everything completes instantly and without issue. When I'm off wifi using 5G, tasks consistently timeout (I have a 30 second timeout). I currently will submit potentially over 1000 requests on a single ioc in a single thread. It seems to be too much when on a slower connection.
Will there be any benefit to spawning a thread pool and sharing a single io_context across them and submitting new tasks using post() instead of my current model?
Does io_context have any kind of internal queue that'd make it more efficient at managing tasks when there's some that are already in flight?
Any help would be appreciated.