简体   繁体   中英

is there any possibility to provide an alternate db server in django?

is there any possibility to provide an alternate db server in django, so in case if my one db server goes down, it can fetch data from alternate db server and once connection gets back it starts using the primary db server.

I think your problem can be solved by creating DATABASES entries for each server and using DB routers that test whether a DB server is up before actually using it.

I've found this example , that I believe you can reuse right away.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM