Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation about default pool is somewhat confusing #507

Closed
markmeeus opened this issue May 22, 2018 · 1 comment · Fixed by #645
Closed

Documentation about default pool is somewhat confusing #507

markmeeus opened this issue May 22, 2018 · 1 comment · Fixed by #645

Comments

@markmeeus
Copy link

Hi There,

We recently had some issues regarding the pooling functionality, and the documentation seemed a bit confusing.
From the code it looks like the behaviour is as follows:

When using {pool, default} tuple => the default pool will be used.
When not passing any pool tuple, the use_default_pool environment key is checked. If true, the default pool is used, if not, it does not use the pool.

So this statement from the readme

By default all connections are created and closed dynamically by hackney but sometimes you may want to reuse the same reference for your connections. It's especially useful if you just want to handle serially a couple of requests.

Seems a bit off, since the only way to dynamically create/close connections would be to not pass any pool option and switching off the default pool using the environment key.
By default it would use the default pool, which totally makes sense.

Also this:
Note:

Sometimes you want to disable the default pool in your app without having to set the client option each time. You can now do this by setting the hackney application environment key use_default_pool to false.

is a bit confusing because there is no way to switch off the default pool using a client option.

If my observations are correct, I would be happy to provide a PR for the README.

@markmeeus markmeeus changed the title Document about default pool is somewhat confusing Documentation about default pool is somewhat confusing May 29, 2018
legoscia added a commit to legoscia/hackney that referenced this issue Jul 28, 2020
Since specifying {pool, default} is redundant, change the example to
show how to use a different pool.

Closes benoitc#507.
@sonic182
Copy link

sonic182 commented Feb 8, 2021

I think this could be reopen, it is not clear the default configs for default pool, which is the max_connections for that pool?, timeouts? etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants