4 ms·
We are currently building the infrastructure for prismagraphql.com - a service that layers a GraphQL API over your existing databases. Lambda has some character
by sorenbs 9y ago
We are currently building the infrastructure for prismagraphql.com - a service that layers a GraphQL API over your existing databases. Lambda has some characteristics that would fit very well. We want to offer a service that:
- has a very low base cost
- scales quickly to thousands of req/s
Operating this on lambda has some significant downsides:
- no request multiplexing
- warm up overhead (lambda itself, our service, connections)
As we are operating at large scale we can invest in building infrastructure that supports this with more traditional AWS primitives.
In broad terms our approach is to:
- operate a t2.micro for each tenant
- use burst capacity to bridge scale up periods
- switch to c5 instances when a cluster reaches higher load.
This is a lot of operational overhead, but because we operate thousands of clusters we can fully automate this.
As a user of Prisma you can consume your database via a GraphQL API over http. This is a great benefit when developing serverless functions as Prisma essentially moves db connection pooling outside your serverless functions.