a little nginx (1)

23
[email protected] 2016.10 a little Nginx (1)

Upload: yang-bingwu

Post on 15-Apr-2017

134 views

Category:

Technology


0 download

TRANSCRIPT

[email protected]

2016.10

a little Nginx (1)

Nginx

1. HTTP and reverse proxy server 2. a mail proxy server 3. a generic TCP/UDP proxy server

Why Nginx is fast

1. reactor architect based multi IO dispatch

One master and several worker processes; worker processes run under an unprivileged user;

Why Nginx is fast

2. The Nginx codebase is written in the C programming language and is extremely optimized by the Igor Sysoev.

simplistic view

key concept

all is modular(e)

Nginx + Lua Beyond Nginx

What’s the ngx_http_lua

Embed the power of Lua into Nginx

Why Lua

High Performance

easy to develop

20 row in C = 1 row in Lua

How Does Nginx Connect Lua

Inject Nginx C API To Lua VM

How Does NginxLua Work

Over Nginx Hooks

Be Continued