18143453325 在线咨询 在线咨询
18143453325 在线咨询
所在位置: 首页 > 营销资讯 > 建站知识 > 如何基于权重解析域名? 如:把www.aaa.com域名按4:6的比例解析到ip地址a和b?

如何基于权重解析域名? 如:把www.aaa.com域名按4:6的比例解析到ip地址a和b?

时间:2023-02-17 20:28:01 | 来源:建站知识

时间:2023-02-17 20:28:01 来源:建站知识

Server Weights

By default, NGINX distributes requests among the servers in the group according to their weights using the round-robin method. The weight parameter of the serverdirective sets the weight of a server, by default, it is 1:

upstream backend { server backend1.example.com weight=5; server backend2.example.com; server 192.0.0.1 backup;}In the example, http://backend1.example.com has weight 5; the other two servers have the default weight (1), but the one with IP address 192.0.0.1 is marked as a backup server and does not receive requests unless both of the other servers are unavailable. With this configuration of weights, out of every six requests, five are sent http://backend1.example.com and one to backend2.example.com.


参考:https://www.nginx.com/resources/admin-guide/load-balancer/

关键词:地址

74
73
25
news

版权所有© 亿企邦 1997-2025 保留一切法律许可权利。

为了最佳展示效果,本站不支持IE9及以下版本的浏览器,建议您使用谷歌Chrome浏览器。 点击下载Chrome浏览器
关闭