Skip to content

Commit

Permalink
Core: Finished transition period for HTTP properties (#2728)
Browse files Browse the repository at this point in the history
  • Loading branch information
VeryExtraordinaryUsername committed May 6, 2024
1 parent 7fab67c commit 00940b0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
8 changes: 4 additions & 4 deletions docs/config-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ This parameter exists to allow to change the location of the directory Vert.x wi
- `server.jks-password` - password for the keystore (if ssl is enabled).

## HTTP Server
- `http.max-headers-size` - set the maximum length of all headers, deprecated(use server.max-headers-size instead).
- `http.ssl` - enable SSL/TLS support, deprecated(use server.ssl instead).
- `http.jks-path` - path to the java keystore (if ssl is enabled), deprecated(use server.jks-path instead).
- `http.jks-password` - password for the keystore (if ssl is enabled), deprecated(use server.jks-password instead).
- `server.max-headers-size` - set the maximum length of all headers, deprecated(use server.max-headers-size instead).
- `server.ssl` - enable SSL/TLS support, deprecated(use server.ssl instead).
- `server.jks-path` - path to the java keystore (if ssl is enabled), deprecated(use server.jks-path instead).
- `server.jks-password` - password for the keystore (if ssl is enabled), deprecated(use server.jks-password instead).
- `server.http.server-instances` - how many http server instances should be created.
This parameter affects how many CPU cores will be utilized by the application. Rough assumption - one http server instance will keep 1 CPU core busy.
- `server.http.enabled` - if set to `true` enables http server
Expand Down
2 changes: 1 addition & 1 deletion docs/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Other available metrics not mentioned here can found at

where:
- `[IP]` should be equal to IP address of bound network interface on cluster node for Prebid Server (for example: `0.0.0.0`)
- `[PORT]` should be equal to `http.port` configuration property
- `[PORT]` should be equal to `server.http.port` configuration property

### HTTP client metrics
- `vertx.http.clients.connections.{min,max,mean,p95,p99}` - how long connections live
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ public class ApplicationServerConfiguration {
@ConditionalOnProperty(name = "server.http.enabled", havingValue = "true")
VerticleDefinition httpApplicationServerVerticleDefinition(
HttpServerOptions httpServerOptions,
@Value("#{'${http.port:${server.http.port}}'}") Integer port,
@Value("${server.http.port}") int port,
Router applicationServerRouter,
ExceptionHandler exceptionHandler,
@Value("#{'${vertx.http-server-instances:${server.http.server-instances}}'}") Integer instances) {
@Value("${server.http.server-instances}") int instances) {

return VerticleDefinition.ofMultiInstance(
() -> new ServerVerticle(
Expand Down Expand Up @@ -120,15 +120,14 @@ VerticleDefinition unixSocketApplicationServerVerticleDefinition(
instances);
}

// TODO: remove support for properties with http prefix after transition period
@Bean
HttpServerOptions httpServerOptions(
@Value("#{'${http.max-headers-size:${server.max-headers-size:}}'}") int maxHeaderSize,
@Value("#{'${http.max-initial-line-length:${server.max-initial-line-length:}}'}") int maxInitialLineLength,
@Value("#{'${http.ssl:${server.ssl:}}'}") boolean ssl,
@Value("#{'${http.jks-path:${server.jks-path:}}'}") String jksPath,
@Value("#{'${http.jks-password:${server.jks-password:}}'}") String jksPassword,
@Value("#{'${http.idle-timeout:${server.idle-timeout}}'}") int idleTimeout,
@Value("${server.max-headers-size}") int maxHeaderSize,
@Value("${server.max-initial-line-length}") int maxInitialLineLength,
@Value("${server.ssl}") boolean ssl,
@Value("${server.jks-path}") String jksPath,
@Value("${server.jks-password}") String jksPassword,
@Value("${server.idle-timeout}") int idleTimeout,
@Value("${server.enable-quickack:#{null}}") Optional<Boolean> enableQuickAck,
@Value("${server.enable-reuseport:#{null}}") Optional<Boolean> enableReusePort) {

Expand Down

0 comments on commit 00940b0

Please sign in to comment.