I think you need to define what you mean by an app, or what the scope of an app is. I cannot see a scenario where you might host thousands, or even hundreds, of separate and distinct apps on a server....unless your server is going to act like a public hosting site. Surely you don't have that many applications in your 5250 world?

Sent from my iPad

On 13 Oct 2015, at 22:07, Kelly Cookson <KCookson@xxxxxxxxxxxx> wrote:

Nathan,

I certainly don't mind using a web server (e.g., IIS or Apache) as a reverse proxy for routing to node apps on the IBM i. I actually see a lot of advantages to this approach.

Yet, three things keep sticking in my mind with a reverse proxy approach. These things probably represent my newbie understanding more than they represent real problems. But, hey, this is how I learn...

1. What happens when the reverse proxy goes down (either because of an error or for maintenance)? If users access all of my node apps through a reverse proxy, then all of my node apps become unavailable when the reverse proxy goes down. I have never set up multiple web servers for fail-over or load balancing. Would setting up web servers for fail-over and load balancing become any more difficult if the web server is serving primarily as a reverse proxy for a lot of node apps?

2. What happens when I have a web server that functions as a reverse proxy for, say, 150 node apps--and now I want to add or modify a single reverse proxy route in the web server configuration file? Is my only option to recycle the entire web server to start using the modified configuration file? Would such a recycle be graceful for users? Or would I have to tell all users to get out of the node apps so I can recycle the web server?

3. What about all of those port numbers? If I use a reverse proxy to route requests to each of my node apps on the IBM i, then each of my node apps on the IBM i requires its own port number. If I have 500 node apps, I'll have to have them listen on 500 different port numbers. As the number of node apps grows, so does the number of port numbers used. Do I really want to have hundreds, or perhaps even thousands, of port numbers being listened to? Does this create system performance, security, or maintenance issues?

Thanks,

Kelly Cookson
IT Project Leader
Dot Foods, Inc.
1.217.773.4486 ext. 12676
kcookson@xxxxxxxxxxxx

-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Nathan Andelin
Sent: Tuesday, October 13, 2015 3:25 PM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] Hosting a Large Number of Node Apps on the IBM i

Kelly,

It's nice to see questions which are relevant to the deployment of broadly scoped systems. And I agree that the answer always seems to come back to "routing".

I'm not sure how to answer your questions about options 1 - 3, so I'll ask more questions which might provoke thought.

What would be the best tool for handling:

1. Request logging?
2. Response logging?
3. Gzip compression?
4. TLS encryption?
5. Serving static content?

One benchmark I came across showed IIS performing 2.5 times faster than Node.js while serving static content, presumably due to caching. Apache offers similar caching. Wait for a Node.js caching module? Build one yourself?

Node.js experts seem to advise the avoidance of any computationally intensive work within the main event loop. Would "computationally intensive" include the evaluation of "routing" expressions?






On Tue, Oct 13, 2015 at 12:32 PM, Kelly Cookson <KCookson@xxxxxxxxxxxx>
wrote:

If our shop adopts node, we would probably use it to develop web and
mobile apps instead of 5250 green screens (for future development).
Over the years, we have accumulated a large number of 5250 green
screen interactive programs. If we adopt node, I can imagine we will
accumulate a similarly large number of node apps.

The way to host a large number of node apps is, according to my Google
searches, routing. But there are different strategies for routing.

1. Use a reverse proxy to route requests to node apps, where each node
app has its own URI and port number. The reverse proxy could be a web
server or something like node-http-proxy. Redbird also appears to be a
package for setting up a reverse proxy for node apps (
https://github.com/OptimalBits/redbird?utm_source=nodeweekly&utm_mediu
m=email
).

2. Use ExpressJS vhost to route requests to node apps, where each node
app has its own URI and port number.

3. Use ExpressJS routers and module.exports to route requests to node
sub-apps or modules (something like this: https://vimeo.com/56166857).

So, I am left with a few questions. What strategy or combination of
routing strategies would be best for ensuring high availability of
node apps? What strategy or combination of routing strategies would be
best for scaling node apps (e.g., using the cluster module)? Is
reducing the number of unique ports being listened to by node apps a
good reason for using the sub-apps strategy (option #3 above)?

Thanks,

Kelly Cookson


--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.


___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.