Skip to content

Some issues with benchmark tool #2

@kozlovic

Description

@kozlovic

Hello, I work on the nats.io team and was made aware of your project.
Thank you for integrating with NATS!

I noticed very low numbers for the NATS report and started to dig into it.
What I have found first is that you can't run the benchmark without first fixing the import:

https://github.com/ThreeDotsLabs/watermill-benchmark/blob/master/cmd/main.go#L10
Should be: "github.com/ThreeDotsLabs/watermill-benchmark/pkg"

Then I tracked down the biggest part of the slowness in the NATS consumer side to the unmarshaling (https://github.com/ThreeDotsLabs/watermill-nats/blob/master/pkg/nats/marshaler.go#L41). For 100,000 messages it is taking 2secs on my machine. This is something to look into.

I would recommend that you set the AckWait to higher number than 1sec, conversely, the default CloseTimeout is too high IMO.

You don't expose it seems the start position for the subscription. So I am not sure if this is why you stop/start the subscriptions at initialization time. With NATS Streaming you can pass options to specify where to start in the stream (DeliverAllAvailable() for all messages, etc..).

I was surprised with Kafka numbers compared to NATS. Should not the Kafka publisher require acks from the cluster? (https://github.com/ThreeDotsLabs/watermill-kafka/blob/master/pkg/kafka/publisher.go#L80) something like:

config.Producer.RequiredAcks = sarama.WaitForAll

Thanks for your attention and effort!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions