Table of Contents

Class ServerBandwidthMinuteEntity

Namespace
FishMMO.Database.Npgsql.Entities
Assembly
FishMMO-DB.dll

What one server process sent and received in one minute, as its own transport counted it. Table server_bandwidth_minute.

public class ServerBandwidthMinuteEntity
Inheritance
ServerBandwidthMinuteEntity
Inherited Members

Remarks

Written by the process it describes, once a minute, as a set. Each login, world and scene server samples its transport's cumulative counters on a 60 second timer and writes the difference since the minute began (ServerBandwidthLedger in the Unity project). The write is INSERT … ON CONFLICT DO UPDATE SET col = EXCLUDED.col, never an addition: a retry after a lost commit reply rewrites the same numbers, and a second sample that lands in the same minute rewrites the minute's running total. An additive upsert would count a retried write twice, which is the failure the idempotency work of 2026-09-25 exists to prevent.

Keyed by InstanceID as well as the server's name. A restart starts its counters from zero in a new process; the instance id keeps the two processes' rows apart, so a restart inside one minute neither overwrites the old process's last minute nor mixes the new one's first minute into it. Summing over instances is the reader's job.

Measured values only. Every counter here was counted by the process: the application bytes by the managed WebTransport socket, the UDP payload bytes and datagram counts by msquic. The bytes on the wire (payload plus 28 bytes of IPv4 and UDP header per datagram) are an estimate and are computed when read, never stored, so a change to the estimate never leaves history wrong. See ServerBandwidthMath.

No foreign key to login_servers, world_servers or scene_servers, and the name is copied as text. Those rows are deleted when a server deregisters; the bandwidth it used must outlive it, or a month's egress total would shrink every time a server was retired. Append-mostly (a minute's row is rewritten only by its own process), so there is no xmin token either, as with admin_audit_log.

Kept 14 days, then rolled into ServerBandwidthHourEntity and deleted, one whole hour at a time, by the Control Panel's rollup job.

Properties

AppRecvBytes

FishNet bytes the transport delivered, both channels. Measured.

public long AppRecvBytes { get; set; }

Property Value

long

AppSentBytes

FishNet bytes handed to the transport, both channels. Measured.

public long AppSentBytes { get; set; }

Property Value

long

BucketStart

The UTC minute this row covers, from the DATABASE clock: the minute the process's sample was taken in, read from the database and truncated before the write.

public DateTime BucketStart { get; set; }

Property Value

DateTime

Remarks

Not the process's own clock. Rows from every host are compared and summed per minute, and a host whose clock ran a minute fast would file its traffic under the wrong minute. The traffic is the interval that ENDED in this minute; IntervalMs says how long that interval was.

ConnectionsRefused

Connections refused before becoming a session in the interval: by the transport's own listener limits, by msquic under load, or for no matching ALPN.

public long ConnectionsRefused { get; set; }

Property Value

long

HandshakeFailures

Connections that started and failed their handshake in the interval.

public long HandshakeFailures { get; set; }

Property Value

long

InstanceID

A random id the process took when it started. See the remarks on the class.

public Guid InstanceID { get; set; }

Property Value

Guid

IntervalMs

How long the counted interval was, in milliseconds on the process's monotonic clock.

public long IntervalMs { get; set; }

Property Value

long

Remarks

About 60 000. More when a sample was deferred (the database was unreachable, so the counters kept accumulating and the next sample carried the whole stretch), and about double when two samples landed in one minute. A rate is always bytes / interval, never bytes / 60.

ServerKind

Which tier: 1 login, 2 world, 3 scene (ServerBandwidthKind).

public int ServerKind { get; set; }

Property Value

int

ServerName

The server's configured ServerName, copied as text. With ServerKind it identifies the server across restarts.

public string ServerName { get; set; }

Property Value

string

SessionsActive

WebTransport sessions open when the minute was sampled (a gauge, not a total); the higher reading when two samples landed in the minute.

public long SessionsActive { get; set; }

Property Value

long

SessionsOpened

Sessions accepted in the interval.

public long SessionsOpened { get; set; }

Property Value

long

UdpRecvBytes

UDP payload bytes received. Measured by msquic, process-wide.

public long UdpRecvBytes { get; set; }

Property Value

long

UdpRecvDatagrams

UDP datagrams received. Measured, exact.

public long UdpRecvDatagrams { get; set; }

Property Value

long

UdpSentBytes

UDP payload bytes sent: QUIC headers, AEAD tags, padding, ACKs, retransmissions and the handshake included. Measured by msquic, process-wide.

public long UdpSentBytes { get; set; }

Property Value

long

UdpSentDatagrams

UDP datagrams sent. Measured by msquic, which over-counts a flush sent in several batches (handshakes, bursts), so the header estimate built from it is an upper bound.

public long UdpSentDatagrams { get; set; }

Property Value

long