Директивы Apache 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 Workers RU EN The proxy manages the configuration of origin servers and their communication parameters in objects called workers. There are two built-in workers: the default forward proxy worker and the default reverse proxy worker. Additional workers can be configured explicitly. The two default workers have a fixed configuration and will be used if no other worker matches the request. They do not use HTTP Keep-Alive or connection reuse. The TCP connections to the origin server will instead be opened and closed for each request. Explicitly configured workers are identified by their URL.
They are usually created and configured using
ProxyPass "/example" "http://backend.example.com" connectiontimeout=5 timeout=30 This will create a worker associated with the origin server URL
ProxySet "http://backend.example.com" connectiontimeout=5 timeout=30 or alternatively using <Proxy "http://backend.example.com"> ProxySet connectiontimeout=5 timeout=30 </Proxy> Using explicitly configured workers in the forward mode is
not very common, because forward proxies usually communicate with many
different origin servers. Creating explicit workers for some of the
origin servers can still be useful if they are used very often.
Explicitly configured workers have no concept of forward or reverse
proxying by themselves. They encapsulate a common concept of
communication with origin servers. A worker created by
The URL identifying a direct worker is the URL of its origin server including any path components given: ProxyPass "/examples" "http://backend.example.com/examples" ProxyPass "/docs" "http://backend.example.com/docs" This example defines two different workers, each using a separate connection pool and configuration. Worker SharingWorker sharing happens if the worker URLs overlap, which occurs when the URL of some worker is a leading substring of the URL of another worker defined later in the configuration file. In the following example ProxyPass "/apps" "http://backend.example.com/" timeout=60 ProxyPass "/examples" "http://backend.example.com/examples" timeout=10 the second worker isn't actually created. Instead the first
worker is used. The benefit is, that there is only one connection pool,
so connections are more often reused. Note that all configuration attributes
given explicitly for the later worker will be ignored. This will be logged
as a warning. In the above example, the resulting timeout value
for the URL If you want to avoid worker sharing, sort your worker definitions
by URL length, starting with the longest worker URLs. If you want to maximize
worker sharing, use the reverse sort order. See also the related warning about
ordering Explicitly configured workers come in two flavors:
direct workers and (load) balancer workers.
They support many important configuration attributes which are
described below in the The set of options available for a direct worker
depends on the protocol which is specified in the origin server URL.
Available protocols include Balancer workers are virtual workers that use direct workers known as their members to actually handle the requests. Each balancer can have multiple members. When it handles a request, it chooses a member based on the configured load balancing algorithm. A balancer worker is created if its worker URL uses
DNS resolution for origin domainsDNS resolution happens when the socket to
the origin domain is created for the first time.
When connection reuse is enabled, each backend domain is resolved
only once per child process, and cached for all further connections
until the child is recycled. This information should to be considered
while planning DNS maintenance tasks involving backend domains.
Please also check RU EN |
![]() |