Middle+
What was the RPS and the number of connections on Nginx?
sobes.tech AI
Answer from AI
RPS (Requests Per Second) and the number of connections in Nginx can be determined using various tools and metrics:
- For RPS, you can use Nginx access logs and analyze them with
goaccess,awk, or specialized monitoring systems (Prometheus + Grafana). - The number of active connections can be obtained with the command:
nginx_status=$(curl -s http://localhost/nginx_status)
echo "$nginx_status"
Provided that the stub_status module is enabled. The output will include a line like:
Active connections: 291
server accepts handled requests
166309 166309 310704
Reading: 12 Writing: 45 Waiting: 234
- RPS can be roughly estimated from the number of requests over a period from logs or from the
requestscounters in the status.
For an exact answer, the specific configuration and monitoring tools need to be known, but generally, RPS is the number of processed requests per second, and the number of connections is the current count of TCP connections that Nginx is handling.