|
|
| | Ask HN: Would you load balance traffic without CDN | | 5 points by 0xdeafbeef on July 31, 2023 | hide | past | favorite | 11 comments | | I have an average traffic of 5 Gbps to the service. Currently, I'm using managed Kubernetes in GCE and paying $20,000 for traffic. I'm planning to move to another provider, but the question is how to handle load balancing. My idea is to create several A DNS records and let the client choose a random IP, but this is incompatible with Cloudflare, as it uses round-robin under the hood. After testing, it seems like Cloudflare sends all the requests to the first record. So, the second solution is to create several sub-domains and choose randomly from them. All managed load balancers will cost a ton, so that's not the way. Is there any better solution? Ideally I'd like to have one ip without any client load balancing |
|

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
|
Otherwise, if you're serving all the traffic with a single IP, you need to do some sort of load balancing. Haproxy + CARP + cold failover is operationally simple, but you lose sessions when your Haproxy box needs maintenance.
ECMP works if your hosting allows for it. You'll still lose sessions during changes though.
Maybe something something pfsync. Or something with proxygen or some other load balancing that came out of Facebook. (I worked there, but not on their load balancers)
More details on what you're planning to do with 5Gbps helps you get advice. I'm assuming https, because cloudflare. Is it mostly static content, or mostly dynamic or mostly proxying? Does it burn a lot of cpu (so you need many boxes anyway) or ? Are you likely to attract DDoS, so you need more inbound bandwidth to accept and drop abuse? Do you expect to provide users with a SLA / what service level do you want to provide? Etc