by Nurbek-F on 4/13/23, 6:00 PM with 2 comments
by LinuxBender on 4/13/23, 6:25 PM
Another way to see some statistics would be to front-end the application with HAProxy [2] and pull the stats from it. HAProxy is also available in most Linux repositories. This is probably closest to the mock API server as you describe. The default statistics page shows session rates vs. packet rates but this could be used in conjunction with IPTraf-NG. [3] HAProxy can forward Layer 4 TCP connections or Layer 7 HTTP connections. Stats can be pulled from the command line. Rate limits can be set by IP, unique sessions using cookies and target URL. As a side note, HAProxy's lead developer is a member of HN. [4]
[1] - https://github.com/iptraf-ng/iptraf-ng
[2] - https://www.haproxy.org/
[3] - https://www.haproxy.com/blog/exploring-the-haproxy-stats-pag...