Implement a custom rate-limiting script to protect an internal API endpoint from traffic spikes at Rubrik.