, 16 tweets, 9 min read Read on Twitter
The last speaker of #DevOpsDays Geneva is @RonYishai, talking about bottlenecks in serverless applications.
I love @RonYishai’s shirt. :) #DevOpsDays It says “I see dead functions”
What is serverless? Can be seen as part of an ongoing evolution of tech: more focus on business logic, less concern about stack implementation (also less control over it). #devopsdays @RonYishai
Serverless usually lets you pay for only the load you use; out of the box auto-scaling, including down to zero. Less cost, less ops (‘LowOps’), so higher dev velocity. #DevOpsDays @RonYishai
But... you get limited running time (15 mins on OpenFaaS), limited memory, cold starts 🥶, and your functions are all stateless. All you have are the data that the function was triggered with. Can make monitoring tough! #DevOpsDays @RonYishai
Serverless means microservices, highly distributed and event-driven. We utilise many different services via managed APIs. Look at all the services in this example from HSBC! This is already happening. #devopsdays @RonYishai System diagram with many different services
Bottlenecks in a simple non-serverless example could be the servers’ limitations in CPU, RAM, storage. We also have software-logic bottlenecks: in-memory queues for example. We need to monitor where these show up. #DevOpsDays @RonYishai
Here’s a serverless application using Kinesis and Lambda services. It looks very simple but can also have bottlenecks. We can see this by watching the age of iterators entering Lambda rising and peaking (and we get that graph automatically). #devopsday @RonYishai
Kinesis could be the bottleneck. It uses multiple shards to process data: use shard-level metrics to check that, and increase number of shards if not enough. #devopsdays @RonYishai
Lambda can also timeout. You might need to adjust its memory limit, or adjust the batch size from Kinesis. Past a certain CPU limit, there’s no more return in processing speed, so you should tune it carefully. #devopsdays @RonYishai
- use at least 512 MB of memory when doing HTTPS
- use >1.8 GB to unlock another core and get more done!
#devopsdays @RonYishai
Final potential bottleneck in our example: the DynamoDB read/write limit. You can easily use autoscaling here, but set a min *and* max limit. (If it scales down too small, it will take too long to scale up when needed again.) #devopsdays @RonYishai
People tend to worry about cold starts, but it’s really not a big deal for serverless apps. (Unless you really *always* need very fast response times.) Do be aware of concurrency limits. But the biggest bottleneck cause is using unscalable resources. #devopsdays @RonYishai
In conclusion: know what you’re putting into your serverless application! Find out what the limitations of services are, which ones can scale, etc. Choose an event-driven flow. Set good limits! #DevOpsDays @RonYishai
Monitoring: distributed tracing is important, and so is cost monitoring. Load test the system before things break in production! #devopsdays @RonYishai
@threadreaderapp Unroll, tack.
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Rae Knowler
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!