The goal of Serverless is to focus on writing the code that delivers business value and offload everything else to your trusted partners (like Cloud providers or SaaS vendors). You want to iterate quickly and today’s code quickly becomes tomorrow’s technical debt. In this talk we will show why Serverless adoption increases the developer productivity and how to measure it. We will also go through AWS Serverless architectures where you only glue together different Serverless managed services relying solely on configuration, minimizing the amount of the code written.
7. Cognitive Load
• Intrinsic
• Extraneous
• How to automate tests (unit, integration, end-to-end, web, desktop, mobile)
• How to build, package, deploy and run my application
• How to configure monitoring, alerting, auto-scaling, logging and tracing
• How to operate and maintain infrastructure
• How to build-in fault-tolerance and resiliency
• How to make the hardware, networking and application secure
• Germane
8. Cognitive Load
• Intrinsic
• Extraneous
• Germane
• Domain Knowledge (payment, e-commerce)
• Business processes and workflows
9. Cognitive Load
• Intrinsic ->
become fluent in it
• Extraneous ->
minimize amount of what we
implement/operate/support/own by ourselves
• Germane ->
minimize amount of what we have to implement
by ourselves
11. What is holding us back from
being productive?
Technical Debt - reflects the implied cost
of additional rework caused by choosing an
easy (limited) solution now instead of using
a better approach that would take longer
”The Cost of Poor Quality Software in the US: A 2018 Report”
https://www.it-cisq.org/the-cost-of-poor-quality-software-in-the-us-a-2018-report/The-Cost-of-Poor-Quality-Software-in-the-US-2018-Report.pdf
12. Technical Debt
• Even a perfect solution can become the
technical debt over the time
• Version of programming language comes
out of support (Java 8)
• Security considerations forces us to
upgrade one of our dependencies (library
or web application server version)
• One of our dependencies (e.g. to open
source project) is discontinued
13. Technical Debt
Think of what can happen to your software over
the entire life cycle of our product
14. Technical Debt
• is related to amount of code written
• is related to amount of dependencies used
• open source projects, programming
languages, databases, (web) application
servers
15. Legacy Systems are systems that can’t
evolve
”The Cost of Poor Quality Software in the US: A 2018 Report”
https://www.it-cisq.org/the-cost-of-poor-quality-software-in-the-us-a-2018-report/The-Cost-of-Poor-Quality-Software-in-the-US-2018-Report.pdf
Legacy System
17. Evolutionary Architecture –
Fitness functions
• Source code metrics (such as measuring
cyclomatic complexity)
• Unit tests (% of coverage and % of success)
• Performance metrics (such as API latency or
throughput)
• Security (encryption at rest, e.g. checking that all S3
buckets have encryption enabled, or automatic key rotation
for all external APIs, with tools such as the AWS Secrets
Manager)
• ArchUnit, Sonar, CI/CD Tools
Danilo Poccia „ Serverless + Evolutionary Architectures + Safe Deployments = Speed in the Right Direction”
https://blog.usejournal.com/serverless-evolutionary-architectures-safe-deployments-speed-in-the-right-direction-7b4b01e27254
18. The Value Proposition of
Serverless
But let’s talk about of Total Cost of Ownership of
the Serverless paradigm
19. TCO Full Picture
No Infrastructure
Operation and
Maintenance
Forrest Brazeal „The Business Case For Serverless” https://www.trek10.com/blog/business-case-for-serverless
21. TCO Full Picture
No Infrastructure
Operation and
Maintenance
Auto Scaling and
Fault Tolerance
Built in
Forrest Brazeal „The Business Case For Serverless” https://www.trek10.com/blog/business-case-for-serverless
22. Auto Scaling And Faul Tolerance
Built In
• Can you get capacity planning
and auto scaling right?
• Do you want to solve the hard problem
of fault tolerance by yourself?
23. TCO Full Picture
No Infrastructure
Operation and
Maintenance
Auto Scaling and
Fault Tolerance
Built in
Fewer Engineers
Required
Forrest Brazeal „The Business Case For Serverless” https://www.trek10.com/blog/business-case-for-serverless
24. Fewer Engineers Required
By heavily relying on the managed service
you require
• Fewer engineers to start
implementing your new product idea
• Can do more with the same amount of
people
25. TCO Full Picture
No Infrastructure
Operation and
Maintenance
Auto Scaling and
Fault Tolerance
Built in
Fewer Engineers
Required
Less Code Written
Forrest Brazeal „The Business Case For Serverless” https://www.trek10.com/blog/business-case-for-serverless
27. TCO Full Picture
No Infrastructure
Operation and
Maintenance
Auto Scaling and
Fault Tolerance
Built in
Fewer Engineers
Required
Less Code Written
Focus on Business
Value and Innovation
Forrest Brazeal „The Business Case For Serverless” https://www.trek10.com/blog/business-case-for-serverless
28. Focus On Business Value and
Innovation
Every organization wants exactly this!
29. TCO Full Picture
No Infrastructure
Operation and
Maintenance
Auto Scaling and
Fault Tolerance
Built in
Fewer Engineers
Required
Less Code Written
Faster Time to
Market
Forrest Brazeal „The Business Case For Serverless” https://www.trek10.com/blog/business-case-for-serverless
Focus on Business
Value and Innovation
30. Faster Time To Market
• Time To Market is the key differentiator in
today’s business!
• Ask yourself: what is core for your business
and what you can get as Commodity +(Utility)
as a Service?
31. Serverless Mindset at ip.labs
“Accelerate Innovation and Maximize Business Value with Serverless Applications”
https://www.slideshare.net/AmazonWebServices/accelerate-innovation-and-maximize-business-value-with-serverless-applications-srv212r1-aws-reinvent-2018
32. Serverless Mindset at ip.labs
If AWS offers a managed service with acceptable price
and „good enough“ feature set, use it
• AWS-native aka Serverless is your first option.
• For the price consider the Total Cost of
Ownership (TCO)
If market offers a managed service with acceptable price
and „good enough“ feature set, buy/rent it
• PageryDuty instead of CloudWatch Alarm
• Akamai or Digital Ocean CDN instead of AWS
CloudFront
If you have to manage it by yourself, manage it • Prometheus/Grafana instead of AWS CloudWatch
If you can reconsider requirements, do it • Narrow the scope, get 80% of what you need
from AWS or market, instead of building or hosting it
yourself
• Get faster time to market, don‘t lose the focus
• AWS AppConfig instead of own Feature Toggle
solution
• AWS Step Functions instead of Camunda BPMN
If you have to build it, own it • Business logic in the core domains
Jared Short https://twitter.com/shortjared/status/1100887501047132160?lang=de
33. How to measure success
See DORA State of DevOps 2018-2019 Reports
36. Wardley Maps
Simon Wardley https://www.slideshare.net/swardley/why-the-fuss-about-serverless-88107645
Co-evolution of practices
to become productive
with Serverless
37. Co-evolution of practices with
Serverless 1/2
• True DevOps (even DevSecOps)
• FinDev responsibilities in the teams
• Complete infrastructure automation
• Chaos Engineering
Sheen Brisals “Why the ‘WHY’ matters more than the ‘WHAT’ in Serverless!”
https://medium.com/lego-engineering/why-the-why-matters-more-than-the-what-in-serverless-2ef56c397962
DevOps Topologies: https://web.devopstopologies.com/
38. Co-evolution of practices with
Serverless 2/2
• Each developer has its own (AWS test)
account
• No local testing environment
• Testing in production
• Tied integrations with 3rd party SaaS
Michael Bryzek “What do you know about testing in production?” https://www.youtube.com/watch?v=z-ATZTUgaAo
39. Using Serverless ecosystem will
with the right engineering practices in place will
significantly reduce
• extraneous and germane cognitive load
• the amount of code written
• amount of dependencies (no execution runtime and web
application server to take care of)
40. Serverless with the focus on you
core domains will enable
• iterative development mind set
• experimentation culture
• focus on business value and innovation
• faster time to market
• shipping successful products, which means
we are productive
• evolutionary architectures
41. Evolutionary Architecture –
supports guided, incremental
change across multiple dimensions
• Incremental change
• Appropriate architectural coupling
• Fitness functions
”Architectural Coupling” https://learning.oreilly.com/library/view/building-evolutionary-architectures/9781491986356/ch04.html
• Serverless ecosystem supports
evolutionary architectures really
well
• All Serverless solutions often
suffer from the “Antipattern:
Last 10% Trap”
43. Architecture and
workloads types
• Event-driven
• API-driven
• Batch Job
• Internal Tool
• ML/AI
• Big Data
Image: flickr.com/photos/everywhereatonce/294789504 Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH
44. Lambda Layers
& Lambda
Runtime API
Door opener for use
cases like:
• Big Data
• ML/AI
Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH
45. A Shared File
System for Your
Lambda
Functions
Door opener for use
case like:
• ML/AI
Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH
50. Lambda in VPC:
• The network interface creation happens
when Lambda function is created or its
VPC settings are updated.
Chris Munns: "Announcing improved VPC networking for AWS Lambda functions”
https://aws.amazon.com/de/blogs/compute/announcing-improved-vpc-networking-for-aws-lambda-functions/
51. RDS Proxy –
Generally Available
for Aurora MySQL, Aurora
PostgreSQL, RDS MySQL
and RDS PostgreSQL
Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH
52. Amazon Aurora
Serverless Data
API as beta for MySql
and Postgres available
https://docs.aws.amazon.com/de_de/AmazonRDS/latest/AuroraUserGuide/data-api.html Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH
53. Introducing
Direct Lambda
Resolvers: AWS
AppSync GraphQL
APIs without VTL
Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH“Make AWS API Gateway's Mapping Template testable”
https://github.com/ToQoz/api-gateway-mapping-template
55. Recent CloudWatch Improvements
• Search over multiple Log Groups became possible
• CloudWatch Logs Insights
• enables you to interactively search and analyze your
log data in Amazon CloudWatch Logs
• Embedded Metric Format
• JSON specification used to instruct CloudWatch Logs to
automatically extract metric values embedded in
structured log events.
56. Further Improvement Areas for
Serverless Ecosystem 1/2
• EFS improvements
• Enable calling Lambda upon EFS Events (file created or updated)
• Integrate with AWS compliance service like AWS Config like S3
• CloudWatch improvements
• Observability (no match to Lumigo or Epsagon)
• Alarms (no match to PagerDuty or Lumigo or Epsagon)
• Make AWS ElasticSearch more Serverless
• free from managing the instance family, size and number of
instances
• free from managing the storage (EBS) size behind
57. Further Improvement Areas for
Serverless Ecosystem 2/2
• Decrease the latencies and payload size for Data API
for Aurora Serverless
• CodeCommit improvements
• not nearly comparable to GitHub and BitBucket
• X-Ray support for all Serverless services
• EventBridge
• CloudFormation, SAM and CDK new AWS services or
features support from day 1
58. Serverless in practice
( for large scale projects)
Situation at ip.labs
• Hybrid (still having monolithic java application)
• One team completely serverless for two years
• Another team just started using serverless only technology
60. Before we went serverless...
• Central system administration team
• Tickets prioritized
• Lead to waiting time
Waiting = WASTE
61. No low level administration
• No need for low level administration at networking level
• No servers and no OS
• Less interaction with administration team
67. Architecture for serverless
• 'just functions' - no need for architecture?
• Architecture = long term investment
• Important for large scale projects
76. Namespacing Data
• Each service operates only on
its own data
• HashKey with namespace
prefix
• Policy ensures service can only
access it's own data
• Fine grained access control
79. Why you should separate
• Evolve technology and business independently
• Expect technology changes in the future
• Refactor technology without changing business code