arut / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
13.36k stars 3.51k forks source link

on_play URL API spam #337

Open K0genta opened 10 years ago

K0genta commented 10 years ago

i want to use the on_play event to protect my streams with tokens.

it works perfect but nginx spam thousand of GET request to my webserver every seconds during someone is streaming

live on;

        notify_method get;
        on_play http://*****.****.net/internal/api.php?checkPlayToken=1;

Access-Log on my webserver

5.135.xxx.xxx *****.*******.net - [04/Feb/2014:22:06:48 +0100] "GET /internal/api.php?checkPlayToken=1?app=&flashver=ngx-local-relay&swfurl=&tcurl=&pageurl=&addr=unix:/tmp/nginx-rtmp.11&clientid=508484&call=play&name=Kogenta&start=0&duration=0&reset=0 HTTP/1.0" 500 0 "-" "-"

my api return error-code 500 if tokens are missing/wrong ... or someone is sending wrong requests

arut commented 10 years ago

don't you have on_update enabled? what is the interval between requests coming from one stream?

K0genta commented 10 years ago

i don't use on_update and i got ~17 broken requests per second on my api from one stream

arut commented 10 years ago

It seems your local relay end (when auto-pushed) is reported. It should not be like that. What version of nginx-rtmp do you have?

K0genta commented 10 years ago

nginx-rtmp-module 1.1.2, nginx 1.4.4, pid 17424, built Jan 25 2014 17:18:12

K0genta commented 10 years ago

any idea for a solution?