Skip to content

Commit 1e5fb82

Browse files
munendrasndecebals
authored andcommitted
feat(server): add server settings section (#74)
1 parent c74c58e commit 1e5fb82

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

_posts/2015-03-17-server.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,3 +253,46 @@ public class JettyServer extends AbstractWebServer<JettySettings> {
253253

254254
A more complex demo project that shows you how to integrate [Jersey](https://jersey.java.net) is available in [pippo-demo-jersey]({{ site.demourl }}/pippo-demo-jersey) project.
255255
This demo is the code source of the article `Pippo and Jersey (JAX-RS): A Match Made in Heaven` that is availables on [DZone](https://dzone.com/articles/pippo-and-jersey-jax-rs).
256+
257+
### Server Settings
258+
259+
Different Server settings can be added via `application.properties`. Below are the settings that are supported:
260+
261+
#### Jetty
262+
263+
Currently, `jetty.maxThreads`, `jetty.minThreads` and `jetty.idleTimeout` can be passed in `application.properties`.
264+
* `jetty.maxThreads` - maximum number of threads to be allocated with default value `200`
265+
* `jetty.minThreads` - minimum number of threads to be allocated with default value `8`
266+
* `jetty.idleTimeout` - idle timeout for each thread before it is stopped with default value `30000`
267+
268+
> Note: Only when valid maxThreads is passed then, minThreads and idleTimeouts are consumed. In other cases, default values are used
269+
270+
For Detailed description about these settings, please refer [here](http://eclipse.org/jetty)
271+
272+
#### Undertow
273+
274+
Currently, Pippo supports all `UndertowOptions`. UndertowOptions can be categorized into 3 subcategories.
275+
* Server Options - All the server options specified must start with `undertow.server.`
276+
* Worker Options - All the worker options specified must start with `undertow.worker.`
277+
* Socket Options - All the worker options specified must start with `undertow.socket.`
278+
279+
Along with these configurations, all other supported settings are mentioned below:
280+
* `undetow.ioThreads` - Number of IO threads that needs to be allocated
281+
* `undertow.workerThreads` - Number of worker threads that needs to be allocated
282+
* `undertow.bufferSize`, `undertow.buffersPerRegion` and `undertow.directBuffers` are the other supported settings.
283+
284+
For Detailed description about these settings, please refer [here](http://undertow.io)
285+
286+
Sample properties file with undertow settings
287+
```properties
288+
undertow.ioThreads=8
289+
undertow.workerThreads=64
290+
291+
undertow.server.NO_REQUEST_TIMEOUT=20000
292+
undertow.socket.TCP_NODELAY=true
293+
```
294+
295+
#### Tomcat
296+
297+
Currently, `tomcat.clientAuth`, `tomcat.maxConnections`, `tomcat.baseFolder`, `tomcat.keyAlias` and `tomcat.keyType` can be passed in `application.properties`
298+
For Detailed description about these settings, please refer [here](http://tomcat.apache.org)

0 commit comments

Comments
 (0)