外网流量接入
2016-08-02 17:23:20 3 举报
AI智能生成
加载
作者其他创作
大纲/内容
外网流量接入
LVS
hz
接入层 nginx
upstream:ip1,ip2
tc
代码层
nj
一般轮询
不同域名实现负载均衡
upstream backend{\tserver 192.168.1.2:80 weight=5;\tserver 192.168.1.3:80 weight=2;\tserver 192.168.1.4:80; #默认weight=1}
URL重写的负载均衡
upstream searchbox_searchbox-po_server_name { keepalive 8; server 10.23.240.136:8210; server 10.23.240.149:8210;}server { listen 8080; server_name baijiahao.baidu.com; location / { \tproxy_pass http://searchbox_searchbox-po_server_name; \tbreak; }}
server { listen 8080; server_name m.baidu.com mbd.baidu.com; location ~ \"/searchbox$\" { \tproxy_pass http://searchbox_searchbox_server_name; }}
mbd.baidu.com
BGW
BFE
app层nginxrewrite
hhvm
ral
1.ral程序配置
配置文件:orp/hhvm/conf/hhvm.hdf
2.local配置
配置目录:orp/conf/ral/services/*
3.接入层ral配置
get_instance_by_service group.redis3-mbubsweb-boxlib.osp.cn -c
{ \"services\": { \"group.redis3-mbubsweb-boxlib.osp.cn\": { ... \"idc_map\": { \"default\": { \"backup\": \"gz\
[...@Service]Name: group.redis3-mbubsweb-boxlib.osp.cnRename: Redis_mbubsweb_boxlibTimeout: 500DefaultConnectTimeOut : 200//ral默认连接超时DefaultConnectType : SHORTDefaultPort : 8291DefaultReadTimeOut : 200DefaultRetry : 1DefaultWriteTimeOut : 200
ral { conf_dir = /home/work/orp/conf/ral/ conf_file = ral.conf passwd_file = ral-passwd.conf log_dir = /home/work/orp/log/ral/ log_level = NOTICE ral_log_name = ral.log worker_log_name = ral-worker.log current_idc = sz autoreload_interval = 5 max_service_num = 512 max_server_num = 4096 }
发送ral请求
0 条评论
下一页