Reactive web: populate large data from client variable
Question

Hi,

I have created a Reactive web app, I am facing with  large number of Concurrent connections to External Azure SQL (2).

So I decide to save a json data on client variable and the use "Fetch Data from other source" to populate data into the Screen table (1).

The json string content a list of more than 200 records. Each record have 20 fields. On the Screen to display, each cell is a web block and can display tooltips from record field.


From my test, the approach 2 is faster than approach 1, but I just worry about the large number of concurrent connections to External Azure SQL.


Do you have any advice which is the best approach for my case ?



Thanks,

Nghi

mvp_badge
MVP

Hello Nghi,

When you mention a large number of connections, what is large to you? Is the number of connections causing any problems?

Typically, OutSystems (and other applications) will use connection pools to connect to databases. By having connections already established to the database, queries can be performed very quickly without the additional latency of re-connecting, authenticating, etc.

Hi Craig,

My planning to have 500-2000 user login at the same time. Our database is external DB from Azure with limited App Service Plan for DTU. 

mvp_badge
MVP


Hey Nghi,

OutSystems will not pool connections based on the current number of users, it will pool the connections based on the number of applications using the datasource.

Also, from how I understand DTUs, I don't believe having multiple connections should have any impact on the pricing (but please confirm this, I'm not an expert on Azure pricing). DTUs work on storage and database transactions - simply maintaining open connections I don't believe will increase this.

I would not recommend using client variable for this, as is it not secure. And since it is on the client it is not logical to fetch it.

I have created a session table to store this kind of data, as you perhaps would have preferred to use a session variable for this, which is not possible in reactive applications.


I would agree that client variable is not secure.  How about using Azure  SQL as the persistent db and introduce an in-memory db, such as Redis as your runtime db. There is then no limit on number of hits onto your runtime db since it's hosted by yourself. Redis can substantially support more concurrent queries and the performance is good. Synchronizations between Azure SQL and Redis will need to be done.



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.