Technologies like Rate limiting, Firewall and Traffic shaping can control the traffic. Tools such as Cloudflare, AWS WAF, or iptables can enforce these limits based on IP, region, or request volume.
If you site is hacked Immediately take the site offline and reset all passwords.
Scan for malware, restore from a clean backup, and patch any security vulnerabilities.