Permalink
Browse files

Merge branch 'master' of git@github.com:pgte/cyclops

  • Loading branch information...
2 parents 294adb1 + 5ca77c8 commit 657b2bc36d73b0e560480dfd3dba54af7a974dfc @pgte committed Dec 5, 2009
Showing with 71 additions and 0 deletions.
  1. +71 −0 nginx/andre_nginx.conf
@@ -0,0 +1,71 @@
+
+#user nobody;
+worker_processes 1;
+
+#error_log logs/error.log;
+#error_log logs/error.log notice;
+#error_log logs/error.log info;
+
+#pid logs/nginx.pid;
+
+
+events {
+ worker_connections 1024;
+}
+
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+
+ #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
+ # '$status $body_bytes_sent "$http_referer" '
+ # '"$http_user_agent" "$http_x_forwarded_for"';
+
+ #access_log logs/access.log main;
+
+ sendfile on;
+ #tcp_nopush on;
+
+ #keepalive_timeout 0;
+ #keepalive_timeout 65;
+
+ #gzip on;
+
+ # another virtual host using mix of IP-, name-, and port-based configuration
+ #
+
+ server {
+ listen 8000;
+
+ root /Users/andregoncalves/projects/codebits.cyclops;
+ # internal publish endpoint (keep it private / protected)
+
+ location /publish {
+ set $push_channel_id $arg_id; #/?id=239aff3 or somesuch
+ push_publisher;
+
+ push_store_messages off; # enable message queueing
+ push_message_timeout 2s; # expire buffered messages after 2 hours
+ push_max_message_buffer_length 100; # store 10 messages
+ push_min_message_recipients 2; # minimum recipients before purge
+ }
+
+ # public long-polling endpoint
+ location /activity {
+ push_subscriber;
+
+ # how multiple listener requests to the same channel id are handled
+ # - last: only the most recent listener request is kept, 409 for others.
+ # - first: only the oldest listener request is kept, 409 for others.
+ # - broadcast: any number of listener requests may be long-polling.
+ push_subscriber_concurrency broadcast;
+ set $push_channel_id $arg_id;
+ default_type text/plain;
+ }
+
+ }
+
+}
+
+

0 comments on commit 657b2bc

Please sign in to comment.