The bottom line is synchronous will never be as fast as asynchronous. When
using asynchronous mode you get the benefits of batching, compression,
reduced network roundtrips, etc. You do loose the ability to achieve
absolute ordering, but do you really need that? Can you design you system
not to?

When you say asynchronous producer took 1 second. Do you mean
to receive the data on the other end? or just to make all the send calls?
My guess is that it took 1 second because the call to send
returns immediately, but that does not necessarily mean the data was sent
yet.

More can be read about the new producer (make sure you are using the new
producer) in the javadocs here
<http://kafka.apache.org/082/javadoc/index.html?org/apache/kafka/clients/producer/KafkaProducer.html>
.

Thank you,
Grant


Side note:
There have been quite a few posts (3) in both the dev and user list about
this. In a very similar format. If you are all on the same team, please
keep your questions to one post. Even if you are different teams, joining
in on an existing post instead of creating a new one is encouraged.

On Mon, Oct 19, 2015 at 10:15 AM, shanthu Venkatesan <
shanthuvenka...@gmail.com> wrote:

> Hi all,
>
> We tested both Asynchronous and Synchronous producers by producing 10k
> messages.
>
> Asynchronous producer took 1 sec to produce whereas synchronous took 50
> secs.
>
> Reliability is our primary concern hence we have planned to use
> synchronous producer.
>
> Please can any one of you suggest a way to improve the performance of
> sync producer.
>
> Thanks,
> Santhakumari
>



-- 
Grant Henke
Software Engineer | Cloudera
gr...@cloudera.com | twitter.com/gchenke | linkedin.com/in/granthenke

Reply via email to