Cloud computing provides a platform for services and resources over the internet for users. The large pool of data resources and services has enabled the emergence of several novel applications such as smart grids, smart environments, and virtual reality. However, the state-of-the-art of cloud computing faces a delay constraint, which becomes a major barrier for reliable cloud services. This constraint is mostly highlighted in the case of smart cities (SC) and the Internet of Things (IoT). Therefore, the recent cloud computing paradigm has poor performance and cannot meet the low delay, navigation, and mobility support requirements.Machine-to-machine (M2M) connectivity has drawn considerable interest from both academia and industry with a growing number of machine-type communication devices (MTCDs). The data links with M2M communications are usually small but high bandwidth, unlike conventional networking networks, demanding performance management of both energy consumption and computing. The main challenges faced in mobile edge computing are task offloading, congestion control, Resource allocation, security and privacy issue, mobility and standardization .Our work mainly focus on offloading based resource allocation and security issues by analyzing the network parameters like reduction of latency and improvisation of bandwidth involved in cloud environment. The cloudsim simulation tool has been utilized to implement the offload balancing mechanism to decrease the energy consumption and optimize the computing resource allocation as well as improve computing capability.