documentation/deployment/aws.md
import InterpolateReleaseData from "../../src/components/InterpolateReleaseData" import CodeBlock from "@theme/CodeBlock"
| Component | Recommended | Notes |
|---|---|---|
| Instance | m7i.xlarge or r7i.2xlarge | 4-8 vCPUs, 16-64 GiB RAM |
| Storage | gp3, 200+ GiB | 16000 IOPS / 1000 MBps |
| File system | zfs with lz4 | Or ext4 if compression not needed |
| Ports | 9000, 8812, 9009, 9003 | Restrict to known IPs only |
Plan your infrastructure before launching. This section covers instance types, storage, and networking requirements.
| Workload | Instance | vCPUs | RAM | Use case |
|---|---|---|---|---|
| Development | m7i.large | 2 | 8 GiB | Testing, small datasets |
| Production (starter) | m7i.xlarge | 4 | 16 GiB | Light ingestion, moderate queries |
| Production (standard) | r7i.2xlarge | 8 | 64 GiB | High ingestion, complex queries |
| Production (heavy) | r7i.4xlarge | 16 | 128 GiB | Heavy workloads, large datasets |
Choosing an instance family:
m7i / m7a - Balanced compute and memory. Good starting point.r7i / r7a - Memory-optimized. Better for large datasets or complex queries.m8i / r8i - Latest generation. Best performance if available in your region.Intel (i) and AMD (a) variants perform similarly. Choose based on
availability and pricing.
ARM instances (Graviton):
Graviton instances (r7g, r8g) cost less and perform well for ingestion.
However, queries using JIT compilation or SIMD vectorization run slower on ARM.
Choose Graviton when your workload is primarily ingestion or cost is a priority.
Storage-optimized instances:
Instances with local NVMe (i7i, i8i) provide fastest disk I/O but lose data
on termination. Only use with QuestDB Enterprise, which replicates to S3.
EBS configuration:
| Workload | Volume | Size | IOPS | Throughput |
|---|---|---|---|---|
| Development | gp3 | 50 GiB | 3000 | 125 MBps |
| Production | gp3 | 200+ GiB | 16000 | 1000 MBps |
| High I/O | gp3 | 500+ GiB | 16000+ | 1000+ MBps |
Use gp3 volumes. They offer better price-performance than gp2 or io1.
Separate your OS disk (30 GiB) from your data disk.
:::note EBS throughput is limited by instance type. Smaller instances cannot sustain high IOPS or throughput regardless of volume provisioning. Check your instance's EBS bandwidth limits in the AWS documentation before provisioning storage. :::
File system:
Use zfs with lz4 compression to reduce storage costs. If you don't need
compression, ext4 or xfs offer slightly better performance.
Unsupported storage:
Security group rules:
| Port | Protocol | Source | Purpose |
|---|---|---|---|
| 22 | TCP | Your IP | SSH access |
| 9000 | TCP | Your IP / VPC | Web Console & REST API |
| 8812 | TCP | Your IP / VPC | PostgreSQL wire protocol |
| 9009 | TCP | Application servers | InfluxDB line protocol |
| 9003 | TCP | Monitoring servers | Health check & Prometheus |
:::warning
Never expose ports 9000, 8812, or 9009 to 0.0.0.0/0. Restrict access to known
IP ranges or use a bastion host.
:::
VPC recommendations:
Choose your deployment method:
The QuestDB AMI comes pre-configured and ready to run.
Steps:
After launch:
Connect to the Web Console at http://<instance-public-ip>:9000
Default credentials:
admin / questadmin / random (check /var/lib/questdb/conf/server.conf):::warning Change default credentials immediately. See Security below. :::
Configuration file location:
/var/lib/questdb/conf/server.conf
Deploy QuestDB on any EC2 instance you configure yourself.
Steps:
gp3 EBS volume for dataYou can also download the binary directly:
curl -L https://questdb.com/download -o questdb.tar.gz
tar xzf questdb.tar.gz
./questdb.sh start
Update credentials immediately after deployment.
Web Console and REST API - edit server.conf:
http.user=your_username
http.password=your_secure_password
PostgreSQL - edit server.conf:
pg.user=your_username
pg.password=your_secure_password
InfluxDB line protocol - edit conf/auth.json. See
ILP authentication.
Restart after changes:
sudo systemctl restart questdb
Reduce attack surface by disabling protocols you don't use:
pg.enabled=false # Disable PostgreSQL
line.tcp.enabled=false # Disable ILP
http.enabled=false # Disable Web Console & REST API
http.security.readonly=true # Or make HTTP read-only
Marketplace AMI:
Stop QuestDB:
sudo systemctl stop questdb
Back up data:
sudo cp -r /var/lib/questdb /var/lib/questdb.backup
Download new version:
<InterpolateReleaseData
renderText={(release) => (
<CodeBlock className="language-bash">
{wget https://github.com/questdb/questdb/releases/download/${release.name}/questdb-${release.name}-no-jre-bin.tar.gz tar xzf questdb-${release.name}-no-jre-bin.tar.gz sudo cp questdb-${release.name}-no-jre-bin/questdb.jar /usr/local/bin/questdb.jar}
</CodeBlock>
)}
/>
sudo systemctl start questdb
Manual deployments: Follow upgrade steps for Docker or systemd.
Health check:
curl http://localhost:9003/status
Prometheus metrics:
curl http://localhost:9003/metrics
CloudWatch integration:
Use the CloudWatch agent to collect:
/var/lib/questdb/log/QuestDB Enterprise adds production features for AWS: