November 19, 2020

Why edge applications are the key to simplifying edge computing

By Derek Shiell, Director Engineering, Verizon Media, and Harkeerat Bedi, Senior Manager—Research, Verizon Media

The need to balance compute power with latency has made edge computing a hot topic, fueled in part by the emergence of the 5G Edge, which promises ultra-low latency. The 5G Edge’s <10 ms of latency is foundational to enable virtual reality, the Internet of Things (IoT), and autonomous vehicles. Without edge computing, these functionalities would be seriously constrained.

While 5G Edge is making rapid strides forward, content delivery networks (CDN) have enabled edge compute use cases for many years, offering massive network capacity and just milliseconds of latency to virtually every connected device and internet user on the planet. CDNs are well established and have proven to be highly effective at delivering large flows of content at scale. The Verizon Media Platform, for example, offers 120+ Tbps of egress capacity and is deeply peered with more than 5,500 last-mile networks, providing global scale, performance and security.

This puts the CDN Edge in the driver’s seat as a highly cost-effective way to move applications and workloads from the cloud and closer to end users. Long round trips to core servers can result in sluggish user experiences and ultimately limits the type of applications developed. Pushing application processing to the CDN Edge opens up new opportunities to add functionality and create better user experiences.

The rise of edge applications

But what’s the best way to develop applications on the edge? Despite the unrelenting buzz, edge computing is still very much in the early stages of development. As such, the future of “mainstream” edge computing is likely to be much different than how it looks today. One significant change we expect is the emergence of what we’re calling “Edge Applications.” These are highly optimized, fully tested pre-built functions integrated into the CDN that can be enabled quickly and easily. These work together with our Functions@Edge capability that enables developers to write and execute their code in the CDN Edge, giving customers a wide spectrum of possible computing capabilities. 

Verizon Media Edge Applications are built to solve common use cases such as: 

  • Dynamic Redirects
  • Image Optimization
  • Edge Side Includes (ESI)
  • Visitor Prioritization

Verizon Media Edge Applications lower the barrier to edge compute by giving customers access to edge compute tools without the corresponding need to develop and support code.

Even though specific edge compute applications may vary considerably in terms of overall functionality or target industry, many of the underlying requirements are close to being identical from app to app. These similarities span standardized protocols and workflows. Verizon Media Edge Applications takes advantage of this fact to help simplify deployment and speed adoption of edge compute capabilities.

As shown on the left side of the figure below, CDN customers can interact with our Edge Applications through a simple configuration. They use our Rules Engine API to either enable or disable a particular application. The right side of the figure below shows how applications are created and updated through our CI/CD pipeline. Following initial development, new features and functions are continuously added via a robust feedback loop. In this model, we have the advantage of seeing how everybody across the entire network is using the application and can use this input to fix bugs, add key features and address security concerns. Customers give up some control, but they gain a simplified deployment model and are not burdened with building and maintaining CI/CD pipelines for each function. This is particularly valuable for functions not highly differentiated yet needed in a variety of use cases.

Figure 1. The Verizon Media Edge Applications development model.

This contrasts with the Functions@Edge model, shown below, where each customer is responsible for their development. As new functions are developed, they are deployed to the CDN Edge using the Functions@Edge API. While this provides more control, it shifts the development burden to the user. It falls to each developer/organization to track bug reports, gather feature requests and roll out new versions and patches for their particular edge function. Organizations that need custom or one-off functions that aren’t common to multiple customers or are highly specialized should use Functions@Edge to develop the functionality they need. But for commonplace edge compute use cases, Verizon Media Edge Applications can bring these in-house and offer them as managed services.

Figure 2. Functions@Edge development model.

Verizon Media Edge Applications example: Image optimization

The process we use for determining what edge applications to develop starts with input from our customers. Multiple customer requests for the same feature are usually a good predictor of its popularity and value to a broad cross section of organizations. One example that comes up frequently is image optimization, an application that can resize and optimize images on behalf of CDN customers for their clients (internet users).

Image optimization has become an important application to reduce the load times of web pages containing images. Rather than store image versions in the application or on origin storage, an image optimization edge application integrates into the CDN’s request handling to seamlessly transform images as they are served, eliminating the cost of storage and improving client load times. To access an image optimization edge application, customers use the Verizon Media Platform Rules Engine to supply matching criteria such as URL extension (e.g., jpg), host, or URL path.

At first blush, an image optimizer may seem like a simple development effort, but as you dig below the surface, you’ll discover considerable complexity. An edge image optimization server needs to handle basic image resizing and a host of other options designed to help with dynamic image formatting. Supported features in an edge image optimization application should ideally include a broad set of functions such as:

  • Basic width and height resizing
  • Format conversions
  • Quality reduction
  • DPR (device pixel ratio) handling
  • Auto sizing via a device database
  • Trimming and padding
  • Fitting image to region or within canvas with optional background color
  • Rotating and blurring images
  • Quantizing image sizes linearly or logarithmically to reduce cached variations
  • Automatic metadata stripping

The image optimization application should handle client hints for responsive pages if enabled via the Rules Engine and optimized for multi-tiered caching. The application should also take advantage of CDN cache functionality, such as an origin shield, which caches content to minimize requests going to the origin server. As shown in the image below, transform results could be cached at a shield PoP and then served and cached at edge PoPs to reduce latency and the number of invocations of the application.

Figure 3. An optimized request flow minimizes requests to the origin server.


Image optimization requests are designed to take advantage of CDN caching. Incoming requests route to the proper cache node using consistent hashing to optimize for cache localization. The first CDN cache node that receives a request applies logic in two phases. In the first phase, the cache node computes the cache key and looks it up in the cache. If the file is not present in the cache, then in the case of image optimization, it would pull the base image. The base image returned in the response would then be optimized on the fly as it is cached and served back to the client.

Such functionality is challenging for developers to fully optimize as described here when building their edge functions, offering a compelling case for why we expect edge applications to play such an important role in edge computing going forward.

Conclusion

The advent of 5G has brought the rise of edge computing and the recognition that pushing processing loads out to the edge can reduce latency compared to the cloud, improve customer experience and open up new categories of applications. With its sub 10ms latency, the 5G Edge is a must for virtual reality or autonomous vehicles. For most other applications, CDNs are more established than 5G and are just a few milliseconds slower to every user and device on the planet than the 5G Edge. As enterprises and software developers push more compute workloads to the edge, the CDN is taking on added significance beyond its traditional content delivery role. This opens up new classes of applications and services that would be impractical in the cloud alone due to the latency involved with cloud computing.

One way to lower the barriers to the adoption of edge computing is with what we’re calling Edge Applications. This approach allows organizations to access a particular application, such as image optimization, through simple rules configuration instead of a full-scale development effort. Edge Applications benefit from a rich feedback loop as more and more organizations worldwide take advantage of the service, which we believe will play a major role in driving edge compute adoption.

Whether it’s an incremental improvement in the customer experience or the introduction of breakthrough applications, one thing is clear: the move to bring more compute functionality to the edge will fundamentally change how applications are developed and deployed for the better.

Contact us

Sales

Support

Manage your account or get tools and information.

More info