Struct nakadi_types::event_type::EventTypeStatistics [−][src]
pub struct EventTypeStatistics { pub messages_per_minute: u64, pub message_size: u64, pub read_parallelism: u64, pub write_parallelism: u64, }
Expand description
Operational statistics for an EventType. This data may be provided by users on Event Type creation. Nakadi uses this object in order to provide an optimal number of partitions from a throughput perspective.
This field defines the number of partitions in the underlying Kafka topic of an event type. The amount of partitions is given by the expression max(read_parallelism, write_parallelism). The maximum number of partitions is specific to each deployment of Nakadi and should be referred to in a separated document.
For historical reasons the way that the number of partitions is defined is not as straighforward as it could. The fields messages_per_minute and message_size could potentially influence the resulting amount of partitions, so it’s recommended to set both of them to 1 (one). Providing values different than 1 could result in a higher number of partitions being created.
For those interested in why these fields exist, in the beginning of the project the developers run a very rudimentary benchmark to understand how much data could be ingested by a single Kafka topic-partition. This benchmark data was later used by this feature to define the suposedely ideal number of partitions for the user’s needs. Over time the maintainers of the project found this benchmark to be unreliable, usually resulting in fewer partitions than needed.
See also Nakadi Manual
Fields
messages_per_minute: u64
Write rate for events of this EventType. This rate encompasses all producers of this EventType for a Nakadi cluster.
Measured in event count per minute.
message_size: u64
Average message size for each Event of this EventType. Includes in the count the whole serialized form of the event, including metadata. Measured in bytes.
read_parallelism: u64
Amount of parallel readers (consumers) to this EventType.
write_parallelism: u64
Amount of parallel writers (producers) to this EventType.
Implementations
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for EventTypeStatistics
impl Send for EventTypeStatistics
impl Sync for EventTypeStatistics
impl Unpin for EventTypeStatistics
impl UnwindSafe for EventTypeStatistics
Blanket Implementations
Mutably borrows from an owned value. Read more