this post was submitted on 16 Jan 2025
15 points (89.5% liked)
Rust
6282 readers
111 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Dunno if its applicable to your rust http client but in python's aiohttp you can set maximum active (tcp) connections per host for the connection pool.
It does not ensure it won't ever go over the rate (especially if your requests are small) just does not let the program burst the server down. It's usually my first choice - dumb in the long run but quick and cheap.