SlideShare a Scribd company logo
@AlexPshul
Testing 300K messages/sec Lessons
Alex Pshul
@AlexPshul
alex@pshul.com
https://pshul.com
https://codevalue.net
https://www.meetup.com/Code-Digest/
a serverless IoT system case study
@AlexPshul
Kids, I’m going to tell you an incredible story
The story of how we created a beautiful IoT serverless system
@AlexPshul
Agenda
▪ Project Requirements
▪ Why Serverless?
▪ Solutions
▪ IoT Hub
▪ IoT Edge
▪ Testing & Conclusions
▪ Would I do that again? (Summary)
3
Agenda
@AlexPshul
About Me
4
Alex Pshul
▪ Architect, Consultant, lecturer & tech freak
▪ More than 9 years of hands on experience
▪ Co-organizer of the Code.Digest Meetup
▪ https://www.meetup.com/Code-Digest/
▪ Talk to me about:
@AlexPshul
The Project
Requirements
5
@AlexPshul
Requirements
6
Icon made by Freepik from www.flaticon.com
IoT DevicesSync DeviceSome Cloud MagicBeautiful Dashboard
@AlexPshul
Requirements
7
Icon made by Freepik from www.flaticon.com
Some Cloud MagicBeautiful Dashboard IoT Edge
@AlexPshul
Requirements
8
Icon made by Freepik from www.flaticon.com
Some Cloud MagicBeautiful Dashboard IoT Edge
@AlexPshul
Requirements
9
Icon made by Freepik from www.flaticon.com
Some Cloud MagicBeautiful Dashboard IoT Edge
@AlexPshul
Requirements
10
Icon made by Freepik from www.flaticon.com
Some Cloud MagicBeautiful Dashboard IoT Edge
@AlexPshul
Requirements
▪ Support edge to cloud messages
▪ Process the messages
▪ Real-time & Near real-time processing
▪ Minimum 4 messages/sec
▪ Maximum 100K messages/sec
▪ Store data for later use
▪ Cloud to device messages
11
@AlexPshul
Serverless & Managed Services!
But why?!
12
@AlexPshul
Cost Effective
13
@AlexPshul
Scalable
14
@AlexPshul
Flexible
▪ Run on cloud
▪ Or in a container
▪ Rich IoT out-of-the-box solutions suite
▪ Easy to start
▪ Easy to deploy
15
@AlexPshul
Solutions
Which services and why?
16
@AlexPshul
Azure Functions
▪ Easy to start & deploy
▪ Cost efficient
▪ Scalable
▪ Very Flexible
▪ Locally (For debug)
▪ As a Serverless cloud solution
▪ In an AppService/Premium solutions
▪ As a container
▪ Easy microservices implementation
17
@AlexPshul
SignalR as a Service
▪ Extreme realtime messaging
▪ Two way communication
▪ Scalable
▪ Free tier for development
▪ Can be run as a library
18
@AlexPshul
SignalR as a Service
19
@AlexPshul
Azure Storage Tables
▪ Good integration
▪ Scales
▪ Data price = Today + Previous days
▪ Still, Crazy Cheap!
▪ API matches CosmosDB
▪ Write to both – For long and short term storage
20
@AlexPshul
Azure Event Hub
▪ Messages between services
▪ High throughput scalable units
▪ Pay-for-use
▪ Easy integration with Azure services
▪ And Apache Kafka
21
@AlexPshul
IoT Hub
Edge, Events and everything in between
22
@AlexPshul
What is IoT Hub?
23
@AlexPshul
IoT Edge
▪ The “edge” of the cloud reach
▪ Runs on the device
▪ Easy OTA services
▪ Version updates
▪ Installations
▪ Provisioning
▪ Runs containers
▪ Cloud Communication
24
@AlexPshul
IoT Hub + IoT Edge
▪ Flexible Updates
▪ Locally
▪ Remotely to a large amount of devices
▪ Variety of tiers
▪ By features
▪ By throughput
▪ Units for scaling
▪ Easy two way communication
25
@AlexPshul
IoT Hub
2626
Icon made by Freepik from www.flaticon.com
Some Cloud MagicBeautiful Dashboard IoT Edge
@AlexPshul
Cloud “Magic”
2727
Icon made by Freepik from www.flaticon.com
Functions
SignalR
Event Hub IoT Hub IoT Edge
Storage
@AlexPshul
Cloud “Magic” – Store Data
2828
Icon made by Freepik from www.flaticon.com
IoT Message
Functions
SignalR
Event Hub IoT Hub IoT Edge
Storage
@AlexPshul
Cloud “Magic” – Show Data
2929
Icon made by Freepik from www.flaticon.com
Functions
SignalR
Event Hub IoT Hub IoT Edge
Storage
@AlexPshul
Cloud “Magic” – Live Data
3030
Icon made by Freepik from www.flaticon.com
Live Data
Functions
SignalR
Event Hub IoT Hub IoT Edge
Storage
@AlexPshul
Cloud “Magic” – Update a Device
3131
Icon made by Freepik from www.flaticon.com
Update
Device
Functions
SignalR
Event Hub IoT Hub IoT Edge
Storage
@AlexPshul
Testing & Conclusions
Pitfalls and other FAQs
32
@AlexPshul
Max Load Test
33
100 messages/second500 messages/second
@AlexPshul
Max Load Test
34
@AlexPshul
Max Load Test
35
500 messages/second
×200 VMs
100K messages/second
17 × S3 IoT Hub Units
(2 IoT Hubs)
42,500 USD!!!
IoT Hub
@AlexPshul
Max Load Test
36
@AlexPshul
Optimized Load Test
37
@AlexPshul
Optimized Load Test
38
500 messages/second
Pack 20 → 1 messages
@AlexPshul
Optimized Load Test
39
@AlexPshul
Max Load Test
40
@AlexPshul
Max Load Test
41
25 messages/second
×200 VMs
5K messages/second
1 × S3 IoT Hub Units
2,500 USD!!!
IoT Hub
@AlexPshul
Max Load Test
42
25 messages/second
×200 VMs
5K messages/second
1 × S3 IoT Hub Units
2,500 USD!!!
IoT Hub
@AlexPshul
0 → 100 Instant Scale is Impossible
43
Scale
Scale Scale
Scale
Scale
Scale
Scale
Scale Scale
Scale
Scale Scale
Scale
SCALE ≠ AVAILABILITY
@AlexPshul
0 → 100 Instant Scale is Impossible
44
Non HTTP - scales once every 30 seconds
20,000 Entities per second
Partitions # influence the functions scale
@AlexPshul
0 → 100 Instant Scale is Impossible
45
Use Premium/AppService plan or convert to containers
Use multiple storage accounts
Trial and error to see optimal configuration
@AlexPshul
Summary
Would I go serverless again?
46
@AlexPshul
Would I go serverless again?
47
@AlexPshul
Would I go serverless again?
▪ Flexible
▪ React to request changes
▪ Different deploy options
▪ Cheap
▪ Neglectable while developing
▪ Cheap in production
▪ If used properly
▪ Easy to deploy
▪ Easy to debug
48
Alex Pshul
@AlexPshul
https://www.pshul.com
alexp@codevalue.net
49

More Related Content

PPTX
Will the Real Public API Please Stand Up? Amir Zuker
PPTX
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
PDF
Vered Flis: Because performance matters! Architecture Next 20
PDF
Application evolution strategy - Eran Stiller
PPTX
Blazor and Azure Functions - a serverless approach
PDF
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...
PPTX
Firebase
PDF
Андрей Бойко - Azure Web App для PHP и Node.Js разработчиков
Will the Real Public API Please Stand Up? Amir Zuker
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vered Flis: Because performance matters! Architecture Next 20
Application evolution strategy - Eran Stiller
Blazor and Azure Functions - a serverless approach
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...
Firebase
Андрей Бойко - Azure Web App для PHP и Node.Js разработчиков

What's hot (20)

PDF
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
PPTX
Serverless tools for integrating systems
PDF
Build Cloud Native Apps With DigitalOcean Kubernetes
PPTX
Infrastructure as Code on Azure: Show your Bicep!
PPTX
Create a modern(ish) BAM portal in (roughly) one hour!
PPTX
Azure Web Application Fundamentals
PPTX
Azure Functions
PPTX
Introduction to Firebase
PPTX
ASP.NET Core deployment options
PPTX
Serverless Architecture
PPTX
Going Serverless with Azure Functions
PPTX
Build 2017 - B8013 - Developing on Windows Server: Innovation for today and t...
PPTX
Azure Functions Overview
PPTX
Azure Web Jobs
PPTX
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
PDF
Progressive Web Apps. What, why and how
PPTX
Logic Apps – Deployments
PDF
Making Sense of Serverless Computing
PDF
Introduction to Android M
PDF
Tomasz Janczuk - Webtaskalifragilistexpialidocious
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
Serverless tools for integrating systems
Build Cloud Native Apps With DigitalOcean Kubernetes
Infrastructure as Code on Azure: Show your Bicep!
Create a modern(ish) BAM portal in (roughly) one hour!
Azure Web Application Fundamentals
Azure Functions
Introduction to Firebase
ASP.NET Core deployment options
Serverless Architecture
Going Serverless with Azure Functions
Build 2017 - B8013 - Developing on Windows Server: Innovation for today and t...
Azure Functions Overview
Azure Web Jobs
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
Progressive Web Apps. What, why and how
Logic Apps – Deployments
Making Sense of Serverless Computing
Introduction to Android M
Tomasz Janczuk - Webtaskalifragilistexpialidocious
Ad

Similar to Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Serverless IoT System - Architecture Next 20 (20)

PPTX
300k messages/min in an IoT serverless system
PDF
Confluent On Azure: Why you should add Confluent to your Azure toolkit | Alic...
PDF
CloudCamp Chicago - Big Data & Cloud May 2015 - All Slides
PPTX
SoftLayer Bluemix User Summit 2015 Tokyo - Blue Box Breakout Session
PDF
Docker Meetup Tokyo #23 - Zenko Open Source Multi-Cloud Data Controller - Lau...
PPTX
Softlayer Bluemix User Summit 2015 Keynote
PDF
Data Science in the Cloud @StitchFix
PDF
Internet of Things (IoT) - in the cloud or rather on-premises?
PPTX
Exploring the Azure IoT Ecosystem
PDF
Migrating Oracle Databases from AWS to OCI
PDF
Azure tales: a real world CQRS and ES Deep Dive - Andrea Saltarello
PDF
Technical Exposure for IT Blue Prints
PDF
Fueling AI with Great Data with Airbyte Webinar
PDF
Long Live and Prosper To Monolith
PDF
Afterwork big data et data viz - du lac à votre écran
PPTX
.NET Fest 2019. Alex Pshul. When IoT Meets Serverless
PPTX
When IoT meets Serverless - from design to production and monitoring
PDF
Simpler, faster, cheaper Enterprise Apps using only Spring Boot on GCP
PPTX
Azure.application development.nhut.nguyen
PDF
Metaverse and Digital Twins on Enterprise-Public.pdf
300k messages/min in an IoT serverless system
Confluent On Azure: Why you should add Confluent to your Azure toolkit | Alic...
CloudCamp Chicago - Big Data & Cloud May 2015 - All Slides
SoftLayer Bluemix User Summit 2015 Tokyo - Blue Box Breakout Session
Docker Meetup Tokyo #23 - Zenko Open Source Multi-Cloud Data Controller - Lau...
Softlayer Bluemix User Summit 2015 Keynote
Data Science in the Cloud @StitchFix
Internet of Things (IoT) - in the cloud or rather on-premises?
Exploring the Azure IoT Ecosystem
Migrating Oracle Databases from AWS to OCI
Azure tales: a real world CQRS and ES Deep Dive - Andrea Saltarello
Technical Exposure for IT Blue Prints
Fueling AI with Great Data with Airbyte Webinar
Long Live and Prosper To Monolith
Afterwork big data et data viz - du lac à votre écran
.NET Fest 2019. Alex Pshul. When IoT Meets Serverless
When IoT meets Serverless - from design to production and monitoring
Simpler, faster, cheaper Enterprise Apps using only Spring Boot on GCP
Azure.application development.nhut.nguyen
Metaverse and Digital Twins on Enterprise-Public.pdf
Ad

More from CodeValue (20)

PPTX
Digital transformation buzzword or reality - Alon Fliess
PPTX
The IDF's journey to the cloud - Merav
PPTX
When your release plan is concluded at the HR office - Hanan Zakai
PPTX
We come in peace hybrid development with web assembly - Maayan Hanin
PPTX
The IoT Transformation and What it Means to You - Nir Dobovizky
PPTX
State in stateless serverless functions - Alex Pshul
PPTX
How I built a ml human hybrid workflow using computer vision - Amir Shitrit
PPTX
Designing products in the digital transformation era - Eyal Livne
PPTX
Eerez Pedro: Product thinking 101 - Architecture Next
PDF
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
PDF
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
PDF
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...
PDF
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
PDF
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
PPTX
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20
PPTX
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20
PDF
Michael Donkhin: Java Turns 25 - How Is It Faring and What Is Yet to Come Arc...
PDF
Eran Stiller: API design in the modern era - architecture next 2020
PPTX
Web assembly - Future of the Web
PPTX
Unmeshing the service mesh
Digital transformation buzzword or reality - Alon Fliess
The IDF's journey to the cloud - Merav
When your release plan is concluded at the HR office - Hanan Zakai
We come in peace hybrid development with web assembly - Maayan Hanin
The IoT Transformation and What it Means to You - Nir Dobovizky
State in stateless serverless functions - Alex Pshul
How I built a ml human hybrid workflow using computer vision - Amir Shitrit
Designing products in the digital transformation era - Eyal Livne
Eerez Pedro: Product thinking 101 - Architecture Next
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20
Michael Donkhin: Java Turns 25 - How Is It Faring and What Is Yet to Come Arc...
Eran Stiller: API design in the modern era - architecture next 2020
Web assembly - Future of the Web
Unmeshing the service mesh

Recently uploaded (20)

PPTX
What to Capture When It Breaks: 16 Artifacts That Reveal Root Causes
PDF
Convert Thunderbird to Outlook into bulk
PPTX
Materi_Pemrograman_Komputer-Looping.pptx
PDF
How to Seamlessly Integrate Salesforce Data Cloud with Marketing Cloud.pdf
PDF
The Future of Smart Factories Why Embedded Analytics Leads the Way
PPTX
Presentation of Computer CLASS 2 .pptx
PPTX
How a Careem Clone App Allows You to Compete with Large Mobility Brands
PPTX
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
PDF
Exploring AI Agents in Process Industries
PPTX
Services offered by Dynamic Solutions in Pakistan
DOCX
The Future of Smart Factories Why Embedded Analytics Leads the Way
PDF
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
PPTX
10 Hidden App Development Costs That Can Sink Your Startup.pptx
PPTX
AIRLINE PRICE API | FLIGHT API COST |
PPTX
Dynamic Solutions Project Pitch Presentation
PDF
A REACT POMODORO TIMER WEB APPLICATION.pdf
PPTX
Using Bootstrap to Make Accessible Front-Ends(2).pptx
PPTX
Benefits of DCCM for Genesys Contact Center
PDF
Comprehensive Salesforce Implementation Services.pdf
PDF
Best Mobile App Development Company in Lucknow - Code Crafter Web Solutions
What to Capture When It Breaks: 16 Artifacts That Reveal Root Causes
Convert Thunderbird to Outlook into bulk
Materi_Pemrograman_Komputer-Looping.pptx
How to Seamlessly Integrate Salesforce Data Cloud with Marketing Cloud.pdf
The Future of Smart Factories Why Embedded Analytics Leads the Way
Presentation of Computer CLASS 2 .pptx
How a Careem Clone App Allows You to Compete with Large Mobility Brands
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Exploring AI Agents in Process Industries
Services offered by Dynamic Solutions in Pakistan
The Future of Smart Factories Why Embedded Analytics Leads the Way
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
10 Hidden App Development Costs That Can Sink Your Startup.pptx
AIRLINE PRICE API | FLIGHT API COST |
Dynamic Solutions Project Pitch Presentation
A REACT POMODORO TIMER WEB APPLICATION.pdf
Using Bootstrap to Make Accessible Front-Ends(2).pptx
Benefits of DCCM for Genesys Contact Center
Comprehensive Salesforce Implementation Services.pdf
Best Mobile App Development Company in Lucknow - Code Crafter Web Solutions

Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Serverless IoT System - Architecture Next 20