Apache & NginX

Ji Kim·2020년 8월 21일
0

Computer Architecture

목록 보기
3/3
post-custom-banner

Before Beginning

No matter how much the modern Web pages display their unique styles and fashions to attract the users. One unchaning attribute of the Web pages is that they are essentially HTML documents.

In fact, the fundamental feature of the Web page is simply visitor requesting a document from a given URL with IP system responding to the right computer.

Therefore, to serve different Web pages to different users, server program is instrumental to the whole "Web protocol".

Apache

  • First released in 1995, Apache quickly dominated the market and became the world's most popular web server.
  • Uses the Multi Processing Module (MPM) to implement hybrid multi-process / multi-threaded server. (i.e - Prefork & Worker MPM)

Thread Programming

Thread-based Server Architectures associates each incoming connection with a separate thread

Example

  1. Assign a thread when request A enters the Server socket.

  2. Thread processes the I/O within the socket.

  3. When the new request - request B enters the thread, context switching occurs

  4. Repeat the context switching to finish every I/O process.

Worker MPM

  • A process is connected to the multiple threads to handle the request
  • Since the process shares the memory, there is low usage of the memory thus preferable to a program with lots of traffic.

Prefork MPM

  • Creates children threads for each requests
  • Prepare for the children threads before the process
  • A process is connected only to one thread (maximum 1024)
  • Do not share the memory thus stable since independent however create large memory usage

NginX

  • Created by the Russian developer Igor Sysoev and first released in 2004
  • Created specifically to tackle the performance limitations of Apache web servers

Event Driven Programming

Event Driven Programming is an architectural style where incoming requests to the system are collected into one or more central event queues

Event Driven Architecture only creates one fixed process and handles the tasks within the process asynchronously.

The flow of the program is controlled by the events, and compare to Apache, NginX does not create C10K issue.

Since the program is based on asynchronous event handling, thread / CPU usage is low. The I/O is processed more flexibly enabling context switching smoother.

profile
if this then that
post-custom-banner

1개의 댓글

comment-user-thumbnail
2023년 7월 5일

Beyond the products themselves, I must commend the customer support provided by Cutting Edge Chainsaws. Whether it's product inquiries, technical assistance, or general advice, their team goes above and beyond to assist customers. Their prompt responses and willingness to address concerns truly foster a sense of trust and reliability. why not try these out, more info here, official site, look at this site, check it out.

답글 달기