Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Lyft Engineering 7 min read Case study easyNovice

Productionizing Envoy Mobile at Lyft

Nearly all network requests from Lyft's iOS and Android apps now run through Envoy Mobile, replacing URLSession and OkHttp after a gradual rollout starting December 2021, and it matches or beats them on business metrics across billions of daily requests. Envoy's native stats streamed to gRPC/statsd endpoints caught at least three production incidents that existing analytics missed. On the iOS Driver app, OOM crashes dropped 69.3% and hangs 47.9%, and ANRs fell 30% on Android partner apps. Lessons include success rates varying up to 10% across carriers and libraries, and an Android connectivity bug fixed by mimicking the OS's IPv4-to-IPv6 dual-stack address mapping.

Related posts

  • Migrating Millions of Concurrent Websockets to Envoy

    Slack Engineering mediumAdept

    Slack moved its websocket ingress tier, serving millions of concurrent connections, from HAProxy to Envoy Proxy. HAProxy reloads spawned long-lived draining processes that had to be reaped and rate-limited. Envoy's dynamic clusters, hot restarts and panic routing removed that operational overhead. Envoy config was generated through custom Chef resources with --mode validate checks, and traffic shifted region by region via NS1 weighted DNS in 10–100% steps on a parallel stack, completing in six months with no customer impact. Key lessons: the organically grown HAProxy config hid behaviours services depended on, a test suite for load balancer routing would have saved effort, and limiting Chef libraries to a subset of Envoy features kept them simple but made later additions like vhosts awkward.

  • Client Tracing: Understanding Mobile and Desktop Application Performance at Scale

    Slack Engineering mediumAdept

    Slack extended its backend distributed tracing to iOS, Android and JavaScript clients so engineers could pinpoint why client actions like channel switches are slow. API calls are broken into queue, HTTP request and parse spans, with trace IDs propagated in HTTP headers to join client and server spans. SQLite access is split into wait, execute and save spans, and a general view-load trace schema covers cache-then-network screens. Slack built its own Swift/Kotlin/JS tracing API instead of OpenTracing because thread-local context breaks on highly concurrent mobile code. The API passes an explicit TraceContext, samples traces (1% of API requests), and flushes open traces when the app is backgrounded.

  • How Etsy gets its mobile apps ready for peak traffic

    Sentry mediumAdept

    Because mobile apps can't be reverted once a binary ships, Etsy treats holiday peak prep as an October decision about visibility, routing and mitigation rather than capacity. Practices include a three-phase "code slush" that culminates in senior sign-off, dual-reporting crashes to the old and new vendors (Sentry) through peak, auditing remote experiment and operational flags so crash-prone code paths can be disabled without a release, and alerting only on crash-free rate and abnormal crashes per hour. Custom tags such as last screen reconcile code-based issue grouping with screen-based team ownership, and crash triage moved from a manual rotation to an MCP-driven agent whose assignment accuracy started near 30%. The team also translates crashes into estimated lost orders so the business can weigh them.

  • Not just another network latency issue: How we unraveled a series of hidden bottlenecks

    Datadog Engineering mediumAdept

    Recurring high-startup-latency pages on every deployment of Datadog's usage estimation `counter` service traced back to four stacked bottlenecks rather than one. The fixes were raising CPU for a throttled Envoy sidecar, patching a Linux kernel bug that pinned all traffic to the first of eight AWS ENA transmit queues, and moving to network-optimized EC2 instances after bandwidth-allowance-exceeded metrics revealed hypervisor packet drops. A Kubernetes preStop hook with a maintenance-mode key then kept Envoy from routing requests to terminating remote-cache pods. With p99 latency back under 100 ms, the team scaled the remote cache down 6x, saving hundreds of thousands of dollars a year, and now alerts on ENA bandwidth and pod- and host-level network drop metrics.

  • Sentry's Flutter SDK 10.0: Streaming Traces and More Accurate Crash-Free Rates

    Sentry mediumAdept

    Sentry's Flutter SDK 10.0 switches tracing to a streaming model that sends finished spans in batches instead of waiting for the whole transaction, with `Sentry.startSpan` for custom instrumentation and an opt-out via `SentryTraceLifecycle.static`. Unhandled Flutter errors that don't kill the app no longer mark sessions as crashed (they end as `unhandled`), making crash-free rates more accurate. App startup becomes its own `app.start` root trace on Android and iOS, with an optional extension API. The release also removes the enable flags for logs and metrics, captures Dio failures that have no HTTP response, masks Flutter `SensitiveContent` in Replay, drops profiling and raises minimums to Dart 3.12 and Flutter 3.44, with sampling and filter rules needing review during upgrade.

The quest for software engineering knowledge.

Look:
Layout: