Type Definition garage_rpc::rpc_helper::RequestPriority

source ·
pub type RequestPriority = u8;
Expand description

Priority of a request (click to read more about priorities).

This priority value is used to priorize messages in the send queue of the client, and their responses in the send queue of the server. Lower values mean higher priority.

This mechanism is usefull for messages bigger than the maximum chunk size (set at 0x4000 bytes), such as large file transfers. In such case, all of the messages in the send queue with the highest priority will take turns to send individual chunks, in a round-robin fashion. Once all highest priority messages are sent successfully, the messages with the next highest priority will begin being sent in the same way.

The same priority value is given to a request and to its associated response.