ddubbert / dub.io

Agar.io clone based on Continuous Event Streams and Microservices. Implemented with Node.js, GraphQL and Apache Kafka.
MIT License
1 stars 0 forks source link

What are the best Kafka-Server setups ? #8

Closed ddubbert closed 4 years ago

ddubbert commented 4 years ago

There are a couple of different possibilities for setting up brokers with Kafka. The prototype of this game will depend on a single machine to create all services (it is just a first test), so the best settings should be identified for such a single machine approach. Having multiple partitions allows for more parallelism in processing events, but comes with more replication latency, rebalances and open server files.

Therefore PoCs with different setups should be made. The main aspect should be comparing the time needed for an equal set of events to be transmitted. Focussed settings should be the amount of brokers, the amount of consumers, the acknowledgment setting of a post (producer), partition amount and the replication amount. Keep in mind that there is only one machine available, so these tests are only meaningful for a one node setup where the machine has following specs:

ddubbert commented 4 years ago

Different PoCs have been created and their time for sending and receiving 20000 events with a maximum size of 32-Bytes have been measured. For all of them an average value has been calculated out of 5 tries.

Single Broker and Single Consumer: (Partitions 1 & Replica 1)

Single Broker and Single Consumer: (Partitions 3 & Replica 1)

Single Broker and Tripple Consumer: (Partitions 3 & Replica 1)

Tripple Broker and Single Consumer: (Partitions 3 & Replica 1)

Tripple Broker and Single Consumer: (Partitions 3 & Replica 2)

Tripple Broker and Tripple Consumer: (Partitions 3 & Replica 1)

Tripple Broker and Tripple Consumer: (Partitions 3 & Replica 2)

Single Broker and Tripple Topic: (Partitions 1 & Replica 1)

Tripple Broker and Tripple Topic: (Partitions 1 & Replica 1)

ddubbert commented 4 years ago

Review: