On the micro data from the closed-loop service Split

Tips: No public concern: blackboard preserved egg, and receive a monthly salary of 25K + programmers to Cheats, BAT necessary to enter!

Closed-loop data, not to say that we want all the functions of a full sweep in the body, independent of other business parties, nor on the table. But I would like to emphasize one thing, and that is the business process troubleshooting try not to involve too many teams, because the longer the chaos data link processing timeliness problem worse, often unsatisfactory service performance. Let me share a case to you, might be able to help you understand and resonate.

We have a content channel is broadcast, channel permissions and create the studio entrance are we to maintain, but after the creation of the interface is broadcast live content to save maintenance team, the interface will save up to check people and authority level, and check Interface is another team, they were packaged for us cache. Recently discovered permissions check abnormal frequent because of inconsistent cache and database state. But for up to people or unsuspecting people, the problem of people in the creative platform encounter should be responsible for the creative side, be part of the real problem is not us.

The above example has exposed many problems, such business is not independent of other services directly shared cache. No memorandum, other colleagues will not know there is such a hidden logic. This is like an enumeration class is modified, on this system, but to use it in another system has not been simultaneously modify, disaster often in the near future. Want to avoid these problems, it would have to split the good service. Recommended service industry micro split generally have the following four:

1, based on the business logic split

Production of content from a user to be able to see people, we need to go through a lot of middle of the process. Related to the growth of the user system, rights management channel, channel style creation, content machine-trial review of Quality people and so on. If the intermediate links are split into separate business, while outside the station station handed over a variety of styles of content distribution processing each channel independently, that is, from content production to audit both in closed loop hidden pit that case on ceased to exist. Each three colleagues responsible for several aspects of each micro service, which is part of a problem then let my colleagues responsible for this part of the investigation can, and do not need to get involved parties at the same time, we carry out their duties.

According to split the business logic, not only to a more stable interface, but also to ensure that we are able to better reflect changes in business processes. In addition, each business can be used independent of a specific deployment expertise to develop, such as content recommendation algorithms. Each business has mainly responsible for the deployment of independent research and development, product research and development resources will not need to rush to meet demand.

2. Based on Scalable split

Our department is responsible for the content of Jingdong ecological construction services business side of various customization requirements, other business groups such as the International station but thought we were technical in Taiwan, and then ask us to do an international platform for the creation of man. But to tell the truth, even if small step jogging can not meet their needs, because so many aspects of content are likely to involve compatibility issues, such as product information found upstream in the good goods are compatible, content security check algorithm is compatible and many more.

Because we are not technical in Taiwan is not necessary to the function scalability targets for the components, to achieve the whole open energized, after all, organizational structure affects the technical architecture. In this matter, we can only share experiences and architecture, or they feel that a function can be directly reused, we certainly will come right out and then dismantle its contribution out, let the independent evolution, just stop it.

3. Reliability split

MCN bodies of people producing content and then guide users to buy goods obtained by the commission is their lifeblood, if the calculations are not exact, the situation is unusual withdrawals occur, people will think of transmission of the disease, mistrust, will take the initiative to leave. The contents of the audit because the machine can not enter the abnormal result in a brief manual review stage normally is acceptable. We can see that the reliability of tolerance for settlement and auditing commissions of different systems.

In addition, the commission is a long-term settlement iteration, stable business, and auditing systems may often introduce new validation logic and need to be changed on-line, on-line means that the latter changes could directly affect the settlement. Because the code more changes, the greater the risk of uncertainty is introduced. Then we need to avoid the audit system needs to change on the line leading to the commission settlement is affected. The best way is to open them.

In other words, a service greatly affected surface generated when a fault occurs, even if it is in a very vulnerable part of the system, we have to split it out, will be extremely isolating.

4. Based on the performance of Split

We manually review the content of outsourcing by organizations contracted, they often receive feedback that around 6:00 pm review page loads slowly, the audit needs at several points through the button to take effect. We combine database IO alarm and slow database query point of view, that period should be someone to run large data scheduled task, but it is difficult to target specific tasks. I do not know readers have not experienced this because the data sources rely lead to individual business performance is affected, including difficult to optimize the database query slow. Thus, their data sources should be broken off, business empathy.

Finally, one more point, no matter how split service uses, or what combination of split mode, the data flow should pay attention, do not appear circular dependency, including the use of MQ decoupling, it can be considered an implicit reliance layer .

Well, if article helpful to you, welcome to forward or share a point of watching.

Source: www.liangsonghua.me

Author: Jingdong Senior Engineer - Liang Songhua, in-depth understanding of the stability of security, agile development, JAVA advanced, micro-service architecture

Focus on micro-channel public number: preserved egg blackboard, get more exciting!

 

Guess you like

Origin www.cnblogs.com/liangsonghua/p/www_liangsonghua_me_30.html