Skip to content

Commit 2698d79

Browse files
authored
Updated publishers/subscriber maxs. (#779)
## 📝 Summary Using 1 seems to have problems if the process is killed.
1 parent f09fc5f commit 2698d79

File tree

1 file changed

+7
-5
lines changed
  • crates/rbuilder-operator/src/bidding_service_wrapper/fast_streams

1 file changed

+7
-5
lines changed

crates/rbuilder-operator/src/bidding_service_wrapper/fast_streams/helpers.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,17 @@ pub const SCRAPED_BIDS_MAX_BUFFERS: usize = 1000;
8585
/// New samples can eventually come from different scrapers each with it's own thread but we will never have more than 100 different scrapers.
8686
const SCRAPED_MAX_LOAN_SAMPLES: usize = 100;
8787

88+
/// IMPORTANT: MAX_PUBLISHERS must be >= 2 since with 1, if the process dies, we've seen the connection fail for ever. We choose 3 to be safe.
89+
/// We also chose 3 instead of 1 to be safe with the MAX_SUBSCRIBERS.
8890
/// Should have only a single publisher.
89-
const BLOCKS_SERVICE_MAX_PUBLISHERS: usize = 1;
91+
const BLOCKS_SERVICE_MAX_PUBLISHERS: usize = 3;
9092
/// Should have only a single subscriber.
91-
const BLOCKS_SERVICE_MAX_SUBSCRIBERS: usize = 1;
93+
const BLOCKS_SERVICE_MAX_SUBSCRIBERS: usize = 3;
9294

9395
/// Should have only a single publisher.
94-
const SCRAPED_BIDS_SERVICE_MAX_PUBLISHERS: usize = 1;
96+
const SCRAPED_BIDS_SERVICE_MAX_PUBLISHERS: usize = 3;
9597
/// Should have only a single subscriber..
96-
const SCRAPED_BIDS_SERVICE_MAX_SUBSCRIBERS: usize = 1;
98+
const SCRAPED_BIDS_SERVICE_MAX_SUBSCRIBERS: usize = 3;
9799

98100
/// We only want newest item.
99101
pub const LAST_ITEM_MAX_BUFFERS: usize = 1;
@@ -104,7 +106,7 @@ pub const LAST_ITEM_MAX_LOAN_SAMPLES: usize = 2;
104106
/// I don't think we would ever have more than 5 but we play it safe.
105107
pub const SLOT_BIDDER_SEAL_BID_COMMAND_SERVICE_MAX_PUBLISHERS: usize = 10;
106108
/// We should only have a single subscriber to the slot bidder seal bid command service since we spawn a single thread to poll for them.
107-
pub const SLOT_BIDDER_SEAL_BID_COMMAND_SERVICE_MAX_SUBSCRIBERS: usize = 1;
109+
pub const SLOT_BIDDER_SEAL_BID_COMMAND_SERVICE_MAX_SUBSCRIBERS: usize = 3;
108110

109111
pub const SERVICE_MAX_PUBLISHERS: usize = 10;
110112
pub const SERVICE_MAX_SUBSCRIBERS: usize = 10;

0 commit comments

Comments
 (0)