YugabyteDB utilizes Raft for both leader election and data replication in its distributed SQL database architecture, applying the consensus algorithm at an individual shard level where each shard has its own Raft group. This allows for strong consistency with zero data loss writes, continuous availability even under node/disk/network failures, rapid scale-out and scale-in with auto-rebalancing, high performance with quorumless reads and tunable latency, and a unique combination of automated sharding and Raft-based replication that frees application developers from traditional compromises.