feat(ingester): optional gossip configuration
Exposes configuration parameters (on the ingester only) for configuration of the gossip sub-system.pull/24376/head
parent
9b52bfdeaa
commit
1ec1b9155a
|
@ -0,0 +1,39 @@
|
|||
//! CLI config for cluster gossip communication.
|
||||
|
||||
use crate::socket_addr::SocketAddr;
|
||||
|
||||
/// Configuration parameters for the cluster gossip communication mechanism.
|
||||
#[derive(Debug, Clone, clap::Parser)]
|
||||
#[allow(missing_copy_implementations)]
|
||||
pub struct GossipConfig {
|
||||
/// A comma-delimited set of seed gossip peer addresses.
|
||||
///
|
||||
/// Example: "10.0.0.1:4242,10.0.0.2:4242"
|
||||
///
|
||||
/// These seeds will be used to discover all other peers that talk to the
|
||||
/// same seeds. Typically all nodes in the cluster should use the same set
|
||||
/// of seeds.
|
||||
#[clap(
|
||||
long = "gossip-seed-list",
|
||||
env = "INFLUXDB_IOX_GOSSIP_SEED_LIST",
|
||||
required = false,
|
||||
num_args=1..,
|
||||
value_delimiter = ',',
|
||||
requires = "gossip_bind_address", // Field name, not flag
|
||||
)]
|
||||
pub seed_list: Vec<String>,
|
||||
|
||||
/// The UDP socket address IOx will use for gossip communication between
|
||||
/// peers.
|
||||
///
|
||||
/// Example: "0.0.0.0:4242"
|
||||
///
|
||||
/// If not provided, the gossip sub-system is disabled.
|
||||
#[clap(
|
||||
long = "gossip-bind-address",
|
||||
env = "INFLUXDB_IOX_GOSSIP_BIND_ADDR",
|
||||
requires = "seed_list", // Field name, not flag
|
||||
action
|
||||
)]
|
||||
pub gossip_bind_address: Option<SocketAddr>,
|
||||
}
|
|
@ -2,10 +2,16 @@
|
|||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::gossip::GossipConfig;
|
||||
|
||||
/// CLI config for the ingester using the RPC write path
|
||||
#[derive(Debug, Clone, clap::Parser)]
|
||||
#[allow(missing_copy_implementations)]
|
||||
pub struct IngesterConfig {
|
||||
/// Gossip config.
|
||||
#[clap(flatten)]
|
||||
pub gossip_config: GossipConfig,
|
||||
|
||||
/// Where this ingester instance should store its write-ahead log files. Each ingester instance
|
||||
/// must have its own directory.
|
||||
#[clap(long = "wal-directory", env = "INFLUXDB_IOX_WAL_DIRECTORY", action)]
|
||||
|
|
|
@ -22,6 +22,7 @@ pub mod catalog_dsn;
|
|||
pub mod compactor;
|
||||
pub mod compactor_scheduler;
|
||||
pub mod garbage_collector;
|
||||
pub mod gossip;
|
||||
pub mod ingester;
|
||||
pub mod ingester_address;
|
||||
pub mod object_store;
|
||||
|
|
|
@ -7,6 +7,7 @@ use clap_blocks::{
|
|||
catalog_dsn::CatalogDsnConfig,
|
||||
compactor::CompactorConfig,
|
||||
compactor_scheduler::CompactorSchedulerConfig,
|
||||
gossip::GossipConfig,
|
||||
ingester::IngesterConfig,
|
||||
ingester_address::IngesterAddress,
|
||||
object_store::{make_object_store, ObjectStoreConfig},
|
||||
|
@ -476,6 +477,10 @@ impl Config {
|
|||
persist_queue_depth,
|
||||
persist_hot_partition_cost,
|
||||
rpc_write_max_incoming_bytes: 1024 * 1024 * 1024, // 1GiB
|
||||
gossip_config: GossipConfig {
|
||||
seed_list: vec![],
|
||||
gossip_bind_address: None,
|
||||
},
|
||||
};
|
||||
|
||||
let router_config = RouterConfig {
|
||||
|
|
Loading…
Reference in New Issue