I think this is necessary :)
Thank you!
--
Ticket URL: <https://code.djangoproject.com/ticket/28270>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Adam (Chainz) Johnson (added)
* component: Uncategorized => Database layer (models, ORM)
--
Ticket URL: <https://code.djangoproject.com/ticket/28270#comment:1>
--
Ticket URL: <https://code.djangoproject.com/ticket/28270#comment:2>
Comment (by Adam (Chainz) Johnson):
I've never used Galera, but as far as I understand it has unique behaviour
and limitations in order to make it distributed, as per
https://mariadb.com/kb/en/mariadb/mariadb-galera-cluster-known-
limitations/ . Django probably can't "just work" in all cases with galera
and it would need significant testing. Also Django isn't even tested
against MariaDB yet, though I have no problems with it.
I think for using a Galera cluster with a list of servers you'd need extra
logic in the database backend. I'd recommend you try writing one that
inherits from Django's built-in mysql backend, and then uses a random
server from a configured list when opening each new connection. You'd need
extra logic to keep track of which servers have failed to connect
recently, not use them, and then retry them after time passing. It would
need thorough testing to ensure it can survive all the vagaries of
distributed systems.
Given the relatively low usage of Galera (afaik) and the fact that Django
isn't even tested on MariaDB at the moment, I don't see this being added
to Django any time soon.
--
Ticket URL: <https://code.djangoproject.com/ticket/28270#comment:3>
* status: new => closed
* resolution: => wontfix
Comment:
It sounds like a third-party database backend is the best way to proceed.
--
Ticket URL: <https://code.djangoproject.com/ticket/28270#comment:4>