> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/health/v2.1/design/architecture/low-level-design/performance-and-api-benchmarking/beneficiary-id-generation-performance-testing-and-benchmarking-report.md).

# Beneficiary ID Generation - Performance Testing & Benchmarking Report

### 1. Document Information

<table><thead><tr><th width="173.56640625">Field</th><th>Details</th></tr></thead><tbody><tr><td>Product</td><td>DIGIT HCM</td></tr><tr><td>Service under test</td><td>Beneficiary ID Generation (beneficiary-idgen), namespace "health"</td></tr><tr><td>Endpoints under test</td><td>POST /beneficiary-idgen/id/id_pool/_generate<br>POST /beneficiary-idgen/id/id_pool/_search</td></tr><tr><td>Container image</td><td>egovio/beneficiary-idgen:master-perf-2d35084</td></tr><tr><td>Environment</td><td>unified-dev (AWS EKS), tenant "dev"</td></tr><tr><td>Test date</td><td>18 August 2026</td></tr><tr><td>Purpose</td><td>Establish how many concurrent requests a single pod absorbs before it rejects them, and how latency behaves up to that point</td></tr><tr><td>Prepared By</td><td>HCM Engineering Team</td></tr><tr><td>Release</td><td>HCM v2.1</td></tr></tbody></table>

Metric definitions, the test method and a glossary of terms are in the Common Reference document. This report carries only this service's measurements.

### 2. Test Environment

#### 2.1 Beneficiary ID Generation pod configuration

<table><thead><tr><th width="252.32421875">Component</th><th>Configuration</th></tr></thead><tbody><tr><td>Cloud provider / orchestration</td><td>AWS, Amazon EKS (unified-dev cluster)</td></tr><tr><td>Namespace</td><td>health</td></tr><tr><td>Replicas</td><td>1</td></tr><tr><td>Horizontal Pod Autoscaler</td><td>Not configured</td></tr><tr><td>CPU limit / request</td><td>300m / 50m</td></tr><tr><td>Memory limit / request</td><td>1Gi / 512Mi</td></tr><tr><td>JVM heap</td><td>-Xmx384m -Xms384m</td></tr><tr><td>Tomcat max threads</td><td>10</td></tr><tr><td>Tomcat max connections</td><td>500</td></tr><tr><td>DB pool (Hikari maximum-pool-size)</td><td>2</td></tr><tr><td>DB pool initial size</td><td>1</td></tr><tr><td>Database</td><td>PostgreSQL (shared unified-dev instance)</td></tr><tr><td>Redis cache</td><td>redis.backbone:6379</td></tr><tr><td>Liveness / readiness probe</td><td>GET /beneficiary-idgen/actuator/health/liveness — failureThreshold 5, period 60s / 30s, timeout 3s</td></tr></tbody></table>

#### 2.2 Dependent service configurations

Beneficiary ID Generation is wired to call the services below. Their own pod sizing is listed because a downstream limit constrains this service regardless of how it is configured itself. All values were read from the live cluster.

| Service (namespace) | Pods | CPU  | Memory | JVM heap  |
| ------------------- | ---- | ---- | ------ | --------- |
| mdms-v2 (egov)      | 1    | 300m | 2Gi    | -Xmx1536m |

Same for every service above: Tomcat max threads 10, Tomcat max connections 500, Hikari pool 2.

### 3. Test Scope

<table><thead><tr><th width="223.796875">Endpoint</th><th width="152.0859375">Type</th><th>Behaviour</th></tr></thead><tbody><tr><td>POST /beneficiary-idgen/id/id_pool/_generate</td><td>Asynchronous</td><td>Validates synchronously, returns 202 Accepted, produces to Kafka. Figures measure accept capacity — validation plus enqueue.</td></tr><tr><td>POST /beneficiary-idgen/id/id_pool/_search</td><td>Synchronous</td><td>Response returns inline. Figures measure full request cost.</td></tr></tbody></table>

### 4. Test Data

<table><thead><tr><th width="204.95703125">Item</th><th>Value</th></tr></thead><tbody><tr><td>Tenant</td><td>dev</td></tr><tr><td>Generate payload</td><td>One batch request per call for a pool of 10 identifiers</td></tr><tr><td>Search payload</td><td>Body filter {"IdPoolSearch":{"tenantId":"&#x3C;tenant>"}}</td></tr><tr><td>Generate response size</td><td>245 bytes per request</td></tr><tr><td>Search response size</td><td>229 bytes per request</td></tr><tr><td>Auth token</td><td>One pre-fetched token shared by every thread</td></tr><tr><td>Dataset the search ran against</td><td>Empty — the ID pool held no rows, so the search returned no results</td></tr></tbody></table>

Row counts were read from this service's own search API on 20 August, two days after the runs, so they include rows the create tests inserted. A search that matches one row is an indexed lookup and its figures should not be read as the cost of a broad search; one that matches thousands is scanning and filtering real volume.

The ID pool was empty during the run, not only when the counts were taken: every search response was 229 bytes at every concurrency level, which is an empty result set. The search figures therefore measure request handling with no rows to fetch, filter or serialise, and are not comparable with a search that returns data. Note also that the generate runs immediately before requested roughly 21,000 identifiers and the pool was still empty when the search ran, which is consistent with generate being an accept-only measurement: it validates and queues, and persistence happens later via a background consumer that was not measured here.

### 5. Load Profile

<table><thead><tr><th width="241.44140625">Endpoint</th><th>Concurrency levels tested</th></tr></thead><tbody><tr><td>Generate</td><td>10, 100, 500, 1,500</td></tr><tr><td>Search</td><td>10, 100, 300, 400, 500</td></tr></tbody></table>

One request per thread, so samples equal threads on every row. All threads for a level are released simultaneously; observed thread-start span was 0.0 to 0.6 seconds.

### 6. Benchmark Metrics

Latency is shown in seconds, measured client-side, computed from the raw sample logs.

Each endpoint was measured on its own. Only one endpoint carried load at any moment and only one concurrency level ran at a time, so these figures are not influenced by traffic to the service's other endpoints. Within a level, every request is concurrent: all threads are released together and each sends one request.

#### 6.1 Generate

| Users | Result | p50    | p90    | p95    | p99    | Error % | Throughput |
| ----- | ------ | ------ | ------ | ------ | ------ | ------- | ---------- |
| 10    | Clean  | 0.53 s | 0.53 s | 0.53 s | 0.53 s | 0.00    | 19.0/s     |
| 100   | Clean  | 2.24 s | 2.83 s | 2.83 s | 2.84 s | 0.00    | 35.2/s     |
| 500   | Clean  | 7.62 s | 9.88 s | 10.0 s | 10.1 s | 0.00    | 49.3/s     |
| 1,500 | Clean  | 11.0 s | 19.5 s | 21.0 s | 33.1 s | 0.00    | 45.0/s     |

Latency and throughput are computed from successful requests only. A failed request still has a response time, so counting failures would make a failing level look faster and busier than a clean one. Error % is over all requests.

Throughput at each percentile — the rate achieved up to that point in the run. See the Common Reference document for how to read it.

| Percentile   | Latency | Requests completed | Elapsed | Throughput to that point |
| ------------ | ------- | ------------------ | ------- | ------------------------ |
| p50          | 11.0 s  | 750                | 11.3 s  | 66.6/s                   |
| p90          | 19.5 s  | 1,350              | 19.7 s  | 68.4/s                   |
| p95          | 20.4 s  | 1,425              | 20.5 s  | 69.7/s                   |
| p99          | 33.1 s  | 1,485              | 33.3 s  | 44.6/s                   |
| All requests | 33.3 s  | 1,500              | 33.4 s  | 45.0/s                   |

| Measure                          | Value                                             |
| -------------------------------- | ------------------------------------------------- |
| Highest clean level              | 1,500 concurrent, 0 failures out of 1,500 samples |
| First failing level              | Not reached up to 1,500 concurrent                |
| Peak throughput at a clean level | 49.3 req/s                                        |
| Fastest single request           | 0.29 s                                            |

#### 6.2 Search

| Users | Result | p50    | p90    | p95    | p99    | Error % | Throughput |
| ----- | ------ | ------ | ------ | ------ | ------ | ------- | ---------- |
| 10    | Clean  | 0.51 s | 0.51 s | 0.51 s | 0.51 s | 0.00    | 19.6/s     |
| 100   | Clean  | 1.11 s | 1.73 s | 1.74 s | 1.83 s | 0.00    | 54.5/s     |
| 300   | Clean  | 2.28 s | 3.02 s | 3.11 s | 3.20 s | 0.00    | 93.1/s     |
| 400   | Clean  | 2.29 s | 3.00 s | 3.16 s | 3.19 s | 0.00    | 124.1/s    |
| 500   | FAILED | 1.08 s | 2.06 s | 2.08 s | 2.16 s | 79.00   | 48.0/s     |

Latency and throughput are computed from successful requests only. A failed request still has a response time, so counting failures would make a failing level look faster and busier than a clean one. Error % is over all requests.

Throughput at each percentile — the rate achieved up to that point in the run. See the Common Reference document for how to read it.

| Percentile   | Latency | Requests completed | Elapsed | Throughput to that point |
| ------------ | ------- | ------------------ | ------- | ------------------------ |
| p50          | 2.28 s  | 200                | 2.3 s   | 86.1/s                   |
| p90          | 3.00 s  | 360                | 3.0 s   | 118.9/s                  |
| p95          | 3.16 s  | 380                | 3.2 s   | 118.5/s                  |
| p99          | 3.19 s  | 396                | 3.2 s   | 122.9/s                  |
| All requests | 3.21 s  | 400                | 3.2 s   | 124.1/s                  |

| Measure                          | Value                                         |
| -------------------------------- | --------------------------------------------- |
| Highest clean level              | 400 concurrent, 0 failures out of 400 samples |
| First failing level              | 500 concurrent, 79.00% error                  |
| Peak throughput at a clean level | 124.1 req/s                                   |
| Fastest single request           | 0.09 s                                        |

#### 6.3 Failure detail

| Endpoint | Users | Error % | Failed | Failure classes                          |
| -------- | ----- | ------- | ------ | ---------------------------------------- |
| Search   | 500   | 79.00   | 395    | 394 RemoteDisconnected, 1 IncompleteRead |

HTTP codes are responses returned by the service. RemoteDisconnected, IncompleteRead and similar are connection-level failures, which the sample log cannot separate from a failure of the port-forward tunnel used to reach the pod.

### 7. Scalability Results

Pass means zero failed samples at that concurrency.

#### 7.1 Generate

| Concurrency | Result                     | p95 (ms) | Throughput |
| ----------- | -------------------------- | -------- | ---------- |
| 10          | Pass                       | 0.53 s   | 19.0/s     |
| 100         | Pass                       | 2.83 s   | 35.2/s     |
| 500         | Pass                       | 10.0 s   | 49.3/s     |
| 1,500       | Pass — highest clean level | 21.0 s   | 45.0/s     |

#### 7.2 Search

| Concurrency | Result                     | p95 (ms) | Throughput |
| ----------- | -------------------------- | -------- | ---------- |
| 10          | Pass                       | 0.51 s   | 19.6/s     |
| 100         | Pass                       | 1.74 s   | 54.5/s     |
| 300         | Pass                       | 3.11 s   | 93.1/s     |
| 400         | Pass — highest clean level | 3.16 s   | 124.1/s    |
| 500         | Fail — 79.00% error        | 2.08 s   | 48.0/s     |

### 8. Stress Test

| Measure                           | Generate             | Search           |
| --------------------------------- | -------------------- | ---------------- |
| Highest clean concurrency         | 1,500                | 400              |
| First failing level               | Not reached to 1,500 | 500 — 79.00%     |
| p95 at highest clean level        | 21.0 s               | 3.16 s           |
| Throughput at highest clean level | 45.0/s               | 124.1/s          |
| Failure class                     | —                    | Connection-level |

These runs executed between 09:37–12:36 UTC on 18 August 2026. The pod reports 0 restarts. The pod was ready on completion.

### 9. Notes on Data Validity

All latency, percentile, throughput and error-rate figures were computed directly from the raw sample logs produced by each run. Failure classes, counts and response bodies come from those same logs. Pod and dependent-service configuration was read from the live cluster. Request payloads, filters and paths come from the test plans and their data files.

These figures supersede any earlier reporting for this service. Earlier runs were executed against a different container build and, on the gateway route, blended the login call into the service figures.

### 10. Conclusion

| Result                               | Value                              |
| ------------------------------------ | ---------------------------------- |
| Generate — highest clean concurrency | 1,500 (21.0s p95, 45.0 req/s)      |
| Generate — first failing level       | not reached up to 1,500 concurrent |
| Search — highest clean concurrency   | 400 (3.2s p95, 124.1 req/s)        |
| Search — first failing level         | 500 at 79.00% error                |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.digit.org/health/v2.1/design/architecture/low-level-design/performance-and-api-benchmarking/beneficiary-id-generation-performance-testing-and-benchmarking-report.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
