3 ms·
Results from my Mac: Go server vs Go client: 10ms Scala server vs Scala client: 3ms Go server vs Scala client: 4ms Scala server vs Go client: ???? Sca
by jaekwon 13y ago
Results from my Mac:
Go server vs Go client: 10ms
Scala server vs Scala client: 3ms
Go server vs Scala client: 4ms
Scala server vs Go client: ????
Scala server against the Go client is really slow (?). I reduced the ping count by a factor of 100, and extrapolating I think it would have reported around 670ms. What gives?
I don't know much about Scala Futures, but isn't Scala's client doing something completely different than the Go client? Scala's client with Future.sequence looks like it's calling each `ping` method sequentially.
Printing the connection identifier {0,100} on open & close shows that while it isn't completely sequential, only about a handful of connections are open at a time.
On the other hand, the Go client appears to switch amongst goroutines more frequently. All the connections open before any connection closes.
In other words, the I think the difference in performance is due to the difference in how randomly the connections are shuffled. The terrible performance time in the last case I think shows a bottleneck in the Scala server rather than the Go client.