req icon indicating copy to clipboard operation
req copied to clipboard

Documentation around adjusting pool_size

Open PragTob opened this issue 7 months ago • 1 comments

:wave:

As usual, thanks a lot for this excellent library!

One thing I found myself struggling with a bit yesterday was trying to adjust the pool size. I eventually found the documentation inside run_finch that pointed me in the right direction.

I.e. I'm now starting my own Finch pool under my application and am specifying it as finch: MyFinch when making requests with Req and it seems to work :tada:

Took me a while to get there/understand it - I had assumed as Req starts its own pool I could somehow change the default pool size Req uses but didn't find a way to do it. I mean ok I did find this comment on a PR but it discouraged setting it globally plus I think it also just meant setting finch: there vs. altering the default options that Req works with. Having Reqs pool size be adjustable may be nice, but of scope for this.

Improvements I see:

  • mention pool_size/pool size somewhere (search came up empty on the 0.5.4 docs)
  • link to the finch pool configuration docs to give people an easy leg up https://hexdocs.pm/finch/Finch.html#start_link/1-pool-configuration-options
  • maybe add some more higher level documentation, unsure if in the README/pages or the main Req module. It makes sense that the main docs are under the run_finch step but adjusting pool size feels important enough to deserve a shoutout (esp. since people looking for it will usually want to fix/increase it fast :grin: )

Very happy to make a PR trying to improve on these myself if you agree, just wanted to check in first and get some feedback :)

Thanks for all your work once again!

IMG_20220109_104347

PragTob avatar Jul 24 '24 09:07 PragTob