BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Microsoft Introduces Static Web Apps' New Feature: Distributed Functions for Enhanced Performance

Microsoft Introduces Static Web Apps' New Feature: Distributed Functions for Enhanced Performance

Microsoft has announced a new Azure Static Web Apps feature called distributed functions. It automatically distributes managed functions to high-demand regions of Static Web Apps.

Azure Static Web Apps is a platform that allows developers to deploy their static site to a globally distributed host and add backend functionality with integrated managed functions. However, managing the network latency of these managed functions can be challenging, mainly when serving audiences far from the functions region. To address this challenge, Azure Static Web Apps now offers distributed functions.

Distributed Functions is a feature that automatically distributes Static Web Apps’ managed functions to regions of high demand based on user traffic load. When developers create an Azure Static Web App, they choose a home region for their functions, where they are initially deployed. However, suppose another Azure Static Web App host receives significant traffic to the managed functions in a different region. In that case, it will deploy a copy of their managed functions to that region and route traffic to this new managed function backend.

Jan-Henrik Damaschke, an Azure MVP, tweeted on the announcement of Distributed Functions for Azure Static Web Apps:

This will help a lot with improving the latency in your SWA apps.

Distributed Functions offer various benefits. By distributing functions across different regions, developers can reduce network latency for requests to their backend-managed functions. This is especially helpful for request pre-processing tasks such as authorization, personalization, or routing, where minimizing network latency can lead to a better user experience. Additionally, if developers build fully globally distributed web applications, combining Distributed Functions with a global database like Azure CosmosDB ensures a highly performant web application.

Thomas Gauvin, a product manager of Azure Static Web Apps at Microsoft, writes:

This distribution of your backend functions can reduce the network latency for your managed functions calls by up to 70%, depending on the distance between the user and the function region. This can be especially useful in the context of request pre-processing, where network latency is critical to providing a good user experience.

Response Time Graph (Source: Tech Community blog post)

Developers can enable distributed functions in the Standard SKU of Azure Static Web App through the APIs blade of their Azure Static Web App resource and toggle on the Distributed Functions option. During the preview phase, Microsoft will continue to refine the trigger conditions for distributed functions based on user feedback.

About the Author

Rate this Article

Adoption
Style

BT