filecoin-rpc-proxy

module
v0.0.0-...-292cf52 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2022 License: Apache-2.0

README

This version is deprecated

Actual version is supported by Glif team at https://github.com/glifio/filecoin-rpc-proxy

Overview

filecoin-rpc-proxy is a caching solution for the Filecoin JSON RPC API to reduce endpoint load used by the Glif Filecoin Hosted Endpoints service.

The config.yaml is a configuration reference where you can specify any methods to cache and the caching parameters, such as cache TTL, auto-update, key caching parameters and other custom parameters.

(Current methods we cache include ChainGetTipsetByHeight, ClientQueryAsk, StateCirculatingSupply, StateMarketDeals which can have large responses and/or often requested by our users.)

JSON RPC Proxy with a cache

Build and install
make clean check test build
make install
Docker
make docker
Start
./proxy --help
Prometheus metrics
proxy_request_duration_sum 1269
proxy_request_duration_count 3
proxy_requests 10
proxy_requests_cached 7
proxy_requests_error 3
proxy_requests_method{method="Filecoin.StateCirculatingSupply"} 10
proxy_requests_method_cached{method="Filecoin.StateCirculatingSupply"} 7
proxy_requests_method_error{method="Filecoin.StateCirculatingSupply"} 3

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL