Kentico first page load VS load balancing

Digital Team asked on September 28, 2016 16:58

Hi Guys,

I have question regarding performance when trying to combine 2 different technologies. In my system I have 2 servers with a Kentico installation as a web site project (Compile on memory) under a load balancing system.

As far as I know, this kind of sites compile with the first call of the page to compile and it unloads from memory after a while if nobody calls the same page again. It's also a fact that this system consumes a lot of Memory to allocate the compiled binaries and makes the first call of every page very slow.

The problem arises when the load balancer sends the clients between both servers. It will automatically make both web servers compile the same code and instead of 1 first slow page load, there will be 2 (one for each server that the client connects).

Is there any way to tell my load balancer to send the request preferably to the server who has already compiled the code?

I'm using the Azure Load Balancer service.

Many thanks

Recent Answers

Trevor Fayas answered on September 28, 2016 18:44

Not sure on telling it how to request the one compiled, but an easier solution is to just prevent the sites from falling asleep. It may affect the cost of the hosting depending on your azure setup, but we usually set up a simple site pinger to ping the kentico site every 5 minutes or so so it won't go to sleep and have to compile everything again.

2 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on September 29, 2016 09:40

This may not be 100% related but I think it could be handy. There was an article published recently on how to speed up the load times. Get Near-Zero Load Time in Both Development and Production

0 votesVote for this answer Mark as a Correct answer

Digital Team answered on September 29, 2016 10:30

And just pinging the homepage would keep the whole thing on memory?

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on September 29, 2016 12:56

While if the ONLY page ever visited was the home page, it may not build any additional caches (kentico has caching on each page if you enable), it WILL prevent the site from going to sleep which is the majority of the slowness, the rest is up to your caching times and structure (kentico has documentation on optimizing your site using caching).

But in general, yes.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.