Opened 3 years ago

Closed 3 years ago

#28270 closed New feature (wontfix)

Support MariaDB cluster (Galera)

Reported by: Oz Bar Shalom Owned by: nobody
Component: Database layer (models, ORM) Version: 1.11
Severity: Normal Keywords: database, configurations
Cc: Adam (Chainz) Johnson Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hey,
I used to use MariaDB as my database server,
Then we decided to extend own single MariaDB server to a cluster,
We did it and I noticed that there is no option to put both servers or the cluster URL as a database server in the configurations.

I think this is necessary :)
Thank you!

Change History (4)

comment:1 Changed 3 years ago by Tim Graham

Cc: Adam (Chainz) Johnson added
Component: UncategorizedDatabase layer (models, ORM)

comment:2 Changed 3 years ago by Oz Bar Shalom

Summary: Config database to use MariaDB cluster (Galera)Support MariaDB cluster (Galera)

comment:3 Changed 3 years ago 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.

comment:4 Changed 3 years ago by Tim Graham

Resolution: wontfix
Status: newclosed

It sounds like a third-party database backend is the best way to proceed.

Note: See TracTickets for help on using tickets.
Back to Top