-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request Problem #73
Comments
Hello @s921102002, thank you for your interest in NATS! Good observations!
I've updated to account for these with #75. Does this address your questions/issues? |
Hi, ColinSullivan1 #75 is not my issues, and I download the lastest csnats-0.5.0 this question solved, but I test Result
and I think it's too slow? |
@s921102002, That does seem very low. I just tested on a win7 VM, and am getting around 3000 replies/sec, and I consider that low. I'll look at some performance profiling of the request API. What are your publish and subscribe rates? |
Hi @ColinSullivan1, below is my pub/sub result (send 100 bytes) test on same machine
I think it's ok and nearly the same as golang client. |
Hi @ColinSullivan1, I found if comment this line in Conn.cs
the performance will speed up, but still slow. In fact I don't know why nats need flush function.
the performance will be very very slow. If I don't have call c.Flush(),
consider below situation If I want to do real-time publish( it need microseconds even nanoseconds latency) so is NATS suitable? and when I should call flush function if I need fastest send data to subscriber? and can I disable nagle algorithm on socket if I need a high resolution time? there's a little conflict, if i call flush function, the performance will be slow, but if i don't have call flush, Sorry, I just begin to NATS for some days, so if i have something misunderstand, please bear with me. Thanks :) |
Based on your pub/sub numbers, I think your results are congruent with mine, so this is something we can certainly improve upon in NATS. The Request API does quite a bit internally, which involves communication with the server:
Thank you for pointing this out - There's room to improve performance here. |
There is always a trade off between latency and throughput. NATS by default favors throughput, however the |
Hi, @ColinSullivan1 Thank you for your reply :) |
I'm glad I could help, and thank you for identifying an area that we can improve upon. Much appreciated! #78 should address this. |
Hi, I play the example Requestor and Replier.
I found there's a exception when request return because
In Conn.cs
when s.NextMessage(timeout);
localConn.removeSub(this);
so
s.conn = null; here, but next return to Conn.cs and execute
the exception here
I have two problems
2.if throw new NATSBadSubscriptionException(); it has significant impact on performance, and Is this a bug? or can I delete this exception such as if (c == null) return; ???
or is there something wrong with me?
Thanks All
The text was updated successfully, but these errors were encountered: