[Django] #28270: Config database to use MariaDB cluster (Galera)

4 views
Skip to first unread message

Django

unread,
Jun 3, 2017, 9:19:20 AM6/3/17
to django-...@googlegroups.com
#28270: Config database to use MariaDB cluster (Galera)
-------------------------------------+-------------------------------------
Reporter: Oz Bar | Owner: nobody
Shalom |
Type: New | Status: new
feature |
Component: | Version: 1.11
Uncategorized | Keywords: database,
Severity: Normal | configurations
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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!

--
Ticket URL: <https://code.djangoproject.com/ticket/28270>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 3, 2017, 1:35:30 PM6/3/17
to django-...@googlegroups.com
#28270: Config database to use MariaDB cluster (Galera)
-------------------------------------+-------------------------------------
Reporter: Oz Bar Shalom | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database, | Triage Stage:
configurations | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* cc: Adam (Chainz) Johnson (added)
* component: Uncategorized => Database layer (models, ORM)


--
Ticket URL: <https://code.djangoproject.com/ticket/28270#comment:1>

Django

unread,
Jun 3, 2017, 1:38:15 PM6/3/17
to django-...@googlegroups.com
#28270: Support MariaDB cluster (Galera)
-------------------------------------+-------------------------------------

Reporter: Oz Bar Shalom | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database, | Triage Stage:
configurations | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

--
Ticket URL: <https://code.djangoproject.com/ticket/28270#comment:2>

Django

unread,
Jun 3, 2017, 2:23:41 PM6/3/17
to django-...@googlegroups.com
#28270: Support MariaDB cluster (Galera)
-------------------------------------+-------------------------------------

Reporter: Oz Bar Shalom | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database, | Triage Stage:
configurations | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Django

unread,
Jun 3, 2017, 9:21:17 PM6/3/17
to django-...@googlegroups.com
#28270: Support MariaDB cluster (Galera)
-------------------------------------+-------------------------------------

Reporter: Oz Bar Shalom | Owner: nobody
Type: New feature | Status: closed

Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution: wontfix

Keywords: database, | Triage Stage:
configurations | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* 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>

Reply all
Reply to author
Forward
0 new messages