Docker Community Forums

Share and learn in the Docker community.

Webapp doc with SQL doc loadbalanced

hello all
i have read quite some time but could not figure out a way
following is the situation

multiple webapp in Docker container
multiple postgresql in docker - only the app files (with the database file on the storage)

if one sql database connection is available its not a problem but how to do loadbalance (and failover) the database ?

goal is, if you guys maybe already understand

lets say multiple server hosts 10 container each (9 with the webapp and 1 with the sql app)
if on one server the sql app container goes down, it should switch to another sql app container hosted on another server

thx for hints