Hi LiteSpeed community,
I'm currently exploring ways of getting autoscaling working for a cluster of LSPHP-only worker instances (no LSWS on these), which would handle PHP requests for one or two permanent LiteSpeed front-ends.
My initial idea was to put an ordinary LS Web Server (not ADC) in front of the cluster of LSPHP instances using Litespeed's built-in External App load balancing feature; having it pass PHP requests off to the autoscaled instances which solely run LSPHP as a daemon. The problem with this is that these worker instances have to be registered in the LS load balancer manually which means it's not readily suitable for autoscaling.
So to get around this I've set up an Amazon Network Load Balancer to pass the LSAPI connections off to the ephemeral autoscaled instances. This works, but the problem with this is that from LiteSpeed's perspective, the cluster just appears as a single LSPHP instance, so it's unable to intelligently manage connections as it has no idea how many worker hosts there are back there behind the EC2 load balancer.
So after a bit of reading I found that Litespeed Web ADC has Zeroconf functionality which I believe would allow new instances to register / deregister themselves with an LSAPI Worker Group on scale-out / scale-in events. So I've been trying to set this up instead of using the EC2 LB, but the Virtual Hosts section of the Web ADC control panel is missing a number of features of the vanilla LiteSpeed Web Server: there is nowhere to register External Apps or set up a Script Handler; and there are no PHP options.
I've tried adding a Virtual Host Context which matches *.php to pass requests on to a LSPHP cluster, but the Context feature doesn't seem to have any concept of scripts and so it treats the LSAPI worker group as HTTP servers, and this doesn't work.
So my question is:
How do you get LiteSpeed Web ADC to handle PHP requests properly; passing them off directly to an LSAPI worker group?
If this isn't possible, then what's the proper way to autoscale an LSPHP cluster?
Thanks in advance for your input.
I'm currently exploring ways of getting autoscaling working for a cluster of LSPHP-only worker instances (no LSWS on these), which would handle PHP requests for one or two permanent LiteSpeed front-ends.
My initial idea was to put an ordinary LS Web Server (not ADC) in front of the cluster of LSPHP instances using Litespeed's built-in External App load balancing feature; having it pass PHP requests off to the autoscaled instances which solely run LSPHP as a daemon. The problem with this is that these worker instances have to be registered in the LS load balancer manually which means it's not readily suitable for autoscaling.
So to get around this I've set up an Amazon Network Load Balancer to pass the LSAPI connections off to the ephemeral autoscaled instances. This works, but the problem with this is that from LiteSpeed's perspective, the cluster just appears as a single LSPHP instance, so it's unable to intelligently manage connections as it has no idea how many worker hosts there are back there behind the EC2 load balancer.
So after a bit of reading I found that Litespeed Web ADC has Zeroconf functionality which I believe would allow new instances to register / deregister themselves with an LSAPI Worker Group on scale-out / scale-in events. So I've been trying to set this up instead of using the EC2 LB, but the Virtual Hosts section of the Web ADC control panel is missing a number of features of the vanilla LiteSpeed Web Server: there is nowhere to register External Apps or set up a Script Handler; and there are no PHP options.
I've tried adding a Virtual Host Context which matches *.php to pass requests on to a LSPHP cluster, but the Context feature doesn't seem to have any concept of scripts and so it treats the LSAPI worker group as HTTP servers, and this doesn't work.
So my question is:
How do you get LiteSpeed Web ADC to handle PHP requests properly; passing them off directly to an LSAPI worker group?
If this isn't possible, then what's the proper way to autoscale an LSPHP cluster?
Thanks in advance for your input.