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

PDF
Lightweight and scalable IoT Architectures with MQTT
PDF
Lightweight and scalable IoT Messaging with MQTT
PDF
HiveMQ Webinar: Lightweight and scalable IoT Messaging with MQTT
PPTX
MQTT 5: Why you need it and potential pitfalls
PDF
A pure Java MQTT Stack for IoT
PDF
Software-Infrastrukturen modernisieren in der Produktion - Digitale Transform...
PDF
MQTT AS A KEY TECHNOLOGY FOR INDUSTRY 4.0 & IIoT
PDF
Messaging for IoT
Lightweight and scalable IoT Architectures with MQTT
Lightweight and scalable IoT Messaging with MQTT
HiveMQ Webinar: Lightweight and scalable IoT Messaging with MQTT
MQTT 5: Why you need it and potential pitfalls
A pure Java MQTT Stack for IoT
Software-Infrastrukturen modernisieren in der Produktion - Digitale Transform...
MQTT AS A KEY TECHNOLOGY FOR INDUSTRY 4.0 & IIoT
Messaging for IoT

What's hot (17)

PDF
Mqtt 5 meetup dortmund
PDF
Messaging for IoT
PDF
Mqtt – a protocol for the internet of things
PDF
Building Scalable & Reliable MQTT Clients for Enterprise Computing
PDF
IoT with MQTT and Paho for Webpages - Eclipse Democamp München 2014
PDF
Getting started with MQTT - Virtual IoT Meetup presentation
PPT
SSL Implementation - IBM MQ - Secure Communications
PDF
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
PPTX
Protocols for internet of things
PPT
PPT
Virtual Private Network
PDF
MQTT - Communication in the Internet of Things
PPTX
Building an IoT Cloud for Healthcare: How to Solve Networking Challenges and ...
PDF
Operations Experience
PDF
MidoNet roadmap
PPSX
BSET_Lecture_Crypto and SSL_Overview_FINAL
PDF
Using Kubernetes to make cellular data plans cheaper for 50M users
Mqtt 5 meetup dortmund
Messaging for IoT
Mqtt – a protocol for the internet of things
Building Scalable & Reliable MQTT Clients for Enterprise Computing
IoT with MQTT and Paho for Webpages - Eclipse Democamp München 2014
Getting started with MQTT - Virtual IoT Meetup presentation
SSL Implementation - IBM MQ - Secure Communications
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
Protocols for internet of things
Virtual Private Network
MQTT - Communication in the Internet of Things
Building an IoT Cloud for Healthcare: How to Solve Networking Challenges and ...
Operations Experience
MidoNet roadmap
BSET_Lecture_Crypto and SSL_Overview_FINAL
Using Kubernetes to make cellular data plans cheaper for 50M users
Ad

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

PDF
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
PDF
Best Practices for Streaming Connected Car Data with MQTT & Kafka
PDF
Introducing HiveMQ Cloud
PDF
HiveMQ Cloud - The Cloud Native IoT Messaging Layer
PDF
Modernizing the Manufacturing Industry with Kafka and MQTT
PDF
HiveMQ + Kafka: The ideal solution for IoT MQTT data integration
PDF
HiveMQ + Kafka - The Ideal Solution for IoT MQTT Data Integration
PDF
Scaling MQTT - Webinar with Elastic Beam
PDF
Best Practices for Streaming IoT Data with MQTT and Apache Kafka®
PPTX
Kafka Summit 2021 - Why MQTT and Kafka are a match made in heaven
PDF
Modernizing the Manufacturing Industry with MQTT and Kafka
PDF
Best Practices for Streaming IoT Data with MQTT and Apache Kafka
PDF
Viele Autos, noch mehr Daten: IoT-Daten-Streaming mit MQTT & Kafka (Kai Waehn...
PDF
HiveMQ Cloud Webinar
PPTX
IoT Data Streaming - Why MQTT and Kafka are a match made in heaven | Dominik ...
PDF
Best Practices Using MQTT to Connect Millions of IoT Devices
PDF
How to Set up, Run and Scale a Secure MQTT Broker on Kubernetes
PDF
As34269277
PDF
Lightweight and Scalable IoT Messaging with MQTT
PPTX
OpenStack HA
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Best Practices for Streaming Connected Car Data with MQTT & Kafka
Introducing HiveMQ Cloud
HiveMQ Cloud - The Cloud Native IoT Messaging Layer
Modernizing the Manufacturing Industry with Kafka and MQTT
HiveMQ + Kafka: The ideal solution for IoT MQTT data integration
HiveMQ + Kafka - The Ideal Solution for IoT MQTT Data Integration
Scaling MQTT - Webinar with Elastic Beam
Best Practices for Streaming IoT Data with MQTT and Apache Kafka®
Kafka Summit 2021 - Why MQTT and Kafka are a match made in heaven
Modernizing the Manufacturing Industry with MQTT and Kafka
Best Practices for Streaming IoT Data with MQTT and Apache Kafka
Viele Autos, noch mehr Daten: IoT-Daten-Streaming mit MQTT & Kafka (Kai Waehn...
HiveMQ Cloud Webinar
IoT Data Streaming - Why MQTT and Kafka are a match made in heaven | Dominik ...
Best Practices Using MQTT to Connect Millions of IoT Devices
How to Set up, Run and Scale a Secure MQTT Broker on Kubernetes
As34269277
Lightweight and Scalable IoT Messaging with MQTT
OpenStack HA
Ad

More from Dominik Obermaier (12)

PPTX
Inntroduction to MQTT Sparkplug with HiveMQ and Opto22
PDF
Building a reliable and scalable IoT platform with MongoDB and HiveMQ
PDF
MQTT 5 - What's New?
PDF
MQTT Deep Dive Workshop [GERMAN]
PDF
Securing MQTT - BuildingIoT 2016 slides
PDF
An introduction to MQTT - Pub / Sub for the masses
PDF
Pub/Sub for the masses- Ein Einführungsworkshop in MQTT [GERMAN]
PDF
JAX 2014 - M2M for Java Developers with MQTT
PDF
Push! - MQTT for the Internet of Things
PDF
Eclipse Democamps 2013 - M2M for Java Developers with MQTT
PDF
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
PDF
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
Inntroduction to MQTT Sparkplug with HiveMQ and Opto22
Building a reliable and scalable IoT platform with MongoDB and HiveMQ
MQTT 5 - What's New?
MQTT Deep Dive Workshop [GERMAN]
Securing MQTT - BuildingIoT 2016 slides
An introduction to MQTT - Pub / Sub for the masses
Pub/Sub for the masses- Ein Einführungsworkshop in MQTT [GERMAN]
JAX 2014 - M2M for Java Developers with MQTT
Push! - MQTT for the Internet of Things
Eclipse Democamps 2013 - M2M for Java Developers with MQTT
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
cuic standard and advanced reporting.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
KodekX | Application Modernization Development
PDF
Chapter 3 Spatial Domain Image Processing.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Teaching material agriculture food technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Advanced methodologies resolving dimensionality complications for autism neur...
Diabetes mellitus diagnosis method based random forest with bat algorithm
cuic standard and advanced reporting.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Review of recent advances in non-invasive hemoglobin estimation
Spectral efficient network and resource selection model in 5G networks
Reach Out and Touch Someone: Haptics and Empathic Computing
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Understanding_Digital_Forensics_Presentation.pptx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Spectroscopy.pptx food analysis technology
Big Data Technologies - Introduction.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
KodekX | Application Modernization Development
Chapter 3 Spatial Domain Image Processing.pdf
The AUB Centre for AI in Media Proposal.docx
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...

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