Nov 10, 2022
Benchmarking Aiven for Apache Kafka® throughput [2022 UPDATE]
We regularly measure the throughput performance of Aiven for Apache Kafka® - check out our latest test results in this post.
Knowledge is power. Once more we measured Apache Kafka® on the Aiven platform so that you can find a plan that fits your application workloads. Our goal is to measure performance of standard Aiven plans and configurations to let you choose the best plan for your workloads.
Disclaimer: Aiven services are region-dependent and constantly evolving. Running this benchmark in a different region or a different year may produce different results. Please contact Aiven for the most up-to-date information.
Benchmark setup
We tested three plans: Business-4, Business-8, and Premium-6x-8, on three cloud providers: AWS (us-east-1), GCP (us-east1), and Azure (eastus2). In all tests we used the default settings (spoiler: no need to tune these plans, write throughput reached the limits of cloud providers).
We measured sustainable write throughput. We kept the benchmarking running for 36-48 hours and measured the mean throughput for the last 24 hours. This way we exclude values that appear in a recently created cluster but cause overloading of brokers in the long run.
We used a single topic for our write operations with a partition count set to either 3 or 6, depending on the number of brokers. We set the replication factor to be 3. As the test clusters were regular Aiven services, the partitions and replicas were spread out across availability zones.
Messages were produced with the rdkafka_performance tool, which is based on the C/C++ library librdkafka. Each message had a size of 512 bytes. Each 'produce' request used no compression and was sending batches of 10,000 messages. Client connections were made over TLS and stayed connected for the duration of the tests.
At the time of testing we used Kafka 3.2 running on Java 17.
Aiven for Apache Kafka: Business-4 plan
First, we tested the performance of the Business-4 plan. The plan has three brokers, each with 1-2 CPU (depending on the cloud) and 4GB RAM per instance.
We measured metric BytesInPerSec as reported by the brokers. The maximum sustainable bytes in rate from clients is:
- AWS: 37.0 MB/s
- GCP: 30.5 MB/s
- Azure: 32.7 MB/s
We also measured metric MessagesInPerSec. The maximum sustainable messages rate is:
- AWS: 72,200 messages per second
- GCP: 56,600 messages per second
- Azure: 63,900 messages per second
Aiven for Apache Kafka: Business-8 plan
Next, we moved on to increasing the size of the brokers. We tested Business-8 plans, which have double the amount of CPUs and RAM: 2 CPUs and 8 GB RAM per broker. Again, we measured metric BytesInPerSec as reported by the brokers. The maximum sustainable byte in rate from clients is:
- AWS: 62.7 MB/s
- GCP: 81.8 MB/s
- Azure: 81.0 MB/s
We also measured metric MessagesInPerSec. The maximum sustainable messages rate is:
- AWS: 120,000 messages per second
- GCP: 156,000 messages per second
- Azure: 155,000 messages per second
Aiven for Apache Kafka: Premium-6x-8 plan
Finally, we doubled the number of brokers in the cluster. We increased topic partition count from 3 to 6 to make each broker in the cluster a leader of a partition. We kept replication at 3 because setting it to higher values does not improve durability in regions with 3 availability zones. We measured metric BytesInPerSec as reported by the brokers. The maximum sustainable byte in rate from clients is:
- AWS: 123 MB/s
- GCP: 147 MB/s
- Azure: 137 MB/s
We also measured metric MessagesInPerSec. The maximum sustainable messages rate is:
- AWS: 235000 messages per second
- GCP: 280000 messages per second
- Azure: 262000 messages per second
Monthly throughput cost
It is worth noting that the throughput cost changes very little when upgrading a plan. When you upgrade a plan, the capacity is increased proportionally to the plan’s pricing. There are no hidden costs in the Aiven plans.
To see this, let’s calculate cost per MB/s per month across different plans. Below is a table that shows the results for each plan for each cloud. We take the plan’s price and divide it by the maximum sustainable throughput. The throughput increases proportionally with the plan and therefore its cost changes very little.
AWS us-east-1 | GCP us-east1 | Azure eastus2 | ||
---|---|---|---|---|
Business-4 | throughput MB/s | 37 | 30.5 | 32.7 |
monthly cost | $660.00 | $500.00 | $550.00 | |
per MB/s per month | $18 | $16 | $17 | |
Business-8 | throughput MB/s | 62.7 | 81.8 | 81 |
monthly cost | $1,300.00 | $1,000.00 | $1,100.00 | |
per MB/s per month | $21 | $12 | $14 | |
Premium-6x-8 | throughput MB/s | 123 | 147 | 137 |
monthly cost | $2,500.00 | $1,900.00 | $2,100.00 | |
per MB/s per month | $20 | $13 | $15 | |
Wrapping up
It is well known that cloud providers set limits on disk IOPS. Through our extensive testing we found the maximum sustainable write throughput so that Aiven for Apache Kafka does not hit IOPS limits in any 24 hours.
For production workloads we recommend to run at 70% of the maximum sustainable write throughput, or even less if your consumers cause Kafka brokers to read from the disks. The remaining capacity will be used for partition reassignments or replication of partitions to new nodes during cluster rebalancing.
To get the latest news about Aiven and our services, plus a bit of extra around all things open source, subscribe to our monthly newsletter! Daily news about Aiven is available on our LinkedIn and Twitter feeds.
If you just want to find out about our service updates, follow our changelog.
Are you still looking for a managed data platform? Sign up for a free trial at https://console.aiven.io/signup!
Further reading
Stay updated with Aiven
Subscribe for the latest news and insights on open source, Aiven offerings, and more.