SlideShare a Scribd company logo
1 of 18
Serverless & Stateless
One year in, what we’ve learnt
Intro
• Been working on distributed apps for 10 years.
• Accordo’s new app has been built serverless* from the ground up and
has been in production seven months
• Why serverless? Simple, get a lot more done for your business by not
worrying about instances and administration.
* Disclaimer: At Accordo, Serverless has a broader meaning than static sites and FaaS
This isn’t all that new
If you struggle to explain to the boss. Think if it as
outsourcing to the best in the business
Simply the next generation of distributed apps and
containerisation
Serverless challenges are often just distributed
app challenges
Main app overview
1. Static website served via
cloudfront. Site is build using
React, Redux and webpack
2. Users authenticate via auth0
3. Access data apis using JWT
and APIGW
4. Most apis are implemented
as lambdas.
5. Main data in RDS postgres
6. Same lambdas for user apis
apso process async messages
Authorization – JWT claims based
Mind your (core) business
• Developers vary in skill, capacity and maturity, but
they’re all expensive for what you get.
• Every day, they turn up and write ‘stuff’. Make sure
they’re working on stuff that matters.
• Any hour spent on functionality not core to your
business is potential waste
Potential waste?
- A/B testing
- Alerting
- Analytics & Tracking
- Authentication
- Database
- Email
- Failover
- Queues & Message processing
- Reporting
- Search
- Automated Tests (not the testing)
- Configuration management
- Logging
- Permissions
Good ROI
Serverless Vs
The Twelve-Factor App
Can feel like a mis-match, but not impossible.
…and getting easier.
https://12factor.net
FaaS Vs Twelve-Factor pain points
- Configuration
- Much improved. was a major pain. Azure and
now AWS have environment variables.
- FaaS frameworks still have a tendency to
bundle config with build and or use named
environments.
- Ideally configuration management and
updates don’t require a re-build of app.
- Build artifacts
- Immutable build artifacts that and can be
deployed to any environment.
- Still Nothing of the shelf, but there are good
SDKs, not that hard to roll your own.
- Managed CI/CD is fine for nano services or
calculators. Be careful of loosing environment
control with larger components (build promotion,
rollbacks, config)
Frameworks
How to Manage your app?
- Developer workflow
- Build  Test  Artifact  Deploy
- Configuration
- Triggers & Endpoints
All frameworks have opinions. Some you’ll agree with.
Some….
Be clear on how you want to work, try not to
compromise
- CI for a user facing app – needs a lot of test
automation
- Its ok, it’s an evolving world, the frameworks will
catch up.
AWSServerless Application Model (SAM)
Log everything
- Logging services are the debugger
- Be careful of sensitive info.
- Log the positive and negative
- Keep them as long as is practical
- console.log(), console.time()
- Excited about AWS X-Ray or other things like Netflix
Vizceral
Warning 1 – alias confusion
AWS lambda Aliases and Versioning -
Great idea, very powerful useful concept but….. no support
for Alias level log groups or configuration.
V3
V2
V1
DEV
UAT
PROD
UAT API Stage
UAT API Stage
UAT API Stage
V2 logs
V2 code
V? config
Warning 2 – the cold start
Cold function invocation is a problem on AWS and
Azure. Webpack and sensible dependency
management helps the load speed.
Best band-aid to keep them alive is Cloudwatch +
a scheduled event. Event input can be
customised to a heartbeat type call.
Cold load is slow. Cold VPC load is like dial-up
speed. If function calls any outside resource it
waits for an ENI. Can be > 30 sec….
Semi related – database calls with
context.callbackWaitsForEmptyEventLoop
Warning 3 – Lambda Fast, API Gateway Slow
Calls to API gateway are routed through
cloudfront. Low traffic* APIs suffer from high
latency delays within cloudfront.
Delays reasons cited are low connection reuse,
routing algorithms and extra SSL handshakes.
This is made worse by app making OPTIONS calls.
You need to manually add ‘Access-Control-Max-
Age’
CORS OPTIONS call often takes ~1 second!
* Low traffic is less than 100 requests per second
Same level of latency affects all APIGW calls.
Common to see 1.5 sec round trip, but just 0.1 sec
lambda execution
Top 3 Integrations
Fastly - Consider a better CDN
Auth0 - Authenticate with anything…
Segment – Integrate with anything
Real-time CDN lets you purge content near
instantly - less than 150ms!
Cache API responses
One integration to rule them all…
Developer first, anything is possible
Testing
Write testable code, Strive for functional
Abstract the calling interface asap (lambda | azure | mocha)
Don’t sweat too much about the mocking side of things. We’re not testing AWS or
Azure
Links
Tidy diagrams https://cloudcraft.co/app
Some Auth strategies
https://aws.amazon.com/blogs/compute/introducing-custom-authorizers-in-amazon-api-gateway
https://auth0.com/docs/integrations/aws-api-gateway
Twelve-factor App https://12factor.net
Lambda Versioning & Aliases http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
One of the latency forum threads
https://forums.aws.amazon.com/message.jspa?messageID=729169#729169
Thanks!
linkedin.com/in/myles-henaghan

More Related Content

What's hot

AWS Customer Presentation - How Runa uses AWS
AWS Customer Presentation - How Runa uses AWS AWS Customer Presentation - How Runa uses AWS
AWS Customer Presentation - How Runa uses AWS Amazon Web Services
 
Cloud development and career path
Cloud development and career pathCloud development and career path
Cloud development and career pathPraveen Hanchinal
 
Keep Cloud Transformation on Track: Nine Best Practices to Avoid or Break Thr...
Keep Cloud Transformation on Track: Nine Best Practices to Avoid or Break Thr...Keep Cloud Transformation on Track: Nine Best Practices to Avoid or Break Thr...
Keep Cloud Transformation on Track: Nine Best Practices to Avoid or Break Thr...Amazon Web Services
 
Accelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSAccelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSAmazon Web Services
 
Is Orchestration the Next Big Thing in DevOps
Is Orchestration the Next Big Thing in DevOpsIs Orchestration the Next Big Thing in DevOps
Is Orchestration the Next Big Thing in DevOpsNati Shalom
 
How Crownbet Disrupted the Australian Market, One Instance at a Time - Sessio...
How Crownbet Disrupted the Australian Market, One Instance at a Time - Sessio...How Crownbet Disrupted the Australian Market, One Instance at a Time - Sessio...
How Crownbet Disrupted the Australian Market, One Instance at a Time - Sessio...Amazon Web Services
 
Cloud computing - A Cloud Career Path
Cloud computing - A Cloud Career PathCloud computing - A Cloud Career Path
Cloud computing - A Cloud Career PathCognixia
 
Building a Python Serverless Applications with AWS Chalice - AWS Online Tech...
 Building a Python Serverless Applications with AWS Chalice - AWS Online Tech... Building a Python Serverless Applications with AWS Chalice - AWS Online Tech...
Building a Python Serverless Applications with AWS Chalice - AWS Online Tech...Amazon Web Services
 
Switching SaaS Hosting From dedicated virtual machines to container-based clu...
Switching SaaS Hosting From dedicated virtual machines to container-based clu...Switching SaaS Hosting From dedicated virtual machines to container-based clu...
Switching SaaS Hosting From dedicated virtual machines to container-based clu...AWS Germany
 
Lessons Learned from building a serverless API
Lessons Learned from building  a serverless APILessons Learned from building  a serverless API
Lessons Learned from building a serverless APIPam Rucinque
 
Techconnectseattle
TechconnectseattleTechconnectseattle
TechconnectseattleBlake Diers
 
Welcome - Kubernetes for the Enterprise - London
Welcome - Kubernetes for the Enterprise - LondonWelcome - Kubernetes for the Enterprise - London
Welcome - Kubernetes for the Enterprise - LondonVMware Tanzu
 
The Power of Partnership & Building a Cloud Native Tier-1 Platform in Paralle...
The Power of Partnership & Building a Cloud Native Tier-1 Platform in Paralle...The Power of Partnership & Building a Cloud Native Tier-1 Platform in Paralle...
The Power of Partnership & Building a Cloud Native Tier-1 Platform in Paralle...VMware Tanzu
 
Container Management with Amazon ECS
Container Management with Amazon ECSContainer Management with Amazon ECS
Container Management with Amazon ECSAWS Germany
 
Connecting VMware Cloud on AWS to Native AWS Services - UKVMUG 2018
Connecting VMware Cloud on AWS to Native AWS Services - UKVMUG 2018Connecting VMware Cloud on AWS to Native AWS Services - UKVMUG 2018
Connecting VMware Cloud on AWS to Native AWS Services - UKVMUG 2018Julian Wood
 
AWS DevOps Event - Innovating with DevOps on AWS
AWS DevOps Event - Innovating with DevOps on AWSAWS DevOps Event - Innovating with DevOps on AWS
AWS DevOps Event - Innovating with DevOps on AWSIan Massingham
 
AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...
AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...
AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...Amazon Web Services
 
The Journey from Monolith to Microservices: a Guided Adventure
The Journey from Monolith to Microservices: a Guided AdventureThe Journey from Monolith to Microservices: a Guided Adventure
The Journey from Monolith to Microservices: a Guided AdventureVMware Tanzu
 

What's hot (20)

DevOps and AWS
DevOps and AWSDevOps and AWS
DevOps and AWS
 
AWS Customer Presentation - How Runa uses AWS
AWS Customer Presentation - How Runa uses AWS AWS Customer Presentation - How Runa uses AWS
AWS Customer Presentation - How Runa uses AWS
 
Cloud development and career path
Cloud development and career pathCloud development and career path
Cloud development and career path
 
Keep Cloud Transformation on Track: Nine Best Practices to Avoid or Break Thr...
Keep Cloud Transformation on Track: Nine Best Practices to Avoid or Break Thr...Keep Cloud Transformation on Track: Nine Best Practices to Avoid or Break Thr...
Keep Cloud Transformation on Track: Nine Best Practices to Avoid or Break Thr...
 
Accelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSAccelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWS
 
Is Orchestration the Next Big Thing in DevOps
Is Orchestration the Next Big Thing in DevOpsIs Orchestration the Next Big Thing in DevOps
Is Orchestration the Next Big Thing in DevOps
 
How Crownbet Disrupted the Australian Market, One Instance at a Time - Sessio...
How Crownbet Disrupted the Australian Market, One Instance at a Time - Sessio...How Crownbet Disrupted the Australian Market, One Instance at a Time - Sessio...
How Crownbet Disrupted the Australian Market, One Instance at a Time - Sessio...
 
Cloud computing - A Cloud Career Path
Cloud computing - A Cloud Career PathCloud computing - A Cloud Career Path
Cloud computing - A Cloud Career Path
 
Building a Python Serverless Applications with AWS Chalice - AWS Online Tech...
 Building a Python Serverless Applications with AWS Chalice - AWS Online Tech... Building a Python Serverless Applications with AWS Chalice - AWS Online Tech...
Building a Python Serverless Applications with AWS Chalice - AWS Online Tech...
 
Switching SaaS Hosting From dedicated virtual machines to container-based clu...
Switching SaaS Hosting From dedicated virtual machines to container-based clu...Switching SaaS Hosting From dedicated virtual machines to container-based clu...
Switching SaaS Hosting From dedicated virtual machines to container-based clu...
 
Lessons Learned from building a serverless API
Lessons Learned from building  a serverless APILessons Learned from building  a serverless API
Lessons Learned from building a serverless API
 
Techconnectseattle
TechconnectseattleTechconnectseattle
Techconnectseattle
 
Introduction to DevOps on AWS
Introduction to DevOps on AWSIntroduction to DevOps on AWS
Introduction to DevOps on AWS
 
Welcome - Kubernetes for the Enterprise - London
Welcome - Kubernetes for the Enterprise - LondonWelcome - Kubernetes for the Enterprise - London
Welcome - Kubernetes for the Enterprise - London
 
The Power of Partnership & Building a Cloud Native Tier-1 Platform in Paralle...
The Power of Partnership & Building a Cloud Native Tier-1 Platform in Paralle...The Power of Partnership & Building a Cloud Native Tier-1 Platform in Paralle...
The Power of Partnership & Building a Cloud Native Tier-1 Platform in Paralle...
 
Container Management with Amazon ECS
Container Management with Amazon ECSContainer Management with Amazon ECS
Container Management with Amazon ECS
 
Connecting VMware Cloud on AWS to Native AWS Services - UKVMUG 2018
Connecting VMware Cloud on AWS to Native AWS Services - UKVMUG 2018Connecting VMware Cloud on AWS to Native AWS Services - UKVMUG 2018
Connecting VMware Cloud on AWS to Native AWS Services - UKVMUG 2018
 
AWS DevOps Event - Innovating with DevOps on AWS
AWS DevOps Event - Innovating with DevOps on AWSAWS DevOps Event - Innovating with DevOps on AWS
AWS DevOps Event - Innovating with DevOps on AWS
 
AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...
AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...
AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...
 
The Journey from Monolith to Microservices: a Guided Adventure
The Journey from Monolith to Microservices: a Guided AdventureThe Journey from Monolith to Microservices: a Guided Adventure
The Journey from Monolith to Microservices: a Guided Adventure
 

Similar to Serverless meetup Auckland #6

An introduction to Serverless
An introduction to ServerlessAn introduction to Serverless
An introduction to ServerlessAdrien Blind
 
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...Ludovic Piot
 
Server Farms and XML Web Services
Server Farms and XML Web ServicesServer Farms and XML Web Services
Server Farms and XML Web ServicesJorgen Thelin
 
.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp.NET Cloud-Native Bootcamp
.NET Cloud-Native BootcampVMware Tanzu
 
Managing Software from Development to Deployment in the Cloud
Managing Software from Development to Deployment in the CloudManaging Software from Development to Deployment in the Cloud
Managing Software from Development to Deployment in the CloudCloudBees
 
Migrating Jive To The Cloud
Migrating Jive To The CloudMigrating Jive To The Cloud
Migrating Jive To The Cloudmattjive
 
Building for the Cloud | NC CSDN Cloud Conference 2012
Building for the Cloud | NC CSDN Cloud Conference 2012Building for the Cloud | NC CSDN Cloud Conference 2012
Building for the Cloud | NC CSDN Cloud Conference 2012ChinaNetCloud
 
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los AngelesVMware Tanzu
 
Cloud Done Right - PaaS is the Remedy to VM Hangover
Cloud Done Right - PaaS is the Remedy to VM HangoverCloud Done Right - PaaS is the Remedy to VM Hangover
Cloud Done Right - PaaS is the Remedy to VM HangoverMohamad Afshar
 
Cloudy in Indonesia: Java and Cloud
Cloudy in Indonesia: Java and CloudCloudy in Indonesia: Java and Cloud
Cloudy in Indonesia: Java and CloudEberhard Wolff
 
A real-life account of moving 100% to a public cloud
A real-life account of moving 100% to a public cloudA real-life account of moving 100% to a public cloud
A real-life account of moving 100% to a public cloudJulien SIMON
 
Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...
Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...
Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...Amazon Web Services
 
analytic engine - a common big data computation service on the aws
analytic engine - a common big data computation service on the awsanalytic engine - a common big data computation service on the aws
analytic engine - a common big data computation service on the awsScott Miao
 
AWS DevOps: Introduction to DevOps on AWS
  AWS DevOps: Introduction to DevOps on AWS  AWS DevOps: Introduction to DevOps on AWS
AWS DevOps: Introduction to DevOps on AWSDatacademy.ai
 
AWS Community Day - Amy Negrette - Gateways to Gateways
AWS Community Day - Amy Negrette - Gateways to GatewaysAWS Community Day - Amy Negrette - Gateways to Gateways
AWS Community Day - Amy Negrette - Gateways to GatewaysAWS Chicago
 
Deploying couchbaseserverazure cihanbiyikoglu_microsoft
Deploying couchbaseserverazure cihanbiyikoglu_microsoftDeploying couchbaseserverazure cihanbiyikoglu_microsoft
Deploying couchbaseserverazure cihanbiyikoglu_microsoftCihan Biyikoglu
 
Refactoring Web Services on AWS cloud (PaaS & SaaS)
Refactoring Web Services on AWS cloud (PaaS & SaaS)Refactoring Web Services on AWS cloud (PaaS & SaaS)
Refactoring Web Services on AWS cloud (PaaS & SaaS)IRJET Journal
 
SRV205 Architectures and Strategies for Building Modern Applications on AWS
 SRV205 Architectures and Strategies for Building Modern Applications on AWS SRV205 Architectures and Strategies for Building Modern Applications on AWS
SRV205 Architectures and Strategies for Building Modern Applications on AWSAmazon Web Services
 

Similar to Serverless meetup Auckland #6 (20)

An introduction to Serverless
An introduction to ServerlessAn introduction to Serverless
An introduction to Serverless
 
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
 
Server Farms and XML Web Services
Server Farms and XML Web ServicesServer Farms and XML Web Services
Server Farms and XML Web Services
 
.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp
 
Managing Software from Development to Deployment in the Cloud
Managing Software from Development to Deployment in the CloudManaging Software from Development to Deployment in the Cloud
Managing Software from Development to Deployment in the Cloud
 
Migrating Jive To The Cloud
Migrating Jive To The CloudMigrating Jive To The Cloud
Migrating Jive To The Cloud
 
Building for the Cloud | NC CSDN Cloud Conference 2012
Building for the Cloud | NC CSDN Cloud Conference 2012Building for the Cloud | NC CSDN Cloud Conference 2012
Building for the Cloud | NC CSDN Cloud Conference 2012
 
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles
 
Cloud Done Right - PaaS is the Remedy to VM Hangover
Cloud Done Right - PaaS is the Remedy to VM HangoverCloud Done Right - PaaS is the Remedy to VM Hangover
Cloud Done Right - PaaS is the Remedy to VM Hangover
 
Cloudy in Indonesia: Java and Cloud
Cloudy in Indonesia: Java and CloudCloudy in Indonesia: Java and Cloud
Cloudy in Indonesia: Java and Cloud
 
Containerization Strategy
Containerization StrategyContainerization Strategy
Containerization Strategy
 
A real-life account of moving 100% to a public cloud
A real-life account of moving 100% to a public cloudA real-life account of moving 100% to a public cloud
A real-life account of moving 100% to a public cloud
 
Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...
Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...
Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...
 
analytic engine - a common big data computation service on the aws
analytic engine - a common big data computation service on the awsanalytic engine - a common big data computation service on the aws
analytic engine - a common big data computation service on the aws
 
AWS DevOps: Introduction to DevOps on AWS
  AWS DevOps: Introduction to DevOps on AWS  AWS DevOps: Introduction to DevOps on AWS
AWS DevOps: Introduction to DevOps on AWS
 
AWS Community Day - Amy Negrette - Gateways to Gateways
AWS Community Day - Amy Negrette - Gateways to GatewaysAWS Community Day - Amy Negrette - Gateways to Gateways
AWS Community Day - Amy Negrette - Gateways to Gateways
 
Deploying couchbaseserverazure cihanbiyikoglu_microsoft
Deploying couchbaseserverazure cihanbiyikoglu_microsoftDeploying couchbaseserverazure cihanbiyikoglu_microsoft
Deploying couchbaseserverazure cihanbiyikoglu_microsoft
 
Refactoring Web Services on AWS cloud (PaaS & SaaS)
Refactoring Web Services on AWS cloud (PaaS & SaaS)Refactoring Web Services on AWS cloud (PaaS & SaaS)
Refactoring Web Services on AWS cloud (PaaS & SaaS)
 
Cloud Computing basic
Cloud Computing basicCloud Computing basic
Cloud Computing basic
 
SRV205 Architectures and Strategies for Building Modern Applications on AWS
 SRV205 Architectures and Strategies for Building Modern Applications on AWS SRV205 Architectures and Strategies for Building Modern Applications on AWS
SRV205 Architectures and Strategies for Building Modern Applications on AWS
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 

Serverless meetup Auckland #6

  • 1. Serverless & Stateless One year in, what we’ve learnt
  • 2. Intro • Been working on distributed apps for 10 years. • Accordo’s new app has been built serverless* from the ground up and has been in production seven months • Why serverless? Simple, get a lot more done for your business by not worrying about instances and administration. * Disclaimer: At Accordo, Serverless has a broader meaning than static sites and FaaS
  • 3. This isn’t all that new If you struggle to explain to the boss. Think if it as outsourcing to the best in the business Simply the next generation of distributed apps and containerisation Serverless challenges are often just distributed app challenges
  • 4. Main app overview 1. Static website served via cloudfront. Site is build using React, Redux and webpack 2. Users authenticate via auth0 3. Access data apis using JWT and APIGW 4. Most apis are implemented as lambdas. 5. Main data in RDS postgres 6. Same lambdas for user apis apso process async messages
  • 5. Authorization – JWT claims based
  • 6. Mind your (core) business • Developers vary in skill, capacity and maturity, but they’re all expensive for what you get. • Every day, they turn up and write ‘stuff’. Make sure they’re working on stuff that matters. • Any hour spent on functionality not core to your business is potential waste
  • 7. Potential waste? - A/B testing - Alerting - Analytics & Tracking - Authentication - Database - Email - Failover - Queues & Message processing - Reporting - Search - Automated Tests (not the testing) - Configuration management - Logging - Permissions Good ROI
  • 8. Serverless Vs The Twelve-Factor App Can feel like a mis-match, but not impossible. …and getting easier. https://12factor.net
  • 9. FaaS Vs Twelve-Factor pain points - Configuration - Much improved. was a major pain. Azure and now AWS have environment variables. - FaaS frameworks still have a tendency to bundle config with build and or use named environments. - Ideally configuration management and updates don’t require a re-build of app. - Build artifacts - Immutable build artifacts that and can be deployed to any environment. - Still Nothing of the shelf, but there are good SDKs, not that hard to roll your own. - Managed CI/CD is fine for nano services or calculators. Be careful of loosing environment control with larger components (build promotion, rollbacks, config)
  • 10. Frameworks How to Manage your app? - Developer workflow - Build  Test  Artifact  Deploy - Configuration - Triggers & Endpoints All frameworks have opinions. Some you’ll agree with. Some…. Be clear on how you want to work, try not to compromise - CI for a user facing app – needs a lot of test automation - Its ok, it’s an evolving world, the frameworks will catch up. AWSServerless Application Model (SAM)
  • 11. Log everything - Logging services are the debugger - Be careful of sensitive info. - Log the positive and negative - Keep them as long as is practical - console.log(), console.time() - Excited about AWS X-Ray or other things like Netflix Vizceral
  • 12. Warning 1 – alias confusion AWS lambda Aliases and Versioning - Great idea, very powerful useful concept but….. no support for Alias level log groups or configuration. V3 V2 V1 DEV UAT PROD UAT API Stage UAT API Stage UAT API Stage V2 logs V2 code V? config
  • 13. Warning 2 – the cold start Cold function invocation is a problem on AWS and Azure. Webpack and sensible dependency management helps the load speed. Best band-aid to keep them alive is Cloudwatch + a scheduled event. Event input can be customised to a heartbeat type call. Cold load is slow. Cold VPC load is like dial-up speed. If function calls any outside resource it waits for an ENI. Can be > 30 sec…. Semi related – database calls with context.callbackWaitsForEmptyEventLoop
  • 14. Warning 3 – Lambda Fast, API Gateway Slow Calls to API gateway are routed through cloudfront. Low traffic* APIs suffer from high latency delays within cloudfront. Delays reasons cited are low connection reuse, routing algorithms and extra SSL handshakes. This is made worse by app making OPTIONS calls. You need to manually add ‘Access-Control-Max- Age’ CORS OPTIONS call often takes ~1 second! * Low traffic is less than 100 requests per second Same level of latency affects all APIGW calls. Common to see 1.5 sec round trip, but just 0.1 sec lambda execution
  • 15. Top 3 Integrations Fastly - Consider a better CDN Auth0 - Authenticate with anything… Segment – Integrate with anything Real-time CDN lets you purge content near instantly - less than 150ms! Cache API responses One integration to rule them all… Developer first, anything is possible
  • 16. Testing Write testable code, Strive for functional Abstract the calling interface asap (lambda | azure | mocha) Don’t sweat too much about the mocking side of things. We’re not testing AWS or Azure
  • 17. Links Tidy diagrams https://cloudcraft.co/app Some Auth strategies https://aws.amazon.com/blogs/compute/introducing-custom-authorizers-in-amazon-api-gateway https://auth0.com/docs/integrations/aws-api-gateway Twelve-factor App https://12factor.net Lambda Versioning & Aliases http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html One of the latency forum threads https://forums.aws.amazon.com/message.jspa?messageID=729169#729169

Editor's Notes

  1. Story of running your app; Dedicated machines  hosted machines on demand  provisioning scripts  auto scaling & load balancing???  infrastructure as code  Docker  Docker as a service   just my code!!!!???
  2. API authorization via custom lambda, JWT, generate user specific policy Web app is React-Redux, webpack Nice diagramming - https://cloudcraft.co/app
  3. https://aws.amazon.com/blogs/compute/introducing-custom-authorizers-in-amazon-api-gateway/ Alternative; https://auth0.com/docs/integrations/aws-api-gateway
  4. New products, young company. You need to focus on building something useful, focus on finding something useful. Don’t get distracted by developers making problems
  5. https://stockfresh.com/image/6706947/concentrated-software-developer-eating-pizza-and-coding New products, young company. You need to focus on building something useful, focus on finding something useful. Don’t get distracted by developers.
  6. Must be able to send any build to any environment Can rollback.
  7. Working in teams vs deploy from your machine? Release approvals? Distributed teams? AB testing?
  8. Currently on log entries, looking at logz.io You’ll quickly outgrow cloudwatch or azure logs. Logs = errors, activity, anomalies, baseline performance
  9. Immutable versions – great idea. Instant rollbacks. Confidence in ‘what’s in there will work’ Instant deploys – just sway an alias to point from V1 to V2 The split brain lambda instance. Who am I? We pulled config from S3 and cached it in a global var. Separate config per invoked ARN. Invoked as ‘PROD’, apply the prod config, continue. It was messy. Problem still there with env vars. Would need to load all vars. That leads to named environments etc  In the end having production and and UAT going to sale cloudwatch log stream was just too messy. We abandoned it and now deploy an entire lambda per environment.
  10. If your function is directly responding to a user consider keeping them alive. If in VPC, it’s essential. Azure has classic deployment mode. Seems a step backwards. We have generic a generic ‘keep alive’ function Semi-related if making a database connection experiment with context.callbackWaitsForEmptyEventLoop With Sequalize and some other libs, this setting can cause the lambda to wait for the connection to time out even though you have your response already. One connection, short timeout, don’t wait.
  11. Double latency - https://forums.aws.amazon.com/message.jspa?messageID=729169#729169 AWS have discussed making Cloudfront part optional for small low volume APIs
  12. Double latency - https://forums.aws.amazon.com/message.jspa?messageID=729169#729169 CDN behaviour is very important to the static app, and becoming so for APIs. More locations, faster purging or invalidating. Controlling response headers Realtime API can cache app reference data and dramatically reduce load times to get your app running sooner. GETs, OPTIONS Auth0: Super flexible platform, Extendable through webtasks, You name it - they support it, Very responsive & helpful support. Cost effective. Segment – So many tools, so many script bundles. Marketing and experimentation teams have shifting opinions and demands. Put on one integration. Back end, front end, your partner services all sending to one stream.
  13. Serverless work in progress; - Step functions for file processing - Two-way notifications over websockets and IoT topics