It is possible to limit the number of request in HAProxy by using almost any gathered data.

This topic is huge and complexe as it is possible to make everything, depending the needs.
A good introduction can be found on the blog of haproxy.com.

I have a simple cas where I only want to block an IP if the number of requests if too hight.

In a frontend:

stick-table type ip size 1m expire 10s store conn_rate(10s)

tcp-request inspect-delay 10s
tcp-request content track-sc0 src

tcp-request content reject if { sc_conn_rate(0) gt 10 }