Settings

Theme

Cal.com cut cold load times by breaking down tRPC routers

cal.com

7 points by kirillrogovoy 3 years ago · 1 comment

Reader

SpaghettiX 3 years ago

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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection