#grpc-server #server-framework #prometheus-metrics #tls-certificates #serverless #certificate

comprehensive

A harness for creating consistently-shaped servers will less boilerplate

5 releases (breaking)

0.5.0 Oct 27, 2024
0.4.0 Oct 27, 2024
0.3.0 Oct 22, 2024
0.2.0 Oct 19, 2024
0.1.0 Oct 2, 2024

#334 in HTTP server

Download history 158/week @ 2024-09-30 13/week @ 2024-10-07 183/week @ 2024-10-14 328/week @ 2024-10-21 135/week @ 2024-10-28

664 downloads per month
Used in 2 crates

MIT license

105KB
2K SLoC

A harness for creating consistently-shaped servers will less boilerplate.

Production-ready servers require a comprehensive collection of basic features to enable easy deployment, integration, diagnostics, monitoring, lifecycle management, and so forth. Individual features may be available in the ecosystem, but each requires its own boilerplate to add and configure. Especially when operating with a microservices paradigm, the effort to bootstrap a basic batteries-included server may even outweigh the application logic.

Comprehensive's goal is that it should be easy to create a server with a number of important basic features included by default, including:

  • Secure servers available by default for both gRPC (mTLS) and HTTP
    • easy to provision with keys and certificates using infrastructure like cert-manager in Kubernetes.
    • dynamically reloaded so that certificate renewals happen
  • Health checking endpoints for servers enabled by default.
  • Metrics (which can be scraped by Prometheus) exported.
    • Common metrics like RPC counters automatically installed.
  • Graceful shutdown
  • Server reflection, ACLs, and more.

This framework is opinionated, not because its decisions are considered better than alternatives but because it's important for consistency. Deployment, configuration, diagnostics, metrics collection and more should happen in the same way across a whole zoo of different servers in a cluster (or other collective environment).

Status

Comprehensive is still in early development. Many more features are planned.

Examples

Hello World gRPC server

Feature Flags

  • tls: Enables secure versions of each protocol (currently gRPC and HTTP). Requires rustls.

Most features, such as HTTP and Prometheus metrics, are always available.

Dependencies

~12–22MB
~333K SLoC