3 ms·
The restriction to Go is downright self-defeating. There are better languages that allow much higher performance ceiling for this kind of task. Also seconding
by neonsunset 3y ago
The restriction to Go is downright self-defeating.
There are better languages that allow much higher performance ceiling for this kind of task.
Also seconding notes regarding encryption and the use of QUIC.
- gafferongames 3y agoI agree, although it's actually quite easy to do it in Golang once you have the right approach. I asked the question in Golang because this was an interview question for Network Next, and the Network Next backend is implemented in Golang.
- neonsunset 3y agoI would not touch Go, thanks. Either Rust or C# would be much easier in terms of vertical scaling strategy to reduce replica count and increase individual pod utilization - both languages offer better tools for scaling on individual many-core instances, reaching much higher throughput. Edit: (though in wider context naturally the switch away from existing stack in a company would never make sense as long as it is a compiled language with sufficiently good average performance)
- gafferongames 3y agoYou're more than welcome to demonstrate a solution in your language of choice
- neonsunset 3y agoIf that's the case given interview scenario, then I withdraw my complaints :)
- Sean-Der 3y agoGo isn't the problem. The issues I have seen is that you are I/O bound by the kernel. One company did Pion WebRTC + https://www.dpdk.org/ https://www.dpdk.org/ and is now doing 4x throughput. They tried switching to Rust (and still doing userspace networking) and it didn't make a big difference.
- neonsunset 3y agoWhich is why last-mile solutions often rely on userspace networking, for which low overhead FFI and tight control with unsafe primitives is required (you are unlikely to need the latter with Rust, as long as the data access patterns play nicely with static load partitioning and context switch minimization).
- dilyevsky 3y agoUnless you are doing heavy parsing of the payload and payloads are large you will be bound by i/o with basically any language (maybe with the exception of python) and will have 0 issues supporting 1M clients even on old hardware
- gafferongames 3y agoCool. Show me an implementation in Python