Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

On Vercel? How? As long as it's non commercial you should be able to just run it for free there


This been my experience eon Netlify, but not with Vercel. The biggest bottleneck is often the limit of 12 serverless functions per site (technically the limit is dependent on what framework you use which is even more frustrsting).

The function limit is particularly frustrstinb when you need route splitting to avoid slow cold starts or memory limits. I even hit this in a few Astro projects which was particularly suprising - when serverless rendering was an all or nothing option for Astro Vercel was effectively useless on Hobby plans.


The limit of 12 functions is only if you are deploying an API-only project without bundling[1]. The majority of the modern frameworks support bundling, so you can write many, many more APIs (100s+) which compile down to a handful of functions.

This bundling also means fewer cold starts. Bundling is the default for Astro[2]. Also worth noting, on paid plans, functions are kept warm automatically[3].

[1]: https://vercel.com/docs/functions/runtimes#functions-created...

[2]: https://vercel.com/docs/frameworks/astro#configuration-optio...

[3]: https://vercel.com/changelog/vercel-functions-now-have-faste...


Thanks Lee. That makes total sense when using SvelteKit or NextJS on Vercel, when Vercel owns the build step, bundling, and infrastructure you really have a great chance to optimize everything.

Its a bit of a crap shoot with third party frameworks though. With Astro, unless I'm misremembering the timing, they defaulted to bundling per route originally and only changed that when Vercel users ran into issues with the Hobby plan. More interestingly on the timing, I think that was right around the time Vercel took over as Astro's official hosting sponsor. Not sure how much a part that played in the change in defaults.

In general, I'm always hesitant with a build system that I depend on to route split in a way that impacts my actual cost to run. At the end of the day I have little say in how routes are split and little insight into what metrics are used at bundle time to make those decisions. That said, I haven't heard any horror stories with SvelteKit or NextJS on Vercel so the concern may very well be unfounded as long as I stay in the Vercel ecosystem.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: