ranch(7)

NAME

ranch - Socket acceptor pool for TCP protocols

DESCRIPTION

Ranch is a socket acceptor pool for TCP protocols.

Ranch manages listeners which are a set of processes that accept and manage connections. The connection's transport and protocol modules are configured per listener. Listeners can be inspected and reconfigured without interruptions in service.

MODULES

Functions:

    • ranch(3) - Socket acceptor pool
    • ranch_proxy_header(3) - PROXY protocol

Transports:

    • ranch_ssl(3) - SSL transport
    • ranch_tcp(3) - TCP transport

Behaviors:

    • ranch_protocol(3) - Protocol modules
    • ranch_transport(3) - Transport modules

DEPENDENCIES
    • ssl - Secure communication over sockets

All these applications must be started before the ranch application. To start Ranch and all dependencies at once:

    {ok, _} = application:ensure_all_started(ranch).

ENVIRONMENT

The ranch application defines one application environment configuration parameter.

profile (false)
    When enabled, Ranch will start eprof profiling automatically.

    You can use the ranch_app:profile_output/0 function to stop profiling and output the results to the files procs.profile and total.profile. Do not use in production.

SEE ALSO

ssl(7)