Categorygithub.com/ecadlabs/octez-ecad-sc
modulepackage
0.0.0-20240725175502-bc9d86a1bb1a
Repository: https://github.com/ecadlabs/octez-ecad-sc.git
Documentation: pkg.go.dev

# README

Octez ECAD Sidecar

Octez ECAD Sidecar is a sidecar application that runs alongside a Tezos RPC node. It provides a /health endpoint to monitor the health status of the node based on several heuristics.

Introduction

The Octez ECAD Sidecar is designed to enhance the reliability of Tezos RPC nodes by providing a health check endpoint. This allows load balancers to dynamically manage node availability, ensuring efficient traffic distribution and high availability.

Purpose

The purpose of the /health endpoint is to allow health check probes from load balancers. This enables a load balancer to dynamically include or exclude nodes from the group of origin servers. The service is suitable for use with popular load balancer services such as those from Cloudflare, Amazon, and Google.

Metrics

Prometheus metrics are exposed via /metrics endpoint.

Getting Started

Installation

  1. Clone the repository:

    git clone https://github.com/ecadlabs/octez-ecad-sc.git
    cd octez-ecad-sc
    
  2. Build the project:

    go build -o octez-ecad-sc
    
  3. Run the sidecar:

    ./octez-ecad-sc -c config.yaml
    

Configuration

The sidecar can be configured via YAML file:

FieldDefaultDescription
listen:8080Host and port to listen on
urlTezos RPC URL
chain_idBase58 encoded chain id
timeout30sRPC timeout
tolerance10sThe amount of time added to the minimal_block_delay value for block observation
reconnect_delay10sDelay before reconnection of a head monitor
use_timestampsfalseUse blocks' timestamps instead of a system time
poll_interval15sInterval in whish endpoints are getting polled
health_use_bootstrappedtrueIf true the bootstrap state is used to produce /health output
health_use_block_delaytrueIf true the block delay is used to produce /health output

Reporting Issues

If you encounter any issues, please create a new issue in the GitHub issue tracker.

Submitting Pull Requests

  1. Fork the repository.
  2. Create a new branch with a descriptive name.
  3. Make your changes and commit them with clear and concise messages.
  4. Push your changes to your fork.
  5. Create a pull request to the main repository.

License

This project is licensed under the Apache 2.0 License.

Superseding Project

This sidecar project supersedes an old project: tezos_exporter that ECAD used as a health check. That project is archived. Octez now exposes Prometheus metrics directly.

Contact

For questions or support, please open an issue in the issue tracker.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
Logging is a logrus-enabled logging middleware.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

ResponseStatusWriter wraps http.ResponseWriter to save HTTP status code.