Unix Domain Socket in 100 seconds

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ค. 2024
  • Do you run TCP for IPC on a single machine? Running out of TCP ports? You might want to try Unix Domain Socket instead. In this video We will see how to use unix domain socket with Node.js, and also pros and cons of Unix Domain Socket compared to TCP.
    Related videos:
    • You might not need HTTP
    • Unix Socket HTTP in 10...
    • Unix Named Pipe in 100...
    Playlist:
    • You might not need
    #linux #javascript #100secondsofcode #webdevelopment #computerscience #networking #nodejs #programming #software
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @adenosinetp10
    @adenosinetp10 หลายเดือนก่อน +236

    What is that thumbnail ? 😭😭

    • @mohamedsamet4539
      @mohamedsamet4539 หลายเดือนก่อน +62

      domain expansion

    • @Eren_Yeager_is_the_GOAT
      @Eren_Yeager_is_the_GOAT หลายเดือนก่อน +40

      domain expansion: infinite knowledge

    • @shroomer3867
      @shroomer3867 หลายเดือนก่อน +29

      Domain Expansion: Infinite Compatibility

    • @no_name4796
      @no_name4796 หลายเดือนก่อน +16

      Open source domain expansion

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

      Last thing you see before linus sticks his fingers up your bum

  • @jaakkohintsala2597
    @jaakkohintsala2597 หลายเดือนก่อน +124

    one of the thumbnails of all time

  • @kostis9081
    @kostis9081 หลายเดือนก่อน +43

    The domain expansion thumbnail is the only reason I clicked on this. And I'm glad I did.

  • @pouf-dk3nq
    @pouf-dk3nq หลายเดือนก่อน +20

    This was so quick, straight to the point. Great video man.

  • @hendraeffendi8607
    @hendraeffendi8607 หลายเดือนก่อน +43

    the thumbnails got me click this video :)
    領=域展開!!!
    and the video has really good information.

  • @unLinuxeroMas
    @unLinuxeroMas 2 หลายเดือนก่อน +35

    man linux and calculus have some cool domains expansions

  • @robertolin4568
    @robertolin4568 7 วันที่ผ่านมา +2

    Every time I see this thumbnail I click into this video. It is on par with the quality of the contents

  • @cryptic_daemon_
    @cryptic_daemon_ หลายเดือนก่อน +32

    Love me jjk reference

  • @wandermaus4571
    @wandermaus4571 หลายเดือนก่อน +9

    great thumbnail 😂 Also good video 👍

  • @littleElmimo123
    @littleElmimo123 2 หลายเดือนก่อน +36

    Where was this video my whole life

    • @keshav2136
      @keshav2136 หลายเดือนก่อน +2

      It was uploaded just recently

    • @littleElmimo123
      @littleElmimo123 หลายเดือนก่อน +2

      That’s true, I’m definitely not 3 weeks old myself

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

      You could read the docs

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

    i ackchyually like and suscribe for the quality/length of this video.

  • @ZoinkDoink
    @ZoinkDoink หลายเดือนก่อน +4

    thumbnail is absolutely goated LOL, also great video dude! subbed

  • @nickeldan
    @nickeldan หลายเดือนก่อน +6

    You can also send file descriptors over domain sockets.

  • @sfulibarri
    @sfulibarri หลายเดือนก่อน +3

    I had no idea this existed, perfect for my next project though.

  • @2Fast4Mellow
    @2Fast4Mellow 16 วันที่ผ่านมา +1

    Yes, it supported under Windows, but only as a wrapper around named pipes. For most software this slight overhead is unnoticeable, but if you need to squeeze every last drop of performance, you'd might want to use named pipes directly. But than again, if this communication is the bottleneck of your application, you already have most likely already made some bad design decisions earlier. Usually IPC is used to communicate from a user-space front-end utility to a background service/daemon process, but in some cases it also used for communication between forked processes...

  • @aws-china
    @aws-china หลายเดือนก่อน +3

    glad I found this channel, entertaining content :)

  • @stokedfool
    @stokedfool 5 วันที่ผ่านมา

    Socket files can run entirely in memory! Crazy
    `> find / -type s ` is super helpful

  • @cakesama9770
    @cakesama9770 หลายเดือนก่อน +3

    I had to like just for the thumbnail

  • @user-ou8pt4bz2g
    @user-ou8pt4bz2g 2 หลายเดือนก่อน +4

    awesome vid man!

  • @unLinuxeroMas
    @unLinuxeroMas 2 หลายเดือนก่อน +4

    exquisito video man .

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

    10/10 thumbnail

  • @Felipe-53
    @Felipe-53 หลายเดือนก่อน +1

    Nice content, keep bringing it, please!

  • @lucaspagliarini910
    @lucaspagliarini910 หลายเดือนก่อน +2

    Good content, keep it up!

  • @user-ys8wc9ob6g
    @user-ys8wc9ob6g หลายเดือนก่อน +2

    I came here to watch ultimate lobotomy kaisen edit, but this is also good.

  • @dstick14
    @dstick14 หลายเดือนก่อน +5

    Ryoiki Tenkai Malevolent Sockets!!

  •  6 วันที่ผ่านมา

    Great video! Btw what do you use for the slides?

  • @whetfaartz6685
    @whetfaartz6685 หลายเดือนก่อน +2

    Unix Domain Socket expansion!

  • @ThePandaGuitar
    @ThePandaGuitar 15 วันที่ผ่านมา

    nice vid. Subbed

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

    Bruh I've been searching for this for a week now

  • @seansingh4421
    @seansingh4421 2 วันที่ผ่านมา

    What if I provision a TLS through PKI or a local root CA ? Then can the traffic be routed through port 443 ?

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

    What do you use to make your videos?

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

    It isn't infinite socket file, that number is the number of limits defined to the kernel usually below 32k and can be restricted by ulimits for users.

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

    I keep watching this even though I’ve already known what a UDS is. For the thumbnail.

  • @ChrisCox-wv7oo
    @ChrisCox-wv7oo 28 วันที่ผ่านมา

    Anyone have a comparison of the throughput difference between domain and TCP sockets, when both processes are running on the same machine?

  • @wanderingfido
    @wanderingfido หลายเดือนก่อน +2

    This feels like a better and user-friendly way to communicate with busy threads. And hide load spikes from hawkish admins. 😏

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

      With the classic approach of synchronous IO (blocking read/write) and one thread per connection, there's generally no difference between local TCP/IP and Unix domain sockets - the stack memory and scheduler overhead for so many threads stays the limiting factor. Also in theory, TCP runs out of port numbers after one listening socket and 65,534 connections; with Unix domain sockets, the connecting side often gets an anonymous socket address, of which there can be arbitrarily many.

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

    Can I ask what tools did you use for the illustration

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

      gruvbox dark was mentioned further below.

  • @dasten123
    @dasten123 หลายเดือนก่อน +2

    Why have I never heard of it and why would anyone still use tcp with the loopback address? Where's the catch?

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

      TCP on the loopback adapter is most useful with programs that can work both locally and over the network, or if you interface with a program that's only designed around network connections. For example, the game Minecraft has used a server-client architecture for a long time; if you enter a singleplayer world, it starts a game server (which you can open up to your local network at any point) and connects to it on localhost. That said, many Java programs still use loopback for IPC because Unix domain sockets were only added to the standard libary in Java 16 after they were universally supported.

  • @jbray250
    @jbray250 23 วันที่ผ่านมา

    Not the domain expansion 😭 it's perfect

  • @Knirin
    @Knirin 5 วันที่ผ่านมา

    Is it used in real life? PHP-FPM makes heavy use of Unix Domain Sockets. Most databases use them as well. If you’re running a website on a single system I am pretty sure Unix Domain Sockets are involved somewhere.

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

    This is how to do "pipe" instead of loading the entire network stack for localhost, do any other applications that nginx really need to load network stack? I have about 200 UDS behind the same endpoints in nginx. It's a monolithic solution deployed separately for each route, hence each route can be down or be replaced without the rest of the solution having to be down. Further I can pick and choose which dev environment each route uses: R, Python, Swift, and / or Rust as pr my knowledge.

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

      Thank you for the idea. Thinking about R how do you deal with blocking? Let's say that my R model takes 1 min to answer.

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

      @@quantinvest7968 Always for front loading, so it's not a web facing interface as such; the route will respond with a job number and timestamp only, however its result[s] will be indexed after the fact, and / or put in PostgreSQL.

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

    Linus Domain expansion : sudo rm -Rf. Not even Sukuna can counter this.🤣

  • @user-qx2os9oh7i
    @user-qx2os9oh7i 8 วันที่ผ่านมา

    Linus Torvalds domain expansion is Linux.

  • @realname8798
    @realname8798 2 หลายเดือนก่อน +1

    Which colorscheme is this?

    • @nixhero
      @nixhero  2 หลายเดือนก่อน +1

      gruvbox dark

  • @ricardojlrufino
    @ricardojlrufino 9 วันที่ผ่านมา

    MySQL also use Domain sockets

  • @Famelhaut
    @Famelhaut 9 วันที่ผ่านมา

    gud

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

    Linus Torvalds: if Windows implements more improved kernel versions in the future it may give me some problems...
    ...Nah I'd Win

  • @rweaver6
    @rweaver6 16 วันที่ผ่านมา

    In Windows, it's not available to non-insiders.

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

    1:30 Not to mention postgresql

  • @user-qr4jf4tv2x
    @user-qr4jf4tv2x หลายเดือนก่อน +1

    views mostly because of thumbnail.. clickbait skill unlocked

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

    But would you lose?

    • @Jooohn64
      @Jooohn64 หลายเดือนก่อน +2

      Nah I'd win

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

    I think it's valuable going over the rest of the list and some further reasons why you would want this over another. It seems half done, really.

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

    why is it just plain black?

  • @Joe-oc5jq
    @Joe-oc5jq 10 วันที่ผ่านมา

    insane thumbnain lmaoi

  • @LokendraSingh-42
    @LokendraSingh-42 17 วันที่ผ่านมา

    1:36 One Piece ftw

  • @vicradon
    @vicradon 16 วันที่ผ่านมา

    Why the GenZ call-out?

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

    Unix Domain Expansion . 😂😂😂😂

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

    This isn't C...

  • @haves_
    @haves_ 7 วันที่ผ่านมา

    I was liking this video until you said the example in JS...

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

    guys can anyone tell me how can i learn all this, i'm getting into IT so new to this stuffs i just know frontend backend and networking stuff but this whole ssh, tcp IPC, unix domain is over my head

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

      Windows is primarily a realm that likes the MVC paradigm. Linux is more the reversal or mirroring of that framework. ETL mechanisms that pull messy marked up structures back into raw data ( serializables). All for reloading back into yet another MVC (ie databases, browsers, and tcp-based client-servers (ie Apache/IIS)).

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

      @@wanderingfido i appreciate your comment man, now i will read in depth of these things you told, thank you.

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

      We don't do ETL in Windows servers because the data sets tend to be huge. And Microsoft has more memory leaks.
      Microsoft == Boeing== Ford
      versus
      Linux == AirBus == BMW

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

      I just had an epiphany after that domestic versus foreign product quality comparison. Domestic systems really suck. Wow. I didn't fully realize until I lined a few up together. We here in the West need to pull our heads back out of our own butts. And go take a long soul-searching shower. And then go watch more telly. Cuz. What else can we really do now? It's already over.

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

      If you're a beginner web developer, this is the foundation on which the web is built. It's good to get familiar with networking. When you said you "know" it, I don't know if that means you know of its existence, or if you're experienced and this is a prank. Sorry for the autism.
      ssh means secure shell. It lets you use the terminal on another machine.
      TCP/IP means Transmission Control Protocol/Internet Protocol. It defines the technology which makes packets reach their destination.
      Unix domain sockets are something I just learned about watching this video. They're an alternative to using TCP/IP to send information between processes on the same machine, if I understand correctly. It seems better because you don't run out of ports.