3 ms·
Your database is realistically postgres or mysql and can really only run as many queries in parallel as you have cores. You can run more queries concurrently b
by DasIch 6y ago
Your database is realistically postgres or mysql and can really only run as many queries in parallel as you have cores.
You can run more queries concurrently but then the database just switches between those, which usually means worse latency and not potentially worse throughput.
As you wrote yourself an application handles request probably by doing a few database queries. As a consequence regardless of how many requests you can handle concurrently, they are probably all bottlenecked by the number of CPUs on your database server.
All of this is probably true regardless of whether you are using async or sync io. However with async io you have some overhead.
Of course, if you also happen to be doing other kinds of IO, say HTTP requests to other services in addition to or instead of those database queries. This might look a bit differently.
tl;dr: It really depends on what your application is doing.