简体   繁体   English

Apache配置中的不同术语意味着什么?

[英]What do the different terms in Apache configuration means?

I keep coming across certain terms used in the Apache settings. 我一直遇到Apache设置中使用的某些术语。 While trying to understand the various discussions and Apache's docs , I need some help figuring out what some of these terms mean: 在尝试理解各种讨论和Apache的文档时 ,我需要一些帮助来弄清楚这些术语的含义:

  1. What is a Client? 什么是客户?
  2. What is the difference between a client and a child process? 客户和子流程之间有什么区别? Are they the same? 他们是一样的吗?
  3. If MaxClient = 255 , does it mean that Apache will process up to 255 page loads in parallel and the rest are queued? 如果MaxClient = 255 ,是否意味着Apache将并行处理最多255页的页面加载,其余的都排队?
  4. When is a KeepAlive request used? 什么时候使用KeepAlive请求?
  5. What is the relationship between a child process and the request of this child process? 子进程与该子进程的请求之间是什么关系?

First, I hope you understand that apache 1.3 is very very old, and therefore the documentation will generally be somewhat harder to understand than the newer documentation (ie maybe you should upgrade if you have the choice). 首先,我希望您了解apache 1.3非常旧,因此与较新的文档相比,该文档通常较难理解(即,如果您有选择的话,也许应该升级)。

  1. I'm not sure where "Client" is referred to by itself in the apache docs by I would assume it refers to anything connecting to an open port and communicating. 我不确定在apache文档中“客户端”在何处是我自己所指的,因为我认为它是指连接到开放端口并进行通信的任何内容。

  2. Again, not sure where "child" is referred to by itself, so I can't help you there. 同样,不确定“孩子”在何处是单独提及的,因此我在这里不能为您提供帮助。

  3. MaxClient is the number of processes apache will start to handle requests. MaxClient是apache将开始处理请求的进程数。 It sounds like for Apache 1.3 that what you said is accurate, apache will only handle MaxClient requests in parallel (queuing the rest up to some other maximum for the queue). 听起来对于Apache 1.3来说,您所说的是正确的,apache将仅并行处理MaxClient请求(将其余队列最多排队等待其他最大数量)。

  4. KeepAlive is not really a request. KeepAlive并不是真正的请求。 It is sent in the request header to tell the server that the browser supports KeepAlive. 它在请求标头中发送,以告知服务器浏览器支持KeepAlive。 It has to do with a feature of HTTP that allow one connection to be used for more than one access. 它与HTTP的功能有关,该功能允许将一个连接用于多个访问。 If you allow KeepAlive your server will probably get less TCP connections. 如果允许KeepAlive,则服务器可能会获得较少的TCP连接。

  5. I'm not even sure what you're asking here so you'll need to be more specific. 我什至不确定您在这里要问什么,所以您需要更具体。

First, note that these answers apply either to Apache 1.x, or Apache 2.x only when using the prefork mode. 首先,请注意,这些答案仅适用于Apache 1.x,或者仅在使用prefork模式时适用于Apache2.x。

  1. The machine that opens an HTTP connection and sends a request. 打开HTTP连接并发送请求的机器。

  2. No, they are not the same. 不,他们不一样。 An Apache child can handle one request/client at a time, but when that one is finished, the same child can handle a new one. 一个Apache子进程可以一次处理一个请求/客户端,但是当一个请求/客户端完成时,同一个子进程可以处理一个新的请求/客户端。

  3. Yes. 是。

  4. It is used to keep the HTTP connection open in case the client wants to issue another request. 它用于保持HTTP连接打开,以防客户端要发出另一个请求。 A client can remain connected, for example, to download images and such that are associated with a web page. 客户端可以保持连接,例如,以下载图像以及与网页相关联的图像。 Having KeepAlive On improves performance for the client (user), but having it off reduces memory usage by the server. 启用KeepAlive可以提高客户端(用户)的性能,但是禁用KeepAlive可以减少服务器的内存使用量。 It is a trade-off. 这是一个权衡。

  5. The Apache process launches a bunch of children. Apache进程启动了许多子进程。 When a request comes in, the parent (root) process picks an idle child to handle that request. 当请求进入时,父(根)进程会选择一个空闲的孩子来处理该请求。 When that request is finished, the child is now idle and can handle a new request. 该请求完成后,孩子现在处于空闲状态,可以处理新的请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM