The internet of things (IoT) affects everyday life because digital technology improves. IoT is a group of devices with sensors that talk to each other to reach a goal. IoT systems have traditionally been built on top of cloud computing (CC). IoT devices are slow because CC data centres are separated from them. This slows down the speed at which real-time applications respond. In addition, IoT devices send a lot of data to the cloud to be processed, which overloads the cloud. Edge computing can stop IoT devices from being slow or overloaded. Fog computing (FC) is a way to get services at the edge of a network. With locationawareness, the FC cuts down on latency and overloading. Bandwidth and jitter must be looked at during the process of allocating resources. In this work, the Lotka-Voltera load balancer and elman hebbian-recurrent neural network cache (LV-EHRCC) are proposed for allocating resources in an FC context. LV-EHRCC is made up of load balancing and allocating resources. First, the LotkaVoltera traffic load balancer model is used to increase the amount of Bandwidth available for load balancing. Second, an Elman Hebbian-Recurrent Neural Network model for allocating cached resources efficiently is made for the best load-balanced FC context. Simulations test what will happen. The load balancing capacity of the proposed scheme is 93.25 and attains the highest Bandwidth of 45. In FC simulations, the LV-EHRCC method improves the efficiency of load balancing in terms of Bandwidth, makespan, and jitter rate. The simulation results back up our study and show that LV-EHRCC is better than the benchmark approaches when they are compared.