Virtualized Fog Network with Load Balancing for IoT based Fog-to-Cloud

Istabraq Al-Joboury - Al-Nahrain University, College of Information Engineering, Iraq
Emad H. Al-Hemiary - Al-Nahrain University, College of Information Engineering, Iraq

Citation Format:



Fog Computing is a new concept made by Cisco to provide same functionalities of Cloud Computing but near to Things to enhance performance such as reduce delay and response time. Packet loss may occur on single Fog server over a huge number of messages from Things because of several factors like limited bandwidth and capacity of queues in server. In this paper, Internet of Things based Fog-to-Cloud architecture is proposed to solve the problem of packet loss on Fog server using Load Balancing and virtualization. The architecture consists of 5 layers, namely: Things, gateway, Fog, Cloud, and application. Fog layer is virtualized to specified number of Fog servers using Graphical Network Simulator-3 and VirtualBox on local physical server. Server Load Balancing router is configured to distribute the huge traffic in Weighted Round Robin technique using Message Queue Telemetry Transport protocol. Then, maximum message from Fog layer are selected and sent to Cloud layer and the rest of messages are deleted within 1 hour using our proposed Data-in-Motion technique for storage, processing, and monitoring of messages. Thus, improving the performance of the Fog layer for storage and processing of messages, as well as reducing the packet loss to half and increasing throughput to 4 times than using single Fog server.


Internet of Things; Cloud Computing; Fog Computing; Load Balancing; Data in Motion; MQTT; Packet loss; SLB.

Full Text:



A. M. Rahmani, T. N. Gia, B. Negash, A. Anzanpour, I. Azimi, M. Jiang, and P. Liljeberg, “Exploiting smart e-Health gateways at the edge of healthcare Internet-of-Things: A fog computing approach,” Future Generation Computer Systems, vol. 78, pp. 641–658, 2018. DOI: 10.1016/j.future.2017.02.014.

K. H. Rahouma, R. H. M. Aly, and H. F. Hamed, “Challenges and Solutions of Using the Social Internet of Things in Healthcare and Medical Solutions—A Survey,” Toward Social Internet of Things (SIoT): Enabling Technologies, Architectures and Applications Studies in Computational Intelligence, pp. 13–30, 2019. DOI:10.1007/978-3-030-24513-9_2.

N. Zou, S. Liang, and D. He, “Issues and challenges of user and data interaction in healthcare-related IoT,” Library Hi Tech, vol. ahead-of-print, no. ahead-of-print, 2020. DOI: 10.1108/lht-09-2019-0177.

I. M. Al-Joboury and E. H. Al-Hemiary, “IoT Protocols Based Fog/Cloud over High Traffic," The ISC Int'l Journal of Information Security, vol. 11, no. 3, pp. 173–180, 2019. DOI: 10.22042/ISECURE.2019.11.3.23.

S. Tuli, N. Basumatary, S. S. Gill, M. Kahani, R. C. Arya, G. S. Wander, and R. Buyya, “HealthFog: An ensemble deep learning based Smart Healthcare System for Automatic Diagnosis of Heart Diseases in integrated IoT and fog computing environments,” Future Generation Computer Systems, vol. 104, pp. 187–200, 2020. DOI: 10.1016/j.future.2019.10.043.

T. S. Gunawan, M. H. H. Gani, F. D. A. Rahman, and M. Kartiwi, “Development of Face Recognition on Raspberry Pi for Security Enhancement of Smart Home System,” Indonesian Journal of Electrical Engineering and Informatics (IJEEI), vol. 5, no. 4, Jan. 2017. DOI: 10.11591/ijeei.v5i4.361.

E. M. Tordera, X. Masip-Bruin, J. Garcia-Alminana, A. Jukan, G. Ren, J. Zhu, and J. Farre, "What is a Fog Node A Tutorial on Current Concepts towards a Common Definition". arXiv preprint arXiv:1611.09193, 2016.

G. Javadzadeh and A. M. Rahmani, “Fog Computing Applications in Smart Cities: A Systematic Survey,” Wireless Networks, vol. 26, no. 2, pp. 1433–1457, Dec. 2019. DOI: 10.1007/s11276-019-02208-y.

Kernel-Based Virtual Machine (KVM),, [Accessed: 15-Nov-2019].

Oracle VM VirtualBox,, [Accessed: 15-Nov-2019].

The Xen Project (Xen),, [Accessed: 15-Nov-2019].

Virtual Machine Software (VMWare),, [Accessed: 15-Nov-2019].

“HAProxy,” powered by HAPROXY. [Online]. Available: [Accessed: 15-Nov-2019].

“MQTT Load Balancing and Session Persistence with NGINX Plus,” NGINX. [Online]. Available: [Accessed: 15-July-2019].

“Scalable and Secure MQTT Load Balancing with Elastic Beam and HiveMQ,” HiveMQ, 12-Sep-2016. [Online]. Available: [Accessed: 15-Nov-2019].

A. Al-Qerem, M. Alauthman, A. Almomani, and B. B. Gupta, “IoT transaction processing through cooperative concurrency control on fog–cloud computing environment,” Soft Computing, vol. 24, no. 8, pp. 5695–5711, 2019. DOI: 10.1007/s00500-019-04220-y.

X. Masip-Bruin, E. Marin-Tordera, A. Alonso, and J. Garcia, “Fog-to-cloud Computing (F2C): The key technology enabler for dependable e-health services deployment,” 2016 Mediterranean Ad Hoc Networking Workshop (Med-Hoc-Net), 2016. DOI: 10.1109/MedHocNet.2016.7528425.

V. B. Souza, X. Masip-Bruin, E. Marin-Tordera, W. Ramirez, and S. Sanchez, “Towards Distributed Service Allocation in Fog-to-Cloud (F2C) Scenarios,” 2016 IEEE Global Communications Conference (GLOBECOM), 2016. DOI: 10.1109/GLOCOM.2016.7842341.

V. B. C. Souza, W. Ramirez, X. Masip-Bruin, E. Marin-Tordera, G. Ren, and G. Tashakor, “Handling service allocation in combined Fog-cloud scenarios,” 2016 IEEE International Conference on Communications (ICC), 2016. DOI: 10.1109/ICC.2016.7511465.

R. Deng, R. Lu, C. Lai, T. H. Luan, and H. Liang, “Optimal Workload Allocation in Fog-Cloud Computing Towards Balanced Delay and Power Consumption,” IEEE Internet of Things Journal, pp. 1–1, 2016. DOI: 10.1109/JIOT.2016.2565516.

C. S. Nandyala and H.-K. Kim, “From Cloud to Fog and IoT-Based Real-Time U-Healthcare Monitoring for Smart Homes and Hospitals,” International Journal of Smart Home, vol. 10, no. 2, pp. 187–196, 2016. DOI:10.14257/ijsh.2016.10.2.18.

R. Cao, Z. Tang, C. Liu, and B. Veeravalli, “A Scalable Multi-cloud Storage Architecture for Cloud-Supported Medical Internet of Things,” IEEE Internet of Things Journal, pp. 1–1, 2019. DOI: 10.1109/JIOT.2019.2946296.

A. Malik and H. Om, “Cloud Computing and Internet of Things Integration: Architecture, Applications, Issues, and Challenges,” Sustainable Cloud and Energy Services, pp. 1–24, 2017. DOI: 10.1007/978-3-319-62238-5_1.

"MQTT," 2014. [Online]. Available: [Accessed: 15-Nov-2019].

A. Banks and R. Gupta. "MQTT Version 3.1. 1." OASIS standard, 2014.

“ISO - International Organization for Standardization,” ISO/IEC 20922:2016 - Information technology -- Message Queuing Telemetry Transport (MQTT) v3.1.1, 08-Jun-2016. [Online]. Available: [Accessed: 15-Nov-2019].

K. Fysarakis, I. Askoxylakis, O. Soultatos, I. Papaefstathiou, C. Manifavas, and V. Katos, “Which IoT Protocol? Comparing Standardized Approaches over a Common M2M Application,” 2016 IEEE Global Communications Conference (GLOBECOM), 2016. DOI:10.1109/glocom.2016.7842383.

M. A. Triawan, H. Hindersah, D. Yolanda, and F. Hadiatna, “Internet of things using publish and subscribe method cloud-based application to NFT-based hydroponic system,” 2016 6th International Conference on System Engineering and Technology (ICSET), 2016. DOI: 10.1109/ICSEngT.2016.7849631.

D. Thangavel, X. Ma, A. Valera, H.-X. Tan, and C. K.-Y. Tan, “Performance evaluation of MQTT and CoAP via a common middleware,” 2014 IEEE Ninth International Conference on Intelligent Sensors, Sensor Networks and Information Processing (ISSNIP), 2014. DOI: 10.1109/ISSNIP.2014.6827678.

P. Sethi and S. R. Sarangi, “Internet of Things: Architectures, Protocols, and Applications,” Journal of Electrical and Computer Engineering, vol. 2017, pp. 1–25, 2017. DOI: 10.1155/2017/9324035

K. Grgic, I. Speh, and I. Hedi, “A web-based IoT solution for monitoring data using MQTT protocol,” 2016 International Conference on Smart Systems and Technologies (SST), 2016. DOI: 10.1109/SST.2016.7765668.

I. Al-Joboury and E. Al-Hemiary, “IoT-F2CDM-LB: IoT Based Fog-to-Cloud and Data-in-Motion Architectures with Load Balancing,” EAI Endorsed Transactions on Internet of Things, vol. 4, no. 13, p. 155332, Nov. 2018. DOI:10.4108/eai.6-4-2018.155332.

J. Zinke and B. Schnor, "The impact of weights on the performance of Server Load Balancing systems," 2013 International Symposium on Performance Evaluation of Computer and Telecommunication Systems (SPECTS), 2013.

R. R. Adiputra, S. Hadiyoso, and Y. S. Hariyani, “Internet of Things: Low Cost and Wearable SpO2 Device for Health Monitoring,” International Journal of Electrical and Computer Engineering (IJECE), vol. 8, no. 2, p. 939, Jan. 2018. DOI:10.11591/ijece.v8i2.pp939-945.

J. Tiso, Designing Cisco network service architectures (ARCH): Foundation learning guide. Indianapolis, IN: Cisco Press, 2016.

L. Hou, S. Zhao, X. Xiong, K. Zheng, P. Chatzimisios, M. S. Hossain, and W. Xiang, “Internet of Things Cloud: Architecture and Implementation,” IEEE Communications Magazine, vol. 54, no. 12, pp. 32–39, 2016. DOI: 10.1109/MCOM.2016.1600398CM.

Pulse sensor, [Accessed: 15-Nov-2019].

Tsung, [Accessed: 15-Nov-2019].

NodeMCU, [Accessed: 15-Nov-2019].

G. K. Dey, M. M. Ahmed, and K. T. Ahmmed, “Performance analysis and redistribution among RIPv2, EIGRP & OSPF Routing Protocol,” 2015 International Conference on Computer and Information Engineering (ICCIE), 2015. DOI: 10.1109/ccie.2015.7399308.

Wireshark. [Accessed: 15-Nov-2019].

M. Mamunur and P. Datta, “Performance Analysis of Vehicular Ad Hoc Network (VANET) Considering Different Scenarios of a City,” International Journal of Computer Applications, vol. 162, no. 10, pp. 1–7, 2017. DOI: 10.5120/ijca2017913329.

K. Suresh and R. J. Kannan, “Review of Advancements in Multi-tenant Framework in Cloud Computing,” Indonesian Journal of Electrical Engineering and Computer Science, vol. 11, no. 3, p. 1102, Jan. 2018. DOI: 10.11591/ijeecs.v11.i3.pp1102-1108.


  • There are currently no refbacks.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

JOIV : International Journal on Informatics Visualization
ISSN 2549-9610  (print) | 2549-9904 (online)
Organized by Department of Information Technology - Politeknik Negeri Padang, and Institute of Visual Informatics - UKM and Soft Computing and Data Mining Centre - UTHM
Published by Department of Information Technology - Politeknik Negeri Padang
W :
E :,,

View JOIV Stats

Creative Commons License is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.