Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.
Merged
3 changes: 2 additions & 1 deletion pages/stack/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"design-principles": "Design Philosophy & Principles",
"protocol": "Protocol",
"transactions": "Transactions",
"security": "Security"
"security": "Security",
"operators": "Operators"
}
3 changes: 3 additions & 0 deletions pages/stack/operators/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"features": "Features"
}
3 changes: 3 additions & 0 deletions pages/stack/operators/features/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"proxyd": "proxyd"
}
56 changes: 56 additions & 0 deletions pages/stack/operators/features/proxyd.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
title: proxyd
lang: en-US
description: Learn about the proxyd service and how to configure it for use in the OP Stack.
---
Comment thread
krofax marked this conversation as resolved.

# proxyd

`proxyd` is an important RPC request router and proxy used within the OP Stack infrastructure. It enables operators to efficiently route and manage RPC requests across multiple backend services, ensuring performance, fault tolerance, and security.

## Key Features

* **RPC Method Whitelisting**: Define a list of allowed RPC methods to ensure only authorized requests are processed.
* **Backend Request Routing**: Routes RPC methods to specific backend service groups.
* **Automatic Retries**: Automatically retries failed backend requests, improving reliability.
* **Consensus Tracking**: Monitors backend consensus states, such as latest, safe, and finalized blocks, to ensure consistent responses.
* **Request/Response Rewriting**: Enforces consensus by rewriting requests and responses to match the resolved consensus state.
* **Load Balancing**: Distributes traffic evenly across backend services to optimize performance and prevent bottlenecks.
* **Caching**: Caches immutable responses from backends to reduce redundant processing.
* **Metrics**: Provides metrics for tracking request latency, error rates, and backend health.

Comment thread
krofax marked this conversation as resolved.
Comment thread
krofax marked this conversation as resolved.
## Usage

To start using `proxyd`, follow these steps:

1. **Build the Binary**:
```bash
make proxyd
```

This will build the proxyd binary. No additional dependencies are required.

2. Configure `proxyd`: Create a configuration file to define your proxy backends and routing rules. Refer to [example.config.toml](https://github.com/ethereum-optimism/infra/blob/main/proxyd/example.config.toml) for a full list of options with commentary.

3. Start the Service: Once the configuration file is ready, start the proxyd service using:

```
proxyd <path-to-config>.toml
```
Comment thread
krofax marked this conversation as resolved.
Outdated

## Consensus Awareness

Starting with version 4.0.0, `proxyd` includes consensus awareness to minimize chain reorganizations for clients. By setting `consensus_aware` to true in the configuration, `proxyd` will:

Comment thread
krofax marked this conversation as resolved.
* Poll backends for consensus data (latest block, safe block, peer count, etc.).
Comment thread
krofax marked this conversation as resolved.
Outdated
* Resolve a consensus group based on the healthiest backends.
Comment thread
krofax marked this conversation as resolved.
Outdated
* Enforce consensus state across client requests.
Comment thread
krofax marked this conversation as resolved.
Outdated

## Caching and Metrics

### Cacheable Methods
Certain immutable methods, such as `eth_chainId` and `eth_getBlockByHash`, can be cached using Redis to optimize performance.

### Metrics
Extensive metrics are available to monitor request latency, error rates, backend health, and more. These can be configured via `metrics.port` and `metrics.host` in the configuration file.

Comment thread
krofax marked this conversation as resolved.
Outdated