How Cache works in a load balanced web server scenerio

Stimulsoft Reports.NET discussion
Post Reply
goldsun
Posts: 8
Joined: Sun Apr 20, 2008 10:21 am
Location: Chennai, INDIA

How Cache works in a load balanced web server scenerio

Post by goldsun »

Our web application is hosted in a load balanced clustered environment. Can some one explain, how the report.render.CacheMode will work in such a scenerio? i.e. If the report is rendered out of one web server and further hits land on a different web server, what will happen?. Also curious to know if Ajax enabled rendering will also work in such environment.

Thanks in advance
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How Cache works in a load balanced web server scenerio

Post by Edward »

Hi GoldSun,

Unfortunately CacheMode will not work in that case. As for Ajax then we can not tell for sure.

You need to provide a testing of this mode.

Thank you.
goldsun
Posts: 8
Joined: Sun Apr 20, 2008 10:21 am
Location: Chennai, INDIA

How Cache works in a load balanced web server scenerio

Post by goldsun »

Thanks Edward for the information. I think the best option for us is not to depend on WebViewer and instead have the reported rendered (or exported) in the desired format and stream it to the browser. We may also consider implementing our own cacheing mechanism to avoid multiple calls to the database.

Can you give more information on the packed document format (mdc / mdz)? Will it include data as well? If yes, it may be ideal to cache the packed document instead of caching the data alone and then performing another render / operation. Or may be we would cache the exported report itself.

If you have any more suggestions on what other thing that I may consider to improve the performance, pls. let me know.

Thanks in advance.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

How Cache works in a load balanced web server scenerio

Post by Jan »

Hello,
goldsun wrote:Thanks Edward for the information. I think the best option for us is not to depend on WebViewer and instead have the reported rendered (or exported) in the desired format and stream it to the browser. We may also consider implementing our own cacheing mechanism to avoid multiple calls to the database.

Can you give more information on the packed document format (mdc / mdz)? Will it include data as well? If yes, it may be ideal to cache the packed document instead of caching the data alone and then performing another render / operation. Or may be we would cache the exported report itself.

If you have any more suggestions on what other thing that I may consider to improve the performance, pls. let me know.

Thanks in advance.
Mdc and mdc format similar to pdf format, but only for Stimulosft Reports. This is xml format. It contain rendered report from first page to last. Data not present. Mdz is packed form of Mdc file (packing take some time). You can use following code:

Code: Select all

StiReport report = new StiReport();
report.RegData(Data);
report.Render(false);
string str = report.SaveDocumentToString();
//Save string str to page cache or in other place

for restore report:

Code: Select all

StiReport report = new StiReport();
report.LoadDocumentFromString(str);

StiReportResponse.ResponseAsPdf(this, report);
Thank you.
Post Reply