• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to Configure Load Balancer with Pound in Ubuntu

968

To Configure Load Balance with Pound in Ubuntu

Pound is an open source lightweight software for reverse proxy and load balancing solution. As a reverse-proxy load balancing server, it allows the requests from the HTTP/HTTPS clients and distributes them to more than one Web servers. This article explains the configuration of Load balancer with Pound in Ubuntu.

Testing Environment

IP Address Hostname
Pound Load Balancer 192.168.5.145 node1.example.com
Apache Webserver 1 192.168.5.146 node2.example.com
Apache Webserver 2 192.168.5.147 node3.example.com


Pre-requisties

Provide hostname resolution between the three machines either configure DNS server or create entry in /etc/hosts file.

192.168.5.145 node1.example.com node1
192.168.5.146 node2.example.com node2
192.168.5.147 node3.example.com node3

Install Apache package on both of the web servers and configure basic Apache webserver with simple index.html file.

Installation of Pound package

First install the pound package on load balancer machine (node 1).

root@node1:~# apt-get install pound -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  pound
0 upgraded, 1 newly installed, 0 to remove and 435 not upgraded.
.
.
.

Preparing to unpack .../pound_2.6-6.1_amd64.deb ...
Unpacking pound (2.6-6.1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu4) ...
Setting up pound (2.6-6.1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu4) ...


Create a new configuration file for pound and edit it as follows,

root@node1:~# mv /etc/pound/pound.cfg /etc/pound/pound.cfg.backup
root@node1:~# vim /etc/pound/pound.cfg

Entry:

User " www-data" 
Group " www-data" 
# log level (max: 5)
LogLevel 3
# specify LogFacility
LogFacility local1
# interval of heartbeat - seconds
Alive 30
Control " /var/run/pound/poundctl.socket" 

# define frontend
ListenHTTP
    Address 0.0.0.0
    Port 80
End

# define backend
Service
    BackEnd
        Address  192.168.5.146
        Port     80
        Priority 5
    End

    BackEnd
        Address  192.168.5.147
        Port     80
        Priority 5
    End
End


Once the pound is configured, start and enable its service.

root@node1:~# sed -i -e " s/^startup=0/startup=1/"  /etc/default/pound 
root@node1:~# systemctl start pound 


In addition, you need to configure rsyslog for pound.

root@node1:~# vi /etc/rsyslog.d/50-default.conf
Entry:
#in line 9 change the entry as shown like below and add new line content on line 10
*.* auth,authpriv.none local1.none              -/var/log/syslog     
local1.*                        /var/log/pound.log 


Restart rsyslog service to take effect.

root@node1:~# systemctl restart rsyslog


Now its time to check the load balancer between the webserver nodes from web browser. Open the web browser with the IP address of the pound server.

For each and every request will be redirected to the different webservers.

pound_server

webserver_2

Tags:
connor
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

Maybe I'm missing something here but why use pound when load balancing is already built into PfSense?

A

Basically, the load balancer in pfSense is a layer 4 load balancer (it only works on IP). Pound is a layer-7 LB that is able to understand the contents of the packets and able to decrypt it.

Q

pound load balancer slowed my site down?

A

It actually turned out to be an internal DNS issue. Fix resolv.conf on the DNS server and the site sprang to life.

Q

What is Pound software?

A

A pound is an open source lightweight software for reverse proxy and load balancing solution. As a reverse-proxy load balancing server, it allows the requests from the HTTP/HTTPS clients and distributes them to more than one Web servers.

Q

Is Pound opensource?

A

The pound is an open source lightweight software for reverse proxy and load balancing solution.

Q

Why load balancer is required?

A

Load balancer is "a device that acts as a reverse proxy and distributes network or application traffic across a number of servers.

Related Tutorials in How to Configure Load Balancer with Pound in Ubuntu

Related Tutorials in How to Configure Load Balancer with Pound in Ubuntu

How to Configure HAproxy Load Balancer with Keepalived in CentOS
How to Configure HAproxy Load Balancer with Keepalived in CentOS
Nov 21, 2016
How to Configure Load Balancer in Apache
How to Configure Load Balancer in Apache
Nov 18, 2016
How to configure Nginx Load Balancer in CentOS
How to configure Nginx Load Balancer in CentOS
Nov 9, 2016
How to create virtual host in NGINX (Both Name and IP based)
How to create virtual host in NGINX (Both Name and IP based)
Jul 18, 2016
How to Configure Nginx Load Balancer in Ubuntu
How to Configure Nginx Load Balancer in Ubuntu
Nov 19, 2016
How to Configure Load Balancer with Pound in Ubuntu
How to Configure Load Balancer with Pound in Ubuntu
Dec 8, 2016
How to Configure Load Balancer with HAProxy in CentOS
How to Configure Load Balancer with HAProxy in CentOS
Nov 10, 2016
How to Configure HAProxy Load Balancer in Nginx
How to Configure HAProxy Load Balancer in Nginx
Nov 11, 2016

Related Forums in How to Configure Load Balancer with Pound in Ubuntu

Related Forums in How to Configure Load Balancer with Pound in Ubuntu

Load balancer
ajinfernando class=
HAProxy : HTTP Header re-write
Mar 30, 2018
Apache
lincoln class=
Apache load balancer is not working.
Sep 4, 2017
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Lucas ?
Various options in Top command

Am using Top command only to view the load average, what are the various options in Top command..??

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.