Best crate to use to issue large number of HTTP requests in parallel


#1

If you need to query 1000s of HTTP API endpoints per second what crate would you use for HTTP client?
Hyper is obviously a good option but a bit “low level” reqwest has nicer API but is sync. so not a good option for making a ton of requests?


#2

reqwest has an async module (unstable feature), which should provide what you want. But, as the feature suggests, this functionality is unstable at the moment.

side note: Yes, hyper is a low-level implementation, but depending of your specific use case, it may be a) not too hard to get working and b) even better suited for heavy tasks, as you decide which features you want.


#3

Thanx for the info this is for prod. use so I guess will stick with hyper for now


#4

Another doubt I personally have with reqwest is when and what it will look like, upgraded to hyper 0.12, or would using it be another dead end in this somewhat, well, immature part of the rust landscape. YMMV.


#5

I hope you’re on good terms with the maintainer of those endpoints (especially after you get it working :stuck_out_tongue: )
Just out of curiosity: Is this something internal?


#6

Yes and NO :slight_smile: a tool that hits many on prem appliances over HTTP APIs they expose that we manage for clients