118 points · by betablocker · 10y ago · 30 comments
Being your own video hoster usually means renting a server in a data center with serious bandwidth, or buying streaming service from some cloud provider.[1][2]
[1] http://www.streamingvideoprovider.com/prices.html [2] https://aws.amazon.com/cloudfront/streaming/
EDIT: If you're a CDN, it'd behoove you to extend this project to allow for one-click endpoint configuration. Just add API key/secret.
Within Europe 1080p is mostly manageable sub 720 is doable even in Asia.
In have 40ish mbit upload capacity.
Never had complaints from my ISP.
https://datarhei.github.io/restreamer/restreamer/wiki/dynami...
should be
https://datarhei.github.io/restreamer/wiki/dynamicdns_en.htm...
and
https://datarhei.github.io/restreamer/restreamer/wiki/guide-...
should be
https://datarhei.github.io/restreamer/wiki/guide-buy-hardwar...
(but on that page, all links point to a 404).
And of all apps - nginx, which has been designed to be self-contained (process-isolation is good enough) and has almost zero external dependencies (openssl and pcre, which are parts of any modern OS). I could understand the idea to "containerize" that pile of Java crap with its 100500 maven dependencies just in order not to touch it again, but nginx...
BTW, does Docker's "port mapping", which is, of course, has zero overhead, is what one needs in front of nginx in production?
[1] https://github.com/datarhei/restreamer/blob/master/Dockerfil...
Citation needed. Name a big company using nginx on Linux to serve up lots of static content.
> Yes, yes we know *BSD has a better networking stack than Linux.
Who mentioned anything about a network stack?
> Now that you're done letting everyone know how smart you are
Well given some people like you clearly don't understand the point I was making I think justifies the comment in the first place.
Facebook[1], Reddit[2], Wordpress[3]
[1] http://venturebeat.com/2012/06/18/nginx-the-web-server-tech-...
[2] https://news.ycombinator.com/item?id=8244868
[3] http://searchdns.netcraft.com/?host=wordpress.com&x=0&y=10
[0] https://www.netmarketshare.com/operating-system-market-share...
[1] http://w3techs.com/technologies/details/os-freebsd/all/all
And your advice is to use experimental[1] Docker support in FreeBSD, when Nginx would be running inside Docker on top of FreBSD's Linux compatibility layer.
Finally - and most critically - Ngnix introduced thread pools to specifically work around a limitation of Linux's async IO implementation:
Although Linux provides a kind of asynchronous interface for reading files, it has a couple of significant drawbacks. One of them is alignment requirements for file access and buffers, but NGINX handles that well. But the second problem is worse. The asynchronous interface requires the O_DIRECT flag to be set on the file descriptor, which means that any access to the file will bypass the cache in memory and increase load on the hard disks. That definitely doesn’t make it optimal for many cases.
To solve this problem in particular, thread pools were introduced in NGINX 1.7.11.
[2].[1] https://wiki.freebsd.org/Docker
[2] https://www.nginx.com/blog/thread-pools-boost-performance-9x...