The fast increment in the number of IoT (Internet of Things) devices is accelerating the research on new solutions to make cloud services scalable. In this context, the novel concept of fog computing as well as the combined fog-to-cloud computing paradigm is becoming essential to decentralize the cloud, while bringing the services closer to the end-system. This paper surveys on the application layer communication protocols to fulfill the IoT communication requirements, and their potential for implementation in fog-and cloud-based IoT systems. To this end, the paper first briefly presents potential protocol candidates, including request-reply and publish-subscribe protocols. After that, the paper surveys these protocols based on their main characteristics, as well as the main performance issues, including latency, energy consumption and network throughput. These findings are thereafter used to place the protocols in each segment of the system (IoT, fog, cloud), and thus opens up the discussion on their choice, interoperability and wider system integration. The survey is expected to be useful to system architects and protocol designers when choosing the communication protocols in an integrated IoT-to-fog-to-cloud system architecture. Continuous innovations in hardware, software and connection solutions in the last decade have lead to the expansion of the Internet of Things (IoT) with the number of connected devices growing by the day [1] [2]. The huge amount of data generated by these devices require to find a proper system architecture able to both process and store all the data. While cloud-based architectures are being currently used for that purpose, the new fog computing paradigm is envisioned to scale and optimize the IoT infrastructures [3]. Examples of the cloud-based IoT solutions have been proposed in [4], [5], [6] and a detailed analysis of properties for IoT cloud providers has been conducted in [7]. These studies have shown that cloud computing has the potential to satisfy many IoT requirements, such as monitoring of services, powerful processing of sensor data streams and visualization tasks. On the other hand, fog-based solutions are suited to address real-time processing, fast data response, and latency issues, thus extending the cloud capabilities closer to the edge of the network [8]. Among many factors that will determine the performance in a combined IoT, fog and cloud computing paradigm, the application layer communication, which in turn depends on the selected communication protocols, is one of the main ones.Despite the popularity and wide spread usage of HTTP, the currently used protocols in various domains of IoT, fog and cloud domains are de-facto fragmented with many different solutions. This is due to the different requirements and areas that IoT needs to cover, combining the functionalities of sensors, actuators and computing power with security, connectivity and a myriad of other features. As a result, there is no common agreement on the reference architecture or adopted standards of co...