SlideShare una empresa de Scribd logo
1 de 27
Real-Life Experience
Building a chatbot
on Azure Functions
Matti Petrelius @mattipet
I Thought Chatbots
were so 2016 or something...
hi!
Bot Backend API
Scale like crazy! Low Latency!
...you can make us an MVP, right?
Mr. Customer
serverless
Azure
Functions
CosmosdB
Blob+Queue
Storage
3rd party
services
AI Logic
Long-Term
Chat Data (Analysis)
and Logs
Moving messages
and integrating services
Short-Term
Chat State (Live)
BOT Framework
Azure Functions
✔ Node.js 8 and 10
✔ Cross-platform
Cold start 5 – 10 secs
v1 v2
❌ Node.js 6
❌ Windows only
Cold start 2 – 6 secs
MULTIPLE Function apps
aka Microservices
2 sec 2 sec 2 sec
= 6 sec
SINGLE Function APP
aka The Monolith
No BIG SDKS
Node.js app size affects cold start
documentdb 2.04 MB
azure-storage 8.27 MB
unnamed bot sdk 81.89 MB
COSMOSDB MAnual Scaling
400
Throughput (400 – 10,000 RU/s)
Estimated spend (USD): $0.032 hourly / $0.77 daily.
Azure FUnctions cold vs warm start
cold start warm start
Timeout of 5 secs!!!
by the way, our web client requests have a
Number of requests exceeded capacity
400
Throughput (400 – 10,000 RU/s)
Estimated spend (USD): $0.032 hourly / $0.77 daily.
800
Throughput (400 – 10,000 RU/s)
Estimated spend (USD): $0.064 hourly / $1.54 daily.
2000
Throughput (400 – 10,000 RU/s)
Estimated spend (USD): $0.16 hourly / $3.84 daily.
4000
Throughput (400 – 10,000 RU/s)
Estimated spend (USD): $0.32 hourly / $7.68 daily.
= $230.40 monthly
Run- From- Package
Cold-start without:
10 – 20 sec
Cold-start with: 2 – 6 sec
WEBSITE_RUN_FROM_PACKAGE https://mystor.blob.core.windows.net/deps/pack.zip
WEBSITE_RUN_FROM_PACKAGE 1
Disable App Insights ?
One second faster cold-start ... but is it worth more than monitoring?
Azure Functions Premium Plan
Pre-warmed instances for reduced cold start
Significantly more expensive than consumption plan
Now in public preview!
CosmosDB Done Right
Automated scaling with SDK
Polling vs Event Based
Optimizing queries
Local development and Debugging
Local development and Debugging
Visual Studio Code
Running in Production
Thanks ya’ll !
Follow me on Twitter for more: @mattipet
Check out my blog: https://lesscodeismore.dev
pictures from freepik.com

Más contenido relacionado

Similar a Real-life experience building a chatbot on Azure Functions

Azure Functions - Get rid of your servers, use functions!
Azure Functions - Get rid of your servers, use functions!Azure Functions - Get rid of your servers, use functions!
Azure Functions - Get rid of your servers, use functions!QAware GmbH
 
The beauty of Azure
The beauty of AzureThe beauty of Azure
The beauty of AzureJames Jan
 
Azure Functions e Azure Logics Apps: i tuoi coltellini svizzeri per gestire i...
Azure Functions e Azure Logics Apps: i tuoi coltellini svizzeri per gestire i...Azure Functions e Azure Logics Apps: i tuoi coltellini svizzeri per gestire i...
Azure Functions e Azure Logics Apps: i tuoi coltellini svizzeri per gestire i...Marco Parenzan
 
Java/Scala Lab: Anton Vidishchev - Microsoft Azure как облачная платформа для...
Java/Scala Lab: Anton Vidishchev - Microsoft Azure как облачная платформа для...Java/Scala Lab: Anton Vidishchev - Microsoft Azure как облачная платформа для...
Java/Scala Lab: Anton Vidishchev - Microsoft Azure как облачная платформа для...GeeksLab Odessa
 
Cloud Native 오픈소스 서비스 소개 및 Serverless로 실제 게임 개발하기
Cloud Native 오픈소스 서비스 소개 및 Serverless로 실제 게임 개발하기Cloud Native 오픈소스 서비스 소개 및 Serverless로 실제 게임 개발하기
Cloud Native 오픈소스 서비스 소개 및 Serverless로 실제 게임 개발하기Jinwoong Kim
 
Maker of Things - the open IoT cloud for makers chapter.
Maker of Things - the open IoT cloud for makers chapter.Maker of Things - the open IoT cloud for makers chapter.
Maker of Things - the open IoT cloud for makers chapter.Jollen Chen
 
Microsoft Azure News - July 2017
Microsoft Azure News - July 2017Microsoft Azure News - July 2017
Microsoft Azure News - July 2017Daniel Toomey
 
Concurrency presents Modern Datacenter
Concurrency presents Modern DatacenterConcurrency presents Modern Datacenter
Concurrency presents Modern DatacenterJake Borzym
 
Présentation Aerys
Présentation Aerys Présentation Aerys
Présentation Aerys iCOMMUNITY
 
My cloud + Windows Phone app experience
My cloud + Windows Phone app experienceMy cloud + Windows Phone app experience
My cloud + Windows Phone app experienceJeff Wilcox
 
DWX2018 IoT lecture
DWX2018 IoT lectureDWX2018 IoT lecture
DWX2018 IoT lectureAlon Fliess
 
Integrate 2016 recap (Pieter Vandenheede @BTUGbe)
Integrate 2016 recap (Pieter Vandenheede @BTUGbe) Integrate 2016 recap (Pieter Vandenheede @BTUGbe)
Integrate 2016 recap (Pieter Vandenheede @BTUGbe) Codit
 
Btug.be - Integrate 2016 Recap by Pieter Vandenheede
Btug.be - Integrate 2016 Recap by Pieter VandenheedeBtug.be - Integrate 2016 Recap by Pieter Vandenheede
Btug.be - Integrate 2016 Recap by Pieter VandenheedePieter Vandenheede
 
Few Tips for asp.net developers 2014 and beyond
Few Tips for asp.net developers 2014 and beyondFew Tips for asp.net developers 2014 and beyond
Few Tips for asp.net developers 2014 and beyondSreejesh Madonandy
 
.NET Core Today and Tomorrow
.NET Core Today and Tomorrow.NET Core Today and Tomorrow
.NET Core Today and TomorrowJon Galloway
 
The Microsoft AI platform: a State of the Union
The Microsoft AI platform: a State of the UnionThe Microsoft AI platform: a State of the Union
The Microsoft AI platform: a State of the UnionMicrosoft Tech Community
 
Concurrency presents Modern Datacenter
Concurrency presents Modern DatacenterConcurrency presents Modern Datacenter
Concurrency presents Modern DatacenterConcurrency, Inc.
 
Windows iot barone
Windows iot baroneWindows iot barone
Windows iot baroneDotNetCampus
 

Similar a Real-life experience building a chatbot on Azure Functions (20)

Azure Functions - Get rid of your servers, use functions!
Azure Functions - Get rid of your servers, use functions!Azure Functions - Get rid of your servers, use functions!
Azure Functions - Get rid of your servers, use functions!
 
The beauty of Azure
The beauty of AzureThe beauty of Azure
The beauty of Azure
 
Developing an Embedded IoT Solution using Mongoose OS.
Developing an Embedded IoT Solution using Mongoose OS.Developing an Embedded IoT Solution using Mongoose OS.
Developing an Embedded IoT Solution using Mongoose OS.
 
Azure Functions e Azure Logics Apps: i tuoi coltellini svizzeri per gestire i...
Azure Functions e Azure Logics Apps: i tuoi coltellini svizzeri per gestire i...Azure Functions e Azure Logics Apps: i tuoi coltellini svizzeri per gestire i...
Azure Functions e Azure Logics Apps: i tuoi coltellini svizzeri per gestire i...
 
Java/Scala Lab: Anton Vidishchev - Microsoft Azure как облачная платформа для...
Java/Scala Lab: Anton Vidishchev - Microsoft Azure как облачная платформа для...Java/Scala Lab: Anton Vidishchev - Microsoft Azure как облачная платформа для...
Java/Scala Lab: Anton Vidishchev - Microsoft Azure как облачная платформа для...
 
Martin Simecek, Microsoft
Martin Simecek, Microsoft	Martin Simecek, Microsoft
Martin Simecek, Microsoft
 
Cloud Native 오픈소스 서비스 소개 및 Serverless로 실제 게임 개발하기
Cloud Native 오픈소스 서비스 소개 및 Serverless로 실제 게임 개발하기Cloud Native 오픈소스 서비스 소개 및 Serverless로 실제 게임 개발하기
Cloud Native 오픈소스 서비스 소개 및 Serverless로 실제 게임 개발하기
 
Maker of Things - the open IoT cloud for makers chapter.
Maker of Things - the open IoT cloud for makers chapter.Maker of Things - the open IoT cloud for makers chapter.
Maker of Things - the open IoT cloud for makers chapter.
 
Microsoft Azure News - July 2017
Microsoft Azure News - July 2017Microsoft Azure News - July 2017
Microsoft Azure News - July 2017
 
Concurrency presents Modern Datacenter
Concurrency presents Modern DatacenterConcurrency presents Modern Datacenter
Concurrency presents Modern Datacenter
 
Présentation Aerys
Présentation Aerys Présentation Aerys
Présentation Aerys
 
My cloud + Windows Phone app experience
My cloud + Windows Phone app experienceMy cloud + Windows Phone app experience
My cloud + Windows Phone app experience
 
DWX2018 IoT lecture
DWX2018 IoT lectureDWX2018 IoT lecture
DWX2018 IoT lecture
 
Integrate 2016 recap (Pieter Vandenheede @BTUGbe)
Integrate 2016 recap (Pieter Vandenheede @BTUGbe) Integrate 2016 recap (Pieter Vandenheede @BTUGbe)
Integrate 2016 recap (Pieter Vandenheede @BTUGbe)
 
Btug.be - Integrate 2016 Recap by Pieter Vandenheede
Btug.be - Integrate 2016 Recap by Pieter VandenheedeBtug.be - Integrate 2016 Recap by Pieter Vandenheede
Btug.be - Integrate 2016 Recap by Pieter Vandenheede
 
Few Tips for asp.net developers 2014 and beyond
Few Tips for asp.net developers 2014 and beyondFew Tips for asp.net developers 2014 and beyond
Few Tips for asp.net developers 2014 and beyond
 
.NET Core Today and Tomorrow
.NET Core Today and Tomorrow.NET Core Today and Tomorrow
.NET Core Today and Tomorrow
 
The Microsoft AI platform: a State of the Union
The Microsoft AI platform: a State of the UnionThe Microsoft AI platform: a State of the Union
The Microsoft AI platform: a State of the Union
 
Concurrency presents Modern Datacenter
Concurrency presents Modern DatacenterConcurrency presents Modern Datacenter
Concurrency presents Modern Datacenter
 
Windows iot barone
Windows iot baroneWindows iot barone
Windows iot barone
 

Último

Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
"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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 

Último (20)

Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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?
 
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...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
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...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
"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 ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Real-life experience building a chatbot on Azure Functions