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

  • Home
  • SEARCH
  • 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 7667215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:02:39+00:00 2026-05-31T15:02:39+00:00

More of a best practice question than a technical one, however I’m trying to

  • 0

More of a “best practice” question than a technical one, however I’m trying to figure out the best way of organizing node / express apps to be the most optimized for scaling. Currently we have a single express js application that houses multiple “parts” of a site. This includes areas like chat, our BoxNet api, and a few others.

Would it be better to separate these areas into their own express applications to scale each one individually, or would it be better just to keep them all in one single express application? Talking amongst the different parts of the application is nonexistent as it’s not really necessary. To me, the best reason for separating these applications would be to easily scale one of the different areas without having to scale the parts that aren’t being hit as much. The negative effects I see of this would be a potential management nightmare or multiple connections to a database per application * scale. Thoughts?

Thanks,

Aric

  • 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-05-31T15:02:41+00:00Added an answer on May 31, 2026 at 3:02 pm

    Separating them out can make sense for two reasons:

    1. If you have multiple processors on your server, each Node.js app can run its event loop on a separate core and actually run in parallel, rather than appear so, giving you an immediate doubling/tripling of server peformance (assuming not I/O bound).
    2. Because all of the logical services are on a single event loop, you’re increasing the frailty of your system. If one service locks up the event loop, all services are locked up. And even if you never have bugs in your various services, you still have the issue that “high-performance” services are penalized by being put into the same event loop.

    For instance, suppose you have three services: One is a simple service that spends ~50ms within the Node.js event loop and doesn’t access the DB, files, whatever; it’s all in memory. A second service spends ~100ms within the Node.js event loop and ~400ms waiting on DB/File I/O. A third service spends ~400ms within the Node.js event loop and ~100ms with the DB. Because the event loop is essentially a queue where a logical request is thrown back to the end of the stack each time it waits for non-blocking I/O, your third service could be slowed down by an extra ~300ms for each second service in the queue between it and the front of the queue, and by ~50ms for each first service (after amortizing 2 of these first services).

    When all requests to a Node.js server have similar processing and I/O delays, you get a consistent response time to the user, which is better than a randomized response time, since the former means adaptive streaming audio/video will play at a higher bitrate (for example), and a user browsing a web page with a consistent “rhythm” will quickly get into the rhythm themselves and stop perceiving the delays (unless too significant, of course).

    Your database should be able to handle dozens of connections at the least simultaneously, so that shouldn’t be a problem; but if the services really don’t talk much to each other, you may want to split the databases into separate processes, as well.

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

Sidebar

Related Questions

this is more of a 'best practice' question than an actual problem: I'm working
This is more a best practice question than a language question in itself, since
This is more of a best practices question rater than something technical. I'm working
Which one is more acceptable (best-practice)?: namespace NP public static class IO public static
What's the best implementation for more than one background service in an ASP.NET application?
Which is the best way to manage a website with one or more mirrors
I known that it's more a state of art than a technical question, but
Note: This is more of a best how rather than how question. I have
This is probably more of a best practices question than a true code question.
This is a question more about best practices/design patterns than regexps. In short I

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.