File tree Expand file tree Collapse file tree 4 files changed +32
-1
lines changed Expand file tree Collapse file tree 4 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ The minor version will be incremented upon a breaking change and the patch versi
34
34
- proto: add ` from_slot ` ([ #477 ] ( https://github.com/rpcpool/yellowstone-grpc/pull/477 ) )
35
35
- proto: add field ` created_at ` to update message ([ #479 ] ( https://github.com/rpcpool/yellowstone-grpc/pull/479 ) )
36
36
- nodejs: add parse err function ([ #483 ] ( https://github.com/rpcpool/yellowstone-grpc/pull/483 ) )
37
+ - geyser: add gRPC server options to config ([ #493 ] ( https://github.com/rpcpool/yellowstone-grpc/pull/493 ) )
37
38
38
39
## 2024-12-01
39
40
Original file line number Diff line number Diff line change 17
17
"accept" : [" gzip" , " zstd" ],
18
18
"send" : [" gzip" , " zstd" ]
19
19
},
20
+ "server_http2_adaptive_window" : null ,
21
+ "server_http2_keepalive_interval" : null ,
22
+ "server_http2_keepalive_timeout" : null ,
23
+ "server_initial_connection_window_size" : null ,
24
+ "server_initial_stream_window_size" : null ,
20
25
"max_decoding_message_size" : " 4_194_304" ,
21
26
"snapshot_plugin_channel_capacity" : null ,
22
27
"snapshot_client_channel_capacity" : " 50_000_000" ,
Original file line number Diff line number Diff line change @@ -192,6 +192,16 @@ pub struct ConfigGrpc {
192
192
/// Number of slots stored for re-broadcast (replay)
193
193
#[ serde( default = "ConfigGrpc::default_replay_stored_slots" ) ]
194
194
pub replay_stored_slots : u64 ,
195
+ #[ serde( default ) ]
196
+ pub server_http2_adaptive_window : Option < bool > ,
197
+ #[ serde( with = "humantime_serde" ) ]
198
+ pub server_http2_keepalive_interval : Option < Duration > ,
199
+ #[ serde( with = "humantime_serde" ) ]
200
+ pub server_http2_keepalive_timeout : Option < Duration > ,
201
+ #[ serde( default ) ]
202
+ pub server_initial_connection_window_size : Option < u32 > ,
203
+ #[ serde( default ) ]
204
+ pub server_initial_stream_window_size : Option < u32 > ,
195
205
}
196
206
197
207
impl ConfigGrpc {
Original file line number Diff line number Diff line change @@ -392,6 +392,22 @@ impl GrpcService {
392
392
. tls_config ( ServerTlsConfig :: new ( ) . identity ( Identity :: from_pem ( cert, key) ) )
393
393
. context ( "failed to apply tls_config" ) ?;
394
394
}
395
+ if let Some ( enabled) = config. server_http2_adaptive_window {
396
+ server_builder = server_builder. http2_adaptive_window ( Some ( enabled) ) ;
397
+ }
398
+ if let Some ( http2_keepalive_interval) = config. server_http2_keepalive_interval {
399
+ server_builder =
400
+ server_builder. http2_keepalive_interval ( Some ( http2_keepalive_interval) ) ;
401
+ }
402
+ if let Some ( http2_keepalive_timeout) = config. server_http2_keepalive_timeout {
403
+ server_builder = server_builder. http2_keepalive_timeout ( Some ( http2_keepalive_timeout) ) ;
404
+ }
405
+ if let Some ( sz) = config. server_initial_connection_window_size {
406
+ server_builder = server_builder. initial_connection_window_size ( sz) ;
407
+ }
408
+ if let Some ( sz) = config. server_initial_stream_window_size {
409
+ server_builder = server_builder. initial_stream_window_size ( sz) ;
410
+ }
395
411
396
412
let filter_names = Arc :: new ( Mutex :: new ( FilterNames :: new (
397
413
config. filter_name_size_limit ,
@@ -456,7 +472,6 @@ impl GrpcService {
456
472
health_reporter. set_serving :: < GeyserServer < Self > > ( ) . await ;
457
473
458
474
server_builder
459
- . http2_keepalive_interval ( Some ( Duration :: from_secs ( 5 ) ) )
460
475
. layer ( interceptor ( move |request : Request < ( ) > | {
461
476
if let Some ( x_token) = & config. x_token {
462
477
match request. metadata ( ) . get ( "x-token" ) {
You can’t perform that action at this time.
0 commit comments