Software:Unicorn (web server)

From HandWiki
Revision as of 18:28, 27 June 2023 by Jport (talk | contribs) (url)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Unicorn
Original author(s)Eric Wong
Developer(s)Unicorn developers
Initial releaseMarch 11, 2009; 15 years ago (2009-03-11)
Stable release
6.1.0 / December 25, 2021; 2 years ago (2021-12-25)[1]
Repositorybogomips.org/unicorn.git
Written inRuby
Operating systemCross-platform
Available inEnglish
TypeWeb server
LicenseGPLv2+ or Ruby 1.8
Website{{{1}}}

Unicorn is a Rack HTTP server to serve Ruby web applications on UNIX environment. It is optimised to be used with nginx. It is based on now deprecated Mongrel 1.1.5 from 2008.

Architecture

Unicorn uses a master/worker architecture, where a master process forks worker processes and controls them. The application runs in a single thread.[2]

Reception and use

Unicorn was considered as “one of the most popular servers for Rails”.[3][2]

Twitter started to test Unicorn in 2010.[4]

This server is shipped with Discourse. Their system administrator Sam Saffron noted Unicorn was reliable, as it reaps unresponsive workers.[5]

Unicorn inspired other projects like Gunicorn, a fork to run Python applications.

As of 2018, projects tend to favour Puma.[6] The Heroku hosting provider recommends since 2015 to migrate from Unicorn to Puma.[7] Deliveroo published a benchmark comparing the two servers and concluded “Puma performs better than Unicorn in all tests that were either heavily IO-bound or that interleaved IO and CPU work”, but that Unicorn was still slightly better performing in pure CPU situations.[8] GitLab switched to Puma from Unicorn in 2020.[9]

References

External links