Assignment 2 - MQTT Vs CoAP Group N2
Assignment 2 - MQTT Vs CoAP Group N2
● Conclusion
Background
➢ We understand what is MQTT and CoAP protocol are.
● Service
● Assumption
● Vocabulary
● Encoding
● Procedure
➢ Hands on Practice to test and analysis the services of each protocol with the help of
Wireshark simulation.
MQTT CoAP
Highly decoupled publisher and subscriber Model Asynchronous Communication Model
Ensures reliable message delivery irrespective of source Smaller packet size and faster transmit cycles
node through a guaranteed message delivery model
MQTT uses TCP and therefore much better for scenarios CoAP uses UDP for transport layer, here connectionless
where connectivity is needed for most of the time models ensures that battery consumption is better
It is unencrypted, but can use TLS/SSL for security and Works with DTLS (Data transport Layer security)
encryption
● latency
● Throughput
● Qos
Parameters for Performance Measurement
Local
● From wireless network to a fixed server
latency
● Long latency: bw=10, delay='400ms'
slow
● Basic Slow topology small buffers:max_queue_size=5, bw=0.1, delay='200ms'
buffered
● Slow overbuffered bottleneck: max_queue_size=200, bw=0.1, delay='200ms'
lossy
● 10% packet loss rate: loss=10, bw=10, delay='20ms'
MQTT Performance results
Scenario 1 results:
● Throughput
● Latency
MQTT Scalability
Scenario 2:
● HAProxy Load Balancer (local machine)
● Broker 1: Mosquito broker on iot.eclipse.org
● Broker 2: Another local machine with the same subnet as HAProxy.
MQTT Scalability
● Latency:
● Throughput:
CoAP Scalability
● Measuring scalability we would test making all clients requests at the same server
then we added many request per clients and repeat in different environment
scenarios.
● Unfortunately we had no results as we had problem with coap library and problems
with coap servers implementation.
MQTT and CoAP Experimental Comparison
Conclusion
- MQTT and CoAP Performance
- Latency doesn’t scale with packet size, buffer size, or slow bandwidth, and
QoS levels
- Throughput scales
- negatively with latency
- positively with packet size and QoS levels
- Packet loss affects greatly
- MQTT Scalability
- Based on current testing, it seems that MQTT is scalable. However, the
latency and CPU usage increases if more clients are connected.
- But, it has to be tested on a larger scale and with different brokers as well.
- More scalable if connected using load balancer.
Thank you!