Post AynlTvgwjWCDv8Bbk0 by damien@layer8.space
 (DIR) More posts by damien@layer8.space
 (DIR) Post #AynlTvgwjWCDv8Bbk0 by damien@layer8.space
       2025-10-02T14:36:20Z
       
       0 likes, 1 repeats
       
       #php fans, if you need to connect to a database cluster (e.g. #Galera) for HA purposes, how do you do that?If I remember correctly, mysqlnd_ms used to be able to take multiple database servers and failover if one is not available (similar to JDBC failover) - but of course mysqlnd_ms died ages ago...What's the current PHP pattern to handle this need?
       
 (DIR) Post #AynlTx0pp3hQ16V0Nc by prettygood@socially.drinkingatmy.computer
       2025-10-02T14:41:36.614891Z
       
       0 likes, 0 repeats
       
       @damien in past setups I've just used HAProxy in between and left the PHP connection as simple as possible.  Its one extra thing to fail sure but it kept the code base and deployments simple.
       
 (DIR) Post #AynlcimS6dQiU1xCUK by damien@layer8.space
       2025-10-02T14:42:46Z
       
       1 likes, 0 repeats
       
       @prettygood yeah it's the "but what if HAProxy fails" part... we can have multiple HAProxy nodes, but how to connect PHP to them properly? Seems crazy that everyone just roles their own solution to this?
       
 (DIR) Post #AynlsmMKZILCDROP3I by prettygood@socially.drinkingatmy.computer
       2025-10-02T14:46:08.628211Z
       
       1 likes, 1 repeats
       
       @damien its one time where I think Amazon's RDS is worth the price: you just get a connection endpoint that makes the underlying cluster transparent.  As much as I enjoy data driven work its nice to make it someone else's problem and go back to writing code.
       
 (DIR) Post #AynmUYAFnCFvCBkpNY by damien@layer8.space
       2025-10-02T14:52:17Z
       
       1 likes, 0 repeats
       
       @prettygood hmm maybe something like https://github.com/mirzaaghazadeh/SmartFailover
       
 (DIR) Post #AynmXb7zENk7Ft9BaK by prettygood@socially.drinkingatmy.computer
       2025-10-02T14:53:31.291830Z
       
       0 likes, 0 repeats
       
       @damien hey, that looks like just the ticket.  I might check into this if we need to start queue-juggling with our current work.  Thanks.