Mike Pollard
Mike Pollard
TTCTheo's Typesafe Cult
Created by Mike Pollard on 1/23/2024 in #questions
Is the backend of this stack a lambdalith (lambda monolith) when hosted serverless?
The [trpc].ts file is the only file in the /api route but it is dynamic so it allows for different endpoints such as api/trpc/service.get or api/trpc/service2.updated. to be created. Even though they are different, I don't think they create separate lambda functions for each one and instead only have the single lambda with the entire backend application inside. I just wanted to confirm that I am correct in this assumption that the default backend of t3 is a lambda-monolith as there is no documentation talking about this. Bonus question: Are there any concerns with this architecture? If the backend becomes huge and it all resides within a single lambda it seems like there could be bigger issues with cold starts and it might be better to split the code into multiple different lambdas. I'm not sure.
6 replies