Troubleshooting and FAQ

更新时间:
复制 MD 格式

Choosing function specifications

Similar to Function Compute and ECS, Edge Routine (ER) has performance limits defined by its function specifications, such as execution times of 5 ms, 50 ms, and 100 ms. If you are unsure of your function's execution time, start by selecting the 50 ms specification. Then, publish the function to a test environment or a grayscale environment for a trial run. Check the ER logs for the actual request execution time and select a specification that provides a 20% buffer. For example, if a function's execution time is 80 ms, select the 100 ms specification. You can adjust function specifications at any time, and the changes take effect immediately.

Fallback for Edge Routine failures

If you select the failover to origin option when you configure Associate Domain with Function, the edge node will directly request the original URL from your origin server if an ER execution fails. Your origin server can then distinguish between a failover request and a normal request originating from ER. For example, you can add a custom header to normal requests forwarded by ER. A failover request bypasses ER and therefore does not contain this header. This lets your origin server implement a suitable fallback solution for failover requests. For instance, if you use ER to render pages at the edge, requests are typically rendered at the edge and returned to the client. If ER fails, the edge node passes the request to your origin server, which can then render the page as a fallback.

Rolling back a grayscale release

  1. Imagine you have version V1 of your code deployed to the production environment. You then create and deploy a new version, V2, to the grayscale environment for the China (Beijing) region. After deployment, V2 causes an error that makes the service unavailable to users in that region. You now want to roll back the China (Beijing) region to version V1.删除灰度

  2. To roll back, simply select version V1 of your code and deploy it to the grayscale environment for China (Beijing). This action overwrites version V2.发布

  3. After the deployment is complete, the grayscale environment for China (Beijing) runs version V1.回滚

Deleting a grayscale environment

You can add or delete grayscale environments on the configuration page.灰度环境

Note

After you delete a grayscale environment, the edge nodes in the corresponding region automatically revert to running the code version deployed in the production environment. For example, if your production environment runs version V1 and the grayscale environment for China (Beijing) runs version V2, deleting the China (Beijing) grayscale environment makes the edge nodes in that region revert to version V1.

Choosing a region for a grayscale release

Edge Routine provides 35 regions worldwide. You can add any of these regions as a grayscale environment based on your needs. For example, if you want to release new code to the China (Hangzhou) region first, you can add it as a grayscale environment. After the environment is configured, go to the Versions and Releases page to select a code version and publish it to the grayscale environment for China (Hangzhou):浙江