Springcloud Development Learning Summary (iv)--Client load Balancing Ribbon

Source: Internet
Author: User

Through the previous chapter, "Springcloud Development Learning Summary (iii)--service governance Eureka", we have built the core components of the MicroServices architecture-service registries (including single-point mode and high-availability mode). A service is also registered, named Hello-service. Now that we have a service registry and a service provider, here's an attempt to build a service consumer that is focused on two goals, Discovery services, and consumer services. Where the service discovery task is done by the Eureka client, and the service consumption task is done by the Ribbon . The Ribbon is a client-side load balancer based on HTTP and TCP that can poll access to achieve a balanced load by ribbonserverlist the list of server configurations configured in the client. When the ribbon and Eureja are used together, the Ribbon's service instance manifest ribbonserverlist is discoveryenableniwsserverlist rewritten to get a list of services from the Eureka Registry. It also replaces iping with niwsdiscoveryping, which delegates responsibilities to Eureka to determine whether the server has been started. In this chapter, we do not make a detailed introduction to the ribbon, readers only need to understand it in the Eureka Service discovery based on the implementation of a set of service instance selection strategy, so as to achieve the consumption of services. A detailed introduction and analysis of the Ribbon will follow.

Let's build a simple example to see how service discovery and consumption can be realized under Eureka's service governance system.

    • First, we started the service registry Eureka-server and Hello-service services that were implemented before, in order to experiment with the Ribbon's client load balancing function, we java-jar the command line ①

Springcloud Development Learning Summary (iv)--Client load Balancing Ribbon

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.