3 ms·
> As much as I hate to admit it (I love my servers) I think serverless is the future for most CRUD / admin API's. The pattern for CRUD is pretty straightforwar
by permanentdecaf 9y ago
> As much as I hate to admit it (I love my servers) I think serverless is the future for most CRUD / admin API's.
The pattern for CRUD is pretty straightforward, you have an API that sits in front of a memcache/redis layer and a database. There's nothing really stateful about the API, so it should be a good candidate for a lambda function.
However, since a lambda function is stateless, that means you can't maintain a connection to a caching or database layer. As far as I can tell, that means you can't actually build a scalable CRUD API with lambda?
- tlarkworthy 9y agoI can't speak generally, but TCP connections stay warm between invocations with Google Cloud Functions.
- nicodjimenez 9y agoI think you COULD but it's true you might end up with one DB connection per API call which might overwhelm your database server if you have too many concurrent requests that would be better off sharing a connection pool. For such scenarios you'd want more control than what serverless paradigms offer. On the other hand, most admin type API's don't get called very often.