SlideShare a Scribd company logo
In search for the perfect IoT Stack
Scalable IoT Architectures with MQTT
Dominik Obermaier | dc-square GmbH
Dominik Obermaier
CTO @ HiveMQ
Welcome!
@dobermai
IoT & Connectivity
What makes an
IoT Stack special?
What is different
Small data “packets“,but a lot of them
Large amount of concurrently connected devices
Machine communication without human interaction
High grade of automation
Continuous flow of data
Dimensions of data
GB/hour
GB/day
GB/month
GB/year
1001 msg / minute
each 1kB in size
0.006
Mbps
0.14
4
53
0.01
number of devices
Dimensions of data
GB/hour
GB/day
GB/month
GB/year
1001 msg / minute
each 1kB in size
0.006
Mbps
0.14
4
53
0.01
number of devices
1,000 10,000 100,000
0.06 0.6 6
1.4
43
526
0.1
14
432
5,256
1.3
144
4,320
52,560
13
1,000,000
60
1,440
43,200
525,600
133
Dimensions of data
GB/hour
GB/day
GB/month
GB/year
100 1,000 10,000 100,0001 msg / second
each 1kB in size
0.36 3.6 36 360
Mbps
8.64
259
3,154
0.8
86.4
2,592
31,536
8
864
25,920
315,360
80
8,640
259,200
3,153,600
800
1,000,000
3,600
86,400
2,592,000
31,536,000
8,000
number of devices
1,000,000 msg/s: 2.5 PB/month
whole Internet Traffic in 1996: 1.9 PB/month
Source: https://en.wikipedia.org/wiki/Internet_traffic
Putting this into perspective
100,000 msg/s: 8.6 TB/day
1 server hard drive per day
Architecture -
Lots of choices
Microsoft IoT Reference Architecture
Source: https://azure.microsoft.com/de-de/updates/microsoft-azure-iot-reference-architecture-available/
Intel IoT Reference Architecture
Source: http://www.intel.de/content/www/de/de/internet-of-things/white-papers/iot-platform-reference-architecture-
WSO2 IoT Reference Architecture
Source: http://wso2.com/wso2_resources/wso2_whitepaper_a-reference-architecture-for-the-internet-of-things.pdf
Industrial Internet Consortium IIoT Architecture
Source: https://www.iiconsortium.org/IIC_PUB_G1_V1.80_2017-01-31.pdf
Let’s start
BUILDING!
Load Balancer MQTT Broker Data Store
Stream Processing Batch Processing Queues / Logs
Typical Components
Load Balancing Data Ingestion Stream Analytics Data Storage
Batch Processing
High Level IoT Data
Processing Architecture
Load Balancer
Enables distribution of
workloads across
multiple computing
resources
First line of defense
Central component for
horizontal scaling,high
availability and
resiliency
MQTT Broker
Central Communication
software for Internet
connected devices
Distributes raw messages
to the backend
Allows bi-directional communication
for device-to-cloud and cloud-to-device
communication
(Big) Data Store
Multiple data stores may be
needed,persistent and ephemeral:
Data lake, metadata stores,data
marts,caches
Raw data as well as
refined data may be
stored
IoT architectures almost
always deal with Big Data
problems
Queues / Logs
Decoupling of data
ingestion and processing
Add fault-tolerance
Persistent and in-memory
options
Stream Processing
Processes data
continuously when it
arrives
Short Processing time per
value
Result is available in
near-time
Batch Processing
Processes high volume of data
Result is available after
whole batch is processed
Processing time can be
hours or days
Difference between
Stream & Batch Processing?
Stream vs Batch
Processing
Running Sushi Candy Store
Stream Batch
Supply
Access
Selection
Running Sushi
virtually endless
sequential, as items pass by
continuous
Candy Store
limited by available containers
random access
one-off selection
Source: https://www.mapr.com/blog/data-processing-vocabulary-101-key-terms-you-need-know
Deployment
& Runtime
Bare Metal Virtual Machines Containers
Deployment Options
Bare Metal
Perfect for On-Premise
Installations
Best performance
Unflexible for dynamic workloads
Virtual Machines
Ideal for cloud environments
Full OS isolation
Easy to provision
Virtual Machines
Containers
Ideal for cloud environments
with multiple services that
need to be orchestrated
All containers per Runtime
share the same kernel
Very easy to implement
Infrastructure as Code
Containers - Technologies
Containers -
Docker vs VMs
Docker Virtual Machines
Source: https://www.docker.com/what-docker
Resiliency &
High Availability
Resiliency
DEFINITION
“The capacity to recover quickly from
difficulties; toughness.”
Oxford Dictionary
Resiliency
The ability for a software
system as a whole to
recover from failures
Failure of individual components is
expected and the system as a whole
can continue to work (with service
degradation) and is able to recover
All software components need to be
designed for resiliency. Resilient
systems often prefer Availability and
Partition Tolerance if possible.
1. The network is reliable.
2. Latency is zero.
3. Bandwidth is infinite.
4. The network is secure.
5. Topology doesn't change.
6. There is one administrator.
7. Transport cost is zero.
8. The network is homogeneous.
Fallacies of Distributed
Computing
High Availability
DEFINITION
“High Availability refers to the availability of
resources in a computer system, in the wake of
component failures in the system.”
IEEE
High Availability
Typically refers to the
Uptime of a whole
system or service
Achieved with redundancy for
hardware and software
components
All components in a single
system must be designed for
high availability
Load Balancing Data Ingestion Stream Analytics Data Storage
Batch Processing
High Level IoT Data
Processing Architecture
MQTT
Standardized at OASIS
Designed for reliable communication over unreliable
networks (e.g. mobile networks)
Publish / Subscribe architecture
Data agnostic
Internet of Things Messaging Protocol
MQTT
Pub / Sub
temperature
sensor
MQTT-Broker
laptop
mobile device
publish: “21°C“
publish: “21°C“
publish: “21°C“
subscribe
subscribe
MQTT
Use Cases
Push Communication
Reliable Communication
over unreliable networks
Constrained Devices
Low Bandwidth and
High Latency
Enterprise backends to
mobile communication
MQTT in IoT
architectures
Massively scalable - hundreds
of thousands messages per
second
Bi-directional,event-driven
push communication
Very low protocol footprint,
suitable for millions of devices
Shared Subscriptions
MQTT Broker Plugin vs
Shared Subscribers
vs
Broker Plugin Shared Subscribers
Client Load Balancing
No business logic on
broker
Can be written in any
language
Client must take care
itself of store-and-
forward semantics
No additional services
needed
No additional TCP
connections needed
Automatic
Backpressure Handling
Deeper Integration to
MQTT lifecycle
Horizontal scaling
Backpressure
Backpressure - Principle
ILLUSTRATED
1 3
42
Data Flow Temporary overload
Normal Flow System Crash
Source: http://ferd.ca/queues-don-t-fix-overload.html
Little’s Law
The long-term average number of customers in a stable system L
is equal to the long-term average effective arrival rate, λ,
multiplied by the (Palm-)average time a customer spends in the
system, W; or expressed algebraically: L = λW.
John Little
Solution 1
- Queue
Solution 2
- Load Shedding
Solution 3
- Block Producer
Solution 4
- Slow down producer
Technology
Toolbox
In search of the perfect IoT Stack - Scalable IoT Architectures with MQTT
Load balancers
Distribute client connects over multiple MQTT brokers
SSL/TLS Termination, special hardware
Software and Hardware options
Relational Database
ACID compliant
Easy to use
Stored data can be queried easily
Cassandra
Distributed database
Scales to hundreds of nodes and terabytes of data
Fast reads and writes, scalable performance
Kafka
Distributed streaming message queue
Data is organized in topics and partitions
Scales to hundreds of nodes and terabytes of data
Apache Spark
Framework for batch processing of large datasets
Supports streaming via micro-batch processing
Can process terabytes of data
Apache Flink
Framework for streaming processing of large datasets
also supports batch processing
Aims to provide high throughput with low latency
Akka
Framework for highly concurrent data processing
Provides an actor model
Suited for CPU intensive processing
Distributed File System
Distribute Storage over multiple machines
Simple alternative to HDFS for smaller data
Built for commodity server hardware
Hadoop
Ecosystem for very large datasets
Distributed Filesystem HDFS
Scales to hundreds of nodes and terabytes of data
HiveMQ
MQTT broker built for enterprise applications
Extensive plugin system
Scales to > 10 million of concurrent connections
Example
Architectures
Load Balancing Data Ingestion Stream Analytics Data Storage
Batch Processing
High Level IoT Data
Processing Architecture
Minimal Architecture for
Low Volume Data
Load Balancing Data Ingestion Stream Analytics Data Storage
Batch Processing
Example Architecture for
Medium Volume Data
Load Balancing Data Ingestion Stream Analytics Data Storage Batch Processing
Example Architecture for
High Volume Data
Lessons
Learned
Don’t save on
Hardware
“A distributed system is one in
which the failure of a computer
you didn’t even know existed
can render your own computer
unusable.“
All components
must be resilient
Leslie Lamport, Turing Award Winner 2013
Know
your
limits
(Pre-) compute
on the edge
Only persist
data you really
need
Compress
(persistent)
data
Don’t choose a
technology just
because it’s cool
dc-square GmbH
www.dc-square.de
info@dc-square.de
Dominik
Obermaier
dominik.obermaier@dc-square.de
@dobermai
Get in touch
HiveMQ -
Enterprise MQTT Broker
www.hivemq.com
@hivemq

More Related Content

What's hot (17)

PDF
Mqtt 5 meetup dortmund
Florian Raschbichler
 
PDF
Messaging for IoT
Virtual JBoss User Group
 
PDF
Mqtt – a protocol for the internet of things
Rahul Gupta
 
PDF
Building Scalable & Reliable MQTT Clients for Enterprise Computing
SilvioGiebl
 
PDF
IoT with MQTT and Paho for Webpages - Eclipse Democamp München 2014
Dominik Obermaier
 
PDF
Getting started with MQTT - Virtual IoT Meetup presentation
Christian Götz
 
PPT
SSL Implementation - IBM MQ - Secure Communications
nishchal29
 
PDF
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
Benjamin Cabé
 
PPTX
Protocols for internet of things
Charles Gibbons
 
PPT
Vp ns
Ayano Midakso
 
PPT
Virtual Private Network
Greater Noida Institute Of Technology
 
PDF
MQTT - Communication in the Internet of Things
Christian Götz
 
PPTX
Building an IoT Cloud for Healthcare: How to Solve Networking Challenges and ...
Altoros
 
PDF
Operations Experience
MidoNet
 
PDF
MidoNet roadmap
Jean-Francois Joly
 
PPSX
BSET_Lecture_Crypto and SSL_Overview_FINAL
Glenn Haley
 
PDF
Using Kubernetes to make cellular data plans cheaper for 50M users
Mirantis
 
Mqtt 5 meetup dortmund
Florian Raschbichler
 
Messaging for IoT
Virtual JBoss User Group
 
Mqtt – a protocol for the internet of things
Rahul Gupta
 
Building Scalable & Reliable MQTT Clients for Enterprise Computing
SilvioGiebl
 
IoT with MQTT and Paho for Webpages - Eclipse Democamp München 2014
Dominik Obermaier
 
Getting started with MQTT - Virtual IoT Meetup presentation
Christian Götz
 
SSL Implementation - IBM MQ - Secure Communications
nishchal29
 
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
Benjamin Cabé
 
Protocols for internet of things
Charles Gibbons
 
Virtual Private Network
Greater Noida Institute Of Technology
 
MQTT - Communication in the Internet of Things
Christian Götz
 
Building an IoT Cloud for Healthcare: How to Solve Networking Challenges and ...
Altoros
 
Operations Experience
MidoNet
 
MidoNet roadmap
Jean-Francois Joly
 
BSET_Lecture_Crypto and SSL_Overview_FINAL
Glenn Haley
 
Using Kubernetes to make cellular data plans cheaper for 50M users
Mirantis
 

Similar to In search of the perfect IoT Stack - Scalable IoT Architectures with MQTT (20)

PDF
HTTP_SS_ENTERPRISE_EN
Bernd Thomsen
 
PDF
IoT meets Big Data
ratthaslip ranokphanuwat
 
PDF
Io t data streaming
ratthaslip ranokphanuwat
 
PDF
Arquitetura Hibrida - Integrando seu Data Center com a Nuvem da AWS
Amazon Web Services LATAM
 
PPTX
Windows iot barone
DotNetCampus
 
PPTX
MICROSOFT E IL MONDO IOT
DotNetCampus
 
PDF
How To Build A Stable And Robust Base For a “Cloud”
Hardway Hou
 
PPTX
A guide through the Azure Messaging services - Update Conference
Eldert Grootenboer
 
PPTX
Introduction To Cloud Computing
Rinat Shagisultanov
 
PPTX
India Webinar
Ganesh Raja
 
PDF
Phoenix Data Conference - Big Data Analytics for IoT 11/4/17
Mark Goldstein
 
PPTX
Windows Azure - Uma Plataforma para o Desenvolvimento de Aplicações
Comunidade NetPonto
 
PPTX
cc_mod1.ppt useful for engineering students
Mprasad23
 
PDF
Huawei OceanStorDoradoAll-Flashtorage Systems.pdf
vineeshen2
 
PPT
High Performance Communication for Oracle using InfiniBand
webhostingguy
 
PPTX
Oracle Coherence
Liran Zelkha
 
PPT
Collaboration and Grid Technologies
Videoguy
 
PDF
Atmosphere 2014: Switching from monolithic approach to modular cloud computin...
PROIDEA
 
PDF
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
GeeksLab Odessa
 
PDF
Microsoft azure platforms
Motty Ben Atia
 
HTTP_SS_ENTERPRISE_EN
Bernd Thomsen
 
IoT meets Big Data
ratthaslip ranokphanuwat
 
Io t data streaming
ratthaslip ranokphanuwat
 
Arquitetura Hibrida - Integrando seu Data Center com a Nuvem da AWS
Amazon Web Services LATAM
 
Windows iot barone
DotNetCampus
 
MICROSOFT E IL MONDO IOT
DotNetCampus
 
How To Build A Stable And Robust Base For a “Cloud”
Hardway Hou
 
A guide through the Azure Messaging services - Update Conference
Eldert Grootenboer
 
Introduction To Cloud Computing
Rinat Shagisultanov
 
India Webinar
Ganesh Raja
 
Phoenix Data Conference - Big Data Analytics for IoT 11/4/17
Mark Goldstein
 
Windows Azure - Uma Plataforma para o Desenvolvimento de Aplicações
Comunidade NetPonto
 
cc_mod1.ppt useful for engineering students
Mprasad23
 
Huawei OceanStorDoradoAll-Flashtorage Systems.pdf
vineeshen2
 
High Performance Communication for Oracle using InfiniBand
webhostingguy
 
Oracle Coherence
Liran Zelkha
 
Collaboration and Grid Technologies
Videoguy
 
Atmosphere 2014: Switching from monolithic approach to modular cloud computin...
PROIDEA
 
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
GeeksLab Odessa
 
Microsoft azure platforms
Motty Ben Atia
 
Ad

More from Dominik Obermaier (16)

PPTX
Kafka Summit 2021 - Why MQTT and Kafka are a match made in heaven
Dominik Obermaier
 
PPTX
Inntroduction to MQTT Sparkplug with HiveMQ and Opto22
Dominik Obermaier
 
PDF
Building a reliable and scalable IoT platform with MongoDB and HiveMQ
Dominik Obermaier
 
PDF
Modernizing the Manufacturing Industry with Kafka and MQTT
Dominik Obermaier
 
PDF
HiveMQ Cloud - The Cloud Native IoT Messaging Layer
Dominik Obermaier
 
PDF
MQTT 5 - What's New?
Dominik Obermaier
 
PDF
Scaling MQTT - Webinar with Elastic Beam
Dominik Obermaier
 
PDF
MQTT Deep Dive Workshop [GERMAN]
Dominik Obermaier
 
PDF
Securing MQTT - BuildingIoT 2016 slides
Dominik Obermaier
 
PDF
An introduction to MQTT - Pub / Sub for the masses
Dominik Obermaier
 
PDF
Pub/Sub for the masses- Ein Einführungsworkshop in MQTT [GERMAN]
Dominik Obermaier
 
PDF
JAX 2014 - M2M for Java Developers with MQTT
Dominik Obermaier
 
PDF
Push! - MQTT for the Internet of Things
Dominik Obermaier
 
PDF
Eclipse Democamps 2013 - M2M for Java Developers with MQTT
Dominik Obermaier
 
PDF
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
Dominik Obermaier
 
PDF
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
Dominik Obermaier
 
Kafka Summit 2021 - Why MQTT and Kafka are a match made in heaven
Dominik Obermaier
 
Inntroduction to MQTT Sparkplug with HiveMQ and Opto22
Dominik Obermaier
 
Building a reliable and scalable IoT platform with MongoDB and HiveMQ
Dominik Obermaier
 
Modernizing the Manufacturing Industry with Kafka and MQTT
Dominik Obermaier
 
HiveMQ Cloud - The Cloud Native IoT Messaging Layer
Dominik Obermaier
 
MQTT 5 - What's New?
Dominik Obermaier
 
Scaling MQTT - Webinar with Elastic Beam
Dominik Obermaier
 
MQTT Deep Dive Workshop [GERMAN]
Dominik Obermaier
 
Securing MQTT - BuildingIoT 2016 slides
Dominik Obermaier
 
An introduction to MQTT - Pub / Sub for the masses
Dominik Obermaier
 
Pub/Sub for the masses- Ein Einführungsworkshop in MQTT [GERMAN]
Dominik Obermaier
 
JAX 2014 - M2M for Java Developers with MQTT
Dominik Obermaier
 
Push! - MQTT for the Internet of Things
Dominik Obermaier
 
Eclipse Democamps 2013 - M2M for Java Developers with MQTT
Dominik Obermaier
 
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
Dominik Obermaier
 
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
Dominik Obermaier
 
Ad

Recently uploaded (20)

PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
July Patch Tuesday
Ivanti
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 

In search of the perfect IoT Stack - Scalable IoT Architectures with MQTT