Web standalone app question

Ok, I’ve read up on how to create and deploy a Xojo standalone Web app. I’m used to deploying Xojo CGI apps. With the latter, I can have as many as I want on the same server. Just place each one in a different subfolder of cgi-bin, and make sure each has a distinct AppID. But it sounds like standalone apps are limited by how many ports are available – one per app. How many ports are typically available on a server. Say 1701Software or Xojo Cloud.

Port numbers are 16 bit and go up to 65535, so there should be plenty. Of course you can’t use anything in use, or assigned to a service that you may want to use, so might be a few hundred less than that available for your app if you have an ip address to yourself.

As far as how it works on 1701 or the Xojo Cloud, I presume there is some level of virtualization or multi-homing at work, so you may get your own ip, or be able to request an additional ip if needed.

So I would guess this is a non-issue, but please let us know if you end up hitting that limit and how you did it, I’m sure that would be a fun read. :slight_smile:

Unless I am mistaken, I believe Xojo Cloud is cgi only.

You would run out of memory before you exhausted your ports. In practice this is never a concern.

This may be a dumb question, but how do you know what port# to use, if each instance needs its own port?

Generally you can use any port you like greater than 1024 depending on your user privileges. The port number doesn’t matter. You generally want to put a reverse proxy or load balancer in front of it so you can map port 80 to different apps depending on the hostname in use. This is called virtual domain hosting where multiple domains hit the same IP/port. If you do not do this then every Xojo app needs its own IP address which is terribly wasteful.