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 @@ + + +
+ + ++ High-performance GraphQL gateway with monitoring, caching, circuit breaker, rate limiting, and security. Tested at 30k req/s using 10MB RAM. +
+ +# 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
+ Enterprise-grade GraphQL gateway at zero cost
+Full observability with query timing, user tracking, and operation metrics
+Memory-aware caching with LRU eviction, compression, and Redis support
+Automatic failure detection with graceful degradation and cached fallbacks
+Role-based rate limiting with JWT extraction and burst control
+Deduplicate concurrent identical queries, reducing backend load 50-80%
+Native GraphQL subscriptions with bidirectional proxying
+Block schema introspection with configurable allowlists
+Distributed tracing with configurable OTLP collector endpoint
+Real-time web UI for monitoring health, metrics, and controls
+Deploy in seconds
+docker pull ghcr.io/lukaszraczylo/graphql-monitoring-proxy:latest
+ Download from the releases page.
+Supported: Darwin ARM64/AMD64, Linux ARM64/AMD64, Windows AMD64
+Example manifests available in the repository:
+ +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)
+ Environment variables (prefix with GMP_ recommended)
+| Variable | +Description | +Default | +
|---|---|---|
HOST_GRAPHQL |
+ GraphQL backend URL | +http://localhost/ | +
PORT_GRAPHQL |
+ Proxy listen port | +8080 | +
MONITORING_PORT |
+ Metrics endpoint port | +9393 | +
LOG_LEVEL |
+ Logging level | +info | +
| Variable | +Description | +Default | +
|---|---|---|
ENABLE_GLOBAL_CACHE |
+ Enable memory cache | +false | +
CACHE_TTL |
+ Cache TTL in seconds | +60 | +
CACHE_MAX_MEMORY_SIZE |
+ Max memory in MB | +100 | +
ENABLE_REDIS_CACHE |
+ Enable Redis cache | +false | +
| Variable | +Description | +Default | +
|---|---|---|
ENABLE_CIRCUIT_BREAKER |
+ Enable circuit breaker | +false | +
CIRCUIT_MAX_FAILURES |
+ Failures before trip | +10 | +
CIRCUIT_TIMEOUT_SECONDS |
+ Recovery timeout | +60 | +
Battle-tested at scale
+Requests/second
+RAM usage
+CPU usage
+