Skip to content
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"
}
77 changes: 77 additions & 0 deletions pages/stack/operators/features/proxyd.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: proxyd
lang: en-US
description: Learn about the proxyd service and how to configure it for use in the OP Stack.
---

import { Steps } from 'nextra/components'

# 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
* Backend request routing
* Automatic retries for failed backend requests
* Consensus tracking (latest, safe, and finalized blocks)
* Request/response rewriting to enforce consensus
* Load balancing across backend services
* Caching of immutable responses
* Metrics for request latency, error rates, and backend health

## How it works

To start using `proxyd`, follow these steps:

<Steps>
### **Build the Binary**:

* Run the following command to build the `proxyd` binary:
```bash
make proxyd
```
* This will build the `proxyd` binary. No additional dependencies are required.

### **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.

### **Start the Service**:

Once the configuration file is ready, start the `proxyd` service using the following command:

```bash
proxyd <path-to-config.toml>
```
</Steps>

## Consensus Awareness

Version 4.0.0 and later include consensus awareness to minimize chain reorganizations.

Set `consensus_aware` to `true` in the configuration to enable:

* Polling backends for consensus data (latest block, safe block, peer count, etc.).
* Resolving consensus groups based on healthiest backends
* Enforcing consensus state across client requests

## 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.

## Next Steps

* Read about the [OP Stack chain architecture](/builders/chain-operators/architecture).
* Find out how you can support [snap sync](/builders/chain-operators/management/snap-sync).
on your chain.
* Find out how you can utilize [blob space](/builders/chain-operators/management/blobs)
to reduce the transaction fee cost on your chain.
Loading