博客
关于我
nginx主要流程(未完成)
阅读量:793 次
发布时间:2023-02-15

本文共 1794 字,大约阅读时间需要 5 分钟。

Nginx??????

Nginx??????Web???????????????????????????????????????Nginx???????????????

??????

???????Nginx???????????????????

  • ???-p???????????ngx_prefix????????
  • ???-c?????????????ngx_conf_file?
  • ???-g???????????ngx_conf_params?
  • ???-s?????????????ngx_signal????NGX_PROCESS_SIGNALLER?

?????????????ngx_time_init()?????????????????????ngx_cached_err_log_time?ngx_cached_http_time?????ngx_time_update?????????

????????????????ngx_regex_init()?????????????ngx_log_init()????????????????????SSL???ngx_ssl_init()????????HTTPS???

??????ngx_create_pool()??????1024B?????????ngx_save_argv()????????ngx_argv?????????

???????

??????????????????????????????????

  • ?????????ngx_spawn_process()?????????????????????socketpair()??UNIX?????????????????ioctl()?fcntl()????I/O???

  • ?????????????????????proc(cycle, data)???????????ngx_worker_process_cycle()?

  • ?????????????????????????CPU?????????????????????????????

  • ???????ngx_add_channel_event()???????????????????????ngx_channel_handler()?????recvmsg()?????????????

  • ??????

    ????????????????????????ngx_process_events_and_timers()????

    • ???????ngx_process_events()?? epoll??????????? accept_mutex ??
    • ????????ngx_event_process_posted()?????????????????????

    ??????????ngx_terminate?ngx_quit?????????????????

    acceptd????

    ngx_event_process_posted()???????????????

    voidngx_event_process_posted(ngx_cycle_t *cycle, ngx_queue_t *posted){    ngx_queue_t  *q;    ngx_event_t  *ev;    while (!ngx_queue_empty(posted)) {        q = ngx_queue_head(posted);        ev = ngx_queue_data(q, ngx_event_t, queue);        ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,                      "posted event %p", ev);        ngx_delete_posted_event(ev);        ev->handler(ev);    }}

    ???????????????????????

    ??

    Nginx??????????????????????????????????????????????????????????Nginx??????????

    转载地址:http://whcfk.baihongyu.com/

    你可能感兴趣的文章
    nginx: [error] open() “/usr/local/nginx/logs/nginx.pid“ failed (2: No such file or directory)
    查看>>
    nginx:Error ./configure: error: the HTTP rewrite module requires the PCRE library
    查看>>
    Nginx:objs/Makefile:432: recipe for target ‘objs/src/core/ngx_murmurhash.o‘解决方法
    查看>>
    nginxWebUI runCmd RCE漏洞复现
    查看>>
    nginx_rtmp
    查看>>
    Vue中向js中传递参数并在js中定义对象并转换参数
    查看>>
    Nginx、HAProxy、LVS
    查看>>
    nginx一些重要配置说明
    查看>>
    Nginx一网打尽:动静分离、压缩、缓存、黑白名单、跨域、高可用、性能优化......
    查看>>
    Nginx下配置codeigniter框架方法
    查看>>
    Nginx与Tengine安装和使用以及配置健康节点检测
    查看>>
    Nginx中使用expires指令实现配置浏览器缓存
    查看>>
    Nginx中使用keepalive实现保持上游长连接实现提高吞吐量示例与测试
    查看>>
    Nginx中如何配置WebSocket代理?
    查看>>
    Nginx中实现流量控制(限制给定时间内HTTP请求的数量)示例
    查看>>
    nginx中配置root和alias的区别
    查看>>
    nginx主要流程(未完成)
    查看>>
    Nginx之二:nginx.conf简单配置(参数详解)
    查看>>
    vue中各模块加载和渲染的过程
    查看>>
    Nginx从入门到精通
    查看>>