Balancing MQTT vs HTTP for secure device communication under strict security policies in regulated IoT deployments

I’m evaluating protocol choices for a large-scale IoT deployment on Watson IoT Platform and wanted to start a discussion on the security trade-offs between MQTT and HTTP for device communication.

Our requirements include strict TLS mutual authentication, support for devices with varying firmware capabilities, and full audit trail compliance for regulatory requirements. We have approximately 50,000 devices ranging from high-capability edge gateways to resource-constrained sensors.

MQTT offers persistent connections and lower overhead, but I’m concerned about maintaining TLS sessions at scale and ensuring consistent mutual authentication across diverse device firmware. HTTP provides simpler request-response patterns with clear audit trails, but the connection overhead might impact battery-powered devices.

What experiences have others had balancing these security and operational considerations? Particularly interested in real-world insights on TLS handshake overhead, certificate management complexity, and compliance audit requirements.

We run exactly that hybrid model. High-capability devices use MQTT with X.509 certificates and mutual TLS. Resource-constrained devices use HTTP with JWT tokens. Watson IoT Platform handles both seamlessly, but you need careful planning. The operational complexity comes from certificate management (PKI infrastructure) versus token management (key rotation, validation). We built separate monitoring pipelines for each protocol to maintain proper audit trails. The key is standardizing your device metadata schema regardless of protocol so your analytics layer doesn’t need protocol-specific logic.

We went with MQTT for our deployment and haven’t regretted it. The persistent connection model significantly reduces TLS handshake overhead compared to HTTP’s per-request model. For mutual authentication, we implemented certificate-based auth which Watson IoT handles well. The key is proper certificate lifecycle management - we use short-lived certificates (90 days) with automated rotation through Watson IoT’s device management APIs.

The firmware complexity factor is real and often underestimated. MQTT requires a more sophisticated protocol stack implementation, especially when you add TLS 1.2+ and mutual authentication. Our resource-constrained devices (8KB RAM) struggle with full MQTT+TLS implementations. We ended up using HTTP for these devices with token-based auth instead of certificates. The connection overhead is mitigated by batching telemetry data and sending less frequently. For devices with more resources, MQTT with certificate-based mutual auth is definitely superior for security and efficiency.

From a compliance perspective, both protocols can meet audit requirements, but the implementation differs significantly. MQTT’s persistent connections mean you need robust session logging and connection state tracking for audit trails. HTTP’s stateless nature makes audit logging more straightforward - each request is a discrete event. We use HTTP for devices that need to demonstrate clear transaction boundaries for regulatory compliance, especially in financial services where every data transmission must be individually auditable with non-repudiation.

One aspect not mentioned yet is the attack surface difference. MQTT’s persistent connections create longer-lived TLS sessions which can be targets for session hijacking if not properly secured. HTTP’s ephemeral connections have smaller attack windows per request. However, MQTT’s QoS levels provide better message delivery guarantees which can be critical for security events. For compliance, consider that some frameworks specifically require mutual authentication at the transport layer - TLS mutual auth satisfies this for both protocols, but certificate-based MQTT aligns better with zero-trust architectures.