On Tue, Jan 9, 2018 at 1:28 PM, Thiago dos Santos Nunes < thi...@digitalinformatica.com.br> wrote:
> I really need help with High Availability for the Guacamole client. > Based on what you've said below, what I believe you mean by "High Availability" is that you need the number of active connections for a connection configured in the database (JDBC) to be shared across multiple Tomcat instances. > > > How could I implement this? Mainly regarding the maintenance of the > session of the users independent of the server that it connects and also > the maintenance of the number of concurrent users that a connection can > receive. > If my "implement" you mean, "What do I need to install/configure to get this working?," the answer is, you can't. Given the way Guacamole is written at present, what you are trying to do is not possible without changes to the Guacamole code. As I've mentioned before, right now, Guacamole tracks active connections completely in-memory. Changing this would require code changes that would store this information elsewhere, in a database or some other system that could track it across multiple Tomcat (/JBOSS/Jetty/Weblogic) and Guacamole Client instances. Also, the changes required to support this are not quick/easy changes. They are probably easier after some recent changes that Mike made, but it still isn't just a matter of, "Oh, go change these 10 lines of code and it'll work," it involves moving the mechanism from memory to database and all of the stuff that has to happen to support that, and that's going to take some effort to accomplish. And that's assuming that we (Guacamole developers) come to a consensus that it's something we should actually do. > > > Let me give you an example: > > > > I have 3 frontend servers (client guacamole). And my users can connect in > a certain connection only 3 at the same time (or 5 or whatever). But as > each time a user connects in a frontend it falls on a different frontend > these 3 connections can reach up to 9 (3 connections x number of frontend). > Think about 20 diferent types of connections in one server > Right, so what you're wanting to do is make sure that, if multiple Guacamole installs are sharing a single database, that they also are updating active connection information among themselves so that, if you set the maximum number of active connections for a connection to 10, you get 10 across all three of the servers and not 10 per server. > > > Today for me to control the use of resources of the servers and the > licensing is VERY DIFFICULT. > > > > I do not know much about programming and in our environment we can not > deploy a solution like hazelcast (because of cost, very expensive). > Don't latch on to Hazelcast. I mentioned it in the past, but there are other options - it was only an example of an in-memory database that can be synchronized across nodes. There are others. The biggest point I was trying to make here is that simply tracking this information in the existing JDBC module inside the database may not be fast enough to scale very well - it would probably work fine for what you're doing, but once you got up to several hundred or several thousand connections and 5 or 10 nodes, waiting for a database write in order to determine the number of active (and, thus, available) slots for a connection may take too long. It may need to be done in memory on the hosts and then synced across the hosts. > > > Today we use Tomcat 8.5 (we can change it if necessary) and pfsense with > HAProxy enabled balancing between them (but no session persistence in case > of a crash or simultaneous access control). > > > Again, it isn't going to matter unless/until Guacamole's code is changed to implement this. -Nick