ConnectionVolumeState indicates whether or not if the Server is operating with a normal workload, which is represented by the current ratio of used / available connections being beneath the ServerSettings.highWatermarkPercentage amount.
An Initializer
is used to perform any setup/coordination logic for a
Server
inside a Worker
.
An Initializer
is used to perform any setup/coordination logic for a
Server
inside a Worker
. Initializers are also used to provide new
connections from the server with connection handlers. An initializer is
created per worker, so all actions on a single Initializer are
single-threaded. See Server
to see how Initializer
is
used when starting servers.
Configuration used to specify a Server's application-level behavior
Configuration used to specify a Server's application-level behavior
As opposed to ServerSettings which contains just lower-level config, ServiceConfig contains higher-level settings. Ideally, abstraction layers on top of the core layer should provide an API that allows users to create a specialized server, where the delegator factory is provided by the API and the name and settings by the user.
Name of the Server, all reported metrics are prefixed using this name
Factory to generate colossus.core.server.Initializers for each Worker
lower-level server configuration settings
Represents the current state of a Server.
Represents the current state of a Server.
Represents if the a Server's connections are normal or in highwater
Represents the Server's current status
Represents the startup status of the server.
Represents the startup status of the server.
Initializing
: The server was just started and is registering with the IOSystemBinding
: The server is registered and in the process of binding to its portBound
: The server is actively listening on the port and accepting connectionsShuttingDown
: The server is shutting down. It is no longer accepting new connections and waiting for existing connections to closeDead
: The server is fully shutdownThe entry point for starting a Server
ConnectionVolumeState indicates whether or not if the Server is operating with a normal workload, which is represented by the current ratio of used / available connections being beneath the ServerSettings.highWatermarkPercentage amount. Once this ratio is breached, the state will be changed to the HighWater state.
In this state, the server will more aggressively timeout and close idle connections. Effectively what this means is that when the Server polls its connections in the Highwater state, any connection that is seen as idle for longer than ServerSettings.highWaterMaxIdleTime will be reaped. It does this in an effort to free up space.
The Server will return back to its normal state when the connection ratio recedes past the lowWater mark.