In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
It is believed that many inexperienced people are at a loss about how Sentinel ensures the stability of the service through uniform request and cold start. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
I. description of the requirements scenario
In RocketMQ, when consumers go to consume messages, no matter through pull or push, there may be a large number of message spikes. If all messages are to be processed at this time, it is likely to cause the system to be overloaded and affect stability. But in fact, there may be no message delivery in the next few seconds, and if you throw away the redundant message directly, you will not make full use of the system's ability to process messages.
Cdn.com/d19e0ebb5b197afa5025af336dca311ec71c5b1f.png ">
We can see that the news bursts are often instantaneous and irregular, and the system tends to have free resources for a period of time. We hope to spread the red part of the message equally to the later idle time, so that we can not only ensure that the system load is at a stable water level, but also handle as many messages as possible. At this time, we can use the characteristic of Sentinel constant speed request to fill the valley for RocketMQ peak trimming and escort.
2. One-click access to Sentinel for Apache RocketMQ
1. Real-time monitoring:
Sentinel provides API to obtain real-time monitoring information. You can add the following dependencies when using it:
API access document:
Https://github.com/alibaba/Sentinel/wiki/ real-time monitoring
For ease of use, Sentinel also provides a console (Dashboard) for configuring rules, viewing monitoring, machine discovery, and other functions. We just need to start the console according to the Sentinel console documentation, then add the appropriate parameters to the corresponding application and start it (note that the client needs to add the above transport dependency).
Console documentation:
Https://github.com/alibaba/Sentinel/wiki/ console
After launching the Consumer example, we can find our application in the Sentinel console. You can easily configure current restriction rules in the console:
Compare the monitoring chart lines in the normal current limit mode:
2. Cold start
In addition to the leveller, another way to ensure system stability in the face of sudden increases in traffic in RocketMQ scenarios is cold start-up. This method is mainly used in the case that the system is at a low water level for a long time, when the flow increases suddenly, directly pulling the system to a high water level may crush the system instantly. Through the "cold start", let the flow through slowly increase, gradually increase to the upper limit of the threshold within a certain period of time, give the cooling system a preheating time to avoid the crushing of the cold system. For a specific example, see WarmUpFlowDemo.
After reading the above, have you mastered how Sentinel ensures the stability of the service through uniform request and cold start? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.