Pound: reverse proxy and load balancing
Translation of the original in Catalan. Read it in: CatalàCastellano
Through a
I discovered this tool called
. It has really impressed me for its simplicity and power at the same time. It has also given me a lot of confidence to know that there is at least one site processing 30M requests a day, about 600 per second, with this application. This kind of numbers always helps to give confidence in the tools.
Well then, the tool basically devotes itself to capturing all the HTTP and HTTPs requests and then distributing them against the servers it has in the backend. At no moment does it act as a cache or anything similar. Although it is worth highlighting the ability to act as an SSL wrapper. So the backends don't need to be SSL servers, just HTTP servers. Obviously for the client a completely transparent HTTPs connection will be established. If the SSL validation is not correct Pound no longer sends requests to the servers it has behind it.
The load balancer functions prevent losing the sessions established by the clients' browsers against the backend servers; in fact, Pound implements six different ways of capturing a session in order not to send requests to one of the backends that does not know the browser's session.
It supports fail-over functions, so all requests are addressed only to the backend servers known to be working; the validation done to find out whether a server is active or not is quite simple and broadly speaking is based on ICMP packets.
Finally it is also worth highlighting a feature that caught my attention a lot, since it allows acting as a URL wrapper and sending the requests that match certain regular expressions to one server or another. This allows, for example, sending the virtual domains to one server or another. In addition, we can also for example send the image requests to certain specific backend servers.
When reading the documentation of this tool, what intrigued me most was finding out how they solved the typical problem that tools of this kind have, the log files. Let me explain, a very important thing to be able to control from the point of view of a web server is knowing where the requests come from; if the web server does not receive the requests directly from the internet but through a balancer like Pound, the source IP of the request is lost and therefore the log files of the web servers are not real but always have the balancer as their origin. In addition to all the problems associated with not knowing where the requests come from, such as access control and other similar ones.
Well then, basically this is solved through an HTTP header added by Pound to the web request. So it is in this header that the necessary data must be looked up to rebuild the web server's log file. There are also apache mod's that already solve this issue directly by capturing this new entry in the HTTP header; specifically it is worth not losing sight of
In my opinion a great discovery and a very interesting tool in order to be able to set up web servers with a bit more substance. I don't know if anyone has tried it ;)
3 comments
Comments from the old blog, as they were written. Comments are closed.
sabueso
No te la funcionalitat del ssl , pero tb tens BalanceNg
Nosaltres ho tenim a produccio amb uns cuants de visites dia a dia i funciona perfecte !
Oriol Rius
Tot llegint un aritcle sobre optimització de sites per balanceix de càrrega he trobat aquest altre reverse proxy que té una pinta molt professsional:
http://varnish.projects.linpro.no
Oriol Rius
Acabo de descobrir el nginx gràcies a un error que donava a les webs de weblogs,s.l. concretament a xataka.com; l'eina pinta molt bé i diria que ve des de Russia:
http://nginx.net/
Una altre eina a tenir en compte.