AGENT CALL · Mokabla · get_question
request ag_f304f6666a90

Decision

Allowed   R6 · Within policy

input
{"company":"blink22","question":"database-bottlenecks"}

Result

{
  "slug": "database-bottlenecks",
  "title": "Database Bottlenecks",
  "difficulty": "medium",
  "tags": [
    "system-design",
    "technical",
    "backend"
  ],
  "is_free": true,
  "locked": false,
  "frequency": 0.333,
  "last_reported_at": "2025-04-14T13:12:32.106351Z",
  "url": "https://www.mokabla.com/en/c/blink22/database-bottlenecks",
  "agent": {
    "page": "https://www.mokabla.com/agent/en/c/blink22/database-bottlenecks",
    "question": "https://www.mokabla.com/agent/_call/get_question?company=blink22&question=database-bottlenecks"
  },
  "company": {
    "slug": "blink22",
    "name_en": "Blink22"
  },
  "body_md": "## What they ask\nAn open-ended design question in the same long technical session: \"Suppose our bottleneck is writing to the database. What do you do? And if the bottleneck is reading from it?\" There is no fixed answer; you lead and the two interviewers probe whichever direction you take.\n\n## What a strong answer covers\n**First, measure.** Slow query log, `EXPLAIN` on the top offenders, connection pool saturation, lock waits, replication lag. Say this before proposing anything.\n\n**Read bottleneck**\n- Missing or wrong indexes, N+1 queries from the ORM, selecting more columns than needed.\n- Caching at the right layer (application cache, Redis for hot keys, HTTP caching for public content) and the invalidation cost that comes with it.\n- Read replicas and routing reads to them, with the consistency caveat.\n- Denormalising or precomputing views for the heaviest reports.\n\n**Write bottleneck**\n- Batching inserts and cutting per-row round trips; fewer indexes on write-heavy tables.\n- Moving non-critical writes to a queue and processing them asynchronously.\n- Partitioning or sharding by a key that matches the access pattern, and what that breaks (cross-shard joins, transactions).\n- Vertical scaling as the boring first step, and when it stops being enough.\n\n## What they look for\n- Diagnosis before prescription, and trade-offs stated for every lever (cache staleness, replica lag, shard complexity).\n- Concrete examples from something you actually built, even if small.\n- Comfort with being pushed: \"the cache did not help, now what?\" is the normal follow-up.",
  "follow_ups_md": "- The cache hit rate is 40 percent and not improving. What next?\n- How would you migrate to a sharded schema with zero downtime?",
  "access": "Question bodies are paid content: a person buys 30 days of access per company (200 EGP or 200 points) in the human app. Agents get titles, tags and difficulty; bodies only for free questions."
}

Navigate (pre-filled links you can follow)