Alex Price
09/18/2021, 10:30 AMApolloApi
and wandering whats the best way to split up services..? I'm usually using AppSync so can just spin up lambdas for various different queries and mutations, but with Apollo everything seems to be in a single lambda 🤔Bshr Ramadan
09/19/2021, 6:17 PMOmi Chowdhury
09/19/2021, 8:22 PMAlex Price
09/20/2021, 8:50 AMAlex Price
09/20/2021, 9:38 AMWe recommend against running your gateway in a serverless environment (such as AWS Lambda), because schema composition increases Apollo Server's startup time. If you do run your gateway in a serverless environment, set your function's timeout to at least 10 seconds to prevent unexpected errors.
Omi Chowdhury
09/20/2021, 1:30 PMJust a little worried about the scaling of it all. Will AWS just spin up a bunch of lambdas as requests come in?Yah here’s invocation count and concurrent executions for my graphql API. If you want to get an idea of schema size - the API docs are here. Cold start time is a bit annoying, maybe affects 10% of requests with provisioned capacity (although I still use the old school method of warming). The second pic is the last 6 hours of usage (so low load time of day since our customers are mostly US based). The calls taking >> 1 second are big mutations that are expected to take that long. I think most of the cold starts are the ones around ~1s. I’ve excluded warming calls from the chart. The last couple of pics are traces of a cold and warm starts. I have been vaguely thinking about reducing the cold start time in various ways, including using a leaner graphql server than apollo, but not a burning issue.