2

As far as I understand, Meteor is a full-stack web server, meaning you don't need another web server such as Apache or NGINX to makes it work. But from reading the guidelines on deploying Meteor, it seems like they use NGINX to serve Meteor.

Why is this?

Edit: Will there any impact if I just use the Meteor without NGINX or apache? Is it significant?

Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404
Haikal Nashuha
  • 2,958
  • 7
  • 44
  • 67
  • NGINX answers the phone really fast, as do most load balancers. Otherwise, you'll be limited to one cpu instead of how many the box actually has. – dandavis Sep 23 '14 at 01:17
  • 1
    @dandavis so NGINX acts as load balancers? – Haikal Nashuha Sep 23 '14 at 01:17
  • 2
    load balancing and static serving are the bread and butter of NGINX. – dandavis Sep 23 '14 at 01:19
  • Good question. Bad place to post it. Better on Server Fault. Load balancers are just fast responding web servers that sit in front of other servers. Apache can be a load balancer for Apache. – Giacomo1968 Sep 23 '14 at 01:19
  • 1
    @dandavis what is the impact if I deploy Meteor without using NGINX? – Haikal Nashuha Sep 23 '14 at 01:28
  • 1
    you would likely be limited to about 7,500 users at once without some sort of clustering. that number could be half or twice that, it's just a guideline. putting NGINX (or anything else) in front will slow down the response, but potentially increase capacity. if you don't need the extra capacity, don't slow down your small user pool with un-needed obstacles in the pipeline. – dandavis Sep 23 '14 at 01:29

2 Answers2

2

Meteor is not a web server. Especially, it cannot terminate SSL/TLS. That's why you might want nginx running in front of meteor.

Steffo
  • 622
  • 5
  • 6
2

Nginx placed in front of the Node.js build of your Meteor app tends to double the throughput of serving static assets (images, media files etc.) and reduce latency - see these benchmarks by @Stephan at Do I really need nginx with my Meteor/Node.JS app?

Node.js vs. nginx static asset serving

See also the recommended nginx configuration for Meteor.

Community
  • 1
  • 1
Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404