Running the Daemon on a dedicated host
Some operational scenarios require the Tideways-Daemon to run on a dedicated collection host that is different from the PHP application servers.
This is not a recommended deployment scenario for dedicated/virtualized environments. Running one Tideways-Daemon per dedicated machine or virtual machine will ensure quick and easy communication between the Tideways extension and the host. |
When using Containers, please check our Docker install instructions instead.
By default, the PHP applications communicate with the daemon using a UNIX socket for improved networking speed, but this can be changed to TCP/IP.
As an example, let us assume we are deploying the Tideways-Daemon on a dedicated host reachable via 10.6.168.2
with port 9135
accessible.
The following change to the configuration file /etc/default/tideways-daemon
enables this:
TIDEWAYS_DAEMON_EXTRA="--address=10.6.168.2:9135"
This changes the way the daemon runs, and the PHP applications need to know this location to stop logging on the local socket. This is possible system-wide using the PHP extensions INI settings:
/etc/php/8.3/conf.d/20-tideways.ini
tideways.connection=tcp://10.6.168.2:9135
Now the extensions log to this address instead, and the tideways-daemon on the dedicated host can collect the data for you.
Downsides:
-
Usually tideways-daemon transmits the server name of the application server, but now a central daemon could collect data for multiple servers. You should therefore use
--hostname
to give the central daemon a meaningful name.