Author: Zikui

background

Zookeeper can be used as a registration configuration center, master selection, distributed locks and other scenarios. With the expansion of business scale, the dependencies between businesses gradually become more complex. In this complex scenario, if you encounter problems related to change push , it is very difficult to troubleshoot. Although the original audit log of Zookeeper can record the change records of Znode, it cannot query the push records of changes made by the server, and manual screening is required, which is time-consuming and labor-intensive. For a long time, users have richer information on Zookeeper. There is a growing need for observability of push functionality.

 title=

MSE Zookeeper's latest online push track capability provides change history, change push records, query record backtracking capabilities, and helps users troubleshoot configuration registry push, change backtracking and other problems.

Introduction to push track function

The Zookeeper push track provides the Znode change and query records, as well as the server push change event records to the client. According to the push track, you can see whether the client's change is successful, and whether the server pushes the change event to the client after the change is successful. The push track can query the corresponding log records according to the two dimensions of Path and SessionID.

Path query dimension

Provide the corresponding Path and event information to query the change record of the corresponding Path:

 title=

The push track details the logging information of the Znode changes. On the left side of the push track page, the Znode change events in the current time period are displayed. Click the change flow on the left to locate the change and push event records on the right. On the right side of the page, the Znode changes and push events in the current time period are displayed. The change event shows the type of the change, and the push event shows the push event and the SessionID of the client to which it was pushed. Move the mouse up the push details icon to view detailed information such as the type of events pushed locally.

Session query dimension

On the push track Session query dimension page, the push track related to the session is displayed. The change time indicates the time when this Znode change occurred, the change event indicates the type of the Znode change event this time, and the Path indicates the Znode Path of this change. , click the jump button in the detail column to switch to the entry of the Path dimension query to query the push events of the current Path at this time point.

 title=

Zookeeper Push Track Best Practices

  1. Log in to the MSE Admin Console.
  2. Select the region in the top menu bar.
  3. On the left menu bar, select Registration Center > Instance List. Click Manage below the target instance name or Action column.
  4. According to the application scenario, push track query for the Znode or Client SessionID that needs to be checked

In the microservice scenario, Zookeeper is often used as a registration configuration center. One of the problems often encountered is the effectiveness of instance information update after ZooKeeper instance changes. When we need to check whether Zookeeper changes or configures instance information When the changes of the information are pushed to the client, the time points of the changes and pushes, and the status of the changes, the push track provides the ability to trace back these information. For example, in the Dubbo scenario, ZooKeeper is used as the registration center. We need to see that after the service instance is changed, the instance information obtained from Zookeeper is still the old instance information. At this time, we can find the reason through the following steps:

  • First, you can find the Path of the corresponding service in the console,

 title=

  • Then query the corresponding Znode changes and query records in the push track according to Path

For example, we need to know the change push records of the org.apache.dubbo.demo.DemoService service. In the push track, select the query dimension path, and enter /dubbo/org.apache.dubbo.demo.DemoService/providers in the Path to query the corresponding Push record, according to the SessionID of the client, you can check whether the corresponding change caused the server to push the change event, so as to determine whether the change is successful, after the change is successful, whether the corresponding client successfully receives the change event push from the server, and receives the push Afterwards, whether to query the server to determine whether the client updates the local instance information.

 title=

For another example, in the configuration center scenario, the problem we often encounter is that the client has made a configuration change, but other clients have not received the push of the change. We can find the reason through the following steps:

  • First, find the corresponding change record by changing the SessionId of the client, click the arrow button to jump to the path corresponding to the change to query the dimension push track, and determine whether the configuration change is successful.

 title=

  • After the jump, we see the push details of the corresponding change record. At this time, we can determine whether the client that has not received the change is in the set of push clients. If not, it means that the connection between the client and the server is disconnected during the push. As a result, the session timeout is removed by the server. If the event is successfully pushed, check whether the client performs a query for the new configuration. If there is no query, you need to check from the client.

 title=

Based on the above troubleshooting, you can roughly locate the problem, and the push track greatly simplifies the troubleshooting process.

In the future, the registration and configuration center will also provide a new self-diagnosis system, including event statistics, health audit and other functions, to help users more comprehensively obtain more business function status data information when the registration and configuration center is running, and reduce registration and configuration. Troubleshooting difficulty and improve usability in the center.


99 Promotion: New customers will get 30% off the annual package and 20% off the monthly package . Welcome to try it out. If you have any questions, please scan the DingTalk QR code (34754806) to communicate with us~

 title=


阿里云云原生
1k 声望302 粉丝