Development13 min read•Updated November 2026

VPS Hosting for Apache Kafka

Quick answer

To run Apache Kafka on VPS servers, use a current release in KRaft mode (Kafka 4.0 removed ZooKeeper), with a single broker for development or modest non-critical use and three or more brokers for production. Create topics with enough partitions for consumer parallelism, replication factor 3 and min.insync.replicas=2, and have producers use acks=all with idempotence. Size disks for retention, keep a modest JVM heap and leave most RAM for the operating system's page cache, secure listeners with TLS and authentication, and monitor under-replicated partitions, consumer lag and disk usage.

Kafka is a distributed event streaming platform: producers append events to topics, and many consumers read them independently, at their own pace, with the ability to replay history. It powers activity tracking, change data capture, log pipelines, analytics and event-driven microservices. Self-hosting on VPS servers is practical for teams that understand its operational needs, and it can be far cheaper than managed streaming services at steady volumes.

Key Concepts

  • Topics are named event streams, split into partitions for parallelism.
  • Each partition is replicated across brokers; one replica is the leader.
  • Consumer groups share partitions among consumers; each group tracks its own offsets.
  • Retention keeps events for a time or size limit, or forever with log compaction for keyed data.

KRaft Mode

Kafka now manages cluster metadata with its own Raft-based controller quorum (KRaft) instead of ZooKeeper, which was removed in Kafka 4.0. New deployments should use KRaft. In small clusters, nodes can act as both broker and controller; larger clusters often run three dedicated controllers. Older ZooKeeper-based clusters must migrate before upgrading to 4.x, following the official migration guide.

Single Node or Cluster

SetupDurabilityUse
One broker (combined mode)No replication; server loss stops the streamDevelopment, testing, non-critical pipelines
Three brokersReplication factor 3, survives one broker failure with writes continuingProduction

Place brokers on separate servers with low-latency private networking in the same region.

Durability Settings

  • Topics: replication factor 3 and min.insync.replicas=2.
  • Producers: acks=all and idempotence enabled (the default in recent clients), with retries.
  • Disable unclean leader election so out-of-date replicas cannot become leaders and lose data.
  • Consumers: commit offsets after processing, and make processing idempotent, since replays and rebalances can deliver events again.

Partitions

The number of partitions limits consumer parallelism within a group: ten partitions allow up to ten active consumers. Choose a number that covers expected growth, because increasing partitions later changes how keys map to partitions. Avoid thousands of tiny partitions on small clusters; each adds overhead.

Retention and Disk Planning

Disk usage is roughly: ingest rate × retention period × replication factor, plus headroom. For example, 2 MB/s for 7 days with replication factor 3 needs about 3.6 TB across the cluster before headroom. Use fast NVMe, monitor free space carefully (a full disk takes a broker offline), and lower retention or add brokers before you run out. Consider tiered storage features in recent versions for long retention, where supported by your setup.

Memory: Heap and Page Cache

Kafka relies heavily on the operating system's page cache for fast reads of recent data. Give the JVM a moderate heap (a few gigabytes is common) and leave the rest of RAM free for the page cache. Avoid swap for broker processes, and do not co-locate memory-hungry services on brokers.

Security

  • Use TLS for client and inter-broker listeners across networks.
  • Authenticate clients with SASL (SCRAM or mutual TLS).
  • Use ACLs so each service can only read or write its topics.
  • Keep broker and controller ports on private networks.

Ecosystem Tools

Common companions include a schema registry for Avro, Protobuf or JSON schemas, Kafka Connect for moving data in and out of databases and storage, and web UIs for browsing topics and consumer groups. Each is another service to secure and size; add them only when needed.

Monitoring

Expose JMX metrics through an exporter for Prometheus. Alert on under-replicated and offline partitions, active controller count, request latency, disk usage, and consumer lag for important groups. Consumer lag is often the first sign that a downstream service is failing (see our monitoring guide).

Upgrades and Maintenance

Perform rolling upgrades one broker at a time, waiting for partitions to be fully replicated before moving on. Read the upgrade notes for each release, especially around metadata versions. Rebalance partitions when adding brokers, and test failure scenarios (stopping a broker) in staging.

Do You Need Kafka?

Kafka is powerful but operationally heavy. For job queues with acknowledgement and routing, RabbitMQ is often simpler (see our RabbitMQ guide). For modest event streams, Redis Streams or NATS JetStream may be enough. Kafka-compatible alternatives such as Redpanda offer the Kafka API with a different architecture. Choose Kafka when you need high throughput, long retention and many independent consumers.

Sizing

SetupSuggested plans
Development or small non-critical pipeline1 × 4 vCores / 16 GB
Production with moderate throughput3 × 8 vCores / 32 GB with NVMe
High throughput or long retentionMore brokers or dedicated servers with large disks

Example: Analytics Events

A consumer app sends click and purchase events to a three-broker KRaft cluster on 8 vCore / 32 GB VPS servers. The events topic has 12 partitions, replication factor 3 and 7-day retention. A stream processor builds real-time dashboards, Kafka Connect writes events to an analytics database, and alerts fire when consumer lag exceeds five minutes.

Common Mistakes

  • Single-broker production with no replication.
  • Replication factor 3 but acks=1 producers.
  • Huge JVM heaps that starve the page cache.
  • No disk alerts until a broker fills up.
  • Choosing Kafka for simple job queues.

In Short

Use KRaft, three brokers for production, replication factor 3 with min.insync.replicas 2 and acks=all, plan disks for retention, leave RAM for page cache, secure listeners, and watch replication and consumer lag.

SkyRainCloud Plans for This Workload

Kafka loves RAM for page cache and fast disks. A single 4 vCore / 16 GB broker suits development and modest workloads; production clusters typically use three 8 vCore / 32 GB brokers with ample NVMe.

AMD EPYC 7C13 VPS

Dedicated KVM vCores on AMD EPYC 7C13 (up to 3.70 GHz) with DDR4 ECC memory, NVMe SSD and an unmetered 1 Gbps port.

PlanvCoresRAMStorageNetworkPriceGood forBuy
VPS 1 — AMD28 GB DDR4 ECC40 GB NVMe SSD1 Gbps, unmetered₹649/monthWebsites, small APIs, bots, staging and VPN serversOrder
VPS 2 — AMD416 GB DDR4 ECC80 GB NVMe SSD1 Gbps, unmetered₹1,299/monthWooCommerce, Node.js/Python backends, Docker Compose stacks, CI runnersOrder
VPS 3 — AMD832 GB DDR4 ECC150 GB NVMe SSD1 Gbps, unmetered₹2,499/monthProduction databases, high-traffic sites, multi-container appsOrder
VPS 4 — AMD1664 GB DDR4 ECC250 GB NVMe SSD1 Gbps, unmetered₹4,899/monthLarge production workloads, SaaS platforms, analytics, in-memory cachesOrder

Intel Xeon Platinum 8269CY VPS

KVM VPS on Intel Xeon Platinum 8269CY (up to 3.80 GHz Turbo) with DDR4 ECC memory, NVMe SSD, full root access and an unmetered 1 Gbps port.

PlanvCoresRAMStorageNetworkPriceGood forBuy
VPS 1 — Intel28 GB DDR4 ECC40 GB NVMe SSD1 Gbps, unmetered₹649/monthBusiness websites, small apps, scheduled jobs and botsOrder
VPS 2 — Intel416 GB DDR4 ECC80 GB NVMe SSD1 Gbps, unmetered₹1,169/monthBusiness software, mid-size databases, several sites on one serverCheck stock
VPS 3 — Intel832 GB DDR4 ECC150 GB NVMe SSD1 Gbps, unmetered₹2,249/monthERP/CRM stacks, heavier databases, multiple production appsCheck stock
VPS 4 — Intel1664 GB DDR4 ECC250 GB NVMe SSD1 Gbps, unmetered₹4,299/monthHigh-memory workloads and consolidated production serversCheck stock

Prices are monthly in INR as listed on the SkyRainCloud store (verified 2026-11-14). Stock and final pricing are shown on the product page at checkout.

Frequently Asked Questions

Does Kafka still need ZooKeeper?
No. Kafka uses KRaft mode for metadata, and ZooKeeper support was removed in Kafka 4.0.
How many brokers does production Kafka need?
Three is the usual minimum, allowing replication factor 3 and tolerance of one broker failure.
What replication settings should I use?
Replication factor 3, min.insync.replicas 2, and producers with acks=all and idempotence.
How much disk does Kafka need?
Roughly ingest rate times retention period times replication factor, plus headroom.
How much JVM heap should Kafka have?
A moderate heap, commonly a few gigabytes, leaving most RAM for the page cache.
How many partitions should a topic have?
Enough for the consumer parallelism you expect, without creating excessive tiny partitions.
What is consumer lag?
How far a consumer group is behind the latest events; rising lag signals slow or failing consumers.
How should Kafka be secured?
TLS listeners, SASL or mutual TLS authentication, ACLs per service and private networking.
Is Kafka better than RabbitMQ?
They serve different needs: Kafka for high-volume retained streams, RabbitMQ for task queues and routing.
Which plans suit Kafka?
A 4 vCore / 16 GB server for development; three 8 vCore / 32 GB brokers with NVMe for production.
Instant UPI • ₹649/mo
Fast KVM Cloud Provisioning