Router Operator
Guide for Deploying Connext Subgraphs from P2P
Learn more about deploying a Connext Subgraph
Before you start
If you are using hetzner, gcp, aws you need to use server profile for your ipfs node. More info can be found here
Also you can save a lot of disk space by disabling the block_hash for graph-node:
GRAPH_ETHEREUM_CLEANUP_BLOCKS: 'true'
It can lead to an increasing number of total rpc requests.
System requirements
RAM | CPU | DISK |
---|---|---|
16GB or more | 8 vcore | At least 10G for each subgraph with GRAPH_ETHEREUM_CLEANUP_BLOCKS set to true |
Also you need to have an archive RPC node for each chain.
How to deploy self-hosted subgraph
As an example subgraph we will deploy matic subgraph on ubuntu 20.0.4
- Install all needed packages:
- Copy graph repo:
- Change rpc-provider url in docker-compose:
- Change port mappings for graph-node to localhost
- Clone connext repo
Be sure that you are using graph version 0.21.1 (Because current subgraphs use api version 0.0.4)
- Compile subgraph (config are stored in ./configs directory)
- Create subgraph and deploy it (make sure that graph docker-compose is up and running)
- Check subgraph
- Wait for subgraph to get synced
- You can setup nginx in front of graph-node, or change port mappings and open node to the world
- Add self-hosted subgraph for the router by providing config param subgraph in the chainConfig section
Monitoring
You can use this exporter to monitor your subgraphs. Also you can find alerts in this repo too.