My Blog

Haproxy on cloud

1-click AWS Deployment    1-click Azure Deployment 1-click Google Deployment

Overview

HAProxy is free, open source software that provides a high availability load balancer and proxy server for TCP and HTTP-based applications that spreads requests across multiple servers.It is written in C and has a reputation for being fast and efficient (in terms of processor and memory usage). HAProxy is used by a number of high-profile websites including GitHub, Bitbucket, Stack Overflow,Reddit, Tumblr, Twitterand , Tuentiand is used in the OpsWorks product from Amazon Web Services. This Image Provides Haproxy 1.6 with SSL support HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. It is particularly suited for very high traffic web sites and powers quite a number of the world’s most visited ones. Over the years it has become the de-facto standard opensource load balancer, is now shipped with most mainstream Linux distributions, and is often deployed by default in cloud platforms. Since it does not advertise itself, we only know it’s used when the admins report it. Haproxy is owned by Haproxy (http://www.haproxy.org/) and they own all related trademarks and IP rights for this software. Cognosys Provides Hardened images of Haproxy on the cloud ( AWS marketplace, Azure and Google Cloud Platform). Deploy Haproxy securely on cloud i.e. AWS marketplaceAzure and Google Cloud Platform (GCP)

Features

Major Features of HAProxy : Load balancing
  • Numerous balancing algorithms may be applied by server or by server group, with weighting
  • Content switching: request routing based on their content
  • SSL (one of the best SSL stack on the market)
  • Multi criteria session persistence management
  • HTTP header management via access control lists (ACL)
  • Support web services and web sockets
High availability
  • Smooth server shutdown and startup
  • Overload protection
  • Continuous server monitoring
  • High availability (VRRP / Route Health Injection)
Application performance
  • HTTP compression
  • Management of server logs in offload mode
  • Traffic analytic logs with customizable log format
  • TCP/HTTP acceleration via buffering
  • Dynamic connection control
  • Early release of connections
  • no limit in number of servers, farms, services (validated in production with 300.000 of each object)
Security
  • Reverse-Proxy
  • Protocol validation
  • Information leaks prevention
  • Protection against DoS, DDoS, worms, brute force, backdoor and Advanced persistent threat (APT)
  • Real time behavior analysis
  • Management of white/blacklists and URL restrictions
  • Filtering of HTTP / HTTPS queries and replies
 Integration and administration
  • Protocol compliance
  • full support of IPv6
  • syslog
  • proxy protocol (Amazon ELB, nginx, …)
  • Integration with standard operating systems
  • Backwards compatible with HAProxy configurations

Azure

Installation Instructions For Ubuntu

Note: How to find PublicDNS in Azure Step 1) SSH Connection: To connect to the deployed instance, Please follow Instructions to Connect to Ubuntu instance on Azure Cloud 1) Download Putty. 2) Connect to virtual machine using following SSH credentials : Host name: PublicDNS  / IP of machine Port : 22 Username: Your chosen username when you created the machine ( For example:  Azureuser) Password : Your Chosen Password when you created the machine ( How to reset the password if you do not remember) Step 2) Other Information: 1. Default configuration path:  “/etc/haproxy/haproxy.cfg” 2. Default ports:
  • Linux Machines:  SSH Port – 22
Note: Open ports as required on cloud Firewall. Configure custom inbound and outbound rules using this link 3. To access Webmin interface for management please follow this link

Step by Step Screenshots :

Installation Instructions For Centos

Note: How to find PublicDNS in Azure Step 1) SSH Connection: To connect to the deployed instance, Please follow Instructions to Connect to Ubuntu instance on Azure Cloud 1) Download Putty. 2) Connect to virtual machine using following SSH credentials :
  • Host name: PublicDNS  / IP of machine
  • Port : 22
Username: Your chosen username when you created the machine ( For example:  Azureuser) Password : Your Chosen Password when you created the machine ( How to reset the password if you do not remember) Step 2) Other Information: 1.Default installation path: will be in your web root folder “/etc/haproxy/haproxy.cfg” 2.Default ports:
  • Linux Machines:  SSH Port – 22
Note: Open ports as required on cloud Firewall. Configure custom inbound and outbound rules using this link 3. To access Webmin interface for management please follow this link

Step by Step Screenshots :

Google

Installation Instructions For Windows

Step 1) VM Creation:

  1. Click the Launch on Compute Engine button to choose the hardware and network settings.
  2. You can see at this page, an overview of Cognosys Image as well as some estimated costs of VM.
  3. In the settings page, you can choose the number of CPUs and amount of RAM, the disk size and type etc.
Step 2) RDP Connection: To initialize the DB Server connect to the deployed instance, Please follow Instructions to Connect to Windows instance on Google Cloud Step 3) Database Login Details: The below screen appears after successful deployment of the image. successful deployment of the image For local MySQL root password, please use the temporary password generated automatically during image creation as shown above. i) Please connect to Remote Desktop as given in step 2 to ensure stack is properly configured and DB is initialized. ii) You can use MySQL server instance as localhost, username root and password as shown above. If you have closed the deployment page you can also get the MySQL root password from VM Details  “Custom metadata” Section

Installation Instructions For Ubuntu

Step 1) VM Creation:
  1. Click the Launch on Compute Engine button to choose the hardware and network settings.
  2. You can see at this page, an overview of Cognosys Image as well as some estimated costs of VM.
  3. In the settings page, you can choose the number of CPUs and amount of RAM, the disk size and type etc.
Step 2) SSH Connection: To connect to the deployed instance, Please follow Instructions to Connect to Ubuntu instance on Google Cloud 1) Download Putty. 2) Connect to the virtual machine using SSH key
  • Hostname: PublicDNS  / IP of machine
  • Port : 22
Step 3) Other Information: 1.Default ports:
  • Linux Machines:  SSH Port – 22
2. To access Webmin interface for management please follow this link

Installation Instructions For Redhat

Step 1) VM Creation:
  1. Click the Launch on Compute Engine button to choose the hardware and network settings.

 2.You can see at this page, an overview of Cognosys Image as well as some estimated costs of VM.

3.In the settings page, you can choose the number of CPUs and amount of RAM, the disk size and type etc.

Step 2) SSH Connection: To connect to the deployed instance, Please follow Instructions to Connect to Ubuntu instance on Google Cloud 1) Download Putty. 2) Connect to the virtual machine using SSH key
  • Hostname: PublicDNS  / IP of machine
  • Port : 22
Step 3) Database Login Details: The below screen appears after successful deployment of the image. successful deployment of the image For local MySQL root password, please use the temporary password generated automatically during image creation as shown above. i) Please connect to Remote Desktop as given in step 2 to ensure stack is properly configured and DB is initialized. ii) You can use MySQL server instance as localhost, username root and password as shown above. If you have closed the deployment page you can also get the MySQL root password from VM Details  “Custom metadata” Section Step 4) Application URL: Access the application via a browser at http://<yourip>/haproxy A) You will see the page where you can configure your site data with site name, haproxy admin name etc. B) On next page you will see configuration success message. C) You can login to the haproxy admin portal with the haproxy username and its generated password from point A shown above. D) You can access the configured site at http://yourIP/haproxy Step 5) Other Information: 1.Default ports:
  • Linux Machines:  SSH Port – 22
2. To access Webmin interface for management please follow this link

Installation Instructions For CentOS

Step 1) SSH Connection: To connect to the deployed instance, Please follow Instructions to Connect to CentOS instance on Google Cloud 1) Download Putty. 2) Connect to virtual machine using following SSH credentials:
  • Hostname: PublicDNS  / IP of machine
  • Port : 22
Username: Your chosen username when you created the machine Password : Your Chosen Password when you created the machine ( How to reset the password if you do not remember) Step 2) Other Information: 1.Default ports:
  • Linux Machines:  SSH Port – 22
2. To access Webmin interface for management please follow this link

AWS

Installation Instructions For CentOS

Installation Instructions For CentOS

Note: How to find PublicDNS in AWS Step 1) SSH Connection: To connect to the deployed instance, Please follow Instructions to Connect to CentOS instance on AWS Cloud 1) Download Putty. 2) Connect to the virtual machine using SSH key Refer this link:
  • Hostname: PublicDNS  / IP of machine
  • Port : 22

Videos

 HAProxy Load Balancer

https://www.youtube.com/watch?v=Q8YueJNsNpo

How to set up loadbalancing on Ubuntu 14.04

HAproxy configuration and Load balancing

Haproxy on cloud

Related Posts