Beyond Test Cards: A Fake Payment Provider for Testing at Scale
Lyft built a Fake Payment Provider that implements the same provider interface as real processors (tokenize, authorize, increment, capture, charge, refund, void), so it can simulate partial failures, soft declines with retries, pending responses, timeouts and outages that processor test cards cannot. Each test scenario is encoded into a fake low-value token, persisted as a high-value token, and kept stable across the charge lifecycle. Scenarios are dictionaries of per-action specs with success predicates (including a 50% chaos mode), delays, network decline codes and per-attempt retry specs. Strict routing rules confine the fake to simulated users. That lets it run safely in production for load testing the full payment stack, and new scenarios can be added through an AI coding skill whose output still goes through code review.
Related posts
- 10 Tips for Building Resilient Payment Systems
Shopify Engineering mediumAdeptTen 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.
- Performance Testing At Scale—for BFCM and Beyond
Shopify Engineering mediumAdeptShopify prepares for Black Friday Cyber Monday by repeatedly running full-scale load tests against production: scaling Shopify Core and dependencies (nginx routing, ProxySQL, key/value store) to their BFCM profile, layering five Cronograma-driven traffic flows (browse/buy, admin, flash sale, Storefront API, Hydrogen/Oxygen) with an abort switch, then scaling down in reverse order and running blameless retrospectives. Full-scale testing is chosen over scaled-model testing because databases and vertically scaled components don't extrapolate and many failures, such as TCP connection-count exhaustion, appear just from running a larger fleet. Practical workarounds include partially bypassing the CDN to avoid overloading a few PoPs, cache-busting requests to avoid skewed results, and single-region failover tests to verify capacity.
- Autonomous testing of services at scale
Meta Engineering mediumAdeptMeta built an integration testing framework for back-end services that reuses production containerization and routing to spin up ephemeral test environments, with per-service boundaries where requests go to local services, in-process Python mocks, in-memory replicas, production (read-only) or are blocked. An autonomous extension mirrors a service's Twine production spec, isolates it via application-level RPC filtering plus an LD_PRELOAD layer intercepting libc connect/sendto/sendmsg, and routes unknown RPCs to a universal mock, letting one-third of services run safely with no human setup. Thrift's reflective IDL lets it auto-generate fuzz harnesses and dependency mocks, and mutating sanitized recorded production requests helps fuzzing reach deep code paths past input validation.
- Building an End to End load test automation system on top of Kubernetes
Zalando Engineering mediumAdeptZalando's payments team built an automated end-to-end load testing system in its Kubernetes test cluster. A Go service, the load-test-conductor, deploys production versions of services, scales Kubernetes and ECS to production configuration, drives distributed Locust workers, then scales down and cleans up. External dependencies are mocked with Hoverfly, chosen after comparing several tools, and Skipper header-based routing lets shared services switch to mocks for load-test traffic. A feedback algorithm adjusts Locust user count and hatch rate each minute to hit a target orders-per-minute KPI. Tests run on a CronJob or via an API call. Results are still judged manually from Grafana dashboards and SLO alerts, and keeping the test environment production-like took the most effort, including mid-test deployments and mismatched infrastructure.
- How a global fintech scaled coding agent traffic with Dedicated Model Inference
Together AI mediumAdeptA global fintech serves its internal coding-agent traffic on GLM 5.2 via Together's Dedicated Model Inference, where spiky, engineering-hours load with long prompts (ISL p50/p95 of roughly 81K/178K tokens) at low RPS made concurrency, not throughput, the design priority. The production endpoint runs 14 replicas of 4 B200s at 256K context. The team turned down a 1M-context configuration because it would have cut concurrency headroom. When a reshape toward fewer, larger replicas saturated prefill and caused 1–3 minute queuing, metrics tracing showed a request stuck behind a 2.3M-token prefill backlog. It was fixed same day, with no downtime, by restoring cache-session-aware routing and raising max-inflight-per-worker. Self-serve scaling, custom-weight rollouts and blue/green testing removed the ticket-based capacity process.