Comment by jerrygoyal
1 year ago
Here's my workaround for Vercel:
- Enable spend management (https://vercel.com/team_name/~/settings/billing).
- Set webhook to pause the project: https://vercel.com/docs/rest-api/endpoints/projects#pause-a-...
When the amount hits the targeted value, Vercel will call the webhook that pauses the project.
Have you tested it end to end? When was the last time? I'm slightly worried about solutions like that. I like when it's all host's responsibility. (Having your own system on top is nice though)
You could probably set up rate limiting with iptables/nftables as well if it’s a vps.