sqlx
sqlx copied to clipboard
Multiple Hosts, Failover
Hello! It would be great to have a feature like this:
let hosts = vec!["postgres://postgres:password@server1/test".to_string(), "postgres://postgres:password@server2/test".to_string()];
let pool = PgPoolOptions::new() .max_connections(50) .load_balance_hosts(true) .connect(hosts).await?;
Good example: https://www.npgsql.org/doc/failover-and-load-balancing.html?tabs=7
Sorry, if this already exists.. Thanks!
Seems like a duplicate of https://github.com/launchbadge/sqlx/issues/2290 That Issue also has more context what "failover" means for the specific databases