An IoT gateway serves as the connection point between the cloud, sensors, and intelligent devices. A gateway provides a place to preprocess that data locally at the edge before sending it on to the cloud. When data is aggregated, summarized and tactically analyzed at the edge, it minimizes the volume of data that needs to be forwarded on to the cloud, which can have a big impact on response times and network transmission costs. We also make a distinction between gateways and routers. Gateways regulate traffic between two dissimilar networks, while routers regulate traffic between similar networks.