Reverse Proxy scenario: 2 Aware servers, same SQL server? Will this work

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2451
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Reverse Proxy scenario: 2 Aware servers, same SQL server? Will this work

Post by Jaymer »

Lets say you have 1 Reverse Proxy server and 2 Aware servers and a 4th server with MSSQL.
I don't think it matters about which OS is running for this question.

But what if, based on some arbitrary criteria, some users are routed to Aware1 and other users to Aware2 (yes, this prolly is load balancing), but all data is in the same backend MSSQL database. The same BSV is running - pointing to the same MSSQL database. Basically the 2 Aware servers are clones of each other.
That doesn't cause any issues, does it? Any special considerations?

My reasoning for doing this is why wait until 1 server crashes and you have to redirect all users to server 2. What if server 2 isn't fully up to date? Its kinda like using a backup that you haven't tested in a while. I figure if all users are being split across both servers, then you know they are both working in the event 1 goes down.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
PointsWell
Posts: 1458
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Reverse Proxy scenario: 2 Aware servers, same SQL server? Will this work

Post by PointsWell »

As the server pulls the Config from the db both servers would be running the same version of the BSV.

The server also stores its licence data in the db though. Not sure how the sever licensing would work.
Jaymer
Posts: 2451
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Reverse Proxy scenario: 2 Aware servers, same SQL server? Will this work

Post by Jaymer »

ok, to fix that, they are technically NOT 100% clones.
Each server has to point to a diff. "install" database on the server - each would have its own License.
But yes, BSV's would be the same.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
PointsWell
Posts: 1458
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Reverse Proxy scenario: 2 Aware servers, same SQL server? Will this work

Post by PointsWell »

Jaymer wrote: Thu Feb 02, 2023 3:43 am ok, to fix that, they are technically NOT 100% clones.
Each server has to point to a diff. "install" database on the server - each would have its own License.
But yes, BSV's would be the same.
There's a section in the help about load balancing but it doesn't give much detail.

Maybe there is a special licence that allows multiple server connections?
hpl123
Posts: 2594
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Reverse Proxy scenario: 2 Aware servers, same SQL server? Will this work

Post by hpl123 »

As far as I understand, yes this is how it works and you don't need any special multiserver license, you only need Aware licenses for all of the Aware servers you are using. 2 in your case and if you add more servers you need 1 license per new server etc..

One thing good to know though is, Aware cannot ATTM have multiple DB servers connected to 1 app / farm of apps.

I have talked to Vlad at length about this but still find it difficult to understand completely so updated docs in this area would be great. I also don't think the HOW to set up the 1 DB for multiple Aware servers is covered in the docs but I could be wrong. Is it as simple as just pointing each app to an external DB server (and how do you do that?) and thats it or are additional steps needed?
Henrik (V8 Developer Ed. - Windows)
BLOMASKY
Posts: 1473
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Reverse Proxy scenario: 2 Aware servers, same SQL server? Will this work

Post by BLOMASKY »

While I have not tried this. I would assume the install folder would be different for each aware server (one points to Aware and AwareTest, other points to Aware2 and Aware2Test) and, assuming that the BSV that they share have an external database (data and datatest) there should be no problems with the DB server would handle the transactions. Just like with one version of aware, when 2 people are attempting to update the same db table at once, there will be a deadlock message.

Of course, when you edit the BSV and change the database structure, I would assume only 1 of the servers would get updated by aware, and the other would have to ignore the db update request.

Bruce
PointsWell
Posts: 1458
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Reverse Proxy scenario: 2 Aware servers, same SQL server? Will this work

Post by PointsWell »

BLOMASKY wrote: Thu Feb 02, 2023 8:46 pm While I have not tried this. I would assume the install folder would be different for each aware server (one points to Aware and AwareTest, other points to Aware2 and Aware2Test) and, assuming that the BSV that they share have an external database (data and datatest) there should be no problems with the DB server would handle the transactions. Just like with one version of aware, when 2 people are attempting to update the same db table at once, there will be a deadlock message.
From the initial comment my understanding is that there would be two sets of hardware. Otherwise there is no failover benefit
Of course, when you edit the BSV and change the database structure, I would assume only 1 of the servers would get updated by aware, and the other would have to ignore the db update request.

Bruce
The BSV structure resides in the database, not on the AIM server, so a change is immediate once the BSV is uploaded and published. The help documents specifically state to NOT have anything but production BSVs installed, comfig has to be done on a completely separate server/db set.
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Reverse Proxy scenario: 2 Aware servers, same SQL server? Will this work

Post by aware_support »

If servers connect to different databases then it's very much like separate independent installations. You need licenses for each installation.

A more typical scenario is scaling Aware IM to add more servers connecting to the same database. A few people use this configuration already. You still need licenses for each server but we do have a solution that takes care of storing licenses for multiple servers in the same database. There is also a special configuration property that you must set in the BASServer.props file that will handle timer events and process incoming email:
Hub = true
All other servers should have:
Hub = false
Aware IM Support Team
Jaymer
Posts: 2451
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Reverse Proxy scenario: 2 Aware servers, same SQL server? Will this work

Post by Jaymer »

FYI
One thing I have been considering is running aware on UNIX instead of windows, because on upcloud, the licensing fees are $10 per month per core.
So that’s $40 thrown away every month because of windows.
I’ve used Unix for Years and years, but the server and tomcat windows were not available to view in the control panel under UNIX, like they are on windows.
And that’s a very nice feature to have to see those errors happening at runtime to diagnose things.
That was the main reason I stayed away from UNIX.
I think with recent changes there’s been more flexibility with writing those logs out to files so while it may not be an up-to-date window, you can always tail the file to see recent messages just as easily.

In this project, that’s $1000 going to MS just for OS expense.

What other considerations should one think about when losing Windows.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
PointsWell
Posts: 1458
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Reverse Proxy scenario: 2 Aware servers, same SQL server? Will this work

Post by PointsWell »

Jaymer wrote: Fri Feb 03, 2023 7:25 pm
I’ve used Unix for Years and years, but the server and tomcat windows were not available to view in the control panel under UNIX, like they are on windows.
Run a UI on top of Linux.
Jaymer
Posts: 2451
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Reverse Proxy scenario: 2 Aware servers, same SQL server? Will this work

Post by Jaymer »

Why?
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
PointsWell
Posts: 1458
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Reverse Proxy scenario: 2 Aware servers, same SQL server? Will this work

Post by PointsWell »

Jaymer wrote: Sat Feb 04, 2023 2:09 amWhy?
To get the features you mentioned as being missing on Linux.
Post Reply