Load Balance multiple RTMP Servers to Horizontally Scale Streaming (Node Media Server and HAProxy)

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ส.ค. 2024

ความคิดเห็น • 71

  • @jl_woodworks
    @jl_woodworks 3 ปีที่แล้ว +11

    I envy your enthusiasm, Hussein. Awesome content!

  • @CodingNuggets
    @CodingNuggets 3 ปีที่แล้ว +4

    Hussein, your content is excellent. Thanks for all you do. It isn't easy to make videos consistently. Keep up the great work. See you soon!

    • @hnasr
      @hnasr  3 ปีที่แล้ว +1

      Thank you so much dear 🙏

  • @johnlovell8299
    @johnlovell8299 3 ปีที่แล้ว +4

    Another precise and awesome tutorial from the King of Backend Engineering!

  • @Dominik-K
    @Dominik-K 3 ปีที่แล้ว +4

    Oh, this video is very interesting for me!
    I'm actually looking at low-latency streaming solutions and offering some additional features, like camera angles.
    WebRTC was pretty easy in a test environment, but deploying it is a nightmare!
    STUN, TURN and all those things just aren't needed with a RTMP-setup.
    This video was very appreciated🧡

    • @autohmae
      @autohmae 3 ปีที่แล้ว

      WebRTC can also use a server. For example Jitsi has Videobridge.
      (I have no experience streaming so I can't talk about results, I just know what exists)

  • @krishnakumar-rp9wc
    @krishnakumar-rp9wc 3 ปีที่แล้ว +1

    You have become a family to me! I love your long videos ! Thanks for existing!

  • @LevKozlodoev
    @LevKozlodoev 3 ปีที่แล้ว +3

    Wow great timing: it just so happens that I setup an RTMP server today (running out of an nginx docker container I wrote) with another container with gstreamer pushing a live stream.
    Gonna watch this later.

    • @Dominik-K
      @Dominik-K 3 ปีที่แล้ว +1

      Yeah, for me as well! Timing couldn't be better

    • @autohmae
      @autohmae 3 ปีที่แล้ว +1

      You guys might want to get on the Community Discord for this channel and collaborate.

    • @LevKozlodoev
      @LevKozlodoev 3 ปีที่แล้ว

      @@autohmae Sure! Where is it? I can’t find it.

  • @YousufZiaTheOneAndOnly
    @YousufZiaTheOneAndOnly 3 ปีที่แล้ว +2

    Dude I love your vids! Great job man

  • @lakshayasood2197
    @lakshayasood2197 3 ปีที่แล้ว +1

    @17:20 Beatboxing with chrome tabs 😂😂

  • @gaminglaptopsforsale8127
    @gaminglaptopsforsale8127 3 ปีที่แล้ว

    Underrated video. This is amazing!

  • @Ruf4eg
    @Ruf4eg 3 ปีที่แล้ว

    I admire your enthusiasm :)

  • @tarekali7064
    @tarekali7064 3 ปีที่แล้ว

    LET'S GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO! FINALLY!

  • @Mrabdulazizbidani07
    @Mrabdulazizbidani07 3 ปีที่แล้ว

    Love what you do, keep the good work👍😍

  • @jean-baptistelasselle4562
    @jean-baptistelasselle4562 11 หลายเดือนก่อน

    very interesting indeed, i could not yet find this into public documentations.
    Mind you, your nodemedia server relay mode, actually is an RTMP server, which restreams using an RTMP client (ffmpeg sending RTMP stream)
    So is that feature first designed with multi streaming also ? (ffmpeg restreaming to TH-cam/Twitch / etc...? Or is the relay (NMS "push mode") only well suited for scaling up end browsers watching the live ?

  • @hamzamuazzam5368
    @hamzamuazzam5368 ปีที่แล้ว

    KING

  • @santiagobustamante970
    @santiagobustamante970 2 ปีที่แล้ว

    Thanks Hussein you're awesome

  • @Vintage_Antika
    @Vintage_Antika 2 ปีที่แล้ว

    Subscribed! Thanks for your great time that you give us..

  • @firoj.siddiki
    @firoj.siddiki 11 หลายเดือนก่อน

    well presented. it helped a lot. thank you so much

  • @natielgavi
    @natielgavi 3 ปีที่แล้ว

    Makes it look so easy.. awesome.

  • @adilkhatri7475
    @adilkhatri7475 3 ปีที่แล้ว

    amazing hussain!!!!

  • @sankaranarayananp8407
    @sankaranarayananp8407 11 หลายเดือนก่อน +1

    Good tutorial ! Impressive 👍😍. But I have some doubts. In production, how can I decide how many servers I have to create based on the users count ?.

    • @aungmyooo9692
      @aungmyooo9692 7 หลายเดือนก่อน

      How do you decided?

  • @SachinVerma_profile
    @SachinVerma_profile 3 ปีที่แล้ว

    Awesome content!!

  • @robertdowney1823
    @robertdowney1823 3 ปีที่แล้ว

    Thank you bro so much ! love you!

  • @Stoney_Eagle
    @Stoney_Eagle 3 ปีที่แล้ว

    The app I'm developing also shorts to NMS 😂😅 NoMercy MediaServer
    I will definitely peek into their code to see what they do 😁 it looks nice.

  • @tahakherraf28
    @tahakherraf28 ปีที่แล้ว +1

    please i have 2 questions:
    1)i want to scale horiz servers that will be consumed by watchers but how can i add a new server instance in relay push tasks??
    2) in doc i found pull mode can i use pull mode from servers to fetch the stream that i want from relay ???
    thank youuu

  • @kevinkkirimii
    @kevinkkirimii 3 ปีที่แล้ว

    this is dope

  • @guicercal
    @guicercal 3 ปีที่แล้ว

    excellent!

  • @camilobedoya7779
    @camilobedoya7779 2 ปีที่แล้ว +1

    Nice bro! My question is... If I have 3 servers, does the relay method go on all 3 servers or only on one? since with load balancing a server is chosen at random. Thank's bro!

    • @hnasr
      @hnasr  2 ปีที่แล้ว +1

      Yes you can configure relay to publish on all 3 servers
      All the best

  • @DamjanDimitrioski
    @DamjanDimitrioski 3 ปีที่แล้ว +3

    Any formula to calculate the total possible users :)?

    • @DamjanDimitrioski
      @DamjanDimitrioski ปีที่แล้ว

      @:pawit yes, thanks for the formula, it really calculates :D.

  • @chrisdamonsworld
    @chrisdamonsworld 3 ปีที่แล้ว

    Nice video

  • @EmileAI
    @EmileAI 3 ปีที่แล้ว

    Thank you so much

  • @Gigabyteserviceofficial
    @Gigabyteserviceofficial ปีที่แล้ว +2

    You did the scaling for lareg number viewers are there but you didn't setup loadblacing for large number of streamers, there is relay server but I think this will increase the latency, can't we use Nginx as Revers proxy for rtmp protocol if yes can you please share the config for that?

    • @aungmyooo9692
      @aungmyooo9692 7 หลายเดือนก่อน

      Can you share your experience?

  • @oussamawahbi4976
    @oussamawahbi4976 3 ปีที่แล้ว

    i would love to see a video about webrtc , stun/turn , signaling server and all that stuff !!!

    • @hnasr
      @hnasr  3 ปีที่แล้ว +1

      th-cam.com/video/FExZvpVvYxA/w-d-xo.html ☺️

  • @brunosacramentoguapyassu346
    @brunosacramentoguapyassu346 ปีที่แล้ว

    I love you

  • @bestmusics9625
    @bestmusics9625 3 ปีที่แล้ว +1

    Hi Bro your content is excellent today i m configure the NMS server but the m3u8 URL is not working for me pls help me and Keep up the great work. See you soon!

  • @Akosiyawin
    @Akosiyawin ปีที่แล้ว

    Wondering how to apply this in production

  • @Brad0st
    @Brad0st 2 ปีที่แล้ว

    amazing! may i ask about how many viewers are supported? is it possible to reach 1000 - 5000 viewers if server has a big CPU ( Cores ) with 32gb ram ?

  • @fullnaoufal
    @fullnaoufal 3 ปีที่แล้ว

    Hey Hussien,
    Can you tell us about : Architecture of ZAB - ZooKeeper Atomic Broadcast protocol?
    Regards

  • @lewishousten5455
    @lewishousten5455 2 ปีที่แล้ว +1

    I configured relay and the haproxy to load balance streams. However, when I load up the streams in VLC or web browser, round robin doesn't happen. All streams stay on Server1. Why aren't they being routed to Server2. Anyone know why?

    • @naimulmushfiq1390
      @naimulmushfiq1390 2 ปีที่แล้ว

      same problem
      did you find the solution?????

  • @cloudsystem3740
    @cloudsystem3740 3 ปีที่แล้ว

    thank you so much for this awesome tutorial but i think that maybe its not good idea to proxy the main relay

  • @dabbopabblo
    @dabbopabblo 2 ปีที่แล้ว

    I cant even open the admin app, I just get a 503, I am trying to run this on an actual website but all I have access to is cpanel and the file directory, and the log for my nodejs app has some random unexpected syntax errors from within the modules scripts relating to a /streams route every time I try and connect to the admin app

  • @gaurav425
    @gaurav425 3 ปีที่แล้ว

    @hussein - Great Stuff. Would you by any chance know how we can receive or consume a "RTMPS" stream? I'm having trouble finding a flutter video player that can consume a RTMPS stream.

  • @ronanramos3773
    @ronanramos3773 ปีที่แล้ว

    Is possible agregate the analytics data from all rmtp servers of the ha proxy in only one? its cool to have HA and high demand scalability, but how to merge all stats of the all server nodes? thank you!

  • @cjsima
    @cjsima 2 ปีที่แล้ว

    How does the proxy differentiate between a client pushing a stream, which has to hit app 1, vs a consuming client, who can access any server?

  • @Speeddevilx
    @Speeddevilx 2 ปีที่แล้ว

    how do i set it up so i can stream from outside my network to the server, I want to make it my irl bitrate control with NOALBS.

  • @hossainazad4585
    @hossainazad4585 3 ปีที่แล้ว

    If we relay the stream then the same stream will play in all servers... Then all servers will cost the same resource...

  • @bikashbhandari5608
    @bikashbhandari5608 2 ปีที่แล้ว

    i dint find any tutorials or doc for adaptive bit rate stream on node media server...can u please tell me how to do that?

  • @6365bharath
    @6365bharath 2 ปีที่แล้ว

    Hussein how do we scale this application further?

  • @KeshanSandeepa
    @KeshanSandeepa 3 ปีที่แล้ว

  • @sharaizkhan7323
    @sharaizkhan7323 3 ปีที่แล้ว

    Is there anyway that I can host the node media server on an online server so that anyone can stream on my site?

  • @waleedzakriakhan9538
    @waleedzakriakhan9538 2 ปีที่แล้ว

    How to use ws in it

  • @islem1263
    @islem1263 3 ปีที่แล้ว

    Can you talk about ECH and Mozilla dropping ESNI

  • @cloudsystem3740
    @cloudsystem3740 3 ปีที่แล้ว

    i try with HLS with to much fragment files unfortunately can you share something to learn ? :)

    • @cloudsystem3740
      @cloudsystem3740 3 ปีที่แล้ว

      btw i agree you are the netflix of developers community stolen comment by comments on your channel !!

  • @medharitirupathi8496
    @medharitirupathi8496 3 ปีที่แล้ว +1

    HI bro awesome video thank you, I m build a node media server in my case HLS and DASH is not working with my server I followed the given website still hls and dash is not working pls can u tell the where is the problem (www.npmjs.com/package/node-media-server)

  • @need5868
    @need5868 ปีที่แล้ว

    can you help setup my server ?

  • @SergeyPopovX
    @SergeyPopovX 3 ปีที่แล้ว

    You forgot to "npm init" before you "npm install" anything.

  • @Cdswjp
    @Cdswjp 2 ปีที่แล้ว

    too bad all the good videos use OBS