This is definitely a good question. But to my understanding/opinion, this
should be addressed at the database side, and Airflow does not need to know
anything behind it or make any change (it simply accepts a DB connection
URI as *sql_alchemy_conn* in the configuration).

Some related infor/discussions I can find, for your information:
- Postgres:
https://www.postgresql.org/message-id/CANu8Fiy_TFdFAbCt-snjwFP%2BJJs%2B%2B08r1X5Aincf-rb1ikDW%2Bg%40mail.gmail.com
- MariaDB MaxScale (NOTE: MariaDB is a fork of MySQL; MaxScale is MariaDB's
proxy extension; For Airflow, MariaDB is NOT tested/recommended. Here I
just take this as an example for your question):
https://mariadb.com/kb/en/mariadb-maxscale-24-readwritesplit/#readwritesplit-routing-decisions


Let me know if I missed or misunderstood anything.


XD

On Sun, Mar 14, 2021 at 10:41 AM Valeriy Solovyov <[email protected]>
wrote:

> Hello,
>
> It would be nice if we will be able to offload the read load from DB
> Leader by horizontal scaling, which relies on adding more database
> servers to a cluster to fulfill requests and splitting traffic between them.
>
> For example, we have the database Mysql Leader. Leader StandBy and 5
> Followers.
> And HAProxy exposes Readony access to databases on one port and ReadWrite
> access on another.
>
>
>

Reply via email to