All Products
Search
Document Center

Microservices Engine:Configure ZooKeeper engine parameters

Last Updated:Oct 14, 2024

When you create an engine, the default settings of engine parameters are used. The parameters include TickTime, InitLimit, SyncLimit, MaxClientCnxns, OpenSuperAcl, Jute.Maxbuffer, and SessionTimeout. If you have special requirements, you can modify the parameter settings to improve the engine performance. This topic describes how to configure ZooKeeper engine parameters in the Microservices Engine (MSE) console.

Prerequisites

Usage notes

For the MinSessionTimeout and MaxSessionTimeout parameters, take note of the following points:

  • If you want to configure the session timeout period for a client, we recommend that you upgrade the open source ZooKeeper version to the MSE ZooKeeper version that supports timeout settings. For more information, see Features of ZooKeeper editions.

  • For a ZooKeeper engine, you can configure the MinSessionTimeout and MaxSessionTimeout parameters to specify the timeout period of a client. For the server, if the client timeout period is less than the value of MinSessionTimeout, the client timeout period is forcefully set to the value of MinSessionTimeout. If the client timeout period is greater than the value of MaxSessionTimeout, the client timeout period is forcefully set to the value of MaxSessionTimeout. This ensures that the valid range of the timeout period is [MinSessionTimeout, MaxSessionTimeout].

    For example, for a ZooKeeper engine, MinSessionTimeout is set to 3000 ms and MaxSessionTimeout is set to 5000 ms. For a client, the minimum session timeout period is 1,000 ms and the maximum session timeout period is 6,000 ms. After the negotiation between the server and client, the minimum session timeout period is finally set to 3,000 ms and the maximum session timeout period is finally set to 5,000 ms.

  • When you use a ZooKeeper engine, you can configure MinSessionTimeout and MaxSessionTimeout based on your business requirements. You cannot set the two parameters to excessively small values. If you set the two parameters to excessively small values, the client may frequently detect connection timeouts between the client and server. As a result, the session is disconnected, and the system fails. We recommend that you use the default values of the two parameters.

Procedure

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

  2. In the left-side navigation pane, choose Microservices Registry > Instances.

  3. On the Instances page, click the name of the instance.

  4. In the left-side navigation pane, click Parameter Settings. On the page that appears, click Edit in the upper-left corner. Then, configure the parameters.

    配置参数

  5. Click Save and Restart Instance.

    Go back to the Parameter Settings page and check whether the parameter settings are changed.