Skip to content

Technology Stack Components

Technology Stack Components

This section provides a detailed examination of each component in the IoT solution stack. By the end of this section, you will be able to:

  • Explain the function and configuration of each technology component
  • Understand how components interact and depend on each other
  • Describe commercial alternatives and when to recommend them
  • Answer customer questions about component selection and trade-offs

The following diagram shows how the technology components connect and their data flow direction:

┌─────────────────────────────────────────────────────────────────────┐
│ Grafana Dashboard │
│ (Visualization & Alerting) │
└───────────────────────────┬─────────────────────────────────────────┘
│ Queries (Flux/SQL)
┌───────────────────────────▼─────────────────────────────────────────┐
│ InfluxDB + MariaDB │
│ (Time-Series + Relational Storage) │
└───────────────────────────┬─────────────────────────────────────────┘
│ Writes (Node-RED nodes)
┌───────────────────────────▼─────────────────────────────────────────┐
│ Node-RED │
│ (Flow Engine, Data Processing, Integration) │
└───────────────────────────┬─────────────────────────────────────────┘
│ Subscribe (MQTT)
┌───────────────────────────▼─────────────────────────────────────────┐
│ MQTT Broker (Mosquitto / EMQX) │
│ (Message Routing) │
└───────────────────────────┬─────────────────────────────────────────┘
│ Publish (MQTT)
┌───────────────────────────▼─────────────────────────────────────────┐
│ ESP32 │
│ (Microcontroller + Sensors/Actuators) │
└─────────────────────────────────────────────────────────────────────┘

The ESP32 is the edge device that interfaces directly with sensors and actuators. It collects physical measurements (temperature, humidity, motion, etc.) and converts them into digital data for transmission.

SpecificationDetail
ProcessorXtensa LX6 dual-core (or LX7 on S3) up to 240 MHz
RAM520 KB SRAM (up to 8 MB PSRAM on some models)
Flash4-16 MB
WiFi802.11 b/g/n, 2.4 GHz
BluetoothBLE 4.2 (Classic on original, BLE only on C3/S3)
GPIOVaries by model: 16-34 programmable pins
ADC12-bit, up to 18 channels
DAC8-bit, 2 channels (not on C3/S3)
Deep Sleep~10 µA current consumption
Operating Voltage3.3V (5V tolerant on some pins)
ModelKey FeatureBest ForPrice Range
ESP32 DevKit (original)Full GPIO, Bluetooth ClassicGeneral-purpose prototyping$5-8
ESP32-S3AI accelerator, more PSRAMLVGL displays, edge ML$6-10
ESP32-C3RISC-V core, lower costSimple sensors, cost-sensitive$3-5
ESP32-CAMCamera interface, PSRAMImage capture, surveillance$7-12
ESP32-XIAO (Seeed)Ultra-compact (21x17.5mm)Wearable, space-constrained$4-7
ESP32-Tower (Olimex)Industrial connectors, LiPoPrototyping with peripherals$12-18

When discussing capabilities with customers, use this boundary assessment:

Capabilities:

  • Read up to 18 analog sensors simultaneously (with ADC multiplexing)
  • Control relays, LEDs, motors (via driver ICs)
  • Process JSON, perform calculations, apply logic
  • Communicate via WiFi up to ~50m indoor, ~100m outdoor
  • Operate on battery for weeks to months (with deep sleep optimization)
  • Serve a simple web page or REST API endpoint

Limitations:

  • Cannot process high-resolution video (limited to JPEG capture, not streaming)
  • Limited floating-point performance (use integer math where possible)
  • WiFi range constrained; no cellular/LTE without external module
  • No native Ethernet; requires SPI Ethernet module (W5500, ENC28J60)
  • Flash wear limit (~100,000 write cycles for SPI flash)
  • No hardware crypto acceleration on original ESP32 (S3 has improved support)

Component 2: MQTT Broker (Mosquitto / EMQX)

Section titled “Component 2: MQTT Broker (Mosquitto / EMQX)”

The MQTT broker is the central message router. All devices publish data to the broker, and all backend services subscribe through it. The broker decouples senders from receivers — devices do not need to know about each other.

FeatureMosquittoEMQX
LicenseEclipse Public License (open source)Apache 2.0 (open source core, enterprise edition available)
LanguageCErlang
Max Connections (single node)~10,000~1,000,000
Cluster SupportLimited (bridge mode)Native clustering (horizontal scaling)
MQTT 5.0SupportedSupported
Rule EngineNo (requires external integration)Built-in SQL-like rule engine
Web DashboardMinimal (CLI-focused)Rich web UI
Resource Usage~10 MB RAM~50 MB RAM (minimum)
ConfigurationText file (mosquitto.conf)Dashboard + config file
TLS SupportYesYes
Plugin SystemYes (auth, logging)Yes (auth hooks, extensions)

Recommend Mosquitto when:

  • Deployments under 1,000 devices
  • Resource-constrained server (e.g., Raspberry Pi)
  • Simple setup without cluster requirements
  • Customer prefers minimal overhead

Recommend EMQX when:

  • Deployments over 1,000 devices
  • High-availability and clustering required
  • Built-in rule engine for data preprocessing needed
  • Customer wants a management dashboard

Node-RED is the automation and integration engine. It receives MQTT data, processes it, stores it, and triggers actions. It is the component where most business logic lives.

  • Flow-based programming: Visual wiring of nodes eliminates boilerplate code
  • 1,000+ community nodes: Extend functionality via npm packages
  • Built-in editor: Browser-based IDE with debug console and node inspector
  • Context storage: Retain state across messages (flow, global, file-based)
  • HTTP endpoints: Can act as a web server or REST API
  • Function node: Write custom JavaScript for complex logic
  • Subflows: Encapsulate reusable logic into single nodes
Deployment ScaleRAM UsageNotes
Demo / single project50-100 MBMinimal flows, few nodes
Small production (10-50 devices)100-300 MBMultiple flows, database nodes
Medium production (50-500 devices)300-500 MBComplex flows, HTTP endpoints
Large (500+ devices, heavy processing)500 MB - 2 GBConsider horizontal scaling

Component 4: InfluxDB (Time-Series Database)

Section titled “Component 4: InfluxDB (Time-Series Database)”

InfluxDB stores sensor data as time-series points. Each point has a measurement name, tags (indexed metadata), and fields (numeric values). This structure is optimized for IoT workloads.

measurement: "environment"
tags: location="factory_zone1", sensor_id="esp32_01"
fields: temperature=26.5, humidity=62.3
timestamp: 2026-05-17T10:30:00Z
  • Continuous queries: Automatically downsample and aggregate data
  • Retention policies: Auto-delete data older than configurable duration
  • Flux query language: Powerful data transformation and analysis
  • HTTP API: Write and query data via REST endpoints
  • Bulk import: Backfill historical data from CSV or other sources
Sampling IntervalDevicesPoints/DayStorage/Day
10 seconds1086,400~5 MB
1 minute5072,000~4 MB
5 minutes10028,800~1.5 MB
1 hour50012,000~0.7 MB
VersionStatusRecommendation
InfluxDB 1.xStable, long-termBest for small/medium deployments. SQL-like query language.
InfluxDB 2.x / OSSCurrent, activeFlux language, new UI, but higher resource usage.
InfluxDB CloudManaged serviceFor customers who want zero maintenance.

Grafana is the visualization layer that turns stored data into actionable dashboards. It connects to InfluxDB (and MariaDB) and provides real-time graphical display.

  • Dashboard templates: Export and reuse across customer demonstrations
  • Alerting engine: Email, Telegram, Slack, Webhook notifications
  • Annotations: Mark events (e.g., “device offline”, “threshold breached”)
  • Variables: Create interactive dashboards where customers choose time range, device, location
  • Panels: Time series, bar chart, gauge, table, heatmap, stat, and more

Dashboard Design Principles for Customer Demos

Section titled “Dashboard Design Principles for Customer Demos”
  1. Start with key metrics: Temperature, humidity, power consumption — the numbers customers care about most
  2. Use color coding: Green (normal), yellow (warning), red (alert) for instant comprehension
  3. Include time range selector: Let customers switch between 1h, 24h, 7d, 30d views
  4. Add threshold lines: Show acceptable ranges directly on charts
  5. Keep it clean: Avoid information overload — 3-5 panels per dashboard is ideal for demos

Docker containers package each service (Mosquitto, Node-RED, InfluxDB, Grafana) into isolated, portable units. Docker Compose orchestrates them as a single stack.

  • Reproducibility: Same environment on any machine (Windows, Mac, Linux)
  • Isolation: Each service runs independently; one failure doesn’t cascade
  • Simplified updates: Replace a container without affecting others
  • Demo portability: Package and deploy the entire stack on a customer’s server
  • Resource efficiency: Containers share the host OS kernel (vs. VMs)

A typical docker-compose.yml for this stack includes:

ServiceImagePortsVolume
Mosquittoeclipse-mosquitto:21883, 8883Config, data, log
Node-REDnodered/node-red:41880User data
InfluxDBinfluxdb:28086Data storage
Grafanagrafana/grafana:113000Dashboards, config

When customers ask about alternatives, this reference table is useful during consultations:

ComponentChosen SolutionPrimary AlternativeKey Differentiator
MicrocontrollerESP32Arduino Due, STM32Built-in WiFi + BLE, cost
CommunicationMQTTHTTP, CoAP, ZigbeeLightweight, pub-sub, QoS
BrokerMosquitto/EMQXVerneMQ, HiveMQ CEOpen-source, MQTT 5.0
AutomationNode-REDHome Assistant, n8nVisual flow, IoT-focused
Time-Series DBInfluxDBTimescaleDB, PrometheusWrite performance, retention
VisualizationGrafanaKibana, ChronografMulti-source, alerting
ContainerizationDockerPodman, KubernetesIndustry standard, simple

Each component in the technology stack serves a specific purpose, and understanding their roles enables effective customer conversations:

  • ESP32 handles sensor data collection and device control at the edge
  • MQTT broker provides reliable message routing between devices and servers
  • Node-RED processes data, applies business logic, and integrates systems
  • InfluxDB stores time-series data with high write throughput
  • Grafana visualizes data in real-time dashboards with alerting
  • Docker makes the entire stack portable, scalable, and easy to deploy