Spring cloud Client Server Load balancer Ribbon, cloudribbonI. Server Load balancer
Load Balancing: built on the existing network structure, it provides a cheap, effective, and transparent method to expand the bandwidth of network devices and servers, increase throughput, enhance network data processing capabilities, a
Spring Cloud official documentation Chinese version-service discovery: Eureka server, cloudeureka
Official documentation: http://cloud.spring.io/spring-cloud-static/Dalston.SR3/#spring-cloud
The Official document address is: http://cloud.spring.io/spring-cloud-static/Dalston.SR3/#spring-cloud-eureka-serverIn the example I have done some tests in: http://git.oschina.net/dreamingodd/spring-cloud-preparationService Disco
Prepare
Understand "Twelve factor APP"-config
Understand spring boot configuration and spring Framework Profiles
The role of configuration in MicroServices
Removing "settings" from compiled code
Change Runtime behaviors
Enforce consistency across elastic services
Cache values to reduce load on databases
packageBecause we see that we are setting up Eureka Server, the annotations we need to use are @enableeurekaserverBut this is not so smooth, because the build.gradle of the official website does not introduce the server dependenceAnd where we're going to introduce it, where do we find it? Take a look at the following picturesIn this, we can copy this sentence from the dependencies,Compile ' org.springfram
-services obtained from the dealer, so that the next time you want to find that micro-service, you don't always have to ask the dealer, after all, the phone bill is for money.In this way, the phone (eureka-client) is vital, without a mobile phone, there is no micro-service can contact the message dealer (Eureka-server), of course, the message dealers can not provide any information.So how does a micro-service buy a mobile phone that can be contacted b
Principle and Implementation of Spring Cloud server Load balancer Ribbon
Ribbon Introduction
In a distributed system, multiple instances are deployed for each microservice. How to evenly distribute service consumers to multiple service provider instances requires the use of Server Load balancer.
Ribbon is a Load balanc
Scene:When starting Eureka server, the following error occurred:Com.sun.jersey.api.client.ClientHandlerException:java.net.ConnectException:Connection refused: Connectcom.netflix.discovery.shared.transport.TransportException:Cannot execute request on any known serverProblem solving:View Profile application.yml, find the Register-with-eureka property value set to True, change it to false, restart the Eureka service, start successfully, solve the problem
packaging and then run, the controller class in the return path can not add "/", as in the following case, to remove the path before the "/":2. Package Picture Server ProjectMy blog uses a small open source image server from GitHub, which is written by spring Boot + MongoDB to package it and upload it to the cloud ser
Spring Cloud server-side registration and client invocationIn the previous article, we have set up the Spring cloud service Registry Eureka, a chapter that explains how to register a service with Eureka and how the client invokes the service.First, registration servicesFirst
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.