4 ms·
These kinds of benchmarks are not very meaningful. I think that pretty much any modern framework/language can handle at least 1 million idle WebSockets. It's mu
by jondubois 8y ago
These kinds of benchmarks are not very meaningful. I think that pretty much any modern framework/language can handle at least 1 million idle WebSockets. It's much more interesting to measure performance when you start sending messages through them at regular intervals.
- e-r-a-n 8y agoThey are not idling. Look at the code.
- kjksf 8y agoWhen people rewrite system from X where X in (Python, Ruby, Node, Clojure) to Go they usually see at least 10x improvement. This is just one recent example: https://www.infoq.com/articles/api-gateway-clojure-golang https://www.infoq.com/articles/api-gateway-clojure-golang The money quote: "The end result enabled us to reduce 25 instances (c4 xlarge) running Clojure code - able to process 60 concurrent requests, to two instances (c3.2xlarge) running Go code able to support ~5000 concurrent requests a minute" If you google around you'll find more stories like that. To do better than Go you would have to drop to C++ or Rust.
- Scarbutt 8y ago"The end result enabled us to reduce 25 instances (c4 xlarge) running Clojure code - able to process 60 concurrent requests, to two instances (c3.2xlarge) running Go code able to support ~5000 concurrent requests a minute" That doesn't make any sense though.
- karim 8y ago"When people rewrite system from X where X in (Python, Ruby, Node, Clojure) to Go they usually see at least 10x improvement." Sure but how much of the performance gains come from Go and how much come from just having a better understanding of the problem the second time around?
- zepolen 8y agoGo is strongly typed and compiled, it literally does 10x less work than dynamic languages for most things. Pypy leads to a near 10x speed up over cPython as well.
- kasey_junk 8y agoOr Java or C# or basically any non-interpreted language.
- rakenodiax 8y agoIn this case, Clojure is already running on the JVM
- kasey_junk 8y agoThe Clojure compiler does not generally produce the same byte code as the Java one. Idiomatic clojure is routinely slower than idiomatic Java and that’s a well known and expected outcome.
- piranha 8y agoThat article is anything but useful. They have spent significantly more time designing and writing app in Go than their prototype in Clojure and now it’s faster? What a surprise!
- apta 8y ago> To do better than Go you would have to drop to C++ or Rust. C++ and Rust yes, but also Java and .NET.
- weberc2 8y agoIn my experience Java, C#, and Go are roughly on par. Go is a bit easier to optimize though.
- basic6 8y agoI didn't think Go rewrites were common anymore since the results were mediocre.
- fulafel 8y agoHmm, there's a slight disparity between the quote and their benchmark table, which shows Clojure and Go neck and neck in the request/sec dept. I guess all the system re-architecting explains most of the difference. In any case, as the article text also mentions, on the Go side they are using a complete reverse-proxy library that's included with the Go stdlib, which can be a significant advantage aside from the properties of the language itself. But then it seems they ended up reimplementing many things that the JVM provides: "In order to achieve out of the box functionality such as CPU and memory usage metrics, business logic counters and more - we needed to write basically this entire stack from scratch, which enabled us a much more rapid deep dive of the intricacies of Golang."