colossus.core

ServerSettings

case class ServerSettings(port: Int, slowStart: ConnectionLimiterConfig = ConnectionLimiterConfig.NoLimiting, maxConnections: Int = 1000, maxIdleTime: Duration = ..., lowWatermarkPercentage: Double = 0.75, highWatermarkPercentage: Double = 0.85, highWaterMaxIdleTime: FiniteDuration = ..., tcpBacklogSize: Option[Int] = scala.None, bindingRetry: RetryPolicy = ..., delegatorCreationPolicy: WaitPolicy = ..., shutdownTimeout: FiniteDuration = ...) extends Product with Serializable

Contains values for configuring how a Server operates

These are all lower-level configuration settings that are for the most part not concerned with a server's application behavior

The low/high watermark percentages are used to help mitigate connection overload. When a server hits the high watermark percentage of live connections, it will change the idle timeout from maxIdleTime to highWaterMaxIdleTime in an attempt to more aggressively close idle connections. This will continue until the percentage drops below lowWatermarkPercentage. This can be totally disabled by just setting both watermarks to 1.

port

Port on which this Server will accept connections

maxConnections

Max number of simultaneous live connections

maxIdleTime

Maximum idle time for connections when in non high water conditions

lowWatermarkPercentage

Percentage of live/max connections which represent a normal state

highWatermarkPercentage

Percentage of live/max connections which represent a high water state.

highWaterMaxIdleTime

Max idle time for connections when in high water conditions.

tcpBacklogSize

Set the max number of simultaneous connections awaiting accepting, or None for NIO default

bindingRetry

A colossus.core.RetryPolicy describing how to retry binding to the port if the first attempt fails. By default it will keep retrying forever.

delegatorCreationPolicy

A colossus.core.WaitPolicy describing how to handle delegator startup. Since a Server waits for a signal from the colossus.IOSystem that every worker has properly initialized a colossus.core.Initializer, this determines how long to wait before the initialization is considered a failure and whether to retry the initialization.

shutdownTimeout

Once a Server begins to shutdown, it will signal a request to every open connection. This determines how long it will wait for every connection to self-terminate before it forcibly closes them and completes the shutdown.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ServerSettings
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ServerSettings(port: Int, slowStart: ConnectionLimiterConfig = ConnectionLimiterConfig.NoLimiting, maxConnections: Int = 1000, maxIdleTime: Duration = ..., lowWatermarkPercentage: Double = 0.75, highWatermarkPercentage: Double = 0.85, highWaterMaxIdleTime: FiniteDuration = ..., tcpBacklogSize: Option[Int] = scala.None, bindingRetry: RetryPolicy = ..., delegatorCreationPolicy: WaitPolicy = ..., shutdownTimeout: FiniteDuration = ...)

    port

    Port on which this Server will accept connections

    maxConnections

    Max number of simultaneous live connections

    maxIdleTime

    Maximum idle time for connections when in non high water conditions

    lowWatermarkPercentage

    Percentage of live/max connections which represent a normal state

    highWatermarkPercentage

    Percentage of live/max connections which represent a high water state.

    highWaterMaxIdleTime

    Max idle time for connections when in high water conditions.

    tcpBacklogSize

    Set the max number of simultaneous connections awaiting accepting, or None for NIO default

    bindingRetry

    A colossus.core.RetryPolicy describing how to retry binding to the port if the first attempt fails. By default it will keep retrying forever.

    delegatorCreationPolicy

    A colossus.core.WaitPolicy describing how to handle delegator startup. Since a Server waits for a signal from the colossus.IOSystem that every worker has properly initialized a colossus.core.Initializer, this determines how long to wait before the initialization is considered a failure and whether to retry the initialization.

    shutdownTimeout

    Once a Server begins to shutdown, it will signal a request to every open connection. This determines how long it will wait for every connection to self-terminate before it forcibly closes them and completes the shutdown.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val bindingRetry: RetryPolicy

    A colossus.core.RetryPolicy describing how to retry binding to the port if the first attempt fails.

    A colossus.core.RetryPolicy describing how to retry binding to the port if the first attempt fails. By default it will keep retrying forever.

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val delegatorCreationPolicy: WaitPolicy

    A colossus.core.WaitPolicy describing how to handle delegator startup.

    A colossus.core.WaitPolicy describing how to handle delegator startup. Since a Server waits for a signal from the colossus.IOSystem that every worker has properly initialized a colossus.core.Initializer, this determines how long to wait before the initialization is considered a failure and whether to retry the initialization.

  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. val highWaterMaxIdleTime: FiniteDuration

    Max idle time for connections when in high water conditions.

  14. def highWatermark: Double

  15. val highWatermarkPercentage: Double

    Percentage of live/max connections which represent a high water state.

  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. def lowWatermark: Double

  18. val lowWatermarkPercentage: Double

    Percentage of live/max connections which represent a normal state

  19. val maxConnections: Int

    Max number of simultaneous live connections

  20. val maxIdleTime: Duration

    Maximum idle time for connections when in non high water conditions

  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  24. val port: Int

    Port on which this Server will accept connections

  25. val shutdownTimeout: FiniteDuration

    Once a Server begins to shutdown, it will signal a request to every open connection.

    Once a Server begins to shutdown, it will signal a request to every open connection. This determines how long it will wait for every connection to self-terminate before it forcibly closes them and completes the shutdown.

  26. val slowStart: ConnectionLimiterConfig

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. val tcpBacklogSize: Option[Int]

    Set the max number of simultaneous connections awaiting accepting, or None for NIO default

  29. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped