I have a few questions about the Ktor HttpClient on JVM, I'm using the default engine ATM, but I'm not bound to it.
• May I use the same HttpClient from multiple threads at the same time (connecting to the same server)?
• If I use the same client from different threads at the same time, will cookies be synchronized?
• How many clients may I have active at the same time (100+ would be good for me, these go to different servers).
👀 2
a
Aleksei Tirman [JB]
06/30/2023, 9:53 AM
May I use the same HttpClient from multiple threads at the same time (connecting to the same server)?
Yes.
If I use the same client from different threads at the same time, will cookies be synchronized?
If you would use the
HttpCookies
plugin then yes.
How many clients may I have active at the same time (100+ would be good for me, these go to different servers).
I think it depends on the particular resource constraints.