Redis command execution options.
More...
#include <userver/storages/redis/command_control.hpp>
Redis command execution options.
Definition at line 73 of file command_control.hpp.
◆ Strategy
Enumerator |
---|
kDefault | Same as kEveryDc.
|
kEveryDc | Send ~1/N requests to an instance with ping N ms.
|
kLocalDcConductor | Send requests to Redis instances located in local DC (by Conductor info)
|
kNearestServerPing | Send requests to 'best_dc_count' Redis instances with the min ping.
|
Definition at line 74 of file command_control.hpp.
◆ Sentinel
◆ storages::redis::Client
◆ account_in_statistics
bool redis::CommandControl::account_in_statistics = true |
Controls if the command execution accounted in statistics.
Definition at line 114 of file command_control.hpp.
◆ allow_reads_from_master
bool redis::CommandControl::allow_reads_from_master = false |
Allow execution of readonly commands on master node along with replica nodes to facilitate load distribution.
Definition at line 111 of file command_control.hpp.
◆ best_dc_count
size_t redis::CommandControl::best_dc_count = 0 |
◆ chunk_size
std::size_t redis::CommandControl::chunk_size = 0 |
Split execution of multi-key commands (i.e., MGET) to multiple requests.
Definition at line 120 of file command_control.hpp.
◆ force_request_to_master
bool redis::CommandControl::force_request_to_master = false |
◆ force_retries_to_master_on_nil_reply
bool redis::CommandControl::force_retries_to_master_on_nil_reply = false |
If set, command retries are directed to the master instance.
Definition at line 128 of file command_control.hpp.
◆ force_server_id
ServerId redis::CommandControl::force_server_id |
If set, the user wants a specific Redis instance to handle the command. Sentinel may not redirect the command to other instances. strategy is ignored.
Definition at line 125 of file command_control.hpp.
◆ force_shard_idx
std::optional<std::size_t> redis::CommandControl::force_shard_idx |
◆ max_ping_latency
std::chrono::milliseconds redis::CommandControl::max_ping_latency = std::chrono::milliseconds(0) |
◆ max_retries
size_t redis::CommandControl::max_retries = 4 |
The maximum number of retries while executing command.
Definition at line 95 of file command_control.hpp.
◆ strategy
◆ timeout_all
std::chrono::milliseconds redis::CommandControl::timeout_all = std::chrono::milliseconds{2000} |
◆ timeout_single
std::chrono::milliseconds redis::CommandControl::timeout_single = std::chrono::milliseconds{500} |
The documentation for this struct was generated from the following file: