Deploying RadChart in Multi-Server Environment

Thread is closed for posting
6 posts, 0 answers
  1. Angus
    Angus avatar
    5 posts
    Member since:
    Sep 2008

    Posted 22 Sep 2008 Link to this post

    Using RadChart control, works fine in most environments... However.

    In production our webserver is served through a load balancer onto two machines.  The RadChart control seems to only be working half the time.  Suspect what's happening is that the RadChart control makes a call to the server, generates the chart image and places it on one of the machines, but the control makes the image request in a seperate call, and thus does not always get the same machine.

    Does RadChart have support for deploying to a multi-system front end?
  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 25 Sep 2008 Link to this post

    Hi Angus,

    Your observation is correct -- it is possible that the image request is handled by the other machine. RadChart offers solution for this case -- set UseSession to false, populate TempImagesFolder with a shared folder, which is accessible from all the machines and grant the ASP.NET process with rights to write in this folder. You can find this described in this help topic.

    All the best,
    Ves
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Angus
    Angus avatar
    5 posts
    Member since:
    Sep 2008

    Posted 25 Sep 2008 Link to this post

    Excellent, except now the problem is that GDI+ throws up inside the control when it tries to write to the share.

    ASP.NET must have access, because I'm creating the folder inside of the same piece of code, (where imageDir ends up being of the form \\myShare\ChartImages):

    protected

    void Page_Load(object sender, EventArgs e)

    {

                 if (!Page.IsPostBack)

                 {

                              string imageDir = String.Format(@"{0}\ChartImages",

                              EnvironmentSettings.Instance.SharedFileSystemScratch);

                              imageDir = Server.MapPath(imageDir);

                              if (!Directory.Exists(imageDir))

                              {

                                           Directory.CreateDirectory(imageDir);

                              }

                              MFHistoryChart.TempImagesFolder = imageDir;
                 //rest of function

  4. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 26 Sep 2008 Link to this post

    Hi Angus,

    It seems my previous reply has not been entirely correct, I am sorry for this. The temp images folder may not be placed outside the application due to security reasons, so this approach will not be applicable. An alternative solution involves using the default UseSession value (true) and a StateServer or SqlServer session state mode, so that the image is retrieved correctly.

    Kind regards,
    Ves
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Angus
    Angus avatar
    5 posts
    Member since:
    Sep 2008

    Posted 26 Sep 2008 Link to this post

    That's exceedingly poor.  Which will create a single point of failure in our web farm, because all of the applications would need to point to a single ASP.NET State process or Sql State Server in order to maintain consistent state information.  If that server fails, it would require a manual configuration change to point at a new state server, during which time the entire application would be offline.

    That's a lot of overhead just to show a chart in a webpage.
  6. Mike
    Mike avatar
    1 posts
    Member since:
    Sep 2008

    Posted 10 Jan 2009 Link to this post

    Have you tried adding a virtual directory to the shared drive in IIS?

    Another thing to try is sticky sessions on the load balancer so a user always gets served by the same server.  I know this may not be preferable, but it seems that it would scale better than the state server solution.
Back to Top