Skip to content

Commit

Permalink
environment variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
fulmicoton committed May 8, 2024
1 parent 123572a commit 4b9b3f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions quickwit/quickwit-serve/src/rest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

use std::net::SocketAddr;
use std::sync::Arc;
use std::time::Duration;

use hyper::http::HeaderValue;
use hyper::{http, Method, StatusCode};
Expand Down Expand Up @@ -132,9 +133,10 @@ pub(crate) async fn start_rest_server(
let cors = build_cors(&quickwit_services.node_config.rest_config.cors_allow_origins);

let service = ServiceBuilder::new()
.concurrency_limit(20)
.timeout(Duration::from_millis(500)) // TO NOT MERGE THIS, THIS IS JUST FOR A TEST.
.concurrency_limit(quickwit_common::get_from_env("QW_REST_CONCURRENCY_LIMIT", 5))
.load_shed()
.concurrency_limit(150)
.concurrency_limit(quickwit_common::get_from_env("QW_REST_LOAD_SHED_LIMIT", 30))
.layer(
CompressionLayer::new()
.gzip(true)
Expand Down

0 comments on commit 4b9b3f7

Please sign in to comment.