当前位置:网站首页>Byte flybook Human Resource Kit three sides
Byte flybook Human Resource Kit three sides
2022-07-28 01:00:00 【Hua Weiyun】
Byte flybook human resource suite has three sides
hashmap Why red and black trees ?
Red black tree structure : First of all, red and black trees are also AVL Balanced binary trees , The nodes are composed of black and red nodes . None of the red black trees is twice as far from the root node to the leaf node as the shortest root node to the leaf node , And the number of black nodes on each path from root node to leaf node is the same , So it is a weakly balanced binary tree , be relative to AVL For trees , Red and black trees have fewer rotations , For search 、 Insert 、 Delete multiple operations with red black tree .
Nginx Load balancing strategy :
In a server cluster ,Nginx Acting as a proxy server ( That is, reverse proxy ), To avoid too much pressure on a single server , Forward requests from users to different servers .
polling ( Default )
The most basic configuration method , It is upstream Module default load balancing , Each request is allocated to a different back-end server in chronological order
fail_timeout: And max_fails Use a combination of
max_fails: Set in the fail_timeout The maximum number of failures in the time set by the parameter , If at this time , All requests to the server failed , So the server is supposed to be down
fail_time: The length of time a server is considered down , The default is 10s
backup: Mark this server as a standby server , When the main service stops , The request will be sent to this server
down: The tag server does not participate in load balancing
The weight (weight)

Specify the probability of polling based on the polling strategy ,weight The default value is 1,weight The value of is proportional to the access ratio
The higher the weight, the more requests to process . This strategy can be used with least_conn and ip_hash Use a combination of . This strategy is more suitable for the situation that the hardware configuration of the server is quite different
ip_hash

Ensure that each visitor has regular access to a back-end server
stay nginx edition 1.3.1 Before , Can't be in ip_hash Use weights (weight). ip_hash Cannot be associated with backup Use at the same time . This strategy is suitable for stateful Services , such as session. When a server needs to be removed , Must be manual down fall .
least_conn
Forward requests to back-end servers with fewer connections . The polling algorithm is to forward the requests to each back end on average , Make them roughly the same load ; however , Some requests take a long time , It will lead to high load on the back end . In this case ,least_conn This way can achieve better load balancing effect
This load balancing strategy is suitable for server overload caused by different request processing time
Third party strategy
The third-party load balancing policy requires the installation of third-party plug-ins (upstream_fair)
fair
Allocate requests according to server response time , Priority allocation with short response time
url_hash
Press visit url Of hash Result allocation request , Make each url Directed allocation to the same back-end server , Multiple requests for the same resource , Requests may be made to different servers , Result in unnecessary multiple downloads , Cache hit rate is not high , And some waste of resources and time , Use url_hash, Can make the same URL Will reach the same server , When I ask again , Can be read from the cache .
- END -边栏推荐
- Leetcode 415. string addition and 43. string multiplication
- Network device hard core technology insider firewall and security gateway (VII) virtualization artifact (Part 1)
- Red team killer behinder_ V4.0 (ice scorpion 4.0)
- UML类图的六大关系,最佳学习理解方式
- Leetcode - find the median of two positively ordered arrays
- 《KMP复习 + AC自动机》前传
- Network equipment hard core technology insider firewall and security gateway (11) secrets of zero contact office
- [BuildRelease Management]Parabuild
- [introduction to C language] zzulioj 1026-1030
- 小波变换学习笔记
猜你喜欢
![[CruiseControl]Build Result JSP](/img/80/11c2b539c217ecd6ba55668d3e71e9.png)
[CruiseControl]Build Result JSP

Basic operations of MySQL database (2) --- Based on data table

Point divide and conquer analysis

One year anniversary of creation, Chongba young Lang
![Leetcode:1997. the first day after visiting all rooms [jump DP]](/img/6e/52d5871a11d1b27e673112a8245b28.png)
Leetcode:1997. the first day after visiting all rooms [jump DP]

map集合
![[BuildRelease Management]Parabuild](/img/80/11c2b539c217ecd6ba55668d3e71e9.png)
[BuildRelease Management]Parabuild

DC motor winding parameters

小波变换学习笔记

Rongyun IM & RTC capabilities on new sites
随机推荐
map集合
Basic operations of MySQL database (3) --- Based on fields
Jerry's PWM setting and PWM IO selection [chapter]
网络设备硬核技术内幕 防火墙与安全网关篇 (小结)
程序员成长第三十篇:你真的懂反馈吗?
Valued at $36billion! SpaceX, which is about to launch its first manned launch, raised $346million
推荐系统-精排模型:xDeepFM
IP address & subnet mask
Read cmake in one article
深度刨析数据在内存中的存储
融云 IM & RTC 能力上新盘点
网络设备硬核技术内幕 防火墙与安全网关篇 (八) 虚拟化神器 (中)
Operators in MySQL
Data analysis: disassembly method (details)
网络设备硬核技术内幕 防火墙与安全网关篇 (十一) 零接触办公的奥秘 上
Jmeter 如何解决乱码问题?
Buildforge materials
Basic operations of MySQL database (I) --- Based on Database
[BuildRelease Management]Parabuild
Leetcode:1997. the first day after visiting all rooms [jump DP]