diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 41e36e6..17c5a5c 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -105,5 +105,5 @@ jobs: summary-always: true # auto-push only if it's on main branch auto-push: false - gh-pages-branch: "gh-pages" - benchmark-data-dir-path: "docs" + gh-pages-branch: "main" + benchmark-data-dir-path: "docs/bench" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d9fdf39..3c168da 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,6 +13,7 @@ on: permissions: contents: write packages: write + deployments: write jobs: release: @@ -21,3 +22,31 @@ jobs: go-version: "1.24" docker-enabled: true secrets: inherit + + benchmark: + name: Publish Benchmarks + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: "1.24" + + - name: Run benchmarks + run: go test -bench=. -benchmem ./... -run=^# | tee output.txt + + - name: Store benchmark result + uses: benchmark-action/github-action-benchmark@v1 + with: + tool: "go" + output-file-path: output.txt + fail-on-alert: true + github-token: ${{ secrets.GITHUB_TOKEN }} + comment-on-alert: true + summary-always: true + auto-push: true + gh-pages-branch: "main" + benchmark-data-dir-path: "docs/bench" diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..24ac5b9 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,586 @@ + + + + + + GraphQL Monitoring Proxy - High-Performance GraphQL Gateway + + + + + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+
+ +
+
+

+ GraphQL Monitoring
Proxy +

+

+ High-performance GraphQL gateway with monitoring, caching, circuit breaker, rate limiting, and security. Tested at 30k req/s using 10MB RAM. +

+ +
+ Version + License + Go Report +
+
+
+
+
+
+
+
+
+ terminal +
+
# Run with Docker
+$ docker pull ghcr.io/lukaszraczylo/graphql-monitoring-proxy:latest
+
+# Configure and run
+$ docker run -p 8080:8080 -p 9393:9393 \
+    -e GMP_HOST_GRAPHQL=http://your-graphql:4000/ \
+    ghcr.io/lukaszraczylo/graphql-monitoring-proxy:latest
+
+
+
+
+
+
+ + +
+
+
+

Features

+

Enterprise-grade GraphQL gateway at zero cost

+
+
+
+
+
+ +
+
+

Prometheus Metrics

+

Full observability with query timing, user tracking, and operation metrics

+
+
+
+
+
+
+ +
+
+

Smart Caching

+

Memory-aware caching with LRU eviction, compression, and Redis support

+
+
+
+
+
+
+ +
+
+

Circuit Breaker

+

Automatic failure detection with graceful degradation and cached fallbacks

+
+
+
+
+
+
+ +
+
+

Rate Limiting

+

Role-based rate limiting with JWT extraction and burst control

+
+
+
+
+
+
+ +
+
+

Request Coalescing

+

Deduplicate concurrent identical queries, reducing backend load 50-80%

+
+
+
+
+
+
+ +
+
+

WebSocket Support

+

Native GraphQL subscriptions with bidirectional proxying

+
+
+
+
+
+
+ +
+
+

Introspection Blocking

+

Block schema introspection with configurable allowlists

+
+
+
+
+
+
+ +
+
+

OpenTelemetry Tracing

+

Distributed tracing with configurable OTLP collector endpoint

+
+
+
+
+
+
+ +
+
+

Admin Dashboard

+

Real-time web UI for monitoring health, metrics, and controls

+
+
+
+
+
+
+ + +
+
+
+

Installation

+

Deploy in seconds

+
+
+
+

+ + Docker +

+
docker pull ghcr.io/lukaszraczylo/graphql-monitoring-proxy:latest
+
+
+

+ + Binary Download +

+

Download from the releases page.

+

Supported: Darwin ARM64/AMD64, Linux ARM64/AMD64, Windows AMD64

+
+
+

+ + Kubernetes +

+

Example manifests available in the repository:

+ +
+
+
+
+ + +
+
+
+

Endpoints

+

Available HTTP endpoints

+
+
+
+
+
+ :8080/* + GraphQL passthrough endpoint +
+
+ :8080/admin + Admin dashboard UI +
+
+ :9393/metrics + Prometheus metrics endpoint +
+
+ :8080/healthz + Health check endpoint +
+
+ :8080/livez + Liveness probe endpoint +
+
+ :9090/api/* + Management API (ban/unban, cache, circuit breaker) +
+
+
+
+
+
+ + +
+
+
+

Configuration

+

Environment variables (prefix with GMP_ recommended)

+
+
+
+

+ + Core Settings +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableDescriptionDefault
HOST_GRAPHQLGraphQL backend URLhttp://localhost/
PORT_GRAPHQLProxy listen port8080
MONITORING_PORTMetrics endpoint port9393
LOG_LEVELLogging levelinfo
+
+
+ +
+

+ + Caching +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableDescriptionDefault
ENABLE_GLOBAL_CACHEEnable memory cachefalse
CACHE_TTLCache TTL in seconds60
CACHE_MAX_MEMORY_SIZEMax memory in MB100
ENABLE_REDIS_CACHEEnable Redis cachefalse
+
+
+ +
+

+ + Circuit Breaker +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
VariableDescriptionDefault
ENABLE_CIRCUIT_BREAKEREnable circuit breakerfalse
CIRCUIT_MAX_FAILURESFailures before trip10
CIRCUIT_TIMEOUT_SECONDSRecovery timeout60
+
+
+ + +
+
+
+ + +
+
+
+

Performance

+

Battle-tested at scale

+
+
+
+
+
30k
+

Requests/second

+
+
+
10MB
+

RAM usage

+
+
+
0.1%
+

CPU usage

+
+
+ +
+
+
+ + + + + + +