Next-generation cellular networks are expected to provide users with innovative gigabits and terabits per second speeds and achieve ultra-high reliability, availability, and ultra-low latency. The requirements of such networks are the main challenges that can be handled using a range of recent technologies, including multi-access edge computing (MEC), artificial intelligence (AI), millimeterwave communications (mmWave), and software-defined networking. Many aspects and design challenges associated with the MEC-based 5G/6G networks should be solved to ensure the required quality of service (QoS). This article considers developing a complex MEC structure for fifth and sixth-generation (5G/6G) cellular networks. Furthermore, we propose a seamless migration technique for complex edge computing structures. The developed migration scheme enables services to adapt to the required load on the radio channels. The proposed algorithm is analyzed for various use cases, and a test bench has been developed to emulate the operator's infrastructure. The obtained results are introduced and discussed. © 2023 CRL Publishing. All rights reserved.