Details
Description
Supporting socket activation would make each of the following possible for admins:
- Cleaner restarts (the listener socket stays open persistently)
- Network namespace isolation, disallowing any network access beyond the inherited listener port (and connections accepted from it).
- Lazy startup for densely hosted instances. (It's also possible with socket activation to start it eagerly, as usual.)
- Running MariaDB on privileged ports without having to start it initially as root
- Non-racy startup for services (like a PHP site) that depend on connecting to MariaDB. Because systemd opens listener sockets early in boot, they're available even while MariaDB is starting
- Deeper integration into coming network support in future systemd releases
Some examples in C are here:
http://0pointer.de/blog/projects/socket-activation.html
I am willing to sponsor development of this feature.
Gliffy Diagrams
Attachments
Issue Links
- includes
-
MDEV-4606 cmake build to be able to choose sysvinit or systemd (or other) init files
-
- Closed
-
- is blocked by
-
MDEV-427 Provide a systemd script for MariaDB
-
- In Review
-
- relates to
-
MDEV-5713 RFE: Add support for systemd notify feature
-
- In Review
-
-
MDEV-6347 Build RHEL7 packages
-
- Closed
-
- links to
Show 1 more links (1 links to)
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Just for anybody who is not willing to read the whole passionate discussion at (1), I'd like to point out the comment #62 there (2), which summarizes the main cons of using socket activation for a database server. I'd also add another comment, that according at least Fedora guidelines, socket-activated services need to be autostart (3), which is not something we wish from database server, and worth noting that other distros can have similar requirements.
That having in mind, I don't think it's worth trying to implement socket activation now, unless there is some special use case for such a feature.
(1) https://bugzilla.redhat.com/show_bug.cgi?id=714426
(2) https://bugzilla.redhat.com/show_bug.cgi?id=714426#c62
(3) https://fedoraproject.org/wiki/Packaging:Systemd#Socket_activation