[][src]Struct nakadi_types::event_type::EventTypeStatistics

pub struct EventTypeStatistics {
    pub messages_per_minute: u64,
    pub message_size: u64,
    pub read_parallelism: u64,
    pub write_parallelism: u64,
}

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

impl EventTypeStatistics[src]

pub fn new(
    messages_per_minute: u64,
    message_size: u64,
    read_parallelism: u64,
    write_parallelism: u64
) -> Self
[src]

Trait Implementations

impl Clone for EventTypeStatistics[src]

impl Copy for EventTypeStatistics[src]

impl Debug for EventTypeStatistics[src]

impl<'de> Deserialize<'de> for EventTypeStatistics[src]

impl Eq for EventTypeStatistics[src]

impl PartialEq<EventTypeStatistics> for EventTypeStatistics[src]

impl Serialize for EventTypeStatistics[src]

impl StructuralEq for EventTypeStatistics[src]

impl StructuralPartialEq for EventTypeStatistics[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,