apache / apache/couchdb

Implement socket activation for couchdb

Open
#5,411 7 comments 0 reactions 0 assignees View on GitHub
enhancement patches-welcome
Dominant language
Erlang
Stars
7k
Forks
1.1k
Avg merge
1d 16h
Merged PRs (30d)
9

Description

Hi,

systemd offers a particular way to start daemons called "socket activation", where systemd does not start a daemon at boot time as a service unit, but itself occupies an inet or unix domain socket, and once that socket is connected for the first time, starts a daemon and passes the socket to the daemon. Very similar to what inetd did on older linux systems, but there is two ways to pass the socket now. See man systemd.socket or google for "socket activation".

Advantage is, that a daemon (here: couchdb server) is not always running, but started only, if it is actually used for the first time.

A daemon/server needs to be able to take a socket handed over instead of a regular bind. Furthermore, it should have some timeout parameter to shut itself down after a given time without connections.

I did not find any documentation about for couchdb, so my guess is that it hasn't been implemented yet.

regards

Contributor guide

Open the contributing guide

Research direction

Start with the systemd.socket documentation and CouchDB's server startup and socket-binding entry points. Determine how inherited inet or Unix sockets and an idle timeout should work, then add tests and documentation demonstrating activation and shutdown.

Written by the indexing model from the issue text.

Assessment

Tech stack
erlang, linux
Domain
backend, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.