Springcloud Learning (5)--feign load Balancing

Source: Internet
Author: User
Feign overview

Feign is a declarative Web service client, making it very easy to write Web service clients, just create an interface and add annotations on it.

Feign is designed to make it easier to write Java HTTP clients.

When using ribbon+resttemplate, the encapsulation processing of HTTP requests by Resttemplate is used to form a set of templated calling methods. However, in real-world development, because the invocation of service dependency may be more than one place, often an interface will be called more than one, so it is common for each microservices to encapsulate some of the client classes to wrap up the invocation of these services. So feign is further encapsulated on this basis, and he helps us define and implement the definition of the dependent service interface. With the implementation of feign, we only need to create an interface and configure it using annotations to complete the interface binding to the service provider, simplifying the amount of development that automatically encapsulates the service invocation client when using the Spring Cloud Ribbon.

The feign integrates the Ribbon to maintain a list of services and load balancing of clients through the Ribbon. Feign only needs to define the service binding interface and implement the service invocation gracefully and simply in a declarative way.

Springcloud Learning (5)--feign load Balancing

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.