Upload plug-ins

更新时间:
复制 MD 格式

You can upload a custom plug-in to the Plug-in Marketplace page in the Microservices Engine (MSE) console. Only your Alibaba Cloud account or RAM users that have permissions on the cloud-native gateway can view and use the uploaded plug-in. Custom plug-ins and built-in plug-ins are enabled in the same way.

Procedure

  1. Log on to the MSE console. In the top navigation bar, select a region.

  2. In the left-side navigation pane, choose Cloud-native Gateway > Gateways. On the Gateways page, click the ID of the gateway.

  3. In the left-side navigation pane, click Plug-in Marketplace.

  4. On the Plug-in Marketplace page, click the Custom tab, and then click Add Plug-in.

  5. In the Add Plug-in panel, configure the parameters, click OK, and wait for the plug-in to be published. This process can take about 30 seconds.

    Parameter

    Description

    Plug-in Name

    Enter the name of the plug-in. The name must be unique.

    Plug-in Description

    Enter a description of the plug-in. The description is displayed on the plug-in card.

    WebAssembly Language

    Select the programming language used to develop the WebAssembly plug-in.

    WebAssembly File

    Upload the compiled plug-in binary file from your on-premises machine. The file extension must be .wasm and the file size cannot exceed 50 MB.

    Plug-in Execution Stage

    The stages are processed in the following order: Authorization > Authentication > Statistics > Default. If the plug-in's execution does not depend on other plug-ins, select the Default stage.

    Plug-in Execution Priority

    The execution priority of the plug-in in the specified stage. A larger value indicates a higher priority. If the plug-in does not depend on the execution order of other plug-ins, keep the default value. We recommend that you set the value to a multiple of 10.

Execution order of plug-ins

Note

The relative execution order of plug-ins is determined by the execution stage and priority of each plug-in. The execution order for client requests is the reverse of the order for backend responses. The first plug-in to process a request is the last to process the corresponding response.

The execution order of plug-ins is determined by the Plug-in Execution Stage and Plug-in Execution Priority parameters. The following figure shows how plug-ins process requests and responses.插件执行顺序

You can view the execution stage and priority in the details of a built-in plug-in. To execute a custom plug-in before or after a built-in plug-in, configure the Plug-in Execution Stage and Plug-in Execution Priority parameters for the custom plug-in.

FAQ

How do I update the .wasm file of a plug-in?

  1. To update the .wasm file of a plug-in, make sure that the plug-in is disabled first.

  2. On the plug-in card, click 图标.png > Edit, and upload a new Wasm file.

Important

You can edit or delete a custom plug-in if it is disabled. You cannot edit or delete the built-in plug-ins of MSE.

What are the possible causes of plug-in release failures?

In most cases, plug-in releases fail because the .wasm file has an invalid binary format. For a demo on loading the .wasm file to your on-premises environment, see Develop gateway plugins in Go.