Skip to content

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

Wise Engineering 7 min read Case study mediumAdept

From Onboarding to Production: How I Built Dynamic Vendor Switching at Wise

Wise built a system that automatically reroutes EUR bank pay-ins to an alternative vendor, per bank, when the primary vendor fails or degrades. It combines two signals: vendor-declared status (webhooks and a polled health API) and per vendor×bank conversion rates tracked in a Redis sorted-set rolling window against per-bank baselines, with a minimum sample size and fail-safe defaults. The health check runs on every payment, only switches to explicitly mapped equivalents for the same bank, and recovers naturally as the primary's window empties. The key lessons are to validate in shadow mode first, make every decision observable and runtime-tunable, collect baseline data early, and treat bank mapping as a hard problem.

Assumes: payment processing basicsRedis sorted setsfeature flags

Related posts

  • Measuring meaningful availability / uptime of Wise

    Wise Engineering mediumAdept

    Wise now reports business-flow uptime from real user traffic instead of synthetic black-box tests. The synthetic tests did not scale across many flows, broke when APIs changed, and needed KYC/AML exemptions that skipped checks real users go through. Per-endpoint downtime is approximated by treating traffic as constant within 1-minute windows, using availability as that window's uptime, then summing the windows. Flow downtime is bounded between the sum of operation downtimes (worst case) and the maximum single-operation downtime (best case), and Wise reports the midpoint with a confidence band, e.g. 99.931% ±0.027% for 2024 Q2. Averaging operation uptimes, as Revolut does, is rejected as too kind to the business.

  • 10 Tips for Building Resilient Payment Systems

    Shopify Engineering mediumAdept

    Ten lessons from Shopify's payment infrastructure for keeping payment systems reliable at scale. Start with low timeouts everywhere: about 1s to open a connection and 5s to read, write or query. Use circuit breakers via Semian, keyed per merchant country so one local acquirer outage stays isolated, and reason about capacity with Little's Law. Track the four golden signals, use structured logs with correlation IDs, and make retries safe with idempotency keys. ULID keys cut INSERT time by 50% versus UUIDv4. The rest covers reconciliation anomalies, load testing against a simulated benchmark gateway, checkout throttling, and incident management and retrospectives.

  • How a shared merchant data service can degrade gracefully

    Grab Engineering mediumAdept

    Grab's merchant data service suffered a cascading failure when cache read timeouts fell back to the database, retries piled on, and availability collapsed. The redesign rests on one rule: a fallback is only safe if its work is bounded. Requests get a priority class derived from authentication. A weighted, cross-instance token budget sits in front of the database on the fallback path, and deferrable traffic is rejected outright on cache errors. Per-class connection pools and circuit breakers act as bulkheads, scoped runtime throttles give responders control without deploys, and an opt-in SDK cache serves stale values within explicit freshness windows.

  • Designing a planned switchover for minimum disruption

    PlanetScale hardMaster

    Neki performs planned Postgres primary switchovers without stopping the old primary. Routers buffer primary-bound queries, the primary is set read-only by default, and every replica except the target is disconnected so its receive_lsn fixes a final WAL position the target must replay through. Preflight checks cover shard state, failover slots and capacity settings such as max_connections, and post-convergence checks cover slots and having at least one synchronous standby attached. If any check fails before promotion, a config reload makes the old primary writable again for a fast rollback. With ANY 1 synchronous replication and synchronous_commit=on, every acknowledged commit is present on the target when it is promoted.

  • Risk-driven backbone management during COVID-19 and beyond

    Meta Engineering hardMaster

    Facebook's global backbone withstood the COVID-19 traffic surge by computing risk metrics (demand loss, availability, latency stretch) over enumerated failure scenarios. Component failure likelihood and duration come from MTBF/MTTR estimates built with clustering and Bayesian regression on features like vendor and region. A sharded simulation runs the production SD-WAN controller code per failure scenario. The resulting metrics pointed to at-risk regions, which drove proactive capacity deployment and downgrading latency-insensitive traffic from QoS class 3 to class 4, so the same SLOs could be met with less capacity.

The quest for software engineering knowledge.

Look:
Layout: