Coder Social home page Coder Social logo

bootinge / haproxy-configs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from harisekhon/haproxy-configs

0.0 2.0 0.0 102 KB

HAProxy Configs for Hadoop, Big Data, NoSQL, Docker, Elasticsearch, SolrCloud, HBase, Hortonworks, Cloudera, MapR, MySQL, PostgreSQL, Apache Drill, Hive, Presto, Impala, ZooKeeper, Graphite, InfluxDB, OpenTSDB, Prometheus, Kibana, SSH, RabbitMQ, Redis, Riak, Rancher etc

Home Page: https://www.linkedin.com/in/harisekhon

Makefile 29.51% Shell 70.49%

haproxy-configs's Introduction

Advanced HAProxy Configs for Big Data, NoSQL and Web technologies

Build Status

Advanced HAProxy configurations for Multi-Master, Active-Standby (Hadoop, HBase, Presto) and Peer-to-Peer technologies (Elasticsearch, SolrCloud etc).

Designed both for production-grade High Availability and also to make scripting and monitoring easier when connecting to APIs.

Forked as a submodule from the Advanced Nagios Plugins Collection, these configurations contain specialised Health Checks for each system based on experience and code from the Advanced Nagios Plugins Collection and PyTools github repos.

Recommended to run with High Availability HAProxy using VRRP to create full production-grade High Availability load balancer solutions.

Features

Each config comes pre-tuned with:

  1. Specialised Health Checks per technology's API
  2. Load Balancing algorithm selected best suited per technology (depending on Active/Passive, Peer-to-Peer etc)
  3. Various buffer sizes, keepalives, connection limits and server retries already tuned (many via shared global config 10-global.cfg)
  4. ACL protections - limits access to private IP addresses - safer by default but easy to disable if you need to serve the internet
  5. Additional logging
  6. Optional Stats Admin UI (excellent for admin, monitoring and debugging - password protected, change the default password from 'test' in 20-stats.cfg if you source that config)

You should use an expert consultant to fine tune to your needs but these should be extremely close to your finished production configurations. In most cases all you need to do is put in your addresses for the backend servers.

Usage

Configurations are split by service in the form of <service>.cfg for mix-and-match convenience and must be combined with 10-global.cfg settings like so:

haproxy -f 10-global.cfg -f elasticsearch.cfg

For multiple services just add those service configurations to the command line options:

haproxy -f 10-global.cfg -f elasticsearch.cfg -f solrcloud.cfg

Some technologies default to the same port number (eg. Ambari and Presto both use port 8080), so if running both on the same HAProxy host then just modify one of the frontend listening port numbers.

If you want to add a Stats Admin UI then include the 20-stats.cfg configuration (remember to change the default password in 20-stats.cfg if sourcing it):

haproxy -f 10-global.cfg -f 20-stats.cfg -f elasticsearch.cfg ...

Backend Server Addresses (set these to your cluster hosts)

In most cases all you'll need to do is add your server addresses in to the backend config and then start HAProxy.

Common backend server addresses have been pre-populated for convenience including:

  • <service> - generic service name matching the proxied technology - could be resolved by DNS to multiple IPs to be balanced across
  • 192.168.99.100 - the common Docker Machine IP address
  • docker - again DNS resolve to your Docker location

These addresses are used in Continuous Integration tests run on this repo from the Advanced Nagios Plugins Collection.

More Configs

See the untested/ directory for a few more including SSL config versions I haven't got round to testing yet but should work.

Tests

Forked to a submodule from the Advanced Nagios Plugins Collection. These HAProxy configs are tested against Docker containers as part of CI tests in that repo.

See Also

  • find_active_server.py from my PyTools repo and its related adjacent programs for on-the-fly command line determination of active masters or first responding peers across many of these same technologies
  • The Advanced Nagios Plugins Collection - contains many API tests for these technologies and is used to test these configurations by testing each official technology by accessing through live running HAProxies running these configurations to ensure these configs work end-to-end.

haproxy-configs's People

Contributors

harisekhon avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.