akkoma/config
rinpatch 58a4f350a8 Refactor gun pooling and simplify adapter option insertion
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-07-15 15:17:27 +03:00
..
benchmark.exs activities generation tasks 2020-03-30 11:42:25 +03:00
config.exs Refactor gun pooling and simplify adapter option insertion 2020-07-15 15:17:27 +03:00
description.exs Merge branch 'feature/1922-media-proxy-whitelist' into 'develop' 2020-07-14 18:07:44 +00:00
dev.exs Enable strict validation mode in dev and test environments 2020-05-04 22:35:28 +04:00
docker.exs Remove dynamic config as default, add healthcheck 2019-09-03 09:31:52 -04:00
dokku.exs CI: Add auto-deployment via dokku. 2019-05-31 10:55:35 +02:00
emoji.txt Remove longfox emoji set 2019-08-04 04:32:45 +00:00
prod.exs Set Logger level to :info in prod 2019-12-09 19:11:54 +07:00
releases.exs some refactor and tests 2020-01-21 18:42:00 +03:00
test.exs MediaProxy whitelist setting now supports hosts with scheme 2020-07-12 12:41:40 +03:00