DEV Community

chenge
chenge

Posted on • Edited on

Recommend:illustration How does Unicorn work?

The color diagram is great for read.

link-->

I have a question, does Node and Go need a standalone app server?

The article has an auto generated directory, hope Devto provide this directory function in the future, it's great for read long post.

Top comments (5)

Collapse
 
rhymes profile image
rhymes

Hi chenge,

I'll try to answer your question even if I'm unsure I understood it correctly.

Rails uses Unicorn or Puma because Ruby's default webserver, webrick, is just basic. I personally prefer Puma over Unicorn because Unicorn is not great with slow clients (so you need a reverse proxy) and Unicorn is not multi-threaded.

Node.js incorporates a server that is production ready so you don't really need an external one. Same with Go.

Collapse
 
chenge profile image
chenge • Edited

Thanks! Got it.

I heard Passenger support Rust. Is Rust not like Go?

Collapse
 
rhymes profile image
rhymes

I heard Passenger support Rust. Is Rust not like Go?

Passenger is a generic language application server. Especially from the newly released version 6 it supports many languages.

Rust is not like Go. They are both static typed but Go has garbage collection, Rust doesn't. Go is easier to pick up because it only has a few concepts, Rust is a little harder to pick up but it guarantees memory safety. Go is server oriented, Rust is a systems language (though you can use them for different things). They both compile to native binaries

Thread Thread
 
chenge profile image
chenge

Why does Go need Passenger? What does Passenger provide?

Thread Thread
 
rhymes profile image
rhymes

You should probably read the link I put in the previous comment - blog.phusion.nl/2018/11/30/passeng... - to have a better answer:

With microservices and containers, the world is becoming increasingly polyglot. Every language reinvents tooling and duplicates efforts, and the quality and usability of these vary wildly. With Passenger 6 / GLS (Generic Language Support) we aim to provide the benefits of Passenger to more people. Using Passenger across your stack ensures standardization, allowing teams to move faster and with more confidence.

Passenger has tools that give you insight on what's going on inside your webserver, supports multiple apps inside the same app server (so you might have one app written in Go and another one in Ruby all handled by the same server).

So, maybe if you have an app made by different pieces written in different languages you want to standardize the web server layer, use the same tooling and deployment. Passenger is a way to do it.