Giter Club home page Giter Club logo

nginx's Introduction

#导读

文档基于Nginx官方Git的release1.9.9(2015-12-09)版本描述。

分析此版本静态代码和在环境为gcc 4.1.2,64位Linux2.6.18(Red Hat)下不带任何参数configure生成的动态代码(objs目录)。

#预备知识 c语言标准语法:出现频率比较高的,typedef、extern、static、volatile、void*等。

Linux环境编程:函数调用、系统调用(普通调用、慢调用)、exec(nginx热代码替换,二进制升级)、字节对齐、pagesize页对齐、 多进程(深刻理解)、守护进程(通用作法;与进程作业命令nohup区别)、进程间通信IPC(信号量、unix本地域、共享内存、文件映射)、多线程、锁、普通I/O、标准I/O、文件描述符(最好知道系统经典实现)、异步调用、非阻塞I/O、I/O多路复用(重点关注epoll)、Socket相关调用、worker进程惊群及如何防止、原子操作、内存屏障,信号机制(安全信号)、定时器、argv与environ内存布局(最好知道进程经典内存布局)等。

gcc编译:auto、makefile等。

数据结构:内存池、连接池、文件池、链表、队列、红黑树等。

#目录结构

nginx/
		auto/			#自动化脚本
		conf/			#配置模板
		contrib/
		docs/
		misc/
		objs/			#环境相关,由auto生成
		src/			#源代码
			core/		#核心,入口
			event/	#事件相关	epoll、select
			http/		#http相关
			mail/		#mail相关
			misc/		#杂项
			mysql/	#mysql相关
			os/
				unix/		#unix系统相关接口
				win32/	#windows系统相关接口
			stream/		#流相关

nginx's People

Contributors

igorsysoev avatar mdounin avatar mdocguard avatar vbart avatar arut avatar pluknet avatar piotrsikora avatar vlhomutov avatar wlmwang avatar defanator avatar cubicdaiya avatar fblr avatar kou avatar agentzh avatar fdasilvayy avatar flygoast avatar chobits avatar xeioex avatar linuxjedi avatar damz avatar dbussink avatar evanmiller avatar codeeply avatar thresheek avatar klnusbaum avatar lukastribus avatar maage avatar nextsux avatar khaless avatar lekensteyn avatar

Stargazers

adolph avatar Zephyrus avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

ayoah

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.