Scaling Bedrock Video Delivery to 50 Million Users with HAProxy
Bedrock migrated its video delivery to the cloud. Very quickly, we needed to add a cache layer to absorb the load. AWS load balancers do not allow for advanced load balancing algorithms, such as consistent hashing, so we decided to use HAProxy. Thanks to the HAProxy Runtime API, we developed a tool in Python that allows us to synchronize the AWS AutoScalingGroup with HAProxy. In the end, we scale our load balancers as well as our applications, while optimizing the cache. We also improved our resilience, using among other things HAProxy's retry and redispatch to bypass the network limitations of AWS EC2 instances.
During this presentation, I will describe the different versions deployed since the beginning of this cloud migration and their evolution until today. I will detail the significance of each element of our configuration, which allows Bedrock to provide videos to more than 45 million people, by explaining the gains in performance, or resilience.