Skip to content

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

Replit 5 min read Case study mediumAdept

More Reliable Connections to Your Repls

Replit split reverse WebSocket proxying out of Conman, its container manager on GCE VMs, into a dedicated service called Eval that sits between clients and Conman VMs. Previously, frequent Conman rollouts could disconnect a client twice (once when the proxying VM died and again when the target VM died), complicated autoscaling, and blurred the cause of session failures. With Eval, Conman updates cause at most one disconnect, Eval drains connections with a 30h+ shutdown grace period, scales independently on active connections, and its observability pinpoints whether failures come from token validation, Controlplane lookups or the remote Conman connection.

Related posts

  • Parallel Run Pattern - A Migration Technique in Microservices Architecture

    Zalando Engineering mediumAdept

    Zalando's Returns team extracted returns logic from a legacy monolith into a new microservice using the Parallel Run pattern. After responding to the client, the monolith asynchronously POSTs the original request and its response to a /consistency-checks endpoint, which replays the request locally and compares status, headers and body, emitting matched/unmatched/failed metrics to Prometheus and Grafana. Each endpoint had its own consistency threshold, and traffic was switched one endpoint at a time via the Skipper proxy, which also made rollback a proxy config change. Tradeoffs include roughly doubled load, tricky comparisons (headers, ordering, PDFs), GDPR handling of captured data, unsuitability for non-idempotent endpoints, and significant setup and cleanup effort.

  • Welcome to the Wonderful World of Clusters

    Replit mediumAdept

    Replit split its infrastructure into multiple independent clusters (failure domains) after two load-related site-wide outages, moving paid Hacker users into their own cluster so future incidents affect only a subset of users. A cluster resolution service exposed as an external DNS server maps repls to clusters for both the web server and `.repl.co` hosting, adding no extra lookup latency. Because DNS answers are cached, users moved between clusters leave tombstones in the old cluster that transparently proxy connections to the new one until the record's TTL expires. The new cluster also became a tool for shedding load during incidents and lets Replit run Hacker repls on beefier machines.

  • Root Cause Analysis for Render's Extended Service Disruption on 3/26/24

    Render mediumAdept

    A faulty control-plane code change on March 26, 2024 restarted every customer and system workload on Render; a feature-flag bug had kept it from running in staging, and test infrastructure differed between environments. Stateless services and static sites recovered within about 15 minutes. Hundreds of thousands of services with attached disks (managed PostgreSQL, Redis, persistent disks) had to be detached and reattached across hosts at once, which hit internal and cloud-provider rate limits and delayed full recovery to 20:00 UTC. Fixes include higher rate limits, batched disk operations for roughly 10x throughput, least-privilege permissions for control-plane components, consistent test environments and faster, more accurate status-page updates.

  • Zero-Downtime Blue/Green Deployments on Render with Canary Traffic Splitting

    Render mediumAdept

    A blue/green canary pipeline for Render orchestrates six services (API, web frontend, worker, each duplicated into blue and green environments) using SuperPlane, an open-source DevOps workflow engine, with Cloudflare weighted traffic routing, Dash0 synthetic checks and PromQL error rates, and GitHub Actions smoke tests. On push to main, the workflow detects the live environment, deploys to the idle one, shifts 30% of traffic, runs verification in parallel after a configurable soak period, and either promotes to 100% or calls Render rollback APIs and restores Cloudflare weights. In testing, smoke tests passed while Dash0 caught 5xx rates above a 1% threshold and triggered automatic rollback. Remaining tradeoffs are backward-compatible schema migrations on the shared database and the cost of running duplicate services, which can be reduced by scaling the idle environment down.

  • 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.

The quest for software engineering knowledge.

Look:
Layout: