I'm working on several different webapps written in node. Each webapp has very little traffic (maybe a few HTTP requests per day) so I run them all on a single machine with haproxy as a reverse proxy. It seems each webapp is consuming almost 100MB RAM memory which adds up to a lot when you have many webapps. Because each webapp receives so little traffic I was wondering if there is a way to have all the webapps turned off by default but setup so that they automatically start if there is an incoming HTTP request (and then turn off again if there hasn't been any HTTP requests within some fixed time period).
Run many low traffic webapps on a single machine so that a webapp only starts when it is needed?
84 Views Asked by molsson At
1
There are 1 best solutions below
Related Questions in NODE.JS
- How to solve CERT_UNTRUSTED error in nodemailer
- Run a loop over a callback, node js
- Implementing prerender.io middleware in sails.js
- Token based authorization in nodejs/ExpressJs and Angular(Single Page Application)
- formatting path string in javascript
- One to One screensharing using WEBRTC
- Create polygon from grid (for collisions)
- Strange npm behavior when installing packages like grunt
- Convert JSON.gz to JSON in node js
- "Your npm version is outdated." but it's not. While install yo
- Why put methods on the prototype of a class instead of declaring them in the constructor?
- Node JS Async Response
- mongoose get property from nested schema after `group`
- Cannot Receive Incoming call on Twilio android Client
- How can I change a specific line in a file with node js?
Related Questions in REVERSE-PROXY
- Apache Reverse Proxy erases <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
- How to configure standalone Jetty 9 as a reverse proxy to a node app?
- How to set up a reverse proxy in nodejs for multiple targets?
- Nginx and Tomcat - subdomain pointing to subdirectory
- How to proxy an external site in Express
- Reverse Proxy on IIS for an asp.net applications
- Connecting to external broker through restricted network using Paho Java Client
- Nginx module: how to get variables value from conf file
- How to setup apache reverse proxy for particular domain
- POST request reverse Proxy
- nginx reverse proxy "ip address shows"
- Correct Usage of OAuth 2.0 Grant Types
- Nginx & Node inside the same Docker container
- node.js, trying to route sub-domain to specific directory
- Redirect Error When using [OR] flag with RewriteCond
Related Questions in INETD
- Run many low traffic webapps on a single machine so that a webapp only starts when it is needed?
- How does (x)inetd "split" its connected socket into STDIN/STDOUT/STDERR?
- How to find location of executable on Linux when normal methods fail?
- Why does write() to pipe exit program when pipe writes to stdout?
- Why can't gdb attach to server application summoned with inetd?
- Accessing a symlink over tftp
- how to disable rsh and rlogin service on debian 7.8
- xerces-c library function returns NULL when daemon ran via inetd
- Getting client IP from Ruby script through xinetd
- Are there any known Linux inetd/"wait"-capable web servers with graceful idle shutdown?
- How to get client IP from java server through xinetd?
- notify user from service with python
- How to debug a weird threaded open fifo issue?
- Most efficient way to serve less than 10 http requests per day using perl cgi
- Xvnc4 started from xinetd only displays empty gray X screen
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Yes. These a dozen different ways to handle this. With out more details not sure the best way to handle this. One option is using node VM
https://nodejs.org/api/vm.htmlAnother would be some kind of Serverless setup. See:https://www.serverless.com/Honestly, 100MB is a drop in the bucket with ram prices these days. Quick google shows 16GB ram for $32 or to put that differently, 160 nodes apps. I'm guessing you could find better prices on EBay or a something like that.Outside learning this would be a total waste of time. Your time is worth more than the effort it would take to set this up. If you only make minimum wage in the US it'd take you less than 4 hours to make back the cost of the ram. Better yet go learn Docker/k8s and containerize each of those apps. That said learning Serverless would be a good use of time.