How we improved availability through iterative simplification
GitHub cut timeouts in its Rails monolith with small, measured changes found through Datadog metrics, Splunk logs and custom MySQL slow-query monitors. Each change was validated with Scientist experiments or rolled out gradually behind Flipper feature flags. Reordering a Command Palette query to look up a user's contributions before filtering by org removed a large IN clause and was 80-90% faster, and batching access checks added another 20-80% and 30-40%. Skipping unneeded authorization filters on a busy redirect endpoint cut tail latency and timeouts. Not every idea paid off: moving sorting into the application was 40-80% slower, so that experiment was dropped.
Related posts
- Building PlanetScale with Insights Agent
PlanetScale mediumAdeptPlanetScale ran its Insights Agent, which finds costly queries via Query Insights and opens fix PRs, against its own Rails API on MySQL. Reordering a Flipper feature-flag check cut 28.7M daily lookups to 8.3M, saving about 6.5 hours of database time per day. An agent-added index made a billing query slower because a normalized IN list hid 645 values and most calls returned zero rows. Filtering in Ruby instead cut database time about 14x, and the agent now checks rows read/returned per call and SQL size. A composite index on (ready, failed_at, created_at) brought a reconciliation job's queries from seconds to milliseconds.
- How we tripled max concurrent jobs to boost performance of GitHub Actions
GitHub Engineering mediumAdeptGitHub Actions on GitHub Enterprise Server went from 2,200 to 7,000 max concurrent jobs on 96-core machines between GHES 3.2 and 3.6 through three main fixes. A hot path for workflow secrets and callback URLs had silently never used its cache, which only showed up in profile traces. Orchestration state moved from a single growing blob column to a per-event table with incremental reads and writes, cutting orchestration CPU by about 50%. Postback load to the Rails checks service was reduced by deferring step updates until run completion and removing duplicate completion events, with a message queue planned to replace the multi-hop HTTP delivery.
- Improving Git push times through faster server side hooks
GitHub Engineering mediumAdeptGitHub cut pre-receive hook execution time on every Git push from about 880ms median to 10ms, dropping P99 by 95%, by rewriting the hooks from Ruby into its Go Git service. The Ruby hooks ran as subprocesses under Git and loaded the Rails monolith's 450+ gems on every push, twice per push (quarantine and post-receive), so an empty push could take over two seconds. Pruning outlier dependencies found with a debugger and strace saved 350-400ms, but load time would creep back as the monolith grew. The rewrite instead passes the needed configuration through an existing per-push data mechanism and rolled out behind a feature flag.
- Infrastructure Observability for Changing the Spend Curve
Slack Engineering mediumAdeptSlack bent the growth curve of its webapp CI spend, which had been rising about 10% month over month, by using observability (dashboards, metrics and tracing) to drive three changes. Adaptive capacity standardized instance types and oversubscribed executors per instance after profiling vCPU and executor-count combinations, cutting costs about 70% and error rates about 50% while targeting 50% busy executors at peak. Circuit breakers in the Checkpoint orchestrator defer or cancel CI work when downstream services such as Jenkins, Vitess, Flannel or Search degrade, which stops cascading failures. Tracing the Cypress test runtime exposed runtime variables tied to flakiness, which had been burning roughly 90k compute hours a week.
- How we systematically improved our reliability
Neon mediumAdept
After two control-plane incidents in one week, each triggered by an external dependency failure that turned into a self-reinforcing loop, Neon rebuilt how it runs reliability for Lakebase Postgres across 70+ cells on three clouds. Postmortems now start with quantified impact, track detection and mitigation times, and use branching 5 Whys trees that end in specific, closable action items. The fixes, more than 30 over three months, covered query-plan regressions and long-running transactions in the control-plane Postgres, inherited TCP timeout and connection-pool defaults, and broken backpressure and fairness under load. To catch failures before they reach customers, each change now gets a risk score (probability × impact) that sets how many checks it must pass across design, build, release and operate, including premortems, rollback tests, staged rollouts and on-call drills.