Examples on when to use + not use serverless?

Comp Sci senior here. I've been reading up on serverless deployment and I kind of understand what it is now. What I need some help with is understanding serverless functions, like general use cases, advantages, limitations, etc. I would greatly appreciate any examples of when to use SF vs standard managed-server deployment. Thanks!
7 Replies
Neto
Neto2y ago
You need stateful servers (web sockets) Consistent requests (you can draw a line from requests, mostly no peaks) Serverless pricing can be weird if not careful. You pay by the capacity. If you overload a vm you will at max have a service down. With serverless it will scale horizontally as much as the provider can give you (pricing ++) Some tech, like Prisma, isn't the mostly lambda friendly for it's size VM deploys are kinda of well explained and simple. With serverless you usually need more setup or using a lib/service for that
dabrianator
dabrianatorOP2y ago
Could you elaborate a bit more on stateful servers? And thank you for your explanation. Im starting to get it more now
Neto
Neto2y ago
Stateful servers have to keep track of overall requests
dabrianator
dabrianatorOP2y ago
gotcha Thanks a lot for your help!
Neto
Neto2y ago
With serverless, you start a server to handle the request, handle the request, dispose the server (or keep it warm) But you can't be sure the same request will handle subsequent requests You can do any FS write (like storing files) Cuz the machines will remove everything after the use And this also
dabrianator
dabrianatorOP2y ago
i see
Neto
Neto2y ago
For correctly handling ws you need to keep the connection active
Want results from more Discord servers?
Add your server