SlideShare a Scribd company logo
1 of 31
Rainbows, Unicorns, and
other Fairy Tales in the
Land of Serverless Dreams
Josh Carlisle – AppDynamics
@joshcarlisle
About Me..
•Raleigh, North Carolina
•Developer & Consultant for 20+
years
•Engineer w/ AppDynamics (Cisco)
My Serverless Story
• Over a dozen Serverless implementations
in production today (Azure Functions).
• Along the way I’ve had surprises and
challenges.
• Sharing with you a few of my top
challenges.
• My context is Azure Functions but many
of the concepts are universal.
Those apples look good!
•Different Design Patterns
•New and Emerging Best Practices
•Quickly changing environments and
frameworks.
•Ease of implementation double
edged sword
“Harmless” Serverless Code
Serverless is like Magic!
Until the clock strikes Midnight!
(or more typically 7pm Friday evening)
Thinking about downstream is
very important!
429 – Too Many Requests
Limited Capacity
500 – Server Errors
Availability
Solving mismatched pipes w/ unpredictable flow
Messaging (CQRS Pattern)
Downstream: Do Nothing – Let the request fail.
• Utilize Dead Letter Queues (Poison Queues)
• Ok for occasional more transient issues
• Azure Functions Create Poison Queues Automatically (default 5 failures)
• Do something with the queues!
Requests
Requests-Poison
Downstream: Make your environment scale less
• Implement a more traditional queue based load leveling
• Azure Functions – Standard App Service Plans, Updates Host.json -
(WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT, queue specific
concurrency settings)
• AWS Lamda – Concurrent Execution Limits
• Application has to tolerate potential increased processing latency
Downstream: Schedule your message processing
•Schedule future enqueue time.
•Most messaging platforms support
scheduling future processing such as
Azure’s ServiceBus
•Careful with this technique or you may
bypass safety of poison queues.
Service Bus – Schedule Message
Downstream: Adding Resiliency to your requests.
• Have your code allow for retries and other transient issues.
• Use exponential back-off to improve chances of request going
through.
• Careful not to extend your retries too long (execute time costs &
time limits)
• Share your retry attempts centrally to allow multiple instances to
be aware.
• Lots of popular resiliency frameworks - .net Polly.net
Polly.net - Resiliency Policy w/ HttpClient
Polly.net – Policy in use.
Downstream: Use a more scalable back end
• Great opportunity for green field applications.
• Consider a cloud native database that are able to scale and match
the throughput of Serverless
• Azure – CosmosDB
• AWS – DynamoDB
• Both Relational & NoSQL can scale - NoSQL can often have edge.
• Consider ease of implementation along with the other benefits
Azure CosmosDB
• Globally Distributed, Multi-model, NoSql Database
• Convenient integration with Azure Functions
• Not “Serverless” but with massive throughput available can scale
w/ Serverless
Connections are Important
• Typically client connections are intended to manage
a limited resource (connections, ports, etc)
• As Serverless scales those resources may be
stressed and may not always free up when you think
they do.
• Any *Client based class (HttpClient, SqlClient,
DocumentClient, etc)
• Be suspicious of “helper” libraries that may not
make the most efficient use of connections or don’t
align well with Serverless
Best Practices for Handling Connections
• DO NOT create a new client with every function invocation.
• DO create a single, static client that can be used by every function
invocation.
• CONSIDER creating a single, static client in a shared helper class if
different functions will be using the same service.
• Anti-intuitive but avoid Disposing.
• Even SQL Connections can benefit
Example – HttpClient (.net)
Managing and Mitigating Complexity
• Serverless architectures can often be very complex
• Common asynchronous patterns such as messaging
add to the complexity
• Following the ”Single Function – Single Purpose” best
practice can require complex orchestrations.
Managing Complexity - Orchestration with Logic Apps
• Designer (no-code) based Serverless orchestratorworkflow
• 200+ OTB Connectors (Azure + External)
• Supplement with Azure Functions
Managing Complexity: Orchestration with Durable Functions
• Code based orchestration unique to Azure Functions
• Manage state in a stateless server environment
• Uses storagequeues behind the scenes
• Support for various common orchestration patterns
• Function Chaining
• Fan-inFan-out
• Async Http Calls (w/ status)
• Monitoring
• User Interaction (waiting for user interaction)
Durable Functions – Function Chaining
Azure Functions Bindings
• Declarative way for Functions to connect with Data
• Works with many common data sources in Azure such as queues,
storage, Event hub, CosmosDb
• Writetest less code == increased developer productivity
Honorable Mentions (Important but no time)
• As easy at it is in the beginning to “right-click publish” use CICD
pipeline such as Azure DevOps
• Implement your own “Chaos Monkey” so you understand your
monitoring tools and how to use them (or identify if you have).
Living the Fairly Tale is possible (maybe pg-13)
Thank you & enjoy the show!
@joshcarlisle
Additional Resources
• Azure Functions Connections Best Practices -
https://github.com/Azure/azure-functions-host/wiki/Managing-
Connections
• Polly.Net - https://github.com/App-vNext/Polly
• Azure Devops - https://azure.microsoft.com/en-
us/blog/introducing-azure-devops/
• Durable Functions - https://docs.microsoft.com/en-
us/azure/azure-functions/durable-functions-overview

More Related Content

What's hot

Five Years of EC2 Distilled
Five Years of EC2 DistilledFive Years of EC2 Distilled
Five Years of EC2 DistilledGrig Gheorghiu
 
Rebooting design in RavenDB
Rebooting design in RavenDBRebooting design in RavenDB
Rebooting design in RavenDBOren Eini
 
Put Your Thinking CAP On
Put Your Thinking CAP OnPut Your Thinking CAP On
Put Your Thinking CAP OnTomer Gabel
 
Staying friendly with the gc
Staying friendly with the gcStaying friendly with the gc
Staying friendly with the gcOren Eini
 
Getting started with Laravel & Elasticsearch
Getting started with Laravel & ElasticsearchGetting started with Laravel & Elasticsearch
Getting started with Laravel & ElasticsearchPeter Steenbergen
 
Getting started with Apache Spark
Getting started with Apache SparkGetting started with Apache Spark
Getting started with Apache SparkHabib Ahmed Bhutto
 
Cassandra Core Concepts - Cassandra Day Toronto
Cassandra Core Concepts - Cassandra Day TorontoCassandra Core Concepts - Cassandra Day Toronto
Cassandra Core Concepts - Cassandra Day TorontoJon Haddad
 
Building Enterprise Search Engines using Open Source Technologies
Building Enterprise Search Engines using Open Source TechnologiesBuilding Enterprise Search Engines using Open Source Technologies
Building Enterprise Search Engines using Open Source TechnologiesRahul Singh
 
Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012Amazee Labs
 
Sneaking Scala through the Back Door
Sneaking Scala through the Back DoorSneaking Scala through the Back Door
Sneaking Scala through the Back DoorDianne Marsh
 
Introduction to Django-Celery and Supervisor
Introduction to Django-Celery and SupervisorIntroduction to Django-Celery and Supervisor
Introduction to Django-Celery and SupervisorSuresh Kumar
 
Python performance profiling
Python performance profilingPython performance profiling
Python performance profilingJon Haddad
 
Indic threads pune12-typesafe stack software development on the jvm
Indic threads pune12-typesafe stack software development on the jvmIndic threads pune12-typesafe stack software development on the jvm
Indic threads pune12-typesafe stack software development on the jvmIndicThreads
 
Python & Cassandra - Best Friends
Python & Cassandra - Best FriendsPython & Cassandra - Best Friends
Python & Cassandra - Best FriendsJon Haddad
 

What's hot (20)

RavenDB in the wild
RavenDB in the wildRavenDB in the wild
RavenDB in the wild
 
Five Years of EC2 Distilled
Five Years of EC2 DistilledFive Years of EC2 Distilled
Five Years of EC2 Distilled
 
Rebooting design in RavenDB
Rebooting design in RavenDBRebooting design in RavenDB
Rebooting design in RavenDB
 
Ruby Setup
Ruby SetupRuby Setup
Ruby Setup
 
Laravel and SOLR
Laravel and SOLRLaravel and SOLR
Laravel and SOLR
 
Why ruby and rails
Why ruby and railsWhy ruby and rails
Why ruby and rails
 
Put Your Thinking CAP On
Put Your Thinking CAP OnPut Your Thinking CAP On
Put Your Thinking CAP On
 
Dev-Friendly Ops
Dev-Friendly OpsDev-Friendly Ops
Dev-Friendly Ops
 
Staying friendly with the gc
Staying friendly with the gcStaying friendly with the gc
Staying friendly with the gc
 
Getting started with Laravel & Elasticsearch
Getting started with Laravel & ElasticsearchGetting started with Laravel & Elasticsearch
Getting started with Laravel & Elasticsearch
 
Getting started with Apache Spark
Getting started with Apache SparkGetting started with Apache Spark
Getting started with Apache Spark
 
Cassandra on EPAM Cloud
Cassandra on EPAM CloudCassandra on EPAM Cloud
Cassandra on EPAM Cloud
 
Cassandra Core Concepts - Cassandra Day Toronto
Cassandra Core Concepts - Cassandra Day TorontoCassandra Core Concepts - Cassandra Day Toronto
Cassandra Core Concepts - Cassandra Day Toronto
 
Building Enterprise Search Engines using Open Source Technologies
Building Enterprise Search Engines using Open Source TechnologiesBuilding Enterprise Search Engines using Open Source Technologies
Building Enterprise Search Engines using Open Source Technologies
 
Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012
 
Sneaking Scala through the Back Door
Sneaking Scala through the Back DoorSneaking Scala through the Back Door
Sneaking Scala through the Back Door
 
Introduction to Django-Celery and Supervisor
Introduction to Django-Celery and SupervisorIntroduction to Django-Celery and Supervisor
Introduction to Django-Celery and Supervisor
 
Python performance profiling
Python performance profilingPython performance profiling
Python performance profiling
 
Indic threads pune12-typesafe stack software development on the jvm
Indic threads pune12-typesafe stack software development on the jvmIndic threads pune12-typesafe stack software development on the jvm
Indic threads pune12-typesafe stack software development on the jvm
 
Python & Cassandra - Best Friends
Python & Cassandra - Best FriendsPython & Cassandra - Best Friends
Python & Cassandra - Best Friends
 

Similar to Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams

The impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves GoelevenThe impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves GoelevenParticular Software
 
Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Wen-Tien Chang
 
Aws for Startups Building Cloud Enabled Apps
Aws for Startups Building Cloud Enabled AppsAws for Startups Building Cloud Enabled Apps
Aws for Startups Building Cloud Enabled AppsAmazon Web Services
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersAmazon Web Services
 
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...Bob Pusateri
 
Journey towards serverless infrastructure
Journey towards serverless infrastructureJourney towards serverless infrastructure
Journey towards serverless infrastructureVille Seppänen
 
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)Bob Pusateri
 
Mtc learnings from isv & enterprise (dated - Dec -2014)
Mtc learnings from isv & enterprise (dated - Dec -2014)Mtc learnings from isv & enterprise (dated - Dec -2014)
Mtc learnings from isv & enterprise (dated - Dec -2014)Govind Kanshi
 
Mtc learnings from isv & enterprise interaction
Mtc learnings from isv & enterprise  interactionMtc learnings from isv & enterprise  interaction
Mtc learnings from isv & enterprise interactionGovind Kanshi
 
NDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design PatternsNDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design PatternsRyan Green
 
Building a highly scalable and available cloud application
Building a highly scalable and available cloud applicationBuilding a highly scalable and available cloud application
Building a highly scalable and available cloud applicationNoam Sheffer
 
ENT309 scaling up to your first 10 million users
ENT309 scaling up to your first 10 million usersENT309 scaling up to your first 10 million users
ENT309 scaling up to your first 10 million usersAmazon Web Services
 
Tiger oracle
Tiger oracleTiger oracle
Tiger oracled0nn9n
 
iMobileMagic Teck Talk Scale Up
iMobileMagic Teck Talk Scale UpiMobileMagic Teck Talk Scale Up
iMobileMagic Teck Talk Scale UpPedro Machado
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWSMigrating enterprise workloads to AWS
Migrating enterprise workloads to AWSTom Laszewski
 
J1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. Nielsen
J1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. NielsenJ1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. Nielsen
J1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. NielsenMS Cloud Summit
 
SpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople
 
NSBCon UK nservicebus on Azure by Yves Goeleven
NSBCon UK nservicebus on Azure by Yves GoelevenNSBCon UK nservicebus on Azure by Yves Goeleven
NSBCon UK nservicebus on Azure by Yves GoelevenParticular Software
 

Similar to Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams (20)

The impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves GoelevenThe impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves Goeleven
 
Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3
 
Windows Azure introduction
Windows Azure introductionWindows Azure introduction
Windows Azure introduction
 
Aws for Startups Building Cloud Enabled Apps
Aws for Startups Building Cloud Enabled AppsAws for Startups Building Cloud Enabled Apps
Aws for Startups Building Cloud Enabled Apps
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
 
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
 
Azure basics
Azure basicsAzure basics
Azure basics
 
Journey towards serverless infrastructure
Journey towards serverless infrastructureJourney towards serverless infrastructure
Journey towards serverless infrastructure
 
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
 
Mtc learnings from isv & enterprise (dated - Dec -2014)
Mtc learnings from isv & enterprise (dated - Dec -2014)Mtc learnings from isv & enterprise (dated - Dec -2014)
Mtc learnings from isv & enterprise (dated - Dec -2014)
 
Mtc learnings from isv & enterprise interaction
Mtc learnings from isv & enterprise  interactionMtc learnings from isv & enterprise  interaction
Mtc learnings from isv & enterprise interaction
 
NDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design PatternsNDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design Patterns
 
Building a highly scalable and available cloud application
Building a highly scalable and available cloud applicationBuilding a highly scalable and available cloud application
Building a highly scalable and available cloud application
 
ENT309 scaling up to your first 10 million users
ENT309 scaling up to your first 10 million usersENT309 scaling up to your first 10 million users
ENT309 scaling up to your first 10 million users
 
Tiger oracle
Tiger oracleTiger oracle
Tiger oracle
 
iMobileMagic Teck Talk Scale Up
iMobileMagic Teck Talk Scale UpiMobileMagic Teck Talk Scale Up
iMobileMagic Teck Talk Scale Up
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWSMigrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
 
J1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. Nielsen
J1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. NielsenJ1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. Nielsen
J1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. Nielsen
 
SpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud Computing
 
NSBCon UK nservicebus on Azure by Yves Goeleven
NSBCon UK nservicebus on Azure by Yves GoelevenNSBCon UK nservicebus on Azure by Yves Goeleven
NSBCon UK nservicebus on Azure by Yves Goeleven
 

More from Josh Carlisle

Serverless Days Amsterdam - Choosing a Serverless Monitoring Platform
Serverless Days Amsterdam - Choosing a Serverless Monitoring PlatformServerless Days Amsterdam - Choosing a Serverless Monitoring Platform
Serverless Days Amsterdam - Choosing a Serverless Monitoring PlatformJosh Carlisle
 
Transforming Your Business with Serverless
Transforming Your Business with ServerlessTransforming Your Business with Serverless
Transforming Your Business with ServerlessJosh Carlisle
 
Transforming your Business with Serverless
Transforming your Business with ServerlessTransforming your Business with Serverless
Transforming your Business with ServerlessJosh Carlisle
 
Azure Messaging with Azure Functions
Azure Messaging with Azure FunctionsAzure Messaging with Azure Functions
Azure Messaging with Azure FunctionsJosh Carlisle
 
Introduction to CosmosDB - Azure Bootcamp 2018
Introduction to CosmosDB - Azure Bootcamp 2018Introduction to CosmosDB - Azure Bootcamp 2018
Introduction to CosmosDB - Azure Bootcamp 2018Josh Carlisle
 
Building Resilient Azure Solutions for Office 365 - SharePoint Saturday Atlan...
Building Resilient Azure Solutions for Office 365 - SharePoint Saturday Atlan...Building Resilient Azure Solutions for Office 365 - SharePoint Saturday Atlan...
Building Resilient Azure Solutions for Office 365 - SharePoint Saturday Atlan...Josh Carlisle
 

More from Josh Carlisle (6)

Serverless Days Amsterdam - Choosing a Serverless Monitoring Platform
Serverless Days Amsterdam - Choosing a Serverless Monitoring PlatformServerless Days Amsterdam - Choosing a Serverless Monitoring Platform
Serverless Days Amsterdam - Choosing a Serverless Monitoring Platform
 
Transforming Your Business with Serverless
Transforming Your Business with ServerlessTransforming Your Business with Serverless
Transforming Your Business with Serverless
 
Transforming your Business with Serverless
Transforming your Business with ServerlessTransforming your Business with Serverless
Transforming your Business with Serverless
 
Azure Messaging with Azure Functions
Azure Messaging with Azure FunctionsAzure Messaging with Azure Functions
Azure Messaging with Azure Functions
 
Introduction to CosmosDB - Azure Bootcamp 2018
Introduction to CosmosDB - Azure Bootcamp 2018Introduction to CosmosDB - Azure Bootcamp 2018
Introduction to CosmosDB - Azure Bootcamp 2018
 
Building Resilient Azure Solutions for Office 365 - SharePoint Saturday Atlan...
Building Resilient Azure Solutions for Office 365 - SharePoint Saturday Atlan...Building Resilient Azure Solutions for Office 365 - SharePoint Saturday Atlan...
Building Resilient Azure Solutions for Office 365 - SharePoint Saturday Atlan...
 

Recently uploaded

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Recently uploaded (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams

  • 1. Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams Josh Carlisle – AppDynamics @joshcarlisle
  • 2. About Me.. •Raleigh, North Carolina •Developer & Consultant for 20+ years •Engineer w/ AppDynamics (Cisco)
  • 3. My Serverless Story • Over a dozen Serverless implementations in production today (Azure Functions). • Along the way I’ve had surprises and challenges. • Sharing with you a few of my top challenges. • My context is Azure Functions but many of the concepts are universal.
  • 4. Those apples look good! •Different Design Patterns •New and Emerging Best Practices •Quickly changing environments and frameworks. •Ease of implementation double edged sword
  • 7. Until the clock strikes Midnight! (or more typically 7pm Friday evening)
  • 8.
  • 9. Thinking about downstream is very important! 429 – Too Many Requests Limited Capacity 500 – Server Errors Availability
  • 10. Solving mismatched pipes w/ unpredictable flow Messaging (CQRS Pattern)
  • 11. Downstream: Do Nothing – Let the request fail. • Utilize Dead Letter Queues (Poison Queues) • Ok for occasional more transient issues • Azure Functions Create Poison Queues Automatically (default 5 failures) • Do something with the queues! Requests Requests-Poison
  • 12. Downstream: Make your environment scale less • Implement a more traditional queue based load leveling • Azure Functions – Standard App Service Plans, Updates Host.json - (WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT, queue specific concurrency settings) • AWS Lamda – Concurrent Execution Limits • Application has to tolerate potential increased processing latency
  • 13. Downstream: Schedule your message processing •Schedule future enqueue time. •Most messaging platforms support scheduling future processing such as Azure’s ServiceBus •Careful with this technique or you may bypass safety of poison queues.
  • 14. Service Bus – Schedule Message
  • 15. Downstream: Adding Resiliency to your requests. • Have your code allow for retries and other transient issues. • Use exponential back-off to improve chances of request going through. • Careful not to extend your retries too long (execute time costs & time limits) • Share your retry attempts centrally to allow multiple instances to be aware. • Lots of popular resiliency frameworks - .net Polly.net
  • 16. Polly.net - Resiliency Policy w/ HttpClient
  • 18. Downstream: Use a more scalable back end • Great opportunity for green field applications. • Consider a cloud native database that are able to scale and match the throughput of Serverless • Azure – CosmosDB • AWS – DynamoDB • Both Relational & NoSQL can scale - NoSQL can often have edge. • Consider ease of implementation along with the other benefits
  • 19. Azure CosmosDB • Globally Distributed, Multi-model, NoSql Database • Convenient integration with Azure Functions • Not “Serverless” but with massive throughput available can scale w/ Serverless
  • 20. Connections are Important • Typically client connections are intended to manage a limited resource (connections, ports, etc) • As Serverless scales those resources may be stressed and may not always free up when you think they do. • Any *Client based class (HttpClient, SqlClient, DocumentClient, etc) • Be suspicious of “helper” libraries that may not make the most efficient use of connections or don’t align well with Serverless
  • 21. Best Practices for Handling Connections • DO NOT create a new client with every function invocation. • DO create a single, static client that can be used by every function invocation. • CONSIDER creating a single, static client in a shared helper class if different functions will be using the same service. • Anti-intuitive but avoid Disposing. • Even SQL Connections can benefit
  • 23. Managing and Mitigating Complexity • Serverless architectures can often be very complex • Common asynchronous patterns such as messaging add to the complexity • Following the ”Single Function – Single Purpose” best practice can require complex orchestrations.
  • 24. Managing Complexity - Orchestration with Logic Apps • Designer (no-code) based Serverless orchestratorworkflow • 200+ OTB Connectors (Azure + External) • Supplement with Azure Functions
  • 25. Managing Complexity: Orchestration with Durable Functions • Code based orchestration unique to Azure Functions • Manage state in a stateless server environment • Uses storagequeues behind the scenes • Support for various common orchestration patterns • Function Chaining • Fan-inFan-out • Async Http Calls (w/ status) • Monitoring • User Interaction (waiting for user interaction)
  • 26. Durable Functions – Function Chaining
  • 27. Azure Functions Bindings • Declarative way for Functions to connect with Data • Works with many common data sources in Azure such as queues, storage, Event hub, CosmosDb • Writetest less code == increased developer productivity
  • 28. Honorable Mentions (Important but no time) • As easy at it is in the beginning to “right-click publish” use CICD pipeline such as Azure DevOps • Implement your own “Chaos Monkey” so you understand your monitoring tools and how to use them (or identify if you have).
  • 29. Living the Fairly Tale is possible (maybe pg-13)
  • 30. Thank you & enjoy the show! @joshcarlisle
  • 31. Additional Resources • Azure Functions Connections Best Practices - https://github.com/Azure/azure-functions-host/wiki/Managing- Connections • Polly.Net - https://github.com/App-vNext/Polly • Azure Devops - https://azure.microsoft.com/en- us/blog/introducing-azure-devops/ • Durable Functions - https://docs.microsoft.com/en- us/azure/azure-functions/durable-functions-overview