Some of the throttling happens in NGINX though not in Discourse. So you need NGINX to have a set_real_ip_from going.
set_real_ip_from