Unicorn (web server)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Original author(s)Eric Wong
Developer(s)Unicorn developers
Initial releaseMarch 11, 2009; 10 years ago (2009-03-11)
Stable release
5.5.0 / March 4, 2019; 8 months ago (2019-03-04)
Written inRuby
Operating systemCross-platform
Available inEnglish
TypeWeb server
Websitebogomips.org/unicorn/ Edit this at Wikidata

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.


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

Reception and use[edit]

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

Twitter starts to test Unicorn in 2010.[3]

This server is shipped with Discourse. Their system administration expert Sam Saffron noted Unicorn was reliable, as it reaps unresponsive workers.[4] GitLab also uses Unicorn.[5]

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

As of 2018, projects tend to favour Puma[citation needed]. The Heroku hosting provider recommends since 2015 to migrate from Unicorn to Puma.[6]. 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.[7]


  1. ^ a b Fulton, Hal; Arko, André (11 February 2015). The Ruby Way: Solutions and Techniques in Ruby Programming. Addison-Wesley Professional. p. 566. ISBN 978-0321714633.
  2. ^ Bylina, H.N. (2014). Ruby Programming Language. Ruby on Rails framework (PDF). XX International conference for students and young scientists «MODERN TECHNIQUE AND TECHNOLOGIES». Tomsk: IOP Publishing.
  3. ^ "Unicorn Power". 30 March 2010.
  4. ^ "Why did you move to runit + Unicorn". February 2015.
  5. ^ "How GitLab uses Unicorn and unicorn-worker-killer". GitLab. 5 June 2015. Retrieved 14 April 2018.
  6. ^ "Puma is Now the Recommended Ruby Webserver". 23 January 2015.
  7. ^ Pavese, Tommaso (21 December 2016). "Unicorn vs Puma: Rails server benchmarks".

External links[edit]