Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

How We Reached A Stable Environment By Using Multiple Instances of the Web Server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How We Reached A Stable Environment By Using Multiple Instances of the Web Server

    Attached is our internal PDF document regarding our process for finally having a stable environment and using Multiple Instances of Alpha Anywhere. This may or may not work for someone else, but I've been asked to share how we did it. My server technician wrote this document and I am probably not much help in answering very many questions about it. Since I have gained much valuable help from this forum, I am happy to share this if it will help someone else.

    Setting up Multiple Alpha Instances.pdf
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

    #2
    Re: How We Reached A Stable Environment By Using Multiple Instances of the Web Server

    Thanks Carol for sharing this information, I am sure it will be useful for many of us.
    Edhy Rijo
    Progytech
    (Computer Consultants)
    The makers of CardTracking.Net
    www.progytech.com

    Comment


      #3
      Re: How We Reached A Stable Environment By Using Multiple Instances of the Web Server

      The one item I would add Carol is that your server technician mentions that when the Alpha Server hangs and fails to respond AlwaysUp does not recognize this and automatically restart the application server. The program I've written and added to the Code Library thread http://www.alphasoftware.com/alphafo...ys-Up-users%29 addresses this by allowing you to create a separate configuration for each instance you want to monitor and then adding a call from the AlwaysUp sanity check to the utility. If the Alpha server is hung and fails to respond the utility returns false to AlwaysUp and triggers a restart of the particular instance that is not responding.
      Brad Weaver, President
      ComputerAid International
      Ottawa ON Canada
      Versailles KY USA
      www.compuaid.com

      Comment


        #4
        Re: How We Reached A Stable Environment By Using Multiple Instances of the Web Server

        Brad, Thanks. I will pass this info along to him.
        Carol King
        Developer of Custom Homebuilders' Solutions (CHS)
        http://www.CHSBuilderSoftware.com

        Comment


          #5
          Re: How We Reached A Stable Environment By Using Multiple Instances of the Web Server

          One thing that I should add is that I created what we call a 'launch' page in Alpha which is the first page our users go to. When a user clicks a button on our launch page to 'open our program' (before ever logging in), the code for that button checks which port has had the least amount of users log onto it in the past 2 hours, and sends them to the login page on that port. This is done using a log in my admin database that records the launch click, AND also records the user login and which port they are on when they log in. That way we don't have to assign our users to different ports. They will simply get rotated to the port with the least logins in the past 2 hours. This is working very well for us, especially because if there is ANY reason the web server is not responding on the port the user is sent to, they can simply go back and launch again and be sent to a different port. Cool, huh?
          Last edited by kingcarol; 02-18-2015, 04:03 PM.
          Carol King
          Developer of Custom Homebuilders' Solutions (CHS)
          http://www.CHSBuilderSoftware.com

          Comment


            #6
            Re: How We Reached A Stable Environment By Using Multiple Instances of the Web Server

            Carol, thanks for the info. How many instances of Alpha are you running on the Poweredge server. Also, is your database hosted on the same server?

            Comment


              #7
              Re: How We Reached A Stable Environment By Using Multiple Instances of the Web Server

              Very cool Carol! Nice method of load-balancing without the cost of a dedicated load-balancer.
              Brad Weaver, President
              ComputerAid International
              Ottawa ON Canada
              Versailles KY USA
              www.compuaid.com

              Comment


                #8
                Re: How We Reached A Stable Environment By Using Multiple Instances of the Web Server

                Originally posted by imjoken View Post
                Carol, thanks for the info. How many instances of Alpha are you running on the Poweredge server. Also, is your database hosted on the same server?
                We are using 7 instances right now, and yes, all the back end databases for my multi tenants are on the same server. If I were to sum up the reason we had to go through all of this, it would be that Alpha does not make use of multiple cores and everything gets crammed into one core, cause major slowdowns and/or stopping of the web servers.
                Carol King
                Developer of Custom Homebuilders' Solutions (CHS)
                http://www.CHSBuilderSoftware.com

                Comment


                  #9
                  Re: How We Reached A Stable Environment By Using Multiple Instances of the Web Server

                  Hi Carol,

                  One question, since you have 7 instances of AWS using different local IP and Ports:
                  1. Are your users using the port number in the url like www.yoururl:81, www.yoururl:82, etc.
                  2. If not, how are you managing using a single url and redirect them to each instance?
                  3. Basically are you doing any load balancing with your instances?


                  Thanks!!!
                  Edhy Rijo
                  Progytech
                  (Computer Consultants)
                  The makers of CardTracking.Net
                  www.progytech.com

                  Comment


                    #10
                    Re: How We Reached A Stable Environment By Using Multiple Instances of the Web Server

                    1.Are your users using the port number in the url like www.yoururl:81, www.yoururl:82, etc.
                    Yes to this question. Like I said above, I have a log of which port the user is sent to and I wrote code that sends them to the one with the least records in that log in the past two hours.
                    Carol King
                    Developer of Custom Homebuilders' Solutions (CHS)
                    http://www.CHSBuilderSoftware.com

                    Comment


                      #11
                      Re: How We Reached A Stable Environment By Using Multiple Instances of the Web Server

                      The users are tapering off now since it is evening but here is a snapshot of my log this evening. The LAUNCH record means they clicked the button on our Launch page and it stores what port they are sent to. Then when they log in on the page they are sent to, another record is put into the log WITH their user id's (which I have blacked out on the snapshot). Early in our trials, before discovering the Always Up solution, we could look at this log and tell that one of the web app servers had probably stopped responding because we would see the LAUNCH record over and over for one of the ports, but no login record....meaning users probably couldn't get the to the login page on the port they were sent to. There was no indication other than looking at our ports log, (or hearing from a customer), that a web app server had stopped responding. What was good for our users at that time was that they could use the Back button on the browser to return to our Launch page and get directed to a different port.

                      Now we are very happy that for several weeks, our Ports log shows a launch and then a login and we are not seeing repeated launch logs without logins anymore.

                      MultiplePortsLog.jpg
                      Last edited by kingcarol; 02-18-2015, 09:17 PM.
                      Carol King
                      Developer of Custom Homebuilders' Solutions (CHS)
                      http://www.CHSBuilderSoftware.com

                      Comment


                        #12
                        Re: How We Reached A Stable Environment By Using Multiple Instances of the Web Server

                        Thanks for the info Carol,

                        Just to clarify, you have a front end application which they all reach at www.youraddress.com then from here they are assigned a port number and redirected to one of the servers www.youraddress.com:81.
                        If this is this correct, then what logic are you using to kind of load balancing your WAS instances?
                        Edhy Rijo
                        Progytech
                        (Computer Consultants)
                        The makers of CardTracking.Net
                        www.progytech.com

                        Comment


                          #13
                          Re: How We Reached A Stable Environment By Using Multiple Instances of the Web Server

                          Carol - Thank you so much for sharing this information! Your Awesome.
                          NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                          Comment


                            #14
                            Re: How We Reached A Stable Environment By Using Multiple Instances of the Web Server

                            Our users first go to one address (www.ouraddress.com) and then are redirected to our 'launch' page on Port 81...... http://www.ouraddress.com:81/ourlaunchpage.a5w (this is a fake address I am using to post this)

                            On our launch page, there is a button to 'Open The Program'. The code I wrote behind that button is:

                            Code:
                            function OpenProgram as c (e as p)
                            	
                            '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 	
                            dim cn as sql::connection
                            dim cs as c 
                            
                            cs = ourConnection
                            
                            dim flag as l 
                            flag = cn.open(cs)
                            if flag = .f. then 
                            	dim msg as c 
                            	msg = "Could not connect to database. Error reported was: " + cn.CallResult.text
                            	msg = js_escape(msg)
                            	dim jscmd as c 
                            	jscmd = "alert('" + msg + "');"
                            	OpenProgram = jscmd
                            	exit function 
                            end if	
                            ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                            'TblPortLog	LOG_DATE   LOG_TIME PORT_NUMBER LOG_HOUR
                            
                            dim todayDate as D
                            todayDate = Date()
                            
                            dim currHour as N
                            currHour = convert_type(time("h"),"N")
                            
                            dim thisHourToUse as n
                            dim lastHourToUse as n
                            
                            if currHour = 0 then 'it's the middle of the night
                            	thisHourToUse = currHour
                            	lastHourToUse = 0
                            end if
                            
                            if currHour > 0 then
                            	thisHourToUse = currHour
                            	lastHourToUse = currHour - 1
                            end if
                            
                            '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                            'check to see if there have been any logins to port 90 in past 2 hours.
                            'If not, send user to that port
                            sql5 = "select count(*) from TblPortLog where (LOG_DATE = :whatDate and LOG_HOUR = :whatCurrHour and PORT_NUMBER = 90) or (LOG_DATE = :whatDate and LOG_HOUR = :whatLastHour and PORT_NUMBER = 90)"
                            dim args5 as sql::Arguments
                            args5.add("whatDate",todayDate)
                            args5.add("whatCurrHour",thisHourToUse)
                            args5.add("whatLastHour",lastHourToUse)
                            
                            cn.execute(sql5,args5)
                            dim rs5 as sql::ResultSet
                            rs5 = cn.ResultSet
                            dim countPort90 as n
                            countPort90 = convert_type(rs5.data(1),"N")
                            
                            if countPort90 = 0 then
                            	'NOTE that the TblPortLog supplies date and time via the defaults for LOG_DATE and LOG_TIME
                            	sql55 = "INSERT INTO TblPortLog (PORT_NUMBER, LOG_HOUR, USER_ID) Values (:PORT_NUMBER, :LOG_HOUR, :USER_ID)"
                            	dim args55 as sql::Arguments
                            	args55.add("PORT_NUMBER",90)
                            	args55.add("LOG_HOUR",currHour)
                            	args55.add("USER_ID","LAUNCH")
                            	cn.execute(sql55,args55)
                            	
                            	cn.Close()
                            	OpenProgram = "location.href = 'http://www.ouraddress.com:90/ourloginpage.a5w';"
                            	exit function
                            end if
                            '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                            'check to see if there have been any logins to port 91 in past 2 hours.
                            'If not, send user to that port
                            sql4 = "select count(*) from TblPortLog where (LOG_DATE = :whatDate and LOG_HOUR = :whatCurrHour and PORT_NUMBER = 91) or (LOG_DATE = :whatDate and LOG_HOUR = :whatLastHour and PORT_NUMBER = 91)"
                            dim args4 as sql::Arguments
                            args4.add("whatDate",todayDate)
                            args4.add("whatCurrHour",thisHourToUse)
                            args4.add("whatLastHour",lastHourToUse)
                            
                            cn.execute(sql4,args4)
                            dim rs4 as sql::ResultSet
                            rs4 = cn.ResultSet
                            dim countPort91 as n
                            countPort91 = convert_type(rs4.data(1),"N")
                            
                            if countPort91 = 0 then
                            	'NOTE that the TblPortLog supplies date and time via the defaults for LOG_DATE and LOG_TIME
                            	sql55 = "INSERT INTO TblPortLog (PORT_NUMBER, LOG_HOUR, USER_ID) Values (:PORT_NUMBER, :LOG_HOUR, :USER_ID)"
                            	dim args55 as sql::Arguments
                            	args55.add("PORT_NUMBER",91)
                            	args55.add("LOG_HOUR",currHour)
                            	args55.add("USER_ID","LAUNCH")
                            	cn.execute(sql55,args55)
                            	
                            	cn.Close()
                            	OpenProgram = "location.href = 'http://www.ouraddress.com:91/ourloginpage.a5w';"
                            	exit function
                            end if
                            '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                            'check to see if there have been any logins to port 92 in past 2 hours.
                            'If not, send user to that port
                            sql2 = "select count(*) from TblPortLog where (LOG_DATE = :whatDate and LOG_HOUR = :whatCurrHour and PORT_NUMBER = 92) or (LOG_DATE = :whatDate and LOG_HOUR = :whatLastHour and PORT_NUMBER = 92)"
                            dim args2 as sql::Arguments
                            args2.add("whatDate",todayDate)
                            args2.add("whatCurrHour",thisHourToUse)
                            args2.add("whatLastHour",lastHourToUse)
                            
                            cn.execute(sql2,args2)
                            dim rs2 as sql::ResultSet
                            rs2 = cn.ResultSet
                            dim countPort92 as n
                            countPort92 = convert_type(rs2.data(1),"N")
                            
                            if countPort92 = 0 then
                            	'NOTE that the TblPortLog supplies date and time via the defaults for LOG_DATE and LOG_TIME
                            	sql55 = "INSERT INTO TblPortLog (PORT_NUMBER, LOG_HOUR, USER_ID) Values (:PORT_NUMBER, :LOG_HOUR, :USER_ID)"
                            	dim args55 as sql::Arguments
                            	args55.add("PORT_NUMBER",92)
                            	args55.add("LOG_HOUR",currHour)
                            	args55.add("USER_ID","LAUNCH")
                            	cn.execute(sql55,args55)
                            	
                            	cn.Close()
                            	OpenProgram = "location.href = 'http://www.ouraddress.com:92/ourloginpage.a5w';"
                            	exit function
                            end if
                            '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                            'check to see if there have been any logins to port 93 in past 2 hours.
                            'If not, send user to that port
                            sql1 = "select count(*) from TblPortLog where (LOG_DATE = :whatDate and LOG_HOUR = :whatCurrHour and PORT_NUMBER = 93) or (LOG_DATE = :whatDate and LOG_HOUR = :whatLastHour and PORT_NUMBER = 93)"
                            dim args1 as sql::Arguments
                            args1.add("whatDate",todayDate)
                            args1.add("whatCurrHour",thisHourToUse)
                            args1.add("whatLastHour",lastHourToUse)
                            
                            cn.execute(sql1,args1)
                            dim rs1 as sql::ResultSet
                            rs1 = cn.ResultSet
                            dim countPort93 as n
                            countPort93 = convert_type(rs1.data(1),"N")
                            
                            if countPort93 = 0 then
                            	'NOTE that the TblPortLog supplies date and time via the defaults for LOG_DATE and LOG_TIME
                            	sql55 = "INSERT INTO TblPortLog (PORT_NUMBER, LOG_HOUR, USER_ID) Values (:PORT_NUMBER, :LOG_HOUR, :USER_ID)"
                            	dim args55 as sql::Arguments
                            	args55.add("PORT_NUMBER",93)
                            	args55.add("LOG_HOUR",currHour)
                            	args55.add("USER_ID","LAUNCH")
                            	cn.execute(sql55,args55)
                            	
                            	cn.Close()
                            	OpenProgram = "location.href = 'http://www.ouraddress.com:93/ourloginpage.a5w';"
                            	exit function
                            end if
                            '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                            'check to see if there have been any logins to port 86 in past 2 hours.
                            'If not, send user to that port
                            sql7 = "select count(*) from TblPortLog where (LOG_DATE = :whatDate and LOG_HOUR = :whatCurrHour and PORT_NUMBER = 86) or (LOG_DATE = :whatDate and LOG_HOUR = :whatLastHour and PORT_NUMBER = 86)"
                            dim args7 as sql::Arguments
                            args7.add("whatDate",todayDate)
                            args7.add("whatCurrHour",thisHourToUse)
                            args7.add("whatLastHour",lastHourToUse)
                            
                            cn.execute(sql7,args7)
                            dim rs7 as sql::ResultSet
                            rs7 = cn.ResultSet
                            dim countPort86 as n
                            countPort86 = convert_type(rs7.data(1),"N")
                            
                            if countPort86 = 0 then
                            	'NOTE that the TblPortLog supplies date and time via the defaults for LOG_DATE and LOG_TIME
                            	sql55 = "INSERT INTO TblPortLog (PORT_NUMBER, LOG_HOUR, USER_ID) Values (:PORT_NUMBER, :LOG_HOUR, :USER_ID)"
                            	dim args55 as sql::Arguments
                            	args55.add("PORT_NUMBER",86)
                            	args55.add("LOG_HOUR",currHour)
                            	args55.add("USER_ID","LAUNCH")
                            	cn.execute(sql55,args55)
                            	
                            	cn.Close()
                            	OpenProgram = "location.href = 'http://www.ouraddress.com:86/ourloginpage.a5w';"
                            	exit function
                            end if
                            '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                            'NOTE THAT PORTS 87 and 88 cannot be used because they appear to be reserved for most browsers
                            ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                            'check to see if there have been any logins to port 89 in past 2 hours.
                            'If not, send user to that port
                            sql9 = "select count(*) from TblPortLog where (LOG_DATE = :whatDate and LOG_HOUR = :whatCurrHour and PORT_NUMBER = 89) or (LOG_DATE = :whatDate and LOG_HOUR = :whatLastHour and PORT_NUMBER = 89)"
                            dim args9 as sql::Arguments
                            args9.add("whatDate",todayDate)
                            args9.add("whatCurrHour",thisHourToUse)
                            args9.add("whatLastHour",lastHourToUse)
                            
                            cn.execute(sql9,args9)
                            dim rs9 as sql::ResultSet
                            rs9 = cn.ResultSet
                            dim countPort89 as n
                            countPort89 = convert_type(rs9.data(1),"N")
                            
                            if countPort89 = 0 then
                            	'NOTE that the TblPortLog supplies date and time via the defaults for LOG_DATE and LOG_TIME
                            	sql55 = "INSERT INTO TblPortLog (PORT_NUMBER, LOG_HOUR, USER_ID) Values (:PORT_NUMBER, :LOG_HOUR, :USER_ID)"
                            	dim args55 as sql::Arguments
                            	args55.add("PORT_NUMBER",89)
                            	args55.add("LOG_HOUR",currHour)
                            	args55.add("USER_ID","LAUNCH")
                            	cn.execute(sql55,args55)
                            	
                            	cn.Close()
                            	OpenProgram = "location.href = 'http://www.ouraddress.com:89/ourloginpage.a5w';"
                            	exit function
                            end if
                            '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                            'IF we get to here then all ports have been accessed within the past 2 hours
                            'So.. find which port has had the least access in the past 2 hours
                            
                            if countPort90 <= countPort91 then
                            	if countPort90 <= countPort92 then
                            		if countPort90 <= countPort93 then
                            			if countPort90 <= countPort86 then
                            				if countPort90 <= countPort89 then
                            					'NOTE that the TblPortLog supplies date and time via the defaults for LOG_DATE and LOG_TIME
                            					sql55 = "INSERT INTO TblPortLog (PORT_NUMBER, LOG_HOUR, USER_ID) Values (:PORT_NUMBER, :LOG_HOUR, :USER_ID)"
                            					dim args55 as sql::Arguments
                            					args55.add("PORT_NUMBER",90)
                            					args55.add("LOG_HOUR",currHour)
                            					args55.add("USER_ID","LAUNCH")
                            					cn.execute(sql55,args55)
                            					
                            					cn.Close()
                            					OpenProgram = "location.href = 'http://www.ouraddress.com:90/ourloginpage.a5w';"
                            					exit function	
                            				end if
                            			end if
                            		end if
                            	end if
                            end if
                            
                            if countPort91 <= countPort90 then
                            	if countPort91 <= countPort92 then
                            		if countPort91 <= countPort93 then
                            			if countPort91 <= countPort86 then
                            				if countPort91 <= countPort89 then
                            					'NOTE that the TblPortLog supplies date and time via the defaults for LOG_DATE and LOG_TIME
                            					sql55 = "INSERT INTO TblPortLog (PORT_NUMBER, LOG_HOUR, USER_ID) Values (:PORT_NUMBER, :LOG_HOUR, :USER_ID)"
                            					dim args55 as sql::Arguments
                            					args55.add("PORT_NUMBER",91)
                            					args55.add("LOG_HOUR",currHour)
                            					args55.add("USER_ID","LAUNCH")
                            					cn.execute(sql55,args55)
                            					
                            					cn.Close()
                            					OpenProgram = "location.href = 'http://www.ouraddress.com:91/ourloginpage.a5w';"
                            					exit function	
                            				end if
                            			end if
                            		end if
                            	end if
                            end if
                            
                            if countPort92 <= countPort90 then
                            	if countPort92 <= countPort91 then
                            		if countPort92 <= countPort93 then
                            			if countPort92 <= countPort86 then
                            				if countPort92 <= countPort89 then
                            					'NOTE that the TblPortLog supplies date and time via the defaults for LOG_DATE and LOG_TIME
                            					sql55 = "INSERT INTO TblPortLog (PORT_NUMBER, LOG_HOUR, USER_ID) Values (:PORT_NUMBER, :LOG_HOUR, :USER_ID)"
                            					dim args55 as sql::Arguments
                            					args55.add("PORT_NUMBER",92)
                            					args55.add("LOG_HOUR",currHour)
                            					args55.add("USER_ID","LAUNCH")
                            					cn.execute(sql55,args55)
                            					
                            					cn.Close()
                            					OpenProgram = "location.href = 'http://www.ouraddress.com:92/ourloginpage.a5w';"
                            					exit function	
                            				end if
                            			end if
                            		end if
                            	end if
                            end if
                            
                            if countPort93 <= countPort90 then
                            	if countPort93 <= countPort91 then
                            		if countPort93 <= countPort92 then
                            			if countPort93 <= countPort86 then
                            				if countPort93 <= countPort89 then
                            					'NOTE that the TblPortLog supplies date and time via the defaults for LOG_DATE and LOG_TIME
                            					sql55 = "INSERT INTO TblPortLog (PORT_NUMBER, LOG_HOUR, USER_ID) Values (:PORT_NUMBER, :LOG_HOUR, :USER_ID)"
                            					dim args55 as sql::Arguments
                            					args55.add("PORT_NUMBER",93)
                            					args55.add("LOG_HOUR",currHour)
                            					args55.add("USER_ID","LAUNCH")
                            					cn.execute(sql55,args55)
                            					
                            					cn.Close()
                            					OpenProgram = "location.href = 'http://www.ouraddress.com:93/ourloginpage.a5w';"
                            					exit function	
                            				end if
                            			end if
                            		end if
                            	end if
                            end if
                            
                            if countPort86 <= countPort90 then
                            	if countPort86 <= countPort91 then
                            		if countPort86 <= countPort92 then
                            			if countPort86 <= countPort93 then
                            				if countPort86 <= countPort89 then
                            					'NOTE that the TblPortLog supplies date and time via the defaults for LOG_DATE and LOG_TIME
                            					sql55 = "INSERT INTO TblPortLog (PORT_NUMBER, LOG_HOUR, USER_ID) Values (:PORT_NUMBER, :LOG_HOUR, :USER_ID)"
                            					dim args55 as sql::Arguments
                            					args55.add("PORT_NUMBER",86)
                            					args55.add("LOG_HOUR",currHour)
                            					args55.add("USER_ID","LAUNCH")
                            					cn.execute(sql55,args55)
                            					
                            					cn.Close()
                            					OpenProgram = "location.href = 'http://www.ouraddress.com:86/ourloginpage.a5w';"
                            					exit function	
                            				end if
                            			end if
                            		end if
                            	end if
                            end if
                            
                            if countPort89 <= countPort90 then
                            	if countPort89 <= countPort91 then
                            		if countPort89 <= countPort92 then
                            			if countPort89 <= countPort93 then
                            				if countPort89 <= countPort86 then
                            					'NOTE that the TblPortLog supplies date and time via the defaults for LOG_DATE and LOG_TIME
                            					sql55 = "INSERT INTO TblPortLog (PORT_NUMBER, LOG_HOUR, USER_ID) Values (:PORT_NUMBER, :LOG_HOUR, :USER_ID)"
                            					dim args55 as sql::Arguments
                            					args55.add("PORT_NUMBER",89)
                            					args55.add("LOG_HOUR",currHour)
                            					args55.add("USER_ID","LAUNCH")
                            					cn.execute(sql55,args55)
                            					
                            					cn.Close()
                            					OpenProgram = "location.href = 'http://www.ouraddress.com:89/ourloginpage.a5w';"
                            					exit function	
                            				end if
                            			end if
                            		end if
                            	end if
                            end if
                            '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                            'IF WE GET TO HERE FOR SOME REASON, THEN JUST PUT THEM ON PORT 91
                            'NOTE that the TblPortLog supplies date and time via the defaults for LOG_DATE and LOG_TIME
                            sql55 = "INSERT INTO TblPortLog (PORT_NUMBER, LOG_HOUR, USER_ID) Values (:PORT_NUMBER, :LOG_HOUR, :USER_ID)"
                            dim args55 as sql::Arguments
                            args55.add("PORT_NUMBER",91)
                            args55.add("LOG_HOUR",currHour)
                            args55.add("USER_ID","LAUNCH")
                            cn.execute(sql55,args55)
                            
                            cn.Close()
                            
                            OpenProgram = "location.href = 'http://www.ouraddress.com:91/ourloginpage.a5w';"
                            	
                            end function
                            '_____________________________________________________
                            Carol King
                            Developer of Custom Homebuilders' Solutions (CHS)
                            http://www.CHSBuilderSoftware.com

                            Comment


                              #15
                              Re: How We Reached A Stable Environment By Using Multiple Instances of the Web Server

                              The home grown Load Balancer looks awesome. Thanks for sharing it.
                              Question: When an user gets redirected to say http://www.ouraddress.com:93/ourloginpage.a5w, does the url show that particular port number (here 93) for the rest of the session for that session in the url?

                              Regards!

                              Comment

                              Working...
                              X