TAILIEUCHUNG - Advanced PHP Programming- P6

Tham khảo tài liệu 'advanced php programming- p6', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 228 Chapter 9 External Performance Tunings Pre-Fork Event-Based and Threaded Process Architectures The three main architectures used for Web servers are pre-fork event-based and threaded models. In a pre-fork model a pool of processes is maintained to handle new requests. When a new request comes in it is dispatched to one of the child processes for handling. A child process usually serves more than one request before exiting. Apache follows this model. In an event-based model a single process serves requests in a single thread utilizing nonblocking or asynchronous I O to handle multiple requests very quickly. This architecture works very well for handling static files but not terribly well for handling dynamic requests because you still need a separate process or thread to the dynamic part of each request . thttpd a small fast Web server written by Jef Poskanzer utilizes this model. In a threaded model a single process uses a pool of threads to service requests. This is very similar to a prefork model except that because it is threaded some resources can be shared between threads. The Zeus Web server utilizes this model. Even though PHP itself is thread-safe it is difficult to impossible to guarantee that third-party libraries used in extension code are also thread-safe. This means that even in a threaded Web server it is often necessary to not use a threaded PHP but to use a forked process execution via the fastcgi or cgi implementations. Apache 2 uses a drop-in process architecture that allows it to be configured as a pre-fork threaded or hybrid architecture depending on your needs. In contrast to the amount of configuration inside Apache the PHP setup is very similar to the way it was before. The only change to its configuration is to add the following to its file Listen localhost 80 This binds the PHP instance exclusively to the loopback address. Now if you want to access the Web server you must contact it by going through the proxy server. .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.