Skip to content

Commit a12d10a

Browse files
authored
Merge pull request #857 from richardgreg/proxyd-info
[DOCS] Add information about proxyd
2 parents c5d8a1a + 145c504 commit a12d10a

File tree

4 files changed

+85
-1
lines changed

4 files changed

+85
-1
lines changed

pages/stack/_meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
"design-principles": "Design Philosophy & Principles",
88
"protocol": "Protocol",
99
"transactions": "Transactions",
10-
"security": "Security"
10+
"security": "Security",
11+
"operators": "Operators"
1112
}

pages/stack/operators/_meta.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"features": "Features"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"proxyd": "proxyd"
3+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: proxyd
3+
lang: en-US
4+
description: Learn about the proxyd service and how to configure it for use in the OP Stack.
5+
---
6+
7+
import { Steps } from 'nextra/components'
8+
9+
# proxyd
10+
11+
`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.
12+
13+
## Key Features
14+
15+
* RPC method whitelisting
16+
* Backend request routing
17+
* Automatic retries for failed backend requests
18+
* Consensus tracking (latest, safe, and finalized blocks)
19+
* Request/response rewriting to enforce consensus
20+
* Load balancing across backend services
21+
* Caching of immutable responses
22+
* Metrics for request latency, error rates, and backend health
23+
24+
## How it works
25+
26+
To start using `proxyd`, follow these steps:
27+
28+
<Steps>
29+
### **Build the Binary**:
30+
31+
* Run the following command to build the `proxyd` binary:
32+
```bash
33+
make proxyd
34+
```
35+
* This will build the `proxyd` binary. No additional dependencies are required.
36+
37+
### **Configure `proxyd`**:
38+
39+
* Create a configuration file to define your proxy backends and routing rules.
40+
* 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.
41+
42+
### **Start the Service**:
43+
44+
Once the configuration file is ready, start the `proxyd` service using the following command:
45+
46+
```bash
47+
proxyd <path-to-config.toml>
48+
```
49+
</Steps>
50+
51+
## Consensus Awareness
52+
53+
Version 4.0.0 and later include consensus awareness to minimize chain reorganizations.
54+
55+
Set `consensus_aware` to `true` in the configuration to enable:
56+
57+
* Polling backends for consensus data (latest block, safe block, peer count, etc.).
58+
* Resolving consensus groups based on healthiest backends
59+
* Enforcing consensus state across client requests
60+
61+
## Caching and Metrics
62+
63+
### Cacheable Methods
64+
65+
Certain immutable methods, such as `eth_chainId` and `eth_getBlockByHash`, can be cached using Redis to optimize performance.
66+
67+
### Metrics
68+
69+
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.
70+
71+
## Next Steps
72+
73+
* Read about the [OP Stack chain architecture](/builders/chain-operators/architecture).
74+
* Find out how you can support [snap sync](/builders/chain-operators/management/snap-sync).
75+
on your chain.
76+
* Find out how you can utilize [blob space](/builders/chain-operators/management/blobs)
77+
to reduce the transaction fee cost on your chain.

0 commit comments

Comments
 (0)