blob: 889e061c7120afd63a67075bc7bc3cfda6bdcfbf [file] [log] [blame] [raw]
worker_processes 4;
#debug_points stop;
#error_log /dev/stderr debug;
error_log /dev/stderr notice;
#error_log err.log notice;
pid /tmp/nginx-debug.pid;
events {
worker_connections 90000;
accept_mutex on;
}
http {
access_log /dev/stdout;
proxy_cache_path /tmp levels=1:2 keys_zone=cache:1m;
server {
listen 8000;
location / {
proxy_cache cache;
}
}
server {
listen 8082;
# root ./;
location ~ /pub/(\w+)$ {
set $push_channel_id $1;
push_publisher;
push_min_message_buffer_length 5;
push_max_message_buffer_length 20;
push_message_timeout 5s;
push_channel_group test;
}
location ~ /sub/broadcast/(\w+)$ {
push_subscriber;
push_channel_group test;
set $push_channel_id $1;
push_subscriber_concurrency broadcast;
}
location ~ /sub/first/(\w+)$ {
push_subscriber;
push_channel_group test;
set $push_channel_id $1;
push_subscriber_concurrency first;
}
location ~ /sub/last/(\w+)$ {
push_subscriber;
push_channel_group test;
set $push_channel_id $1;
push_subscriber_concurrency last;
}
#authorized channels only -- publishers must create the channel before subscribing
location ~ /sub/authorized/(\w+)$ {
push_authorized_channels_only on;
push_subscriber;
push_channel_group test;
set $push_channel_id $1;
}
}
}