Keepalived works in layer 4, so it does not have level 7 knowledge at all. Using HAProxy and Keepalived together, you can benefit from some of the options that HAProxy provides at level 7, for example Stickiness , Data for selection and conversion , ACLs and conditions , Switching Content , Stick-tables , Formed strings , HTTP rewriting and redirection , Server protection , etc. .
If you need only a load balancer without any manipulation or high-level decision-making (level 7), you can only use Keepalived, and it will be faster because it works in layer 4.