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
ReadWriteRouter— Read-write splitting routerLoadBalanceStrategy— Load balancing strategyHealthChecker— Health check and failoverWeightedSlave— Weighted slave configurationReadRationing— Read-write ratio controlLatencyStats— Latency statistics
Modules§
- circuit_
breaker - 断路器模式
- replication_
lag - 复制延迟监控
Structs§
- Health
Checker - Health checker: tracks each slave’s health status and supports failover
- Latency
Snapshot - Latency statistics snapshot for a single slave
- Latency
Stats - Latency statistics: maintains an independent
LatencySnapshotfor each slave - Read
Rationing - Read-write ratio controller: routes read requests to master (strong consistency read) or slave (weak consistency read) by ratio
- Read
Write Router - Read-write splitting router
- Weighted
Slave - Weighted slave configuration
Enums§
- Load
Balance Strategy - Load balancing strategy
- Slave
Health - Slave health status