当前位置:网站首页>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
边栏推荐
- Some pictures of real machine preview development and debugging are not shown
- PAT B1061
- Curtain down and departure
- 201604-4 test title: Game (BFS search maze)
- A necessary programming assistant for programmers! Smartcoder helps you easily integrate HMS core
- Robotium_ (clickbyid method)
- Number of wechat applet custom input boxes
- Jsonp function encapsulation
- Database data type design (the most detailed in the whole network)
- <C>. array
猜你喜欢
JS canvas drawing an arrow with two hearts
Wechat applet cloud function does not have dependency option installed
200 OK (from memory cache) and 200 OK (from disk cache)
H5 application conversion fast application
Short video is just the time. How can you quickly build your video creation ability in your app?
Huawei fast application access advertising service development guide
Applet password input box
Mqtt+ardunio+esp8266 development (excluding mqtt server deployment)
Applet wx Request encapsulation
Arduino ide + esp8266+mqtt subscribe to publish temperature and humidity information
随机推荐
2.1 write a program to calculate the sum and average of four integers.
From now on, I will blog my code
Est - il sûr d'ouvrir un compte avec de nouvelles dettes? Une faible Commission est - elle crédible?
[harmonyos] [arkui] how can Hongmeng ETS call pa
打新债网上开户安全吗,需要注意什么
Nnformer reading notes
Case: count the most characters and times
Record the training process
PAT B1067
在打新债开户证券安全吗?低佣金靠谱吗
How do I delete an entity from symfony2
String since I can perform performance tuning, I can call an expert directly
在打新债开户证券安全吗
200 OK (from memory cache) and 200 OK (from disk cache)
Connect the local browser to the laboratory server through mobaxterm
8. iterators and generators
2.2 step tariff
PAT B1053
Huawei in application review test requirements
Uni app through uni Navigateto failed to pass parameter (pass object)