diff --git a/Others/根据gpu使用率调度/openresty配置.md b/Others/根据gpu使用率调度/openresty配置.md index 4f87781..de71035 100644 --- a/Others/根据gpu使用率调度/openresty配置.md +++ b/Others/根据gpu使用率调度/openresty配置.md @@ -1,2 +1,30 @@ ```txt +upstream danceaiStream { + server 106.12.210.129:30963; +} + +# resolver 8.8.8.8; +lua_package_path '/usr/local/openresty/lualib/lb/?.lua;;'; + +server { + listen 80; + server_name 1.94.8.122; + + location / { + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Connection ""; + proxy_http_version 1.1; + + set $backend ''; + + rewrite_by_lua_file /usr/local/openresty/lualib/lb/lb.lua; + content_by_lua_block { + ngx.log(ngx.INFO, "backend ", $backend) + } + proxy_pass http://$backend; + } +} + ``` \ No newline at end of file