If you're a Fly.io user, you can start an instance of qryn in seconds using our public Docker images and seamlessly connect it to your local or remote ClickHouse.
Requirements
Any ClickHouse Service (ClickHouse Cloud, DoubleCloud, Altinity, Gigapipe)
Something to observe! add Logs, Metrics or Traces from anywhere
Ready? Let's get started!
Configure qryn
Configure the ENV
settings to match your ClickHouse server endpoint.
flyctl secrets set CLICKHOUSE_SERVER = "your.clickhouse.server"
flyctl secrets set CLICKHOUSE_AUTH = "admin:secretpassword"
flyctl secrets set CLICKHOUSE_PROTO = "https"
flyctl secrets set CLICKHOUSE_PORT = 8443
Launch qryn
Double check your settings and deploy your qryn container.
fly launch --image qryn:latest --now
The fly launch
command detects your Dockerfile
and builds it.
? App Name (leave blank to use an auto-generated name):
? Select region: lax (Los Angeles, California (US))
? Would you like to deploy now? (y/N)
Choose y
or run fly open
to open your deployed app in a browser.
SSL/Encryption are automatically handled by the fly.io edge servers. ๐
That's it! Your API instance is up and running! ๐
Usage
The system is quite boring without data. Let's insert some and start querying!
As a quick example, let's use CURL to send our first little log:
curl -X POST -H "Content-Type: application/json" \
https://your-own-qryn.fly.io/loki/api/v1/push --data '{"streams":[{"stream":{"type":"test"},"values":[["'$(date +"%s%N")'", "hello qryn"]]}]}'
Start sending logs, metrics and traces from your systems into qryn.
Explore data using qryn's View UI or using Grafana.
๐๏ธ qryn view
๐๏ธ Grafana
Grafana user? No problem! qryn works using the native Loki, Tempo and Prometheus data sources available in any setup without plugins or special settings.
Scaling
The free instances should handle 100s and even 1000s of inserts per second into ClickHouse but might fall short when querying very large datasets requiring memory and time-series buffering.
You can increase instance resources using the Fly Dashboard
or Fly CLI
.
# Give the vm 2GB of ram
fly scale memory 2048
Auto-Scaling
Since qryn is completely stateless, multiple instances can be deployed in parallel across different regions and scaled to handle large amounts of traffic, split insert/read roles, partition users over the same ClickHouse cluster, etc.
Easy wasn't it? Learn more about all the project features and capabilities using the online documentation and enjoy your superlight, free qryn polyglot stack on Fly!
๐ Notes
configuration
If you'd rather build the fly.toml
configuration yourself, here's a template:
# fly.toml file cloned from qryn.dev
app = "qrynjs"
primary_region = "mad"
[build]
image = "qxip/qryn:latest"
[env]
CLICKHOUSE_AUTH = "default:xxxxxxxxxxxx"
CLICKHOUSE_DB = "qryn"
CLICKHOUSE_PORT = 8443
CLICKHOUSE_PROTO = "https"
CLICKHOUSE_SERVER = "xxxxxxxxxx.eu-central-1.aws.clickhouse.xxx"
HOST = "0.0.0.0"
PORT = 3100
[[services]]
internal_port = 3100
protocol = "tcp"
[services.concurrency]
hard_limit = 25
soft_limit = 20
[[services.ports]]
handlers = ["http"]
port = "80"
[[services.ports]]
handlers = ["tls", "http"]
port = "443"
[[services.tcp_checks]]
interval = 10000
timeout = 2000
That's it! Enjoy your free polyglot stack!
Running large scale and looking for an all-inclusive cloud solution? Try qryn.cloud