Skip to main content

Crate sz_orm_rw

Crate sz_orm_rw 

Source
Expand description

§SZ-ORM RW — Read-Write Splitting

Provides master/slave read-write splitting routing, supporting round-robin, random, and least-connections load balancing strategies. Write requests are routed to master, read requests are distributed across the slave cluster.

§Main Types

Modules§

circuit_breaker
断路器模式
replication_lag
复制延迟监控

Structs§

HealthChecker
Health checker: tracks each slave’s health status and supports failover
LatencySnapshot
Latency statistics snapshot for a single slave
LatencyStats
Latency statistics: maintains an independent LatencySnapshot for each slave
ReadRationing
Read-write ratio controller: routes read requests to master (strong consistency read) or slave (weak consistency read) by ratio
ReadWriteRouter
Read-write splitting router
WeightedSlave
Weighted slave configuration

Enums§

LoadBalanceStrategy
Load balancing strategy
SlaveHealth
Slave health status