-
-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can you please add some download and upload to the demos ? #6
Comments
We already have this information in our big demo: Git: https://github.com/Novage/p2p-media-loader/tree/master/p2p-media-loader-demo Small demos (like this demo) are intended to be as simple as possible and you are free to copy them and extend for your needs. |
@mrlika yes i saw the big demo, but if someone want to test the performance with big number of users is not going to use the big demo, and put it in his website for like 20k users you know what i mean.
|
For this particular demo you can do it like this (better before calling play): engine.on(p2pml.core.Events.PieceBytesDownloaded, (method, bytes) => {
console.log('download', method, bytes);
});
engine.on(p2pml.core.Events.PieceBytesUploaded, (method, bytes) => {
console.log('upload', method, bytes);
}); You can modify the code to summarize total P2P and HTTP or, for 20k viewers, it is better to send the statistics somewhere to be stored for further analytics. |
ok thanks, i have one more question. |
On the server side the library uses webtorrent tracker. It just exchanges peer connection information (like a torrent tracker). It doesn't deal with data that is sent between peers so video size doesn't matter: https://github.com/webtorrent/webtorrent By default public webtorrent trackers are used but I think for your 20k users swarm you should run your personal webtorrent tracker and configure it with the library. |
@mrlika sorry i forgot to mention i wasn't talking about the tracker, i meant what's server's requirements (bandwidth, cpu, line ...) to serve the actual live video. for the tracker i can use just azure or something. |
Tracker should not use a lot of CPU and bandwidth but I didn't test it with 20k users. |
ok thanks, i was just wondering if you have some informations about the required server to serve a video 520p to that number of users ( again not talking about the tracker, i'm talking about rtmp server ). |
P2P Media Loader doesn't support RTMP. It supports segmented streams: HLS and DASH. To host HLS or DASH you need HTTP server and you have to calculate bandwidth, CPU requirements of your HTTP server and CPU requirements of software that generates the stream (i.e. transcoding etc.) But if you do not have horizontally scalable HTTP servers infrastructure I recommend for the 20k users test use a CDN and deliver HLS/DASH stream using it. Because if your stream is 1 Mbps for 20k users in worst case they will download with 20 Gbps speed. |
@mrlika ok thanks, do you have any cheap CDN suggestions ? |
@Er-rchydy check out wowza cloud they are using akamai and will allow you to use their cdn for 20.000 concurrent without any annual commitment but pay as you go |
@f1l1b0x thanks, do you have any idea about how much it would cost, because i'm doing this for testing purposes. |
Can you please add something that shows how much download and upload every peer made to the other demos ( like this demo ) without graphs, a simple div that got updated every 5 seconds for example would be helpful.
because even if you enable debugging there are lot of informations, where sometimes you want just to see the performance ( p2p download vs http download ).
thanks for the great library
The text was updated successfully, but these errors were encountered: