Forum Discussion
naveencdac
Feb 15, 2022Copper Contributor
Azure Function App Network(Preview)
Trying to use durable function while creating the azure function, we observe network is in preview state. Could anyone will suggest any how to make stable network for durable function for function premium plan and app service plan. And why Function App is working on Networking (preview).
- kyazaferrSteel Contributor
- Network Isolation: Azure Functions can be integrated with VNets to ensure that the traffic between your function and other resources is private and does not travel over the public internet. The networking feature in preview provides this integration, but it is still evolving.
- Private Endpoints: With networking in preview, you can also set up private endpoints for Azure Functions, ensuring that they are accessible only within the virtual network.
- Limitations in Preview: Because it's in preview, some features may not be fully stable or available, and there could be issues with latency or network reliability. The fact that the networking functionality is in preview might be the reason you're experiencing intermittent behavior.
2. Stabilizing the Network for Durable Functions
To stabilize the networking for your Durable Function (whether you're using the Function Premium Plan or App Service Plan), consider the following:
- Use Premium or App Service Plans: Ensure that you're using the Premium Plan or App Service Plan, as these allow you to deploy your functions into a VNet, which can provide greater control over network traffic.
- With the Premium Plan, you can deploy your function app in an isolated environment and connect it to a VNet using VNet integration.
- The App Service Plan allows you to connect to a VNet but with fewer advanced networking capabilities than the Premium Plan.
- Set Up VNet Integration: Even in preview, setting up VNet Integration with a Premium Plan or App Service Plan can improve network isolation and reduce dependency on public endpoints. This can help ensure a more stable and secure network connection for your Durable Functions.
- Go to your function app in the Azure Portal.
- In the left sidebar, under Networking, choose VNet Integration.
- Add your VNet to integrate with your Function App. You may need to configure a subnet within the VNet.
- Ensure that you have the correct network security rules in place to allow the necessary inbound and outbound traffic.
- Steps to configure VNet Integration for a Function App:
- Use Managed Identity for Secure Access: If you're using resources like Azure Storage or databases within your VNet, ensure your function app uses a Managed Identity for secure access to those resources instead of relying on connection strings or keys.
- Use Private Endpoints: If you're accessing services like Azure Storage, Event Hubs, or Service Bus, you can configure private endpoints to avoid exposing these resources to the public internet.
- Create a private endpoint for your storage account or service.
- Ensure that your function app has access to that private endpoint within the VNet.
- Troubleshoot Networking Issues: If you're experiencing instability, you can:
- Check the network logs for any errors or timeouts.
- Review Application Insights to identify potential issues with the function app’s network calls.
- Monitor the VNet for any potential bandwidth or connectivity issues that might affect the function’s stability.
3. Addressing Issues with Function App Networking (Preview)
- Why is it still in Preview?
- The Function App Networking feature is still in preview because Azure is likely refining its capabilities and adding support for more scenarios (e.g., hybrid networking, advanced security features). This means it could experience bugs, missing features, and limitations.
- Azure might be adding support for more services (e.g., Durable Task Framework) or improving compatibility with other Azure services and networking configurations.
- Monitor Preview Changes: Keep an eye on the updates related to the networking preview in the Azure portal and official documentation. Azure frequently updates preview features, and new improvements could help resolve stability issues.
- Reach Out to Support: If you are facing specific issues related to networking, consider submitting a support request through the Azure portal. Microsoft provides a support channel for preview features, and they might be able to help resolve issues or provide workarounds.
4. Durable Function Considerations
- Ensure that you’re correctly managing the state and scaling of Durable Functions when integrated with networking.
- Be mindful of the Durable Task Framework and its reliance on Azure Storage for managing state. If your Durable Functions are running within a VNet or behind a private endpoint, ensure that the network rules allow access to the storage account.