Spring Cloud Tai Hang Ribbon and Fegin

Source: Internet
Author: User

At the beginning of contact with Spring cloud, have not heard of the concept of microservices, for service direct communication is a situation, how to make up the micro-service completely ignorant, see the online tutorials are using Ribbong and Fegin to invoke the interface, Then the official website also gives this tutorial to go all the way to the black ....

1, first record the Ribbon and Fegin technology implementation and problems

The ribbon and Fegin in the final analysis are directly called interface, mainly to solve some need to do multiple services at the same time, the Ribbon directly call the interface address, nothing but to do some encapsulation processing, what exception, according to the service name load balancer, and even the matching circuit breaker hystrix, Turbine, and Fegin is similar, is nothing more than the RESTful API package cost ground function, here is also a problem is fegin call remote interface if not used, the project starts will error, this is very pit very pit.

2, concatenation is not very good can consider the way of Message Queuing

There are two major considerations here, one is concatenation is the above ribbon,fegin, there is a way to decouple the microservices through the message component, the previous way through the reliable event mode, the business compensation mode, The TCC mode (Try-confirm-cancel) can be very high precision to ensure the final consistency of the data, the latter way of thinking when the abnormal appearance can not be very good to ensure the consistency of the data, or to do something more, the above 3 mode can also do a second way of thinking

  This article is to be continued ....

Spring Cloud Tai Hang Ribbon and Fegin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.