# A Performance Analysis of Internet of Things Networking Protocols: Evaluating MQTT, CoAP, OPC UA
## 1 Introduction  
_Internet of Things (IoT)_ communication architectures and protocols have been evolving in order to cope with new challenges derived from environments involving a large number of heterogeneous, resource-constrained devices. Examples of such challenges are the support for intensive processing of large amounts of data; data filtering; data mining and classification; supporting high heterogeneity in terms of device hardware and software, as well as types of traffic. Moreover, IoT end-to-end services are supported by the _Transmission Control Protocol/Internet Protocol (TCP/IP)_. TCP/IP allows for interoperability, but faces limitations in IoT scenarios due to the large-scale heterogeneous IoT environments requirements, such as: time sensitive data, power constrains, or the need to support low latency (often, sub-second responses), and low jitter. Therefore, IoT scenarios rely on IP-based messaging protocols, or protocol frameworks such as OPC UA to meet the required application requirements, by providing support to asynchronous communication mediated via a server, or a broker entity. In other words, in practice, IoT scenarios rely on communication protocols and architectures that follow a broker-based publish/subscriber approach, which creates an abstraction between data sources (_producers_), data receivers (_consumers_).  
Albeit these solutions assist, for instance, frequent data polling, issues concerning mobility management, privacy, security, or resource consumption subsist. The root of thisproblem derives from the underlying networking semantics of TCP/IP, which follow a host-based reachability approach.  
Therefore, in order to further evolve communication protocols in a way that best sustains highly heterogeneous IoT environments, there is the need to better understand current implementation limitations, and performance aspects of the different available solutions.  
The rationale for this research concerns the need to better understand the different IoT communication protocols and architectures available; differences in their networking semantics; and differences in performance, in particular in regards to time to completion of requests (latency); packet loss. An hypothesis we advance in this context concerns the fact that there may not be a single \"better\" performance protocol. A second hypothesis we shall be attempting to answer concerns the potential design impact of the protocol in the performance. This is the core of the motivation for this work. This paper main contributions are as follows:  
* the work describes the different protocols and protocol frameworks, covering main aspects, advantages and disadvantages in IoT scenarios.
* the work provides a thorough comparison of the studied solutions.
* the work provides a performance evaluation of 3 specific solutions: MQTT, CoAP, OPC UA. The performance is evaluated in terms of time-to-completion of requests (latency), and packet loss. The performance evaluation has been carried out in a local testbed (COPELABS IoT Lab) and the large-scale testbed FIT-IoT.  
The paper is organised as follows. Section 2 describes work that is related to this paper, explaining our contributions. Section 3 goes over the available protocols and also delves on the novel paradigm of _Information-centric Networking (ICN)_, comparing the protocols in terms of architectural aspects such as: transport, communication pattern. Section 4 describes the experimental environments used for experimentation, including selection of hardware, software, as well as scripts developed. Section 5 gives input on the scenarios created to develop experiments. Section 6 covers the performance evaluation aspects on the local testbed, while Section 7 concerns the performance evaluation on FIT-IoT. The paper concludes in Section 8, where directions for future work are also highlighted.