rfc:fpm:ini_syntax

This is an old revision of the document!


Request for Comments: FPM SAPI inclusion

This RFC discusses the FPM configuration file syntax and it's replacement from XML to INI.

Introduction

FPM (FastCGI Process Manager) is under discussion for its inclusion into the PHP core distribution. See the RFC.

Until now, FPM uses a XML configuration file. It's been discussed several times with passion:

But it comes that we almost all agree to change it to INI. This RFC propose a INI syntax for FPM.

Requirements

  • An include directive to include one or several files at once. This directive can be set everywhere in the configuation files.
  • A global section which include global simple directives (pid_file=, …)
  • At least one worker section wich includes:
    • specific simple directives (user=, group=, status=, …)
    • specific array directives (env[PATH]=, defines[sendmail_path]=, …)
    • a reference system. A worker can be set as a reference and it'll never be instantiated. Classic workers can use it to defined default values. For exemple, timeout directive are set once in a reference worker and normal workers will use this worker as a reference.

Implementation

I propose to implement the previous requirements this way:

  • The include directive is a simple key/value. The key is called include. The value is a pattern recognized by glob(3). With glob(3), a simple file can be set, but also a bunch of file at once (/etc/fpm.d/*.conf).
  • The global section can start with an INI section called globals
    [globals]

    . This INI section is not mandatory if directives are set before any other INI sections.

  • Workers start with a INI section. The value of the section is called with the name of the worker.
    [www.my.site.com]

    . All the following directives are related to this worker until another INI section starts a new worker.

    • a directive to set the worker as a reference. It's called is_a_reference and can be set to yes or no.
      is_a_reference=yes

      .(incompatible with reference).

    • a directive to set the reference to use. It's called reference and can be set to any worker set as a reference by is_a_reference.
      reference=default

      . (incompatible with is_a_reference).



The RFC is not yet finished.

Proposal and Patch

I've started writting the patch. Work In progress.

Changelog

fat - 2010-03-30 - initial RFC version.

rfc/fpm/ini_syntax.1269957375.txt.gz · Last modified: 2017/09/22 13:28 (external edit)