Tengine is a Web server project initiated by Taobao. Based on the Nginx, it adds a lot of advanced features and features to the needs of the large scale Web site. Tengine performance and stability has been in large sites such as Taobao, Day Cat Mall and so got a good test. Its ultimate goal is to build an efficient, stable, secure, easy-to-use Web platform.
Characteristics of Nginx:
1, the basic HTTP server characteristics
1. Processing of static files, index files and automatic indexing, opening the file descriptor cache;
2. Use caching to accelerate reverse proxy, simple load balancing and fault tolerance;
3. Cache acceleration support for remote fastcgi,uwsgi,scgi, and memcached services; simple load balancing and fault tolerance;
4. Modular architecture. Filters include gzip compression, ranges support, chunked response, Xslt,ssi, and image scaling. In SSI filters, a page containing multiple SSI can be processed in parallel if processed by fastcgi or reverse proxy;
5. Support Ssl,tls SNI.
2. Other HTTP Server features
1. Virtual host based on name and IP;
2.keep-alive and pipelined connection support;
3. Flexible configuration;
4. When reloading the configuration and online upgrades, there is no need to interrupt the request being processed;
5. Custom access log format, with cached log write operations and fast log rotation;
6.3XX-5XX error code redirection;
7. Rewrite (rewrite) module: Change the URI using regular expressions;
8. Perform different functions according to the client's address;
9. Access control based on client IP address and HTTP basic authentication mechanism;
10. Support authentication HTTP Referer;
11. Support Put, DELETE, MKCOL, copy and Move methods;
12. Support for FLV and MP4 streams;
13. Speed limit;
14. Simultaneous connection number or number of requests from the same address;
15. Embed Perl language.
3, mail proxy server characteristics
1. Use external HTTP authentication server to redirect user to imap/pop3 backend;
2. Use the external HTTP authentication server to authenticate the user and redirect the connection to the internal SMTP back-end;
3. Supported Authentication methods:
3.1). Pop3:user/pass, APOP, AUTH login/plain/cram-md5;
3.2) Imap:login, AUTH login/plain/cram-md5;
3.3) Smtp:auth login/plain/cram-md5;
4.SSL support;
5.STARTTLS and STLS support.
Characteristics of Tengine:
1. Inherit all the features of Nginx-1.4.7, 100% compatible with Nginx configuration;
2. Dynamic module loading (DSO) support. Adding a module no longer requires recompiling the entire tengine;
3. Support Spdy V3 protocol to automatically detect SPDY requests and HTTP requests at the same port;
4. Stream upload to HTTP back-end server or fastcgi server, reduce the machine's I/O pressure substantially;
5. More powerful load balancing ability, including the consistency hash module, the session Maintenance module, but also to the back-end of the server for active health check, according to the server status of automatic on-line offline;
6. Input filter mechanism support. By using this mechanism Web application firewall is more convenient to write;
7. Support for setting proxy, memcached, fastcgi, scgi, Uwsgi retry attempts at backend failure
8. Dynamic scripting language LUA support. Extended functionality is very efficient and simple;
9. Support Pipeline (pipe) and syslog (local and remote) forms of log and log sampling;
10. Support to collect Tengine running status according to the specified keywords (domain name, URL, etc.);
11. Combination of multiple CSS, JavaScript file access request to become a request;
12. Automatically remove whitespace characters and annotations to reduce the volume of the page
13. Automatically according to the number of CPUs set the number of processes and bound CPU affinity;
14. Monitoring system load and resource occupancy to protect the system;
15. Show more friendly error message to operation and maintenance personnel, easy to locate error machine;
16. More powerful anti-attack (access speed limit) module;
17. More convenient command line parameters, such as listing the compiled module list, supported instructions, etc.;
18. Can set the expiration time according to the Access file type;
Architecture and Extensibility (Nginx)
1. One main process and multiple worker processes, and worker processes run as unprivileged users;
2. Supported event Mechanisms: Kqueue (FreeBSD 4.1+), Epoll (Linux 2.6+), RT Signals (Linux 2.2.19+),/dev /poll (Solaris 7 11/99+), Event ports (Solaris 10), select, and Poll
3. Many supported Kqueue features include Ev_clear, ev_disable (temporary forbidden events), note _lowat, ev_eof, number of available data, error code,
4. Support Sendfile (FreeBSD 3.1+, Linux 2.2+, Mac OS X 10.5+), Sendfile64 (Linux 2.4.21+ and Sendfilev (Solaris 8 7/01+),
5. File Aio (FreeBSD 4.3+, Linux 2.6.22+);
Directio (FreeBSD 4.4+, Linux 2.4+, Solaris 2. 6+, Mac OS X);
6. Support Accept-filters (FreeBSD 4.1+, NetBSD 5.0+) and tcp_defer_accept (Linux 2.4+);
7.1 Inactive http The keep-alive connection occupies only about 5 m of memory;
8. Avoid data copy operations as much as possible.