惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Full Disclosure
Recorded Future
Recorded Future
T
Tenable Blog
S
Securelist
C
CERT Recently Published Vulnerability Notes
T
Threatpost
S
Schneier on Security
A
Arctic Wolf
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Register - Security
The Register - Security
Cisco Talos Blog
Cisco Talos Blog
AWS News Blog
AWS News Blog
K
Kaspersky official blog
T
True Tiger Recordings
T
Threat Research - Cisco Blogs
V
Vulnerabilities – Threatpost
P
Palo Alto Networks Blog
T
The Exploit Database - CXSecurity.com
小众软件
小众软件
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
Cyberwarzone
Cyberwarzone
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tor Project blog
Spread Privacy
Spread Privacy
Malwarebytes
Malwarebytes
P
Proofpoint News Feed
F
Fox-IT International blog
F
Fortinet All Blogs
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
量子位
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
Project Zero
Project Zero
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
I
Intezer
博客园_首页
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Darknet – Hacking Tools, Hacker News & Cyber Security

DEV Community

I Set Up CI/CD for My React App in 5 Minutes — Here's the Exact YML Config GCSI 2026: AI Readiness in a City Built in Layers Rails Realtime ERD: visualize seu schema Rails em tempo real n8n vs Zapier — Which Is Right for Production Workflows? AI Security Tools Are Drowning Open Source Maintainers — curl Is the Canary I was wondering whether we can write both the Deployment and Service manifest in the same file? but your explaination made it clearer GitHub Copilot Has a New App. Here's What Changed for My Daily Workflow. 5 gotchas I hit moving LLM logs from Postgres to ClickHouse AWS Database Savings Plans: What DB Teams Need to Know Self-Expiring Report-Only CI Gates: From Advisory to Enforced How I Run Two Claude Accounts as One Cadence v8.4: a multi-model coding harness where Claude writes, Codex reviews, and Bugbot triages How to Pass the Google Play 12-Tester Rule Without Losing Your Sanity What happens when an AI agent commits to your repo The Degradation Ladder: How Systems Fail Before They Fail Deploy Ping Identity Products on Kubernetes with a Single Operator Flutter Deep Linking: Complete Guide for Android App Links & iOS Universal Links I Read Anthropic's 2026 Agentic Coding Trends Report. Here's What It Actually Means for Engineering Teams. Migrate from Crunchy Data PostgreSQL Operator to Percona PostgreSQL Operator: The Standby Cluster Method Less Than a Penny Per Document How to Build Your First REST API in Node.js ? MCP Isn't a Model Feature. It's a Power Outlet for Your Tools. Testing JavaScript: A Practical Guide to TDD with Jest (2026) When Your Search Tree Becomes the Bottleneck in a Distributed Game Server GitHub Code Coverage in Pull Requests: What Developers Should Set Up Now Vibe Coding vs. Real Coding: Why Both Are Wrong (and Right) Why I’m Building a Privacy-First SOW Analyzer to Kill Scope Creep (Launching Next Month) FHIR in Indian Healthcare IT: What Every Developer Building HMIS Software Needs to Know Data Normalization Across Dublin Rental Portals: How to Make Listings Comparable Building a Rental Aggregator When Daft.ie Already Exists Finishing Hakozuna HZ5: From Experimental Allocator to DOI-Archived Artifact Building search features for users in different timezones. The remote renter problem. State management for real-world workflows: tracking apartment viewings and applications How I built automated reminders into a Slack approval tool with zero coding experience Identity Verification Just Became Infrastructure — And Your Evidence Better Survive It The Production Deployment Checklist Senior Devs Never Skip (2026) Stop relying on Cursor AI. You are destroying your engineering brain Building an Automated Invoice Processing Pipeline with Node.js Built and launched WebDoctor AI 🌐🧠 AI Citation Registry: Decentralized Coordination in Government AI Attribution How to Fix CSV Encoding Issues (UTF-8, Windows-1252, and More) Building the private markets data infra for AI agents Why Your Resume Keeps Getting Rejected by ATS Systems (Even When You’re Qualified) Building an Offline-First Architecture for 40,000+ Concurrent RFID Scans I Built a Tiny Chrome Extension to Save My Mouse Wheel (Auto Scroll) # I Got Burned by Socket Chaos. Here's How I Finally Built Real-Time Calls That Actually Work. How to Cut Your CSS File Size by 40% Without Losing Any Styles Building a Zero-Friction Browser Screen Recorder (Just Press Alt + R) AI Wrappers Are Dying: Why Most AI Products Fail The Operators Regret: How We Blew Up the Event Bus at 3 AM 'Verified' mudou de significado: o que agentic engineering exige de times de desenvolvimento A Flask Vulnerability Walkthrough How DeepMind AlphaProof Nexus Cracks 56-Year-Old Math: Agentic LLM Loops and Lean Formal Verification Why your AI shouldn't decide alone: the 3-options pattern Pourquoi votre IA ne devrait pas trancher seule un audit ou une permission One year of self-hosted n8n on a $6 Hetzner VPS Adding comments to a static Astro blog with Netlify Forms I Built 30+ Free Online Tools With Zero Signup, Zero Tracking, and Instant Access We just launched on the Shopify App Store - here's the architecture behind what we built How to Delete a Cloudflare Access Application (Without Guesswork) Why Backend Secrets Leak More Often Than Developers Think: A Deep Dive into Runtime Security with XyPriss I built an MCP server for DNS + email security — 37 tools for Claude Code, Cursor, Windsurf CI/CD avec GitHub Actions I Used Amazon Bedrock as My AI Coding Partner for a Day Here's What Happened From Vibe Coding to Verified Engineering Building a ESP32-CAM Helmet Detection System Using and CircuitDigest Cloud Vitalii Kiro: The Drone War Is Over. The War of Algorithms Begins App Development Costs in India (2026): A No-Fluff Technical Breakdown How to Automate File Renaming with AI and OCR Why green CI doesn't mean your system works Capacity Governance in Microsoft Fabric: The Layer Most Teams Forget AI Observability: Stop Flying Blind in Production I love MJML — I just didn't want a whole templating engine for two tiny things Are we still in the Console Era of AI? Building a Senior-Level DevOps / SRE / Infrastructure Engineer Terminal Setup (macOS) Media Queries, Transitions, Positions, and Units (rem vs em) Explained Vibe Coding Will Destroy Your Software Engineering Career Your Payment API Wasn't Built for AI Agents. Open Banking Might Be the Fix. The Amazon Interview Process in 2026: Every Round Decoded (With Copy-Paste Scripts) Why Most Social Platforms Optimize Engagement Instead of Emotional Safety How to Build Your Own AI API Gateway (70x Cheaper Than GPT-4o) OpenBrief Review: Local-First Video AI Summarizer 2026 Announcing LightningChart JS Trader v.4.1 TensorCircuit-NG: Quantum Software On AI, For AI, With AI Open-Source Multi-Agent Orchestration: Lessons from AgentForge AI Agents in Practice — Part 3: How the Control Loop Actually Works Polymarket vs Kalshi: Who Actually Wins on Volume and Liquidity I Wired 8 MCP Servers Into One Claude Agent. 3 Pairs Quietly Fought Over the Same Tool Name. Twenty Minutes, Seventeen Organizations DNSControl + CoreDNS Container Example - Announcement Tech Talks Weekly #106 Umka Parental Control CI/CD for Side Projects: 3 Pragmatic Design Choices Why Agentic AI Is the Most Over-Hyped — and Under-Delivering — Trend of 2026 How teams can add a custom LineageLens adapter — a practical, code-free guide What Engineers Learn After Building Enterprise Chatbots That Actually Go Live The case for compiled, typed CSS (blame AI) Your Terraform estate documents itself now: meet iac-cartographer Vector‑native RAG on Oracle: embeddings, HNSW/IVF, and hybrid search under database governance I Stumbled Into a 40x Cost Reduction by Switching to Chinese AI Models
The Moment the JSON Config Parser Became the Enemy
pretty ncube · 2026-05-27 · via DEV Community

The Problem We Were Actually Solving

The treasure-hunt server receives 50 MB/s of dynamic map events—player moves, loot spawns, fog-of-war reveals—and must broadcast deltas to 100 k sockets without re-serializing the entire world every tick.
The public docs show a simple YAML snippet under config.yaml:

world:
 width: 1024
 height: 1024
 chunk_size: 32

Enter fullscreen mode Exit fullscreen mode

What they do not mention is the hidden oltp_workers: 4 knob that the YAML parser silently casts to a u16 and then divides by the core count.
Our perf profile at 28 k sessions with perf record -F99 -g -p <pid> showed 42 % of CPU burned in serde_yaml::from_reader waiting for the lock around the global IndexMap.
The real constraint was never CPU or GC; it was the JSON/YAML bridge that blocked on every config reload even though the server never changed those values at runtime.

What We Tried First (And Why It Failed)

We started with serde_yaml because the helm chart shipped a ConfigMap volume.
After profiling with flamegraph-rs we saw 1.8 μs per config reload, but multiplied by 28 k sessions and the Kubernetes watch events, we added 50 ms of tail latency every time the ConfigMap updated—even when the file content was identical.
The stack trace was:

serde_yaml::indexmap::IndexMap<K,V>::entry
└── _raw_vec::RawVec<T,A>::reserve

Enter fullscreen mode Exit fullscreen mode

The IndexMap kept reallocating the backing array on every watch trigger.
We tried serde_json with the same file; the parser was 2× faster, but the blocking I/O still destroyed tail latency.
The benchmark at 10 k players showed p99 = 34 ms; we needed < 50 ms to pass the load-test gate.

The Architecture Decision

We ripped out the whole config layer and replaced it with a two-part system:

  1. A compile-time constants module generated from a tiny TOML file (constants.toml) with build.rs.
  2. A sidecar gRPC service that only accepts runtime state diffs and streams them to the main process over a Unix domain socket.

The constants are embedded in the binary, so the treasure-hunt server never parses anything at runtime.
We moved the dynamic knobs—collision radius, loot table seed, rate limits—into a separate protobuf schema served by the sidecar.
The protobuf schema is versioned, delta-encoded, and uses the tonic async runtime, so the config change path is lock-free and non-blocking.
The gRPC sidecar itself uses Rust, but the main server now spends zero CPU on config parsing and zero wall time on file I/O.

What The Numbers Said After

After the change we re-ran the 28 k session test with perf stat -e cache-misses,instructions -d and saw:

Before:
 42.1 % cache misses
 1.3 s p99 /w config updates
 2 RTS (runtime scaling stalls)
After:
 11.8 % cache misses
 29 ms p99
 8 RTS (no stalls)

Enter fullscreen mode Exit fullscreen mode

Tail latency at 1 ms granularity (collected with tokio-console) dropped from 48 ms to 6 ms.
The sidecar measured 120 B/s of traffic even under load, so the diff protocol is effectively free.
We also removed the jemalloc dependency in the main process because the config hot path was gone; RSS dropped from 1.4 GB to 920 MB.

What I Would Do Differently

We should have asked on day one: Which subsystems are actually dynamic?
The docs hint at a combined.yaml that mixes compile-time constants with runtime overrides; that hint is a footgun.
Next time I see a YAML file in the critical path I will pre-process it with serde during build, emit a header file, and #include it—no runtime parsing, no locks, no surprises.
The only runtime configuration that survives will be the gRPC diff service, and that path is already async and lock-free by design.

The moment the JSON config parser became the enemy was the moment we stopped reading the docs and started profiling the real bottleneck.


Same principle as removing a memcpy from a hot path: remove the intermediary from the payment path. This is how: https://payhip.com/ref/dev2