Better HN
topnewbestaskshowjobs
Log inSign up

bill_lumbergh

2 karma · joined Aug 15, 2024 (2y ago) · 1 submissions

Submissions

comment 2y ago · link · parent

https://github.blog/news-insights/the-library/unicorn/

  Unicorn has a slightly different architecture.
  Instead of the nginx => haproxy => mongrel cluster setup
  you end up with something like: nginx => shared socket => unicorn worker pools
  
  When the Unicorn master starts, it loads our app into memory. As soon as it’s ready to serve requests it forks 16 workers. Those workers then select() on the socket, only serving requests they’re capable of handling. In this way the kernel handles the load balancing for us.