Next.js Discord

Discord Forum

Vercel Serverless Protection

Unanswered
Yacare Caiman posted this in #help-forum
Open in Discord
Avatar
Yacare CaimanOP
Hello, I was wondering if there was any protection on the lambda offer by vercel?

If someone starts spamming my endpoint, it can get costly real fast. I was not able to find much about it.

Thanks

12 Replies

Avatar
linesofcode
Vercel offers ddos protection out of the box
But the level of traffic your app will need to endure
Before it’s considered a true ddos is really high
Instead what you should do
Is setup a rate limiter using nextjs middlewsre
Google upstash rate limit middleware nextjs
And you’ll find a solution.
Avatar
Yacare CaimanOP
I am using golang runtime, it is not related to nextjs. I am just using their serverless
Avatar
linesofcode
Same concept applies
Avatar
Yacare CaimanOP
So I would need to implement rate limiting on my own pretty much
Thanks
Avatar
Yacare CaimanOP
@linesofcode To use edge runtime, I need to be using typescript/js?

It will deploy as edge automatically or I need to be using nextjs with js/ts as backend in api folder?