Going Infinite, handling 1 millions websockets connections in Go / Eran Yanay

Going Infinite, handling 1 millions websockets connections in Go / Eran Yanay

Go HTTP server provides great scalability, allocating a goroutine per connection, and reusing the efficient multiplexing and scheduling of the Go runtime. While this technique is almost ideal for most scenarios, it comes with limited scale for websockets apps due to high memory consumption

In this talk, we will show how we’ve implement our own event loop mechanism to overcome those limitations and efficiently manage millions of concurrent connections while minimizing resource utilization. We will compare the memory footprint of a naive implementation, relying on the standard way to handle those connections with go-routines, and explore the difficulties of using epoll and select in pure go to efficiently schedule and maintain all those concurrent connections

C1508d6ff2ed86b2b4fedef9a3fe558f?s=128

GopherCon Israel

February 11, 2019
Tweet