当前位置:网站首页>About eruake learning
About eruake learning
2022-06-25 20:17:00 【rushduckxzr】
Four operating mechanisms :
1. register : Client connection server registration , Will register repeatedly , Until the registration is successful , After an error is reported, you will wait and register again
2. Pull : Every client 30 Seconds to pull the registry , To pull ( Use local cache ) The registry , New service start registration , Other modules need to wait 30 Seconds to be found
3. heartbeat : Every 30 Send an exception every second
A service , continuity 3 Failed to receive service heartbeat for times , Will delete his registration information
4. Self-protection model
Due to network interruption , A large number of servers have abnormal heartbeat ( The server and Eruake The network is down )
15 Within minutes ,85% There is a heartbeat exception on your server , Will enter self-protection mode , All registration information will not be deleted , Waiting for the network to recover
During development and debugging , You can disable protected mode , Avoid affecting the test
Client connection sp05 Registry Center , Add configuration
Eurake client
1. add to eureka-client
2.yml To configure :
eurake Connection address : http://eureka1:2001/eureka
/eureka Subpath
modify hosts file :win+r dervier
High availability
There is server downtime , The system can still be used , There is a backup server , Multiple servers can also be used for load balancing
The port numbers on different servers are the same and do not conflict .
To prevent downtime , The client connects to multiple servers defaultZone:XXX,XXX
Feign
To configure : Which service to call Order call Goods and users Need service id Which path to call Define different methods to call different paths Submit what parameters
Feign Integrate Ribbon
Ribbon Provide load balancing and retry functions
feign Integrate Ribbon, Load balancing and retry are enabled by default
Retrying parameters :
MAxAutoRetries- Number of retries per server
Server replacement times
zull api gateway
Unified call entry : Just configure
1. newly build spring modular :sp06-zull
2.pom.xml add to eurake zull sp01-commonts
3.yml zuul:routes:item-service: /item-service/**
4. Start the class to add comments :@EnableZuulProxy
Unified authority verification
No, token Access not allowed ,token It should be placed in http The header
1. New filter AccessFilter, Inherit ZuulFilter, And add @Component
Inherit Ribbon
Load balancing is enabled by default , Retrying is not enabled by default , Enable retry at gateway , It may double the pressure on the background server , Large area failure
Integrate Hystrix
System fault tolerance and current limiting tools
Fault tolerance : Fault tolerance through degradation , Downgrade ,zuul It is enabled by default Hystrix
Current limiting : Because the flow pressure is too high , Cause the background service to fail , Limiting current by fusing
10s achieve 20 Requests ( First satisfy ),50% Error executing degraded code --> The circuit breaker is on
When the circuit breaker opens , Half open , Try sending a client call to the server
The circuit breaker is fully automatic
1. use actuator expose Hystrix Monitoring data , yes springboot Provides a project monitoring indicator tool
spring All objects in the container
spring mvc All the paths
java Virtual machine heap memory mirroring
边栏推荐
- NMS reduction box
- C language PTA -- continuity factor
- JS get the parameters in the URL link
- Can the stock account opened through qiniu school be used? Is the fund safe?
- PAT B1056
- 2.5 find the sum of the first n terms of the square root sequence
- Short video is just the time. How can you quickly build your video creation ability in your app?
- Suddenly found that the screen adjustment button can not be used and the brightness can not be adjusted
- [untitled]
- 8. iterators and generators
猜你喜欢

<C>. Branch and loop statements

Jsonp processing non homologous

Jsonp non homologous interaction (click trigger)

2020-11-14-Alexnet

Applet canvas generate sharing Poster

<C>. Rolling phase division

Redis high availability: do you call this the principle of master-slave architecture data synchronization?

Wechat applet cloud function does not have dependency option installed

Short video is just the time. How can you quickly build your video creation ability in your app?

Web components - Basics
随机推荐
Huawei in application review test requirements
Huawei fast application access advertising service development guide
Log in to Huawei game with a minor account, and pop up anti addiction prompt after startup
JS get the parameters in the URL link
Curtain down and departure
Web container basic configuration
2.2 step tariff
Force wechat page font size to be 100%
Suddenly found that the screen adjustment button can not be used and the brightness can not be adjusted
From now on, I will blog my code
C language PTA -- continuity factor
PAT B1081
PAT B1096
Dice、Sensitivity、ppv、miou
<C>. function
2.5 find the sum of the first n terms of the square root sequence
Applet multi image to Base64 upload
Interface automation -md5 password encryption
Measurement index SSMI
Jsonp function encapsulation