Allow multiple aggregator loops in the core to try and spread feed subscription/send cost out

This commit is contained in:
James Wilson
2021-08-07 17:08:58 +01:00
parent 9c001bdcfd
commit c99cbee1e9
6 changed files with 156 additions and 65 deletions
@@ -36,6 +36,7 @@ impl Default for ServerOpts {
pub struct CoreOpts {
pub feed_timeout: Option<u64>,
pub worker_threads: Option<usize>,
pub num_aggregators: Option<usize>,
}
impl Default for CoreOpts {
@@ -43,6 +44,7 @@ impl Default for CoreOpts {
Self {
feed_timeout: None,
worker_threads: None,
num_aggregators: None,
}
}
}
@@ -156,6 +158,9 @@ pub async fn start_server(
if let Some(val) = core_opts.worker_threads {
core_command = core_command.arg("--worker-threads").arg(val.to_string());
}
if let Some(val) = core_opts.num_aggregators {
core_command = core_command.arg("--num-aggregators").arg(val.to_string());
}
// Start the server
Server::start(server::StartOpts::ShardAndCore {