Skip to content

Comment on C500k in Action at Urban Airshipparent

Comments

When trying to support the maximum number of connections per box the model with the best conceptual fit doesn't necessarily have the best functional characteristics. Actor models can have much higher per-connection resource usage. Message passing isn't free, and wrapping each connection in an Actor/Greenthread structure isn't free either.

At the end of the day storing sockets in a hashmap is a pretty compact data structure. If you can minimize synchronization/locking, threads shared state is extremely efficient from a CPU and memory standpoint. Maybe not so efficient from a developers time/sanity standpoint though. :-)

Do note that this article is purely about an edge server though. Its job is essentially to hold sockets and communicate with internal queues. The message passing model is alive and well, albeit at a higher level.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.