LD is tigger forever,CG are not brothers forever, throw the pot and shine forever.
Modesty is not false, solid is not naive, treacherous but not deceitful, stay with good people, and stay away from poor people.
talk is cheap, show others the code,Keep progress,make a better result.
Survive during the day and develop at night。
目录
概 述
Ng 之upstream 的四种配置方式
1.轮训
指定轮训几率,weight,和访问比率成正比。
默认当weight不指定时,各个服务期的weight相同,每个请求按照时间顺序逐一分配到不同的
,如果后端down掉,能自动提出。
2。IP_hash
每个请求按照访问的hash结果分配,这样每个访客访问固定的一个后端服务器,可以解决session不能挂服务器的问题。如果后端服务器down掉,要手工down 掉。
3.fair
按照后端服务器的响应时间来分配,请求,响应时间短的优先分配。
4.url_hash
在访问url的hash 结果来分配请求,使得每个url定向同一个后端服务器,后端服务器为缓存服务器比较有效。
参考资料:
总结:
相关工具如下:
分析:
小结:
主要讲述了NG相关的分析,请大家指正~
参考资料和推荐阅读
1.链接: link