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

Поделиться
HTML-код
  • Опубликовано: 3 фев 2025

Комментарии • 73

  • @pointerish
    @pointerish 4 года назад +11

    I envy your enthusiasm, Hussein. Awesome content!

  • @CodingNuggets
    @CodingNuggets 4 года назад +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  4 года назад +1

      Thank you so much dear 🙏

  • @krishnakumar-rp9wc
    @krishnakumar-rp9wc 3 года назад +1

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

  • @JohnLovell-FTW
    @JohnLovell-FTW 4 года назад +4

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

  • @Dominik-K
    @Dominik-K 4 года назад +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 4 года назад

      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)

  • @LevKozlodoev
    @LevKozlodoev 4 года назад +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 4 года назад +1

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

    • @autohmae
      @autohmae 4 года назад +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 4 года назад +2

    Dude I love your vids! Great job man

  • @gaminglaptopsforsale8127
    @gaminglaptopsforsale8127 3 года назад

    Underrated video. This is amazing!

  • @Mrabdulazizbidani07
    @Mrabdulazizbidani07 4 года назад

    Love what you do, keep the good work👍😍

  • @Ruf4eg
    @Ruf4eg 4 года назад

    I admire your enthusiasm :)

  • @Vintage_Antika
    @Vintage_Antika 3 года назад

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

  • @lakshayasood2197
    @lakshayasood2197 4 года назад +1

    @17:20 Beatboxing with chrome tabs 😂😂

  • @santiagobustamante970
    @santiagobustamante970 3 года назад

    Thanks Hussein you're awesome

  • @firoj.siddiki
    @firoj.siddiki Год назад

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

  • @natielgavi
    @natielgavi 4 года назад

    Makes it look so easy.. awesome.

  • @tahakherraf28
    @tahakherraf28 2 года назад +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

  • @tarekali7064
    @tarekali7064 4 года назад

    LET'S GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO! FINALLY!

  • @jean-baptistelasselle4562
    @jean-baptistelasselle4562 Год назад

    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 RUclips/Twitch / etc...? Or is the relay (NMS "push mode") only well suited for scaling up end browsers watching the live ?

  • @Stoney_Eagle
    @Stoney_Eagle 4 года назад

    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.

  • @robertdowney1823
    @robertdowney1823 3 года назад

    Thank you bro so much ! love you!

  • @Gigabyteserviceofficial
    @Gigabyteserviceofficial 2 года назад +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?

  • @sankaranarayananp8407
    @sankaranarayananp8407 Год назад +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 ?.

  • @adilkhatri7475
    @adilkhatri7475 4 года назад

    amazing hussain!!!!

  • @Akosiyawin
    @Akosiyawin 2 года назад

    Wondering how to apply this in production

  • @DamjanDimitrioski
    @DamjanDimitrioski 4 года назад +3

    Any formula to calculate the total possible users :)?

    • @DamjanDimitrioski
      @DamjanDimitrioski 2 года назад

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

  • @SachinVerma_profile
    @SachinVerma_profile 4 года назад

    Awesome content!!

  • @jupicolombia9069
    @jupicolombia9069 5 месяцев назад

    Excellent! can we upload this to GCP somehow?

  • @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!

  • @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?

  • @oussamawahbi4976
    @oussamawahbi4976 4 года назад

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

    • @hnasr
      @hnasr  4 года назад +1

      ruclips.net/video/FExZvpVvYxA/видео.html ☺️

  • @camilobedoya7779
    @camilobedoya7779 3 года назад +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  3 года назад +1

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

  • @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.

  • @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

  • @bikashbhandari5608
    @bikashbhandari5608 3 года назад

    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?

  • @fullnaoufal
    @fullnaoufal 4 года назад

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

  • @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.

  • @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?

  • @6365bharath
    @6365bharath 3 года назад

    Hussein how do we scale this application further?

  • @cjsima
    @cjsima 3 года назад

    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?

  • @hamzamuazzam5368
    @hamzamuazzam5368 2 года назад

    KING

  • @EmileAI
    @EmileAI 4 года назад

    Thank you so much

  • @Brad0st
    @Brad0st 3 года назад

    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 ?

  • @bahodirshokarimov
    @bahodirshokarimov Месяц назад

    I have a problem.
    [INFO] HTTP server listening on port undefined:8000
    [INFO] Rtmp Server listening on port undefined:1935

  • @waleedzakriakhan9538
    @waleedzakriakhan9538 3 года назад

    How to use ws in it

  • @guicercal
    @guicercal 3 года назад

    excellent!

  • @kevinkkirimii
    @kevinkkirimii 4 года назад

    this is dope

  • @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 !!

  • @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

  • @chrisdamonsworld
    @chrisdamonsworld 4 года назад

    Nice video

  • @bestmusics9625
    @bestmusics9625 4 года назад +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!

  • @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...

  • @islem1263
    @islem1263 4 года назад

    Can you talk about ECH and Mozilla dropping ESNI

  • @medharitirupathi8496
    @medharitirupathi8496 4 года назад +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)

  • @brunosacramentoguapyassu346
    @brunosacramentoguapyassu346 Год назад

    I love you

  • @need5868
    @need5868 2 года назад

    can you help setup my server ?

  • @KeshanSandeepa
    @KeshanSandeepa 4 года назад

  • @SergeyPopovX
    @SergeyPopovX 4 года назад

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

  • @david-tracy
    @david-tracy 2 года назад

    too bad all the good videos use OBS