All Questions
Sharding hard

When using 'App-Level Sharding' (where the app handles all routing) instead of a 'Proxy-based' approach, what is the 'Connection Explosion' problem?

  1. A The database engine will run out of memory due to the massive number of active SQL queries being executed simultaneously.
  2. B Each application instance must maintain a persistent TCP connection pool to *every single database shard* (N Apps * M Shards), which can overwhelm the database's available file descriptors.
  3. C The application will generate so much random network traffic that the datacenter switches will begin dropping packets.
  4. D Every database write will be duplicated to every single shard, leading to a exponential increase in storage costs.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions