33
GitHub - chronolaw/annotated_nginx: Annotated Nginx Source(中文)
source link: https://github.com/chronolaw/annotated_nginx
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
annotated_nginx
Annotated Nginx Source(中文)
简介
Nginx源码分析,注解代码,帮助学习Nginx。
Nginx1.10增加了动态模块、http2、reuseport。
Nginx1.11.x里的stream模块的变动较大,完善了阶段处理。
Nginx1.14增加了mirror模块,支持gRPC。
请参考:
- 《Nginx完全开发指南:使用C/C++和OpenResty》
- ngx_cpp_dev
- ngx_ansic_dev
- openresty_dev
- favorite-nginx
- ngx_google_perftools_profiler - A better tools for nginx with google_perftools
当前状态
Nginx 1.15.2
Git分支
分支 说明 注释 master Nginx开发版1.15.2 有 mainline Nginx开发版1.15.2 无 stable Nginx稳定版1.14.0 无已注解
源码目录快捷入口
- src - 70%,nginx源码目录
- core - 90%,md5/sha1/crc等较简单的功能不关注
- event - 90%,只注解核心模块和epoll,select/kqueue/ssl等不关注
- http - 70%,少量modules目录里的具体功能模块有注释
- os/unix - 80%,bsd/darwin/solaris等系统不关注
- stream - 70%
- misc - 100%
UML图解
部分关键源码(目录分类)
core目录- nginx.c
- ngx_conf_file.h
- ngx_module.h
- ngx_module.c
- ngx_connection.h
- ngx_connection.c
- ngx_thread_pool.h
- ngx_thread_pool.c
- ngx_palloc.c
- ngx_slab.c
- ngx_log.c
- ngx_http.h
- ngx_http.c
- ngx_http_core_module.h
- ngx_http_core_module.c
- ngx_http_request.h
- ngx_http_request.c
- ngx_http_request_body.c
- ngx_http_header_filter_module.c
- ngx_http_write_filter_module.c
- ngx_http_limit_req_module.c 红黑树和共享内存的使用示例
- ngx_http_degradation_module.c
- ngx_http_upstream_zone_module.c
部分关键源码(功能分类)
内存管理- ngx_palloc.c
- ngx_slab.c
- ngx_http_limit_req_module.c 红黑树和共享内存的使用示例
- ngx_http_degradation_module.c
- ngx_http_upstream_zone_module.c
- ngx_array.h
- ngx_list.h
- ngx_string.h
- ngx_buf.h
- ngx_rbtree.h
- ngx_http_limit_req_module.c 红黑树和共享内存的使用示例
- ngx_connection.h
- ngx_connection.c
- ngx_event.h
- ngx_event.c
- ngx_event_accept.c
- ngx_event_timer.c
- ngx_epoll_module.c
- ngx_connection.h
- ngx_connection.c
- ngx_stream.h
- ngx_stream.c
- ngx_stream_core_module.c
- ngx_stream_handler.c
- ngx_connection.h
- ngx_connection.c
- ngx_http.h
- ngx_http.c
- ngx_http_core_module.h
- ngx_http_core_module.c
- ngx_http_request.h
- ngx_http_request.c
- ngx_http_request_body.c
- ngx_http_header_filter_module.c
- ngx_http_write_filter_module.c
不注解
- auto
- misc
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK