@@ -52,59 +52,3 @@ $server->addWorker(
5252
5353exit($server->run());
5454```
55-
56- ## Configuration
57-
58- ### 🔌 HttpServerPlugin
59-
60- | Option | Type | Default | Description |
61- | -------------------------| --------| ---------| ------------------------------------------------------------------------------------|
62- | ` http2Enable ` | bool | true | Optional. Enables support for HTTP/2 protocol. |
63- | ` httpConnectionTimeout ` | int | 60 | Optional. Timeout duration for idle HTTP connections. |
64- | ` httpHeaderSizeLimit ` | int | 32768 | Optional. Maximum allowed size for HTTP headers. |
65- | ` httpBodySizeLimit ` | int | 131072 | Optional. Maximum allowed size for the HTTP request body. |
66- | ` gzipMinLength ` | int | 860 | Optional. Minimum response size required to enable gzip compression. |
67- | ` gzipTypesRegex ` | string | * | Optional. Regular expression to match content types eligible for gzip compression. |
68-
69- \* ` #^(?:text/.*+|[^/]*+/xml|[^+]*\+xml|application/(?:json|(?:x-)?javascript))$#i `
70-
71- ### ⚙️ HttpServerProcess
72-
73- This worker type is designed to handle incoming HTTP requests asynchronously.
74-
75- | Option | Type | Default | Description |
76- | ------------------------| --------------------------| ----------------| --------------------------------------------------------------------------|
77- | ` listen ` | string\| Listen\| Listen[ ] | * not  ; set* | The address at which the server is listening. |
78- | ` name ` | string | "HTTP Server" | Optional. The name associated with the worker process. |
79- | ` count ` | int | 1 | Optional. The number of processes to start. |
80- | ` reloadable ` | bool | true | Optional. Whether the worker can be reloaded with the reload command. |
81- | ` user ` | string | * not  ; set* | Optional. Unix user of process. Current user by default. |
82- | ` group ` | string | * not  ; set* | Optional. Unix group of process. Current group by default. |
83- | ` onStart ` | Closure | * not  ; set* | Optional. A callback function executed when the worker starts. |
84- | ` onRequest ` | Closure | * not  ; set* | Optional. A callback function executed when an HTTP request is received. |
85- | ` onStop ` | Closure | * not  ; set* | Optional. A callback function executed when the worker stops. |
86- | ` onReload ` | Closure | * not  ; set* | Optional. A callback function executed when the worker reloads. |
87- | ` middleware ` | Middleware[ ] | * not  ; set* | Optional. A list of middlewares for processing HTTP requests. |
88- | ` reloadStrategies ` | ReloadStrategy[ ] | * not  ; set* | Optional. The strategies used to reload the worker. |
89- | ` serverDir ` | string | * not  ; set* | Optional. The directory to serve static files from. |
90- | ` accessLog ` | bool | true | Optional. Whether to log incoming HTTP requests. |
91- | ` gzip ` | bool | false | Optional. Enables gzip compression. |
92- | ` connectionLimit ` | int | * not  ; set* | Optional. The maximum number of connections per worker. |
93- | ` connectionLimitPerIp ` | int | * not  ; set* | Optional. The maximum number of connections allowed per IP. |
94- | ` concurrencyLimit ` | int | * not  ; set* | Optional. The maximum number of concurrent HTTP requests per worker. |
95-
96- ### 🔄️ EachRequestReloadStrategy
97-
98- This strategy reloads the worker after every HTTP request, making it primarily useful for debugging purposes.
99-
100- ### 🔄️ MaxRequestsReloadStrategy
101-
102- This strategy reloads the worker after handling a specified number of HTTP requests.
103-
104- | Option | Type | Default | Description |
105- | ------------------------| ------| ----------------| ---------------------------------------------------------------------------|
106- | ` maxRequests ` | int | * not  ; set* | The maximum number of requests a worker can handle before being reloaded. |
107- | ` dispersionPercentage ` | int | 0 | Optional. Variability percantage to maxRequests. * |
108-
109- \* Adds variability to the reload threshold to avoid restarting all workers simultaneously.
110- For example, with maxRequests = 1000 and dispersionPercentage = 20, workers will be reloaded after handling between 800 and 1000 requests.
0 commit comments