The core promise of a ban network is that enforcement is real time - when a ban happens on one server, other servers know about it fast enough to act before the player causes trouble elsewhere. Getting that right requires careful design in the sync mechanism. Here's how Warden Guard handles it.
Two Sync Modes
The plugin uses two complementary sync mechanisms. On server startup, it performs a full sync: it pulls the complete list of active bans from the API and loads them into memory. This startup sync handles the case where the server was offline when bans were added.
For ongoing enforcement, the plugin checks the API on every player join event. When a player tries to connect, the plugin queries the API with the player's UUID and gets back any active bans above the configured threshold. This check is fast - typically under 20ms with caching - and happens before the player's login sequence completes.
The Caching Layer
A naive implementation would hit the database on every player join, which doesn't scale. Warden Guard uses Redis for two caching layers. Individual player ban lookups are cached after the first query - if a player has been on the server recently, their ban status comes from cache rather than a database query. The full ban list sync result is also cached, with a short TTL, so multiple servers pulling the same data don't all hit the database simultaneously.
What Happens When a New Ban Is Added
When a ban is approved and goes active, the cache is invalidated for that player's UUID. The next time any server queries that UUID - whether it's a join attempt or a periodic check - they get fresh data. There's no push notification to servers; they pull on demand. This pull-based model keeps the system simple and avoids the complexity of maintaining persistent connections to every plugin instance.
Discord Notifications for New Bans
When a ban becomes active, Warden Guard can fire a Discord webhook to your configured ban feed channel. The message includes the player's username, ban level, reason, and a link to their profile on wardenguard.com. Your team sees new bans in near-real time without having to watch the site.
API Rate Limits
The plugin's API communication is rate-limited to prevent abuse. The join check endpoint allows 60 requests per 10 seconds per API key, which handles up to roughly 6 player joins per second. The ban sync endpoint is limited to 2 requests per minute. Your usage stats on wardenguard.com show whether your server is approaching those limits.