Rapira is a PHP application server. A Rust host embeds the PHP interpreter in forked worker processes and hands them HTTP and gRPC work. This glossary names the concepts that the host, the PHP contract and the docs share.
Master: The single parent process. It binds the listeners, forks the workers of every pool and supervises them. Avoid: parent process, daemon, main process
Worker: One forked process with one PHP interpreter. It serves the units of one pool. Avoid: child, PHP process; never the app code or a thread
Pool: The worker set of one plugin, with its entrypoint, mode and process count. Avoid: worker group, cluster, farm
Recycle: The replacement of the app instance inside a worker by a fresh one, after max requests or a reload. The worker process stays. Avoid: restart, respawn, reboot
Drain: The end of a worker. It pulls no new units, finishes the units it holds within a grace period, then exits. Avoid: graceful shutdown, graceful stop, wind down
Scoreboard: The shared record of every worker's state and counters, one slot per worker. Avoid: status table, stats, registry
Host: The Rust side of the boundary: the master, and in a worker everything that is not the app. Avoid: runtime, engine, native side, SAPI (for the side as a whole)
App: The PHP application code that a worker runs from the entrypoint. Avoid: worker (for code), script, userland, user code
Entrypoint: The PHP file a pool runs. Avoid: bootstrap, script, index file
Mode: The way the workers of a pool run the app: classic, worker or dispatcher. Avoid: runtime mode, FPM mode
Classic mode: The app runs the entrypoint once per unit.
Worker mode: The app runs the entrypoint once and serves units through a handler and the SAPI superglobals.
Dispatcher mode: The app runs the entrypoint once and receives units as objects from a dispatcher.
Plugin: A protocol the host serves with its own pool, listener and dispatcher: http or grpc. Avoid: module, extension (that is a PHP extension), transport
Middleware (HTTP) / Interceptor (gRPC): One concept with a protocol-conventional name on each side: a host-side stage in front of a plugin's dispatch, applied in list order with the first entry outermost. Avoid: filter, hook, guard, plugin (for a stage), the other protocol's word
Unit:
One piece of work the host hands to the app: an exchange for http, a call for grpc. Work is its PHP interface.
Avoid: job, task, message, request (for the generic concept)
Exchange: The http unit: one request and the response that answers it. Avoid: request (for the whole), transaction, context, connection
Call: The grpc unit: one invocation of one method, unary or streaming. Avoid: request, RPC (as a noun for the unit), exchange
Dispatcher: The per-plugin object from which the app receives units in dispatcher mode. One per process. Avoid: queue, receiver, handler, server
Intake: The bounded queue of a worker between the plugin and the app. Units wait here until the app pulls them. Avoid: worker queue, job queue, mailbox, backlog (that is the kernel listen queue)
Pull: The app taking the next unit from the intake. Avoid: poll, fetch, dequeue
Pending: A unit in the intake that no pull has taken yet.
Active: A unit that a pull took and that is not finalized. Avoid: in flight (for the counter), running
Cycle: One run of the entrypoint in a worker, from startup to shutdown. In classic mode a cycle serves one unit; in worker and dispatcher modes it serves many. Avoid: request (the PHP SAPI sense), run, iteration, session, the garbage collector's cycle
Boot: The phase before serving. For the server: the master binds listeners and loads schemas before the fork. For a cycle: the run of the entrypoint before the app's first pull. A fatal error in the boot is a boot failure, not an app failure. Avoid: startup, bootstrap, warm-up, init
Shed: The host's refusal of a unit the worker cannot serve: 503 for http, UNAVAILABLE for grpc. Avoid: reject, drop, throttle, rate limit
Seal: The host's one publication of a CGI unit's response to the plugin: Head, Chunk and End. A second seal of the same unit sends nothing. Avoid: flush (that is PHP's output step), finalize (the dispatcher-mode term)
Cancelled: A unit whose result is no longer wanted: the client left, the deadline passed, or the host closed the unit. Avoid: aborted, gone, timed out (for the state)
Discarded: A unit closed without an answer, by the host (drain, deadline, client gone) or by the app. Avoid: dropped, aborted
Finalized: A unit with no further outcome possible: it was answered, discarded or cancelled. Avoid: completed, done, closed, committed
Lost: A unit the app released without finalizing it. The worker stays up, and the host fails the unit. Avoid: abandoned, leaked, dropped