All Products
Search
Document Center

Microservices Engine:Manage MSE Nacos services with a cloud-native gateway

Last Updated:Jun 20, 2026

A cloud-native gateway acts as the entry point for your system architecture, combining the functions of a traditional traffic gateway and a microservices gateway. This integration significantly reduces network overhead and operational costs, while providing comprehensive traffic governance and observability. This topic describes how to configure a routing policy and set up alerts by associating a cloud-native gateway with services in an MSE Nacos service registry.

Prerequisites

Important

Cloud-native gateways do not support on-premises services that are registered with MSE Nacos or ZooKeeper.

Create a route

  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 navigation pane on the left, click Routes. On the Routes tab, click Add Route.

  4. On the Add Route page, set Route Name to springcloud-demo, select * for Domain Name, and set the Path match rule to Prefix with a value of /. For the route destination, select Single Service, and then click Associate Service under Service Name.

  5. In the Associate Service panel, configure the parameters and click OK.

    Set Source Type to MSE Nacos, select the target Namespace, and select the nacos-service-consumer service from the service list.

  6. Set Service Name to nacos-service-consumer and click Save and Advertise.

Configure a routing policy

Test the route without a policy

  1. Log on to the MSE console.

  2. In the top navigation bar, select a region.

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

  4. On the Overview page, click the Gateway Ingress tab to view the Ingress IP Address of the gateway.

    The list contains public and private-facing SLB instances. The Ingress IP Address of a public-facing instance, such as 8.136.xxx.xxx, is the public ingress of the gateway.

    Note

    The ingress IP address of a cloud-native gateway is the IP address of an associated SLB instance. You can replace the associated SLB instance with your own. For more information, see Manage gateway ingress SLB.

  5. Run the following command to send a test request. Replace <public_ingress_ip> with the public ingress IP address you obtained in the previous step.

    curl -I http://<public_ingress_ip>/echo-rest/hello
    Note

    This command sends a request to the demo service sourced from MSE Nacos. You can modify the request path based on your actual backend service.

    A successful request returns the following response:

    HTTP/1.1 200 OK
    Content-Type: text/plain;charset=UTF-8
    Content-Length: 5
    Date: Thu, 29 Aug 2024 08:21:47 GMT
    req-cost-time: 9
    req-arrive-time: 1724919707979
    resp-start-time: 1724919707988
    x-envoy-upstream-service-time: 8
    server: istio-envoy

Configure a throttling policy

In high-concurrency scenarios, a surge in requests can overload backend services without proper throttling. This can degrade response times or even cause service crashes. Throttling ensures that the request volume stays within a manageable range. A cloud-native gateway allows you to configure a throttling policy to protect your services. For more information about other routing policies, see Routing policies.

  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 navigation pane on the left, choose Routes.

  4. Find the route that you want to manage and click Policies in the Actions column.

  5. On the Policies tab, click Throttling.

    A flow control rule monitors the QPS (queries per second) metric of a route. When the metric reaches the specified threshold, the gateway immediately blocks subsequent traffic. This prevents backend services from being overwhelmed by sudden traffic spikes and helps ensure high availability.

    1. In the Throttling section, click the Throttling Rules tab.

    2. In the Throttling Rules area, configure the following settings.

      Parameter

      Description

      Example

      Overall QPS Threshold

      Specifies theOverall QPS Threshold.

      1

      Web fallback behavior

      Set Web fallback behavior to Returns the specified content or Jump to the specified page.

      Return specified content

      HTTP Status Code

      Specifies the HTTP Status Code to return for a throttled request. The default value is 429.

      429

      Returned Content-Type

      Set the Returned Content-Type to Plain text or JSON.

      Plain text

      Returned HTTP Text

      Specifies the body of the fallback response.

      springcloud-demo flow limit

      Whether to open

      Enables or disables this rule.

      Selected

    3. Click New or Save, and then click OK in the confirmation dialog box.

  6. Run the following script to test the policy. Replace <public_ingress_ip> with your public ingress IP address.

    Windows

    @echo off
    set "localUrl=http://<public_ingress_ip>/echo-rest/hello"
    :loop
    curl -i -s %localUrl%
    goto loop

    Linux

    #!/bin/bash
    URL="http://<public_ingress_ip>/echo-rest/hello"
    while true; do
        curl -i -s $URL
    done

    Expected response: After the throttling policy is enabled, requests that exceed the QPS threshold are blocked and receive an HTTP 429 status code and the custom message.

    HTTP/1.1 429 Too Many Requests
    content-type: text/plain; charset=UTF-8
    content-length: 26
    date: Thu, 29 Aug 2024 08:54:46 GMT
    server: istio-envoy
    
    springcloud-demo flow limit

Related documentation

For troubleshooting, see the Cloud-native gateway FAQ. You can also use the built-in diagnostics feature. For more information, see AI diagnostics for cloud-native gateways.