Skip to content

Commit 8078209

Browse files
committed
docs: append login endpoint performance tests
1 parent 4462a1f commit 8078209

2 files changed

Lines changed: 56 additions & 2 deletions

File tree

docs/governance/testing-es/performance-testing-results.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,34 @@ Running 10s test @ http://localhost:5293/health
2323
721k requests in 10.02s, 319 MB read
2424
```
2525

26-
## 3. Análisis
26+
## 3. Pruebas Explícitas de Autenticación (Endpoint `/login`)
27+
Con el propósito de estresar el proceso de autenticación y la generación del **Grafo de Autorización** (el cual implica la consulta más pesada de reconstrucción de permisos), se ejecutó una carga controlada de 10 conexiones concurrentes durante 10 segundos apuntando directamente al endpoint POST `/api/v1/auth/login`. Se evaluaron tanto un inquilino de autenticación interna como uno con configuración externa simulada en entorno de desarrollo.
28+
29+
### 3.1. Inquilino Interno (`RANSA_PERU` - BCrypt Local)
30+
```text
31+
Running 10s test @ http://localhost:5293/api/v1/auth/login
32+
10 connections
33+
┌─────────┬────────┬────────┬────────┬────────┬───────────┬──────────┬────────┐
34+
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
35+
├─────────┼────────┼────────┼────────┼────────┼───────────┼──────────┼────────┤
36+
│ Latency │ 232 ms │ 244 ms │ 485 ms │ 486 ms │ 257.19 ms │ 46.87 ms │ 486 ms │
37+
└─────────┴────────┴────────┴────────┴────────┴───────────┴──────────┴────────┘
38+
393 requests in 10.02s, 5.82 MB read (Avg: ~38 req/sec)
39+
```
40+
41+
### 3.2. Inquilino Externo (`NEPTUNIA` - Federated/Okta)
42+
```text
43+
Running 10s test @ http://localhost:5293/api/v1/auth/login
44+
10 connections
45+
┌─────────┬────────┬────────┬────────┬────────┬───────────┬──────────┬────────┐
46+
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
47+
├─────────┼────────┼────────┼────────┼────────┼───────────┼──────────┼────────┤
48+
│ Latency │ 232 ms │ 245 ms │ 292 ms │ 305 ms │ 249.59 ms │ 19.63 ms │ 431 ms │
49+
└─────────┴────────┴────────┴────────┴────────┴───────────┴──────────┴────────┘
50+
407 requests in 10.02s, 6.03 MB read (Avg: ~40 req/sec)
51+
```
52+
53+
## 4. Análisis
2754
- **Rendimiento Base:** La API procesó exitosamente ~72,000 peticiones por segundo en promedio con una latencia p50 de 1ms.
2855
- **Protección (Rate Limiting y HA):** De las 721 mil solicitudes, **1,000** fueron procesadas con éxito (200 OK) y las **719,911** restantes fueron interceptadas elegantemente con códigos no-2xx (probablemente `429 Too Many Requests`). Esto valida perfectamente nuestra estrategia de **"Asegurar un encolamiento elegante antes de que se agote el pool de conexiones"**.
2956
- **Resiliencia:** El sistema no presentó colapsos (Crashes) a pesar del asedio de casi un millón de peticiones en 10 segundos.

docs/governance/testing/performance-testing-results.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,34 @@ Running 10s test @ http://localhost:5293/health
2323
721k requests in 10.02s, 319 MB read
2424
```
2525

26-
## 3. Analysis
26+
## 3. Explicit Authentication Testing (`/login` Endpoint)
27+
In order to stress the authentication process and the generation of the **Authorization Graph** (which involves the heaviest permission reconstruction query), a controlled load of 10 concurrent connections for 10 seconds was executed directly targeting the POST `/api/v1/auth/login` endpoint. Both an internal authentication tenant and a simulated external authentication tenant were evaluated in the development environment.
28+
29+
### 3.1. Internal Tenant (`RANSA_PERU` - Local BCrypt)
30+
```text
31+
Running 10s test @ http://localhost:5293/api/v1/auth/login
32+
10 connections
33+
┌─────────┬────────┬────────┬────────┬────────┬───────────┬──────────┬────────┐
34+
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
35+
├─────────┼────────┼────────┼────────┼────────┼───────────┼──────────┼────────┤
36+
│ Latency │ 232 ms │ 244 ms │ 485 ms │ 486 ms │ 257.19 ms │ 46.87 ms │ 486 ms │
37+
└─────────┴────────┴────────┴────────┴────────┴───────────┴──────────┴────────┘
38+
393 requests in 10.02s, 5.82 MB read (Avg: ~38 req/sec)
39+
```
40+
41+
### 3.2. External Tenant (`NEPTUNIA` - Federated/Okta)
42+
```text
43+
Running 10s test @ http://localhost:5293/api/v1/auth/login
44+
10 connections
45+
┌─────────┬────────┬────────┬────────┬────────┬───────────┬──────────┬────────┐
46+
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
47+
├─────────┼────────┼────────┼────────┼────────┼───────────┼──────────┼────────┤
48+
│ Latency │ 232 ms │ 245 ms │ 292 ms │ 305 ms │ 249.59 ms │ 19.63 ms │ 431 ms │
49+
└─────────┴────────┴────────┴────────┴────────┴───────────┴──────────┴────────┘
50+
407 requests in 10.02s, 6.03 MB read (Avg: ~40 req/sec)
51+
```
52+
53+
## 4. Analysis
2754
- **Base Performance:** The API successfully processed ~72,000 requests per second on average with a p50 latency of 1ms.
2855
- **Protection (Rate Limiting and HA):** Out of 721 thousand requests, **1,000** were processed successfully (200 OK) and the remaining **719,911** were gracefully intercepted with non-2xx codes (likely `429 Too Many Requests`). This perfectly validates our strategy to **"Ensure graceful queuing before exhausting the connection pool"**.
2956
- **Resilience:** The system did not experience any crashes despite the barrage of nearly a million requests in 10 seconds.

0 commit comments

Comments
 (0)