1"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([["1528"],{96489:function(e,n,s){s.r(n),s.d(n,{frontMatter:()=>o,toc:()=>u,default:()=>j,metadata:()=>r,assets:()=>h,contentTitle:()=>a});var r=JSON.parse('{"id":"deployment/azure","title":"Deploying QuestDB on Azure","description":"Deploy QuestDB on Microsoft Azure using Virtual Machines, with instance sizing, storage, and networking recommendations.","source":"@site/documentation/deployment/azure.md","sourceDirName":"deployment","slug":"/deployment/azure","permalink":"/docs/deployment/azure","draft":false,"unlisted":false,"editUrl":"https://github.com/questdb/documentation/edit/main/documentation/deployment/azure.md","tags":[],"version":"current","frontMatter":{"title":"Deploying QuestDB on Azure","sidebar_label":"Azure","description":"Deploy QuestDB on Microsoft Azure using Virtual Machines, with instance sizing, storage, and networking recommendations."},"sidebar":"docs","previous":{"title":"AWS","permalink":"/docs/deployment/aws"},"next":{"title":"GCP","permalink":"/docs/deployment/gcp"}}'),i=s(85893),t=s(50065),l=s(97597),c=s(18215),d=s(52601);let o={title:"Deploying QuestDB on Azure",sidebar_label:"Azure",description:"Deploy QuestDB on Microsoft Azure using Virtual Machines, with instance sizing, storage, and networking recommendations."},a=void 0,h={},u=[{value:"Quick reference",id:"quick-reference",level:2}
1,{value:"Infrastructure",id:"infrastructure",level:2},{value:"Instance sizing",id:"instance-sizing",level:3},{value:"Storage",id:"storage",level:3},{value:"Networking",id:"networking",level:3},{value:"Deployment",id:"deployment",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Create the VM",id:"create-the-vm",level:3},{value:"Configure networking",id:"configure-networking",level:3},{value:"Install QuestDB",id:"install-questdb",level:3},{value:"Security",id:"security",level:2},{value:"Change default credentials",id:"change-default-credentials",level:3},{value:"Disable unused interfaces",id:"disable-unused-interfaces",level:3},{value:"Operations",id:"operations",level:2},{value:"Upgrading",id:"upgrading",level:3},{value:"Monitoring",id:"monitoring",level:3},{value:"Enterprise on Azure",id:"enterprise-on-azure",level:2},{value:"Buy through Azure Marketplace",id:"buy-through-azure-marketplace",level:3}];function x(e){let n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"quick-reference",children:"Quick reference"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Component"}),(0,i.jsx)(n.th,{children:"Recommended"}),(0,i.jsx)(n.th,{children:"Notes"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Instance"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.code,{children:"D4s_v5"})," or ",(0,i.jsx)(n.code,{children:"E8s_v5"})]}),(0,i.jsx)(n.td,{children:"4-8 vCPUs, 16-64 GiB RAM"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Storage"}),(0,i.jsx)(n.td,{children:"Premium SSD v2, 200+ GiB"}),(0,i.jsx)(n.td,{children:"16000 IOPS / 1000 MBps"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"File system"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.code,{children:"zfs"})," with ",(0,i.jsx)(n.code,{children:"lz4"})]}),(0,i.jsxs)(n.td,{children:["Or ",(0,i.jsx)(n.code,{children:"ext4"})," if compression not needed"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Ports"}),(0,i.jsx)(n.td,{children:"9000, 8812, 9009, 9003"}),(0,i.jsx)(n.td,{children:"Restrict to known IPs only"})]})]})]}),"\n",(0,i.jsx)(n.hr,{}
1),"\n",(0,i.jsx)(n.h2,{id:"infrastructure",children:"Infrastructure"}),"\n",(0,i.jsx)(n.p,{children:"Plan your infrastructure before launching. This section covers instance types,\nstorage, and networking requirements."}),"\n",(0,i.jsx)(n.h3,{id:"instance-sizing",children:"Instance sizing"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Workload"}),(0,i.jsx)(n.th,{children:"Instance"}),(0,i.jsx)(n.th,{children:"vCPUs"}),(0,i.jsx)(n.th,{children:"RAM"}),(0,i.jsx)(n.th,{children:"Use case"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Development"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"D2s_v5"})}),(0,i.jsx)(n.td,{children:"2"}),(0,i.jsx)(n.td,{children:"8 GiB"}),(0,i.jsx)(n.td,{children:"Testing, small datasets"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Production (starter)"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"D4s_v5"})}),(0,i.jsx)(n.td,{children:"4"}),(0,i.jsx)(n.td,{children:"16 GiB"}),(0,i.jsx)(n.td,{children:"Light ingestion, moderate queries"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Production (standard)"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"E8s_v5"})}),(0,i.jsx)(n.td,{children:"8"}),(0,i.jsx)(n.td,{children:"64 GiB"}),(0,i.jsx)(n.td,{children:"High ingestion, complex queries"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Production (heavy)"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"E16s_v5"})}),(0,i.jsx)(n.td,{children:"16"}),(0,i.jsx)(n.td,{children:"128 GiB"}),(0,i.jsx)(n.td,{children:"Heavy workloads, large datasets"})]})]})]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Understanding Azure instance names:"})}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Letter"}),(0,i.jsx)(n.th,{children:"Meaning"}),(0,i.jsx)(n.th,{children:"Recommendation"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"D"})}),(0,i.jsx)(n.td,{children:"General purpose"}),(0,i.jsx)(n.td,{children:"Good starting point"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"E"})}),(0,i.jsx)(n.td,{children:"Memory optimized"}),(0,i.jsx)(n.td,{children:"Better for large datasets"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"s"})}),(0,i.jsx)(n.td,{children:"Premium storage capable"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.strong,{children:"Required"})," for QuestDB"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"a"})}),(0,i.jsx)(n.td,{children:"AMD EPYC processor"}),(0,i.jsx)(n.td,{children:"Similar performance, often cheaper"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"p"})}),(0,i.jsx)(n.td,{children:"ARM architecture"}),(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.strong,{children:"Avoid"})," - limited optimization support"]})]})]})]}),"\n",(0,i.jsxs)(n.p,{children:["Always choose instances with ",(0,i.jsx)(n.code,{children:"s"})," in the name for Premium SSD support."]}
1),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"ARM instances:"})}),"\n",(0,i.jsxs)(n.p,{children:["Azure ARM instances (Cobalt, Ampere) are not recommended. QuestDB's JIT\ncompilation and SIMD optimizations are limited on ARM. Use ",(0,i.jsx)(n.code,{children:"x86_64"})," instances."]}),"\n",(0,i.jsx)(n.h3,{id:"storage",children:"Storage"}),"\n",(0,i.jsxs)(n.admonition,{type:"caution",children:[(0,i.jsxs)(n.p,{children:["Be extremely cautious when enabling ",(0,i.jsx)(n.a,{href:"https://learn.microsoft.com/en-us/azure/virtual-machines/premium-storage-performance#disk-caching",children:"Disk Caching"}),". You should not use ",(0,i.jsx)(n.code,{children:"ReadWrite"})," caching for the database files under any circumstances, as it breaks the consistency guarantess that the database relies on. Microsoft explicitly discourages its use for ",(0,i.jsx)(n.a,{href:"https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/storage-configuration?view=azuresql&utm_source=chatgpt.com&tabs=windows2016#new-vms",children:"database deployments"}),"."]}),(0,i.jsx)(n.p,{children:"Failing to follow this instruction may put your data at risk of corruption,"})]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Premium SSD v2 (recommended):"})}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Workload"}),(0,i.jsx)(n.th,{children:"Size"}),(0,i.jsx)(n.th,{children:"IOPS"}),(0,i.jsx)(n.th,{children:"Throughput"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Development"}),(0,i.jsx)(n.td,{children:"50 GiB"}),(0,i.jsx)(n.td,{children:"3000"}),(0,i.jsx)(n.td,{children:"125 MBps"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Production"}),(0,i.jsx)(n.td,{children:"200+ GiB"}),(0,i.jsx)(n.td,{children:"16000"}),(0,i.jsx)(n.td,{children:"1000 MBps"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"High I/O"}),(0,i.jsx)(n.td,{children:"500+ GiB"}),(0,i.jsx)(n.td,{children:"16000+"}),(0,i.jsx)(n.td,{children:"1000+ MBps"})]})]})]}),"\n",(0,i.jsx)(n.p,{children:"Premium SSD v2 lets you provision IOPS and throughput independently of size.\nSeparate your OS disk (30 GiB) from your data disk."}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["Premium SSD v2 throughput is limited by VM size. Check your instance's\nmaximum disk throughput in the\n",(0,i.jsx)(n.a,{href:"https://learn.microsoft.com/en-us/azure/virtual-machines/sizes",children:"Azure documentation"}),"\nbefore provisioning."]})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Premium SSD (alternative):"})}),"\n",(0,i.jsx)(n.p,{children:"If Premium SSD v2 is unavailable, use Premium SSD with these minimum sizes:"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Tier"}),(0,i.jsx)(n.th,{children:"Size"}),(0,i.jsx)(n.th,{children:"IOPS"}),(0,i.jsx)(n.th,{children:"Throughput"}),(0,i.jsx)(n.th,{children:"Use case"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"P20"}),(0,i.jsx)(n.td,{children:"512 GiB"}),(0,i.jsx)(n.td,{children:"2300"}),(0,i.jsx)(n.td,{children:"150 MBps"}),(0,i.jsx)(n.td,{children:"Development"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"P30"}),(0,i.jsx)(n.td,{children:"1 TiB"}),(0,i.jsx)(n.td,{children:"5000"}),(0,i.jsx)(n.td,{children:"200 MBps"}),(0,i.jsx)(n.td,{children:"Light production"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"P40"}),(0,i.jsx)(n.td,{children:"2 TiB"}),(0,i.jsx)(n.td,{children:"7500"}),(0,i.jsx)(n.td,{children:"250 MBps"}),(0,i.jsx)(n.td,{children:"Production"})]})]})]}),"\n",(0,i.jsx)(n.p,{children:"Premium SSD ties performance to disk size - you may need to over-provision\ncapacity to get required IOPS."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Redundancy considerations:"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Premium SSD v2 only supports locally-redundant storage (LRS)"}),"\n",(0,i.jsx)(n.li,{children:"Premium SSD supports zone-redundant storage (ZRS)"}),"\n",(0,i.jsx)(n.li,{children:"For LRS disks, take regular ZRS snapshots or use QuestDB Enterprise replication"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"File system:"})}),"\n",(0,i.jsxs)(n.p,{children:["Use ",(0,i.jsx)(n.code,{children:"zfs"})," with ",(0,i.jsx)(n.code,{children:"lz4"})," compression to reduce storage costs. If you don't need\ncompression, ",(0,i.jsx)(n.code,{children:"ext4"})," or ",(0,i.jsx)(n.code,{children:"xfs"})," offer slightly better performance."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Unsupported storage:"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Azure NetApp Files"})," - Not supported as primary storage (NFS latency too high)"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"blobfuse2"})," - Not supported for database workloads"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Blob Storage"})," - Supported for Enterprise replication only, not primary storage"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"networking",children:"Networking"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Network Security Group (NSG) rules:"})}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Port"}),(0,i.jsx)(n.th,{children:"Protocol"}),(0,i.jsx)(n.th,{children:"Source"}),(0,i.jsx)(n.th,{children:"Purpose"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"22"}),(0,i.jsx)(n.td,{children:"TCP"}),(0,i.jsx)(n.td,{children:"Your IP"}),(0,i.jsx)(n.td,{children:"SSH access"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"9000"}),(0,i.jsx)(n.td,{children:"TCP"}),(0,i.jsx)(n.td,{children:"Your IP / VNet"}),(0,i.jsx)(n.td,{children:"Web Console & REST API"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"8812"}),(0,i.jsx)(n.td,{children:"TCP"}),(0,i.jsx)(n.td,{children:"Your IP / VNet"}),(0,i.jsx)(n.td,{children:"PostgreSQL wire protocol"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"9009"}),(0,i.jsx)(n.td,{children:"TCP"}),(0,i.jsx)(n.td,{children:"Application servers"}),(0,i.jsx)(n.td,{children:"InfluxDB line protocol"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"9003"}),(0,i.jsx)(n.td,{children:"TCP"}),(0,i.jsx)(n.td,{children:"Monitoring servers"}),(0,i.jsx)(n.td,{children:"Health check & Prometheus"})]})]})]}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsxs)(n.p,{children:["Never set source to ",(0,i.jsx)(n.code,{children:"*"})," or ",(0,i.jsx)(n.code,{children:"Any"})," for ports 9000, 8812, or 9009. Restrict access\nto known IP ranges or use Azure Bastion for secure access."]})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"VNet recommendations:"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Deploy QuestDB in a private subnet"}),"\n",(0,i.jsx)(n.li,{children:"Use Azure Bastion or a jump box for SSH access"}),"\n",(0,i.jsx)(n.li,{children:"Use Private Endpoints for Blob Storage (Enterprise replication)"}),"\n",(0,i.jsx)(n.li,{children:"Consider proximity placement groups for low-latency application access"}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"deployment",children:"Deployment"}),"\n",(0,i.jsx)(n.p,{children:"Deploy QuestDB on an Azure Virtual Machine."}),"\n",(0,i.jsx)(n.h3,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://azure.microsoft.com/",children:"Microsoft Azure account"})," with billing enabled"]}),"\n",(0,i.jsx)(n.li,{children:"SSH key pair for secure access"}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"create-the-vm",children:"Create the VM"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["In the Azure Portal, navigate to ",(0,i.jsx)(n.strong,{children:"Virtual Machines"})]}),"\n",(0,i.jsxs)(n.li,{children:["Click ",(0,i.jsx)(n.strong,{children:"Create"})," \u2192 ",(0,i.jsx)(n.strong,{children:"Azure virtual machine"})]}),"\n",(0,i.jsxs)(n.li,{children:["Configure basics:","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Select or create a ",(0,i.jsx)(n.strong,{children:"Resource group"})]}),"\n",(0,i.jsxs)(n.li,{children:["Enter a ",(0,i.jsx)(n.strong,{children:"Virtual machine name"})]}),"\n",(0,i.jsxs)(n.li,{children:["Select your ",(0,i.jsx)(n.strong,{children:"Region"})," and ",(0,i.jsx)(n.strong,{children:"Availability zone"})]}),"\n",(0,i.jsxs)(n.li,{children:["Choose ",(0,i.jsx)(n.strong,{children:"Ubuntu 24.04 LTS"})," for the image"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(l.Z,{alt:"The Create Instance dialog on Microsoft Azure",src:"images/guides/microsoft-azure-ubuntu/create-vm.webp",width:450,title:"Azure VM creation dialog"}),"\n",(0,i.jsxs)(n.ol,{start:"4",children:["\n",(0,i.jsxs)(n.li,{children:["Select your instance size (see ",(0,i.jsx)(n.a,{href:"#instance-sizing",children:"Instance sizing"}),")"]}),"\n",(0,i.jsxs)(n.li,{children:["Configure SSH authentication:","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Select ",(0,i.jsx)(n.strong,{children:"SSH public key"})]}),"\n",(0,i.jsx)(n.li,{children:"Create a new key pair or use existing"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(l.Z,{alt:"SSH key configuration on Microsoft Azure",src:"images/guides/microsoft-azure-ubuntu/ssh-setup.webp",width:450,title:"SSH key setup"}),"\n",(0,i.jsxs)(n.ol,{start:"6",children:["\n",(0,i.jsxs)(n.li,{children:["Click ",(0,i.jsx)(n.strong,{children:"Review + create"}),", then ",(0,i.jsx)(n.strong,{children:"Create"})]}),"\n",(0,i.jsx)(n.li,{children:"Download the private key when prompted"}),"\n"]}
1),"\n",(0,i.jsx)(l.Z,{alt:"Deployment complete on Microsoft Azure",src:"images/guides/microsoft-azure-ubuntu/deployment-complete.webp",width:450,title:"Deployment complete"}),"\n",(0,i.jsx)(n.h3,{id:"configure-networking",children:"Configure networking"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Go to your VM's ",(0,i.jsx)(n.strong,{children:"Networking"})," settings"]}),"\n",(0,i.jsxs)(n.li,{children:["Click ",(0,i.jsx)(n.strong,{children:"Add inbound port rule"})]}),"\n",(0,i.jsxs)(n.li,{children:["Add rules for QuestDB ports (see ",(0,i.jsx)(n.a,{href:"#networking",children:"Networking"}),"):","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Set ",(0,i.jsx)(n.strong,{children:"Destination port ranges"})," to ",(0,i.jsx)(n.code,{children:"9000,8812,9003"})]}),"\n",(0,i.jsxs)(n.li,{children:["Set ",(0,i.jsx)(n.strong,{children:"Source"})," to your IP range (not ",(0,i.jsx)(n.code,{children:"Any"}),")"]}),"\n",(0,i.jsxs)(n.li,{children:["Set ",(0,i.jsx)(n.strong,{children:"Protocol"})," to ",(0,i.jsx)(n.code,{children:"TCP"})]}),"\n",(0,i.jsxs)(n.li,{children:["Name the rule ",(0,i.jsx)(n.code,{children:"questdb"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(l.Z,{alt:"Network security group rules for QuestDB",src:"images/guides/microsoft-azure-ubuntu/firewall-rules.webp",width:450,title:"NSG rules configured"}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsx)(n.p,{children:"Only add port 9009 if you need ILP ingestion, and restrict the source to your\napplication servers."})}),"\n",(0,i.jsx)(n.h3,{id:"install-questdb",children:"Install QuestDB"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Connect via SSH:"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"chmod 400 ~/Downloads/your_key.pem\nssh -i ~/Downloads/your_key.pem azureuser@<your-vm-ip>\n"})}),"\n",(0,i.jsxs)(n.ol,{start:"2",children:["\n",(0,i.jsx)(n.li,{children:"Download and start QuestDB:"}),"\n"]}),"\n",(0,i.jsx)(c.Z,{renderText:e=>(0,i.jsx)(d.Z,{className:"language-bash",children:`wget https://github.com/questdb/questdb/releases/download/${e.name}/questdb-${e.name}-rt-linux-x86-64.tar.gz 2tar xzf questdb-${e.name}-rt-linux-x86-64.tar.gz 3cd questdb-${e.name}-rt-linux-x86-64/bin 4./questdb.sh start`})}),"\n",(0,i.jsxs)(n.ol,{start:"3",children:["\n",(0,i.jsxs)(n.li,{children:["Access the Web Console at ",(0,i.jsx)(n.code,{children:"http://<your-vm-ip>:9000"})]}),"\n"]}),"\n",(0,i.jsx)(l.Z,{alt:"QuestDB Web Console running on Azure",src:"images/guides/microsoft-azure-ubuntu/web-console.webp",width:450,title:"Web Console ready"}),"\n",(0,i.jsxs)(n.p,{children:["For production deployments, use ",(0,i.jsx)(n.a,{href:"/docs/deployment/systemd/",children:"systemd"})," to manage\nthe QuestDB service."]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"security",children:"Security"}),"\n",(0,i.jsx)(n.h3,{id:"change-default-credentials",children:"Change default credentials"}),"\n",(0,i.jsx)(n.p,{children:"Update credentials immediately after deployment."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Web Console and REST API"})," - edit ",(0,i.jsx)(n.code,{children:"conf/server.conf"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ini",children:"http.user=your_username\nhttp.password=your_secure_password\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"PostgreSQL"})," - edit ",(0,i.jsx)(n.code,{children:"conf/server.conf"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ini",children:"pg.user=your_username\npg.password=your_secure_password\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"InfluxDB line protocol"})," - edit ",(0,i.jsx)(n.code,{children:"conf/auth.json"}),". See\n",(0,i.jsx)(n.a,{href:"/docs/connect/compatibility/ilp/overview/#authentication",children:"ILP authentication"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"Restart after changes:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"./questdb.sh stop\n./questdb.sh start\n"})}),"\n",(0,i.jsx)(n.h3,{id:"disable-unused-interfaces",children:"Disable unused interfaces"}),"\n",(0,i.jsx)(n.p,{children:"Reduce attack surface by disabling protocols you don't use:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ini",metastring:'title="conf/server.conf"',children:"pg.enabled=false # Disable PostgreSQL\nline.tcp.enabled=false # Disable ILP\nhttp.enabled=false # Disable Web Console & REST API\nhttp.security.readonly=true # Or make HTTP read-only\n"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"operations",children:"Operations"}),"\n",(0,i.jsx)(n.h3,{id:"upgrading",children:"Upgrading"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Stop QuestDB:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"./questdb.sh stop\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Back up your data directory"}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Download and extract the new version:"}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(c.Z,{renderText:e=>(0,i.jsx)(d.Z,{className:"language-bash",children:`wget https://github.com/questdb/questdb/releases/download/${e.name}/questdb-${e.name}-rt-linux-x86-64.tar.gz 5tar xzf questdb-${e.name}-rt-linux-x86-64.tar.gz`})}),"\n",(0,i.jsxs)(n.ol,{start:"4",children:["\n",(0,i.jsxs)(n.li,{children:["Start the new version:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"cd questdb-*/bin\n./questdb.sh start\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"monitoring",children:"Monitoring"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Health check:"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl http://localhost:9003/status\n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Prometheus metrics:"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl http://localhost:9003/metrics\n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Azure Monitor integration:"})}),"\n",(0,i.jsx)(n.p,{children:"Use the Azure Monitor agent to collect:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"VM metrics (CPU, memory, disk I/O)"}),"\n",(0,i.jsxs)(n.li,{children:["QuestDB logs from the ",(0,i.jsx)(n.code,{children:"log/"})," directory"]}),"\n",(0,i.jsx)(n.li,{children:"Custom metrics from the Prometheus endpoint"}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"enterprise-on-azure",children:"Enterprise on Azure"}),"\n",(0,i.jsx)(n.p,{children:"QuestDB Enterprise adds production features for Azure:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Blob Storage replication"})," - Continuous backup for durability"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Cold storage"})," - Move old partitions to Blob Storage, query on-demand"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"High availability"})," - Automatic failover across instances"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"EntraID SSO"})," - Single sign-on with Microsoft Entra ID"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["For EntraID integration, see the\n",(0,i.jsx)(n.a,{href:"/docs/security/oidc/#microsoft-entraid",children:"Microsoft EntraID OIDC guide"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/docs/getting-started/enterprise-quick-start/",children:"Enterprise Quick Start"})," for setup."]}),"\n",(0,i.jsx)(n.h3,{id:"buy-through-azure-marketplace",children:"Buy through Azure Marketplace"}),"\n",(0,i.jsxs)(n.p,{children:["QuestDB Enterprise is listed on\n",(0,i.jsx)(n.a,{href:"https://marketplace.microsoft.com/en-us
5/product/questdb_com.c5f84985-0214-403e-bdd3-5d436252a35b",children:"Azure Marketplace"}),".\nBuying through the listing puts QuestDB Enterprise on your existing Azure\ninvoice and uses your organization's existing Azure procurement process."]}),"\n",(0,i.jsx)(n.p,{children:"The listing is a purchasing route, not a hosted service. QuestDB Enterprise\nstill runs in your own Azure subscription, on Virtual Machines, Docker or\nKubernetes. The infrastructure guidance on this page applies."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Steps:"})}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Contact ",(0,i.jsx)(n.a,{href:"mailto:[email protected]",children:"[email protected]"})," to agree scope, term\nand pricing. Subscriptions are priced per deployment."]}),"\n",(0,i.jsx)(n.li,{children:"QuestDB sends a private offer to your Azure account."}),"\n",(0,i.jsx)(n.li,{children:"Accept the private offer and subscribe through Azure Marketplace."}),"\n",(0,i.jsx)(n.li,{children:"Once the subscription is active, QuestDB provides access to the Enterprise\nbinaries or container images, along with deployment guidance from QuestDB\nengineers."}),"\n",(0,i.jsxs)(n.li,{children:["Follow the\n",(0,i.jsx)(n.a,{href:"/docs/getting-started/enterprise-quick-start/",children:"Enterprise Quick Start"})," to\ninstall and configure your instance."]}),"\n"]})]})}function j(e={}){let{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(x,{...e})}):x(e)}},18215:function(e,n,s){s.d(n,{Z:()=>i});var r=s(48698);let i=e=>{let{renderText:n}=e,{release:s}=(0,r.eZ)("fetch-latest-release");return n(s)}},52601:function(e,n,s){s.d(n,{Z:()=>C});var r=s(67294),i=s(87039),t=s(67026),l=s(65852),c=s(34036),d=s(91914),o=s(85893);function a(e){let{as:n,...s}=e,r=(0,l.p)(),i=(0,d.QC)(r);return(0,o.jsx)(n,{...s,style:i,className:(0,t.Z)(s.className,"codeBlockContainer_APcc",c.k.common.codeBlock)})}let h={codeBlockContent:"codeBlockContent_m3Ux",codeBlockTitle:"codeBlockTitle_P25_",demoLink:"demoLink_Z4SZ",codeBlock:"codeBlock_qGQc",codeBlockStandalone:"codeBlockStandalone_zC50",codeBlockLines:"codeBlockLines_p187",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_OFgW",buttonGroup:"buttonGroup_6DOT"};function u(e){let{children:n,className:s,demo:r}=e;return(0,o.jsx)(a,{as:"pre",tabIndex:0,className:(0,t.Z)(h.codeBlockStandalone,"thin-scrollbar",s),children:(0,o.jsxs)("code",{className:h.codeBlockLines,children:[n,r&&(0,o.jsx)("a",{href:r,className:h.demoLink,children:"Demo this query"})]})})}var x=s(21641),j=s(46714),p=s(83229);function m(e){let{line:n,classNames:s,showLineNumbers:r,getLineProps:i,getTokenProps:l}=e;1===n.length&&"\n"===n[0].content&&(n[0].content="");let c=i({line:n,className:(0,t.Z)(s,r&&"codeLine_iPqp")}),d=n.map((e,n)=>(0,o.jsx)("span",{...l({token:e})},n));return(0,o.jsxs)("span",{...c,children:[r?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:"codeLineNumber_F4P7"}),(0,o.jsx)("span",{className:"codeLineContent_pOih",children:d})]}):d,(0,o.jsx)("br",{})]})}var g=s(64337),b=s(14709),f=s(91977),y=s(3241);let k={copyButtonCopied:"copyButtonCopied__QnY",copyButtonIcons:"copyButtonIcons_FhaS",copyButtonIcon:"copyButtonIcon_phi_",copyButtonSuccessIcon:"copyButtonSuccessIcon_FfTR"};function v(e){let{code:n,className:s}=e,[i,l]=(0,r.useState)(!1),c=(0,r.useRef)(void 0),d=(0,r.useCallback)(()=>{(0,g.Z)(n),l(!0),window.posthog&&window.posthog.capture("snippet_copied"),c.current=window.setTimeout(()=>{l(!1)},1e3)},[n]);return(0,r.useEffect)(()=>()=>window.clearTimeout(c.current),[]),(0,o.jsx)("button",{type:"button","aria-label":i?(0,b.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,b.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,b.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,t.Z)("clean-btn",s,k.copyButton,i&&k.copyButtonCopied),onClick:d,children:(0,o.jsxs)("span",{className:k.copyButtonIcons,"aria-hidden":"true",children:[(0,o.jsx)(f.Z,{className:k.copyButtonIcon}),(0,o.jsx)(y.Z,{className:k.copyButtonSuccessIcon})]})})}var S=s(86736);function B(e){let{className:n,onClick:s,isEnabled:r}=e,i=(0,b.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,o.jsx)("button",{type:"button",onClick:s,className:(0,t.Z)("clean-btn",n,r&&"wordWrapButtonEnabled_gY8A"),"aria-label":i,title:i,children:(0,o.jsx)(S.Z,{className:"wordWrapButtonIcon_iowe","aria-hidden":"true"})})}let w=/title=(?<quote>["'])(?<title>.*?)\1/,z=/\bdemo\b/;function D(e){var n;let{children:s,className:r="",metastring:i,title:c,showLineNumbers:u,language:g,demo:b}=e,{prism:{defaultLanguage:f,magicComments:y}}=(0,x.L)(),k=(n=g??(0,d.Fz)(r)??f,n?.toLowerCase()),S=(0,l.p)(),D=(0,j.F)(),C=(i?.match(w)?.groups?.title??"")||c,P=z.test(i??"")||b,{lineClassNames:A,code:N}=(0,d.nZ)(s,{metastring:i,language:k,magicComments:y}),I=u??(0,d.nt)(i),_=P?`https://demo.questdb.io/?query=${encodeURIComponent(N)}&executeQuery=true`:null;return(0,o.jsxs)(a,{as:"div",className:(0,t.Z)(r,k&&!r.includes(`language-${k}`)&&`language-${k}
5`),children:[C&&(0,o.jsxs)("div",{className:h.codeBlockTitle,children:[(0,o.jsx)("span",{children:C}),_&&(0,o.jsx)("a",{href:_,className:h.demoLink,target:"_blank",rel:"noopener noreferrer",onClick:()=>{window.posthog?.capture("demo_started",{title:C})},children:"Demo this query"})]}),(0,o.jsxs)("div",{className:h.codeBlockContent,children:[(0,o.jsx)(p.y$,{theme:S,code:N,language:k??"text",children:e=>{let{className:n,style:s,tokens:r,getLineProps:i,getTokenProps:l}=e;return(0,o.jsx)("pre",{tabIndex:0,ref:D.codeBlockRef,className:(0,t.Z)(n,h.codeBlock,"thin-scrollbar"),style:s,children:(0,o.jsx)("code",{className:(0,t.Z)(h.codeBlockLines,I&&h.codeBlockLinesWithNumbering),children:r.map((e,n)=>(0,o.jsx)(m,{line:e,getLineProps:i,getTokenProps:l,classNames:A[n],showLineNumbers:I},n))})})}}),(0,o.jsxs)("div",{className:h.buttonGroup,children:[(D.isEnabled||D.isCodeScrollable)&&(0,o.jsx)(B,{className:h.codeButton,onClick:()=>D.toggle(),isEnabled:D.isEnabled}),(0,o.jsx)(v,{className:h.codeButton,code:N})]})]})]})}function C(e){let{children:n,demo:s,...t}=e,l=(0,i.Z)(),c=r.Children.toArray(n).some(e=>(0,r.isValidElement)(e))?n:Array.isArray(n)?n.join(""):n;return(0,o.jsx)("string"==typeof c?D:u,{demo:s,...t,children:c},String(l))}},97597:function(e,n,s){s.d(n,{Z:()=>c});var r=s(67026),i=s(67294),t=s(8043),l=s(85893);let c=e=>{let{alt:n,height:s,margin:c=!0,shadow:d=!0,small:o=!1,src:a,title:h,jumbo:u,width:x,forceTheme:j}=e,[p,m]=(0,i.useState)(!1),g=(0,t.ZP)(a);return(0,l.jsx)("figure",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,l.jsx)("img",{onClick:()=>m(!p),alt:n,className:(0,r.Z)("image_HE_9",{zoomed_HqYu:p,margin_bMKj:c,shadow_mdv0:d,small_mrhT:o,jumbo_b62d:u,title_MXom:null!=h,forceDark_zB5H:"dark"===j,forceLight_gkTt:"light"===j}),height:s,src:g,width:x,loading:"lazy"}),null!=h&&(0,l.jsx)("figcaption",{className:"caption_i07J",children:h})]})})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.