Multi-Tenancy & Performance

  

Our client list is growing thus the demand on the application is increasing.

Currently the application is not multi tenant.

I'm just wondering if it will improve the performance switching to it?

The heavy demand usually come in at the upload of daily operational files (ItemMaster/Order/PurchaseOrder/Inventory csv files, total recordlines just under 1 million.) to its own database

Not only the upload, we have to summarize the quantity (Group By Year/WeekNum) of Order/PurchaseOrder/Inventory files to another summarized databases

Lastly, we have to merged the summarized Order/PurchaseOrder/Inventory along with the the ItemMaster into a new Baseline database 

As you can see there are a lot of things going on, not to mention other additional queries. 

It will take just under an 40 minutes to do 1 client. 

While the process is going on, the application slows down (travelling to other webscreen in a new tab)

How can I increase the performance? does my sql database server needs more ram or something?



Hi David,

Changing your application to be multi-tenant in itself will not improve the performance. I couldn't understand how many DBs you're talking about and what's done only on OutSystems DB exactly.

If it really takes 40 minutes per client, for something you do daily, for sure you need to act on that. One possible way would be to have a server just to run your Timers - I suppose you're using timers for those daily operations.

So what does multi tenant in a nutshell give us?


Just separating the data? Preventing dead locks? Does it have that load balancing features?


Tiago Neves wrote:

Hi David,

Changing your application to be multi-tenant in itself will not improve the performance. I couldn't understand how many DBs you're talking about and what's done only on OutSystems DB exactly.

If it really takes 40 minutes per client, for something you do daily, for sure you need to act on that. One possible way would be to have a server just to run your Timers - I suppose you're using timers for those daily operations.



A multi-tenant is mainly a way to isolate your data/session/processes while keeping a single code base.

You can still implement load balancing and other performance techniques but the above is what you can get with multi-tenancy.

Hi David,


Mutitenant gives you only data segregation. It forces that a user is associated with only a single tenant and he can not access any multitenant data that does not belong to his tenant. It is expecially usefull to avoid developer mistakes where it displays data to users it does not belong. In your case since you talk a lot about external databases for each client, you look like already doing all the separation yourself.

In practice this is only materialized by automatic filters in all the queries (actually with views ...but its almost the same), so it won't help with performance.

It can even have the reverse effect since it gives you less control over the database indexes that are created over the tenant identifiers (when comparing with an attribute you add yourself to make the equivalent segregation)


Regards,

João Rosado