Hacker News new | past | comments | ask | show | jobs | submit login
Cal.com cut cold load times by breaking down tRPC routers (cal.com)
7 points by kirillrogovoy on May 16, 2023 | hide | past | favorite | 1 comment



Nice article on optimising tRPC on serverless functions, thanks!

Some of my thoughts: This is a problem that manifests only if you use serverless. also, unfortunately the solution shown is service-specific. The code to split tRPC routers into multiple API routes is different for Next vs. Cloudflare Workers, and so on.

I've enjoyed engineering serverless applications over the past few years, but there are some weird challenges like this one. Other issues (I use Cloudflare Workers) is that it: - runs your code on V8 and not NodeJS, so you don't have the Node APIs (though it tries to add compatibility). - has CPU limit: makes it impossible to resize images or even hash passwords using bcrypt. - Running locally has been a pain (though emulators / miniflare have been developed in recent years).

I would suggest most projects should avoid serverless and stick with conventional technology.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: