TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

~2M msgs/second messaging system written in Go

95 pointsby timfover 12 years ago

14 comments

epsover 12 years ago
How big is <i>defaultSendBufSize</i>?<p>If it's something like 1 Gig, then it's the OS that should be commended for the miracle of throughput, not Go. Even VB would be able to pull numbers like these with aggressive buffering.<p>A more sensible metric would be to measure the throughput <i>and</i> the longest time in transit. If you get Go deliver 2 mil/sec with sub-ms delivery time, then we'll have something to talk about.
评论 #4885153 未加载
评论 #4884265 未加载
moeover 12 years ago
<p><pre><code> $ time seq 5000000 &#62;/dev/null 1.10s user 0.00s system 99% cpu 1.107 total </code></pre> There, my Mac Mini can push ~5M msgs/second!!1one<p>Do I get a pony now?<p>Seriously, what is this doing on HN and what on earth are people discussing?<p>If you want to brag with benchmarks then how about providing at least a remote clue about what you are measuring...
评论 #4887116 未加载
评论 #4885505 未加载
halayliover 12 years ago
Hmm, you cannot make 2M read/write syscalls a sec. So what's the definition of a message here and through what transport medium does it go through?
评论 #4883886 未加载
评论 #4889338 未加载
评论 #4884018 未加载
marshrayover 12 years ago
Not bad at all, that's approximately the message-passing overhead I measured in C++ on a similar CPU a while back.<p>I think the main utility for such a benchmark though is to establish a lower limit on theoretical per-message overhead. Any practical system is likely to want to do something interesting with the content of the messages.<p>But this lets us say "expend an average of at least 5 us of useful computation on each message in order to keep the overall cost of message passing below 10%".
评论 #4887133 未加载
jamwtover 12 years ago
zeromq/czmq equivalent: <a href="https://gist.github.com/4229625" rel="nofollow">https://gist.github.com/4229625</a><p>Does 3M+ messages a second over tcp/loopback in my test.<p>(The fact that this go is competitive is pretty sweet.)
jlouisover 12 years ago
Slowly, go is getting into more and more places. This is yet another nice replacement. It is probably going to be way faster than the Ruby implementation in the long run.
paulasmuthover 12 years ago
Mh, if I understand correctly the messaging system being tested is <a href="https://github.com/derekcollison/nats" rel="nofollow">https://github.com/derekcollison/nats</a> and it is not written in Go but in Ruby (+EventMachine). Or is there a Go version of NATS?<p>Also, this is only testing the time it takes the go client to write the messages to the socket, not the time the server takes to process the messages. So the benchmark would be the same with a noop server that reads and discards all incoming traffic. Am I wrong?
评论 #4883864 未加载
评论 #4887184 未加载
评论 #4883870 未加载
评论 #4883949 未加载
jasonmooover 12 years ago
I'm curious to see if this is running with GOMAXPROCS above 1. I've seen the scheduler start to drag down reqs/sec with more than one thread in lightweight networking services like this.
评论 #4887171 未加载
perplexesover 12 years ago
What does NATS achieve that isn't available by using RabbitMQ or 0MQ?
onetwothreefourover 12 years ago
This isn't impressive if it's in memory. Which it most probably is.
评论 #4883810 未加载
stevewilhelmover 12 years ago
I had the privilege of working with Derek "back in the day." He has worked on some pretty impressive mission critical, low latency message systems.
bryogenicover 12 years ago
NATS is new to me, are there interfaces for anything other than Ruby, Go, Node, and Java? C or Python? Any other resources about it? Thanks!
评论 #4884581 未加载
michaelfeathersover 12 years ago
The language isn't the important thing: <a href="http://martinfowler.com/articles/lmax.html" rel="nofollow">http://martinfowler.com/articles/lmax.html</a>
segmondover 12 years ago
~2 M msgs/second means nothing without telling us about the specs of the system.