Add a dedicated connection pool for Rich Media

Sharing this pool with regular Media is problematic as Rich Media will connect to many different
domains and thrash the pool, but regular Media will have predictable connections to the webservers
hosting media for the fediverse servers you peer with.
This commit is contained in:
Mark Felder 2024-05-27 11:17:02 -04:00
parent 6757382abe
commit a50c657427
2 changed files with 10 additions and 1 deletions

View File

@ -827,6 +827,11 @@
max_waiting: 20, max_waiting: 20,
recv_timeout: 15_000 recv_timeout: 15_000
], ],
rich_media: [
size: 25,
max_waiting: 20,
recv_timeout: 15_000
],
upload: [ upload: [
size: 25, size: 25,
max_waiting: 5, max_waiting: 5,
@ -847,6 +852,10 @@
max_connections: 50, max_connections: 50,
timeout: 150_000 timeout: 150_000
], ],
rich_media: [
max_connections: 50,
timeout: 150_000
],
upload: [ upload: [
max_connections: 25, max_connections: 25,
timeout: 300_000 timeout: 300_000

View File

@ -58,7 +58,7 @@ defp check_content_length(headers) do
defp http_options do defp http_options do
[ [
pool: :media, pool: :rich_media,
max_body: Config.get([:rich_media, :max_body], 5_000_000) max_body: Config.get([:rich_media, :max_body], 5_000_000)
] ]
end end