Tengine Module Documentation: main features

Source: Internet
Author: User
Keywords module documentation main function
Tags code cpu default error function functionality http location

Core functionality

Instructions

syntax:worker_processes [num | auto]
Default:worker_processes Auto
Context:core

Add parameter Auto for worker_processes. When set to Auto,tengine will automatically start a worker process with the same number of CPUs.

syntax:worker_cpu_affinity [Mask1 mask2 mask3 ... | auto]
Default:worker_cpu_affinity Auto
Context:core

Add parameter Auto for worker_cpu_affinity. When set to Auto, Tengine automatically configures the CPU binding location graph according to the number of worker. The order of bindings is from large to small by CPU number. If the number of worker is greater than the number of CPUs, the remaining worker processes will be bound again in the order of the CPU number from the largest CPU to the number of CPUs. For example: A CPU has 8 cores,

The number of worker is 4, then the automatically configured binding location graph is 10000000, 01000000, 00100000, 00010000 the number of worker is 8, then the automatically configured binding location diagram is 10000000, 01000000, 00100000, 00010000, 00001000, 00000100, 00000010, 00000001 worker number is 10, then the automatic configuration of the binding location diagram is 10000000, 01000000, 00100000, 00010000, 00001000, 00000100, 00000010, 00000001, 10000000, 01000000

The worker_cpu_affinity error log displays up to 64 CPU bindings.

Syntax:error_page code ... [=[response]]
Default:-
Context:http, server, location, if in location

This directive is used to set the corresponding URI address that is returned to the client display if the specified HTTP error status code appears.

Supports default, you can reset the error_page of the previous level set up, fix the problem that error_page can't find duplicate code, and can't inherit the problem of the previous level setup properly.

Example:

HTTP {error_page 404/404.html; server {error_page 404 default;}}

The "error_page" directive in server restores 404 of pages to system defaults.

syntax:msie_padding [on | off]
Default:msie_padding off
Context:http, Server, location

This directive shuts down or turns on the msie_padding feature of the Msie browser, and if the option is enabled, Nginx fills the response header with 512 bytes, which prevents the browser from activating the friendly error interface and therefore does not hide any more error messages. This feature is turned off by default in Tengine.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.