Updated on 2024-11-29 GMT+08:00

Adjusting Service Governance Parameters

Scenario

Monitor the statuses and metrics of service providers and consumers to ensure that services are properly provided for external systems. If an exception is detected, adjust parameters in a timely manner for service governance. The main parameters are as follows:

  • Weight

    Manually adjust the weight of the service provider on a node to control the load.

  • Concurrency

    Manually adjust the concurrency of the service provider on a node to control the traffic.

  • Fault tolerance parameters

    When a service consumer request fails, the system attempts to adjust the fault tolerance parameters to reduce the impact of request delay or failure.

  • Enabling or disabling a service provider

    You can enable or disable a service provider to control whether the provider can provide services for external systems.

Procedure

  1. Log in to FusionInsight Manager.
  2. Choose Cluster > Services > Containers, and click the SGP Management tab.
  3. In the navigation pane, choose App Service List.
  4. In the list on the right, click a service name in the Name column.
  5. Adjust service governance parameters.

    • Click the Provider tab, select a service provider instance, and click Enable or Disable to enable or disable the provider. Clicking Disable will prevent the provider from accepting or processing new service requests.
    • Configure the weight. Click the Provider tab, select a service provider instance, and click Weight. In the dialog box that is displayed, enter a new weight in the text box and click OK.

      The weight ranges from 0 to 200. The default value is 100, which means that the provider processes consumer service requests with the same probability.

    • Configure the concurrency. Click the Provider tab, select a service provider instance, and click Concurrent. In the dialog box that is displayed, enter a new concurrency in the text box, or select Unlimited. Then, click OK.

      The concurrency is the maximum number of concurrent requests that can be executed by each method of each service of a service provider. The value ranges from 1 to 2147483647. The default value is Unlimited.

    • Configure fault tolerance parameters. Click the Consumer tab, select a service consumer, and click Fault Tolerant. In the dialog box that is displayed, configure fault tolerance parameters.
      1. Select the maximum number of failed attempts for the service consumer from the drop-down list box next to Retry.
      2. Enter the request timeout interval in the text box next to Request Timeout (ms).
      3. Click OK.

      If an exception occurs when a service consumer accesses a service provider, the service consumer requests other service providers again. The fault tolerance parameters set a limit on the maximum number of failed attempts and the request timeout interval of a service consumer.