Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PHP-FPM dashboard #168

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Add PHP-FPM dashboard #168

wants to merge 6 commits into from

Conversation

marein
Copy link
Owner

@marein marein commented Mar 22, 2023

The performance decreases by a good amount with this pull request. Tested on a server that can handle 4500 req/s, the same server with this pull request applied can handle only 3800 req/s. This is probably because of lock contention. If there would be more fpm instances with lower workers instead of one fpm instance with a lot of workers, the contention is lower. Another possibility would be to store the pid as part of the metric and merge them back when querying Prometheus, then the locks are completely gone, however, with the downside of having a higher cardinality.

Expose prometheus metrics and add Grafana dashboard.
The Metrics endpoint is not yet protected.
@marein marein self-assigned this Mar 22, 2023
@marein marein marked this pull request as draft March 22, 2023 23:04
The environment variable APP_METRICS_ALLOWED_IPS
can take a comma-separated list of ip addresses.
Additionally, APP_TRUSTED_PROXIES can be configured.
This is needed because when run, e.g., in a docker
environment, the allowed ips for metrics can cover
the whole ip address range of docker. If the load balancer
runs within the same range, it would always be allowed
to access the metrics endpoint. With trusted proxies,
it would forward the client's ip address, which at the end
would be rejected.
Open metrics endpoint to any client for simplicity
to not maintain the whole ip range of docker on a
non-live system.
@marein marein marked this pull request as ready for review March 25, 2023 10:08
@marein marein force-pushed the 130-add-php-fpm-dashboard branch from 96d49a3 to e7b55b0 Compare April 3, 2023 11:24
@marein marein marked this pull request as draft July 18, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant