Prerequisites
Before you begin, ensure you have the following:
- PostgreSQL 12 or higher - scry-proxy supports PostgreSQL versions 12, 13, 14, 15, and 16
- Network access - The proxy needs to connect to your PostgreSQL server and expose its listen port to your applications
- scry-proxy binary - Download from the ScryData releases or build from source
Start scry-proxy
The fastest way to get started is using environment variables. Configure the backend connection and start the proxy:
# Configure backend PostgreSQL connection
export SCRY_BACKEND__HOST=localhost
export SCRY_BACKEND__PORT=5432
export SCRY_BACKEND__DATABASE=myapp
export SCRY_BACKEND__USER=postgres
export SCRY_BACKEND__PASSWORD=secret
# Start the proxy (listens on 127.0.0.1:5433 by default)
./scry-proxy
The proxy will start and log its configuration. You should see output indicating it's listening for connections.
Verify It Works
Test that the proxy is working by connecting through it and checking the metrics endpoint.
Connect via psql
Connect to your database through the proxy:
# Connect through the proxy (port 5433)
psql -h 127.0.0.1 -p 5433 -U postgres -d myapp
# Run a test query
SELECT version();
Check Metrics
Verify that metrics are being collected by querying the Prometheus endpoint:
# View all metrics
curl http://localhost:9090/metrics
# Check query count (after running some queries)
curl -s http://localhost:9090/metrics | grep scry_queries_total
You should see metrics like scry_queries_total, scry_query_duration_seconds, and connection pool statistics.
Next Steps
Now that you have scry-proxy running, explore these guides to configure it for your needs:
Configuration
Learn about all configuration options including connection pooling, circuit breaker settings, and observability features.
Migrating from PgBouncer
Already using PgBouncer? Follow our migration guide to switch to scry-proxy with minimal disruption.
scry-backfill
Set up shadow databases and data replication for production-scale validation of your database changes.
Observability
Configure Prometheus metrics, query fingerprinting, and integrate with your monitoring stack.
Need Help?
If you run into issues, check out the Troubleshooting Guide or reach out to us for support.
Request Early Access