tencent cloud

All product documents
Serverless Application Center
Grayscale Release
Last updated: 2024-12-02 11:16:20
Grayscale Release
Last updated: 2024-12-02 11:16:20

Overview

During update and switch of your business version, to ensure that the business in the production environment is stable, we recommend you use grayscale release: This document uses a deployed Express project as an example to describe how to perform grayscale release.

Prerequisites

Directions

1. Set the .env file in the production environment:
TENCENT_SECRET_ID=xxxxxxxxxx
TENCENT_SECRET_KEY=xxxxxxxx
STAGE=prod
2. Deploy the $latest version in the production environment and switch 10% traffic to it (90% traffic will be switched to the last published function version N):
sls deploy --inputs.traffic=0.1
3. Monitor the $latest version and switch 100% traffic to this version after it becomes stable:
sls deploy --inputs.traffic=1.0
4. After all traffic is successfully switched, the stable version needs to be marked, so that you can easily and quickly roll back to this version if a problem occurs in the production environment when a new feature is published. Deploy and publish the function version N+1 and switch all traffic to it:
sls deploy --inputs.publish --inputs.traffic=0

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon