reverse proxy and load balance server architecture

While creating a load balanced and reverse proxy based architecture, how would the two be placed?

Is this the correct architecture?
First LB server, then proxy: – When client hits a URL, it is basically a load balancer, which has multiple reverse proxy servers sitting behind it. It calls a reverse proxy server, which in turn gathers data from multiple servers and afulfills the request

Is there a possibility of First proxy server then LB server?

Or am I totally missing the plot?

Answer

As Jesper mentioned, you need more details.

What is the role of the reverse proxy in this situation? Is the goal performance, high availability or both?

Some load balancers do URL filtering, so if the proxy is just routing traffic (not caching), then you may not need a proxy at all.

How much of the traffic can be cached? Where are your bottlenecks?

Lately, I’ve been using this stack with good results for a PHP based application:

HAProxy --> Varnish --> Nginx --> PHP-FPM --> MySQL/NFS server

What we found is about 70% of all requests can be served from the Varnish cache. We considered putting Varnish out front but a single Varnish server cannot handle the load. So we would need to load balance anyway.

This creates a single point of failure at the LB level, but our client is fine with it as we can spin up a new instance in about 5 minutes. They are willing to risk 5-10 minute outage rather than have a more complicated infrastructure with dual HA-Proxy servers.

Each usage case varies and only through testing can you find the best solution that fits the budget.

Attribution
Source : Link , Question Author : open_sourse , Answer Author : jeffatrackaid

Leave a Comment