Mike Tougeron
Well-known member
I tried loading a several thousand IP addresses (tor exit nodes, known anon proxies, etc) into the discouraged IP list and I saw a small, but at high load significant, decrease in page performance.
Since a session is created for both anonymous and logged in users there should be a flag set into the session that an IP address has already been checked for being discouraged or not. Users who are not trying to exploit the system will most likely have cookies enabled, and therefor a stable session, and will then not have any performance hit to check for a discouraged IP.
As a side note, it would be nice to have a code hook for XenForo_ControllerPublic_Abstract::_isDiscouraged() and XenForo_ControllerPublic_Abstract::_discourage() so that we can extend & add our own discouragement behavior without having to fork the core file. e.g., when a user is discouraged I want newrelic to ignore the transaction.
Thanks, Mike
Since a session is created for both anonymous and logged in users there should be a flag set into the session that an IP address has already been checked for being discouraged or not. Users who are not trying to exploit the system will most likely have cookies enabled, and therefor a stable session, and will then not have any performance hit to check for a discouraged IP.
As a side note, it would be nice to have a code hook for XenForo_ControllerPublic_Abstract::_isDiscouraged() and XenForo_ControllerPublic_Abstract::_discourage() so that we can extend & add our own discouragement behavior without having to fork the core file. e.g., when a user is discouraged I want newrelic to ignore the transaction.
Thanks, Mike