## 1 Introduction  
Recently, Internet of Things (IoT) has become one of the major revolutions in the information and communication technology industry. With IoT, Internet connection extends beyond traditional smart devices such as smartphones and tablets to a diverse range of devices and things (sensors, machines, vehicles, etc. ), to accomplish many different applications and services such as: health care, medical treatment, traffic control, energy management, vehicle networks, etc. This produces a huge amount of data that need to be stored, processed and analyzed to obtain valuable information to meet user's goals and needs. In addition, the number and scale of applications and services are also increasing rapidly, which requires processing capability that even the most powerful smart devices cannot currently meet. The Cloud environment, which is known as a large resource center that allows ubiquitous access to share and provide resources to users flexibly through virtualization mechanism, can be a potential platform to support IoT developments. Restrictions of existing smart devices (battery life, processing power, storage capacity, and network resources) can be minimized by taking time-consuming and resource-intensive tasks to a powerful computing platform such as Cloud computing while leaving the simple tasks for the smart devices to handle. However, when combining IoT and Cloud computing, new problems emerge. According to Information Handling Services (IHS) Markit, the IoT market will grow from 15.4 billion devices installedin 2015 to 30.7 billion devices in 2020 and this figure in 2025 will rise to 75.4 billion. With this dramatic increase in number of connected devices, the Cloud architecture with traditional centralized processing characteristics (in which computing and storage resources are gathered and placed in several data centers) will be unable to meet the requirements of IoT applications. The main reason is due to the long distance between the Cloud and IoT devices. Massive flow of data sent by IoT devices to the Cloud via the Internet will result in congestion, especially at bottlenecks, while also creating burden on network performance and bandwidth. The delay in transmission leads to degraded Quality of Service (QoS), which has detrimental effect on the user's experience, since one of the properties of IoT applications is latency sensitivity. Moreover, constant connection to the Cloud is not always available for IoT devices, simply because it is very expensive. On the other hand, thanks to advances in both hardware and software technologies, many devices on the edge of the network (routers, gateways, workstations, personal computers, etc.) have more and more processing, storage and communication capabilities. Fog computing [1], first proposed by Cisco, represents a new model of Cloud computing, which can transform a network edge into a distributed computing infrastructure capable of implementing IoT applications. The concept of Fog Computing is to extend Cloud computing closer to the IoT devices that produce and consume data, which in turn brings processing and storage resources closer to users. Rather than pushing all processing operation to the Cloud, Fog Computing aims to handle part of workloads produced by applications on devices close to the network near the users, which are called Fog servers or Fog nodes. These devices can be deployed anywhere that has network connectivity: factories, commercial centers, on power poles, next to railways, inside vehicles, etc. Any device that has computing, storage and networking capabilities can be considered a Fog Node: controllers, switches, routers, embedded servers, surveillance cameras, etc. By placing resources at the edge of the network, the time it takes for data to reach a processing station becomes negligible, therefore the tasks are optimized for transmission time.