aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/gun/conn.ex
AgeCommit message (Collapse)Author
2020-09-11ConnectionPool: Log possible HTTP1 blocksrinpatch
2020-09-07adapter options unificationAlexander Strizhakov
not needed options deletion
2020-07-15host is now uselesshref
2020-07-15Simplify TLS optshref
- `verify_fun` is not useful now - use `customize_check_hostname` (OTP 20+ so OK) - `partial_chain` is useless as of OTP 21.1 (wasn't there, but hackney/.. uses it)
2020-07-15Add documentation for new connection pool settings and remove somerinpatch
`:retry_timeout` and `:retry` got removed because reconnecting on failure is something the new pool intentionally doesn't do. `:max_overflow` had to go in favor of `:max_waiting`, I didn't reuse the key because the settings are very different in their behaviour. `:checkin_timeout` got removed in favor of `:connection_acquisition_wait`, I didn't reuse the key because the settings are somewhat different. I didn't do any migrations/deprecation warnings/changelog entries because these settings were never in stable.
2020-07-15Refactor gun pooling and simplify adapter option insertionrinpatch
This patch refactors gun pooling to use Elixir process registry and simplifies adapter option insertion. Having the pool use process registry instead of a GenServer has a number of advantages: - Simpler code: the initial implementation adds about half the lines of code it deletes - Concurrency: unlike a GenServer, ETS-based registry can handle multiple checkout/checkin requests at the same time - Precise and easy idle connection clousure: current proposal for closing idle connections in the GenServer-based pool needs to filter through all connections once a minute and compare their last active time with closing time. With Elixir process registry this can be done by just using `Process.send_after`/`Process.cancel_timer` in the worker process. - Lower memory footprint: In my tests `gun-memory-leak` branch uses about 290mb on peak load (250 connections) and 235mb on idle (5-10 connections). Registry-based pool uses 210mb on idle and 240mb on peak load
2020-04-08fix for gun connections poolAlexander Strizhakov
2020-03-12clean upAlexander Strizhakov
2020-03-10add verify tls_opts only when we open connectionAlexander Strizhakov
for other requests tesla will add tls_opts
2020-03-03refactoring for gun api modulesAlexander Strizhakov
2020-03-03retry and retry_timeout settings default changeAlexander Strizhakov
2020-03-03return error if connection failed to openAlexander Strizhakov
2020-03-03namingAlexander Strizhakov
2020-03-03simplification of formatting host methodAlexander Strizhakov
case for format_proxy method
2020-02-24open conn in separate taskAlexander Strizhakov
2020-02-18adding gun adapterAlexander Strizhakov