7

What exactly is the process of warming up a load balancer? How does it help before a huge load process? How is it different from Simply upscaling a cluster behind the LB beforehand.

Do CSPs do something special when we make a pre-warmup request?

GCP and AWS use the term warmup differently.

Joey Pinto
  • 281
  • 1
  • 2
  • 8
  • 2
    https://petrutandrei.wordpress.com/2016/03/18/pre-warming-the-load-balancer-in-aws/ – Michael Hampton Jan 05 '19 at 01:00
  • Are you asking a question about a specific platform, or are you asking about the theory? In AWS it can take up to an hour for a load balancer to scale up if you get a sudden traffic surge, pre-warming can avoid downtime. – Tim Jan 05 '19 at 05:25
  • @Tim If I force my auto scaling group to have a huge number of instances, does it have the same effect? – Joey Pinto Jan 05 '19 at 19:43
  • 1
    @MichaelHampton are the ideas mentioned in that blog still relevant since 2016, is Pre-warming still necessary? – Joey Pinto Jan 05 '19 at 19:45
  • @Tim already answered that! – Michael Hampton Jan 05 '19 at 20:29
  • 1
    I believe adding instances does suggest the load balancer increase its capacity, but I don't know how long it takes. AWS have always said if you're expecting a huge surge of traffic at a specific time that ramps up quickly to contact them to pre-warm the load balancer. If it increases gradually then the load balancer will increase its own capacity automatically. – Tim Jan 05 '19 at 23:53
  • Cloud load balancing can easily handle huge, unexpected and instantaneous spikes by diverting traffic to other regions in the world that can take traffic. It has a mechanism called “Autoscaling’ [1] which does not require pre-warming, you can scale your applications on Google Compute Engine from zero to full throttle in a matter of seconds[2]. [1] https://cloud.google.com/compute/docs/load-balancing-and-autoscaling [2] https://cloud.google.com/load-balancing/ – Md Zubayer Jan 15 '19 at 20:57

2 Answers2

11

I'm compiling an answer based on the comments on the post, thanks to @Tim and @Michael Hampton

From Petrutandrei's blog-

The ELB is designed to handle large loads of traffic (20kb/sec) without a problem when this traffic increases gradually over a long period of time (several hours). However, when you expect a high increase in traffic over a short period of time, then you face a problem.

AWS considers that if the traffic increases more than 50% in less than 5 minutes then it means that the traffic is sent to the load balancer at a rate that increases faster than the ELB can scale up to meet it. In such cases, one needs to contact AWS to do an operation called “pre-warming”.

So scaling up a cluster even before the actual load spikes in is called warming up. However, the load balancer in itself is a virtual machine or a service hosted somewhere which does the load balancing logic. The resources doing the load. balancing themselves need to scale up rapidly.

Only increasing the cluster size increases the target for the load but not the resources to do the actual load balancing action. This can only be done from CSP's side or by creating equivalent artificial load from your own end. This is called as pre-warming

More information on AWS website [https://aws.amazon.com/articles/best-practices-in-evaluating-elastic-load-balancing/#pre-warming][1]

Joey Pinto
  • 281
  • 1
  • 2
  • 8
  • 1
    An ELB a service (used to be HAProxy) running on at least one VM per AZ. Scaling out means adding machines, then adding their entries to the load balancer DNS, which can take minutes to an hour. – Tim Jan 06 '19 at 02:03
0

If you anticipated extremely spiky workloads or even instantaneous fail-over between regions, you would provision a load balancer in preparation for the surge in traffic in advance, this is “pre-warming”. Warming up is the process of initializing necessary services in readiness to receiving requests. The terms appear to have uniformity in usage cutting across.

Zapto
  • 1,824
  • 6
  • 23
  • 39