From 20afdc1cc59f24877e734ba6d05618275b51a1d1 Mon Sep 17 00:00:00 2001 From: Oliver Browne Date: Mon, 19 Aug 2024 17:32:13 +0300 Subject: [PATCH] fix: rollback capture concurrency limit (#24462) --- rust/Cargo.lock | 1 - rust/capture/Cargo.toml | 1 - rust/capture/src/router.rs | 3 --- 3 files changed, 5 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index ae59829f13e8e..923fbc2928641 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -641,7 +641,6 @@ dependencies = [ "thiserror", "time", "tokio", - "tower", "tower-http", "tracing", "tracing-opentelemetry", diff --git a/rust/capture/Cargo.toml b/rust/capture/Cargo.toml index 55ccddd3a0311..97d310f03d662 100644 --- a/rust/capture/Cargo.toml +++ b/rust/capture/Cargo.toml @@ -36,7 +36,6 @@ thiserror = { workspace = true } time = { workspace = true } tokio = { workspace = true } tower-http = { workspace = true } -tower = { workspace = true } tracing = { workspace = true } tracing-opentelemetry = { workspace = true } tracing-subscriber = { workspace = true } diff --git a/rust/capture/src/router.rs b/rust/capture/src/router.rs index c2207d50f23d2..c4d91bf202c13 100644 --- a/rust/capture/src/router.rs +++ b/rust/capture/src/router.rs @@ -8,7 +8,6 @@ use axum::{ Router, }; use health::HealthRegistry; -use tower::limit::ConcurrencyLimitLayer; use tower_http::cors::{AllowHeaders, AllowOrigin, CorsLayer}; use tower_http::trace::TraceLayer; @@ -20,7 +19,6 @@ use crate::prometheus::{setup_metrics_recorder, track_metrics}; const EVENT_BODY_SIZE: usize = 2 * 1024 * 1024; // 2MB const BATCH_BODY_SIZE: usize = 20 * 1024 * 1024; // 20MB, up from the default 2MB used for normal event payloads -const BATCH_CONCURRENCY_LIMIT: usize = 25; // We deploy these pods with 1G of memory, this and the above lets half of that be used for batch posts #[derive(Clone)] pub struct State { @@ -74,7 +72,6 @@ pub fn router< .get(v0_endpoint::event) .options(v0_endpoint::options), ) - .layer(ConcurrencyLimitLayer::new(BATCH_CONCURRENCY_LIMIT)) .layer(DefaultBodyLimit::max(BATCH_BODY_SIZE)); // Have to use this, rather than RequestBodyLimitLayer, because we use `Bytes` in the handler (this limit applies specifically to Bytes body types) let event_router = Router::new()