Software /
code /
prosody-modules
Diff
mod_storage_s3/mod_storage_s3.lua @ 5723:9de7a1b36efb
mod_storage_s3: Enable connection pooling added in latest trunk
Speed boost, something like a 30% improvement with http://localhost
Small risk of failed requests due to limits on number of requests per
connection or timeouts.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 11 Nov 2023 23:55:44 +0100 |
parent | 5722:83a2fb6df746 |
child | 5751:80702e33ba71 |
line wrap: on
line diff
--- a/mod_storage_s3/mod_storage_s3.lua Sat Nov 11 22:43:34 2023 +0100 +++ b/mod_storage_s3/mod_storage_s3.lua Sat Nov 11 23:55:44 2023 +0100 @@ -113,7 +113,7 @@ if not mt then return nil, "unsupported-store"; end - local httpclient = http.new({}); + local httpclient = http.new({ connection_pooling = true }); httpclient.events.add_handler("pre-request", aws_auth); return setmetatable({ store = store; bucket = bucket; type = typ; http = httpclient }, mt); end