Artwork

Conteúdo fornecido por Hussein Nasser. Todo o conteúdo do podcast, incluindo episódios, gráficos e descrições de podcast, é carregado e fornecido diretamente por Hussein Nasser ou por seu parceiro de plataforma de podcast. Se você acredita que alguém está usando seu trabalho protegido por direitos autorais sem sua permissão, siga o processo descrito aqui https://pt.player.fm/legal.
Player FM - Aplicativo de podcast
Fique off-line com o app Player FM !

When is NodeJS Single Threaded and when is it multi-Threaded?

9:06
 
Compartilhar
 

Manage episode 288153214 series 1954062
Conteúdo fornecido por Hussein Nasser. Todo o conteúdo do podcast, incluindo episódios, gráficos e descrições de podcast, é carregado e fornecido diretamente por Hussein Nasser ou por seu parceiro de plataforma de podcast. Se você acredita que alguém está usando seu trabalho protegido por direitos autorais sem sua permissão, siga o processo descrito aqui https://pt.player.fm/legal.

Node JS Is single-threaded asynchronous non-blocking javascript runtime, but it's not always single-threaded there are occasions where nodejs uses multi-threading, so the questions we will try to answer in this video, when is nodejs single-threaded and when does it use multi-threading and how will that affect my app?

  • Event Loop single thread, that really just loops for callbacks 0:00
  • Threading in Node jS (libuv) 4:00
    • used for
    • IO/intensive
      • DNS queries
      • file system reads
    • CPU intensive
      • crypto
      • compression
    • process.env.UV_THREADPOOL_SIZE=1

Examples 8:00

Cluster Nodejs 16:00

Example 1

HTTP server return 1

HTTP server while 1

HTTP server with file system read async

HTTP server with file system read sync

HTTP server with fetch call to server (dns)

Support my work on PayPal

https://bit.ly/33ENps4

Become a Member on YouTube

https://www.youtube.com/channel/UC_ML5xP23TOWKUcc-oAE_Eg/join

🧑‍🏫 Courses I Teach

https://husseinnasser.com/courses

  continue reading

512 episódios

Artwork
iconCompartilhar
 
Manage episode 288153214 series 1954062
Conteúdo fornecido por Hussein Nasser. Todo o conteúdo do podcast, incluindo episódios, gráficos e descrições de podcast, é carregado e fornecido diretamente por Hussein Nasser ou por seu parceiro de plataforma de podcast. Se você acredita que alguém está usando seu trabalho protegido por direitos autorais sem sua permissão, siga o processo descrito aqui https://pt.player.fm/legal.

Node JS Is single-threaded asynchronous non-blocking javascript runtime, but it's not always single-threaded there are occasions where nodejs uses multi-threading, so the questions we will try to answer in this video, when is nodejs single-threaded and when does it use multi-threading and how will that affect my app?

  • Event Loop single thread, that really just loops for callbacks 0:00
  • Threading in Node jS (libuv) 4:00
    • used for
    • IO/intensive
      • DNS queries
      • file system reads
    • CPU intensive
      • crypto
      • compression
    • process.env.UV_THREADPOOL_SIZE=1

Examples 8:00

Cluster Nodejs 16:00

Example 1

HTTP server return 1

HTTP server while 1

HTTP server with file system read async

HTTP server with file system read sync

HTTP server with fetch call to server (dns)

Support my work on PayPal

https://bit.ly/33ENps4

Become a Member on YouTube

https://www.youtube.com/channel/UC_ML5xP23TOWKUcc-oAE_Eg/join

🧑‍🏫 Courses I Teach

https://husseinnasser.com/courses

  continue reading

512 episódios

Todos os episódios

×
 
Loading …

Bem vindo ao Player FM!

O Player FM procura na web por podcasts de alta qualidade para você curtir agora mesmo. É o melhor app de podcast e funciona no Android, iPhone e web. Inscreva-se para sincronizar as assinaturas entre os dispositivos.

 

Guia rápido de referências