Package-level declarations

Types

Link copied to clipboard
class HttpClusterChannel(client: HttpClient = InternalHttp.client(), clock: () -> Long = System::currentTimeMillis, connectTimeout: Duration = DEFAULT_CONNECT_TIMEOUT, service: String? = null, streams: Int = DEFAULT_STREAMS, val answerGrace: Duration = InternalHttp.ANSWER_GRACE) : ClusterChannel

The ClusterChannel over HTTP: a forward is a POST of its JSON to InternalHttp.FORWARD_PATH on the peer's internal port, through the JDK client (HTTP/2 over h2c).

Link copied to clipboard
class HttpSignalSender(client: HttpClient = InternalHttp.client(), queueCapacity: Int = DEFAULT_QUEUE_CAPACITY, concurrency: Int = DEFAULT_CONCURRENCY, idleTimeout: Duration = DEFAULT_IDLE_TIMEOUT, service: String? = null, maxBatch: Int = DEFAULT_MAX_BATCH, observer: Observer = Observer.NONE, clock: () -> Long = System::currentTimeMillis, retryBackoff: Duration = DEFAULT_RETRY_BACKOFF, maxAttempts: Int = DEFAULT_MAX_ATTEMPTS) : SignalSender, AutoCloseable

Sends wait signals to the internal signal entry (InternalHttp.SIGNALS_PATH) of the node a wait started on, at its Origin.address: the remote of a me.ahoo.wow.runtime.wait.LocalSignalSender. A signal is written by ClusterCodec, as every message between the nodes of a service.

Link copied to clipboard

The internal port: the cluster channel and the wait signal entry of a node, served apart from its public port, over HTTP/1.1 and h2c. A node names its service on each request (Wow-Service); the port is reachable by the platform's own pods alone, a NetworkPolicy's boundary, not a token's.

Link copied to clipboard

The internal port of the node: a Reactor Netty server of its own, apart from the public WebFlux server, serving its routes (the cluster channel, the wait signals, the services' calls and peer reads) over HTTP/1.1 and h2c. Its codecs take messages of up to InternalPortSettings.maxMessageSize bytes, which a host derives from the public port's codec limit (InternalHttp.messageLimit), and the server takes an upgrade request of up to that size too, as the JDK client reaches HTTP/2 by upgrading the first request of a connection. It takes InternalHttp.MAX_CONCURRENT_STREAMS streams on a connection at a time, the limit the node's senders keep within. It keeps Netty's guard against rapid resets: a connection on which it reads more than 200 RST_STREAM frames in 30 seconds is closed.

Link copied to clipboard
class InternalPortSettings(val port: Int, val bindHost: String, val maxMessageSize: Int = InternalHttp.MAX_UPGRADE_BODY)

What an InternalPort is built of: the port it binds (0 for one the system chooses) on bindHost, and the maxMessageSize of its codecs.

Link copied to clipboard

A node's standby, as its operator routes see it.

Functions

Link copied to clipboard
fun internalRoutes(forward: ClusterChannelHandler, signals: (WaitSignal) -> Unit, scope: CoroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.Default), service: String? = null, standby: StandbyControl? = null): RouterFunction<ServerResponse>

The routes of the internal port:

fun internalRoutes(forward: ClusterChannelHandler, registry: WaitRegistry, scope: CoroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.Default), service: String? = null, standby: StandbyControl? = null): RouterFunction<ServerResponse>

The routes of the internal port, its signals taken by registry, the waits started on this node.