Trying to imagine 5,000 multi tenants.

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Trying to imagine 5,000 multi tenants.

Post by numberz »

Hi,
I'm trying to imagine having 5,000 tenants (companies) using my software by way of Business Spaces. Does anyone have some good info on how this could happen and what would be needed, technologically and money-wise to pull this off? Or am I concerned for no reason...meaning 5,000 is as easy as 50?
Regards,
Numberz
Regards and thanks,
Harry Carter
customaware
Posts: 2405
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Trying to imagine 5,000 multi tenants.

Post by customaware »

The more important question is how many concurrent users will be using at any one time.
Having 5000 Tenants is no problem. But I guess they are not ALL going to be logged in at the same time?

Also, a lot will depend on your app and how it is designed and efficient Rules, Processes and Reports.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: Trying to imagine 5,000 multi tenants.

Post by BenHayat »

eagles9999 wrote:The more important question is how many concurrent users will be using at any one time.
Having 5000 Tenants is no problem. But I guess they are not ALL going to be logged in at the same time?

Also, a lot will depend on your app and how it is designed and efficient Rules, Processes and Reports.
Well said; As Mark said, how many users will be logged in at one moment, and how many objects get loaded as a user logs in. This is a server side system with state-full session data. And how long each user stays logged in.
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Trying to imagine 5,000 multi tenants.

Post by numberz »

Thanks.
So, okay...Do you have any reference to real life situations that may relate to me?
A "for instance" type thing?
"We have 300 users but when 70 or more are logged on, things slow down", etc?
Also, I had asked about money, meaning one server enough for 5,000 users?
I have no idea how many concurrent users there would be but again...any "for instance"?
Regards,
Numberz
Regards and thanks,
Harry Carter
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: Trying to imagine 5,000 multi tenants.

Post by kklosson »

There is no technical reason that you would not be able to support this many accounts, but I too refer back to Mark's comments. These are the things you need to consider. At some point, you will need more server power via a load balancer. I am about at that point now. My problem is that my system will melt down at a certain load but there is something else going on because I am nowhere near memory or CPU limits so I believe there is something in my app I need to optimize and under heavy load, it is simply more exposed. So adding a load balancer is not helpful right now because the machine always appears healthy to the LB. So if you anticipate a large scale implementation, you should do all you can to optimize your application using good designs and paying attention to your business rules.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Trying to imagine 5,000 multi tenants.

Post by numberz »

kklosson, thanks.
Can you give me some numbers (of yours)?
Regards,
Numberz
Regards and thanks,
Harry Carter
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: Trying to imagine 5,000 multi tenants.

Post by kklosson »

Take with a grain of salt. A typical day sees 800 - 1,500 logins. Whenever the server melts down, I estimate about 150 concurrent users but at that point, neither Java process is approaching its allocated memory and the CPU is unchallenged, so I'm on the hunt for exactly what causes the meltdown but I don't think it is simply the system hitting a limit. I note that it is the AwareIM server that stops responding and I have a few clues. I have 27 accounts, but those accounts are constantly creating users who come to the system to complete lengthy questionnaires, and each person completing a questionnaire has 15-20 references who also come to the system to complete a more limited questionnaire. So every account spawns quite a few more potential users and the workload at each account if fairly constant.

I am ready to hook up a load balancer in a quick minute but as I said, no point in it if the server is going to crap out the way it does. We're working on it.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
weblike
Posts: 1165
Joined: Sun Dec 02, 2012 12:00 pm
Location: Europe

Re: Trying to imagine 5,000 multi tenants.

Post by weblike »

kklosson wrote:Whenever the server melts down, I estimate about 150 concurrent users but at that point, neither Java process is approaching its allocated memory and the CPU is unchallenged, so I'm on the hunt for exactly what causes the meltdown but I don't think it is simply the system hitting a limit.
Only 150 and slows down??...that's very scarry...
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Trying to imagine 5,000 multi tenants.

Post by numberz »

Hmm...it's very concerning because I'm rebuilding a software program of our that we sold back in the 80's and 90's. We sold 6,000 copies. This MUST work :)
Regards and thanks,
Harry Carter
ACDC
Posts: 1142
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: Trying to imagine 5,000 multi tenants.

Post by ACDC »

It's all about the design of the system.

As much as AwareIM is a simple to use system, a developer would need to be capable of researching and investigating the design/layout of such a system within the context of AwareIM. Also, understanding the backend server technologies and how they are meant to scale, not to mention designing around full utilisation of the rules engine. The concept of Scaling Up or Scaling Out should also be understood.

If you are serious about such a large user base and complex multi tenant system then I would recommend subscribing to support to assist you along the way in laying down the foundation and reviewing your conceptual design as you go , it will be money well spent and I am sure will be totally recoverable from that kind of usage.

I believe its totally doable with AwareIM, but you must have the balls to venture and persist with the end goal
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: Trying to imagine 5,000 multi tenants.

Post by BenHayat »

What type of application is this? Is this the type of application for example like a CRM or Order Entry or a type of application that user logs in the morning and uses it throughout the day as their primary tool for the job? Meaning the user remains logged in and the Aware server needs to maintain and track that user's session data all day?
OR
Is this an application that a user may login, perform a quick operation and then logs out and Aware does not need to keep track anymore?

This distinction makes a huge difference how many "concurrent" users you can handle per server. Aware does a great job of carrying a lot of data between each session so you can build a rich app, but that comes with a heavy price of consuming server's resources.

The heavy/big session data goes back to early 2000 designs where most of server side apps, like PHP, ASP Web Form, and many others did a good job of offering the old client/server statefull application but they all suffered with server side getting bugged down. And now most of the new LARGE systems, have all become fully stateless system using REST API where there is no permanent connection or state maintained between each request/response. This allows the server(s) to handle a lot more clients and the clients can talk to any server between each request.
This is a much more complex, time consuming and costly development (if done right) but the sky is your limit and you can easily scale on hardware & software.

This is where the buck stops. You can develop it fast and get in the business quickly but you "can" hit the wall soon if your app require users to stay logged in for a long time or you can build an enterprise grade app, but will take you much [much] longer and more expensive to build, but done right, you have a long term product.

If you have that many user/tenant user base to move over to this new generation, and you see potential growth in your business, I highly recommend build a backend REST service (using ASP.Net Core or Node.JS) and through one set of API, you can build clients for your Admin operation, User desktop (Using Angular 4) and fully Mobile (using Ionic/NG4) and same API can serve 1000's of users easily.
Last edited by BenHayat on Tue Aug 29, 2017 5:33 pm, edited 1 time in total.
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: Trying to imagine 5,000 multi tenants.

Post by kklosson »

And in my case, the 150 number isn't the "limit", it's just what I note at times when the system fails. And it doesn't slow down, it just fails. So something is wrong somewhere and I do think it's something int he application design. Ergo, what others are saying in this thread should be your thoughts as you go forward.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Trying to imagine 5,000 multi tenants.

Post by numberz »

My software program is used by some, part of the day or week and by others, all day. It's a construction estimating program. Bottom line...this needs to be robust and handle many users. Is there a better route for me to follow???
Regards,
Numberz
Regards and thanks,
Harry Carter
customaware
Posts: 2405
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Trying to imagine 5,000 multi tenants.

Post by customaware »

Numberz,

Idronic have a couple of applications (CutQuote and Ranfab) that service many many customers all over the World without issue. I have heard it is the most intricate applications ever written in Aware.

Go Here and log in.... Login: James, PW: James
https://s1.ranfab.com/AwareIM/logonOp.a ... pplication

It is an extraordinary accomlishment.

As a SaaS application, you have basically two choices...

a) Single Business Space (SBS) Model or
b) Multiple Business Space (MBS) Model

SBS: All Tenants hosted in a Single Business Space with data separation managed by Rules (READ PROTECT) and Query Filters
MBS: Each Tenant is hosted in their own Business Space.

Idronic employe the MBS model which allows them to spin up a new Business Space for each new tenant and locate it on the server nearest to the customer (I am not sure how many servers they have now but I know it is at least 3) and they use VULTR for their hosting.

There are many Pros and Cons with both Models so the decision will entirely depend on you circumstances. Number of Tenants, sensitivity of data separation, concurrent users, location of Tenant and hosting cost.... to name a few.

My view is that a case can be made to employ a mixture of both.....for example....

Small Tenants who are only ever likely to have a few users..... add them to SBS
Large Tenants who are likely to have many many concurrent users ...... deploy with their own BS (MBS) Model.... and depending on size... maybe even their own server instance.

If you are just starting out.... and you have a vision for what you would like the load to grow to, but it is not guaranteed yet.... my recommendation would be to start out with the SBS model. If done correctly, it would then suitable to deploy a new BS for any particular Client as required either on the same server instance or on a different instance.

Essentially, If you design for ONLY MBS then you will preclude yourself from being able to deploy a much more cost effective SBS for small tenants. But if you design for SBS then you can grow as you wish.

I would have no fear of load as the options above are pretty much endless. But I would have concerns if your expectation was to put 5000 concurrent users on a single server and a single BS. I cannot imagine an app that would be so trivial that would suit that.

Happy to discuss further if you want to PM me.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Trying to imagine 5,000 multi tenants.

Post by numberz »

Eagles9999, thanks.
We are rebuilding this software that we've had for almost 40 years and sold to over 6,000 companies. problem was that it was written in Cobol. I do know the requirements, I'm just needing to know if this can be done.
Our users would need their own database of items that they can add to, delete, edit.
Regards,
Numberz
Regards and thanks,
Harry Carter
Post Reply