Serverless applications pitfalls
wojciech-dabrowski
wojciech-dabrowski
wojc.dabrowski@gmail.com
@grumpycraftsman
https://github.com/cncf/wg-serverless/blob/master/whitepapers/serverless-overview/cncf_serverless_whitepaper_v1.0.pdf
https://github.com/cncf/wg-serverless/blob/master/whitepapers/serverless-overview/cncf_serverless_whitepaper_v1.0.pdf
https://www.datadoghq.com/state-of-serverless/
https://www.datadoghq.com/state-of-serverless/
https://www.itjobswatch.co.uk/jobs/uk/serverless.do
Serverless Architecture
The Future of Cloud Computing
and software development
wojciech-dabrowski
wojciech-dabrowski
wojc.dabrowski@gmail.com
@grumpycraftsman
https://pattern-match.com/
wojciech-dabrowski
wojciech-dabrowski
wojc.dabrowski@gmail.com
@grumpycraftsman
https://pattern-match.com/
Disclaimer
What is serverless?
https://www.bigcommerce.com/blog/saas-vs-paas-vs-iaas/
Serverless traits
Serverless traits
- Complete abstraction of the hosting infrastructure.
Serverless traits
- Complete abstraction of the hosting infrastructure.
- Pay-per-use pricing.
Serverless traits
- Complete abstraction of the hosting infrastructure.
- Pay-per-use pricing.
- Simple and immediate provisioning.
Serverless traits
- Complete abstraction of the hosting infrastructure.
- Pay-per-use pricing.
- Simple and immediate provisioning.
- Elastic scaling on-demand (including to zero).
Serverless traits
- Complete abstraction of the hosting infrastructure.
- Pay-per-use pricing.
- Simple and immediate provisioning.
- Elastic scaling on-demand (including to zero).
- High Availability and redundancy out of the box.
Services examples (AWS)
https://aws.amazon.com/serverless/
https://aws.amazon.com/serverless/
https://aws.amazon.com/serverless/
Serverless traits
- Complete abstraction of the hosting infrastructure.
- Pay-as-you-go pricing.
- Simple and immediate provisioning.
- Elastic scaling on-demand (including to zero).
- High Availability and redundancy out of the box.
Serverless traits
- Complete abstraction of the hosting infrastructure.
- Pay-as-you-go pricing.
- Simple and immediate provisioning.
- Elastic scaling on-demand (including to zero).
- High Availability and redundancy out of the box.
Web apps with user interface
https://youtu.be/oQFORsso2go
Batch processing
https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
Unlimited Auto-scaling
Web apps with user interface
Dealing with cold starts
additional issues
additional issues
- How often warm the Lambda?
additional issues
- How often warm the Lambda?
- It's just one instance anyway.
additional issues
- How often warm the Lambda?
- It's just one instance anyway.
- Monitoring and metrics noise.
additional issues
- How often warm the Lambda?
- It's just one instance anyway.
- Monitoring and metrics noise.
- Increased costs.
https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html
https://aws.amazon.com/blogs/aws/new-provisioned-concurrency-for-lambda-functions/
Serverless traits
- Complete abstraction of the hosting infrastructure.
- Pay-per-use pricing.
- Simple and immediate provisioning.
- Elastic scaling on-demand (including to zero).
- High Availability and redundancy out of the box.
Serverless traits
- Complete abstraction of the hosting infrastructure.
Pay-per-use pricing.- Simple and immediate provisioning.
- Elastic scaling on-demand (including to zero).
- High Availability and redundancy out of the box.
Serverless traits
- Complete abstraction of the hosting infrastructure.
Pay-per-use pricing.- Simple and immediate provisioning.
- Elastic scaling on-demand
(including to zero). - High Availability and redundancy out of the box.
IF cold starts are the problem for you,
serverless is probably not for your use case.
BATCH PROCESSING
Dealing with long running processes
https://youtu.be/1X_jTyqDqsI
AWS
Step Functions
Refactor long-running processes
to multi-step with parallelization.
UNLIMITED AUTO-SCALING
Considering other architecture components
AVOID INTEGRATING SERVERLESS SOLUTIONS
WITH NO-SERVERLESS COMPONENTS.
Serverless is low cost
Doesn't it?
https://www.trek10.com/blog/fargate-vs-lambda
SERVERLESS IS THE MOST COST-EFFICIENT
ON A SMALL AND MEDIUM SCALE.
https://twitter.com/coryodaniel/status/1029414668681469952
https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html
Prepare for the infrastructure evolution
with proper code architecture.
https://en.wikipedia.org/wiki/Hype_cycle#/media/File:Gartner_Hype_Cycle.svg
https://www.gartner.com/en/documents/3987268/hype-cycle-for-compute-infrastructure-2020
https://en.wikipedia.org/wiki/Hype_cycle#/media/File:Gartner_Hype_Cycle.svg
SERVERLESS ARCHITECTURE
THE FUTURE OF CLOUD COMPUTING
AND SOFTWARE DEVELOPMENT
SERVERLESS ARCHITECTURE
THE FUTURE OF CLOUD COMPUTING
AND SOFTWARE DEVELOPMENT
Proper Serverless use cases
Proper Serverless use cases
Rarely or burst used APIs in small/medium scale
Proper Serverless use cases
Rarely or burst used APIs in small/medium scale, only when you don't care about cold starts.
Proper Serverless use cases
Building serverless is considered faster*. Build PoC/MVP stuff with proper code architecture.
Rarely or burst used APIs in small/medium scale, only when you don't care about cold starts.
Proper Serverless use cases
Building serverless is considered faster*. Build PoC/MVP stuff with proper code architecture.
Rarely or burst used APIs in small/medium scale, only when you don't care about cold starts.
*Only if the development team is familiar with the serverless.
Proper Serverless use cases
Building serverless is considered faster*. Build PoC/MVP stuff with proper code architecture.
Rarely or burst used APIs in small/medium scale, only when you don't care about cold starts.
Batch processing, which can be split into multiple small steps.
*Only if the development team is familiar with the serverless.
Proper Serverless use cases
Building serverless is considered faster*. Build PoC/MVP stuff with proper code architecture.
Rarely or burst used APIs in small/medium scale, only when you don't care about cold starts.
Batch processing, which can be split into multiple small steps.
*Only if the development team is familiar with the serverless.
Asynchronous or event-based processes.
warnings
warnings
Serverless is probably not for you if you need stable and short response times.
warnings
Integrating serverless applications with no-serverless components can be disappointing.
Serverless is probably not for you if you need stable and short response times.
warnings
Building serverless applications need some new skills and techniques. Consider additional training or team augmentation if you want to use it effectively.
Integrating serverless applications with no-serverless components can be disappointing.
Serverless is probably not for you if you need stable and short response times.
key takeaways
key takeaways
Serverless is not a new silver bullet that we should use for every purpose. Even in the future.
key takeaways
It is just yet another tool for software engineers/architects to use in proper use cases.
Serverless is not a new silver bullet that we should use for every purpose. Even in the future.
Materials
- https://slides.com/wojciechdabrowski/serverless-applications-pitfalls
- https://martinfowler.com/articles/serverless.html
- https://github.com/cncf/wg-serverless/blob/master/whitepapers/serverless-overview/cncf_serverless_whitepaper_v1.0.pdf
- https://www.datadoghq.com/state-of-serverless
- https://www.itjobswatch.co.uk/jobs/uk/serverless.do
- https://aws.amazon.com/serverless
- https://www.gartner.com/en/documents/3987268/hype-cycle-for-compute-infrastructure-2020
wojciech-dabrowski
wojciech-dabrowski
wojc.dabrowski@gmail.com
@grumpycraftsman
https://pattern-match.com/
https://pattern-match.com/
We're hiring!
Q&A
Serverless applications pitfalls
By Wojciech Dąbrowski
Serverless applications pitfalls
- 87