R
R
Runcorn2014-02-11 11:00:25
Nginx
Runcorn, 2014-02-11 11:00:25

Long polling in nginx

For long polling in nginx, you can use the nginx-push-stream-module and nginx_http_push_module modules. They work according to the same scheme (subscriber-publisher). From the articles on the Internet and the documentation for these modules, it is not clear how to get a list of subscribers who need to publish messages, and is it possible to receive some kind of callback to the backend server when a new subscriber appears?
There is also an interesting conversation here about checking cookies to implement protection from reading the channel by other users. But in the comments they write that it is impossible to check cookies in nginx, this should be done by the backend. How can cookie protection be implemented in these nginx modules?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rowdy Ro, 2014-02-11
@rowdyro

We made the name of the channel secret.
After authorization, the user is given a random string - the name of the channel, which he reads.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question