diff --git a/src/server/startup.rs b/src/server/startup.rs index 8a0e5db..3a1ebee 100644 --- a/src/server/startup.rs +++ b/src/server/startup.rs @@ -160,11 +160,16 @@ async fn start_grpc_server(config: &ServerConfig, app_state: Arc) -> R let server = Server::builder() // Timeout configurations .timeout(Duration::from_secs(60)) // 60 seconds timeout for gRPC requests - .http2_keepalive_interval(Some(Duration::from_secs(30))) - .http2_keepalive_timeout(Some(Duration::from_secs(90))) - .tcp_keepalive(Some(Duration::from_secs(60))) + // HTTP/2 Keepalive settings - 강화된 설정 + .http2_keepalive_interval(Some(Duration::from_secs(10))) // 10초마다 ping + .http2_keepalive_timeout(Some(Duration::from_secs(20))) // 20초 응답 대기 + .http2_adaptive_window(Some(true)) // 적응형 윈도우 크기 + // TCP Keepalive + .tcp_keepalive(Some(Duration::from_secs(20))) // TCP keepalive 20초 // Performance optimizations .max_concurrent_streams(Some(config.max_concurrent_requests as u32)) + .initial_stream_window_size(Some(1024 * 1024)) // 1MB 스트림 윈도우 + .initial_connection_window_size(Some(2 * 1024 * 1024)) // 2MB 연결 윈도우 .tcp_nodelay(true) // Note: accept_http1 removed to allow ELB health checks .add_service(sync_service)