Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
e-r-a-n
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
e-r-a-n
8y ago
How?
2.
▲
by
e-r-a-n
8y ago
The idea behind going all the way down to epoll is to reduce the memory footprint by around 30% otherwise, with every goroutine stack consuming 4-8KB, it's not feasible to go with 1goroutine-1websocket approach
3.
▲
by
e-r-a-n
8y ago
They are not idling. Look at the code.
4.
▲
by
e-r-a-n
8y ago
If you look at the server implementation, the client messages are also read and parsed, but are not printed to stdout for demonstration purposes (otherwise it hard to keep track) You can uncomment that printf instruction and see that it sti
5.
▲
by
e-r-a-n
8y ago
And most linux distros limits the ephemeral range even further to about 30K ports If you take a deeper look, the solution uses Docker to connect clients from different network namespaces to mitigate this