Incident Library
Applied filters ComponentDatabaseFactorExcessive blast radiusOrganisationInflabClear allEvery case under the filters, with no sentence; newest first.
Suggested filters Search, and the values found in your words appear here.

Graph

  • Root cause
  • Component
  • Symptom
  • Contributing factor
  • Case

Cases1 case

1 to 1 of 1

  1. Symptoms

    During a 100% discount event that made 125 courses free, Inflearn received 5 to 20 times its normal traffic, and on four days, 3, 4, 7 and 17 January 2022, the service became unusable around 9 a.m. and 10 p.m. There were six outages in all.

    Trigger

    A 100% discount event on 125 courses, from 3 to 17 January and 18 to 24 January 2022, went viral and brought 5 to 20 times the usual traffic.

    Root cause
    Component
    Contributing factor
    Detection

    The team followed the outages through hourly transaction counts, RDS metrics, monitoring and slow query alerts.

    Remediation
    • Added an index to the interested-companies query on the course page
    • Changed how often the cache data stored in the database was reset and regenerated
    • Moved the read queries that loaded the writer DB to the reader DBs
    • Scaled the database to 8 r5.8xlarge instances, which bought only a few tens of minutes
    • Rewrote slow course queries or added indexes so they use indexes, and switched off features whose queries could not be fixed
    • Removed the large course description column from the select * course queries
    • Split the IDs of the IN clause into batches of 20 run with Promise.all
    • Upgraded PostgreSQL from 10.16 to 11.13
    • Set a 5-second query timeout
    • Raised max connections
    • Ran VACUUM by hand on the course table
    • Moved the large course description column into a separate table
    Action items
    • Change the structure in which one table's failure spreads to the whole service
    • Improve the table and cache structures that are hard to tune
    • Make the SQL code easier to follow
    • Improve code that gives no confidence to change, such as code without types or test code
    • Build a stable batch environment
    • Keep a monolith of reasonable size and separate the domains through which failures spread most
    Lessons

    Because every database bottleneck appeared as slow queries on the reader DBs, watching only the readers hid the root cause on the writer. In PostgreSQL, frequent updates to a table with large columns produce large dead tuples in bulk and slow every query on that table. Before the second event the team could not run a meaningful performance test because the first week showed that almost any page could fail under load. The event exposed high sensitivity to failure in every area, one table's failure spreading to the whole service, hard-to-tune table and cache structures, unintuitive SQL code, code without types or tests, no stable batch environment, and many hidden failure points not yet found.

Check your cluster for this

This case involves PostgreSQL vacuum and Database. kubegap audits a Kubernetes cluster for gaps like these, read-only, from Claude Code or Codex; its checks cite public reports like the ones in this library.

By root cause1