mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-16 01:42:55 +00:00
## Problem This is mainly to limit our concurrency, rather than to speed up requests (I was doing some sanity checks on performance of the service with thousands of shards) ## Summary of changes - Enable the `diesel:r2d2` feature, which provides an async connection pool - Acquire a connection before entering spawn_blocking for a database transaction (recall that diesel's interface is sync) - Set a connection pool size of 99 to fit within default postgres limit (100) - Also set the tokio blocking thread count to accomodate the same number of blocking tasks (the only thing we use spawn_blocking for is database calls).
36 lines
955 B
TOML
36 lines
955 B
TOML
[package]
|
|
name = "attachment_service"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
aws-config.workspace = true
|
|
aws-sdk-secretsmanager.workspace = true
|
|
camino.workspace = true
|
|
clap.workspace = true
|
|
futures.workspace = true
|
|
git-version.workspace = true
|
|
hyper.workspace = true
|
|
pageserver_api.workspace = true
|
|
pageserver_client.workspace = true
|
|
postgres_connection.workspace = true
|
|
reqwest.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
thiserror.workspace = true
|
|
tokio.workspace = true
|
|
tokio-util.workspace = true
|
|
tracing.workspace = true
|
|
|
|
diesel = { version = "2.1.4", features = ["serde_json", "postgres", "r2d2"] }
|
|
diesel_migrations = { version = "2.1.0" }
|
|
r2d2 = { version = "0.8.10" }
|
|
|
|
utils = { path = "../../libs/utils/" }
|
|
metrics = { path = "../../libs/metrics/" }
|
|
control_plane = { path = ".." }
|
|
workspace_hack = { version = "0.1", path = "../../workspace_hack" }
|
|
|