mirror of
https://github.com/penpot/penpot.git
synced 2025-05-04 07:36:00 +02:00
✨ Increase internal s3 http client limits
Tries to improve performance of accidental spikes/bursts of requests to s3 service. This is not a final solution to all issues caused by unexpected burst, is a simple improvement to the current apprach.
This commit is contained in:
parent
f8c7f84c18
commit
ba3f84fd6c
1 changed files with 12 additions and 3 deletions
|
@ -62,6 +62,16 @@
|
||||||
"A maximum number of retries on internal operations"
|
"A maximum number of retries on internal operations"
|
||||||
3)
|
3)
|
||||||
|
|
||||||
|
(def ^:private max-concurrency
|
||||||
|
"Maximum concurrent request to S3 service"
|
||||||
|
128)
|
||||||
|
|
||||||
|
(def ^:private max-pending-connection-acquires
|
||||||
|
20000)
|
||||||
|
|
||||||
|
(def default-timeout
|
||||||
|
(dt/duration {:seconds 30}))
|
||||||
|
|
||||||
(declare put-object)
|
(declare put-object)
|
||||||
(declare get-object-bytes)
|
(declare get-object-bytes)
|
||||||
(declare get-object-data)
|
(declare get-object-data)
|
||||||
|
@ -177,9 +187,6 @@
|
||||||
|
|
||||||
;; --- HELPERS
|
;; --- HELPERS
|
||||||
|
|
||||||
(def default-timeout
|
|
||||||
(dt/duration {:seconds 30}))
|
|
||||||
|
|
||||||
(defn- lookup-region
|
(defn- lookup-region
|
||||||
^Region
|
^Region
|
||||||
[region]
|
[region]
|
||||||
|
@ -203,6 +210,8 @@
|
||||||
(.connectionTimeout default-timeout)
|
(.connectionTimeout default-timeout)
|
||||||
(.readTimeout default-timeout)
|
(.readTimeout default-timeout)
|
||||||
(.writeTimeout default-timeout)
|
(.writeTimeout default-timeout)
|
||||||
|
(.maxConcurrency (int max-concurrency))
|
||||||
|
(.maxPendingConnectionAcquires (int max-pending-connection-acquires))
|
||||||
(.build))
|
(.build))
|
||||||
|
|
||||||
client (let [builder (S3AsyncClient/builder)
|
client (let [builder (S3AsyncClient/builder)
|
||||||
|
|
Loading…
Add table
Reference in a new issue