# Performance Tiers

The Console suggests three infrastructure tiers based on expected workload. You can configure your infrastructure freely, but these tiers provide tested starting points.

## Tier Comparison

| Component          | Tier 1        | Tier 2        | Tier 3        |
| ------------------ | ------------- | ------------- | ------------- |
| **Fargate**        | 1 vCPU / 2 GB | 2 vCPU / 4 GB | 4 vCPU / 8 GB |
| **RDS Master**     | db.t4g.medium | db.r8g.large  | db.r8g.xlarge |
| **RDS Replica**    | db.t4g.medium | db.r8g.large  | db.r8g.xlarge |
| **BATCH\_SIZE**    | 150           | 200           | 300           |
| **BATCH\_TIMEOUT** | 20ms          | 15ms          | 10ms          |
| **DB\_POOL\_SIZE** | 10            | 20            | 40            |

## Tier 1 — Low Volume

**Best for:** Development, staging, low-traffic production deployments.

* Up to \~5,000 TPS
* p99 latency \~40-50ms
* Suitable for up to \~500K transactions/day

**Configuration:**

```bash
LEDGER_BATCH_SIZE=150
LEDGER_BATCH_TIMEOUT_MS=20
LEDGER_DB_POOL_SIZE=10
```

## Tier 2 — Medium Volume

**Best for:** Most production workloads.

* Up to \~10,000 TPS
* p99 latency \~30-45ms
* Suitable for up to \~2M transactions/day

**Configuration:**

```bash
LEDGER_BATCH_SIZE=200
LEDGER_BATCH_TIMEOUT_MS=15
LEDGER_DB_POOL_SIZE=20
```

## Tier 3 — High Volume

**Best for:** High-throughput production environments.

* Up to \~16,000+ TPS
* p99 latency \~40-50ms (higher due to larger batches)
* Suitable for up to \~5M+ transactions/day

**Configuration:**

```bash
LEDGER_BATCH_SIZE=300
LEDGER_BATCH_TIMEOUT_MS=10
LEDGER_DB_POOL_SIZE=40
```

## Idempotency Settings (All Tiers)

These settings are recommended for all tiers:

```bash
LEDGER_IDEMPOTENCY_TTL_HOURS=1
LEDGER_IDEMPOTENCY_CLEANUP_INTERVAL_MIN=5
```

## Choosing a Tier

| Question                      | Tier 1 | Tier 2 | Tier 3 |
| ----------------------------- | ------ | ------ | ------ |
| Daily transactions < 500K?    | Yes    |        |        |
| Daily transactions 500K - 2M? |        | Yes    |        |
| Daily transactions > 2M?      |        |        | Yes    |
| Latency tolerance > 50ms?     | Yes    |        |        |
| Latency tolerance 30-50ms?    |        | Yes    |        |
| Need maximum throughput?      |        |        | Yes    |
| Budget-conscious deployment?  | Yes    |        |        |

## Upgrading Tiers

You can upgrade between tiers at any time:

1. Update the RDS instance class (use Blue/Green deployment for zero downtime)
2. Update the Fargate task definition with new CPU/memory
3. Update environment variables (`BATCH_SIZE`, `BATCH_TIMEOUT_MS`, `DB_POOL_SIZE`)
4. Deploy the new configuration

No data migration is needed — the database schema is the same across all tiers.

{% hint style="info" %}
Start with the lowest tier that meets your requirements. The batch engine is highly efficient even at Tier 1 settings — you may be surprised by how much throughput a small instance can handle.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://entrytarget.gitbook.io/docs/performance/tiers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
