All Products
Search
Document Center

Microservices Engine:Upload plug-ins

Last Updated:Nov 25, 2024

After you develop a plug-in for a cloud-native gateway, you can upload the plug-in as a custom plug-in on the Plug-in Marketplace page in the Microservices Engine (MSE) console. You can view and use the uploaded plug-in by using your Alibaba Cloud account or the credentials of a RAM user that has permissions on the cloud-native gateway. The built-in plug-ins and uploaded 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 name of the gateway.

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

  4. On the Plug-in Marketplace page, click the Custom subtab on the All Plug-ins tab. Then, click Add Plug-in.

  5. In the Add Plug-in panel, configure the parameters, and click OK. The plug-in release process may 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. After you configure this parameter, the description is displayed on the plug-in card.

    WebAssembly Language

    Select a programming language that is used to develop a WebAssembly plug-in from the drop-down list.

    WebAssembly File

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

    Plug-in Execution Stage

    Select a stage from the drop-down list. The plug-in execution stages are implemented in the following order: Authorization > Authentication > Statistics > Default. If the execution of the plug-in does not depend on the execution order of other plug-ins, select Default from the drop-down list.

    Plug-in Execution Priority

    The execution priority of the plug-in in the specified stage. A large value indicates a high priority. If the execution of the plug-in does not depend on the execution order of other plug-ins, retain the default value. If you want to specify a value, we recommend that you enter an integral multiple of 10.

Execution order of plug-ins

Note

You can determine the relative execution order of multiple plug-ins that are used to process requests and responses based on the execution stage and priority of each plug-in. The execution order of the plug-ins when client requests are processed is the reverse of the execution order of the plug-ins when backend responses are processed. The first plug-in that processes requests is the last plug-in that processes the responses.

You can view the execution stage and priority in the details of a built-in plug-in. If you want to execute a custom plug-in before or after a specified built-in plug-in, you can 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. If the plug-in is enabled, disable it.

  2. Click 图标.png on the plug-in card. In the list that appears, select Edit to 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 of the plug-in is in an invalid binary format. For a demo for loading the .wasm file to your on-premises environment, see Use Go to develop gateway plug-ins.