comparison mod_storage_s3/mod_storage_s3.lua @ 5700: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
parents 83a2fb6df746
children 80702e33ba71
comparison
equal deleted inserted replaced
5699:83a2fb6df746 5700:9de7a1b36efb
111 function driver:open(store, typ) 111 function driver:open(store, typ)
112 local mt = self[typ or "keyval"] 112 local mt = self[typ or "keyval"]
113 if not mt then 113 if not mt then
114 return nil, "unsupported-store"; 114 return nil, "unsupported-store";
115 end 115 end
116 local httpclient = http.new({}); 116 local httpclient = http.new({ connection_pooling = true });
117 httpclient.events.add_handler("pre-request", aws_auth); 117 httpclient.events.add_handler("pre-request", aws_auth);
118 return setmetatable({ store = store; bucket = bucket; type = typ; http = httpclient }, mt); 118 return setmetatable({ store = store; bucket = bucket; type = typ; http = httpclient }, mt);
119 end 119 end
120 120
121 local keyval = { }; 121 local keyval = { };