Stress Test Plan: Knowledge Commons Profiles (IDMS)
Context
knowledge-commons-profiles is a Django 5.1+ application using PostgreSQL and Redis, deployed via Docker Compose. It is the Identity Management System for the Knowledge Commons platform and uses CILogon (OAuth 2.0 / OIDC) as the upstream identity provider.
Because this is the IDMS, the OAuth 2.0 Authorization Code login flow is the primary code path under test. Bypassing authentication would defeat the purpose of the exercise. The plan is to stand up a mock OIDC provider that imitates CILogon, point the test deployment at it, and drive the full login flow from Locust at scale.
Goals
- Measure sustainable login throughput (logins/sec before callback latency degrades)
- Test spike behaviour (e.g. 5x traffic surge)
- Mixed traffic simulations (95% browse/5% login)
- Concurrent same-user logins for upsert/IntegrityError/duplicates
- Long-running soak for stability and leaks
- Identify first resource ceiling (Postgres, Redis, Gunicorn, HTTPS sockets, etc.)
Non-goals
- Testing CILogon itself
- UI/JS performance (HTTP-only)
- Benchmarking production DB (test DB only)
Deliverables
- Mock OIDC provider with the same claims as CILogon
- Automated Locust scripts for different traffic types (login, mixed, contention, soak)
- Django management command to seed and clean up loadtest identities
- Docker Compose for the test stack
- Prometheus + Grafana dashboard covering Locust, Django, Postgres, Redis, mock OIDC
Implementation Phases
- Build a mock OIDC provider based on FastAPI, auto-approve flows, and claim shape matching CILogon exactly
- Point a test deployment at the mock provider (update .envs)
- Make a Django management command to seed identities + clean up after
- Write Locust files for login flooding, mixed traffic, same-user collision, and long soaks
- Compose file for the stack
- Integrated observability
Acceptance
- End-to-end login flows are exercised via Locust
- Grafana shows live test + app + DB + Redis metrics
- Soak/throughput runs surface bottlenecks cleanly
- Seeded users and mock deployment never touch production
Stress Test Plan: Knowledge Commons Profiles (IDMS)
Context
knowledge-commons-profilesis a Django 5.1+ application using PostgreSQL and Redis, deployed via Docker Compose. It is the Identity Management System for the Knowledge Commons platform and uses CILogon (OAuth 2.0 / OIDC) as the upstream identity provider.Because this is the IDMS, the OAuth 2.0 Authorization Code login flow is the primary code path under test. Bypassing authentication would defeat the purpose of the exercise. The plan is to stand up a mock OIDC provider that imitates CILogon, point the test deployment at it, and drive the full login flow from Locust at scale.
Goals
Non-goals
Deliverables
Implementation Phases
Acceptance