Skip to content

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

Engineering@Microsoft 5 min read Case study mediumAdept

Load testing AAD-based authentication for Azure Cache for Redis

Azure Cache for Redis load-tested its new AAD token-based authentication against access key auth to make sure token validation added no meaningful overhead on single-threaded Redis. The team moved from redis-benchmark to Azure Load Testing, using custom JMeter Java samplers, Key Vault for secrets, 6–15 engine instances with 200+ virtual users, and Azure Pipelines to automate more than 50 tests across Basic, Standard and Premium tiers. Scenarios covered invalid-token floods, re-authentication every two minutes under load, and failover via primary-node reboot. Latency and throughput were essentially identical (about 311K vs 314K ops/sec), and analysis time dropped from 8–10 hours to a couple of hours.

Related posts

  • Enhancing reliability in Microsoft Fabric and Azure Synapse through load testing

    Engineering@Microsoft mediumAdept

    Microsoft stress-tests the SQL analytics runtime shared by Fabric and Azure Synapse daily and weekly using Azure Load Testing running JMeter scripts, scaling from thousands to hundreds of thousands of concurrent queries. Test suites live in source control as jmx files parameterized by JMeter properties and ALT YAML (environment, dataset, concurrency, ramp-up, duration), with custom samplers for client telemetry and environment state. Azure Pipelines run the tests with Key Vault secrets, convert results to NUnit format, and ship client telemetry to a Synapse workspace for Power BI reporting. Each surfaced error becomes a work item, and reviewing these reports is part of release sign-off.

  • How we scaled the GitHub API with a sharded, replicated rate limiter in Redis

    GitHub Engineering mediumAdept

    GitHub replaced a Memcached-based API rate limiter, which suffered evictions and could not survive a move to per-datacenter caches, with application-sharded Redis clusters (one primary, several read replicas) and atomic Lua scripts, rolled out behind a feature flag. Two bugs followed. Deriving X-RateLimit-Reset from Redis TTL plus Ruby's clock made the header 'wobble' by a second. Lazy key expiration on replicas made reads return stale windows, so clients were rejected while seeing a full remaining quota. The fix was to store the reset-at timestamp explicitly, treat expired data as absent in application logic, keep Redis TTL only as cleanup one second later, and reuse the first read's result for response headers instead of making a second call.

  • Automating performance tests

    Supabase mediumAdept

    Supabase built its performance-testing pipeline while rewriting its WebSocket-based Realtime service, starting with manual k6 load generators on AWS VMs and adding Grafana/Prometheus to diagnose loader resource exhaustion. When load-test metric volume overwhelmed Prometheus's push endpoint, they added Telegraf as an intermediary buffer that also collects host metrics. Because k6 Cloud would have cost hundreds of thousands per year for their concurrency levels, they wrote a small Go app that runs Terraform and k6 scenarios, tears down infrastructure, tracks launch history and exposes an API for GitHub Actions. With it they have run tests of up to 1M concurrent virtual users for Supavisor and 200K for Realtime, and onboarded other services in hours to days.

  • Building an End to End load test automation system on top of Kubernetes

    Zalando Engineering mediumAdept

    Zalando'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.

  • Introducing DBArena: open, reproducible benchmarks for hosted Postgres

    Supabase mediumAdept

    DBArena publishes open, reproducible benchmarks of hosted Postgres, starting with Supabase Postgres (heap and OrioleDB), Amazon RDS and Google Cloud SQL across up to seven vCPU-matched tiers on Postgres 17 with default configs. A TPC-C-derived workload with no think time runs in cache-fit and 4x-RAM cache-exceeding scenarios, sweeping client counts to find peak throughput and reporting tpm, tpm per dollar of list price, and p95 latency as the median of three fresh-environment runs. Every result ships a result.json with exact commands and config, and open-source tools (dbarenactl, benchctl, a go-tpc fork) let anyone rerun tests. Limitations include a single workload, one region per cloud, list pricing, vCPU-based matching, and Supabase load generators not being AZ-colocated.

The quest for software engineering knowledge.

Look:
Layout: