Auth Load Balancer

A custom load balancer needs to be built (golang) that is the authentication layer of the data the provider is providing. This means when a query is made, it is rate limited here, or authorized based on available payment gateways.

Configuration

Configuration should largely be done via env variables, as these are easier to integrate with into kubernetes/docker environments.

Routing

Each request should be prefixed with the chain and service. This informs the nginx lb behind our custom LB of where to send the requests.

/btc-mainnet/rpc/....

Metadata

There should be an API endpoint to pull metadata about the provider (/metadata.json)

Data Host Offchain Metadata

Data Inputs

This LB listens to events on the foxchain chain for when contracts are open/closed and updates its in-memory cache of data. It does not need to persist this data to disk in any way. If a query is made with authentication for a contract that the in-memory cache does not know about, it may query foxchain for such information and cache the response.

Events that the chain emits can to seen here

Authentication