Due to rapid development of IoT, it has been taken into consideration by both academia and industry. IoT devices produce a big amount of data that must be processed and transmitted. Some of the applications are delay sensitive and the data must be transmitted from producer to consumer as soon as possible. As shown in the following figure, fog computing acts as an intermediary between the cloud and end devices which brings processing, storage and networking services closer to the end devices themselves.