How to implement MEC without physical devices?

June 30, 2020 Bartlomiej Poniecki-Klotz

 

MEC, alongside 5G, is one of the buzzwords that keeps popping up on every social media wall. Yet, the concept of Edge Computing – the foundation for MEC – is not new. It came to life over 20 years ago, in the late 1990s, with the introduction of content delivery networks. Now, by 2020, it can finally unlock its full potential and transform the industry.  

 

MEC Means No More Latency  

 

One of the biggest advantages of the MEC technology is moving resources closer to the user. Before MEC, each user request had to be processed in the Regional Data Center  usually hundreds of kilometres away from end-user – which translated to latency of around 50-100ms. A few years ago this may have been acceptable, but now, with the growth of the industry, it sounds more and more like an aberration 

Being closer to the end-user allows hosting applications with a mere 1-2ms latency while also providing access to a variety of additional User Equipment data (like very precise localisation). This additional information creates new opportunities for providers, empowering better user experience and creating new value streams. Additionally, low latency unlocks concepts that used to be unimplementable in the past 

In this blog entry, we’re going to take a look at implementing MEC without possessing… any physical devices!  

 

Where is MEC physically? 

 

MEC is actually an application server integrated into Radio Access Network (RAN), capable of providing computing resources, storage and access to 5G Core network information. Being a part of the mobile telecommunication network means that devices are connecting to it.  

Services provided in the 5G Core are also known as Network Elements.

MEC Implementation 

 

Planning  

Buying a RAN with MEC to develop an application does not sound like a good starting point – even for such great technology. The cost would simply be too high.   

That’s why we decided to build a virtual environment which will simulate both Edge and Regional Data CentresIn allowing developers to test their code on production-like environment we enhance the ability to create software faster, safer and can spot errors early. Whenever possible, we focused on using open-source software to avoid vendor lockins. 

The requirements we enforced on ourselves: 

  •  Use containers and Kubernetes as a container-orchestration system. 
  •  The MEC application is deployed in isolation using a commonly known deployment descriptor format (ie. TOSCA) with a possibility to set resource limits. 
  •  The application has access to data from the 5G Core network (we selected user localisation based on MSISDN); Network Elements are secured. 
  •  The application is deployed on edge only for a given period. 
  •  Automate the creation of an environment with multiple edges and periodically test environment automatically. 

Implementation

We implemented it on AWS using AWS EKS to host the application, VPCs to separate edges and “Regional Data Center” (we called it “stage”) and AWS CodeBuild as fully managed CI/CD service. Everything was wrapped into Terraform scripts to empower multiple environments and stick to DevOps principles.

Each VPC contained 2 EKS clusters: one with MEC Apps, other with Network Elements (for user location) and a secured REST API component – Location API. Only the Location API could connect to Network Elements.

 

Simulators

To get the user location from MSISDN, we had to simulate and/or mock part of the 5G Core network. We needed services like UDM, AMF and LMF. Each service was deployed as a separate component in the EKS cluster behind API component hidden from MEC Applications. This modularity allowed us to freely exchange simulators implementations. For simulation purposes, we used free5gc (from free5gc.org) stage 3 released in April 2020 containing a fully operational 5GC. At this point, we encountered a small issue – the endpoint we selected was missing in implementation.

Luckily, open-source software gave us an enormous advantage – we developed and deployed the missing endpoint ourselves using official ETSI specification. Currently, we are working to make it available to everyone as a part of free5gc.

Deployment

Another part of the solution was the deployment pipeline. Based on a TOSCA file, the MEC application was first deployed on a staging environment where it was tested. Then schedule for deployment and removal of application is set up for the selected edge. In real world, for cost-effectiveness, MEC Applications are available only for a needed period. We wanted our solution to behave the same way to mirror production-like environment as close as possible. Deployment was done using AWS CodeBuild, which allowed parallelly running multiple deployment processes.

To support the high availability of our MEC Application, we used AWS Route53 to reroute traffic to the Regional Data Center in case edge should be unavailable. Additionally, Network Elements were deployed with multiple replicas for different Availability Zones. To ensure the application is highly available, we also added the option to define the number of replicas for each pod.

It is the MEC Application developer’s responsibility to define how many replicas should be available. In case of an error or update of an already running application, the full deployment cycle for example app (with tests, deployment on both staging and selected edges) takes less than 2 minutes. Blue/Green deployment allows a seamless change of version on the edge.

 

Tests

The solution is automatically tested for faults using tests on all levels. Unit and integration tests are run during deployments. E2E and security tests are run periodically against the production environment.

 

The Effect

The project was developed by 7 people over 6 weeks. We focused on a small part of the 5G Core network. We wanted to supply user location to MEC Application developer via secure REST API. Analogically, other Network Elements’ data can be exposed using the same way.

With the MEC simulator we can develop many new MEC Application and REST APIs exposing Network Elements data for MEC Application developers.

Yet, creating this simulated environment in itself was not the end of our 5G MEC road. We wanted to use this tool to create new applications and address the emerging business needs on the market.

That’s why our ultimate goal was to leverage our MEC implementations to deliver new business value.

 

Use Cases

 

Now, after our application was already developed, tested, deployed and successfully used to get user equipment location based on simulated data, it was time to define the next challenges.

Here are a few key ones.

 

Device Tracking

5G and MEC enable device tracking in meter range. This creates huge opportunities for developing real-time tracking systems and dashboards – not only inside a single building but also on any area covered by dense 5G network.

Modern systems implementing Kappa or Lambda architecture can use MEC to offload the network by keeping Hot Path on MEC and Cold Path in the Regional Data Center.

 

Low-Latency Applications

Applications deployed on MEC offer millisecond latency which opens the way for autonomous vehicles and augmented reality.

MEC Application based augmented reality can enable controlling devices (ie. robots) with near real-time experience. This means – zero delays, movement smoothness and precision unlike ever before.

Another industry where MEC can make a real difference is gaming. After all, who wouldn’t want to enjoy an absolutely seamless gameplay experience?

 

Machine Learning on Edge

Deploying machine learning models on the Edge is a popular topic. The model inference is usually not computation expensive, which makes it a great candidate to deploy to MEC. Video or voice pre-processing and inference can also be deployed as MEC Application, keeping the model artefact secure, returning model results in milliseconds and sustaining a load of 10Gbps.

 

Network Offloading

MEC can solve the problem of transferring data through the Regional Data Center between machines connected to the same Access Network and can route traffic between them by delivering data faster, safer and cost-effective.

 

 

Summary

Implementing our own 5G MEC platform and exploring the magnitude of Use Cases gave us a comprehensive understanding of their internal structure and capabilities.

As this entry presents, MEC can empower ground-breaking possibilities and unlock new value streams. And we’re certain this technology will soon change the entire industry.

 

 

Remember – If you have some questions about MEC solutions, don’t hesitate to contact us at any time!

 

Sources:

Last posts