From d4107f8557388af17d87843c4026dca1837a9b55 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Mon, 16 Sep 2024 08:13:56 -0400 Subject: [PATCH] Update Blog --- markdown/API Caching for Minecraft Servers.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/markdown/API Caching for Minecraft Servers.md b/markdown/API Caching for Minecraft Servers.md index 299ce4f..3f9ca36 100644 --- a/markdown/API Caching for Minecraft Servers.md +++ b/markdown/API Caching for Minecraft Servers.md @@ -15,7 +15,9 @@ The data is sourced from Docker containers, local file systems, and remote authe ### Problem Statement -When you’re dealing with numerous Minecraft servers, querying real-time server data can become very expensive in terms of performance. Each query requires: +When you’re dealing with numerous Minecraft servers, querying real-time server data can become very expensive in terms of performance. + +Each query requires: - Accessing container information via Docker. - Checking server online status via network requests. @@ -28,7 +30,9 @@ This system mitigates those delays by introducing an efficient in-memory cache. ## The Caching Mechanism -The system employs a caching layer that stores various pieces of server information (MOTD, online status, etc.) in memory. This avoids repeated heavy I/O and network operations, thus drastically reducing the request time. +The system employs a caching layer that stores various pieces of server information (MOTD, online status, etc.) in memory. + +This avoids repeated heavy I/O and network operations, thus drastically reducing the request time. ### Key Components of the Cache @@ -196,7 +200,9 @@ The cache holds both the value and a timestamp, allowing future improvements lik ## Findings -By introducing an in-memory caching system, this application was able to reduce request times from over 2 minutes to just 2 milliseconds. This system efficiently caches key server data, eliminating the need to repeatedly query external services like Docker, network services, and file systems. +By introducing an in-memory caching system, this application was able to reduce request times from over 2 minutes to just 2 milliseconds. + +This system efficiently caches key server data, eliminating the need to repeatedly query external services like Docker, network services, and file systems. This approach is especially useful in applications with high I/O overhead and network latency, allowing for faster and more responsive interactions.