Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: improve parallelism #16

Merged
merged 1 commit into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ The minor version will be incremented upon a breaking change and the patch versi
- geyser: wait all transactions before process block ([#10](https://github.com/solana-stream-solutions/solfees/pull/10))
- frontend: init ([#8](https://github.com/solana-stream-solutions/solfees/pull/8))
- geyser: use process_compute_budget_instructions ([#15](https://github.com/solana-stream-solutions/solfees/pull/15))
- api: improve parallelism ([#16](https://github.com/solana-stream-solutions/solfees/pull/16))

### Breaking
4 changes: 2 additions & 2 deletions solfees-be/config-be.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ listen_rpc:
body_limit: 16KiB # Maximum body size
request_calls_max: 5 # Maximum number of calls in on request
request_timeout: 60s # Request timeout (processed by dedicated tasks, see `pool_size`)
request_queue_max: 5000 # Maximum number of requests in the queue (each request can contain max `request_calls_max` calls)
streams_channel_capacity: 300 # Maximum number of messages in WebSocket channel before disconnect
calls_queue_max: 16384 # Maximum number of requests in the queue (each request can contain max `request_calls_max` calls)
streams_channel_capacity: 512 # Maximum number of messages in WebSocket channel before disconnect
pool_size: 2 # Number of workers processing requests (WebSocket streams processed by separate task)
2 changes: 1 addition & 1 deletion solfees-be/src/bin/solfees-be.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async fn main2(config: Config) -> anyhow::Result<()> {
let (solana_rpc, solana_rpc_futs) = SolanaRpc::new(
config.listen_rpc.request_calls_max,
config.listen_rpc.request_timeout,
config.listen_rpc.request_queue_max,
config.listen_rpc.calls_queue_max,
config.listen_rpc.streams_channel_capacity,
config.listen_rpc.pool_size,
);
Expand Down
6 changes: 3 additions & 3 deletions solfees-be/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ pub struct ConfigListenRpc {
pub request_calls_max: usize,
#[serde(with = "humantime_serde")]
pub request_timeout: Duration,
pub request_queue_max: usize,
pub calls_queue_max: usize,
pub streams_channel_capacity: usize,
pub pool_size: usize,
}
Expand All @@ -171,8 +171,8 @@ impl Default for ConfigListenRpc {
body_limit: 16 * 1024, // 16KiB
request_calls_max: 5,
request_timeout: Duration::from_secs(60),
request_queue_max: 5_000,
streams_channel_capacity: 300,
calls_queue_max: 16_384,
streams_channel_capacity: 512,
pool_size: 2,
}
}
Expand Down
Loading