In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "what's the difference between SOA and micro-services". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Micro-service is not that it is small enough, but its responsibility is simple enough. Many people misunderstand the true meaning of "micro" and think that if the service is split small enough, it is micro-service. In fact, this is not the case. In addition, "micro" also means "trivial", that is, if a service fails, it will not affect the entire system.
Micro-service is not a combination of fine-grained services, that is, how fine the granularity should be, which depends on the ability to control business functions. In addition, micro-service is an architectural idea, including visible micro-services, supported by invisible infrastructure and automation technologies.
At present, the commonly used micro-service architecture dubbo+zk,spring cloud in the market
The core of microservices: registry (Service Registry), service provider (service provider), service consumer (service consumer). But now for convenience, the concept of gateway (service gateway) is put forward, which is equipped to automatically complete the registration and discovery of services.
From what point of view can you distinguish or divide the difference or relationship between micro-services and RPC distribution?
Micro-service is an application architecture pattern, while RPC is a way of remote invocation, and they are different concepts; while in micro-service, there will be calls between services, in order to ensure performance, we generally use RPC to invoke.
Micro-service realizes the modularization of the system, which is convenient for common module reuse and horizontal expansion, but the current system scale is actually very small, so it is not suitable to use micro-service?
I think the micro-service architecture is used in the architecture where the business is more complex or the current business is simple but may become complex in the future. I suggest that a reasonable architecture should be determined according to the specific circumstances, and micro-services should not be removed for the sake of micro-services.
What is the difference between microservices and SOA, and what are their respective application scenarios? Under what circumstances is it appropriate to use a micro-service architecture?
Micro-service is a lightweight solution of SOA, its essence is still SOA, but it is easier to land.
Consider using microservices if the following conditions are met: 1. The application is getting bigger and bigger. There are many development languages in the project. The classic architecture model is too heavy 4. Modifying a bug requires a smooth upgrade of 5. Need to monitor the system with fine granularity 6. Improve system availability. If a system fails, it will not have a fatal impact on the whole business.
How to do the transaction between service and service?
In the micro-service architecture, it is recommended to avoid the invocation between services as much as possible, so the segmentation of service granularity is very important; the invocation between services will cause distributed transaction problems, and it is recommended to use the "ultimate consistency" method to ensure distributed transactions. There are two common practices in the industry: CQRS and Event Sourcing.
How to use transaction compensation mode to solve distributed transaction problems?
To put it simply, the transaction compensation mechanism is to restore the data through code in the application. In general, we need to implement it by means of message queuing and log tracking.
What is the better practice of micro-service in transaction control and fault tolerance?
1. The transaction control of micro-service is essentially distributed transaction control, and it is recommended to use "ultimate consistency" to ensure it. 2. In the aspect of fault tolerance, it needs to be supported by infrastructure platform, such as the circuit breaker mechanism of service gateway.
Are there any principle points in the split of microservices?
1. The micro-service business can be split according to the overall business components or by a single business function. It is recommended that the segmentation steps should be refined step by step from coarse to fine, otherwise it will be too fine at the beginning, resulting in too high dependence and increasing complexity. two。 When splitting services, we need to reduce the coupling between each other, as far as possible, a service only does one thing, that is, the "single responsibility principle".
How to control the granularity of microservices? Is there any principles and best practices to determine whether a function (interface) should belong to A service or B service.
The granularity control of micro-services depends on our understanding and control ability of the business, and all the so-called principles are unreliable.
Micro-service needs to consider the problem of multi-version of service, especially when the service is upgraded, it needs to be smooth and has no impact on the overall system.
This is the end of the content of "what's the difference between SOA and microservices". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.