请求传输的过程&线程的介绍

1. 请求的运作过程

image

2. 前端和后端的定义

前端:

font-end is about everything that happens in the web browser. It is about designing and building the final website that's gonna be visible to the user, and therefore, the name font-end.

后端是运作在服务器上的程序,用户不可见。

3. nodejs的依赖

V8

libuv,包含事件循环,线程池

4. 线程

要注意不要阻塞主线程

nodejs中有四个线程组成线程池,事件循环中的事件会被分配到线程池中运行,但是这样的分配不是我们可以控制的,是nodejs自行控制的;这些线程池通常处理事件比较长的事件

image

posted @ 2022-06-18 03:04  kihyun  阅读(34)  评论(0编辑  收藏  举报