streaming-cdn/load-balancer.conf

24 lines
392 B
Text
Raw Normal View History

2020-07-25 14:43:01 +00:00
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
split_clients "${remote_addr}" $cdnhosts {
50% "cdn-node1.domain.tld";
2020-07-25 14:43:11 +00:00
50% "cdn-node2.domain.tld";
2020-07-25 14:43:01 +00:00
}
server {
listen 8080;
listen [::]:8080;
location / {
return 301 "http://${cdnhosts}${request_uri}";
}
}
}