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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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 !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.