Why Your PUBG Headshots Don’t Kill: Fixing Database Bottlenecks with Sharding

You’re in the final circle of a PUBG match. You line up the perfect AWM headshot, pull the trigger—but the enemy survives and instantly downs you. Frustrating, right? While lag or hitbox issues might come to mind, the real culprit is often a silent backend villain: database bottlenecks.
Why Do Databases Become Bottlenecks?
Modern apps like PUBG, Stripe, or Uber handle millions of concurrent users, all generating relentless read/write requests. If the database isn’t scaled properly, it crumbles under the pressure. Here’s why:
Heavy Write Workloads:
Real-time games (PUBG, Fortnite) track player positions, health, and inventory changes constantly.
Payment systems (Stripe, Google Pay) process thousands of transactions per second.
Telematics (Uber, FedEx) update vehicle locations in real time.
When writes pile up, traditional databases (e.g., single-node SQL) slow down or time out—resulting in delayed or lost updates (like your headshot not registering).
How Sharding Saves the Day
Sharding is the process of splitting a database into smaller, independent chunks (shards), each handling a subset of the data. Think of it as dividing PUBG’s 100 players into 10 separate maps—each match runs smoothly because the load is distributed.
How It Works:
Each shard stores data for a specific shard key (e.g., player ID, geographic region).
When your game client sends a headshot update, the database uses the shard key to route the request to the correct shard—no more overwhelming a single server.
But wait: Doesn’t querying data across shards get complicated?
Yes, if you need data from multiple shards (e.g., global leaderboards), but modern tools (e.g., MongoDB’s sharded clusters, Apache Cassandra) handle cross-shard queries efficiently.
The Bigger Picture
Sharding isn’t a magic fix—it’s part of a larger strategy. For example:
Caching: Use Redis to offload frequent reads.
Read Replicas: Distribute read traffic.
Database Tuning: Optimize indexes and queries.
Conclusion
Next time your AWM shot mysteriously fails, remember: a well-sharded database ensures your bullets (and transactions, and Uber rides) process instantly. While sharding adds complexity, it’s a critical tool for scaling systems under heavy write loads. Got questions? Drop them in the comments—I’ll tackle them all!
Subscribe to my newsletter
Read articles from Dichan Shrestha directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
