:thinking_face: What are your thoughts on the serv...
# random
c
🤔 What are your thoughts on the serverless trend. Some really interesting projects are ruling this space 🚀
b
Serverless is dope to be honest. Quick and way too easy to get started with any projects.
💯 4
Concentrate on the app and functionality and let the big players handle the infra for you.
a
Really like what Vercel is doing in the space.
c
We use serverless technologies heavily for inhouse as well as client projects at ScaleReal TBH : it makes things easy to get started with and not worry about the infra • It’s not truly like build the functionality and you’re done you need to know much more than that(IAM/SecGrp/VPC/ENIs….) • It definitely is easier than micro-services on Kubernetes. • But from the separation of concern point of view i feel things get mixed up infra and business logic gets mixed up. • Serverless apps on Netlify/Vercel are much easier to build and run but the flexibilty on AWS is amazing. Not sure if we can build that kind of complex apps on netlify/vercel P.S. My complete experience is in AWS so things might be different on other cloud platforms
m
@crooked-ghost-83128 have you come across any performance issues? I believe the cold start problem is a common issue with serverless functions (I've personally experienced this with firebase cloud functions)
b
Cold start is an issue when you have a lot of dependencies in your code. Java generally has slower starts in the FaaS services .
👍 1
Try running the same code in Python / Node, there is a good chance it will perform better.
👍 1
h
Serverless in my opinion is well and truly the future. @modern-spoon-64853 @brash-monitor-80970 what is the cold start problem?
👍 1
b
In the background, all FaaS providers create a container for your code and run it in their self managed VM clusters. Cold start is when the creation of the container image takes significant time. It typically happens for the very first invocation of the code. Java for example needs JVM. JRE and whatever modules you choose to import in the code. It makes Java a less preferable choice for Serverless Functions ( AWS Lambda, Azure Functions etc)
m
Just to clarify Anurag's point, it happens for the first invocation after a long time of inactivity (and is not a one time occurrence)
👍 1
h
Ah, makes sense. I haven’t faced that issue at all with NodeJS in Firebase cloud functions or AWS lambdas.
m
@helpful-raincoat-87337 How frequently are your functions being invoked?
h
It varies for different projects. Some are every 12 hours and some every 10 minutes.
c
@modern-spoon-64853 Cold start is a fact that no one can deny but there are remedies for that as well (to reduce it) • Keeping the code size low (the less dependencies the better) • adding VPC used to increase the coldstart time earlier but now it’s fixed • select python/node/go/java/ruby (check the image) • Write warmup lambdas that are scheduled like cron to call your endponts / execute the lambdas
b
I see some interest in Severless here. You should consider joining this event I am organising for AWS User Group Pune. Part 1 can be accessed on YouTube. You will find the link in event description - Check out this Meetup with Pune AWS and Cloud User Group http://meetu.ps/e/J56qS/n2Dpq/d
c
this is it 🔥
👌 1
m
Although serverless definitely looks like the future, there are still some challenges that need to be overcome: • Vendor lock-in (it's difficult to switch between different providers right now) • Latency (cold start issue) • Difficult to debug & monitor • Environment limitations (Most platforms have a restriction on the function execution time/Some platforms restrict external network calls from a function in their free plans) The good news is that the landscape is constantly evolving and emerging products (Lambda@Edge, Vercel, Cloudflare workers) are trying to solve some of these issues
👍 1
b
Yeah. It’s a nascent technology. Lambda, the first tech in this space was launched in 2014. Other challenges come from compliance and Security perspective, You don’t know what happens to the code behind the scene and where the code runs ( is the OS hardened, network protected etc). Also there not a lot of frameworks around it. Serverless.com is the only one I know that exists right now. Debugging and Monitoring are a part of the serverless.com paid version. Checkout a few other companies like Tundra, Gremlin that are trying to complete this ecosystem.
👍 1
a
I read AWS lambda (and some more vendors) have some mechanisms to address cold starts to some extent https://lumigo.io/blog/provisioned-concurrency-the-end-of-cold-starts/ A friend of mine actually was planning to split up his ROR monolith backend into k8s managed microservices, but after reading stuff like this ended up building a bunch of serverless functions in GO and is loving it.
https://workers.cloudflare.com/ Is not very popular but seems performant