---
title: "Load testing AAD-based authentication for Azure Cache for Redis"
description: "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."
url: "https://swe.quest/articles/load-testing-aad-based-authentication-for-azure-cache-for-redis-68079ecece30ad52"
canonical: "https://devblogs.microsoft.com/engineering-at-microsoft/load-testing-auth-for-azure-cache-for-redis/"
source: "Engineering@Microsoft"
published: "2023-07-31"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["performance","identity-auth","caching","testing","cloud"]
---

# Load testing AAD-based authentication for Azure Cache for Redis

A post on [Engineering@Microsoft](https://swe.quest/sources/ms-engineering.md), published 2023-07-31, 5 min read, Case study. Original: [https://devblogs.microsoft.com/engineering-at-microsoft/load-testing-auth-for-azure-cache-for-redis/](https://devblogs.microsoft.com/engineering-at-microsoft/load-testing-auth-for-azure-cache-for-redis/)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Caching](https://swe.quest/tags/caching.md) (Backend & APIs)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)

## Prerequisites

- Redis basics ([easy posts on Caching](https://swe.quest/tags/caching.md?difficulty=easy))
- load testing concepts ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))

## Keywords

Azure Cache for Redis, Azure Active Directory, Azure Load Testing, Apache JMeter, Azure Key Vault, Azure Pipelines, Redis ACL

## Related posts

- [Enhancing reliability in Microsoft Fabric and Azure Synapse through load testing](https://swe.quest/articles/enhancing-reliability-in-microsoft-fabric-and-azure-synapse-through-load-testing-5fda14e32b530900.md): Engineering@Microsoft · 2024-03-04 · Medium · 6 min read · Testing, Performance engineering, CI/CD, Cloud platforms, Analytics & OLAP
  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.
- [How we scaled the GitHub API with a sharded, replicated rate limiter in Redis](https://swe.quest/articles/how-we-scaled-the-github-api-with-a-sharded-replicated-rate-limiter-in-redis-c2f9366d9d874889.md): GitHub Engineering · 2021-04-05 · Medium · 9 min read · Caching, Replication, API design, Scaling, Ruby
  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.
- [Automating performance tests](https://swe.quest/articles/automating-performance-tests-3c422bee8eb7f6b1.md): Supabase · 2024-02-21 · Medium · 7 min read · Testing, Performance engineering, Observability, Infrastructure as code, CI/CD
  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.
- [Building an End to End load test automation system on top of Kubernetes](https://swe.quest/articles/building-an-end-to-end-load-test-automation-system-on-top-of-kubernetes-7beb3707dbd053ca.md): Zalando Engineering · 2021-03-01 · Medium · 9 min read · Testing, Performance engineering, Kubernetes, Payments & fintech, Capacity planning
  Zalando's payments team built an automated end-to-end load testing system in its Kubernetes test cluster.
- [Introducing DBArena: open, reproducible benchmarks for hosted Postgres](https://swe.quest/articles/introducing-dbarena-open-reproducible-benchmarks-for-hosted-postgres-fcea976f1f3d4cee.md): Supabase · 2026-10-30 · Medium · 4 min read · PostgreSQL, Performance engineering, Cloud platforms, Cost optimization
  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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
