Using Cloudflare front-end with multiple backend servers

I am not familiar with Cloudflare services. It looks to me that it works as a proxy by forwarding filtered traffic to my actual server so as to stop hacking and DDoS attempts. Am I correct so far?

Customer wants a high available setup. He suggests using CF this way: A single published IP for his web app pointing to CF. Two entries in CF pointing to his two app servers. This way, he says, he will have load balancing with CF forwarding in a round-robin manner, plus HA where if a server or link goes down, the other would continue working.

He will have two app servers (for a single app) at two different locations with separate links from different ISP’s. The app is in PHP and runs on LAMP.

This is not clear to me. If I deploy my app on two servers at different sites, how would user sessions be maintained? Should I deploy Apache mod_proxy_balancer? If so, can that be configured when the servers are at different sites?


While you can use DNS to pseudo-round-robin between two IP addresses, it’s not the best way to go due to sessions issue you pointed out.

Load Balancing seems to be the more reliable approach in your case. One pool with two origins.

Thanks for the reply. Ok,… session affinity… yeah, I see how that would work and, yes, it won’t be load balanced per se but I can get the client to go along with it. To be clear, if a server goes down, all the clients go down with it so it’s not an HA solution in that case? He’d could create a fuss on that.

They’ll be routed to the remaining server, but they’ll obviously lose their session from the old server.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.