Hacker News new | past | comments | ask | show | jobs | submit login

You can use haproxy as a tcp load balancer for the apiserver instead of an elb



could you please comment on how you use Haproxy servers across multiple AWS availability zones ? how do you configre and manage dns for your haproxy etc ? My reason for asking is that I am super cheap and I want to avoid AWS ELB charges.


Put your Haproxy (or nginx-ingress, or whatever) into HostPort mode, or enable hostNetwork.

I have a comment somewhere in my history that explains in a bit more detail: https://news.ycombinator.com/item?id=18660503

that's it... hostPort mode, hostNetwork, and enable in DaemonSet mode. Now all of your nodes are load balancers for ingress, and you don't need any ELBs. This is not a recommended configuration because something has to point DNS at your nodes, and the nodes are really not designed to be permanent.

If you autoscale, or scale your cluster manually, your DNS needs to be updated to keep up with that. You may be able to find a way to automate that, but DNS has limitations related to TTL, such that if you are doing this too frequently, visitors to your cluster are likely to experience issues.

But if your nodes never come and go, this is a pretty good way to run a cluster and keep it on the cheap. If the traffic you want to balance is not HTTP then ingress won't help you (for now?), but the configuration for HAproxy will be similar.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: