Skip to main content
roshanbi
Gold ⭐️
Oct 20, 2021 2:21 PM UTC
Solved

kafka json slow

Hello Team,

 

we are having some performance issue when sending data to Kafka using JSON as format. Performs is very slow.

 

Performance is faster when using DSV parser.

 

How can we fine tune JSON formatter?

 

Regards,

Roshan

Nandinin
NandininAnswer
Gold ⭐️
Oct 25, 2021 8:17 AM UTC

Hello @roshanbi  

 

JSON is one of the best data exchange format  which is lightweight and compact. C/DSV can be used when large dataset, with bandwidth limits are to be sent, but DSV cannot be used where the data is complex and unstructured; there comes in JSON.

 

So, as you said, you are are seeing a better performance with DSV, that is because it does not contain attribute-value pair as in JSON (which makes it structured). To fine tune you application, you can use 

Compression.

SME || Kafka | Schema Registry | SMM | SRM

3 replies

arandive
Silver ⭐️⭐️
Silver ⭐️⭐️
Oct 21, 2021 8:12 AM UTC

@roshanbi Can you please confirm the way you are sending the JSON data to the Kafka topic? Are you using kafka-console-producer? Please provide producer.properties file parameters used. 

Translate
Nandinin
Gold ⭐️
NandininAnswer
Gold ⭐️
Oct 25, 2021 8:17 AM UTC

Hello @roshanbi  

 

JSON is one of the best data exchange format  which is lightweight and compact. C/DSV can be used when large dataset, with bandwidth limits are to be sent, but DSV cannot be used where the data is complex and unstructured; there comes in JSON.

 

So, as you said, you are are seeing a better performance with DSV, that is because it does not contain attribute-value pair as in JSON (which makes it structured). To fine tune you application, you can use 

Compression.

Translate
SME || Kafka | Schema Registry | SMM | SRM
VidyaSargur
Community Manager
Community Manager
Oct 29, 2021 6:33 AM UTC

@roshanbi, Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. 

Translate
Regards, Vidya Sargur Madabhushi| Senior Community Manager | Was your question answered? Make sure to mark the answer as the Best Answer. If you find a reply useful, say thanks by clicking on the thumbs up button.