Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7933245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:16:15+00:00 2026-06-03T21:16:15+00:00

My end goal is to make node.js more cost effective per each server instance.

  • 0

My end goal is to make node.js more cost effective per each server instance.

I’m not running a game or chat room but rather simple websites for customers. I would like to house multiple clients on a single server yet have multiple websites running off of port 80 using host header mapping. I would like to still use express as I’m doing but have it be more like a routing thing from port 80 to the other node apps if that is even possible. Node can be cheaper if its done in this way but currently its more expensive for my purposes as each customer would need their own box if running on port 80. Also, my motivation is to focus on node development but there must be a reason to do so in terms of cost.

I do this quite a lot for ASP.NET in Windows as IIS supports this out of the box and I know this is something normal for Apache as well.

Feel free to move this to another forum in stack exchange if this is not the right question or give constructive criticism rather than a random downvote. Thanks.

update

The approach I took was to use static hosting (via gatspy and s3) then an API instead that registered domains through post message from the client and API keys from the server and generates static sites periodically as sites change but thanks for all the suggestions!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T21:16:16+00:00Added an answer on June 3, 2026 at 9:16 pm

    In theory, you could build a pure-Node web server that emulated the functionality of Apache/Lighttpd/Nginx, but I wouldn’t recommend it. In fact, for serious production services, I’d recommend ALWAYS fronting your service with Nginx or an equivalent (see this and this).

    Here’s how a simple Nginx config would work for two subservices exposed on port 80.

    worker_processes  4;
    
    events {
      worker_connections 1024;
    }
    
    http {
      include       mime.types;
      default_type  text/html;
    
      server {
        listen 80;
        server_name service1.mydomain.com
        location / {
          proxy_pass         http://127.0.0.1:3000/;
        }
      }
      server {
        listen 80;
        server_name service2.mydomain.com
        location / {
          proxy_pass         http://127.0.0.1:3001/;
        }
      }
    }
    

    I’ve seen production boxes kernel panic because Node doesn’t throttle load by default and was prioritizing accepting new connections over handling existing requests – granted, it “shouldn’t” have crashed the kernel, but it did. Also, by running on port 3000, you can run your Node service as non-root with very few permissions (and still proxy it so that it appears to be on port 80). You can also spread load between multiple workers, serve statics, log requests, rewrite urls, etc, etc, etc. Nginx is very fast (much lighter than Apache). The overhead of same-box proxy forwarding is minimal and buys you so much functionality and robustness that it’s a slam dunk in my book. Even minor stuff, like – when I crash or overload my node service, do user get a black hole, or a “pardon our dust, our servers are being maintained” splash.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My end goal is local development of a Radiant CMS installation. So, need rails
First off, let me define the end goal: I'd like to Wordpress (version 2.8)
can I load a ps1 file from within a ps1 file. The end goal
I recently started a new personal project to learn Entity Framework. My end goal
Error: End tag for 'optgroup' which is not finished. You have probably failed to
How can I make as perfect a subclass of dict as possible? The end
i have a problem with this class. the goal is to make the main
My end goal is to draw a report that looks like MS Word using
I'm doing a little experimentation. The end goal is to open Twitter in a
In my goal to make good code, I've validated my project in Visual Studio

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.