Add a simple configuration to your project to potentially give you upto 8x more serverless function calls on any of Vercel's tiers.
The above image shows a very simple API with Memory Size customized to 128MB instead of the default 1024MB.
See how GB-Hrs are calculated
Vercel Guide: what-are-gb-hrs-for-serverless-function-execution
Configuring projects with vercel.json
Vercel Docs: Project Configuration
Nextjs 13 App Directory vercel.json
config example
{
"functions": {
"app/api/hello/route.ts": {
"memory": 3008,
"maxDuration": 60
},
"app/api/another/route.ts": {
"memory": 1024,
"maxDuration": 30
}
}
}
Sample vercel.json
with multiple APIs and custom options
Happy Hacking fellow Devs :)
Check out some of my projects if you want to see the source of these discoveries 😀
Top comments (0)